From: Thomas E. Dickey Date: Sat, 20 Apr 2024 23:45:24 +0000 (+0000) Subject: ncurses 6.4 - patch 20240420 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=HEAD;hp=91e462de27aeecd5b1c8965a6dba078f7a438003 ncurses 6.4 - patch 20240420 + improve formatting/style of manpages (patches by Branden Robinson). + compiler warning/portability fixes. --- diff --git a/ANNOUNCE b/ANNOUNCE index 0684b3dc..45b1a0ea 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ - Announcing ncurses 6.3 + Announcing ncurses 6.4 Overview @@ -40,19 +40,19 @@ Overview The ncurses distribution is available at ncurses' homepage: - ftp://ftp.invisible-island.net/ncurses/ or + https://invisible-island.net/archives/ncurses/ or https://invisible-mirror.net/archives/ncurses/ . - It is also available via anonymous FTP at the GNU distribution site + It is also available at the GNU distribution site - ftp://ftp.gnu.org/gnu/ncurses/ . + https://ftp.gnu.org/gnu/ncurses/ . Release Notes - These notes are for ncurses 6.3, released October 21, 2021. + These notes are for ncurses 6.4, released December 31, 2022. This release is designed to be source-compatible with ncurses 5.0 - through 6.2; providing extensions to the application binary interface + through 6.3; 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 to reflect improvements to the ncurses 6 ABI and the supporting utility programs. @@ -60,240 +60,179 @@ Release Notes There are, of course, numerous other improvements, listed in this announcement. - The most important bug-fixes/improvements dealt with portability + The most important bug-fixes/improvements dealt with robustness 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. + ncurses 6.3 release. Library improvements New features - There are a few new features: - * A new (experimental) driver, for the Windows Terminal - configuration is provided. - * 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). - - Additionally, to improve performance other changes (and extensions) - are provided in this release: - * modify lib_mouse.c to check for out-of-range button numbers, - convert those to position reports. - * add sp-funcs for erasewchar, killwchar. + There are no new features in this release. Other improvements - These are revised features: - * modify wgetnstr, wgetn_wstr to improve compatibility with SVr4 - curses in its treatment of interrupt and quit characters - - These were done to limit or ultimately deprecate features: - * mark wgetch-events feature as deprecated. - + prevent KEY_EVENT from appearing in curses.h unless the - configure option --enable-wgetch-events is used. - + modify MKkey_defs.sh to hide ncurses' definition of - KEY_EVENTS to reduce Visual Studio C++ redefinition warnings. - * reduce build-warnings by excluding ncurses-internals from - deprecation warnings. - These are improvements to existing features: - * drop symbols GCC_PRINTF and GCC_SCANF from , to simplify - use. - * apply gcc format attribute to prototypes which use a va_list - parameter rather than a "..." variable-length parameter list. - * modify so that it is not necessary to include - before . - * provide for wide-characters as background character in wbkgrnd - * improve parameter-checking for tparm, adding function _nc_tiparm() - to handle the most-used case, which accepts only numeric - parameters. - * use return-value from vsnprintf to reallocate as needed to allow - for buffers larger than the screen size. - * 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. + * modify delscreen to more effectively delete all windows on the + given screen. + * modify wnoutrefresh to call pnoutrefresh if its parameter is a + pad, rather than treating it as an error, and modify new_panel to + permit its window-parameter to be a pad + * modify curses_trace() to show the trace-mask as symbols, e.g., + TRACE_ORDINARY, DEBUG_LEVEL(3). + * improve checks for valid mouse events when an intermediate mouse + state is not part of the mousemask specified by the caller + * allow extended-color number in opts parameter of wattr_on. + * improve _tracecchar_t2 formatting of base+combining character. + * trim out some unwanted linker options from ncurses*config and .pc + files seen in Fedora 36+. + * improve shell-scripts with shellcheck + * improve use of "trap" in shell scripts, using a script. + * modify make-tar.sh scripts to make timestamps more predictable. These are corrections to existing features: - * add a check to guard against repeat_char emitting digits which - could be interpreted as BSD-style padding when --enable-bsdpad is - configured. - * check for screen size-change in scr_init and scr_restore, in case - a screen dump does not match the current screen dimensions + * modify misc/gen-pkgconfig.in to allow for the case where the + library directory does not yet exist, since this is processed + before doing an install + * set trailing null on string passed from winsnstr to wins_nwstr. + * modify waddch_literal to allow for double-width base character + when merging a combining character Program improvements Several improvements were made to the utility programs: - tabs + infocmp - + implement "+m" option + + rewrite canonical_name function of infocmp to ensure buffer + size + + improve readability of long parameterized expressions with + the infocmp "-f" option by allowing split before a "%p" + marker. + + modify verbose-option of infocmp, tic, toe to enable + debug-tracing if that is configured. - tic + tabs + limit tab-stop values to max-columns - + 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. - - toe - - + 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. + tic + add consistency check in tic for u6/u7/u8/u9 and NQ + capabilities. tput - - + modify to allow multiple commands per line. - + improve parameter-checking by analyzing all extended string - capabilities, e.g., as used in the Cs and Ms capabilities of - the tmux description. - + make warning messages consistently using alias names when - those are used, rather than the underlying program's name. - + improve usage message for aliases such as clear, by - eliminating tput-specific portions. - + modify initialization to avoid opening /dev/tty for cases - other than reset/init, e.g., for clear. + corrected use of original tty-modes in init/reset subcommands Examples 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 test-program, and for analyzing traces using the - tracemunch script: - * add "-r" option to the dots test-programs, to help with scripting - a performance comparison. - * build-fix for test_opaque, for configurations without opaque - curses structs, e.g., ncurses 5.7. - * improve tracemunch logic for "RUN" compaction. - * improve tracemunch's coverage of form/menu/panel libraries. - * improve tracemunch's checking/reporting the type for the first - parameter, e.g., "WINDOW*" rather than "#1". - * modify tracemunch and the panel library to show readable traces - for panel- and user-pointers. + test-packages: + * add minimal -h (usage) and -V (version) getopt logic to all + ncurses-examples programs. + * fix an error in "@" command in test/ncurses.c F-menu + * add curses_trace to ifdef's for START_TRACE in test/test.priv.h + * improve pthread-configuration for test/worm.c + * add setlocale call to several test-programs. + * workaround in test/picsmap.c for use of floating point for rgb + values by ImageMagick 6.9.11, which appears to use the wrong upper + limit. + * use static libraries for AdaCurses test-package for Mageia, since + no gprbuild package is available. + * install Ada95 sample programs in libexecdir, adding a wrapper + script to invoke those. + * install ncurses-examples programs in libexecdir, adding a wrapper + script to invoke those. There are other new demo/test programs and reusable examples: - back_ground - to exercise the wide-character background functions. + test/combine + demonstrate combining characters + + test/test_delwin + demonstrate deleting a window - move_field - to demonstrate move_field, and a stub for a corresponding demo - of dup_field. + test/test_mouse + observe mouse events in the raw terminal or parsed ncurses + modes - test_tparm - for checking tparm changes. + test/test_unget_wch + demonstrate the unget_wch and unget functions Terminal database There are several new terminal descriptions: - - 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. + * mosh + * mosh-256color + * teken-16color + * teken-sc + * teken-vt + * xgterm There are many changes to existing terminal descriptions. Some were updates to several descriptions: - * correct use-ordering in some xterm-direct flavors - * fix some sgr inconsistencies in d230c, ibm6153, ibm6154, - ncrvt100an - * improve vt50h and vt52 based on DECScope manual - * use hp+arrows in a few places - * use hp+pfk-cr in a few places - * use vt220+cvis in st, terminology, termite since they ignore - blinking-cursor detail in att610+cvis + * make description-fields distinct + * fix errata in description fields + * add/use several building-blocks: + + aixterm+sl + + ansi+cpr + + apollo+vt132 + + decid+cpr + + ncr260vp+sl + + wyse+sl + + x10term+sl + + xterm+acs + + xterm+alt47 while others affected specific descriptions. These were retested, to take into account changes by their developers: - - kitty+common, mlterm3, ms-terminal + * kitty + * teken while these are specific fixes based on reviewing documentation, user reports, or warnings from tic: - aaa+dec, aaa+rv - correct rmacs/smacs + att610+cvis0 + amended note as per documentation for att610, att620, att730 - aaa+rv - correct sgr + kon, kon2, jfbterm + revise to undo "linux2.6" change to smacs/rmacs/enacs - icl6404 - correct csr + st-0.6 + add dim, ecma+strikeout - kitty - use att610+cvis, xterm+tmux and ansi+enq + foot+base + add xterm+sl-alt - konsole-base - re-enable "bel" + dec+sl + correct dsl in dec+sl - linux2.6 - fix pound-sign mapping in acsc + mintty and tmux + correct setal in mintty/tmux entries, add to vte-2018 - linux3.0 - modify to reflect default mapping of shift-tab by kbd 1.14 - - pccons - fill in some missing pieces, to make it comparable to the vt220 - entry + nsterm + modify nsterm to use xterm+alt1049 putty - use vt100+fnkeys, add rep - - screen - use vt100+enq + modify putty to use xterm+alt1049 - terminator - corrected tsl capability - - ti916 - correct cup - - tmux - change kbs to ^? - - vt220 - use vt220+cvis - - vt420+lrmm - add smglp and smgrp - - vt420 - use vt420+lrmm - - xterm-new - add nel - - xterm-vt52 - use vt52+keypad + vte-2018 + add blink and setal A few entries use extensions (user-defined terminal capabilities): - * add shifted Linux console keys in linux+sfkeys entry for - screen.linux - * add Smulx to alacritty - * add kbeg to xterm+keypad to accommodate termcap applications - * add extensions in xterm+tmux and ecma+strikeout to ms-terminal, - but cancel the non-working Cr and Ms capabilities + * use ansi+enq and decid+cpr in cases where the terminal probably + supported the u6-u9 extension + * remove u6-u9 from teken-2018 + * use NQ to flag entries where the terminal does not support query + and response + * add/use bracketed+paste to help identify terminals supporting this + xterm feature + * modify samples for xterm mouse 1002/1003 modes to use 1006 mode, + and also provide for focus in/out responses + * xterm patch #371 supports DEC-compatible status-line. add dec+sl + to xterm-new, per xterm #371, add xterm-p371, add xterm-p370, for + use in older terminals, and set "xterm-new" to "xterm-p370" (to + ease adoption). Documentation @@ -308,164 +247,123 @@ Release Notes features and show how they evolved, there are corrections, clarifications, etc.: * 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. + + remove a stray '/' from description of %g in terminfo(5). + + correct/improve font-formatting in curs_getch.3x, as well as + other manual pages. * New/improved history and portability sections: - + improve documentation for tparm and static/dynamic variables. - + add history note to curs_scanw.3x for and - - + add history note to curs_printw.3x for and - - + add portability note to ncurses.3x regarding - + 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. + + add portability notes for delscreen and delwin in manual. + + improve curs_slk.3x discussion of extensions and portability * 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. + + improve curs_bkgd.3x, explaining that bkgdset can affect + results for bkgd + + add note on portable memory-leak checking in curs_memleaks.3x + + expanded description in resizeterm.3x + + add section on releasing memory to curs_termcap.3x and + curs_terminfo.3x manpages. + + add clarification of the scope of dynamic variables in + terminfo(5). + + improve formatting of ncurses-intro.html and hackguide.html + + improve curs_clear.3x links to other pages + + update ncurses-howto, making documentation fixes along with + corrections to example programs. + + use newer version 1.36 of gnathtml for generating Ada html + files. + + update external links in Ada95.html There are no new manual pages (all of the manual page updates are to existing pages). - Some of the improvements are more subtle, relating to the way 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. - Interesting bug-fixes - While there were many bugs fixed during development of ncurses 6.3, + While there were many bugs fixed during development of ncurses 6.4, 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. - The interesting bugs were: - * modify wbkgd and 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. - 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. - * remove output-related checks for nl/nonl (also reported on the - mailing list). - * improve tparm implementation of %P and %g, more closely matching - SVr4 terminfo. Those denote static and dynamic variables in - terminfo expressions. - 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. + The interesting bugs were those dealing with memory leaks and buffer + overflows. Although the utilities are designed for text files (which + they do properly), some choose to test them with non-text files. + * Text files contain no embedded nulls. Also, they end with a + newline. Feeding tic non-text files exposed a few cases where the + program did not check for those issues. As a result, further + processing of the input found limit-checks whose assumptions were + invalid. + * Fixing the limit-checks (first) found a problem with tic managing + the list of strings in a terminal description. In merging two + terminal descriptions (i.e., the "use=" feature), tic was not + allocating a complete copy. A quick repair for that introduced a + memory leak. + * The checks for non-text files are improved (i.e., embedded nulls + in the input file will cause tic to reject it rather than + attempting to process it). + * The string allocations in tic are likewise improved. Configuration changes Major changes - There are no major changes. Several new options were added to ease - integration of packages with systems using different versions of GNAT - and ncurses. Also, improvements were made to configure checks. + There are no major changes. No new options were added. Several + improvements were made to configure checks. Configuration options There are a few new/modified configure options: - --enable-fvisibility - new configure option and check for gcc -fvisibility=hidden - feature - - --enable-leaks - corrected to allow turning leak-checking off later in a set of - options. - - --enable-stdnoreturn - new configure option makes the _Noreturn keyword optional to - ease transition. - - --disable-pkg-ldflags - revised option also controls whether $LDFLAGS from the build is - provided in "-config" and ".pc" files. - - --disable-root-access - add configure option which tells ncurses to disallow most - file-opens by setuid processes. + --with-abi-version + add ABI 7 defaults to configure script. - --disable-wattr-macros - changed default to help packagers who reuse wide ncursesw - header file with non-wide ncurses library. + --with-caps + add warning in configure script if file specified for + "--with-caps" does not exist. - --with-pkg-config-libdir - revised option uses the actual search path from pkg-config or - pkgconf using the output from --debug. + --with-manpage-format + bzip2 and xz compression are now supported - --with-ada-libname - --with-form-libname - --with-menu-libname - --with-panel-libname - new several --with-xxx-libname options, to help with pkgsrc + --with-xterm-kbs + add check/warning in configure script if option + "--with-xterm-kbs" is missing or inconsistent Portability Many of the portability changes are implemented via the configure script: - * 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 - * modify configure check for libtool to prevent accidental use of an - OpenBSD program which uses the same name. - * 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. - * 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. - * 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. - * modify CF_NCURSES_CONFIG to work around Xcode's c99 "-W" option, - which conflicts with conventional use for passing linker options. - * modify configure scripts to filter out redefinitions of - _XOPEN_SOURCE, e.g., for NetBSD which generally supports 500, but - 600 is needed for ncursesw. + * amend configure option's auto-search to account for systems where + none of the directories known to pkg-config exist + * corrected regex needed for older pkg-config used in Solaris 10 + * improve handling of --with-pkg-config-libdir option, allowing for + the case where either $PKG_CONFIG_LIBDIR or the option value has a + colon-separated list of directories + * if the --with-pkg-config-libdir option is not given, use + ${libdir}/pkgconfig as a default + * improve search-path check for pkg-config, e.g., for Debian testing + which installs pkg-config with architecture-prefixes. + * build-fix for cross-compiling to MingW, conditionally add -lssp + * improve configure check for getttynam + * fixes to build with dietlibc: + + add configure check for fpathconf + + add configure check for math sine/cosine, needed in + test/tclock, and eliminate pow() from test/hanoi + + use wcsnlen as an alternative to wmemchr if it is not found + * modify configure macro CF_BUILD_CC to check if the build-compiler + works, rather than that it is different from the cross-compiler, + e.g., to accommodate a compiler which can be used for either + purpose with different flags + * modify configure/scripts to work around interference by GNU grep + 3.8 Here are some of the other portability fixes: - * 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. - * modify mk-1st.awk to account for extra-suffix configure option. - * build-fix for termsort module when configured with termcap. - * modify configure script and makefiles to support ".PHONY" make - program feature. - * amend libtool configuration to add dependency for install.tic, - etc., in ncurses/Makefile on the lower-level libraries. - * modify Ada95 source-generation utility to write to a file given as - parameter rather than to the standard output, allowing builds with - MinGW. - * amend tic/infocmp check to allow for the respective tool's - absence. - * build-fixes for gnat 10.1.1, whose gnatmake drops integration with - gprbuild. - * correct configure version-check/warning for g++ to allow for 10.x + * change man_db.renames to template, to handle ncurses*-config + script with the --extra-suffix configure option. + * update CF_XOPEN_SOURCE macro, adding variants "gnueabi" and + "gnueabihf" to get _DEFAULT_SOURCE special case, as well as adding + GNU libc suffixes for "abi64", "abin32", "x32" to distinguish it + from other libc flavors. + * work around musl's nonstandard use of feature test macros by + adding a definition for NCURSES_WIDECHAR to the generated ".pc" + and *-config files. + * use "command -v" rather than "type" in Ada95/gen/Makefile.in to + fix a portability issue. _________________________________________________________________ Features of ncurses @@ -717,13 +615,13 @@ Development activities Beta versions of ncurses are made available at - ftp://ftp.invisible-island.net/ncurses/current/ and + https://invisible-island.net/archives/ncurses/current/ and https://invisible-mirror.net/archives/ncurses/current/ . Patches to the current release are made available at - ftp://ftp.invisible-island.net/ncurses/6.2/ and - https://invisible-mirror.net/archives/ncurses/6.2/ . + https://invisible-island.net/archives/ncurses/6.3/ and + https://invisible-mirror.net/archives/ncurses/6.3/ . There is an archive of the mailing list here: diff --git a/Ada95/Makefile.in b/Ada95/Makefile.in index eeff9606..22b922e9 100644 --- a/Ada95/Makefile.in +++ b/Ada95/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.29 2021/10/23 16:00:22 tom Exp $ +# $Id: Makefile.in,v 1.30 2022/12/17 23:33:33 tom Exp $ ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2021,2022 Thomas E. Dickey # # Copyright 1998-2010,2015 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -31,14 +31,32 @@ # Author: Juergen Pfeifer, 1996 # # Version Control -# $Revision: 1.29 $ +# $Revision: 1.30 $ # SHELL = @SHELL@ VPATH = @srcdir@ THIS = Makefile +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +datarootdir = @datarootdir@ +datadir = @datadir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +includedir = @includedir@ + +BINDIR = $(DESTDIR)$(bindir) +DATADIR = $(DESTDIR)$(datadir) +LIBDIR = $(DESTDIR)$(libdir) +LIBEXECDIR = $(DESTDIR)$(libexecdir) + SUBDIRS = @ADA_SUBDIRS@ +INSTALL = @INSTALL@ @INSTALL_OPT_O@ +INSTALL_SCRIPT = @INSTALL@ + TOP_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)" @SET_MAKE@ @@ -91,7 +109,7 @@ depend : @ check : - @ + @echo "The test-programs are interactive" tags : @ diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index c675b6a3..6fe1f946 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 2010-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.191 2021/11/20 19:58:23 tom Exp $ +dnl $Id: aclocal.m4,v 1.210 2024/03/30 22:17:13 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -477,7 +477,7 @@ fi AC_SUBST(ARFLAGS) ]) dnl --------------------------------------------------------------------------- -dnl CF_BUILD_CC version: 9 updated: 2021/01/02 09:31:20 +dnl CF_BUILD_CC version: 11 updated: 2022/12/04 15:40:08 dnl ----------- dnl If we're cross-compiling, allow the user to override the tools and their dnl options. The configure script is oriented toward identifying the host @@ -543,7 +543,32 @@ if test "$cross_compiling" = yes ; then : ${BUILD_CC:='${CC}'} - if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then + AC_MSG_CHECKING(if the build-compiler "$BUILD_CC" works) + + cf_save_crossed=$cross_compiling + cf_save_ac_link=$ac_link + cross_compiling=no + cf_build_cppflags=$BUILD_CPPFLAGS + test "$cf_build_cppflags" = "#" && cf_build_cppflags= + ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&AS_MESSAGE_LOG_FD' + + AC_TRY_RUN([#include + int main(int argc, char *argv[]) + { + ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0); + } + ], + cf_ok_build_cc=yes, + cf_ok_build_cc=no, + cf_ok_build_cc=unknown) + + cross_compiling=$cf_save_crossed + ac_link=$cf_save_ac_link + + AC_MSG_RESULT($cf_ok_build_cc) + + if test "$cf_ok_build_cc" != yes + then AC_MSG_ERROR([Cross-build requires two compilers. Use --with-build-cc to specify the native compiler.]) fi @@ -569,7 +594,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23 +dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25 dnl --------------- AC_DEFUN([CF_C11_NORETURN], [ @@ -583,8 +608,7 @@ AC_MSG_RESULT($enable_stdnoreturn) if test $enable_stdnoreturn = yes; then AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, [AC_TRY_COMPILE([ -#include -#include +$ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } ], @@ -608,7 +632,7 @@ AC_SUBST(HAVE_STDNORETURN_H) AC_SUBST(STDC_NORETURN) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20 +dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -649,7 +673,7 @@ case "$CC" in AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -809,7 +833,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04 +dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does @@ -831,7 +855,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes ],[]) @@ -877,7 +901,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17 +dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. @@ -912,6 +936,7 @@ AC_TRY_COMPILE( AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( [ +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include @@ -937,7 +962,7 @@ esac ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17 +dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. @@ -972,6 +997,7 @@ AC_TRY_COMPILE( AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( [ +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include @@ -997,7 +1023,7 @@ esac ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_HEADER version: 5 updated: 2015/04/23 20:35:30 +dnl CF_CURSES_HEADER version: 6 updated: 2022/12/02 20:06:52 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. @@ -1011,7 +1037,7 @@ for cf_header in \ curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h]) do AC_TRY_COMPILE([#include <${cf_header}>], - [initscr(); tgoto("?", 0,0)], + [initscr(); endwin()], [cf_cv_ncurses_header=$cf_header; break],[]) done ]) @@ -1329,7 +1355,7 @@ AC_DEFUN([CF_FIXUP_ADAFLAGS],[ AC_MSG_RESULT($ADAFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FIX_WARNINGS version: 3 updated: 2020/12/31 18:40:20 +dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31 dnl --------------- dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's dnl "-Werror" flags can interfere with configure-checks. Those go into @@ -1341,11 +1367,13 @@ if test "$GCC" = yes || test "$GXX" = yes then case [$]$1 in (*-Werror=*) - CF_VERBOSE(repairing $1: [$]$1) cf_temp_flags= for cf_temp_scan in [$]$1 do case "x$cf_temp_scan" in + (x-Werror=format*) + CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan) + ;; (x-Werror=*) CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan) ;; @@ -1354,15 +1382,46 @@ then ;; esac done - $1="$cf_temp_flags" - CF_VERBOSE(... fixed [$]$1) - CF_VERBOSE(... extra $EXTRA_CFLAGS) + if test "x[$]$1" != "x$cf_temp_flags" + then + CF_VERBOSE(repairing $1: [$]$1) + $1="$cf_temp_flags" + CF_VERBOSE(... fixed [$]$1) + CF_VERBOSE(... extra $EXTRA_CFLAGS) + fi ;; esac fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FUNC_GETTIME version: 2 updated: 2023/02/25 08:45:56 +dnl --------------- +dnl Check for gettimeofday or clock_gettime. In 2023, the former is still more +dnl widely supported, but "deprecated" (2008), so we will use the latter if it +dnl is available, to reduce compiler warnings. +AC_DEFUN([CF_FUNC_GETTIME],[ +AC_CACHE_CHECK(for clock_gettime,cf_cv_func_clock_gettime,[ + AC_TRY_LINK([#include ], + [struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts], + [cf_cv_func_clock_gettime=yes], + [cf_cv_func_clock_gettime=no]) +]) + +if test "$cf_cv_func_clock_gettime" = yes +then + AC_DEFINE(HAVE_CLOCK_GETTIME,1,[Define to 1 if we have clock_gettime function]) +else +AC_CHECK_FUNC(gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ + +AC_CHECK_LIB(bsd, gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) + CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet @@ -1393,6 +1452,7 @@ then AC_CHECKING([for $CC __attribute__ directives]) cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -1475,7 +1535,7 @@ rm -rf ./conftest* fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_VERSION version: 8 updated: 2019/09/07 13:38:36 +dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Find version of gcc, and (because icc/clang pretend to be gcc without being dnl compatible), attempt to determine if icc/clang is actually used. @@ -1484,7 +1544,7 @@ AC_REQUIRE([AC_PROG_CC]) GCC_VERSION=none if test "$GCC" = yes ; then AC_MSG_CHECKING(version of $CC) - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown AC_MSG_RESULT($GCC_VERSION) fi @@ -2068,7 +2128,7 @@ CPPFLAGS="-I. $CPPFLAGS" AC_SUBST(CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INSTALL_OPTS version: 2 updated: 2018/08/18 12:19:21 +dnl CF_INSTALL_OPTS version: 3 updated: 2023/06/03 15:17:30 dnl --------------- dnl prompt for/fill-in useful install-program options AC_DEFUN([CF_INSTALL_OPTS], @@ -2076,6 +2136,7 @@ AC_DEFUN([CF_INSTALL_OPTS], CF_INSTALL_OPT_S CF_INSTALL_OPT_P CF_INSTALL_OPT_O +CF_INSTALL_OPT_STRIP_PROG ])dnl dnl --------------------------------------------------------------------------- dnl CF_INSTALL_OPT_O version: 3 updated: 2020/12/31 20:19:42 @@ -2162,7 +2223,73 @@ fi AC_SUBST(INSTALL_OPT_S) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59 +dnl CF_INSTALL_OPT_STRIP_PROG version: 1 updated: 2023/06/03 15:17:30 +dnl ------------------------- +dnl Provide an option for overriding the strip program used in install "-s" +dnl +dnl coreutils install provides a --strip-program option +dnl FreeBSD uses STRIPBIN environment variable, while NetBSD and OpenBSD use +dnl STRIP environment variable. Other versions of install do not support this. +AC_DEFUN([CF_INSTALL_OPT_STRIP_PROG], +[ +AC_REQUIRE([CF_INSTALL_OPT_S]) +if test -n "$INSTALL_OPT_S" +then + AC_MSG_CHECKING(if you want to specify strip-program) + AC_ARG_WITH(strip-program, + [ --with-strip-program=XX specify program to use when stripping in install], + [with_strip_program=$withval], + [with_strip_program=no]) + AC_MSG_RESULT($with_strip_program) + if test "$with_strip_program" != no + then + AC_MSG_CHECKING(if strip-program is supported with this installer) + cf_install_program=`echo "$INSTALL" | sed -e 's%[[ ]]*[[ ]]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable[$]" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + AC_MSG_RESULT($check_install_strip) + case "$check_install_strip" in + (no) + AC_MSG_WARN($cf_install_program does not support strip program option) + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "[$]@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + CF_VERBOSE(created $INSTALL) + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi +AC_SUBST(INSTALL_OPT_S) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch @@ -2188,7 +2315,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -2200,7 +2327,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147" fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LARGEFILE version: 12 updated: 2020/03/19 20:23:48 +dnl CF_LARGEFILE version: 13 updated: 2023/12/03 19:09:59 dnl ------------ dnl Add checks for large file support. AC_DEFUN([CF_LARGEFILE],[ @@ -2234,11 +2361,15 @@ ifdef([AC_FUNC_FSEEKO],[ #pragma GCC diagnostic error "-Wincompatible-pointer-types" #include #include + +#ifndef __REDIRECT +/* if transitional largefile support is setup, this is true */ +extern struct dirent64 * readdir(DIR *); +#endif ],[ - /* if transitional largefile support is setup, this is true */ - extern struct dirent64 * readdir(DIR *); - struct dirent64 *x = readdir((DIR *)0); - struct dirent *y = readdir((DIR *)0); + DIR *dp = opendir("."); + struct dirent64 *x = readdir(dp); + struct dirent *y = readdir(dp); int z = x - y; (void)z; ], @@ -2469,7 +2600,7 @@ AC_DEFUN([CF_LIB_TYPE], test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LINK_DATAONLY version: 13 updated: 2020/02/08 15:59:30 +dnl CF_LINK_DATAONLY version: 15 updated: 2023/12/03 10:03:10 dnl ---------------- dnl Some systems have a non-ANSI linker that doesn't pull in modules that have dnl only data (i.e., no functions), for example NeXT. On those systems we'll @@ -2491,17 +2622,21 @@ EOF rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext < -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include -#include +$ac_includes_default + int main(void) { - char *tmpl = "conftestXXXXXX"; + static char tmpl[] = "conftestXXXXXX"; char name[2][80]; int n; int result = 0; @@ -2882,7 +3011,7 @@ AC_SUBST(cf_cv_type_of_bool)dnl ]) dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CC_CHECK version: 5 updated: 2020/12/31 20:19:42 +dnl CF_NCURSES_CC_CHECK version: 6 updated: 2023/02/18 17:47:58 dnl ------------------- dnl Check if we can compile with ncurses' header file dnl $1 is the cache variable to set @@ -2899,7 +3028,7 @@ AC_DEFUN([CF_NCURSES_CC_CHECK],[ #ifdef NCURSES_VERSION ]ifelse($3,ncursesw,[ #ifndef WACS_BSSB - make an error + #error WACS_BSSB is not defined #endif ])[ printf("%s\\n", NCURSES_VERSION); @@ -2907,7 +3036,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif ] @@ -3230,7 +3359,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root) AC_DEFINE_UNQUOTED($cf_nculib_ROOT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 16 updated: 2020/12/31 20:19:42 +dnl CF_NCURSES_VERSION version: 18 updated: 2024/01/07 06:34:16 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -3243,8 +3372,10 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ cf_tempfile=out$$ rm -f "$cf_tempfile" AC_TRY_RUN([ +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -3258,7 +3389,7 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); @@ -3365,7 +3496,7 @@ case ".[$]$1" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 12 updated: 2021/10/10 20:18:09 +dnl CF_PKG_CONFIG version: 13 updated: 2023/10/28 11:59:01 dnl ------------- dnl Check for the package-config program, unless disabled by command-line. dnl @@ -3374,7 +3505,7 @@ AC_DEFUN([CF_PKG_CONFIG], [ AC_MSG_CHECKING(if you want to use pkg-config) AC_ARG_WITH(pkg-config, - [ --with-pkg-config{=path} enable/disable use of pkg-config], + [[ --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]], [cf_pkg_config=$withval], [cf_pkg_config=yes]) AC_MSG_RESULT($cf_pkg_config) @@ -3403,7 +3534,7 @@ fi AC_SUBST(PKG_CONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 +dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -3434,7 +3565,7 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[ CF_MSG_LOG(if the symbol is already defined go no further) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif], [cf_cv_posix_c_source=no], [cf_want_posix_source=no @@ -3453,7 +3584,7 @@ make an error if test "$cf_want_posix_source" = yes ; then AC_TRY_COMPILE([#include ],[ #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif],[], cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE") fi @@ -3464,7 +3595,7 @@ make an error CF_MSG_LOG(if the second compile does not leave our definition intact error) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif],, [cf_cv_posix_c_source=no]) CFLAGS="$cf_save_CFLAGS" @@ -3852,7 +3983,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 107 updated: 2021/09/04 06:47:34 +dnl CF_SHARED_OPTS version: 111 updated: 2024/03/29 20:08:49 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -3898,9 +4029,9 @@ AC_DEFUN([CF_SHARED_OPTS], cf_ld_rpath_opt= test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" - AC_MSG_CHECKING(if release/abi version should be used for shared libs) + AC_MSG_CHECKING(whether to use release or ABI version in shared library file names) AC_ARG_WITH(shlib-version, - [ --with-shlib-version=X Specify rel or abi version for shared libs], + [[ --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names]], [test -z "$withval" && withval=auto case "$withval" in (yes) @@ -3942,7 +4073,7 @@ AC_DEFUN([CF_SHARED_OPTS], for CC_SHARED_OPTS in -fPIC -fpic '' do CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" - AC_TRY_COMPILE([#include ],[int x = 1],[break],[]) + AC_TRY_COMPILE([#include ],[int x = 1; (void)x],[break],[]) done AC_MSG_RESULT($CC_SHARED_OPTS) CFLAGS="$cf_save_CFLAGS" @@ -4312,11 +4443,11 @@ CF_EOF # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 if test "$DFT_LWR_MODEL" = "shared" ; then - LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" + LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi if test "$cf_cv_enable_rpath" = yes ; then - EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" + EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS" fi CF_SHARED_SONAME if test "$GCC" != yes; then @@ -4328,9 +4459,9 @@ CF_EOF done CFLAGS="$cf_save_CFLAGS" CC_SHARED_OPTS=$cf_shared_opts - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $[@]' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]' else - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]' fi ;; (sysv5uw7*|unix_sv*) @@ -4517,34 +4648,20 @@ top_builddir=ifelse($1,,`pwd`,$1) AC_SUBST(top_builddir) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TRY_XOPEN_SOURCE version: 3 updated: 2021/08/28 15:20:37 +dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, [cf_cv_xopen_source=no], [cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE) - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" ]) ]) @@ -4565,7 +4682,7 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTF8_LIB version: 9 updated: 2021/05/19 19:35:25 +dnl CF_UTF8_LIB version: 10 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for multibyte support, and if not found, utf8 compatibility library AC_DEFUN([CF_UTF8_LIB], @@ -4574,8 +4691,7 @@ AC_HAVE_HEADERS(wchar.h) AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ cf_save_LIBS="$LIBS" AC_TRY_LINK([ -#include -#include +$ac_includes_default #ifdef HAVE_WCHAR_H #include #endif @@ -4631,26 +4747,26 @@ weak_symbol(fopen); ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_COMPILER version: 3 updated: 2023/10/28 11:59:01 dnl -------------------- dnl Command-line option to specify the Ada95 compiler. AC_DEFUN([CF_WITH_ADA_COMPILER],[ -AC_MSG_CHECKING(for ada-compiler) +AC_MSG_CHECKING(for Ada95 compiler) AC_ARG_WITH(ada-compiler, - [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)], + [[ --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)]], [cf_ada_compiler=$withval], [cf_ada_compiler=gnatmake]) AC_SUBST(cf_ada_compiler) AC_MSG_RESULT($cf_ada_compiler) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_INCLUDE version: 3 updated: 2023/10/28 11:59:01 dnl ------------------- dnl Command-line option to specify where Ada includes will install. AC_DEFUN([CF_WITH_ADA_INCLUDE],[ -AC_MSG_CHECKING(for ada-include) +AC_MSG_CHECKING(for Ada95 include directory) CF_WITH_PATH(ada-include, - [ --with-ada-include=DIR Ada includes are in DIR], + [ --with-ada-include=DIR find Ada95 includes in DIR], ADA_INCLUDE, PREFIX/share/ada/adainclude, [$]prefix/share/ada/adainclude) @@ -4658,16 +4774,16 @@ AC_SUBST(ADA_INCLUDE) AC_MSG_RESULT($ADA_INCLUDE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_LIBNAME version: 1 updated: 2019/09/07 18:59:41 +dnl CF_WITH_ADA_LIBNAME version: 3 updated: 2023/11/22 20:48:30 dnl ------------------- dnl CF_WITH_ADA_LIBNAME dnl ------------------- dnl Command-line option to specify how to name the resulting Ada library. dnl $1 = default value AC_DEFUN([CF_WITH_ADA_LIBNAME],[ -AC_MSG_CHECKING(for ada-libname) +AC_MSG_CHECKING(for Ada95 curses library name) AC_ARG_WITH(ada-libname, - [ --with-ada-libname=XXX override default Ada library-name], + [[ --with-ada-libname[=XXX] use XXX as Ada95 library name]], ADA_LIBNAME=[$]withval, ADA_LIBNAME=$1) case "x$ADA_LIBNAME" in @@ -4679,13 +4795,13 @@ AC_SUBST(ADA_LIBNAME) AC_MSG_RESULT($ADA_LIBNAME) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_OBJECTS version: 3 updated: 2023/10/28 11:59:01 dnl ------------------- dnl Command-line option to specify where Ada objects will install. AC_DEFUN([CF_WITH_ADA_OBJECTS],[ -AC_MSG_CHECKING(for ada-objects) +AC_MSG_CHECKING(for Ada95 object directory) CF_WITH_PATH(ada-objects, - [ --with-ada-objects=DIR Ada objects are in DIR], + [ --with-ada-objects=DIR find Ada95 objects in DIR], ADA_OBJECTS, PREFIX/lib/ada/adalib, [$]prefix/lib/ada/adalib) @@ -4693,28 +4809,34 @@ AC_SUBST(ADA_OBJECTS) AC_MSG_RESULT($ADA_OBJECTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_SHAREDLIB version: 5 updated: 2018/07/21 19:10:35 +dnl CF_WITH_ADA_SHAREDLIB version: 6 updated: 2023/10/28 11:59:01 dnl --------------------- -dnl Command-line option to specify if an Ada95 shared-library should be built, +dnl Command-line option to specify if an Ada95 shared library should be built, dnl and optionally what its soname should be. AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[ AC_REQUIRE([CF_GNAT_PROJECTS]) -AC_MSG_CHECKING(if an Ada95 shared-library should be built) +AC_MSG_CHECKING(whether to build an Ada95 shared library) AC_ARG_WITH(ada-sharedlib, - [ --with-ada-sharedlib=soname build shared-library (requires GNAT projects)], + [ --with-ada-sharedlib build Ada95 shared library; requires GNAT project support], [with_ada_sharedlib=$withval], [with_ada_sharedlib=no]) -AC_MSG_RESULT($with_ada_sharedlib) +cf_ada_sharedlib_warn=no if test "x$with_ada_sharedlib" != xno then if test "x$cf_gnat_projects" != xyes then - AC_MSG_WARN(disabling shared-library since GNAT projects are not supported) with_ada_sharedlib=no + cf_ada_sharedlib_warn=yes fi fi +AC_MSG_RESULT($with_ada_sharedlib) +if test "x$cf_ada_sharedlib_warn" != xno +then + AC_MSG_WARN(disabling Ada95 shared library since GNAT projects are not supported) +fi + ADA_SHAREDLIB='lib$(LIB_NAME).so.1' MAKE_ADA_SHAREDLIB="#" @@ -4802,7 +4924,7 @@ eval $3="$withval" AC_SUBST($3)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PKG_CONFIG_LIBDIR version: 19 updated: 2021/11/20 14:57:36 +dnl CF_WITH_PKG_CONFIG_LIBDIR version: 23 updated: 2023/11/22 20:48:30 dnl ------------------------- dnl Allow the choice of the pkg-config library directory to be overridden. dnl @@ -4813,7 +4935,8 @@ dnl b) $PKG_CONFIG_LIBDIR (tested second, added if set) dnl c) builtin-list (added if $PKG_CONFIG_LIBDIR is not set) dnl dnl pkgconf (used with some systems such as FreeBSD in place of pkg-config) -dnl optionally ignores $PKG_CONFIG_LIBDIR. +dnl optionally ignores $PKG_CONFIG_LIBDIR. Very old versions of pkg-config, +dnl e.g., Solaris 10 also do not recognize $PKG_CONFIG_LIBDIR. AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[ case "$PKG_CONFIG" in @@ -4826,15 +4949,21 @@ case "$PKG_CONFIG" in esac # if $PKG_CONFIG_LIBDIR is set, try to use that -cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,'` +if test -n "$PKG_CONFIG_PATH"; then + cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'` +elif test -n "$PKG_CONFIG_LIBDIR"; then + cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'` +else + cf_search_path=auto +fi # if the option is used, let that override. otherwise default to "libdir" AC_ARG_WITH(pkg-config-libdir, - [ --with-pkg-config-libdir=XXX use given directory for installing pc-files], + [[ --with-pkg-config-libdir[=XXX] use given directory for installing pc-files]], [cf_search_path=$withval], [test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir]) -case x$cf_search_path in +case "x$cf_search_path" in (xlibdir) PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' AC_MSG_RESULT($PKG_CONFIG_LIBDIR) @@ -4842,6 +4971,9 @@ case x$cf_search_path in ;; (x) ;; +(x/*\ *) + PKG_CONFIG_LIBDIR= + ;; (x/*) PKG_CONFIG_LIBDIR="$cf_search_path" AC_MSG_RESULT($PKG_CONFIG_LIBDIR) @@ -4996,7 +5128,7 @@ AC_ARG_WITH(system-type, ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 59 updated: 2021/08/28 15:20:37 +dnl CF_XOPEN_SOURCE version: 67 updated: 2023/09/06 18:55:27 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -5005,6 +5137,18 @@ dnl dnl Parameters: dnl $1 is the nominal value for _XOPEN_SOURCE dnl $2 is the nominal value for _POSIX_C_SOURCE +dnl +dnl The default case prefers _XOPEN_SOURCE over _POSIX_C_SOURCE if the +dnl implementation predefines it, because X/Open and most implementations agree +dnl that the latter is a legacy or "aligned" value. +dnl +dnl Because _XOPEN_SOURCE is preferred, if defining _POSIX_C_SOURCE turns +dnl that off, then refrain from setting _POSIX_C_SOURCE explicitly. +dnl +dnl References: +dnl https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html +dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html +dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html AC_DEFUN([CF_XOPEN_SOURCE],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([CF_POSIX_VISIBLE]) @@ -5019,9 +5163,6 @@ case "$host_os" in (aix[[4-7]]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(msys) - cf_XOPEN_SOURCE=600 - ;; (darwin[[0-8]].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -5047,7 +5188,7 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) CF_GNU_SOURCE($cf_XOPEN_SOURCE) ;; (minix*) @@ -5096,7 +5237,15 @@ case "$host_os" in ;; (*) CF_TRY_XOPEN_SOURCE + cf_save_xopen_cppflags="$CPPFLAGS" CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) + # Some of these niche implementations use copy/paste, double-check... + if test "$cf_cv_xopen_source" = no ; then + CF_VERBOSE(checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE) + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[ + AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable) + CPPFLAGS="$cf_save_xopen_cppflags"]) + fi ;; esac @@ -5111,7 +5260,7 @@ if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) AC_TRY_COMPILE([#include ],[ #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif], [cf_XOPEN_SOURCE_set=yes], [cf_XOPEN_SOURCE_set=no]) @@ -5120,7 +5269,7 @@ make an error then AC_TRY_COMPILE([#include ],[ #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif], [cf_XOPEN_SOURCE_set_ok=yes], [cf_XOPEN_SOURCE_set_ok=no]) @@ -5140,3 +5289,21 @@ dnl ------------------ dnl Trim something using sed, then trim extra whitespace dnl $1 = extra parameters, e.g., in CF_STRIP_G_OPT define([CF__SED_TRIMBLANKS],[sed ifelse($1,,,[$1] )-e 's%[[ ]]% %g' -e 's% [[ ]]*% %g' -e 's%^ %%' -e 's% [$]%%'])dnl +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl body of test when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_BODY], +[ +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif +]) +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl headers to include when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_HEAD], +[ +$ac_includes_default +]) diff --git a/Ada95/configure b/Ada95/configure index 0fda2cbc..8c01a293 100755 --- a/Ada95/configure +++ b/Ada95/configure @@ -1,9 +1,9 @@ #! /bin/sh -# From configure.in Revision: 1.84 . +# From configure.in Revision: 1.91 . # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52.20210509. +# Generated by Autoconf 2.52.20231210. # -# Copyright 2003-2020,2021 Thomas E. Dickey +# Copyright 2003-2022,2023 Thomas E. Dickey # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -34,9 +34,9 @@ fi as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr + as_expr="expr" else - as_expr=false + as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file @@ -51,7 +51,7 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + as_ln_s='ln' else as_ln_s='cp -p' fi @@ -704,8 +704,9 @@ Optional Features: General Options: --with-system-type=XXX test: override derived host system-type --disable-stripping do not strip (debug info) installed executables - --with-pkg-config{=path} enable/disable use of pkg-config - --with-pkg-config-libdir=XXX use given directory for installing pc-files + --with-strip-program=XX specify program to use when stripping in install + --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD + --with-pkg-config-libdir[=XXX] use given directory for installing pc-files --without-tests suppress build with test-programs --enable-mixed-case tic should assume mixed-case filenames --with-install-prefix prefixes actual install-location ($DESTDIR) @@ -721,7 +722,7 @@ Options to Specify the Libraries Built/Used: --with-curses-dir=DIR directory in which (n)curses is installed --enable-widec compile with wide-char/UTF-8 code --with-lib-prefix override library-prefix - --with-shlib-version=X Specify rel or abi version for shared libs + --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names --enable-rpath-link link sample programs with rpath option Fine-Tuning Your Configuration: --enable-broken_linker compile with broken-linker support code @@ -747,11 +748,11 @@ Testing/development Options: --with-trace test: add trace() function to all models of ncurses --disable-gnat-projects test: disable GNAT projects even if usable Ada95 Binding Options: - --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake) - --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude) - --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib) - --with-ada-sharedlib=soname build shared-library (requires GNAT projects) - --with-ada-libname=XXX override default Ada library-name + --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake) + --with-ada-include=DIR find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude) + --with-ada-objects=DIR find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib) + --with-ada-sharedlib build Ada95 shared library; requires GNAT project support + --with-ada-libname[=XXX] use XXX as Ada95 library name Some influential environment variables: CC C compiler command @@ -808,7 +809,7 @@ test -n "$ac_init_help" && exit 0 if "$ac_init_version"; then cat <<\EOF -Copyright 2003-2020,2021 Thomas E. Dickey +Copyright 2003-2022,2023 Thomas E. Dickey Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -822,7 +823,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52.20210509. Invocation command line was +generated by GNU Autoconf 2.52.20231210. Invocation command line was $ $0 $@ @@ -946,7 +947,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:949: loading site script $ac_site_file" >&5 + { echo "$as_me:950: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" @@ -957,7 +958,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:960: loading cache $cache_file" >&5 + { echo "$as_me:961: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -965,7 +966,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:968: creating cache $cache_file" >&5 + { echo "$as_me:969: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -981,21 +982,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case "$ac_old_set,$ac_new_set" in set,) - { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:985: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:989: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:995: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:996: former value: $ac_old_val" >&5 + { echo "$as_me:997: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:998: current value: $ac_new_val" >&5 + { echo "$as_me:999: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -1014,9 +1015,9 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if "$ac_cache_corrupted"; then - { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:1018: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:1020: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1045,10 +1046,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:1049: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:1051: \$? = $ac_status" >&5 + echo "$as_me:1052: \$? = $ac_status" >&5 (exit "$ac_status"); }; then ac_path_separator=';' else @@ -1059,6 +1060,8 @@ rm -f conftest.sh ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin" +PACKAGE="AdaCurses" + top_builddir=`pwd` ac_aux_dir= @@ -1078,7 +1081,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1084: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -1088,11 +1091,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1094: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1095: checking build system type" >&5 +echo "$as_me:1098: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1101,23 +1104,23 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1107: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` || - { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1111: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1113: result: $ac_cv_build" >&5 +echo "$as_me:1116: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1120: checking host system type" >&5 +echo "$as_me:1123: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1126,12 +1129,12 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` || - { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1132: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1134: result: $ac_cv_host" >&5 +echo "$as_me:1137: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1139,7 +1142,7 @@ host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then - echo "$as_me:1142: checking target system type" >&5 + echo "$as_me:1145: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1148,12 +1151,12 @@ else test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` || - { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1154: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1156: result: $ac_cv_target" >&5 +echo "$as_me:1159: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1185,13 +1188,13 @@ else fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1191: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1195: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 - { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1197: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1199,7 +1202,7 @@ fi # Check whether --with-system-type or --without-system-type was given. if test "${with_system_type+set}" = set; then withval="$with_system_type" - { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5 + { echo "$as_me:1205: WARNING: overriding system type to $withval" >&5 echo "$as_me: WARNING: overriding system type to $withval" >&2;} cf_cv_system_name=$withval host_os=$withval @@ -1214,7 +1217,7 @@ for ac_prog in ggrep grep do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1217: checking for $ac_word" >&5 +echo "$as_me:1220: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1229,7 +1232,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_GREP="$ac_prog" -echo "$as_me:1232: found $ac_dir/$ac_word" >&5 +echo "$as_me:1235: found $ac_dir/$ac_word" >&5 break done @@ -1237,10 +1240,10 @@ fi fi GREP=$ac_cv_prog_GREP if test -n "$GREP"; then - echo "$as_me:1240: result: $GREP" >&5 + echo "$as_me:1243: result: $GREP" >&5 echo "${ECHO_T}$GREP" >&6 else - echo "$as_me:1243: result: no" >&5 + echo "$as_me:1246: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1248,7 +1251,7 @@ fi done test -n "$GREP" || GREP=": " -echo "$as_me:1251: checking for fgrep" >&5 +echo "$as_me:1254: checking for fgrep" >&5 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1260,7 +1263,7 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1263: checking for $ac_word" >&5 +echo "$as_me:1266: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1277,7 +1280,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FGREP="$ac_dir/$ac_word" - echo "$as_me:1280: found $ac_dir/$ac_word" >&5 + echo "$as_me:1283: found $ac_dir/$ac_word" >&5 break fi done @@ -1288,10 +1291,10 @@ fi FGREP=$ac_cv_path_FGREP if test -n "$FGREP"; then - echo "$as_me:1291: result: $FGREP" >&5 + echo "$as_me:1294: result: $FGREP" >&5 echo "${ECHO_T}$FGREP" >&6 else - echo "$as_me:1294: result: no" >&5 + echo "$as_me:1297: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1299,16 +1302,16 @@ fi done test -n "$FGREP" || FGREP=": " - test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5 + test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1305: error: cannot find workable fgrep" >&5 echo "$as_me: error: cannot find workable fgrep" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5 +echo "$as_me:1310: result: $ac_cv_path_FGREP" >&5 echo "${ECHO_T}$ac_cv_path_FGREP" >&6 FGREP="$ac_cv_path_FGREP" -echo "$as_me:1311: checking for prefix" >&5 +echo "$as_me:1314: checking for prefix" >&5 echo $ECHO_N "checking for prefix... $ECHO_C" >&6 if test "x$prefix" = "xNONE" ; then case "$cf_cv_system_name" in @@ -1320,11 +1323,11 @@ if test "x$prefix" = "xNONE" ; then ;; esac fi -echo "$as_me:1323: result: $prefix" >&5 +echo "$as_me:1326: result: $prefix" >&5 echo "${ECHO_T}$prefix" >&6 if test "x$prefix" = "xNONE" ; then -echo "$as_me:1327: checking for default include-directory" >&5 +echo "$as_me:1330: checking for default include-directory" >&5 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6 test -n "$verbose" && echo 1>&6 for cf_symbol in \ @@ -1347,7 +1350,7 @@ do fi test -n "$verbose" && echo " tested $cf_dir" 1>&6 done -echo "$as_me:1350: result: $includedir" >&5 +echo "$as_me:1353: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 fi @@ -1364,7 +1367,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1367: checking for $ac_word" >&5 +echo "$as_me:1370: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1379,7 +1382,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1382: found $ac_dir/$ac_word" >&5 +echo "$as_me:1385: found $ac_dir/$ac_word" >&5 break done @@ -1387,10 +1390,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1390: result: $CC" >&5 + echo "$as_me:1393: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1393: result: no" >&5 + echo "$as_me:1396: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1403,7 +1406,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1406: checking for $ac_word" >&5 +echo "$as_me:1409: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1418,7 +1421,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1421: found $ac_dir/$ac_word" >&5 +echo "$as_me:1424: found $ac_dir/$ac_word" >&5 break done @@ -1426,10 +1429,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1429: result: $ac_ct_CC" >&5 + echo "$as_me:1432: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1432: result: no" >&5 + echo "$as_me:1435: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1439,32 +1442,32 @@ done CC=$ac_ct_CC fi -test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1445: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1447:" \ +echo "$as_me:1450:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo "$2"` -{ (eval echo "$as_me:1450: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1453: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1453: \$? = $ac_status" >&5 + echo "$as_me:1456: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:1455: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1458: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1458: \$? = $ac_status" >&5 + echo "$as_me:1461: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:1460: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1463: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1463: \$? = $ac_status" >&5 + echo "$as_me:1466: \$? = $ac_status" >&5 (exit "$ac_status"); } cat >"conftest.$ac_ext" <<_ACEOF -#line 1467 "configure" +#line 1470 "configure" #include "confdefs.h" int @@ -1480,13 +1483,13 @@ ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1483: checking for C compiler default output" >&5 +echo "$as_me:1486: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'` -if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1489: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1489: \$? = $ac_status" >&5 + echo "$as_me:1492: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1509,34 +1512,34 @@ done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -{ { echo "$as_me:1512: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1515: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1518: result: $ac_file" >&5 +echo "$as_me:1521: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1523: checking whether the C compiler works" >&5 +echo "$as_me:1526: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1529: \"$ac_try\"") >&5 + { (eval echo "$as_me:1532: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1532: \$? = $ac_status" >&5 + echo "$as_me:1535: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1539: error: cannot run C compiled programs. + { { echo "$as_me:1542: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1544,24 +1547,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1547: result: yes" >&5 +echo "$as_me:1550: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe "conftest$ac_cv_exeext" ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1554: checking whether we are cross compiling" >&5 +echo "$as_me:1557: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1556: result: $cross_compiling" >&5 +echo "$as_me:1559: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1559: checking for executable suffix" >&5 +echo "$as_me:1562: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1561: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1564: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1564: \$? = $ac_status" >&5 + echo "$as_me:1567: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1577,25 +1580,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1583: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest$ac_cv_exeext" -echo "$as_me:1586: result: $ac_cv_exeext" >&5 +echo "$as_me:1589: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f "conftest.$ac_ext" EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1592: checking for object suffix" >&5 +echo "$as_me:1595: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 1598 "configure" +#line 1601 "configure" #include "confdefs.h" int @@ -1607,10 +1610,10 @@ main (void) } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1613: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1613: \$? = $ac_status" >&5 + echo "$as_me:1616: \$? = $ac_status" >&5 (exit "$ac_status"); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1622,24 +1625,24 @@ done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -{ { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1628: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext" fi -echo "$as_me:1632: result: $ac_cv_objext" >&5 +echo "$as_me:1635: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1639: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 1642 "configure" +#line 1645 "configure" #include "confdefs.h" int @@ -1654,16 +1657,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1660: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1660: \$? = $ac_status" >&5 + echo "$as_me:1663: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1663: \"$ac_try\"") >&5 + { (eval echo "$as_me:1666: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1666: \$? = $ac_status" >&5 + echo "$as_me:1669: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_compiler_gnu=yes else @@ -1675,19 +1678,19 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1681: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1684: checking whether $CC accepts -g" >&5 +echo "$as_me:1687: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 1690 "configure" +#line 1693 "configure" #include "confdefs.h" int @@ -1699,16 +1702,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1705: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1705: \$? = $ac_status" >&5 + echo "$as_me:1708: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1708: \"$ac_try\"") >&5 + { (eval echo "$as_me:1711: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1711: \$? = $ac_status" >&5 + echo "$as_me:1714: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_g=yes else @@ -1718,7 +1721,7 @@ ac_cv_prog_cc_g=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1724: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1745,16 +1748,16 @@ cat >"conftest.$ac_ext" <<_ACEOF #endif _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1751: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1751: \$? = $ac_status" >&5 + echo "$as_me:1754: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1754: \"$ac_try\"") >&5 + { (eval echo "$as_me:1757: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1757: \$? = $ac_status" >&5 + echo "$as_me:1760: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then for ac_declaration in \ ''\ @@ -1766,7 +1769,7 @@ if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5 'void exit (int);' do cat >"conftest.$ac_ext" <<_ACEOF -#line 1769 "configure" +#line 1772 "configure" #include "confdefs.h" #include $ac_declaration @@ -1779,16 +1782,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1785: \$? = $ac_status" >&5 + echo "$as_me:1788: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1788: \"$ac_try\"") >&5 + { (eval echo "$as_me:1791: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1791: \$? = $ac_status" >&5 + echo "$as_me:1794: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -1798,7 +1801,7 @@ continue fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 1801 "configure" +#line 1804 "configure" #include "confdefs.h" $ac_declaration int @@ -1810,16 +1813,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1816: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1816: \$? = $ac_status" >&5 + echo "$as_me:1819: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1819: \"$ac_try\"") >&5 + { (eval echo "$as_me:1822: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1822: \$? = $ac_status" >&5 + echo "$as_me:1825: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -1849,11 +1852,11 @@ ac_main_return="return" GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:1852: checking version of $CC" >&5 + echo "$as_me:1855: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:1856: result: $GCC_VERSION" >&5 + echo "$as_me:1859: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi @@ -1862,12 +1865,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case "$host_os" in (linux*|gnu*) - echo "$as_me:1865: checking if this is really Intel C compiler" >&5 + echo "$as_me:1868: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >"conftest.$ac_ext" <<_ACEOF -#line 1870 "configure" +#line 1873 "configure" #include "confdefs.h" int @@ -1876,7 +1879,7 @@ main (void) #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ; @@ -1884,16 +1887,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1890: \$? = $ac_status" >&5 + echo "$as_me:1893: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1893: \"$ac_try\"") >&5 + { (eval echo "$as_me:1896: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1896: \$? = $ac_status" >&5 + echo "$as_me:1899: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -1904,7 +1907,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" - echo "$as_me:1907: result: $INTEL_COMPILER" >&5 + echo "$as_me:1910: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac @@ -1913,11 +1916,11 @@ fi CLANG_COMPILER=no if test "$GCC" = yes ; then - echo "$as_me:1916: checking if this is really Clang C compiler" >&5 + echo "$as_me:1919: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" cat >"conftest.$ac_ext" <<_ACEOF -#line 1920 "configure" +#line 1923 "configure" #include "confdefs.h" int @@ -1926,7 +1929,7 @@ main (void) #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ; @@ -1934,16 +1937,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1940: \$? = $ac_status" >&5 + echo "$as_me:1943: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1943: \"$ac_try\"") >&5 + { (eval echo "$as_me:1946: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1946: \$? = $ac_status" >&5 + echo "$as_me:1949: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then CLANG_COMPILER=yes @@ -1953,7 +1956,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" - echo "$as_me:1956: result: $CLANG_COMPILER" >&5 + echo "$as_me:1959: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi @@ -1962,30 +1965,30 @@ CLANG_VERSION=none if test "x$CLANG_COMPILER" = "xyes" ; then case "$CC" in (c[1-9][0-9]|*/c[1-9][0-9]) - { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5 + { echo "$as_me:1968: WARNING: replacing broken compiler alias $CC" >&5 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;} CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`" CC=clang ;; esac - echo "$as_me:1972: checking version of $CC" >&5 + echo "$as_me:1975: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$CLANG_VERSION" && CLANG_VERSION=unknown - echo "$as_me:1976: result: $CLANG_VERSION" >&5 + echo "$as_me:1979: result: $CLANG_VERSION" >&5 echo "${ECHO_T}$CLANG_VERSION" >&6 for cf_clang_opt in \ -Qunused-arguments \ -Wno-error=implicit-function-declaration do - echo "$as_me:1983: checking if option $cf_clang_opt works" >&5 + echo "$as_me:1986: checking if option $cf_clang_opt works" >&5 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $cf_clang_opt" cat >"conftest.$ac_ext" <<_ACEOF -#line 1988 "configure" +#line 1991 "configure" #include "confdefs.h" #include @@ -1999,16 +2002,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:2002: \"$ac_link\"") >&5 +if { (eval echo "$as_me:2005: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2005: \$? = $ac_status" >&5 + echo "$as_me:2008: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:2008: \"$ac_try\"") >&5 + { (eval echo "$as_me:2011: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2011: \$? = $ac_status" >&5 + echo "$as_me:2014: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_clang_optok=yes @@ -2019,13 +2022,13 @@ cat "conftest.$ac_ext" >&5 cf_clang_optok=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:2022: result: $cf_clang_optok" >&5 + echo "$as_me:2025: result: $cf_clang_optok" >&5 echo "${ECHO_T}$cf_clang_optok" >&6 CFLAGS="$cf_save_CFLAGS" if test "$cf_clang_optok" = yes; then test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6 -echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5 +echo "${as_me:-configure}:2031: testing adding option $cf_clang_opt ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_clang_opt" @@ -2034,7 +2037,7 @@ echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5 done fi -echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:2040: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2042,7 +2045,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >"conftest.$ac_ext" <<_ACEOF -#line 2045 "configure" +#line 2048 "configure" #include "confdefs.h" #include #include @@ -2051,9 +2054,7 @@ cat >"conftest.$ac_ext" <<_ACEOF /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2091,16 +2092,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO do CC="$ac_save_CC $ac_arg" rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2095: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2097: \$? = $ac_status" >&5 + echo "$as_me:2098: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2100: \"$ac_try\"") >&5 + { (eval echo "$as_me:2101: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2103: \$? = $ac_status" >&5 + echo "$as_me:2104: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -2117,10 +2118,10 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:2120: result: none needed" >&5 + echo "$as_me:2121: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:2124: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac @@ -2128,13 +2129,13 @@ esac # This should have been defined by AC_PROG_CC : "${CC:=cc}" -echo "$as_me:2131: checking \$CFLAGS variable" >&5 +echo "$as_me:2132: checking \$CFLAGS variable" >&5 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6 case "x$CFLAGS" in (*-[IUD]*) - echo "$as_me:2135: result: broken" >&5 + echo "$as_me:2136: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 + { echo "$as_me:2138: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;} cf_flags="$CFLAGS" CFLAGS= @@ -2242,22 +2243,22 @@ fi done ;; (*) - echo "$as_me:2245: result: ok" >&5 + echo "$as_me:2246: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2250: checking \$CC variable" >&5 +echo "$as_me:2251: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in (*[\ \ ]-*) - echo "$as_me:2254: result: broken" >&5 + echo "$as_me:2255: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 + { echo "$as_me:2257: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -2370,24 +2371,24 @@ fi done test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 -echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5 +echo "${as_me:-configure}:2374: testing resulting CC: '$CC' ..." 1>&5 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 -echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 +echo "${as_me:-configure}:2378: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 -echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 +echo "${as_me:-configure}:2382: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 ;; (*) - echo "$as_me:2385: result: ok" >&5 + echo "$as_me:2386: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2390: checking for egrep" >&5 +echo "$as_me:2391: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2399,7 +2400,7 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2402: checking for $ac_word" >&5 +echo "$as_me:2403: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2416,7 +2417,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_EGREP="$ac_dir/$ac_word" - echo "$as_me:2419: found $ac_dir/$ac_word" >&5 + echo "$as_me:2420: found $ac_dir/$ac_word" >&5 break fi done @@ -2427,10 +2428,10 @@ fi EGREP=$ac_cv_path_EGREP if test -n "$EGREP"; then - echo "$as_me:2430: result: $EGREP" >&5 + echo "$as_me:2431: result: $EGREP" >&5 echo "${ECHO_T}$EGREP" >&6 else - echo "$as_me:2433: result: no" >&5 + echo "$as_me:2434: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2438,12 +2439,12 @@ fi done test -n "$EGREP" || EGREP=": " - test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5 + test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2442: error: cannot find workable egrep" >&5 echo "$as_me: error: cannot find workable egrep" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5 +echo "$as_me:2447: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6 EGREP="$ac_cv_path_EGREP" @@ -2453,7 +2454,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" -echo "$as_me:2456: checking how to run the C preprocessor" >&5 +echo "$as_me:2457: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -2474,18 +2475,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >"conftest.$ac_ext" <<_ACEOF -#line 2477 "configure" +#line 2478 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2483: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2488: \$? = $ac_status" >&5 + echo "$as_me:2489: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2508,17 +2509,17 @@ rm -f conftest.err "conftest.$ac_ext" # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >"conftest.$ac_ext" <<_ACEOF -#line 2511 "configure" +#line 2512 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2516: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2521: \$? = $ac_status" >&5 + echo "$as_me:2522: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2555,7 +2556,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2558: result: $CPP" >&5 +echo "$as_me:2559: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2565,18 +2566,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >"conftest.$ac_ext" <<_ACEOF -#line 2568 "configure" +#line 2569 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2574: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2579: \$? = $ac_status" >&5 + echo "$as_me:2580: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2599,17 +2600,17 @@ rm -f conftest.err "conftest.$ac_ext" # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >"conftest.$ac_ext" <<_ACEOF -#line 2602 "configure" +#line 2603 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2607: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2612: \$? = $ac_status" >&5 + echo "$as_me:2613: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2637,7 +2638,7 @@ rm -f conftest.err "conftest.$ac_ext" if $ac_preproc_ok; then : else - { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:2641: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2650,14 +2651,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:2653: checking whether $CC needs -traditional" >&5 + echo "$as_me:2654: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >"conftest.$ac_ext" <<_ACEOF -#line 2660 "configure" +#line 2661 "configure" #include "confdefs.h" #include int Autoconf = TIOCGETP; @@ -2672,7 +2673,7 @@ rm -rf conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >"conftest.$ac_ext" <<_ACEOF -#line 2675 "configure" +#line 2676 "configure" #include "confdefs.h" #include int Autoconf = TCGETA; @@ -2685,14 +2686,14 @@ rm -rf conftest* fi fi -echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5 +echo "$as_me:2689: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi -echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5 +echo "$as_me:2696: checking whether $CC understands -c and -o together" >&5 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6 if test "${cf_cv_prog_CC_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2707,15 +2708,15 @@ CF_EOF # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -if { (eval echo "$as_me:2710: \"$ac_try\"") >&5 +if { (eval echo "$as_me:2711: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2713: \$? = $ac_status" >&5 + echo "$as_me:2714: \$? = $ac_status" >&5 (exit "$ac_status"); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:2716: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2718: \$? = $ac_status" >&5 + echo "$as_me:2719: \$? = $ac_status" >&5 (exit "$ac_status"); }; then eval cf_cv_prog_CC_c_o=yes @@ -2726,10 +2727,10 @@ rm -rf ./conftest* fi if test "$cf_cv_prog_CC_c_o" = yes; then - echo "$as_me:2729: result: yes" >&5 + echo "$as_me:2730: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2732: result: no" >&5 + echo "$as_me:2733: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2750,7 +2751,7 @@ for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2753: checking for $ac_word" >&5 +echo "$as_me:2754: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2765,7 +2766,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:2768: found $ac_dir/$ac_word" >&5 +echo "$as_me:2769: found $ac_dir/$ac_word" >&5 break done @@ -2773,21 +2774,21 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:2776: result: $AWK" >&5 + echo "$as_me:2777: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2779: result: no" >&5 + echo "$as_me:2780: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done -test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5 +test -z "$AWK" && { { echo "$as_me:2787: error: No awk program found" >&5 echo "$as_me: error: No awk program found" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:2790: checking for egrep" >&5 +echo "$as_me:2791: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2797,11 +2798,11 @@ else else ac_cv_prog_egrep='egrep' fi fi -echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5 +echo "$as_me:2801: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep - test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5 + test -z "$EGREP" && { { echo "$as_me:2805: error: No egrep program found" >&5 echo "$as_me: error: No egrep program found" >&2;} { (exit 1); exit 1; }; } @@ -2817,7 +2818,7 @@ echo "$as_me: error: No egrep program found" >&2;} # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2820: checking for a BSD compatible install" >&5 +echo "$as_me:2821: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2866,7 +2867,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2869: result: $INSTALL" >&5 +echo "$as_me:2870: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2877,18 +2878,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2880: checking whether ln -s works" >&5 +echo "$as_me:2881: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:2884: result: yes" >&5 + echo "$as_me:2885: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2887: result: no, using $LN_S" >&5 + echo "$as_me:2888: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi -echo "$as_me:2891: checking if $LN_S -f options work" >&5 +echo "$as_me:2892: checking if $LN_S -f options work" >&5 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6 rm -f conf$$.src conf$$dst @@ -2900,7 +2901,7 @@ else cf_prog_ln_sf=no fi rm -f conf$$.dst conf$$src -echo "$as_me:2903: result: $cf_prog_ln_sf" >&5 +echo "$as_me:2904: result: $cf_prog_ln_sf" >&5 echo "${ECHO_T}$cf_prog_ln_sf" >&6 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" @@ -2917,7 +2918,7 @@ test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2920: checking for a BSD compatible install" >&5 +echo "$as_me:2921: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2966,7 +2967,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2969: result: $INSTALL" >&5 +echo "$as_me:2970: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2987,7 +2988,7 @@ case $INSTALL in ;; esac -echo "$as_me:2990: checking if you want to install stripped executables" >&5 +echo "$as_me:2991: checking if you want to install stripped executables" >&5 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6 # Check whether --enable-stripping or --disable-stripping was given. @@ -3004,7 +3005,7 @@ else enable_stripping=yes fi; -echo "$as_me:3007: result: $enable_stripping" >&5 +echo "$as_me:3008: result: $enable_stripping" >&5 echo "${ECHO_T}$enable_stripping" >&6 if test "$enable_stripping" = yes @@ -3015,7 +3016,7 @@ else fi : "${INSTALL:=install}" -echo "$as_me:3018: checking if install accepts -p option" >&5 +echo "$as_me:3019: checking if install accepts -p option" >&5 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6 if test "${cf_cv_install_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3046,10 +3047,10 @@ else rm -rf ./conftest* fi -echo "$as_me:3049: result: $cf_cv_install_p" >&5 +echo "$as_me:3050: result: $cf_cv_install_p" >&5 echo "${ECHO_T}$cf_cv_install_p" >&6 -echo "$as_me:3052: checking if install needs to be told about ownership" >&5 +echo "$as_me:3053: checking if install needs to be told about ownership" >&5 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6 case `$ac_config_guess` in (*minix) @@ -3060,7 +3061,7 @@ case `$ac_config_guess` in ;; esac -echo "$as_me:3063: result: $with_install_o" >&5 +echo "$as_me:3064: result: $with_install_o" >&5 echo "${ECHO_T}$with_install_o" >&6 if test "x$with_install_o" = xyes then @@ -3069,7 +3070,73 @@ else INSTALL_OPT_O= fi -echo "$as_me:3072: checking for long file names" >&5 +if test -n "$INSTALL_OPT_S" +then + echo "$as_me:3075: checking if you want to specify strip-program" >&5 +echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6 + +# Check whether --with-strip-program or --without-strip-program was given. +if test "${with_strip_program+set}" = set; then + withval="$with_strip_program" + with_strip_program=$withval +else + with_strip_program=no +fi; + echo "$as_me:3085: result: $with_strip_program" >&5 +echo "${ECHO_T}$with_strip_program" >&6 + if test "$with_strip_program" != no + then + echo "$as_me:3089: checking if strip-program is supported with this installer" >&5 +echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6 + cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + echo "$as_me:3110: result: $check_install_strip" >&5 +echo "${ECHO_T}$check_install_strip" >&6 + case "$check_install_strip" in + (no) + { echo "$as_me:3114: WARNING: $cf_install_program does not support strip program option" >&5 +echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;} + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "$@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + test -n "$verbose" && echo " created $INSTALL" 1>&6 + +echo "${as_me:-configure}:3129: testing created $INSTALL ..." 1>&5 + + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi + +echo "$as_me:3139: checking for long file names" >&5 echo $ECHO_N "checking for long file names... $ECHO_C" >&6 if test "${ac_cv_sys_long_file_names+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3108,7 +3175,7 @@ for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do rm -rf "$ac_xdir" 2>/dev/null done fi -echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5 +echo "$as_me:3178: result: $ac_cv_sys_long_file_names" >&5 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6 if test "$ac_cv_sys_long_file_names" = yes; then @@ -3120,7 +3187,7 @@ fi # if we find pkg-config, check if we should install the ".pc" files. -echo "$as_me:3123: checking if you want to use pkg-config" >&5 +echo "$as_me:3190: checking if you want to use pkg-config" >&5 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6 # Check whether --with-pkg-config or --without-pkg-config was given. @@ -3130,7 +3197,7 @@ if test "${with_pkg_config+set}" = set; then else cf_pkg_config=yes fi; -echo "$as_me:3133: result: $cf_pkg_config" >&5 +echo "$as_me:3200: result: $cf_pkg_config" >&5 echo "${ECHO_T}$cf_pkg_config" >&6 case "$cf_pkg_config" in @@ -3142,7 +3209,7 @@ case "$cf_pkg_config" in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -echo "$as_me:3145: checking for $ac_word" >&5 +echo "$as_me:3212: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3159,7 +3226,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:3162: found $ac_dir/$ac_word" >&5 + echo "$as_me:3229: found $ac_dir/$ac_word" >&5 break fi done @@ -3170,10 +3237,10 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - echo "$as_me:3173: result: $PKG_CONFIG" >&5 + echo "$as_me:3240: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else - echo "$as_me:3176: result: no" >&5 + echo "$as_me:3243: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3182,7 +3249,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:3185: checking for $ac_word" >&5 +echo "$as_me:3252: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3199,7 +3266,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:3202: found $ac_dir/$ac_word" >&5 + echo "$as_me:3269: found $ac_dir/$ac_word" >&5 break fi done @@ -3211,10 +3278,10 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5 + echo "$as_me:3281: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 else - echo "$as_me:3217: result: no" >&5 + echo "$as_me:3284: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3257,30 +3324,36 @@ case ".$PKG_CONFIG" in PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 + { { echo "$as_me:3327: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;} { (exit 1); exit 1; }; } ;; esac elif test "x$cf_pkg_config" != xno ; then - { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5 + { echo "$as_me:3334: WARNING: pkg-config is not installed" >&5 echo "$as_me: WARNING: pkg-config is not installed" >&2;} fi case "$PKG_CONFIG" in (no|none|yes) - echo "$as_me:3273: checking for pkg-config library directory" >&5 + echo "$as_me:3340: checking for pkg-config library directory" >&5 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6 ;; (*) - echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5 + echo "$as_me:3344: checking for $PKG_CONFIG library directory" >&5 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6 ;; esac # if $PKG_CONFIG_LIBDIR is set, try to use that -cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'` +if test -n "$PKG_CONFIG_PATH"; then + cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'` +elif test -n "$PKG_CONFIG_LIBDIR"; then + cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'` +else + cf_search_path=auto +fi # if the option is used, let that override. otherwise default to "libdir" @@ -3292,27 +3365,30 @@ else test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir fi; -case x$cf_search_path in +case "x$cf_search_path" in (xlibdir) PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' - echo "$as_me:3298: result: $PKG_CONFIG_LIBDIR" >&5 + echo "$as_me:3371: result: $PKG_CONFIG_LIBDIR" >&5 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6 cf_search_path= ;; (x) ;; +(x/*\ *) + PKG_CONFIG_LIBDIR= + ;; (x/*) PKG_CONFIG_LIBDIR="$cf_search_path" - echo "$as_me:3306: result: $PKG_CONFIG_LIBDIR" >&5 + echo "$as_me:3382: result: $PKG_CONFIG_LIBDIR" >&5 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6 cf_search_path= ;; (xyes|xauto) - echo "$as_me:3311: result: auto" >&5 + echo "$as_me:3387: result: auto" >&5 echo "${ECHO_T}auto" >&6 cf_search_path= # Look for the library directory using the same prefix as the executable - echo "$as_me:3315: checking for search-list" >&5 + echo "$as_me:3391: checking for search-list" >&5 echo $ECHO_N "checking for search-list... $ECHO_C" >&6 if test "x$PKG_CONFIG" != xnone then @@ -3339,11 +3415,11 @@ echo $ECHO_N "checking for search-list... $ECHO_C" >&6 "` fi - echo "$as_me:3342: result: $cf_search_path" >&5 + echo "$as_me:3418: result: $cf_search_path" >&5 echo "${ECHO_T}$cf_search_path" >&6 ;; (*) - { { echo "$as_me:3346: error: Unexpected option value: $cf_search_path" >&5 + { { echo "$as_me:3422: error: Unexpected option value: $cf_search_path" >&5 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;} { (exit 1); exit 1; }; } ;; @@ -3351,7 +3427,7 @@ esac if test -n "$cf_search_path" then - echo "$as_me:3354: checking for first directory" >&5 + echo "$as_me:3430: checking for first directory" >&5 echo $ECHO_N "checking for first directory... $ECHO_C" >&6 cf_pkg_config_path=none for cf_config in $cf_search_path @@ -3362,7 +3438,7 @@ echo $ECHO_N "checking for first directory... $ECHO_C" >&6 break fi done - echo "$as_me:3365: result: $cf_pkg_config_path" >&5 + echo "$as_me:3441: result: $cf_pkg_config_path" >&5 echo "${ECHO_T}$cf_pkg_config_path" >&6 if test "x$cf_pkg_config_path" != xnone ; then @@ -3372,7 +3448,7 @@ echo "${ECHO_T}$cf_pkg_config_path" >&6 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path" then - echo "$as_me:3375: checking for workaround" >&5 + echo "$as_me:3451: checking for workaround" >&5 echo $ECHO_N "checking for workaround... $ECHO_C" >&6 if test "$prefix" = "NONE" ; then cf_prefix="$ac_default_prefix" @@ -3395,12 +3471,12 @@ echo $ECHO_N "checking for workaround... $ECHO_C" >&6 esac done test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup - echo "$as_me:3398: result: $PKG_CONFIG_LIBDIR" >&5 + echo "$as_me:3474: result: $PKG_CONFIG_LIBDIR" >&5 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6 fi fi -echo "$as_me:3403: checking if you want to build test-programs" >&5 +echo "$as_me:3479: checking if you want to build test-programs" >&5 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6 # Check whether --with-tests or --without-tests was given. @@ -3410,10 +3486,10 @@ if test "${with_tests+set}" = set; then else cf_with_tests=yes fi; -echo "$as_me:3413: result: $cf_with_tests" >&5 +echo "$as_me:3489: result: $cf_with_tests" >&5 echo "${ECHO_T}$cf_with_tests" >&6 -echo "$as_me:3416: checking if we should assume mixed-case filenames" >&5 +echo "$as_me:3492: checking if we should assume mixed-case filenames" >&5 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6 # Check whether --enable-mixed-case or --disable-mixed-case was given. @@ -3423,11 +3499,11 @@ if test "${enable_mixed_case+set}" = set; then else enable_mixedcase=auto fi; -echo "$as_me:3426: result: $enable_mixedcase" >&5 +echo "$as_me:3502: result: $enable_mixedcase" >&5 echo "${ECHO_T}$enable_mixedcase" >&6 if test "$enable_mixedcase" = "auto" ; then -echo "$as_me:3430: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:3506: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3454,7 +3530,7 @@ else fi fi -echo "$as_me:3457: result: $cf_cv_mixedcase" >&5 +echo "$as_me:3533: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -3472,7 +3548,7 @@ EOF fi # do this after mixed-case option (tags/TAGS is not as important as tic). -echo "$as_me:3475: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:3551: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -3492,16 +3568,16 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:3495: result: yes" >&5 + echo "$as_me:3571: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:3499: result: no" >&5 + echo "$as_me:3575: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi -echo "$as_me:3504: checking for \".PHONY\" make-support" >&5 +echo "$as_me:3580: checking for \".PHONY\" make-support" >&5 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6 if test "${cf_cv_make_PHONY+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3556,7 +3632,7 @@ CF_EOF rm -rf conftest* fi -echo "$as_me:3559: result: $cf_cv_make_PHONY" >&5 +echo "$as_me:3635: result: $cf_cv_make_PHONY" >&5 echo "${ECHO_T}$cf_cv_make_PHONY" >&6 MAKE_NO_PHONY="#" MAKE_PHONY="#" @@ -3567,7 +3643,7 @@ for ac_prog in exctags ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:3570: checking for $ac_word" >&5 +echo "$as_me:3646: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CTAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3582,7 +3658,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CTAGS="$ac_prog" -echo "$as_me:3585: found $ac_dir/$ac_word" >&5 +echo "$as_me:3661: found $ac_dir/$ac_word" >&5 break done @@ -3590,10 +3666,10 @@ fi fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then - echo "$as_me:3593: result: $CTAGS" >&5 + echo "$as_me:3669: result: $CTAGS" >&5 echo "${ECHO_T}$CTAGS" >&6 else - echo "$as_me:3596: result: no" >&5 + echo "$as_me:3672: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3604,7 +3680,7 @@ for ac_prog in exetags etags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:3607: checking for $ac_word" >&5 +echo "$as_me:3683: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ETAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3619,7 +3695,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ETAGS="$ac_prog" -echo "$as_me:3622: found $ac_dir/$ac_word" >&5 +echo "$as_me:3698: found $ac_dir/$ac_word" >&5 break done @@ -3627,10 +3703,10 @@ fi fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then - echo "$as_me:3630: result: $ETAGS" >&5 + echo "$as_me:3706: result: $ETAGS" >&5 echo "${ECHO_T}$ETAGS" >&6 else - echo "$as_me:3633: result: no" >&5 + echo "$as_me:3709: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3639,7 +3715,7 @@ done # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args. set dummy ${CTAGS:-ctags}; ac_word=$2 -echo "$as_me:3642: checking for $ac_word" >&5 +echo "$as_me:3718: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3654,7 +3730,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_LOWER_TAGS="yes" -echo "$as_me:3657: found $ac_dir/$ac_word" >&5 +echo "$as_me:3733: found $ac_dir/$ac_word" >&5 break done @@ -3663,17 +3739,17 @@ fi fi MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS if test -n "$MAKE_LOWER_TAGS"; then - echo "$as_me:3666: result: $MAKE_LOWER_TAGS" >&5 + echo "$as_me:3742: result: $MAKE_LOWER_TAGS" >&5 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 else - echo "$as_me:3669: result: no" >&5 + echo "$as_me:3745: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$cf_cv_mixedcase" = yes ; then # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args. set dummy ${ETAGS:-etags}; ac_word=$2 -echo "$as_me:3676: checking for $ac_word" >&5 +echo "$as_me:3752: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3688,7 +3764,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_UPPER_TAGS="yes" -echo "$as_me:3691: found $ac_dir/$ac_word" >&5 +echo "$as_me:3767: found $ac_dir/$ac_word" >&5 break done @@ -3697,10 +3773,10 @@ fi fi MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS if test -n "$MAKE_UPPER_TAGS"; then - echo "$as_me:3700: result: $MAKE_UPPER_TAGS" >&5 + echo "$as_me:3776: result: $MAKE_UPPER_TAGS" >&5 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 else - echo "$as_me:3703: result: no" >&5 + echo "$as_me:3779: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3720,7 +3796,7 @@ else MAKE_LOWER_TAGS="#" fi -echo "$as_me:3723: checking for makeflags variable" >&5 +echo "$as_me:3799: checking for makeflags variable" >&5 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6 if test "${cf_cv_makeflags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3750,7 +3826,7 @@ CF_EOF ;; (*) -echo "${as_me:-configure}:3753: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5 +echo "${as_me:-configure}:3829: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5 ;; esac @@ -3758,13 +3834,13 @@ echo "${as_me:-configure}:3753: testing given option \"$cf_option\",no match \"$ rm -f cf_makeflags.tmp fi -echo "$as_me:3761: result: $cf_cv_makeflags" >&5 +echo "$as_me:3837: result: $cf_cv_makeflags" >&5 echo "${ECHO_T}$cf_cv_makeflags" >&6 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:3767: checking for $ac_word" >&5 +echo "$as_me:3843: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3779,7 +3855,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -echo "$as_me:3782: found $ac_dir/$ac_word" >&5 +echo "$as_me:3858: found $ac_dir/$ac_word" >&5 break done @@ -3787,10 +3863,10 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:3790: result: $RANLIB" >&5 + echo "$as_me:3866: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else - echo "$as_me:3793: result: no" >&5 + echo "$as_me:3869: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3799,7 +3875,7 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:3802: checking for $ac_word" >&5 +echo "$as_me:3878: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3814,7 +3890,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_RANLIB="ranlib" -echo "$as_me:3817: found $ac_dir/$ac_word" >&5 +echo "$as_me:3893: found $ac_dir/$ac_word" >&5 break done @@ -3823,10 +3899,10 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:3826: result: $ac_ct_RANLIB" >&5 + echo "$as_me:3902: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$as_me:3829: result: no" >&5 + echo "$as_me:3905: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3838,7 +3914,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 -echo "$as_me:3841: checking for $ac_word" >&5 +echo "$as_me:3917: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3853,7 +3929,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LD="${ac_tool_prefix}ld" -echo "$as_me:3856: found $ac_dir/$ac_word" >&5 +echo "$as_me:3932: found $ac_dir/$ac_word" >&5 break done @@ -3861,10 +3937,10 @@ fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then - echo "$as_me:3864: result: $LD" >&5 + echo "$as_me:3940: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else - echo "$as_me:3867: result: no" >&5 + echo "$as_me:3943: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3873,7 +3949,7 @@ if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 -echo "$as_me:3876: checking for $ac_word" >&5 +echo "$as_me:3952: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3888,7 +3964,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_LD="ld" -echo "$as_me:3891: found $ac_dir/$ac_word" >&5 +echo "$as_me:3967: found $ac_dir/$ac_word" >&5 break done @@ -3897,10 +3973,10 @@ fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then - echo "$as_me:3900: result: $ac_ct_LD" >&5 + echo "$as_me:3976: result: $ac_ct_LD" >&5 echo "${ECHO_T}$ac_ct_LD" >&6 else - echo "$as_me:3903: result: no" >&5 + echo "$as_me:3979: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3912,7 +3988,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:3915: checking for $ac_word" >&5 +echo "$as_me:3991: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3927,7 +4003,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="${ac_tool_prefix}ar" -echo "$as_me:3930: found $ac_dir/$ac_word" >&5 +echo "$as_me:4006: found $ac_dir/$ac_word" >&5 break done @@ -3935,10 +4011,10 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:3938: result: $AR" >&5 + echo "$as_me:4014: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else - echo "$as_me:3941: result: no" >&5 + echo "$as_me:4017: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3947,7 +4023,7 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:3950: checking for $ac_word" >&5 +echo "$as_me:4026: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3962,7 +4038,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_AR="ar" -echo "$as_me:3965: found $ac_dir/$ac_word" >&5 +echo "$as_me:4041: found $ac_dir/$ac_word" >&5 break done @@ -3971,10 +4047,10 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:3974: result: $ac_ct_AR" >&5 + echo "$as_me:4050: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else - echo "$as_me:3977: result: no" >&5 + echo "$as_me:4053: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3986,7 +4062,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:3989: checking for $ac_word" >&5 +echo "$as_me:4065: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4001,7 +4077,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="${ac_tool_prefix}ar" -echo "$as_me:4004: found $ac_dir/$ac_word" >&5 +echo "$as_me:4080: found $ac_dir/$ac_word" >&5 break done @@ -4009,10 +4085,10 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:4012: result: $AR" >&5 + echo "$as_me:4088: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else - echo "$as_me:4015: result: no" >&5 + echo "$as_me:4091: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4021,7 +4097,7 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:4024: checking for $ac_word" >&5 +echo "$as_me:4100: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4036,7 +4112,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_AR="ar" -echo "$as_me:4039: found $ac_dir/$ac_word" >&5 +echo "$as_me:4115: found $ac_dir/$ac_word" >&5 break done @@ -4045,10 +4121,10 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:4048: result: $ac_ct_AR" >&5 + echo "$as_me:4124: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else - echo "$as_me:4051: result: no" >&5 + echo "$as_me:4127: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4057,7 +4133,7 @@ else AR="$ac_cv_prog_AR" fi -echo "$as_me:4060: checking for options to update archives" >&5 +echo "$as_me:4136: checking for options to update archives" >&5 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6 if test "${cf_cv_ar_flags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4094,13 +4170,13 @@ else rm -f conftest.a cat >"conftest.$ac_ext" <&5 + if { (eval echo "$as_me:4176: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4103: \$? = $ac_status" >&5 + echo "$as_me:4179: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null @@ -4111,7 +4187,7 @@ EOF else test -n "$verbose" && echo " cannot compile test-program" 1>&6 -echo "${as_me:-configure}:4114: testing cannot compile test-program ..." 1>&5 +echo "${as_me:-configure}:4190: testing cannot compile test-program ..." 1>&5 break fi @@ -4121,7 +4197,7 @@ echo "${as_me:-configure}:4114: testing cannot compile test-program ..." 1>&5 esac fi -echo "$as_me:4124: result: $cf_cv_ar_flags" >&5 +echo "$as_me:4200: result: $cf_cv_ar_flags" >&5 echo "${ECHO_T}$cf_cv_ar_flags" >&6 if test -n "$ARFLAGS" ; then @@ -4132,17 +4208,17 @@ else ARFLAGS=$cf_cv_ar_flags fi - echo "$as_me:4135: checking for PATH separator" >&5 + echo "$as_me:4211: checking for PATH separator" >&5 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6 case "$cf_cv_system_name" in (os2*) PATH_SEPARATOR=';' ;; (*) ${PATH_SEPARATOR:=':'} ;; esac - echo "$as_me:4142: result: $PATH_SEPARATOR" >&5 + echo "$as_me:4218: result: $PATH_SEPARATOR" >&5 echo "${ECHO_T}$PATH_SEPARATOR" >&6 -echo "$as_me:4145: checking if you have specified an install-prefix" >&5 +echo "$as_me:4221: checking if you have specified an install-prefix" >&5 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6 # Check whether --with-install-prefix or --without-install-prefix was given. @@ -4155,7 +4231,7 @@ if test "${with_install_prefix+set}" = set; then ;; esac fi; -echo "$as_me:4158: result: $DESTDIR" >&5 +echo "$as_me:4234: result: $DESTDIR" >&5 echo "${ECHO_T}$DESTDIR" >&6 ############################################################################### @@ -4183,7 +4259,7 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:4186: checking for $ac_word" >&5 +echo "$as_me:4262: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_BUILD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4198,7 +4274,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_BUILD_CC="$ac_prog" -echo "$as_me:4201: found $ac_dir/$ac_word" >&5 +echo "$as_me:4277: found $ac_dir/$ac_word" >&5 break done @@ -4206,10 +4282,10 @@ fi fi BUILD_CC=$ac_cv_prog_BUILD_CC if test -n "$BUILD_CC"; then - echo "$as_me:4209: result: $BUILD_CC" >&5 + echo "$as_me:4285: result: $BUILD_CC" >&5 echo "${ECHO_T}$BUILD_CC" >&6 else - echo "$as_me:4212: result: no" >&5 + echo "$as_me:4288: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4218,12 +4294,12 @@ done test -n "$BUILD_CC" || BUILD_CC="none" fi; - echo "$as_me:4221: checking for native build C compiler" >&5 + echo "$as_me:4297: checking for native build C compiler" >&5 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6 - echo "$as_me:4223: result: $BUILD_CC" >&5 + echo "$as_me:4299: result: $BUILD_CC" >&5 echo "${ECHO_T}$BUILD_CC" >&6 - echo "$as_me:4226: checking for native build C preprocessor" >&5 + echo "$as_me:4302: checking for native build C preprocessor" >&5 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6 # Check whether --with-build-cpp or --without-build-cpp was given. @@ -4233,10 +4309,10 @@ if test "${with_build_cpp+set}" = set; then else BUILD_CPP='${BUILD_CC} -E' fi; - echo "$as_me:4236: result: $BUILD_CPP" >&5 + echo "$as_me:4312: result: $BUILD_CPP" >&5 echo "${ECHO_T}$BUILD_CPP" >&6 - echo "$as_me:4239: checking for native build C flags" >&5 + echo "$as_me:4315: checking for native build C flags" >&5 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6 # Check whether --with-build-cflags or --without-build-cflags was given. @@ -4244,10 +4320,10 @@ if test "${with_build_cflags+set}" = set; then withval="$with_build_cflags" BUILD_CFLAGS="$withval" fi; - echo "$as_me:4247: result: $BUILD_CFLAGS" >&5 + echo "$as_me:4323: result: $BUILD_CFLAGS" >&5 echo "${ECHO_T}$BUILD_CFLAGS" >&6 - echo "$as_me:4250: checking for native build C preprocessor-flags" >&5 + echo "$as_me:4326: checking for native build C preprocessor-flags" >&5 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6 # Check whether --with-build-cppflags or --without-build-cppflags was given. @@ -4255,10 +4331,10 @@ if test "${with_build_cppflags+set}" = set; then withval="$with_build_cppflags" BUILD_CPPFLAGS="$withval" fi; - echo "$as_me:4258: result: $BUILD_CPPFLAGS" >&5 + echo "$as_me:4334: result: $BUILD_CPPFLAGS" >&5 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6 - echo "$as_me:4261: checking for native build linker-flags" >&5 + echo "$as_me:4337: checking for native build linker-flags" >&5 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6 # Check whether --with-build-ldflags or --without-build-ldflags was given. @@ -4266,10 +4342,10 @@ if test "${with_build_ldflags+set}" = set; then withval="$with_build_ldflags" BUILD_LDFLAGS="$withval" fi; - echo "$as_me:4269: result: $BUILD_LDFLAGS" >&5 + echo "$as_me:4345: result: $BUILD_LDFLAGS" >&5 echo "${ECHO_T}$BUILD_LDFLAGS" >&6 - echo "$as_me:4272: checking for native build linker-libraries" >&5 + echo "$as_me:4348: checking for native build linker-libraries" >&5 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6 # Check whether --with-build-libs or --without-build-libs was given. @@ -4277,7 +4353,7 @@ if test "${with_build_libs+set}" = set; then withval="$with_build_libs" BUILD_LIBS="$withval" fi; - echo "$as_me:4280: result: $BUILD_LIBS" >&5 + echo "$as_me:4356: result: $BUILD_LIBS" >&5 echo "${ECHO_T}$BUILD_LIBS" >&6 # this assumes we're on Unix. @@ -4286,8 +4362,59 @@ echo "${ECHO_T}$BUILD_LIBS" >&6 : ${BUILD_CC:='${CC}'} - if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then - { { echo "$as_me:4290: error: Cross-build requires two compilers. + echo "$as_me:4365: checking if the build-compiler \"$BUILD_CC\" works" >&5 +echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6 + + cf_save_crossed=$cross_compiling + cf_save_ac_link=$ac_link + cross_compiling=no + cf_build_cppflags=$BUILD_CPPFLAGS + test "$cf_build_cppflags" = "#" && cf_build_cppflags= + ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5' + + if test "$cross_compiling" = yes; then + cf_ok_build_cc=unknown +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 4379 "configure" +#include "confdefs.h" +#include + int main(int argc, char *argv[]) + { + ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0); + } + +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:4389: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4392: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:4394: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4397: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_ok_build_cc=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_ok_build_cc=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi + + cross_compiling=$cf_save_crossed + ac_link=$cf_save_ac_link + + echo "$as_me:4412: result: $cf_ok_build_cc" >&5 +echo "${ECHO_T}$cf_ok_build_cc" >&6 + + if test "$cf_ok_build_cc" != yes + then + { { echo "$as_me:4417: error: Cross-build requires two compilers. Use --with-build-cc to specify the native compiler." >&5 echo "$as_me: error: Cross-build requires two compilers. Use --with-build-cc to specify the native compiler." >&2;} @@ -4312,7 +4439,7 @@ fi ### shared, for example. cf_list_models="" -echo "$as_me:4315: checking if you want to build shared C-objects" >&5 +echo "$as_me:4442: checking if you want to build shared C-objects" >&5 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6 # Check whether --with-shared or --without-shared was given. @@ -4322,27 +4449,27 @@ if test "${with_shared+set}" = set; then else with_shared=no fi; -echo "$as_me:4325: result: $with_shared" >&5 +echo "$as_me:4452: result: $with_shared" >&5 echo "${ECHO_T}$with_shared" >&6 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" -echo "$as_me:4329: checking for specified models" >&5 +echo "$as_me:4456: checking for specified models" >&5 echo $ECHO_N "checking for specified models... $ECHO_C" >&6 test -z "$cf_list_models" && cf_list_models=normal -echo "$as_me:4332: result: $cf_list_models" >&5 +echo "$as_me:4459: result: $cf_list_models" >&5 echo "${ECHO_T}$cf_list_models" >&6 ### Use the first model as the default, and save its suffix for use in building ### up test-applications. -echo "$as_me:4337: checking for default model" >&5 +echo "$as_me:4464: checking for default model" >&5 echo $ECHO_N "checking for default model... $ECHO_C" >&6 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'` -echo "$as_me:4340: result: $DFT_LWR_MODEL" >&5 +echo "$as_me:4467: result: $DFT_LWR_MODEL" >&5 echo "${ECHO_T}$DFT_LWR_MODEL" >&6 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` -echo "$as_me:4345: checking for specific curses-directory" >&5 +echo "$as_me:4472: checking for specific curses-directory" >&5 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6 # Check whether --with-curses-dir or --without-curses-dir was given. @@ -4352,7 +4479,7 @@ if test "${with_curses_dir+set}" = set; then else cf_cv_curses_dir=no fi; -echo "$as_me:4355: result: $cf_cv_curses_dir" >&5 +echo "$as_me:4482: result: $cf_cv_curses_dir" >&5 echo "${ECHO_T}$cf_cv_curses_dir" >&6 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" @@ -4383,7 +4510,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:4386: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:4513: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -4419,7 +4546,7 @@ if test -n "$cf_cv_curses_dir/include" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 4422 "configure" +#line 4549 "configure" #include "confdefs.h" #include int @@ -4431,16 +4558,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4434: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4561: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4437: \$? = $ac_status" >&5 + echo "$as_me:4564: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4440: \"$ac_try\"") >&5 + { (eval echo "$as_me:4567: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4443: \$? = $ac_status" >&5 + echo "$as_me:4570: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -4457,7 +4584,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:4460: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:4587: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -4493,7 +4620,7 @@ if test -n "$cf_cv_curses_dir/lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:4496: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:4623: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -4508,13 +4635,13 @@ cf_ncuconfig_root=ncurses cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:4511: checking pkg-config for $cf_ncuconfig_root" >&5 + echo "$as_me:4638: checking pkg-config for $cf_ncuconfig_root" >&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then - echo "$as_me:4514: result: yes" >&5 + echo "$as_me:4641: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:4517: checking if the $cf_ncuconfig_root package files work" >&5 + echo "$as_me:4644: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown @@ -4647,7 +4774,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 4650 "configure" +#line 4777 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -4659,37 +4786,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:4662: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4789: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4665: \$? = $ac_status" >&5 + echo "$as_me:4792: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:4668: \"$ac_try\"") >&5 + { (eval echo "$as_me:4795: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4671: \$? = $ac_status" >&5 + echo "$as_me:4798: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 4677 "configure" +#line 4804 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:4684: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4811: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4687: \$? = $ac_status" >&5 + echo "$as_me:4814: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:4689: \"$ac_try\"") >&5 + { (eval echo "$as_me:4816: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4692: \$? = $ac_status" >&5 + echo "$as_me:4819: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else @@ -4863,7 +4990,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 4866 "configure" +#line 4993 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -4875,37 +5002,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:4878: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5005: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4881: \$? = $ac_status" >&5 + echo "$as_me:5008: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:4884: \"$ac_try\"") >&5 + { (eval echo "$as_me:5011: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4887: \$? = $ac_status" >&5 + echo "$as_me:5014: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 4893 "configure" +#line 5020 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:4900: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5027: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4903: \$? = $ac_status" >&5 + echo "$as_me:5030: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:4905: \"$ac_try\"") >&5 + { (eval echo "$as_me:5032: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4908: \$? = $ac_status" >&5 + echo "$as_me:5035: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else @@ -4922,7 +5049,7 @@ cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:4925: result: $cf_have_ncuconfig" >&5 + echo "$as_me:5052: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" @@ -4938,7 +5065,7 @@ EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root -echo "$as_me:4941: checking for terminfo header" >&5 +echo "$as_me:5068: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4956,7 +5083,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 4959 "configure" +#line 5086 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -4971,16 +5098,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4974: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5101: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4977: \$? = $ac_status" >&5 + echo "$as_me:5104: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4980: \"$ac_try\"") >&5 + { (eval echo "$as_me:5107: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4983: \$? = $ac_status" >&5 + echo "$as_me:5110: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -4996,7 +5123,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:4999: result: $cf_cv_term_header" >&5 +echo "$as_me:5126: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -5031,7 +5158,7 @@ esac fi else - echo "$as_me:5034: result: no" >&5 + echo "$as_me:5161: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi @@ -5047,7 +5174,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:5050: checking for $ac_word" >&5 +echo "$as_me:5177: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5062,7 +5189,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" -echo "$as_me:5065: found $ac_dir/$ac_word" >&5 +echo "$as_me:5192: found $ac_dir/$ac_word" >&5 break done @@ -5070,10 +5197,10 @@ fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then - echo "$as_me:5073: result: $NCURSES_CONFIG" >&5 + echo "$as_me:5200: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else - echo "$as_me:5076: result: no" >&5 + echo "$as_me:5203: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5086,7 +5213,7 @@ if test -z "$NCURSES_CONFIG"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:5089: checking for $ac_word" >&5 +echo "$as_me:5216: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5101,7 +5228,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" -echo "$as_me:5104: found $ac_dir/$ac_word" >&5 +echo "$as_me:5231: found $ac_dir/$ac_word" >&5 break done @@ -5109,10 +5236,10 @@ fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then - echo "$as_me:5112: result: $ac_ct_NCURSES_CONFIG" >&5 + echo "$as_me:5239: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else - echo "$as_me:5115: result: no" >&5 + echo "$as_me:5242: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5269,7 +5396,7 @@ LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h -echo "$as_me:5272: checking if we have identified curses headers" >&5 +echo "$as_me:5399: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5281,28 +5408,28 @@ for cf_header in \ curses.h ncurses/curses.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 5284 "configure" +#line 5411 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5296: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5423: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5299: \$? = $ac_status" >&5 + echo "$as_me:5426: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5302: \"$ac_try\"") >&5 + { (eval echo "$as_me:5429: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5305: \$? = $ac_status" >&5 + echo "$as_me:5432: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else @@ -5313,11 +5440,11 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:5316: result: $cf_cv_ncurses_header" >&5 +echo "$as_me:5443: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then - { { echo "$as_me:5320: error: No curses header-files found" >&5 + { { echo "$as_me:5447: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi @@ -5327,23 +5454,23 @@ fi for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:5330: checking for $ac_header" >&5 +echo "$as_me:5457: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 5336 "configure" +#line 5463 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:5340: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:5467: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:5346: \$? = $ac_status" >&5 + echo "$as_me:5473: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -5362,7 +5489,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:5365: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:5492: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF -#line 5421 "configure" +#line 5548 "configure" #include "confdefs.h" #include int @@ -5430,16 +5557,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5433: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5560: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5436: \$? = $ac_status" >&5 + echo "$as_me:5563: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5439: \"$ac_try\"") >&5 + { (eval echo "$as_me:5566: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5442: \$? = $ac_status" >&5 + echo "$as_me:5569: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -5456,7 +5583,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:5459: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:5586: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -5475,7 +5602,7 @@ fi } -echo "$as_me:5478: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "$as_me:5605: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5487,7 +5614,7 @@ else do cat >"conftest.$ac_ext" <<_ACEOF -#line 5490 "configure" +#line 5617 "configure" #include "confdefs.h" #include <$cf_header> @@ -5502,7 +5629,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -5511,16 +5638,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5514: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5641: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5517: \$? = $ac_status" >&5 + echo "$as_me:5644: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5520: \"$ac_try\"") >&5 + { (eval echo "$as_me:5647: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5523: \$? = $ac_status" >&5 + echo "$as_me:5650: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header @@ -5535,14 +5662,14 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:5538: result: $cf_cv_ncurses_h" >&5 +echo "$as_me:5665: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -echo "$as_me:5545: checking for $cf_ncuhdr_root include-path" >&5 +echo "$as_me:5672: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5663,7 +5790,7 @@ if test -n "$cf_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 5666 "configure" +#line 5793 "configure" #include "confdefs.h" #include int @@ -5675,16 +5802,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5678: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5681: \$? = $ac_status" >&5 + echo "$as_me:5808: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5684: \"$ac_try\"") >&5 + { (eval echo "$as_me:5811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5687: \$? = $ac_status" >&5 + echo "$as_me:5814: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -5701,7 +5828,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:5704: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:5831: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -5724,7 +5851,7 @@ fi do cat >"conftest.$ac_ext" <<_ACEOF -#line 5727 "configure" +#line 5854 "configure" #include "confdefs.h" #include <$cf_header> @@ -5739,7 +5866,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -5748,16 +5875,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5751: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5878: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5754: \$? = $ac_status" >&5 + echo "$as_me:5881: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5757: \"$ac_try\"") >&5 + { (eval echo "$as_me:5884: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5760: \$? = $ac_status" >&5 + echo "$as_me:5887: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header @@ -5778,12 +5905,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done - test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5781: error: not found" >&5 + test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5908: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:5786: result: $cf_cv_ncurses_h2" >&5 +echo "$as_me:5913: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` @@ -5819,7 +5946,7 @@ if test -n "$cf_1st_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 5822 "configure" +#line 5949 "configure" #include "confdefs.h" #include int @@ -5831,16 +5958,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5834: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5961: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5837: \$? = $ac_status" >&5 + echo "$as_me:5964: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5840: \"$ac_try\"") >&5 + { (eval echo "$as_me:5967: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5843: \$? = $ac_status" >&5 + echo "$as_me:5970: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -5857,7 +5984,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:5860: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:5987: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -5905,7 +6032,7 @@ EOF ;; esac -echo "$as_me:5908: checking for terminfo header" >&5 +echo "$as_me:6035: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5923,7 +6050,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 5926 "configure" +#line 6053 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -5938,16 +6065,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5941: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6068: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5944: \$? = $ac_status" >&5 + echo "$as_me:6071: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5947: \"$ac_try\"") >&5 + { (eval echo "$as_me:6074: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5950: \$? = $ac_status" >&5 + echo "$as_me:6077: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -5963,7 +6090,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:5966: result: $cf_cv_term_header" >&5 +echo "$as_me:6093: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -6001,7 +6128,7 @@ cat >>confdefs.h <<\EOF #define NCURSES 1 EOF -echo "$as_me:6004: checking for ncurses version" >&5 +echo "$as_me:6131: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6027,10 +6154,10 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo "$as_me:6030: \"$cf_try\"") >&5 + { (eval echo "$as_me:6157: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:6033: \$? = $ac_status" >&5 + echo "$as_me:6160: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` @@ -6040,11 +6167,13 @@ EOF else cat >"conftest.$ac_ext" <<_ACEOF -#line 6043 "configure" +#line 6170 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -6058,22 +6187,22 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:6068: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6197: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6071: \$? = $ac_status" >&5 + echo "$as_me:6200: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:6073: \"$ac_try\"") >&5 + { (eval echo "$as_me:6202: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6076: \$? = $ac_status" >&5 + echo "$as_me:6205: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -6087,7 +6216,7 @@ fi rm -f "$cf_tempfile" fi -echo "$as_me:6090: result: $cf_cv_ncurses_version" >&5 +echo "$as_me:6219: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF @@ -6100,7 +6229,7 @@ cf_nculib_root=ncurses # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" -echo "$as_me:6103: checking for Gpm_Open in -lgpm" >&5 +echo "$as_me:6232: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6108,7 +6237,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6111 "configure" +#line 6240 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6117,7 +6246,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char Gpm_Open (); +char Gpm_Open (void); int main (void) { @@ -6127,16 +6256,16 @@ Gpm_Open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6130: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6259: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6133: \$? = $ac_status" >&5 + echo "$as_me:6262: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6136: \"$ac_try\"") >&5 + { (eval echo "$as_me:6265: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6139: \$? = $ac_status" >&5 + echo "$as_me:6268: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -6147,10 +6276,10 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6150: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:6279: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then - echo "$as_me:6153: checking for initscr in -lgpm" >&5 + echo "$as_me:6282: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6158,7 +6287,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6161 "configure" +#line 6290 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6167,7 +6296,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -6177,16 +6306,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6180: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6309: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6183: \$? = $ac_status" >&5 + echo "$as_me:6312: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6186: \"$ac_try\"") >&5 + { (eval echo "$as_me:6315: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6189: \$? = $ac_status" >&5 + echo "$as_me:6318: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else @@ -6197,7 +6326,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6200: result: $ac_cv_lib_gpm_initscr" >&5 +echo "$as_me:6329: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" @@ -6212,7 +6341,7 @@ case "$host_os" in # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then - echo "$as_me:6215: checking for tgoto in -lmytinfo" >&5 + echo "$as_me:6344: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6220,7 +6349,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6223 "configure" +#line 6352 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6229,7 +6358,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -6239,16 +6368,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6242: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6371: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6245: \$? = $ac_status" >&5 + echo "$as_me:6374: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6248: \"$ac_try\"") >&5 + { (eval echo "$as_me:6377: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6251: \$? = $ac_status" >&5 + echo "$as_me:6380: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else @@ -6259,7 +6388,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6262: result: $ac_cv_lib_mytinfo_tgoto" >&5 +echo "$as_me:6391: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" @@ -6308,13 +6437,13 @@ else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" - echo "$as_me:6311: checking for initscr" >&5 + echo "$as_me:6440: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 6317 "configure" +#line 6446 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -6345,16 +6474,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6348: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6477: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6351: \$? = $ac_status" >&5 + echo "$as_me:6480: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6354: \"$ac_try\"") >&5 + { (eval echo "$as_me:6483: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6357: \$? = $ac_status" >&5 + echo "$as_me:6486: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else @@ -6364,18 +6493,18 @@ ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:6367: result: $ac_cv_func_initscr" >&5 +echo "$as_me:6496: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" - echo "$as_me:6374: checking for initscr in -l$cf_nculib_root" >&5 + echo "$as_me:6503: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6378 "configure" +#line 6507 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -6387,25 +6516,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6390: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6519: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6393: \$? = $ac_status" >&5 + echo "$as_me:6522: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6396: \"$ac_try\"") >&5 + { (eval echo "$as_me:6525: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6399: \$? = $ac_status" >&5 + echo "$as_me:6528: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:6401: result: yes" >&5 + echo "$as_me:6530: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:6408: result: no" >&5 +echo "$as_me:6537: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= @@ -6473,11 +6602,11 @@ cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do - echo "$as_me:6476: checking for -l$cf_nculib_root in $cf_libdir" >&5 + echo "$as_me:6605: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6480 "configure" +#line 6609 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -6489,25 +6618,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6492: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6621: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6495: \$? = $ac_status" >&5 + echo "$as_me:6624: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6498: \"$ac_try\"") >&5 + { (eval echo "$as_me:6627: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6501: \$? = $ac_status" >&5 + echo "$as_me:6630: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:6503: result: yes" >&5 + echo "$as_me:6632: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:6510: result: no" >&5 +echo "$as_me:6639: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi @@ -6522,7 +6651,7 @@ fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then - { { echo "$as_me:6525: error: Cannot link $cf_nculib_root library" >&5 + { { echo "$as_me:6654: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi @@ -6530,7 +6659,7 @@ fi fi if test -n "$cf_ncurses_LIBS" ; then - echo "$as_me:6533: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + echo "$as_me:6662: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do @@ -6540,7 +6669,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS.. fi done cat >"conftest.$ac_ext" <<_ACEOF -#line 6543 "configure" +#line 6672 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -6552,23 +6681,23 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6555: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6684: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6558: \$? = $ac_status" >&5 + echo "$as_me:6687: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6561: \"$ac_try\"") >&5 + { (eval echo "$as_me:6690: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6564: \$? = $ac_status" >&5 + echo "$as_me:6693: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:6566: result: yes" >&5 + echo "$as_me:6695: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:6571: result: no" >&5 +echo "$as_me:6700: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi @@ -6586,7 +6715,7 @@ else NCURSES_CONFIG=none fi -echo "$as_me:6589: checking if you want wide-character code" >&5 +echo "$as_me:6718: checking if you want wide-character code" >&5 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6 # Check whether --enable-widec or --disable-widec was given. @@ -6596,30 +6725,30 @@ if test "${enable_widec+set}" = set; then else with_widec=no fi; -echo "$as_me:6599: result: $with_widec" >&5 +echo "$as_me:6728: result: $with_widec" >&5 echo "${ECHO_T}$with_widec" >&6 if test "$with_widec" = yes ; then for ac_header in wchar.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:6606: checking for $ac_header" >&5 +echo "$as_me:6735: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 6612 "configure" +#line 6741 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:6616: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:6745: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:6622: \$? = $ac_status" >&5 + echo "$as_me:6751: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -6638,7 +6767,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:6641: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:6770: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:6780: checking for multibyte character support" >&5 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6 if test "${cf_cv_utf8_lib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6656,11 +6785,10 @@ else cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6659 "configure" +#line 6788 "configure" #include "confdefs.h" -#include -#include +$ac_includes_default #ifdef HAVE_WCHAR_H #include #endif @@ -6674,16 +6802,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6677: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6805: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6680: \$? = $ac_status" >&5 + echo "$as_me:6808: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6683: \"$ac_try\"") >&5 + { (eval echo "$as_me:6811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6686: \$? = $ac_status" >&5 + echo "$as_me:6814: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_utf8_lib=yes else @@ -6695,12 +6823,12 @@ cat "conftest.$ac_ext" >&5 cf_cv_header_path_utf8= cf_cv_library_path_utf8= -echo "${as_me:-configure}:6698: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:6826: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6703 "configure" +#line 6831 "configure" #include "confdefs.h" #include @@ -6713,16 +6841,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6716: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6844: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6719: \$? = $ac_status" >&5 + echo "$as_me:6847: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6722: \"$ac_try\"") >&5 + { (eval echo "$as_me:6850: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6725: \$? = $ac_status" >&5 + echo "$as_me:6853: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes @@ -6736,7 +6864,7 @@ cat "conftest.$ac_ext" >&5 LIBS="-lutf8 $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6739 "configure" +#line 6867 "configure" #include "confdefs.h" #include @@ -6749,16 +6877,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6752: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6880: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6755: \$? = $ac_status" >&5 + echo "$as_me:6883: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6758: \"$ac_try\"") >&5 + { (eval echo "$as_me:6886: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6761: \$? = $ac_status" >&5 + echo "$as_me:6889: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes @@ -6775,9 +6903,9 @@ cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6 -echo "${as_me:-configure}:6778: testing find linkage for utf8 library ..." 1>&5 +echo "${as_me:-configure}:6906: testing find linkage for utf8 library ..." 1>&5 -echo "${as_me:-configure}:6780: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:6908: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_CPPFLAGS="$CPPFLAGS" cf_test_CPPFLAGS="$CPPFLAGS" @@ -6868,7 +6996,7 @@ cf_search="$cf_search $cf_header_path_list" if test -d "$cf_cv_header_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6 -echo "${as_me:-configure}:6871: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:6999: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 CPPFLAGS="$cf_save_CPPFLAGS" @@ -6876,7 +7004,7 @@ echo "${as_me:-configure}:6871: testing ... testing $cf_cv_header_path_utf8 ..." CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF -#line 6879 "configure" +#line 7007 "configure" #include "confdefs.h" #include @@ -6889,21 +7017,21 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:6892: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7020: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6895: \$? = $ac_status" >&5 + echo "$as_me:7023: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:6898: \"$ac_try\"") >&5 + { (eval echo "$as_me:7026: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6901: \$? = $ac_status" >&5 + echo "$as_me:7029: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6 -echo "${as_me:-configure}:6906: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:7034: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=maybe cf_test_CPPFLAGS="$CPPFLAGS" @@ -6921,7 +7049,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_cv_find_linkage_utf8" = maybe ; then -echo "${as_me:-configure}:6924: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:7052: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cf_save_LDFLAGS="$LDFLAGS" @@ -6996,13 +7124,13 @@ cf_search="$cf_library_path_list $cf_search" if test -d "$cf_cv_library_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6 -echo "${as_me:-configure}:6999: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:7127: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 CPPFLAGS="$cf_test_CPPFLAGS" LIBS="-lutf8 $cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF -#line 7005 "configure" +#line 7133 "configure" #include "confdefs.h" #include @@ -7015,21 +7143,21 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7018: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7146: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7021: \$? = $ac_status" >&5 + echo "$as_me:7149: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7024: \"$ac_try\"") >&5 + { (eval echo "$as_me:7152: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7027: \$? = $ac_status" >&5 + echo "$as_me:7155: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6 -echo "${as_me:-configure}:7032: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:7160: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=yes cf_cv_library_file_utf8="-lutf8" @@ -7071,7 +7199,7 @@ fi fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:7074: result: $cf_cv_utf8_lib" >&5 +echo "$as_me:7202: result: $cf_cv_utf8_lib" >&5 echo "${ECHO_T}$cf_cv_utf8_lib" >&6 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between @@ -7109,7 +7237,7 @@ if test -n "$cf_cv_header_path_utf8" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 7112 "configure" +#line 7240 "configure" #include "confdefs.h" #include int @@ -7121,16 +7249,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:7124: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7252: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7127: \$? = $ac_status" >&5 + echo "$as_me:7255: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:7130: \"$ac_try\"") >&5 + { (eval echo "$as_me:7258: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7133: \$? = $ac_status" >&5 + echo "$as_me:7261: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -7147,7 +7275,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:7150: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:7278: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -7183,7 +7311,7 @@ if test -n "$cf_cv_library_path_utf8" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:7186: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:7314: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -7213,13 +7341,13 @@ cf_ncuconfig_root=ncursesw cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:7216: checking pkg-config for $cf_ncuconfig_root" >&5 + echo "$as_me:7344: checking pkg-config for $cf_ncuconfig_root" >&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then - echo "$as_me:7219: result: yes" >&5 + echo "$as_me:7347: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:7222: checking if the $cf_ncuconfig_root package files work" >&5 + echo "$as_me:7350: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown @@ -7352,7 +7480,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 7355 "configure" +#line 7483 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -7364,37 +7492,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7367: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7495: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7370: \$? = $ac_status" >&5 + echo "$as_me:7498: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7373: \"$ac_try\"") >&5 + { (eval echo "$as_me:7501: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7376: \$? = $ac_status" >&5 + echo "$as_me:7504: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 7382 "configure" +#line 7510 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:7389: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7517: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7392: \$? = $ac_status" >&5 + echo "$as_me:7520: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:7394: \"$ac_try\"") >&5 + { (eval echo "$as_me:7522: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7397: \$? = $ac_status" >&5 + echo "$as_me:7525: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else @@ -7568,7 +7696,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 7571 "configure" +#line 7699 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -7580,37 +7708,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7583: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7711: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7586: \$? = $ac_status" >&5 + echo "$as_me:7714: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7589: \"$ac_try\"") >&5 + { (eval echo "$as_me:7717: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7592: \$? = $ac_status" >&5 + echo "$as_me:7720: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 7598 "configure" +#line 7726 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:7605: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7733: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7608: \$? = $ac_status" >&5 + echo "$as_me:7736: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:7610: \"$ac_try\"") >&5 + { (eval echo "$as_me:7738: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7613: \$? = $ac_status" >&5 + echo "$as_me:7741: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else @@ -7627,7 +7755,7 @@ cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:7630: result: $cf_have_ncuconfig" >&5 + echo "$as_me:7758: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" @@ -7643,7 +7771,7 @@ EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root -echo "$as_me:7646: checking for terminfo header" >&5 +echo "$as_me:7774: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7661,7 +7789,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 7664 "configure" +#line 7792 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -7676,16 +7804,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:7679: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7807: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7682: \$? = $ac_status" >&5 + echo "$as_me:7810: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:7685: \"$ac_try\"") >&5 + { (eval echo "$as_me:7813: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7688: \$? = $ac_status" >&5 + echo "$as_me:7816: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -7701,7 +7829,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:7704: result: $cf_cv_term_header" >&5 +echo "$as_me:7832: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -7736,7 +7864,7 @@ esac fi else - echo "$as_me:7739: result: no" >&5 + echo "$as_me:7867: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi @@ -7752,7 +7880,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:7755: checking for $ac_word" >&5 +echo "$as_me:7883: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7767,7 +7895,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" -echo "$as_me:7770: found $ac_dir/$ac_word" >&5 +echo "$as_me:7898: found $ac_dir/$ac_word" >&5 break done @@ -7775,10 +7903,10 @@ fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then - echo "$as_me:7778: result: $NCURSES_CONFIG" >&5 + echo "$as_me:7906: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else - echo "$as_me:7781: result: no" >&5 + echo "$as_me:7909: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -7791,7 +7919,7 @@ if test -z "$NCURSES_CONFIG"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:7794: checking for $ac_word" >&5 +echo "$as_me:7922: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7806,7 +7934,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" -echo "$as_me:7809: found $ac_dir/$ac_word" >&5 +echo "$as_me:7937: found $ac_dir/$ac_word" >&5 break done @@ -7814,10 +7942,10 @@ fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then - echo "$as_me:7817: result: $ac_ct_NCURSES_CONFIG" >&5 + echo "$as_me:7945: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else - echo "$as_me:7820: result: no" >&5 + echo "$as_me:7948: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -7974,7 +8102,7 @@ LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h -echo "$as_me:7977: checking if we have identified curses headers" >&5 +echo "$as_me:8105: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7986,28 +8114,28 @@ for cf_header in \ curses.h ncursesw/curses.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 7989 "configure" +#line 8117 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8001: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8129: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8004: \$? = $ac_status" >&5 + echo "$as_me:8132: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8007: \"$ac_try\"") >&5 + { (eval echo "$as_me:8135: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8010: \$? = $ac_status" >&5 + echo "$as_me:8138: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else @@ -8018,11 +8146,11 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:8021: result: $cf_cv_ncurses_header" >&5 +echo "$as_me:8149: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then - { { echo "$as_me:8025: error: No curses header-files found" >&5 + { { echo "$as_me:8153: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi @@ -8032,23 +8160,23 @@ fi for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:8035: checking for $ac_header" >&5 +echo "$as_me:8163: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 8041 "configure" +#line 8169 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:8045: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:8173: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:8051: \$? = $ac_status" >&5 + echo "$as_me:8179: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -8067,7 +8195,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:8070: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:8198: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF -#line 8126 "configure" +#line 8254 "configure" #include "confdefs.h" #include int @@ -8135,16 +8263,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8266: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8141: \$? = $ac_status" >&5 + echo "$as_me:8269: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8144: \"$ac_try\"") >&5 + { (eval echo "$as_me:8272: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8147: \$? = $ac_status" >&5 + echo "$as_me:8275: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -8161,7 +8289,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:8164: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:8292: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -8180,7 +8308,7 @@ fi } -echo "$as_me:8183: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "$as_me:8311: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8192,7 +8320,7 @@ else do cat >"conftest.$ac_ext" <<_ACEOF -#line 8195 "configure" +#line 8323 "configure" #include "confdefs.h" #define _XOPEN_SOURCE_EXTENDED @@ -8207,7 +8335,7 @@ main (void) #ifdef NCURSES_VERSION #ifndef WACS_BSSB - make an error + #error WACS_BSSB is not defined #endif printf("%s\\n", NCURSES_VERSION); @@ -8215,7 +8343,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -8224,16 +8352,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8355: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8230: \$? = $ac_status" >&5 + echo "$as_me:8358: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8233: \"$ac_try\"") >&5 + { (eval echo "$as_me:8361: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8236: \$? = $ac_status" >&5 + echo "$as_me:8364: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header @@ -8248,14 +8376,14 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:8251: result: $cf_cv_ncurses_h" >&5 +echo "$as_me:8379: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -echo "$as_me:8258: checking for $cf_ncuhdr_root include-path" >&5 +echo "$as_me:8386: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8376,7 +8504,7 @@ if test -n "$cf_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 8379 "configure" +#line 8507 "configure" #include "confdefs.h" #include int @@ -8388,16 +8516,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8391: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8519: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8394: \$? = $ac_status" >&5 + echo "$as_me:8522: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8397: \"$ac_try\"") >&5 + { (eval echo "$as_me:8525: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8400: \$? = $ac_status" >&5 + echo "$as_me:8528: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -8414,7 +8542,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:8417: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:8545: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -8437,7 +8565,7 @@ fi do cat >"conftest.$ac_ext" <<_ACEOF -#line 8440 "configure" +#line 8568 "configure" #include "confdefs.h" #include <$cf_header> @@ -8452,7 +8580,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -8461,16 +8589,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8464: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8592: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8467: \$? = $ac_status" >&5 + echo "$as_me:8595: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8470: \"$ac_try\"") >&5 + { (eval echo "$as_me:8598: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8473: \$? = $ac_status" >&5 + echo "$as_me:8601: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header @@ -8491,12 +8619,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done - test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8494: error: not found" >&5 + test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8622: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:8499: result: $cf_cv_ncurses_h2" >&5 +echo "$as_me:8627: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` @@ -8532,7 +8660,7 @@ if test -n "$cf_1st_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 8535 "configure" +#line 8663 "configure" #include "confdefs.h" #include int @@ -8544,16 +8672,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8547: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8675: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8550: \$? = $ac_status" >&5 + echo "$as_me:8678: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8553: \"$ac_try\"") >&5 + { (eval echo "$as_me:8681: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8556: \$? = $ac_status" >&5 + echo "$as_me:8684: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -8570,7 +8698,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:8573: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:8701: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -8618,7 +8746,7 @@ EOF ;; esac -echo "$as_me:8621: checking for terminfo header" >&5 +echo "$as_me:8749: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8636,7 +8764,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 8639 "configure" +#line 8767 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -8651,16 +8779,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8654: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8782: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8657: \$? = $ac_status" >&5 + echo "$as_me:8785: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8660: \"$ac_try\"") >&5 + { (eval echo "$as_me:8788: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8663: \$? = $ac_status" >&5 + echo "$as_me:8791: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -8676,7 +8804,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:8679: result: $cf_cv_term_header" >&5 +echo "$as_me:8807: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -8714,7 +8842,7 @@ cat >>confdefs.h <<\EOF #define NCURSES 1 EOF -echo "$as_me:8717: checking for ncurses version" >&5 +echo "$as_me:8845: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8740,10 +8868,10 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo "$as_me:8743: \"$cf_try\"") >&5 + { (eval echo "$as_me:8871: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:8746: \$? = $ac_status" >&5 + echo "$as_me:8874: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` @@ -8753,11 +8881,13 @@ EOF else cat >"conftest.$ac_ext" <<_ACEOF -#line 8756 "configure" +#line 8884 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -8771,22 +8901,22 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:8781: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8911: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8784: \$? = $ac_status" >&5 + echo "$as_me:8914: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:8786: \"$ac_try\"") >&5 + { (eval echo "$as_me:8916: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8789: \$? = $ac_status" >&5 + echo "$as_me:8919: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -8800,7 +8930,7 @@ fi rm -f "$cf_tempfile" fi -echo "$as_me:8803: result: $cf_cv_ncurses_version" >&5 +echo "$as_me:8933: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF @@ -8813,7 +8943,7 @@ cf_nculib_root=ncursesw # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" -echo "$as_me:8816: checking for Gpm_Open in -lgpm" >&5 +echo "$as_me:8946: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8821,7 +8951,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 8824 "configure" +#line 8954 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8830,7 +8960,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char Gpm_Open (); +char Gpm_Open (void); int main (void) { @@ -8840,16 +8970,16 @@ Gpm_Open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:8843: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8973: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8846: \$? = $ac_status" >&5 + echo "$as_me:8976: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:8849: \"$ac_try\"") >&5 + { (eval echo "$as_me:8979: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8852: \$? = $ac_status" >&5 + echo "$as_me:8982: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -8860,10 +8990,10 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8863: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:8993: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then - echo "$as_me:8866: checking for initscr in -lgpm" >&5 + echo "$as_me:8996: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8871,7 +9001,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 8874 "configure" +#line 9004 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8880,7 +9010,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -8890,16 +9020,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:8893: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9023: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8896: \$? = $ac_status" >&5 + echo "$as_me:9026: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:8899: \"$ac_try\"") >&5 + { (eval echo "$as_me:9029: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8902: \$? = $ac_status" >&5 + echo "$as_me:9032: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else @@ -8910,7 +9040,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8913: result: $ac_cv_lib_gpm_initscr" >&5 +echo "$as_me:9043: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" @@ -8925,7 +9055,7 @@ case "$host_os" in # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then - echo "$as_me:8928: checking for tgoto in -lmytinfo" >&5 + echo "$as_me:9058: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8933,7 +9063,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 8936 "configure" +#line 9066 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8942,7 +9072,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -8952,16 +9082,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:8955: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9085: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8958: \$? = $ac_status" >&5 + echo "$as_me:9088: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:8961: \"$ac_try\"") >&5 + { (eval echo "$as_me:9091: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8964: \$? = $ac_status" >&5 + echo "$as_me:9094: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else @@ -8972,7 +9102,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8975: result: $ac_cv_lib_mytinfo_tgoto" >&5 +echo "$as_me:9105: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" @@ -9021,13 +9151,13 @@ else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" - echo "$as_me:9024: checking for initscr" >&5 + echo "$as_me:9154: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9030 "configure" +#line 9160 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -9058,16 +9188,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9061: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9191: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9064: \$? = $ac_status" >&5 + echo "$as_me:9194: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9067: \"$ac_try\"") >&5 + { (eval echo "$as_me:9197: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9070: \$? = $ac_status" >&5 + echo "$as_me:9200: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else @@ -9077,18 +9207,18 @@ ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:9080: result: $ac_cv_func_initscr" >&5 +echo "$as_me:9210: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" - echo "$as_me:9087: checking for initscr in -l$cf_nculib_root" >&5 + echo "$as_me:9217: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 9091 "configure" +#line 9221 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -9100,25 +9230,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9103: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9233: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9106: \$? = $ac_status" >&5 + echo "$as_me:9236: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9109: \"$ac_try\"") >&5 + { (eval echo "$as_me:9239: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9112: \$? = $ac_status" >&5 + echo "$as_me:9242: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:9114: result: yes" >&5 + echo "$as_me:9244: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:9121: result: no" >&5 +echo "$as_me:9251: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= @@ -9186,11 +9316,11 @@ cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do - echo "$as_me:9189: checking for -l$cf_nculib_root in $cf_libdir" >&5 + echo "$as_me:9319: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 9193 "configure" +#line 9323 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -9202,25 +9332,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9205: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9335: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9208: \$? = $ac_status" >&5 + echo "$as_me:9338: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9211: \"$ac_try\"") >&5 + { (eval echo "$as_me:9341: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9214: \$? = $ac_status" >&5 + echo "$as_me:9344: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:9216: result: yes" >&5 + echo "$as_me:9346: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:9223: result: no" >&5 +echo "$as_me:9353: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi @@ -9235,7 +9365,7 @@ fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then - { { echo "$as_me:9238: error: Cannot link $cf_nculib_root library" >&5 + { { echo "$as_me:9368: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi @@ -9243,7 +9373,7 @@ fi fi if test -n "$cf_ncurses_LIBS" ; then - echo "$as_me:9246: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + echo "$as_me:9376: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do @@ -9253,7 +9383,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS.. fi done cat >"conftest.$ac_ext" <<_ACEOF -#line 9256 "configure" +#line 9386 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -9265,23 +9395,23 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9268: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9398: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9271: \$? = $ac_status" >&5 + echo "$as_me:9401: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9274: \"$ac_try\"") >&5 + { (eval echo "$as_me:9404: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9277: \$? = $ac_status" >&5 + echo "$as_me:9407: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:9279: result: yes" >&5 + echo "$as_me:9409: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:9284: result: no" >&5 +echo "$as_me:9414: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi @@ -9305,13 +9435,13 @@ cf_ncuconfig_root=ncurses cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:9308: checking pkg-config for $cf_ncuconfig_root" >&5 + echo "$as_me:9438: checking pkg-config for $cf_ncuconfig_root" >&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then - echo "$as_me:9311: result: yes" >&5 + echo "$as_me:9441: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:9314: checking if the $cf_ncuconfig_root package files work" >&5 + echo "$as_me:9444: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown @@ -9444,7 +9574,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 9447 "configure" +#line 9577 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -9456,37 +9586,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9459: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9589: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9462: \$? = $ac_status" >&5 + echo "$as_me:9592: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9465: \"$ac_try\"") >&5 + { (eval echo "$as_me:9595: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9468: \$? = $ac_status" >&5 + echo "$as_me:9598: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 9474 "configure" +#line 9604 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:9481: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9611: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9484: \$? = $ac_status" >&5 + echo "$as_me:9614: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:9486: \"$ac_try\"") >&5 + { (eval echo "$as_me:9616: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9489: \$? = $ac_status" >&5 + echo "$as_me:9619: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else @@ -9660,7 +9790,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 9663 "configure" +#line 9793 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -9672,37 +9802,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9675: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9805: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9678: \$? = $ac_status" >&5 + echo "$as_me:9808: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9681: \"$ac_try\"") >&5 + { (eval echo "$as_me:9811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9684: \$? = $ac_status" >&5 + echo "$as_me:9814: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 9690 "configure" +#line 9820 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:9697: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9827: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9700: \$? = $ac_status" >&5 + echo "$as_me:9830: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:9702: \"$ac_try\"") >&5 + { (eval echo "$as_me:9832: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9705: \$? = $ac_status" >&5 + echo "$as_me:9835: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else @@ -9719,7 +9849,7 @@ cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:9722: result: $cf_have_ncuconfig" >&5 + echo "$as_me:9852: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" @@ -9735,7 +9865,7 @@ EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root -echo "$as_me:9738: checking for terminfo header" >&5 +echo "$as_me:9868: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9753,7 +9883,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 9756 "configure" +#line 9886 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -9768,16 +9898,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9771: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9774: \$? = $ac_status" >&5 + echo "$as_me:9904: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9777: \"$ac_try\"") >&5 + { (eval echo "$as_me:9907: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9780: \$? = $ac_status" >&5 + echo "$as_me:9910: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -9793,7 +9923,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:9796: result: $cf_cv_term_header" >&5 +echo "$as_me:9926: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -9828,7 +9958,7 @@ esac fi else - echo "$as_me:9831: result: no" >&5 + echo "$as_me:9961: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi @@ -9844,7 +9974,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:9847: checking for $ac_word" >&5 +echo "$as_me:9977: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9859,7 +9989,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" -echo "$as_me:9862: found $ac_dir/$ac_word" >&5 +echo "$as_me:9992: found $ac_dir/$ac_word" >&5 break done @@ -9867,10 +9997,10 @@ fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then - echo "$as_me:9870: result: $NCURSES_CONFIG" >&5 + echo "$as_me:10000: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else - echo "$as_me:9873: result: no" >&5 + echo "$as_me:10003: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -9883,7 +10013,7 @@ if test -z "$NCURSES_CONFIG"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:9886: checking for $ac_word" >&5 +echo "$as_me:10016: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9898,7 +10028,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" -echo "$as_me:9901: found $ac_dir/$ac_word" >&5 +echo "$as_me:10031: found $ac_dir/$ac_word" >&5 break done @@ -9906,10 +10036,10 @@ fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then - echo "$as_me:9909: result: $ac_ct_NCURSES_CONFIG" >&5 + echo "$as_me:10039: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else - echo "$as_me:9912: result: no" >&5 + echo "$as_me:10042: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -10066,7 +10196,7 @@ LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h -echo "$as_me:10069: checking if we have identified curses headers" >&5 +echo "$as_me:10199: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10078,28 +10208,28 @@ for cf_header in \ curses.h ncurses/curses.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 10081 "configure" +#line 10211 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10093: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10223: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10096: \$? = $ac_status" >&5 + echo "$as_me:10226: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10099: \"$ac_try\"") >&5 + { (eval echo "$as_me:10229: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10102: \$? = $ac_status" >&5 + echo "$as_me:10232: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else @@ -10110,11 +10240,11 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:10113: result: $cf_cv_ncurses_header" >&5 +echo "$as_me:10243: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then - { { echo "$as_me:10117: error: No curses header-files found" >&5 + { { echo "$as_me:10247: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi @@ -10124,23 +10254,23 @@ fi for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:10127: checking for $ac_header" >&5 +echo "$as_me:10257: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 10133 "configure" +#line 10263 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:10137: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:10267: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:10143: \$? = $ac_status" >&5 + echo "$as_me:10273: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -10159,7 +10289,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:10162: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:10292: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF -#line 10218 "configure" +#line 10348 "configure" #include "confdefs.h" #include int @@ -10227,16 +10357,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10230: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10360: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10233: \$? = $ac_status" >&5 + echo "$as_me:10363: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10236: \"$ac_try\"") >&5 + { (eval echo "$as_me:10366: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10239: \$? = $ac_status" >&5 + echo "$as_me:10369: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10253,7 +10383,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:10256: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:10386: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -10272,7 +10402,7 @@ fi } -echo "$as_me:10275: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "$as_me:10405: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10284,7 +10414,7 @@ else do cat >"conftest.$ac_ext" <<_ACEOF -#line 10287 "configure" +#line 10417 "configure" #include "confdefs.h" #include <$cf_header> @@ -10299,7 +10429,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -10308,16 +10438,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10311: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10314: \$? = $ac_status" >&5 + echo "$as_me:10444: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10317: \"$ac_try\"") >&5 + { (eval echo "$as_me:10447: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10320: \$? = $ac_status" >&5 + echo "$as_me:10450: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header @@ -10332,14 +10462,14 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:10335: result: $cf_cv_ncurses_h" >&5 +echo "$as_me:10465: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -echo "$as_me:10342: checking for $cf_ncuhdr_root include-path" >&5 +echo "$as_me:10472: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10460,7 +10590,7 @@ if test -n "$cf_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 10463 "configure" +#line 10593 "configure" #include "confdefs.h" #include int @@ -10472,16 +10602,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10475: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10605: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10478: \$? = $ac_status" >&5 + echo "$as_me:10608: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10481: \"$ac_try\"") >&5 + { (eval echo "$as_me:10611: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10484: \$? = $ac_status" >&5 + echo "$as_me:10614: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10498,7 +10628,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:10501: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:10631: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -10521,7 +10651,7 @@ fi do cat >"conftest.$ac_ext" <<_ACEOF -#line 10524 "configure" +#line 10654 "configure" #include "confdefs.h" #include <$cf_header> @@ -10536,7 +10666,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -10545,16 +10675,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10548: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10678: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10551: \$? = $ac_status" >&5 + echo "$as_me:10681: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10554: \"$ac_try\"") >&5 + { (eval echo "$as_me:10684: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10557: \$? = $ac_status" >&5 + echo "$as_me:10687: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header @@ -10575,12 +10705,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done - test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10578: error: not found" >&5 + test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10708: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:10583: result: $cf_cv_ncurses_h2" >&5 +echo "$as_me:10713: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` @@ -10616,7 +10746,7 @@ if test -n "$cf_1st_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 10619 "configure" +#line 10749 "configure" #include "confdefs.h" #include int @@ -10628,16 +10758,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10631: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10761: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10634: \$? = $ac_status" >&5 + echo "$as_me:10764: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10637: \"$ac_try\"") >&5 + { (eval echo "$as_me:10767: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10640: \$? = $ac_status" >&5 + echo "$as_me:10770: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -10654,7 +10784,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:10657: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:10787: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -10702,7 +10832,7 @@ EOF ;; esac -echo "$as_me:10705: checking for terminfo header" >&5 +echo "$as_me:10835: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10720,7 +10850,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 10723 "configure" +#line 10853 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -10735,16 +10865,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10868: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10741: \$? = $ac_status" >&5 + echo "$as_me:10871: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10744: \"$ac_try\"") >&5 + { (eval echo "$as_me:10874: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10747: \$? = $ac_status" >&5 + echo "$as_me:10877: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -10760,7 +10890,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:10763: result: $cf_cv_term_header" >&5 +echo "$as_me:10893: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -10798,7 +10928,7 @@ cat >>confdefs.h <<\EOF #define NCURSES 1 EOF -echo "$as_me:10801: checking for ncurses version" >&5 +echo "$as_me:10931: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10824,10 +10954,10 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo "$as_me:10827: \"$cf_try\"") >&5 + { (eval echo "$as_me:10957: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:10830: \$? = $ac_status" >&5 + echo "$as_me:10960: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` @@ -10837,11 +10967,13 @@ EOF else cat >"conftest.$ac_ext" <<_ACEOF -#line 10840 "configure" +#line 10970 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -10855,22 +10987,22 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:10865: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10997: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10868: \$? = $ac_status" >&5 + echo "$as_me:11000: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:10870: \"$ac_try\"") >&5 + { (eval echo "$as_me:11002: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10873: \$? = $ac_status" >&5 + echo "$as_me:11005: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -10884,7 +11016,7 @@ fi rm -f "$cf_tempfile" fi -echo "$as_me:10887: result: $cf_cv_ncurses_version" >&5 +echo "$as_me:11019: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF @@ -10897,7 +11029,7 @@ cf_nculib_root=ncurses # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" -echo "$as_me:10900: checking for Gpm_Open in -lgpm" >&5 +echo "$as_me:11032: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10905,7 +11037,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 10908 "configure" +#line 11040 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10914,7 +11046,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char Gpm_Open (); +char Gpm_Open (void); int main (void) { @@ -10924,16 +11056,16 @@ Gpm_Open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:10927: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11059: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10930: \$? = $ac_status" >&5 + echo "$as_me:11062: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:10933: \"$ac_try\"") >&5 + { (eval echo "$as_me:11065: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10936: \$? = $ac_status" >&5 + echo "$as_me:11068: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -10944,10 +11076,10 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10947: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:11079: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then - echo "$as_me:10950: checking for initscr in -lgpm" >&5 + echo "$as_me:11082: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10955,7 +11087,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 10958 "configure" +#line 11090 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10964,7 +11096,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -10974,16 +11106,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:10977: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11109: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10980: \$? = $ac_status" >&5 + echo "$as_me:11112: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:10983: \"$ac_try\"") >&5 + { (eval echo "$as_me:11115: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10986: \$? = $ac_status" >&5 + echo "$as_me:11118: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else @@ -10994,7 +11126,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10997: result: $ac_cv_lib_gpm_initscr" >&5 +echo "$as_me:11129: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" @@ -11009,7 +11141,7 @@ case "$host_os" in # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then - echo "$as_me:11012: checking for tgoto in -lmytinfo" >&5 + echo "$as_me:11144: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11017,7 +11149,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11020 "configure" +#line 11152 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -11026,7 +11158,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -11036,16 +11168,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11039: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11171: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11042: \$? = $ac_status" >&5 + echo "$as_me:11174: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11045: \"$ac_try\"") >&5 + { (eval echo "$as_me:11177: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11048: \$? = $ac_status" >&5 + echo "$as_me:11180: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else @@ -11056,7 +11188,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:11059: result: $ac_cv_lib_mytinfo_tgoto" >&5 +echo "$as_me:11191: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" @@ -11105,13 +11237,13 @@ else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" - echo "$as_me:11108: checking for initscr" >&5 + echo "$as_me:11240: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11114 "configure" +#line 11246 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -11142,16 +11274,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11145: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11277: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11148: \$? = $ac_status" >&5 + echo "$as_me:11280: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11151: \"$ac_try\"") >&5 + { (eval echo "$as_me:11283: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11154: \$? = $ac_status" >&5 + echo "$as_me:11286: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else @@ -11161,18 +11293,18 @@ ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:11164: result: $ac_cv_func_initscr" >&5 +echo "$as_me:11296: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" - echo "$as_me:11171: checking for initscr in -l$cf_nculib_root" >&5 + echo "$as_me:11303: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11175 "configure" +#line 11307 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -11184,25 +11316,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11187: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11319: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11190: \$? = $ac_status" >&5 + echo "$as_me:11322: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11193: \"$ac_try\"") >&5 + { (eval echo "$as_me:11325: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11196: \$? = $ac_status" >&5 + echo "$as_me:11328: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:11198: result: yes" >&5 + echo "$as_me:11330: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:11205: result: no" >&5 +echo "$as_me:11337: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= @@ -11270,11 +11402,11 @@ cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do - echo "$as_me:11273: checking for -l$cf_nculib_root in $cf_libdir" >&5 + echo "$as_me:11405: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11277 "configure" +#line 11409 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -11286,25 +11418,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11289: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11421: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11292: \$? = $ac_status" >&5 + echo "$as_me:11424: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11295: \"$ac_try\"") >&5 + { (eval echo "$as_me:11427: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11298: \$? = $ac_status" >&5 + echo "$as_me:11430: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:11300: result: yes" >&5 + echo "$as_me:11432: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:11307: result: no" >&5 +echo "$as_me:11439: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi @@ -11319,7 +11451,7 @@ fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then - { { echo "$as_me:11322: error: Cannot link $cf_nculib_root library" >&5 + { { echo "$as_me:11454: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi @@ -11327,7 +11459,7 @@ fi fi if test -n "$cf_ncurses_LIBS" ; then - echo "$as_me:11330: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + echo "$as_me:11462: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do @@ -11337,7 +11469,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS.. fi done cat >"conftest.$ac_ext" <<_ACEOF -#line 11340 "configure" +#line 11472 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -11349,23 +11481,23 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11352: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11484: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11355: \$? = $ac_status" >&5 + echo "$as_me:11487: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11358: \"$ac_try\"") >&5 + { (eval echo "$as_me:11490: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11361: \$? = $ac_status" >&5 + echo "$as_me:11493: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:11363: result: yes" >&5 + echo "$as_me:11495: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:11368: result: no" >&5 +echo "$as_me:11500: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi @@ -11418,10 +11550,10 @@ else AUTOCONF_$cf_name NCURSES_VERSION_$cf_name CF_EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out" - { (eval echo "$as_me:11421: \"$cf_try\"") >&5 + { (eval echo "$as_me:11553: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:11424: \$? = $ac_status" >&5 + echo "$as_me:11556: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out` @@ -11439,10 +11571,10 @@ cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} cf_cv_timestamp=`date` -echo "$as_me:11442: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5 +echo "$as_me:11574: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6 -echo "$as_me:11445: checking if you want to have a library-prefix" >&5 +echo "$as_me:11577: checking if you want to have a library-prefix" >&5 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6 # Check whether --with-lib-prefix or --without-lib-prefix was given. @@ -11452,7 +11584,7 @@ if test "${with_lib_prefix+set}" = set; then else with_lib_prefix=auto fi; -echo "$as_me:11455: result: $with_lib_prefix" >&5 +echo "$as_me:11587: result: $with_lib_prefix" >&5 echo "${ECHO_T}$with_lib_prefix" >&6 if test "$with_lib_prefix" = auto @@ -11490,7 +11622,7 @@ if test X"$CC_G_OPT" = X"" ; then test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT='' fi -echo "$as_me:11493: checking for default loader flags" >&5 +echo "$as_me:11625: checking for default loader flags" >&5 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6 case $DFT_LWR_MODEL in (normal) LD_MODEL='' ;; @@ -11498,13 +11630,13 @@ case $DFT_LWR_MODEL in (profile) LD_MODEL='-pg';; (shared) LD_MODEL='' ;; esac -echo "$as_me:11501: result: $LD_MODEL" >&5 +echo "$as_me:11633: result: $LD_MODEL" >&5 echo "${ECHO_T}$LD_MODEL" >&6 LD_RPATH_OPT= if test "x$cf_cv_enable_rpath" != xno then - echo "$as_me:11507: checking for an rpath option" >&5 + echo "$as_me:11639: checking for an rpath option" >&5 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 case "$cf_cv_system_name" in (irix*) @@ -11535,12 +11667,12 @@ echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 (*) ;; esac - echo "$as_me:11538: result: $LD_RPATH_OPT" >&5 + echo "$as_me:11670: result: $LD_RPATH_OPT" >&5 echo "${ECHO_T}$LD_RPATH_OPT" >&6 case "x$LD_RPATH_OPT" in (x-R*) - echo "$as_me:11543: checking if we need a space after rpath option" >&5 + echo "$as_me:11675: checking if we need a space after rpath option" >&5 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6 cf_save_LIBS="$LIBS" @@ -11561,7 +11693,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 11564 "configure" +#line 11696 "configure" #include "confdefs.h" int @@ -11573,16 +11705,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11576: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11708: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11579: \$? = $ac_status" >&5 + echo "$as_me:11711: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11582: \"$ac_try\"") >&5 + { (eval echo "$as_me:11714: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11585: \$? = $ac_status" >&5 + echo "$as_me:11717: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_rpath_space=no else @@ -11592,7 +11724,7 @@ cf_rpath_space=yes fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" - echo "$as_me:11595: result: $cf_rpath_space" >&5 + echo "$as_me:11727: result: $cf_rpath_space" >&5 echo "${ECHO_T}$cf_rpath_space" >&6 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " ;; @@ -11614,8 +11746,8 @@ fi cf_ld_rpath_opt= test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" - echo "$as_me:11617: checking if release/abi version should be used for shared libs" >&5 -echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6 + echo "$as_me:11749: checking whether to use release or ABI version in shared library file names" >&5 +echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6 # Check whether --with-shlib-version or --without-shlib-version was given. if test "${with_shlib_version+set}" = set; then @@ -11629,9 +11761,9 @@ if test "${with_shlib_version+set}" = set; then cf_cv_shlib_version=$withval ;; (*) - echo "$as_me:11632: result: $withval" >&5 + echo "$as_me:11764: result: $withval" >&5 echo "${ECHO_T}$withval" >&6 - { { echo "$as_me:11634: error: option value must be one of: rel, abi, or auto" >&5 + { { echo "$as_me:11766: error: option value must be one of: rel, abi, or auto" >&5 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;} { (exit 1); exit 1; }; } ;; @@ -11640,7 +11772,7 @@ echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;} else cf_cv_shlib_version=auto fi; - echo "$as_me:11643: result: $cf_cv_shlib_version" >&5 + echo "$as_me:11775: result: $cf_cv_shlib_version" >&5 echo "${ECHO_T}$cf_cv_shlib_version" >&6 cf_cv_rm_so_locs=no @@ -11663,35 +11795,35 @@ echo "${ECHO_T}$cf_cv_shlib_version" >&6 if test "$cf_try_fPIC" = yes then - echo "$as_me:11666: checking which $CC option to use" >&5 + echo "$as_me:11798: checking which $CC option to use" >&5 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" for CC_SHARED_OPTS in -fPIC -fpic '' do CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11673 "configure" +#line 11805 "configure" #include "confdefs.h" #include int main (void) { -int x = 1 +int x = 1; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11685: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11817: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11688: \$? = $ac_status" >&5 + echo "$as_me:11820: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11691: \"$ac_try\"") >&5 + { (eval echo "$as_me:11823: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11694: \$? = $ac_status" >&5 + echo "$as_me:11826: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -11700,7 +11832,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done - echo "$as_me:11703: result: $CC_SHARED_OPTS" >&5 + echo "$as_me:11835: result: $CC_SHARED_OPTS" >&5 echo "${ECHO_T}$CC_SHARED_OPTS" >&6 CFLAGS="$cf_save_CFLAGS" fi @@ -11771,7 +11903,7 @@ CF_EOF MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi cf_cv_shlib_version_infix=yes - echo "$as_me:11774: checking if ld -search_paths_first works" >&5 + echo "$as_me:11906: checking if ld -search_paths_first works" >&5 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11780,7 +11912,7 @@ else cf_save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat >"conftest.$ac_ext" <<_ACEOF -#line 11783 "configure" +#line 11915 "configure" #include "confdefs.h" int @@ -11792,16 +11924,16 @@ int i; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11795: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11927: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11798: \$? = $ac_status" >&5 + echo "$as_me:11930: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11801: \"$ac_try\"") >&5 + { (eval echo "$as_me:11933: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11804: \$? = $ac_status" >&5 + echo "$as_me:11936: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ldflags_search_paths_first=yes else @@ -11812,7 +11944,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LDFLAGS=$cf_save_LDFLAGS fi -echo "$as_me:11815: result: $cf_cv_ldflags_search_paths_first" >&5 +echo "$as_me:11947: result: $cf_cv_ldflags_search_paths_first" >&5 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 if test "$cf_cv_ldflags_search_paths_first" = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -12142,11 +12274,11 @@ CF_EOF # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 if test "$DFT_LWR_MODEL" = "shared" ; then - LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" + LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi if test "$cf_cv_enable_rpath" = yes ; then - EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" + EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS" fi test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel @@ -12162,7 +12294,7 @@ CF_EOF do CFLAGS="$cf_shared_opts $cf_save_CFLAGS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12165 "configure" +#line 12297 "configure" #include "confdefs.h" #include int @@ -12174,16 +12306,16 @@ printf("Hello\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12177: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12309: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12180: \$? = $ac_status" >&5 + echo "$as_me:12312: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12183: \"$ac_try\"") >&5 + { (eval echo "$as_me:12315: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12186: \$? = $ac_status" >&5 + echo "$as_me:12318: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -12194,9 +12326,9 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done CFLAGS="$cf_save_CFLAGS" CC_SHARED_OPTS=$cf_shared_opts - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@' else - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@' fi ;; (sysv5uw7*|unix_sv*) @@ -12220,7 +12352,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes ;; (*) - { echo "$as_me:12223: WARNING: ignored --with-shlib-version" >&5 + { echo "$as_me:12355: WARNING: ignored --with-shlib-version" >&5 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;} ;; esac @@ -12230,7 +12362,7 @@ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;} if test -n "$cf_try_cflags" then cat > conftest.$ac_ext < int main(int argc, char *argv[]) { @@ -12242,18 +12374,18 @@ EOF for cf_opt in $cf_try_cflags do CFLAGS="$cf_save_CFLAGS -$cf_opt" - echo "$as_me:12245: checking if CFLAGS option -$cf_opt works" >&5 + echo "$as_me:12377: checking if CFLAGS option -$cf_opt works" >&5 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6 - if { (eval echo "$as_me:12247: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:12379: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12250: \$? = $ac_status" >&5 + echo "$as_me:12382: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - echo "$as_me:12252: result: yes" >&5 + echo "$as_me:12384: result: yes" >&5 echo "${ECHO_T}yes" >&6 cf_save_CFLAGS="$CFLAGS" else - echo "$as_me:12256: result: no" >&5 + echo "$as_me:12388: result: no" >&5 echo "${ECHO_T}no" >&6 fi done @@ -12268,17 +12400,17 @@ echo "${ECHO_T}no" >&6 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6 -echo "${as_me:-configure}:12271: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5 +echo "${as_me:-configure}:12403: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6 -echo "${as_me:-configure}:12275: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 +echo "${as_me:-configure}:12407: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5 # The test/sample programs in the original tree link using rpath option. # Make it optional for packagers. if test -n "$LOCAL_LDFLAGS" then - echo "$as_me:12281: checking if you want to link sample programs with rpath option" >&5 + echo "$as_me:12413: checking if you want to link sample programs with rpath option" >&5 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6 # Check whether --enable-rpath-link or --disable-rpath-link was given. @@ -12288,7 +12420,7 @@ if test "${enable_rpath_link+set}" = set; then else with_rpath_link=yes fi; - echo "$as_me:12291: result: $with_rpath_link" >&5 + echo "$as_me:12423: result: $with_rpath_link" >&5 echo "${ECHO_T}$with_rpath_link" >&6 if test "$with_rpath_link" = no then @@ -12301,7 +12433,7 @@ fi ### use option --enable-broken-linker to force on use of broken-linker support -echo "$as_me:12304: checking if you want broken-linker support code" >&5 +echo "$as_me:12436: checking if you want broken-linker support code" >&5 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6 # Check whether --enable-broken_linker or --disable-broken_linker was given. @@ -12311,7 +12443,7 @@ if test "${enable_broken_linker+set}" = set; then else with_broken_linker=no fi; -echo "$as_me:12314: result: $with_broken_linker" >&5 +echo "$as_me:12446: result: $with_broken_linker" >&5 echo "${ECHO_T}$with_broken_linker" >&6 : "${BROKEN_LINKER:=0}" @@ -12326,14 +12458,14 @@ fi # Check to define _XOPEN_SOURCE "automatically" -echo "$as_me:12329: checking if the POSIX test-macros are already defined" >&5 +echo "$as_me:12461: checking if the POSIX test-macros are already defined" >&5 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6 if test "${cf_cv_posix_visible+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12336 "configure" +#line 12468 "configure" #include "confdefs.h" #include int @@ -12352,16 +12484,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12355: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12487: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12358: \$? = $ac_status" >&5 + echo "$as_me:12490: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12361: \"$ac_try\"") >&5 + { (eval echo "$as_me:12493: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12364: \$? = $ac_status" >&5 + echo "$as_me:12496: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_visible=no else @@ -12372,7 +12504,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12375: result: $cf_cv_posix_visible" >&5 +echo "$as_me:12507: result: $cf_cv_posix_visible" >&5 echo "${ECHO_T}$cf_cv_posix_visible" >&6 if test "$cf_cv_posix_visible" = no; then @@ -12385,9 +12517,6 @@ case "$host_os" in (aix[4-7]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(msys) - cf_XOPEN_SOURCE=600 - ;; (darwin[0-8].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -12413,18 +12542,18 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) cf_gnu_xopen_source=$cf_XOPEN_SOURCE -echo "$as_me:12420: checking if this is the GNU C library" >&5 +echo "$as_me:12549: checking if this is the GNU C library" >&5 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6 if test "${cf_cv_gnu_library+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12427 "configure" +#line 12556 "configure" #include "confdefs.h" #include int @@ -12443,16 +12572,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12446: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12575: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12449: \$? = $ac_status" >&5 + echo "$as_me:12578: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12452: \"$ac_try\"") >&5 + { (eval echo "$as_me:12581: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12455: \$? = $ac_status" >&5 + echo "$as_me:12584: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library=yes else @@ -12463,7 +12592,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12466: result: $cf_cv_gnu_library" >&5 +echo "$as_me:12595: result: $cf_cv_gnu_library" >&5 echo "${ECHO_T}$cf_cv_gnu_library" >&6 if test x$cf_cv_gnu_library = xyes; then @@ -12471,7 +12600,7 @@ if test x$cf_cv_gnu_library = xyes; then # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE # was changed to help a little. newlib incorporated the change about 4 # years later. - echo "$as_me:12474: checking if _DEFAULT_SOURCE can be used as a basis" >&5 + echo "$as_me:12603: checking if _DEFAULT_SOURCE can be used as a basis" >&5 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6 if test "${cf_cv_gnu_library_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12483,7 +12612,7 @@ else CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 12486 "configure" +#line 12615 "configure" #include "confdefs.h" #include int @@ -12502,16 +12631,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12505: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12508: \$? = $ac_status" >&5 + echo "$as_me:12637: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12511: \"$ac_try\"") >&5 + { (eval echo "$as_me:12640: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12514: \$? = $ac_status" >&5 + echo "$as_me:12643: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library_219=yes else @@ -12523,12 +12652,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi -echo "$as_me:12526: result: $cf_cv_gnu_library_219" >&5 +echo "$as_me:12655: result: $cf_cv_gnu_library_219" >&5 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6 if test "x$cf_cv_gnu_library_219" = xyes; then cf_save="$CPPFLAGS" - echo "$as_me:12531: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 + echo "$as_me:12660: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12633,7 +12762,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >"conftest.$ac_ext" <<_ACEOF -#line 12636 "configure" +#line 12765 "configure" #include "confdefs.h" #include @@ -12653,16 +12782,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12656: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12785: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12659: \$? = $ac_status" >&5 + echo "$as_me:12788: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12662: \"$ac_try\"") >&5 + { (eval echo "$as_me:12791: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12665: \$? = $ac_status" >&5 + echo "$as_me:12794: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_dftsrc_219=yes else @@ -12673,7 +12802,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12676: result: $cf_cv_gnu_dftsrc_219" >&5 +echo "$as_me:12805: result: $cf_cv_gnu_dftsrc_219" >&5 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" else @@ -12682,14 +12811,14 @@ echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then - echo "$as_me:12685: checking if we must define _GNU_SOURCE" >&5 + echo "$as_me:12814: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12692 "configure" +#line 12821 "configure" #include "confdefs.h" #include int @@ -12704,16 +12833,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12707: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12710: \$? = $ac_status" >&5 + echo "$as_me:12839: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12713: \"$ac_try\"") >&5 + { (eval echo "$as_me:12842: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12716: \$? = $ac_status" >&5 + echo "$as_me:12845: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else @@ -12820,7 +12949,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >"conftest.$ac_ext" <<_ACEOF -#line 12823 "configure" +#line 12952 "configure" #include "confdefs.h" #include int @@ -12835,16 +12964,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12838: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12967: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12841: \$? = $ac_status" >&5 + echo "$as_me:12970: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12844: \"$ac_try\"") >&5 + { (eval echo "$as_me:12973: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12847: \$? = $ac_status" >&5 + echo "$as_me:12976: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else @@ -12859,12 +12988,12 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12862: result: $cf_cv_gnu_source" >&5 +echo "$as_me:12991: result: $cf_cv_gnu_source" >&5 echo "${ECHO_T}$cf_cv_gnu_source" >&6 if test "$cf_cv_gnu_source" = yes then - echo "$as_me:12867: checking if we should also define _DEFAULT_SOURCE" >&5 + echo "$as_me:12996: checking if we should also define _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_default_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12874,7 +13003,7 @@ else CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 12877 "configure" +#line 13006 "configure" #include "confdefs.h" #include int @@ -12889,16 +13018,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12892: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13021: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12895: \$? = $ac_status" >&5 + echo "$as_me:13024: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12898: \"$ac_try\"") >&5 + { (eval echo "$as_me:13027: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12901: \$? = $ac_status" >&5 + echo "$as_me:13030: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_default_source=no else @@ -12909,7 +13038,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:12912: result: $cf_cv_default_source" >&5 +echo "$as_me:13041: result: $cf_cv_default_source" >&5 echo "${ECHO_T}$cf_cv_default_source" >&6 if test "$cf_cv_default_source" = yes then @@ -12946,16 +13075,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:12949: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:13078: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:12955: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:13084: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 12958 "configure" +#line 13087 "configure" #include "confdefs.h" #include int @@ -12963,23 +13092,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:12973: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13102: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12976: \$? = $ac_status" >&5 + echo "$as_me:13105: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:12979: \"$ac_try\"") >&5 + { (eval echo "$as_me:13108: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12982: \$? = $ac_status" >&5 + echo "$as_me:13111: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else @@ -13000,7 +13129,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 13003 "configure" +#line 13132 "configure" #include "confdefs.h" #include int @@ -13008,23 +13137,23 @@ main (void) { #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13018: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13147: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13021: \$? = $ac_status" >&5 + echo "$as_me:13150: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13024: \"$ac_try\"") >&5 + { (eval echo "$as_me:13153: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13027: \$? = $ac_status" >&5 + echo "$as_me:13156: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -13035,7 +13164,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "${as_me:-configure}:13038: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:13167: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" @@ -13043,10 +13172,10 @@ echo "${as_me:-configure}:13038: testing ifdef from value $cf_POSIX_C_SOURCE ... test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" -echo "${as_me:-configure}:13046: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:13175: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 13049 "configure" +#line 13178 "configure" #include "confdefs.h" #include int @@ -13054,23 +13183,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13064: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13067: \$? = $ac_status" >&5 + echo "$as_me:13196: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13070: \"$ac_try\"") >&5 + { (eval echo "$as_me:13199: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13073: \$? = $ac_status" >&5 + echo "$as_me:13202: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -13086,7 +13215,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:13089: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:13218: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -13203,7 +13332,7 @@ fi # cf_cv_posix_visible # OpenBSD 6.x has broken locale support, both compile-time and runtime. # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html # Abusing the conformance level is a workaround. - { echo "$as_me:13206: WARNING: this system does not provide usable locale support" >&5 + { echo "$as_me:13335: WARNING: this system does not provide usable locale support" >&5 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;} cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=700 @@ -13235,42 +13364,41 @@ echo "$as_me: WARNING: this system does not provide usable locale support" >&2;} ;; (*) -echo "$as_me:13238: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:13367: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13245 "configure" +#line 13374 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13264: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13392: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13267: \$? = $ac_status" >&5 + echo "$as_me:13395: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13270: \"$ac_try\"") >&5 + { (eval echo "$as_me:13398: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13273: \$? = $ac_status" >&5 + echo "$as_me:13401: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -13282,35 +13410,34 @@ cf_save="$CPPFLAGS" CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 13285 "configure" +#line 13413 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { -#ifdef _XOPEN_SOURCE -make an error +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13304: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13431: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13307: \$? = $ac_status" >&5 + echo "$as_me:13434: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13310: \"$ac_try\"") >&5 + { (eval echo "$as_me:13437: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13313: \$? = $ac_status" >&5 + echo "$as_me:13440: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -13319,13 +13446,13 @@ cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - CPPFLAGS="$cf_save" + CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:13328: result: $cf_cv_xopen_source" >&5 +echo "$as_me:13455: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -13468,6 +13595,8 @@ done fi + cf_save_xopen_cppflags="$CPPFLAGS" + if test "$cf_cv_posix_visible" = no; then cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE @@ -13483,16 +13612,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:13486: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:13615: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:13492: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:13621: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 13495 "configure" +#line 13624 "configure" #include "confdefs.h" #include int @@ -13500,23 +13629,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13510: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13639: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13513: \$? = $ac_status" >&5 + echo "$as_me:13642: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13516: \"$ac_try\"") >&5 + { (eval echo "$as_me:13645: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13519: \$? = $ac_status" >&5 + echo "$as_me:13648: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else @@ -13537,7 +13666,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 13540 "configure" +#line 13669 "configure" #include "confdefs.h" #include int @@ -13545,23 +13674,23 @@ main (void) { #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13555: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13684: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13558: \$? = $ac_status" >&5 + echo "$as_me:13687: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13561: \"$ac_try\"") >&5 + { (eval echo "$as_me:13690: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13564: \$? = $ac_status" >&5 + echo "$as_me:13693: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -13572,7 +13701,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "${as_me:-configure}:13575: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:13704: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" @@ -13580,10 +13709,10 @@ echo "${as_me:-configure}:13575: testing ifdef from value $cf_POSIX_C_SOURCE ... test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" -echo "${as_me:-configure}:13583: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:13712: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 13586 "configure" +#line 13715 "configure" #include "confdefs.h" #include int @@ -13591,23 +13720,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13601: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13730: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13604: \$? = $ac_status" >&5 + echo "$as_me:13733: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13607: \"$ac_try\"") >&5 + { (eval echo "$as_me:13736: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13610: \$? = $ac_status" >&5 + echo "$as_me:13739: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -13623,7 +13752,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:13626: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:13755: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -13732,6 +13861,53 @@ fi fi # cf_cv_posix_visible + # Some of these niche implementations use copy/paste, double-check... + if test "$cf_cv_xopen_source" = no ; then + test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6 + +echo "${as_me:-configure}:13868: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5 + + cat >"conftest.$ac_ext" <<_ACEOF +#line 13871 "configure" +#include "confdefs.h" + +$ac_includes_default + +int +main (void) +{ + +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:13892: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:13895: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13898: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 + + { echo "$as_me:13905: WARNING: _POSIX_C_SOURCE definition is not usable" >&5 +echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;} + CPPFLAGS="$cf_save_xopen_cppflags" +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" + fi ;; esac @@ -13749,7 +13925,7 @@ do test "$CFLAGS" != "$cf_old_cflag" || break test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6 -echo "${as_me:-configure}:13752: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5 +echo "${as_me:-configure}:13928: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5 CFLAGS="$cf_old_cflag" done @@ -13761,7 +13937,7 @@ do test "$CPPFLAGS" != "$cf_old_cflag" || break test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6 -echo "${as_me:-configure}:13764: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5 +echo "${as_me:-configure}:13940: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5 CPPFLAGS="$cf_old_cflag" done @@ -13849,7 +14025,7 @@ done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 -echo "${as_me:-configure}:13852: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 +echo "${as_me:-configure}:14028: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" @@ -13859,7 +14035,7 @@ fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 -echo "${as_me:-configure}:13862: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 +echo "${as_me:-configure}:14038: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" @@ -13869,7 +14045,7 @@ fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 -echo "${as_me:-configure}:13872: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 +echo "${as_me:-configure}:14048: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" @@ -13881,10 +14057,10 @@ done fi if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then - echo "$as_me:13884: checking if _XOPEN_SOURCE really is set" >&5 + echo "$as_me:14060: checking if _XOPEN_SOURCE really is set" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 13887 "configure" +#line 14063 "configure" #include "confdefs.h" #include int @@ -13892,23 +14068,23 @@ main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13902: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14078: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13905: \$? = $ac_status" >&5 + echo "$as_me:14081: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13908: \"$ac_try\"") >&5 + { (eval echo "$as_me:14084: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13911: \$? = $ac_status" >&5 + echo "$as_me:14087: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set=yes else @@ -13917,12 +14093,12 @@ cat "conftest.$ac_ext" >&5 cf_XOPEN_SOURCE_set=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:13920: result: $cf_XOPEN_SOURCE_set" >&5 + echo "$as_me:14096: result: $cf_XOPEN_SOURCE_set" >&5 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6 if test "$cf_XOPEN_SOURCE_set" = yes then cat >"conftest.$ac_ext" <<_ACEOF -#line 13925 "configure" +#line 14101 "configure" #include "confdefs.h" #include int @@ -13930,23 +14106,23 @@ main (void) { #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13940: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14116: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13943: \$? = $ac_status" >&5 + echo "$as_me:14119: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13946: \"$ac_try\"") >&5 + { (eval echo "$as_me:14122: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13949: \$? = $ac_status" >&5 + echo "$as_me:14125: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set_ok=yes else @@ -13957,47 +14133,46 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_XOPEN_SOURCE_set_ok" = no then - { echo "$as_me:13960: WARNING: _XOPEN_SOURCE is lower than requested" >&5 + { echo "$as_me:14136: WARNING: _XOPEN_SOURCE is lower than requested" >&5 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;} fi else -echo "$as_me:13965: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:14141: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13972 "configure" +#line 14148 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:13991: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14166: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13994: \$? = $ac_status" >&5 + echo "$as_me:14169: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:13997: \"$ac_try\"") >&5 + { (eval echo "$as_me:14172: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14000: \$? = $ac_status" >&5 + echo "$as_me:14175: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -14009,35 +14184,34 @@ cf_save="$CPPFLAGS" CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 14012 "configure" +#line 14187 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { -#ifdef _XOPEN_SOURCE -make an error +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14031: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14205: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14034: \$? = $ac_status" >&5 + echo "$as_me:14208: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14037: \"$ac_try\"") >&5 + { (eval echo "$as_me:14211: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14040: \$? = $ac_status" >&5 + echo "$as_me:14214: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -14046,13 +14220,13 @@ cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - CPPFLAGS="$cf_save" + CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:14055: result: $cf_cv_xopen_source" >&5 +echo "$as_me:14229: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -14199,132 +14373,360 @@ fi fi fi # cf_cv_posix_visible -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" - -fi; -if test "$enable_largefile" != no; then - - echo "$as_me:14209: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_largefile_CC+set}" = set; then +echo "$as_me:14376: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >"conftest.$ac_ext" <<_ACEOF -#line 14221 "configure" + cat >"conftest.$ac_ext" <<_ACEOF +#line 14382 "configure" #include "confdefs.h" -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ +#include +#include +#include +#include - ; - return 0; -} _ACEOF - rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14241: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:14244: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14247: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:14390: \"$ac_cpp "conftest.$ac_ext"\"") >&5 + (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? - echo "$as_me:14250: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - break + $EGREP -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:14396: \$? = $ac_status" >&5 + (exit "$ac_status"); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 + ac_cpp_err=yes fi -rm -f "conftest.$ac_objext" - CC="$CC -n32" - rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14260: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:14263: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14266: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:14269: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - ac_cv_sys_largefile_CC=' -n32'; break +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -fi -rm -f "conftest.$ac_objext" - break - done - CC=$ac_save_CC - rm -f "conftest.$ac_ext" - fi + cat "conftest.$ac_ext" >&5 + ac_cv_header_stdc=no fi -echo "$as_me:14283: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi +rm -f conftest.err "conftest.$ac_ext" - echo "$as_me:14289: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - ac_cv_sys_file_offset_bits=no +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >"conftest.$ac_ext" <<_ACEOF -#line 14297 "configure" +#line 14418 "configure" #include "confdefs.h" -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ +#include - ; - return 0; -} _ACEOF -rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14317: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:14320: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14323: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:14326: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -rf conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >"conftest.$ac_ext" <<_ACEOF +#line 14436 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -rf conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 14457 "configure" +#include "confdefs.h" +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main (void) +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + $ac_main_return(2); + $ac_main_return (0); +} +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:14483: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:14486: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:14488: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14491: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_header_stdc=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi +fi +fi +echo "$as_me:14504: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:14520: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 14526 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:14532: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14535: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:14538: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14541: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +eval "$as_ac_Header=no" +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:14551: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 +if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_exit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 14567 "configure" +#include "confdefs.h" +$ac_includes_default +int +main (void) +{ +#ifndef exit + (void) exit; +#endif + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:14582: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14585: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:14588: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14591: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_have_decl_exit=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_have_decl_exit=no +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:14601: result: $ac_cv_have_decl_exit" >&5 +echo "${ECHO_T}$ac_cv_have_decl_exit" >&6 + +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + +fi; +if test "$enable_largefile" != no; then + + echo "$as_me:14611: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >"conftest.$ac_ext" <<_ACEOF +#line 14623 "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF + rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:14643: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14646: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:14649: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14652: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +fi +rm -f "conftest.$ac_objext" + CC="$CC -n32" + rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:14662: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14665: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:14668: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14671: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +fi +rm -f "conftest.$ac_objext" + break + done + CC=$ac_save_CC + rm -f "conftest.$ac_ext" + fi +fi +echo "$as_me:14685: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + echo "$as_me:14691: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_file_offset_bits=no + cat >"conftest.$ac_ext" <<_ACEOF +#line 14699 "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:14719: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14722: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:14725: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14728: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then break else echo "$as_me: failed program was:" >&5 @@ -14332,7 +14734,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 14335 "configure" +#line 14737 "configure" #include "confdefs.h" #define _FILE_OFFSET_BITS 64 #include @@ -14353,16 +14755,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14356: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14758: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14359: \$? = $ac_status" >&5 + echo "$as_me:14761: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14362: \"$ac_try\"") >&5 + { (eval echo "$as_me:14764: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14365: \$? = $ac_status" >&5 + echo "$as_me:14767: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_file_offset_bits=64; break else @@ -14373,7 +14775,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" break done fi -echo "$as_me:14376: result: $ac_cv_sys_file_offset_bits" >&5 +echo "$as_me:14778: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 if test "$ac_cv_sys_file_offset_bits" != no; then @@ -14383,7 +14785,7 @@ EOF fi rm -rf conftest* - echo "$as_me:14386: checking for _LARGE_FILES value needed for large files" >&5 + echo "$as_me:14788: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14391,7 +14793,7 @@ else while :; do ac_cv_sys_large_files=no cat >"conftest.$ac_ext" <<_ACEOF -#line 14394 "configure" +#line 14796 "configure" #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -14411,16 +14813,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14414: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14816: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14417: \$? = $ac_status" >&5 + echo "$as_me:14819: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14420: \"$ac_try\"") >&5 + { (eval echo "$as_me:14822: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14423: \$? = $ac_status" >&5 + echo "$as_me:14825: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -14429,7 +14831,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 14432 "configure" +#line 14834 "configure" #include "confdefs.h" #define _LARGE_FILES 1 #include @@ -14450,16 +14852,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14453: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14855: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14456: \$? = $ac_status" >&5 + echo "$as_me:14858: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14459: \"$ac_try\"") >&5 + { (eval echo "$as_me:14861: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14462: \$? = $ac_status" >&5 + echo "$as_me:14864: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_large_files=1; break else @@ -14470,7 +14872,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" break done fi -echo "$as_me:14473: result: $ac_cv_sys_large_files" >&5 +echo "$as_me:14875: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6 if test "$ac_cv_sys_large_files" != no; then @@ -14483,7 +14885,7 @@ rm -rf conftest* fi if test "$enable_largefile" != no ; then - echo "$as_me:14486: checking for _LARGEFILE_SOURCE value needed for large files" >&5 + echo "$as_me:14888: checking for _LARGEFILE_SOURCE value needed for large files" >&5 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14491,28 +14893,31 @@ else while :; do ac_cv_sys_largefile_source=no cat >"conftest.$ac_ext" <<_ACEOF -#line 14494 "configure" +#line 14896 "configure" #include "confdefs.h" #include + #include int main (void) { -return !fseeko; + + int (*my_fseeko)(FILE *, off_t, int) = fseeko; + return my_fseeko(stdin, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14506: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14911: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14509: \$? = $ac_status" >&5 + echo "$as_me:14914: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14512: \"$ac_try\"") >&5 + { (eval echo "$as_me:14917: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14515: \$? = $ac_status" >&5 + echo "$as_me:14920: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -14521,29 +14926,32 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 14524 "configure" +#line 14929 "configure" #include "confdefs.h" #define _LARGEFILE_SOURCE 1 #include + #include int main (void) { -return !fseeko; + + int (*my_fseeko)(FILE *, off_t, int) = fseeko; + return my_fseeko(stdin, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14537: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14945: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14540: \$? = $ac_status" >&5 + echo "$as_me:14948: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14543: \"$ac_try\"") >&5 + { (eval echo "$as_me:14951: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14546: \$? = $ac_status" >&5 + echo "$as_me:14954: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sys_largefile_source=1; break else @@ -14554,7 +14962,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" break done fi -echo "$as_me:14557: result: $ac_cv_sys_largefile_source" >&5 +echo "$as_me:14965: result: $ac_cv_sys_largefile_source" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6 if test "$ac_cv_sys_largefile_source" != no; then @@ -14568,34 +14976,36 @@ rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -echo "$as_me:14571: checking for fseeko" >&5 +echo "$as_me:14979: checking for fseeko" >&5 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6 if test "${ac_cv_func_fseeko+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14577 "configure" +#line 14985 "configure" #include "confdefs.h" #include + #include int main (void) { -return fseeko && fseeko (stdin, 0, 0); +int (*my_fseeko)(FILE *, off_t, int) = fseeko; + return my_fseeko && my_fseeko (stdin, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:14589: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14999: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14592: \$? = $ac_status" >&5 + echo "$as_me:15002: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:14595: \"$ac_try\"") >&5 + { (eval echo "$as_me:15005: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14598: \$? = $ac_status" >&5 + echo "$as_me:15008: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_fseeko=yes else @@ -14605,7 +15015,7 @@ ac_cv_func_fseeko=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:14608: result: $ac_cv_func_fseeko" >&5 +echo "$as_me:15018: result: $ac_cv_func_fseeko" >&5 echo "${ECHO_T}$ac_cv_func_fseeko" >&6 if test $ac_cv_func_fseeko = yes; then @@ -14644,28 +15054,32 @@ fi fi - echo "$as_me:14647: checking whether to use struct dirent64" >&5 + echo "$as_me:15057: checking whether to use struct dirent64" >&5 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6 if test "${cf_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14654 "configure" +#line 15064 "configure" #include "confdefs.h" #pragma GCC diagnostic error "-Wincompatible-pointer-types" #include #include +#ifndef __REDIRECT +/* if transitional largefile support is setup, this is true */ +extern struct dirent64 * readdir(DIR *); +#endif + int main (void) { - /* if transitional largefile support is setup, this is true */ - extern struct dirent64 * readdir(DIR *); - struct dirent64 *x = readdir((DIR *)0); - struct dirent *y = readdir((DIR *)0); + DIR *dp = opendir("."); + struct dirent64 *x = readdir(dp); + struct dirent *y = readdir(dp); int z = x - y; (void)z; @@ -14674,16 +15088,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:15091: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14680: \$? = $ac_status" >&5 + echo "$as_me:15094: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:14683: \"$ac_try\"") >&5 + { (eval echo "$as_me:15097: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14686: \$? = $ac_status" >&5 + echo "$as_me:15100: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_struct_dirent64=yes else @@ -14694,7 +15108,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:14697: result: $cf_cv_struct_dirent64" >&5 +echo "$as_me:15111: result: $cf_cv_struct_dirent64" >&5 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6 test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF @@ -14704,7 +15118,7 @@ EOF fi ### Enable compiling-in rcs id's -echo "$as_me:14707: checking if RCS identifiers should be compiled-in" >&5 +echo "$as_me:15121: checking if RCS identifiers should be compiled-in" >&5 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6 # Check whether --with-rcs-ids or --without-rcs-ids was given. @@ -14714,7 +15128,7 @@ if test "${with_rcs_ids+set}" = set; then else with_rcs_ids=no fi; -echo "$as_me:14717: result: $with_rcs_ids" >&5 +echo "$as_me:15131: result: $with_rcs_ids" >&5 echo "${ECHO_T}$with_rcs_ids" >&6 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF @@ -14724,7 +15138,7 @@ EOF ############################################################################### ### Note that some functions (such as const) are normally disabled anyway. -echo "$as_me:14727: checking if you want to build with function extensions" >&5 +echo "$as_me:15141: checking if you want to build with function extensions" >&5 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6 # Check whether --enable-ext-funcs or --disable-ext-funcs was given. @@ -14734,7 +15148,7 @@ if test "${enable_ext_funcs+set}" = set; then else with_ext_funcs=yes fi; -echo "$as_me:14737: result: $with_ext_funcs" >&5 +echo "$as_me:15151: result: $with_ext_funcs" >&5 echo "${ECHO_T}$with_ext_funcs" >&6 if test "$with_ext_funcs" = yes ; then NCURSES_EXT_FUNCS=1 @@ -14752,7 +15166,7 @@ else fi ### use option --enable-const to turn on use of const beyond that in XSI. -echo "$as_me:14755: checking for extended use of const keyword" >&5 +echo "$as_me:15169: checking for extended use of const keyword" >&5 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6 # Check whether --enable-const or --disable-const was given. @@ -14762,7 +15176,7 @@ if test "${enable_const+set}" = set; then else with_ext_const=no fi; -echo "$as_me:14765: result: $with_ext_const" >&5 +echo "$as_me:15179: result: $with_ext_const" >&5 echo "${ECHO_T}$with_ext_const" >&6 NCURSES_CONST='/*nothing*/' if test "$with_ext_const" = yes ; then @@ -14772,7 +15186,7 @@ fi ############################################################################### # These options are relatively safe to experiment with. -echo "$as_me:14775: checking if you want all development code" >&5 +echo "$as_me:15189: checking if you want all development code" >&5 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6 # Check whether --with-develop or --without-develop was given. @@ -14782,7 +15196,7 @@ if test "${with_develop+set}" = set; then else with_develop=no fi; -echo "$as_me:14785: result: $with_develop" >&5 +echo "$as_me:15199: result: $with_develop" >&5 echo "${ECHO_T}$with_develop" >&6 ############################################################################### @@ -14791,7 +15205,7 @@ echo "${ECHO_T}$with_develop" >&6 # This is still experimental (20080329), but should ultimately be moved to # the script-block --with-normal, etc. -echo "$as_me:14794: checking if you want to link with the pthread library" >&5 +echo "$as_me:15208: checking if you want to link with the pthread library" >&5 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6 # Check whether --with-pthread or --without-pthread was given. @@ -14801,27 +15215,27 @@ if test "${with_pthread+set}" = set; then else with_pthread=no fi; -echo "$as_me:14804: result: $with_pthread" >&5 +echo "$as_me:15218: result: $with_pthread" >&5 echo "${ECHO_T}$with_pthread" >&6 if test "$with_pthread" != no ; then - echo "$as_me:14808: checking for pthread.h" >&5 + echo "$as_me:15222: checking for pthread.h" >&5 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14814 "configure" +#line 15228 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:14818: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:15232: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:14824: \$? = $ac_status" >&5 + echo "$as_me:15238: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -14840,7 +15254,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:14843: result: $ac_cv_header_pthread_h" >&5 +echo "$as_me:15257: result: $ac_cv_header_pthread_h" >&5 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 if test "$ac_cv_header_pthread_h" = yes; then @@ -14850,7 +15264,7 @@ EOF for cf_lib_pthread in pthread c_r do - echo "$as_me:14853: checking if we can link with the $cf_lib_pthread library" >&5 + echo "$as_me:15267: checking if we can link with the $cf_lib_pthread library" >&5 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6 cf_save_LIBS="$LIBS" @@ -14871,7 +15285,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 14874 "configure" +#line 15288 "configure" #include "confdefs.h" #include @@ -14888,16 +15302,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:14891: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15305: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14894: \$? = $ac_status" >&5 + echo "$as_me:15308: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:14897: \"$ac_try\"") >&5 + { (eval echo "$as_me:15311: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14900: \$? = $ac_status" >&5 + echo "$as_me:15314: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then with_pthread=yes else @@ -14907,7 +15321,7 @@ with_pthread=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" - echo "$as_me:14910: result: $with_pthread" >&5 + echo "$as_me:15324: result: $with_pthread" >&5 echo "${ECHO_T}$with_pthread" >&6 test "$with_pthread" = yes && break done @@ -14935,7 +15349,7 @@ cat >>confdefs.h <<\EOF EOF else - { { echo "$as_me:14938: error: Cannot link with pthread library" >&5 + { { echo "$as_me:15352: error: Cannot link with pthread library" >&5 echo "$as_me: error: Cannot link with pthread library" >&2;} { (exit 1); exit 1; }; } fi @@ -14944,7 +15358,7 @@ fi fi -echo "$as_me:14947: checking if you want to use weak-symbols for pthreads" >&5 +echo "$as_me:15361: checking if you want to use weak-symbols for pthreads" >&5 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6 # Check whether --enable-weak-symbols or --disable-weak-symbols was given. @@ -14954,18 +15368,18 @@ if test "${enable_weak_symbols+set}" = set; then else use_weak_symbols=no fi; -echo "$as_me:14957: result: $use_weak_symbols" >&5 +echo "$as_me:15371: result: $use_weak_symbols" >&5 echo "${ECHO_T}$use_weak_symbols" >&6 if test "$use_weak_symbols" = yes ; then -echo "$as_me:14961: checking if $CC supports weak symbols" >&5 +echo "$as_me:15375: checking if $CC supports weak symbols" >&5 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6 if test "${cf_cv_weak_symbols+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14968 "configure" +#line 15382 "configure" #include "confdefs.h" #include @@ -14991,16 +15405,16 @@ weak_symbol(fopen); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:14994: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:15408: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14997: \$? = $ac_status" >&5 + echo "$as_me:15411: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:15000: \"$ac_try\"") >&5 + { (eval echo "$as_me:15414: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15003: \$? = $ac_status" >&5 + echo "$as_me:15417: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_weak_symbols=yes else @@ -15011,7 +15425,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:15014: result: $cf_cv_weak_symbols" >&5 +echo "$as_me:15428: result: $cf_cv_weak_symbols" >&5 echo "${ECHO_T}$cf_cv_weak_symbols" >&6 else @@ -15040,13 +15454,13 @@ EOF fi # OpenSUSE is installing ncurses6, using reentrant option. -echo "$as_me:15043: checking for _nc_TABSIZE" >&5 +echo "$as_me:15457: checking for _nc_TABSIZE" >&5 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15049 "configure" +#line 15463 "configure" #include "confdefs.h" #define _nc_TABSIZE autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -15077,16 +15491,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15080: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15494: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15083: \$? = $ac_status" >&5 + echo "$as_me:15497: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15086: \"$ac_try\"") >&5 + { (eval echo "$as_me:15500: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15089: \$? = $ac_status" >&5 + echo "$as_me:15503: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func__nc_TABSIZE=yes else @@ -15096,7 +15510,7 @@ ac_cv_func__nc_TABSIZE=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:15099: result: $ac_cv_func__nc_TABSIZE" >&5 +echo "$as_me:15513: result: $ac_cv_func__nc_TABSIZE" >&5 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6 if test "$ac_cv_func__nc_TABSIZE" = yes; then assume_reentrant=yes @@ -15108,7 +15522,7 @@ fi # opaque outside of that, so there is no --enable-opaque option. We can use # this option without --with-pthreads, but this will be always set for # pthreads. -echo "$as_me:15111: checking if you want experimental reentrant code" >&5 +echo "$as_me:15525: checking if you want experimental reentrant code" >&5 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6 # Check whether --enable-reentrant or --disable-reentrant was given. @@ -15118,7 +15532,7 @@ if test "${enable_reentrant+set}" = set; then else with_reentrant=$assume_reentrant fi; -echo "$as_me:15121: result: $with_reentrant" >&5 +echo "$as_me:15535: result: $with_reentrant" >&5 echo "${ECHO_T}$with_reentrant" >&6 if test "$with_reentrant" = yes ; then cf_cv_enable_reentrant=1 @@ -15141,7 +15555,7 @@ fi ### Allow using a different wrap-prefix if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then - echo "$as_me:15144: checking for prefix used to wrap public variables" >&5 + echo "$as_me:15558: checking for prefix used to wrap public variables" >&5 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6 # Check whether --with-wrap-prefix or --without-wrap-prefix was given. @@ -15151,7 +15565,7 @@ if test "${with_wrap_prefix+set}" = set; then else NCURSES_WRAP_PREFIX=_nc_ fi; - echo "$as_me:15154: result: $NCURSES_WRAP_PREFIX" >&5 + echo "$as_me:15568: result: $NCURSES_WRAP_PREFIX" >&5 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6 else NCURSES_WRAP_PREFIX=_nc_ @@ -15165,7 +15579,7 @@ EOF ### use option --disable-echo to suppress full display compiling commands -echo "$as_me:15168: checking if you want to see long compiling messages" >&5 +echo "$as_me:15582: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -15199,10 +15613,10 @@ else ECHO_CC='' fi; -echo "$as_me:15202: result: $enableval" >&5 +echo "$as_me:15616: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 -echo "$as_me:15205: checking if you want to use C11 _Noreturn feature" >&5 +echo "$as_me:15619: checking if you want to use C11 _Noreturn feature" >&5 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given. @@ -15219,21 +15633,20 @@ else enable_stdnoreturn=no fi; -echo "$as_me:15222: result: $enable_stdnoreturn" >&5 +echo "$as_me:15636: result: $enable_stdnoreturn" >&5 echo "${ECHO_T}$enable_stdnoreturn" >&6 if test $enable_stdnoreturn = yes; then -echo "$as_me:15226: checking for C11 _Noreturn feature" >&5 +echo "$as_me:15640: checking for C11 _Noreturn feature" >&5 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6 if test "${cf_cv_c11_noreturn+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15232 "configure" +#line 15646 "configure" #include "confdefs.h" -#include -#include +$ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } @@ -15246,16 +15659,16 @@ if (feof(stdin)) giveup() } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:15249: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:15662: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15252: \$? = $ac_status" >&5 + echo "$as_me:15665: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:15255: \"$ac_try\"") >&5 + { (eval echo "$as_me:15668: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15258: \$? = $ac_status" >&5 + echo "$as_me:15671: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_c11_noreturn=yes else @@ -15266,7 +15679,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:15269: result: $cf_cv_c11_noreturn" >&5 +echo "$as_me:15682: result: $cf_cv_c11_noreturn" >&5 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6 else cf_cv_c11_noreturn=no, @@ -15294,14 +15707,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $CFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6 - -echo "${as_me:-configure}:15299: testing repairing CFLAGS: $CFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $CFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -15316,15 +15731,22 @@ echo "${as_me:-configure}:15299: testing repairing CFLAGS: $CFLAGS ..." 1>&5 ;; esac done - CFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 + if test "x$CFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6 + +echo "${as_me:-configure}:15738: testing repairing CFLAGS: $CFLAGS ..." 1>&5 -echo "${as_me:-configure}:15322: testing ... fixed $CFLAGS ..." 1>&5 + CFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:15743: testing ... fixed $CFLAGS ..." 1>&5 -echo "${as_me:-configure}:15326: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:15747: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + + fi ;; esac fi @@ -15333,14 +15755,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $CPPFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 - -echo "${as_me:-configure}:15338: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $CPPFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -15355,15 +15779,22 @@ echo "${as_me:-configure}:15338: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 ;; esac done - CPPFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 + if test "x$CPPFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 + +echo "${as_me:-configure}:15786: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 + + CPPFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 -echo "${as_me:-configure}:15361: testing ... fixed $CPPFLAGS ..." 1>&5 +echo "${as_me:-configure}:15791: testing ... fixed $CPPFLAGS ..." 1>&5 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 -echo "${as_me:-configure}:15365: testing ... extra $EXTRA_CFLAGS ..." 1>&5 +echo "${as_me:-configure}:15795: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + fi ;; esac fi @@ -15372,14 +15803,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $LDFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 - -echo "${as_me:-configure}:15377: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $LDFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -15394,20 +15827,27 @@ echo "${as_me:-configure}:15377: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 ;; esac done - LDFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 + if test "x$LDFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 + +echo "${as_me:-configure}:15834: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 -echo "${as_me:-configure}:15400: testing ... fixed $LDFLAGS ..." 1>&5 + LDFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:15839: testing ... fixed $LDFLAGS ..." 1>&5 -echo "${as_me:-configure}:15404: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:15843: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + + fi ;; esac fi -echo "$as_me:15410: checking if you want to turn on gcc warnings" >&5 +echo "$as_me:15850: checking if you want to turn on gcc warnings" >&5 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. @@ -15424,7 +15864,7 @@ else enable_warnings=no fi; -echo "$as_me:15427: result: $enable_warnings" >&5 +echo "$as_me:15867: result: $enable_warnings" >&5 echo "${ECHO_T}$enable_warnings" >&6 if test "$enable_warnings" = "yes" then @@ -15448,7 +15888,7 @@ do done cat >"conftest.$ac_ext" <<_ACEOF -#line 15451 "configure" +#line 15891 "configure" #include "confdefs.h" #include @@ -15463,28 +15903,29 @@ String foo = malloc(1); free((void*)foo) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:15466: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:15906: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15469: \$? = $ac_status" >&5 + echo "$as_me:15909: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:15472: \"$ac_try\"") >&5 + { (eval echo "$as_me:15912: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15475: \$? = $ac_status" >&5 + echo "$as_me:15915: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then -echo "$as_me:15478: checking for X11/Xt const-feature" >&5 +echo "$as_me:15918: checking for X11/Xt const-feature" >&5 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6 if test "${cf_cv_const_x_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15485 "configure" +#line 15925 "configure" #include "confdefs.h" +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include @@ -15499,16 +15940,16 @@ String foo = malloc(1); *foo = 0 } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:15502: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:15943: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15505: \$? = $ac_status" >&5 + echo "$as_me:15946: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:15508: \"$ac_try\"") >&5 + { (eval echo "$as_me:15949: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15511: \$? = $ac_status" >&5 + echo "$as_me:15952: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_const_x_string=no @@ -15523,7 +15964,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:15526: result: $cf_cv_const_x_string" >&5 +echo "$as_me:15967: result: $cf_cv_const_x_string" >&5 echo "${ECHO_T}$cf_cv_const_x_string" >&6 LIBS="$cf_save_LIBS_CF_CONST_X_STRING" @@ -15552,7 +15993,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi cat > "conftest.$ac_ext" <&5 + { echo "$as_me:16012: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall" @@ -15584,12 +16025,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:15587: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:16028: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15590: \$? = $ac_status" >&5 + echo "$as_me:16031: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:15592: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:16033: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -15597,7 +16038,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 CFLAGS="$cf_save_CFLAGS" elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown" then - { echo "$as_me:15600: checking for $CC warning options..." >&5 + { echo "$as_me:16041: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" cf_warn_CONST="" @@ -15620,12 +16061,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:15623: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:16064: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15626: \$? = $ac_status" >&5 + echo "$as_me:16067: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:15628: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:16069: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case "$cf_opt" in (Winline) @@ -15633,7 +16074,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:15636: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:16077: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -15643,7 +16084,7 @@ echo "${as_me:-configure}:15636: testing feature is broken in gcc $GCC_VERSION . ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:15646: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:16087: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -15676,10 +16117,11 @@ cat > conftest.i <&5 + { echo "$as_me:16120: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -15728,12 +16170,12 @@ EOF ;; esac - if { (eval echo "$as_me:15731: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:16173: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15734: \$? = $ac_status" >&5 + echo "$as_me:16176: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:15736: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:16178: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case "$cf_attribute" in @@ -15796,12 +16238,12 @@ fi if test "x$enable_warnings" = "xyes"; then - ADAFLAGS="$ADAFLAGS -gnatg" + ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg" fi ### use option --enable-assertions to turn on generation of assertion code -echo "$as_me:15804: checking if you want to enable runtime assertions" >&5 +echo "$as_me:16246: checking if you want to enable runtime assertions" >&5 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6 # Check whether --enable-assertions or --disable-assertions was given. @@ -15811,7 +16253,7 @@ if test "${enable_assertions+set}" = set; then else with_assertions=no fi; -echo "$as_me:15814: result: $with_assertions" >&5 +echo "$as_me:16256: result: $with_assertions" >&5 echo "${ECHO_T}$with_assertions" >&6 if test -n "$GCC" then @@ -15864,7 +16306,7 @@ case "$CFLAGS $CPPFLAGS" in ;; esac -echo "$as_me:15867: checking whether to add trace feature to all models" >&5 +echo "$as_me:16309: checking whether to add trace feature to all models" >&5 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6 # Check whether --with-trace or --without-trace was given. @@ -15874,7 +16316,7 @@ if test "${with_trace+set}" = set; then else cf_with_trace=$cf_all_traces fi; -echo "$as_me:15877: result: $cf_with_trace" >&5 +echo "$as_me:16319: result: $cf_with_trace" >&5 echo "${ECHO_T}$cf_with_trace" >&6 if test "$cf_with_trace" = yes ; then @@ -15982,7 +16424,7 @@ else ADA_TRACE=FALSE fi -echo "$as_me:15985: checking if we want to use GNAT projects" >&5 +echo "$as_me:16427: checking if we want to use GNAT projects" >&5 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6 # Check whether --enable-gnat-projects or --disable-gnat-projects was given. @@ -15999,21 +16441,21 @@ else enable_gnat_projects=yes fi; -echo "$as_me:16002: result: $enable_gnat_projects" >&5 +echo "$as_me:16444: result: $enable_gnat_projects" >&5 echo "${ECHO_T}$enable_gnat_projects" >&6 ### Checks for libraries. case $cf_cv_system_name in (*mingw32*) -echo "$as_me:16009: checking if ssp library is needed" >&5 +echo "$as_me:16451: checking if ssp library is needed" >&5 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6 if test "${cf_cv_need_libssp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 16016 "configure" +#line 16458 "configure" #include "confdefs.h" #include @@ -16030,16 +16472,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16033: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16475: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16036: \$? = $ac_status" >&5 + echo "$as_me:16478: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16039: \"$ac_try\"") >&5 + { (eval echo "$as_me:16481: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16042: \$? = $ac_status" >&5 + echo "$as_me:16484: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_need_libssp=no else @@ -16049,7 +16491,7 @@ cat "conftest.$ac_ext" >&5 cf_save_LIBS="$LIBS" LIBS="$LIBS -lssp" cat >"conftest.$ac_ext" <<_ACEOF -#line 16052 "configure" +#line 16494 "configure" #include "confdefs.h" #include @@ -16066,16 +16508,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16069: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16511: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16072: \$? = $ac_status" >&5 + echo "$as_me:16514: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16075: \"$ac_try\"") >&5 + { (eval echo "$as_me:16517: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16078: \$? = $ac_status" >&5 + echo "$as_me:16520: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_need_libssp=yes else @@ -16089,7 +16531,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:16092: result: $cf_cv_need_libssp" >&5 +echo "$as_me:16534: result: $cf_cv_need_libssp" >&5 echo "${ECHO_T}$cf_cv_need_libssp" >&6 if test "x$cf_cv_need_libssp" = xyes @@ -16115,326 +16557,211 @@ fi ;; (*) -echo "$as_me:16118: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 -if test "${ac_cv_func_gettimeofday+set}" = set; then + +echo "$as_me:16561: checking for clock_gettime" >&5 +echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6 +if test "${cf_cv_func_clock_gettime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >"conftest.$ac_ext" <<_ACEOF -#line 16124 "configure" -#include "confdefs.h" -#define gettimeofday autoconf_temporary -#include /* least-intrusive standard header which defines gcc2 __stub macros */ -#undef gettimeofday - -#ifdef __cplusplus -extern "C" -#endif - -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gettimeofday (void); + cat >"conftest.$ac_ext" <<_ACEOF +#line 16568 "configure" +#include "confdefs.h" +#include int main (void) { - -/* The GNU C library defines stubs for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) -#error found stub for gettimeofday -#endif - - return gettimeofday (); +struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16155: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16581: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16158: \$? = $ac_status" >&5 + echo "$as_me:16584: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16161: \"$ac_try\"") >&5 + { (eval echo "$as_me:16587: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16164: \$? = $ac_status" >&5 + echo "$as_me:16590: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - ac_cv_func_gettimeofday=yes + cf_cv_func_clock_gettime=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -ac_cv_func_gettimeofday=no +cf_cv_func_clock_gettime=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" + fi -echo "$as_me:16174: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 -if test "$ac_cv_func_gettimeofday" = yes; then - cat >>confdefs.h <<\EOF -#define HAVE_GETTIMEOFDAY 1 +echo "$as_me:16601: result: $cf_cv_func_clock_gettime" >&5 +echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6 + +if test "$cf_cv_func_clock_gettime" = yes +then + +cat >>confdefs.h <<\EOF +#define HAVE_CLOCK_GETTIME 1 EOF else - -echo "$as_me:16183: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 -if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then +echo "$as_me:16612: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 +if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat >"conftest.$ac_ext" <<_ACEOF -#line 16191 "configure" + cat >"conftest.$ac_ext" <<_ACEOF +#line 16618 "configure" #include "confdefs.h" +#define gettimeofday autoconf_temporary +#include /* least-intrusive standard header which defines gcc2 __stub macros */ +#undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif + /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char gettimeofday (); +char gettimeofday (void); + int main (void) { -gettimeofday (); - ; - return 0; -} -_ACEOF -rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16210: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:16213: \$? = $ac_status" >&5 - (exit "$ac_status"); } && - { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16216: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:16219: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - ac_cv_lib_bsd_gettimeofday=yes -else - echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -ac_cv_lib_bsd_gettimeofday=no -fi -rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:16230: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 -if test "$ac_cv_lib_bsd_gettimeofday" = yes; then - -cat >>confdefs.h <<\EOF -#define HAVE_GETTIMEOFDAY 1 -EOF - - LIBS="$LIBS -lbsd" -fi - -fi - ;; -esac - -### Checks for header files. -echo "$as_me:16246: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 16252 "configure" -#include "confdefs.h" -#include -#include -#include -#include - -_ACEOF -if { (eval echo "$as_me:16260: \"$ac_cpp "conftest.$ac_ext"\"") >&5 - (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - $EGREP -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:16266: \$? = $ac_status" >&5 - (exit "$ac_status"); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 - cat "conftest.$ac_ext" >&5 - ac_cv_header_stdc=no -fi -rm -f conftest.err "conftest.$ac_ext" - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 16288 "configure" -#include "confdefs.h" -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 16306 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 16327 "configure" -#include "confdefs.h" -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +/* The GNU C library defines stubs for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#error found stub for gettimeofday #endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main (void) -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - $ac_main_return(2); - $ac_main_return (0); + return gettimeofday (); + ; + return 0; } _ACEOF -rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:16353: \"$ac_link\"") >&5 +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:16649: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16356: \$? = $ac_status" >&5 - (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:16358: \"$ac_try\"") >&5 + echo "$as_me:16652: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:16655: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16361: \$? = $ac_status" >&5 + echo "$as_me:16658: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - : + ac_cv_func_gettimeofday=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -ac_cv_header_stdc=no -fi -rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" -fi +ac_cv_func_gettimeofday=no fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:16374: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then +echo "$as_me:16668: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +if test "$ac_cv_func_gettimeofday" = yes; then cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 +#define HAVE_GETTIMEOFDAY 1 EOF -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +else -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:16390: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +echo "$as_me:16678: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >"conftest.$ac_ext" <<_ACEOF -#line 16396 "configure" + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >"conftest.$ac_ext" <<_ACEOF +#line 16686 "configure" #include "confdefs.h" -$ac_includes_default -#include <$ac_header> + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gettimeofday (void); +int +main (void) +{ +gettimeofday (); + ; + return 0; +} _ACEOF -rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16402: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:16705: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16405: \$? = $ac_status" >&5 + echo "$as_me:16708: \$? = $ac_status" >&5 (exit "$ac_status"); } && - { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16408: \"$ac_try\"") >&5 + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:16711: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16411: \$? = $ac_status" >&5 + echo "$as_me:16714: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - eval "$as_ac_Header=yes" + ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -eval "$as_ac_Header=no" +ac_cv_lib_bsd_gettimeofday=no fi -rm -f "conftest.$ac_objext" "conftest.$ac_ext" +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:16421: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 -echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 -if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then - cat >>confdefs.h <&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +if test "$ac_cv_lib_bsd_gettimeofday" = yes; then + +cat >>confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 EOF -fi +cf_add_libs="$LIBS" +# reverse order +cf_add_0lib= +for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done +# filter duplicates +for cf_add_1lib in $cf_add_0lib; do + for cf_add_2lib in $cf_add_libs; do + if test "x$cf_add_1lib" = "x$cf_add_2lib"; then + cf_add_1lib= + break + fi + done + test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done +LIBS="$cf_add_libs" + +fi + +fi +fi + + ;; +esac -echo "$as_me:16431: checking for signed char" >&5 +### Checks for header files. +echo "$as_me:16758: checking for signed char" >&5 echo $ECHO_N "checking for signed char... $ECHO_C" >&6 if test "${ac_cv_type_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 16437 "configure" +#line 16764 "configure" #include "confdefs.h" $ac_includes_default int @@ -16449,16 +16776,16 @@ if (sizeof (signed char)) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16452: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16779: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16455: \$? = $ac_status" >&5 + echo "$as_me:16782: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16458: \"$ac_try\"") >&5 + { (eval echo "$as_me:16785: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16461: \$? = $ac_status" >&5 + echo "$as_me:16788: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_type_signed_char=yes else @@ -16468,10 +16795,10 @@ ac_cv_type_signed_char=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:16471: result: $ac_cv_type_signed_char" >&5 +echo "$as_me:16798: result: $ac_cv_type_signed_char" >&5 echo "${ECHO_T}$ac_cv_type_signed_char" >&6 -echo "$as_me:16474: checking size of signed char" >&5 +echo "$as_me:16801: checking size of signed char" >&5 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6 if test "${ac_cv_sizeof_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16480,7 +16807,7 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >"conftest.$ac_ext" <<_ACEOF -#line 16483 "configure" +#line 16810 "configure" #include "confdefs.h" $ac_includes_default int @@ -16492,21 +16819,21 @@ int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16495: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16822: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16498: \$? = $ac_status" >&5 + echo "$as_me:16825: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16501: \"$ac_try\"") >&5 + { (eval echo "$as_me:16828: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16504: \$? = $ac_status" >&5 + echo "$as_me:16831: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=0 ac_mid=0 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 16509 "configure" +#line 16836 "configure" #include "confdefs.h" $ac_includes_default int @@ -16518,16 +16845,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16521: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16848: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16524: \$? = $ac_status" >&5 + echo "$as_me:16851: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16527: \"$ac_try\"") >&5 + { (eval echo "$as_me:16854: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16530: \$? = $ac_status" >&5 + echo "$as_me:16857: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid; break else @@ -16543,7 +16870,7 @@ cat "conftest.$ac_ext" >&5 ac_hi=-1 ac_mid=-1 while :; do cat >"conftest.$ac_ext" <<_ACEOF -#line 16546 "configure" +#line 16873 "configure" #include "confdefs.h" $ac_includes_default int @@ -16555,16 +16882,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16558: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16885: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16561: \$? = $ac_status" >&5 + echo "$as_me:16888: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16564: \"$ac_try\"") >&5 + { (eval echo "$as_me:16891: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16567: \$? = $ac_status" >&5 + echo "$as_me:16894: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_lo=$ac_mid; break else @@ -16580,7 +16907,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"` cat >"conftest.$ac_ext" <<_ACEOF -#line 16583 "configure" +#line 16910 "configure" #include "confdefs.h" $ac_includes_default int @@ -16592,16 +16919,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)] } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16595: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16922: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16598: \$? = $ac_status" >&5 + echo "$as_me:16925: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16601: \"$ac_try\"") >&5 + { (eval echo "$as_me:16928: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16604: \$? = $ac_status" >&5 + echo "$as_me:16931: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_hi=$ac_mid else @@ -16614,12 +16941,12 @@ done ac_cv_sizeof_signed_char=$ac_lo else if test "$cross_compiling" = yes; then - { { echo "$as_me:16617: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:16944: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >"conftest.$ac_ext" <<_ACEOF -#line 16622 "configure" +#line 16949 "configure" #include "confdefs.h" $ac_includes_default int @@ -16635,15 +16962,15 @@ fclose (f); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:16638: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16965: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16641: \$? = $ac_status" >&5 + echo "$as_me:16968: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:16643: \"$ac_try\"") >&5 + { (eval echo "$as_me:16970: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16646: \$? = $ac_status" >&5 + echo "$as_me:16973: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_sizeof_signed_char=`cat conftest.val` else @@ -16659,160 +16986,22 @@ else ac_cv_sizeof_signed_char=0 fi fi -echo "$as_me:16662: result: $ac_cv_sizeof_signed_char" >&5 +echo "$as_me:16989: result: $ac_cv_sizeof_signed_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6 cat >>confdefs.h <&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 16674 "configure" -#include "confdefs.h" -#include -#include -#include -#include - -_ACEOF -if { (eval echo "$as_me:16682: \"$ac_cpp "conftest.$ac_ext"\"") >&5 - (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - $EGREP -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:16688: \$? = $ac_status" >&5 - (exit "$ac_status"); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 - cat "conftest.$ac_ext" >&5 - ac_cv_header_stdc=no -fi -rm -f conftest.err "conftest.$ac_ext" - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 16710 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 16728 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 16749 "configure" -#include "confdefs.h" -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main (void) -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - $ac_main_return(2); - $ac_main_return (0); -} -_ACEOF -rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:16775: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:16778: \$? = $ac_status" >&5 - (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:16780: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:16783: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -ac_cv_header_stdc=no -fi -rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" -fi -fi -fi -echo "$as_me:16796: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -echo "$as_me:16809: checking for $ac_hdr that defines DIR" >&5 +echo "$as_me:16998: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 16815 "configure" +#line 17004 "configure" #include "confdefs.h" #include #include <$ac_hdr> @@ -16827,16 +17016,16 @@ return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16830: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17019: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16833: \$? = $ac_status" >&5 + echo "$as_me:17022: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16836: \"$ac_try\"") >&5 + { (eval echo "$as_me:17025: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16839: \$? = $ac_status" >&5 + echo "$as_me:17028: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Header=yes" else @@ -16846,7 +17035,7 @@ eval "$as_ac_Header=no" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:16849: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:17038: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 + echo "$as_me:17051: checking for opendir in -ldir" >&5 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 if test "${ac_cv_lib_dir_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16867,7 +17056,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldir $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 16870 "configure" +#line 17059 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -16876,7 +17065,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char opendir (); +char opendir (void); int main (void) { @@ -16886,16 +17075,16 @@ opendir (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16889: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17078: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16892: \$? = $ac_status" >&5 + echo "$as_me:17081: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16895: \"$ac_try\"") >&5 + { (eval echo "$as_me:17084: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16898: \$? = $ac_status" >&5 + echo "$as_me:17087: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dir_opendir=yes else @@ -16906,14 +17095,14 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:16909: result: $ac_cv_lib_dir_opendir" >&5 +echo "$as_me:17098: result: $ac_cv_lib_dir_opendir" >&5 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 if test "$ac_cv_lib_dir_opendir" = yes; then LIBS="$LIBS -ldir" fi else - echo "$as_me:16916: checking for opendir in -lx" >&5 + echo "$as_me:17105: checking for opendir in -lx" >&5 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 if test "${ac_cv_lib_x_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16921,7 +17110,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lx $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 16924 "configure" +#line 17113 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -16930,7 +17119,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char opendir (); +char opendir (void); int main (void) { @@ -16940,16 +17129,16 @@ opendir (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16943: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17132: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16946: \$? = $ac_status" >&5 + echo "$as_me:17135: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16949: \"$ac_try\"") >&5 + { (eval echo "$as_me:17138: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16952: \$? = $ac_status" >&5 + echo "$as_me:17141: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_x_opendir=yes else @@ -16960,7 +17149,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:16963: result: $ac_cv_lib_x_opendir" >&5 +echo "$as_me:17152: result: $ac_cv_lib_x_opendir" >&5 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 if test "$ac_cv_lib_x_opendir" = yes; then LIBS="$LIBS -lx" @@ -16968,13 +17157,13 @@ fi fi -echo "$as_me:16971: checking whether time.h and sys/time.h may both be included" >&5 +echo "$as_me:17160: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 16977 "configure" +#line 17166 "configure" #include "confdefs.h" #include #include @@ -16990,16 +17179,16 @@ return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:16993: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17182: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:16996: \$? = $ac_status" >&5 + echo "$as_me:17185: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:16999: \"$ac_try\"") >&5 + { (eval echo "$as_me:17188: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17002: \$? = $ac_status" >&5 + echo "$as_me:17191: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_header_time=yes else @@ -17009,7 +17198,7 @@ ac_cv_header_time=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:17012: result: $ac_cv_header_time" >&5 +echo "$as_me:17201: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then @@ -17027,13 +17216,13 @@ ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ex ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" -echo "$as_me:17030: checking for an ANSI C-conforming const" >&5 +echo "$as_me:17219: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17036 "configure" +#line 17225 "configure" #include "confdefs.h" int @@ -17043,13 +17232,13 @@ main (void) #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; - const charset x; + const charset x; (void)x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; - static struct point const zero = {0,0}; + static struct point const zero = {0,0}; (void)zero; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant @@ -17065,16 +17254,19 @@ main (void) char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; + (void)s; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; + (void)foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; + (void)p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ @@ -17083,6 +17275,7 @@ main (void) } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; + (void)foo; } #endif @@ -17091,16 +17284,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:17094: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17287: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:17097: \$? = $ac_status" >&5 + echo "$as_me:17290: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:17100: \"$ac_try\"") >&5 + { (eval echo "$as_me:17293: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17103: \$? = $ac_status" >&5 + echo "$as_me:17296: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_c_const=yes else @@ -17110,7 +17303,7 @@ ac_cv_c_const=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:17113: result: $ac_cv_c_const" >&5 +echo "$as_me:17306: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then @@ -17122,7 +17315,7 @@ fi ### Checks for external-data -echo "$as_me:17125: checking if data-only library module links" >&5 +echo "$as_me:17318: checking if data-only library module links" >&5 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6 if test "${cf_cv_link_dataonly+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17130,36 +17323,40 @@ else rm -f conftest.a cat >conftest.$ac_ext <&5 + if { (eval echo "$as_me:17329: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:17139: \$? = $ac_status" >&5 + echo "$as_me:17332: \$? = $ac_status" >&5 (exit "$ac_status"); } ; then mv conftest.o data.o && \ ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null fi rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <&5 + if { (eval echo "$as_me:17356: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:17162: \$? = $ac_status" >&5 + echo "$as_me:17359: \$? = $ac_status" >&5 (exit "$ac_status"); }; then mv conftest.o func.o && \ ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null @@ -17172,26 +17369,26 @@ EOF cf_cv_link_dataonly=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 17175 "configure" +#line 17372 "configure" #include "confdefs.h" + extern int testfunc(void); int main(void) { - extern int testfunc(); ${cf_cv_main_return:-return} (!testfunc()); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:17186: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17383: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17189: \$? = $ac_status" >&5 + echo "$as_me:17386: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:17191: \"$ac_try\"") >&5 + { (eval echo "$as_me:17388: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17194: \$? = $ac_status" >&5 + echo "$as_me:17391: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_link_dataonly=yes else @@ -17206,7 +17403,7 @@ fi fi -echo "$as_me:17209: result: $cf_cv_link_dataonly" >&5 +echo "$as_me:17406: result: $cf_cv_link_dataonly" >&5 echo "${ECHO_T}$cf_cv_link_dataonly" >&6 if test "$cf_cv_link_dataonly" = no ; then @@ -17225,23 +17422,23 @@ unistd.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:17228: checking for $ac_header" >&5 +echo "$as_me:17425: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17234 "configure" +#line 17431 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:17238: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:17435: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:17244: \$? = $ac_status" >&5 + echo "$as_me:17441: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -17260,7 +17457,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:17263: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:17460: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:17470: checking for working mkstemp" >&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 if test "${cf_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17281,20 +17478,14 @@ if test "$cross_compiling" = yes; then cf_cv_func_mkstemp=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 17284 "configure" +#line 17481 "configure" #include "confdefs.h" -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include -#include +$ac_includes_default + int main(void) { - char *tmpl = "conftestXXXXXX"; + static char tmpl[] = "conftestXXXXXX"; char name[2][80]; int n; int result = 0; @@ -17322,15 +17513,15 @@ int main(void) _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:17325: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17516: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17328: \$? = $ac_status" >&5 + echo "$as_me:17519: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:17330: \"$ac_try\"") >&5 + { (eval echo "$as_me:17521: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17333: \$? = $ac_status" >&5 + echo "$as_me:17524: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_mkstemp=yes @@ -17345,16 +17536,16 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi fi -echo "$as_me:17348: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:17539: result: $cf_cv_func_mkstemp" >&5 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 if test "x$cf_cv_func_mkstemp" = xmaybe ; then - echo "$as_me:17351: checking for mkstemp" >&5 + echo "$as_me:17542: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 if test "${ac_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17357 "configure" +#line 17548 "configure" #include "confdefs.h" #define mkstemp autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -17385,16 +17576,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17388: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17579: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17391: \$? = $ac_status" >&5 + echo "$as_me:17582: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17394: \"$ac_try\"") >&5 + { (eval echo "$as_me:17585: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17397: \$? = $ac_status" >&5 + echo "$as_me:17588: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_mkstemp=yes else @@ -17404,7 +17595,7 @@ ac_cv_func_mkstemp=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:17407: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:17598: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 fi @@ -17433,7 +17624,7 @@ cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./- unset cf_TEMP_gnat # Extract the first word of "$cf_prog_gnat", so it can be a program name with args. set dummy $cf_prog_gnat; ac_word=$2 -echo "$as_me:17436: checking for $ac_word" >&5 +echo "$as_me:17627: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17450,7 +17641,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word" - echo "$as_me:17453: found $ac_dir/$ac_word" >&5 + echo "$as_me:17644: found $ac_dir/$ac_word" >&5 break fi done @@ -17462,10 +17653,10 @@ fi cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat if test -n "$cf_TEMP_gnat"; then - echo "$as_me:17465: result: $cf_TEMP_gnat" >&5 + echo "$as_me:17656: result: $cf_TEMP_gnat" >&5 echo "${ECHO_T}$cf_TEMP_gnat" >&6 else - echo "$as_me:17468: result: no" >&5 + echo "$as_me:17659: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -17475,7 +17666,7 @@ fi unset cf_cv_gnat_version unset cf_TEMP_gnat -echo "$as_me:17478: checking for $cf_prog_gnat version" >&5 +echo "$as_me:17669: checking for $cf_prog_gnat version" >&5 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6 if test "${cf_cv_gnat_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17486,7 +17677,7 @@ cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` fi -echo "$as_me:17489: result: $cf_cv_gnat_version" >&5 +echo "$as_me:17680: result: $cf_cv_gnat_version" >&5 echo "${ECHO_T}$cf_cv_gnat_version" >&6 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version @@ -17515,7 +17706,7 @@ else cd conftest.src for cf_gprconfig in Ada C do - echo "$as_me:17518: checking for gprconfig name for $cf_gprconfig" >&5 + echo "$as_me:17709: checking for gprconfig name for $cf_gprconfig" >&5 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6 if test "$cf_gprconfig" = C then @@ -17534,10 +17725,10 @@ echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6 if test -n "$cf_gprconfig_value" then eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value" - echo "$as_me:17537: result: $cf_gprconfig_value" >&5 + echo "$as_me:17728: result: $cf_gprconfig_value" >&5 echo "${ECHO_T}$cf_gprconfig_value" >&6 else - echo "$as_me:17540: result: missing" >&5 + echo "$as_me:17731: result: missing" >&5 echo "${ECHO_T}missing" >&6 cf_ada_config="#" break @@ -17550,7 +17741,7 @@ echo "${ECHO_T}missing" >&6 if test "x$cf_ada_config" != "x#" then -echo "$as_me:17553: checking for gnat version" >&5 +echo "$as_me:17744: checking for gnat version" >&5 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6 if test "${cf_cv_gnat_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17561,7 +17752,7 @@ cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` fi -echo "$as_me:17564: result: $cf_cv_gnat_version" >&5 +echo "$as_me:17755: result: $cf_cv_gnat_version" >&5 echo "${ECHO_T}$cf_cv_gnat_version" >&6 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no @@ -17570,7 +17761,7 @@ case "$cf_cv_gnat_version" in cf_cv_prog_gnat_correct=yes ;; (*) - { echo "$as_me:17573: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 + { echo "$as_me:17764: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;} cf_cv_prog_gnat_correct=no ;; @@ -17578,7 +17769,7 @@ esac # Extract the first word of "m4", so it can be a program name with args. set dummy m4; ac_word=$2 -echo "$as_me:17581: checking for $ac_word" >&5 +echo "$as_me:17772: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_M4_exists+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17593,7 +17784,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_M4_exists="yes" -echo "$as_me:17596: found $ac_dir/$ac_word" >&5 +echo "$as_me:17787: found $ac_dir/$ac_word" >&5 break done @@ -17602,20 +17793,20 @@ fi fi M4_exists=$ac_cv_prog_M4_exists if test -n "$M4_exists"; then - echo "$as_me:17605: result: $M4_exists" >&5 + echo "$as_me:17796: result: $M4_exists" >&5 echo "${ECHO_T}$M4_exists" >&6 else - echo "$as_me:17608: result: no" >&5 + echo "$as_me:17799: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$ac_cv_prog_M4_exists" = no; then cf_cv_prog_gnat_correct=no - { echo "$as_me:17614: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5 + { echo "$as_me:17805: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;} fi if test "$cf_cv_prog_gnat_correct" = yes; then - echo "$as_me:17618: checking if GNAT works" >&5 + echo "$as_me:17809: checking if GNAT works" >&5 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 rm -rf ./conftest* ./*~conftest* @@ -17643,7 +17834,7 @@ else fi rm -rf ./conftest* ./*~conftest* - echo "$as_me:17646: result: $cf_cv_prog_gnat_correct" >&5 + echo "$as_me:17837: result: $cf_cv_prog_gnat_correct" >&5 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6 fi else @@ -17653,7 +17844,7 @@ fi if test "$cf_cv_prog_gnat_correct" = yes; then - echo "$as_me:17656: checking optimization options for ADAFLAGS" >&5 + echo "$as_me:17847: checking optimization options for ADAFLAGS" >&5 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6 case "$CFLAGS" in (*-g*) @@ -17670,10 +17861,10 @@ echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6 ;; esac - echo "$as_me:17673: result: $ADAFLAGS" >&5 + echo "$as_me:17864: result: $ADAFLAGS" >&5 echo "${ECHO_T}$ADAFLAGS" >&6 -echo "$as_me:17676: checking if GNATPREP supports -T option" >&5 +echo "$as_me:17867: checking if GNATPREP supports -T option" >&5 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6 if test "${cf_cv_gnatprep_opt_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17683,11 +17874,11 @@ cf_cv_gnatprep_opt_t=no gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes fi -echo "$as_me:17686: result: $cf_cv_gnatprep_opt_t" >&5 +echo "$as_me:17877: result: $cf_cv_gnatprep_opt_t" >&5 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS" -echo "$as_me:17690: checking if GNAT supports generics" >&5 +echo "$as_me:17881: checking if GNAT supports generics" >&5 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6 case "$cf_cv_gnat_version" in (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9]) @@ -17697,7 +17888,7 @@ case "$cf_cv_gnat_version" in cf_gnat_generics=no ;; esac -echo "$as_me:17700: result: $cf_gnat_generics" >&5 +echo "$as_me:17891: result: $cf_gnat_generics" >&5 echo "${ECHO_T}$cf_gnat_generics" >&6 if test "$cf_gnat_generics" = yes @@ -17709,7 +17900,7 @@ else cf_generic_objects= fi -echo "$as_me:17712: checking if GNAT supports SIGINT" >&5 +echo "$as_me:17903: checking if GNAT supports SIGINT" >&5 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6 if test "${cf_cv_gnat_sigint+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17757,7 +17948,7 @@ fi rm -rf ./conftest* ./*~conftest* fi -echo "$as_me:17760: result: $cf_cv_gnat_sigint" >&5 +echo "$as_me:17951: result: $cf_cv_gnat_sigint" >&5 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6 if test "$cf_cv_gnat_sigint" = yes ; then @@ -17770,7 +17961,7 @@ cf_gnat_libraries=no cf_gnat_projects=no if test "$enable_gnat_projects" != no ; then -echo "$as_me:17773: checking if GNAT supports project files" >&5 +echo "$as_me:17964: checking if GNAT supports project files" >&5 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6 case "$cf_cv_gnat_version" in (3.[0-9]*) @@ -17833,15 +18024,15 @@ CF_EOF esac ;; esac -echo "$as_me:17836: result: $cf_gnat_projects" >&5 +echo "$as_me:18027: result: $cf_gnat_projects" >&5 echo "${ECHO_T}$cf_gnat_projects" >&6 fi # enable_gnat_projects if test "$cf_gnat_projects" = yes then - echo "$as_me:17842: checking if GNAT supports libraries" >&5 + echo "$as_me:18033: checking if GNAT supports libraries" >&5 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6 - echo "$as_me:17844: result: $cf_gnat_libraries" >&5 + echo "$as_me:18035: result: $cf_gnat_libraries" >&5 echo "${ECHO_T}$cf_gnat_libraries" >&6 fi @@ -17861,7 +18052,7 @@ then then USE_GNAT_MAKE_GPR="" else - { echo "$as_me:17864: WARNING: use old makefile rules since tools are missing" >&5 + { echo "$as_me:18055: WARNING: use old makefile rules since tools are missing" >&5 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;} fi fi @@ -17873,8 +18064,8 @@ else USE_GNAT_LIBRARIES="#" fi -echo "$as_me:17876: checking for ada-compiler" >&5 -echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6 +echo "$as_me:18067: checking for Ada95 compiler" >&5 +echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6 # Check whether --with-ada-compiler or --without-ada-compiler was given. if test "${with_ada_compiler+set}" = set; then @@ -17884,13 +18075,13 @@ else cf_ada_compiler=gnatmake fi; -echo "$as_me:17887: result: $cf_ada_compiler" >&5 +echo "$as_me:18078: result: $cf_ada_compiler" >&5 echo "${ECHO_T}$cf_ada_compiler" >&6 cf_ada_package=terminal_interface -echo "$as_me:17892: checking for ada-include" >&5 -echo $ECHO_N "checking for ada-include... $ECHO_C" >&6 +echo "$as_me:18083: checking for Ada95 include directory" >&5 +echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6 # Check whether --with-ada-include or --without-ada-include was given. if test "${with_ada_include+set}" = set; then @@ -17925,7 +18116,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:17928: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:18119: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -17934,11 +18125,11 @@ esac fi eval ADA_INCLUDE="$withval" -echo "$as_me:17937: result: $ADA_INCLUDE" >&5 +echo "$as_me:18128: result: $ADA_INCLUDE" >&5 echo "${ECHO_T}$ADA_INCLUDE" >&6 -echo "$as_me:17940: checking for ada-objects" >&5 -echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6 +echo "$as_me:18131: checking for Ada95 object directory" >&5 +echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6 # Check whether --with-ada-objects or --without-ada-objects was given. if test "${with_ada_objects+set}" = set; then @@ -17973,7 +18164,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:17976: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:18167: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -17982,11 +18173,11 @@ esac fi eval ADA_OBJECTS="$withval" -echo "$as_me:17985: result: $ADA_OBJECTS" >&5 +echo "$as_me:18176: result: $ADA_OBJECTS" >&5 echo "${ECHO_T}$ADA_OBJECTS" >&6 -echo "$as_me:17988: checking if an Ada95 shared-library should be built" >&5 -echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6 +echo "$as_me:18179: checking whether to build an Ada95 shared library" >&5 +echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given. if test "${with_ada_sharedlib+set}" = set; then @@ -17995,19 +18186,25 @@ if test "${with_ada_sharedlib+set}" = set; then else with_ada_sharedlib=no fi; -echo "$as_me:17998: result: $with_ada_sharedlib" >&5 -echo "${ECHO_T}$with_ada_sharedlib" >&6 +cf_ada_sharedlib_warn=no if test "x$with_ada_sharedlib" != xno then if test "x$cf_gnat_projects" != xyes then - { echo "$as_me:18005: WARNING: disabling shared-library since GNAT projects are not supported" >&5 -echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;} with_ada_sharedlib=no + cf_ada_sharedlib_warn=yes fi fi +echo "$as_me:18200: result: $with_ada_sharedlib" >&5 +echo "${ECHO_T}$with_ada_sharedlib" >&6 +if test "x$cf_ada_sharedlib_warn" != xno +then + { echo "$as_me:18204: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5 +echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;} +fi + ADA_SHAREDLIB='lib$(LIB_NAME).so.1' MAKE_ADA_SHAREDLIB="#" @@ -18022,8 +18219,8 @@ fi # allow the Ada binding to be renamed -echo "$as_me:18025: checking for ada-libname" >&5 -echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6 +echo "$as_me:18222: checking for Ada95 curses library name" >&5 +echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6 # Check whether --with-ada-libname or --without-ada-libname was given. if test "${with_ada_libname+set}" = set; then @@ -18038,16 +18235,16 @@ case "x$ADA_LIBNAME" in ;; esac -echo "$as_me:18041: result: $ADA_LIBNAME" >&5 +echo "$as_me:18238: result: $ADA_LIBNAME" >&5 echo "${ECHO_T}$ADA_LIBNAME" >&6 else - { { echo "$as_me:18045: error: No usable Ada compiler found" >&5 + { { echo "$as_me:18242: error: No usable Ada compiler found" >&5 echo "$as_me: error: No usable Ada compiler found" >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:18050: error: The Ada compiler is needed for this package" >&5 + { { echo "$as_me:18247: error: The Ada compiler is needed for this package" >&5 echo "$as_me: error: The Ada compiler is needed for this package" >&2;} { (exit 1); exit 1; }; } fi @@ -18087,7 +18284,7 @@ elif test "$includedir" != "/usr/include"; then fi ### Build up pieces for makefile rules -echo "$as_me:18090: checking default library suffix" >&5 +echo "$as_me:18287: checking default library suffix" >&5 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -18098,10 +18295,10 @@ echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 (shared) DFT_ARG_SUFFIX='' ;; esac test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" -echo "$as_me:18101: result: $DFT_ARG_SUFFIX" >&5 +echo "$as_me:18298: result: $DFT_ARG_SUFFIX" >&5 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 -echo "$as_me:18104: checking default library-dependency suffix" >&5 +echo "$as_me:18301: checking default library-dependency suffix" >&5 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 case X$DFT_LWR_MODEL in @@ -18184,10 +18381,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}" DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}" fi -echo "$as_me:18187: result: $DFT_DEP_SUFFIX" >&5 +echo "$as_me:18384: result: $DFT_DEP_SUFFIX" >&5 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 -echo "$as_me:18190: checking default object directory" >&5 +echo "$as_me:18387: checking default object directory" >&5 echo $ECHO_N "checking default object directory... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -18203,7 +18400,7 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6 DFT_OBJ_SUBDIR='obj_s' ;; esac esac -echo "$as_me:18206: result: $DFT_OBJ_SUBDIR" >&5 +echo "$as_me:18403: result: $DFT_OBJ_SUBDIR" >&5 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6 ### Set up low-level terminfo dependencies for makefiles. @@ -18276,7 +18473,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -18345,7 +18542,7 @@ DEFS=-DHAVE_CONFIG_H : "${CONFIG_STATUS=./config.status}" ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:18348: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:18545: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >"$CONFIG_STATUS" <<_ACEOF #! $SHELL @@ -18354,6 +18551,8 @@ cat >"$CONFIG_STATUS" <<_ACEOF # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. +me=\`echo "\$0" | sed -e 's,.*\\/,,'\` + debug=false SHELL=\${CONFIG_SHELL-$SHELL} ac_cs_invocation="\$0 \$@" @@ -18375,9 +18574,9 @@ fi as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr + as_expr="expr" else - as_expr=false + as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file @@ -18392,7 +18591,7 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + as_ln_s='ln' else as_ln_s='cp -p' fi @@ -18479,10 +18678,10 @@ EOF cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:18527: error: ambiguous option: $1 + { { echo "$as_me:18726: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -18543,7 +18742,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:18546: error: unrecognized option: $1 + -*) { { echo "$as_me:18745: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -18562,7 +18761,7 @@ cat >&5 << _ACEOF ## Running config.status. ## ## ----------------------- ## -This file was extended by $as_me 2.52.20210509, executed with +This file was extended by $as_me 2.52.20231210, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -18591,6 +18790,7 @@ LN_S="$LN_S" NCURSES_MAJOR="$NCURSES_MAJOR" NCURSES_MINOR="$NCURSES_MINOR" NCURSES_PATCH="$NCURSES_PATCH" +PACKAGE="$PACKAGE" USE_OLD_MAKERULES="$USE_OLD_MAKERULES" cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD @@ -18617,7 +18817,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:18620: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:18820: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -18641,14 +18841,14 @@ $debug || } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} +: "${TMPDIR=/tmp}" { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/cs$$-$RANDOM - (umask 077 && mkdir $tmp) + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 @@ -18668,7 +18868,7 @@ cat >>"$CONFIG_STATUS" <\$tmp/subs.sed <<\\CEOF + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t @@ -18701,6 +18901,7 @@ s,@ECHO_T@,$ECHO_T,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t +s,@PACKAGE@,$PACKAGE,;t t s,@top_builddir@,$top_builddir,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t @@ -18860,11 +19061,11 @@ EOF ac_sed_cmds= while "$ac_more_lines"; do if test "$ac_beg" -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag fi - if test ! -s $tmp/subs.frag; then + if test ! -s "$tmp"/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to @@ -18872,17 +19073,17 @@ EOF # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed # It is possible to make a multiline substitution using escaped newlines. # Ensure that we do not split the substitution between script fragments. ac_BEG=$ac_end ac_END=`expr "$ac_end" + "$ac_max_sed_lines"` - sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next - if test -s $tmp/subs.next; then - grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit - if test ! -s $tmp/subs.edit; then - grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit - if test ! -s $tmp/subs.edit; then + sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next + if test -s "$tmp"/subs.next; then + grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit + if test ! -s "$tmp"/subs.edit; then + grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit + if test ! -s "$tmp"/subs.edit; then if test "$ac_beg" -gt 1; then ac_end=`expr "$ac_end" - 1` continue @@ -18892,9 +19093,9 @@ EOF fi if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr "$ac_sed_frag" + 1` ac_beg=$ac_end @@ -18902,7 +19103,7 @@ EOF fi done if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + ac_sed_cmds="cat" fi fi # test -n "$CONFIG_FILES" @@ -18912,7 +19113,7 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin + cat >"$tmp"/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` @@ -18949,7 +19150,7 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" + ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else @@ -18977,7 +19178,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:18980: creating $ac_file" >&5 + { echo "$as_me:19181: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -18992,23 +19193,23 @@ echo "$as_me: creating $ac_file" >&6;} ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:18998: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:19199: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative if test -f "$f"; then # Build tree - echo $f + echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree - { { echo "$as_me:19011: error: cannot find input file: $f" >&5 + { { echo "$as_me:19212: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -19024,7 +19225,7 @@ cat >>"$CONFIG_STATUS" <<\EOF if test -n "$ac_seen"; then ac_used=`grep '@datarootdir@' "$ac_item"` if test -z "$ac_used"; then - { echo "$as_me:19027: WARNING: datarootdir was used implicitly but not set: + { echo "$as_me:19228: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&2;} @@ -19033,7 +19234,7 @@ $ac_seen" >&2;} fi ac_seen=`grep '${datarootdir}' "$ac_item"` if test -n "$ac_seen"; then - { echo "$as_me:19036: WARNING: datarootdir was used explicitly but not set: + { echo "$as_me:19237: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&2;} @@ -19058,38 +19259,46 @@ s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin +" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out + rm -f "$tmp"/stdin +EOF +test -n "${FGREP}" || FGREP="grep -F" +test -n "${EGREP}" || EGREP="grep -E" +cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF if test x"$ac_file" != x-; then cp "$tmp/out" "$ac_file" for ac_name in prefix exec_prefix datarootdir do - ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"` + ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"` if test -n "$ac_seen"; then - ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"` + ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"` if test -z "$ac_init"; then - ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'` - { echo "$as_me:19073: WARNING: Variable $ac_name is used but was not set: + ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'` + { echo "$as_me:19282: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&5 echo "$as_me: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&2;} fi fi done - ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out - ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out - if test -s $tmp/out; then - ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out` - { echo "$as_me:19084: WARNING: Some variables may not be substituted: + $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out + $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out + if test -s "$tmp"/out; then + ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out` + { echo "$as_me:19293: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} fi else - cat $tmp/out + cat "$tmp"/out fi - rm -f $tmp/out + rm -f "$tmp"/out done EOF @@ -19122,7 +19331,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin + cat >"$tmp"/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` @@ -19130,7 +19339,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:19133: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:19342: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -19138,10 +19347,10 @@ echo "$as_me: creating $ac_file" >&6;} ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:19144: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:19353: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -19154,14 +19363,14 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo "$srcdir/$f" else # /dev/null tree - { { echo "$as_me:19157: error: cannot find input file: $f" >&5 + { { echo "$as_me:19366: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in EOF @@ -19193,9 +19402,9 @@ echo ' cat >> conftest.edit < $tmp/out -rm -f $tmp/in -mv $tmp/out $tmp/in +sed -f conftest.edit "$tmp"/in > "$tmp"/out +rm -f "$tmp"/in +mv "$tmp"/out "$tmp"/in rm -f conftest.edit conftest.frag ' >> "$CONFIG_STATUS" @@ -19204,15 +19413,15 @@ cat >>"$CONFIG_STATUS" <<\EOF # use $as_me), people would be surprised to read: # /* config.h. Generated automatically by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated automatically by configure. */" >"$tmp"/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + cat "$tmp"/in >>"$tmp"/config.h + rm -f "$tmp"/in if test x"$ac_file" != x-; then if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then - { echo "$as_me:19215: $ac_file is unchanged" >&5 + { echo "$as_me:19424: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -19248,8 +19457,8 @@ done; } mv "$tmp/config.h" "$ac_file" fi else - cat $tmp/config.h - rm -f $tmp/config.h + cat "$tmp"/config.h + rm -f "$tmp"/config.h fi done EOF @@ -19263,6 +19472,7 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue case "$ac_dest" in default ) +$AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk > Makefile if test -z "$USE_OLD_MAKERULES" ; then $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile fi diff --git a/Ada95/configure.in b/Ada95/configure.in index a69c1833..3384df24 100644 --- a/Ada95/configure.in +++ b/Ada95/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2022,2023 Thomas E. Dickey * dnl Copyright 2010-2016,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: configure.in,v 1.84 2021/10/30 20:47:52 tom Exp $ +dnl $Id: configure.in,v 1.91 2023/02/18 23:21:29 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl For additional information, see @@ -38,12 +38,14 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.52.20210509) -AC_REVISION($Revision: 1.84 $) +AC_REVISION($Revision: 1.91 $) AC_INIT(gen/gen.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) AC_DEFUN([AC_PATH_XTRA],[])dnl ignore dependencies on this +PACKAGE="AdaCurses" AC_SUBST(PACKAGE) + CF_TOP_BUILDDIR CF_HELP_MESSAGE(General Options:) @@ -220,6 +222,7 @@ CF_ENABLE_BROKEN_LINKER # Check to define _XOPEN_SOURCE "automatically" CF_XOPEN_SOURCE(600) +AC_CHECK_DECL(exit) CF_LARGEFILE @@ -356,7 +359,7 @@ CF_DISABLE_ECHO CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes) if test "x$enable_warnings" = "xyes"; then - CF_ADD_ADAFLAGS(-gnatg) + CF_ADD_ADAFLAGS(-gnatwa -gnatyg) fi ### use option --enable-assertions to turn on generation of assertion code @@ -422,18 +425,12 @@ case $cf_cv_system_name in CF_CHECK_LIBSSP ;; (*) -AC_CHECK_FUNC(gettimeofday, - AC_DEFINE(HAVE_GETTIMEOFDAY),[ - -AC_CHECK_LIB(bsd, gettimeofday, - AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday]) - LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday + CF_FUNC_GETTIME ;; esac ### Checks for header files. AC_CHECK_SIZEOF([signed char]) -AC_STDC_HEADERS AC_HEADER_DIRENT AC_HEADER_TIME @@ -588,6 +585,7 @@ AC_OUTPUT( \ src/library.gpr:src/library.gpr.in \ doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in \ Makefile,[ +$AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk > Makefile if test -z "$USE_OLD_MAKERULES" ; then $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile fi @@ -605,6 +603,7 @@ LN_S="$LN_S" NCURSES_MAJOR="$NCURSES_MAJOR" NCURSES_MINOR="$NCURSES_MINOR" NCURSES_PATCH="$NCURSES_PATCH" +PACKAGE="$PACKAGE" USE_OLD_MAKERULES="$USE_OLD_MAKERULES" cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in index c263581c..525ce998 100644 --- a/Ada95/gen/Makefile.in +++ b/Ada95/gen/Makefile.in @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2021,2022 Thomas E. Dickey # +# Copyright 2019-2022,2024 Thomas E. Dickey # # Copyright 1998-2015,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -30,7 +30,7 @@ # Author: Juergen Pfeifer, 1996 # and: Thomas E. Dickey, 1997 # -# $Id: Makefile.in,v 1.100 2022/01/15 18:20:17 tom Exp $ +# $Id: Makefile.in,v 1.103 2024/01/19 16:51:56 tom Exp $ # .SUFFIXES: @@ -103,7 +103,7 @@ PROG_GENERATE = ./generate$x GENERATE = $(PROG_GENERATE) '@USE_ARG_SUFFIX@' DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d' -GNATHTML = `type -p gnathtml || type -p gnathtml.pl 2>/dev/null` +GNATHTML = `command -v gnathtml || command -v gnathtml.pl` ################################################################################ ALIB = @cf_ada_package@ @@ -183,7 +183,8 @@ $(ADA_SRCDIR)/$(ABASE)_constants.ads: $(PROG_GENERATE) $(WRAPPER) "$(GENERATE) $@" ################################################################################ $(ADA_SRCDIR)/$(ABASE).ads: $(srcdir)/$(ABASE).ads.m4 \ - $(srcdir)/normal.m4 + $(srcdir)/normal.m4 \ + options.m4 $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \ $(srcdir)/$(ABASE).ads.m4 |\ $(DEL_ADAMODE) >$@ @@ -284,6 +285,7 @@ mostlyclean :: -rm -f a.out core $(PROG_GENERATE) *.o clean :: mostlyclean + -rm -f options.m4 -rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp distclean :: clean @@ -294,6 +296,15 @@ realclean :: distclean HTML_DIR = @ADAHTML_DIR@ +options.m4 : + $(SHELL) -c "if [ @cf_cv_enable_sigwinch@ = 0 ]; \ + then \ + dashes=' --'; \ + else \ + dashes='';\ + fi; \ + echo \"define(OPT_KEY_RESIZE,\\\`\$$dashes')dnl\" > $@" + instab.tmp : table.m4 $(GEN_SRC) @rm -f $@ @for f in $(GEN_SRC) ; do \ diff --git a/Ada95/gen/adacurses-config.in b/Ada95/gen/adacurses-config.in index 2b055dc5..a5394170 100644 --- a/Ada95/gen/adacurses-config.in +++ b/Ada95/gen/adacurses-config.in @@ -1,7 +1,7 @@ #! /bin/sh -# $Id: adacurses-config.in,v 1.14 2020/02/02 23:34:34 tom Exp $ +# $Id: adacurses-config.in,v 1.15 2022/07/16 21:16:43 tom Exp $ ############################################################################## -# Copyright 2019,2020 Thomas E. Dickey # +# Copyright 2019-2020,2022 Thomas E. Dickey # # Copyright 2007-2014,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -45,17 +45,17 @@ CFLAGS="-aI$ADA_INCLUDE -aO$ADA_OBJECTS" LIBS="-L$ADA_OBJECTS -l@ADA_LIBNAME@" THIS="@ADA_LIBNAME@" -THIS_CFG="$THIS@DFT_ARG_SUFFIX@-config" +THIS_CFG="${THIS}@DFT_ARG_SUFFIX@-config" case "x$1" in x--version) echo @ADA_LIBNAME@ $VERSION ;; x--cflags) - echo $CFLAGS + echo "$CFLAGS" ;; x--libs) - echo $LIBS + echo "$LIBS" ;; x) # if no parameter is given, give what gnatmake needs @@ -77,7 +77,7 @@ If no options are given, echos the full set of flags needed by gnatmake. ENDHELP ;; *) - echo 'Usage: $THIS_CFG [--version | --cflags | --libs]' >&2 + echo "Usage: ${THIS_CFG} [--version | --cflags | --libs]" >&2 exit 1 ;; esac diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c index d92fa68e..b37de1b0 100644 --- a/Ada95/gen/gen.c +++ b/Ada95/gen/gen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2024 Thomas E. Dickey * * Copyright 1998-2014,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ /* Version Control - $Id: gen.c,v 1.78 2021/12/11 21:03:21 tom Exp $ + $Id: gen.c,v 1.79 2024/01/19 13:41:45 tom Exp $ --------------------------------------------------------------------------*/ /* This program prints on its standard output the source for the @@ -424,7 +424,9 @@ main(int argc, const char *argv[]) PRINT_NAMED_CONSTANT(KEY_SUSPEND); PRINT_NAMED_CONSTANT(KEY_UNDO); PRINT_NAMED_CONSTANT(KEY_MOUSE); +#ifdef KEY_RESIZE PRINT_NAMED_CONSTANT(KEY_RESIZE); +#endif print_comment(fp, "alternate character codes (ACS) from addch(3NCURSES)"); #define PRINT_ACS(name) print_size_of (fp, #name, (size_t)(&name - &acs_map[0])) diff --git a/Ada95/gen/terminal_interface-curses.adb.m4 b/Ada95/gen/terminal_interface-curses.adb.m4 index 3f34d203..c966f9b9 100644 --- a/Ada95/gen/terminal_interface-curses.adb.m4 +++ b/Ada95/gen/terminal_interface-curses.adb.m4 @@ -9,7 +9,7 @@ include(M4MACRO)---------------------------------------------------------------- -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright 2018,2020 Thomas E. Dickey -- +-- Copyright 2018-2020,2024 Thomas E. Dickey -- -- Copyright 2007-2011,2014 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -38,8 +38,8 @@ include(M4MACRO)---------------------------------------------------------------- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.16 $ --- $Date: 2020/02/02 23:34:34 $ +-- $Revision: 1.17 $ +-- $Date: 2024/03/30 13:24:07 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; @@ -564,7 +564,7 @@ package body Terminal_Interface.Curses is L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + Natural (Function_Key_Number'Last)); begin - if (Key >= Key_F0) and then (Key <= L) then + if Key >= Key_F0 and then Key <= L then return True; else return False; diff --git a/Ada95/gen/terminal_interface-curses.ads.m4 b/Ada95/gen/terminal_interface-curses.ads.m4 index a5e91036..d6b18e58 100644 --- a/Ada95/gen/terminal_interface-curses.ads.m4 +++ b/Ada95/gen/terminal_interface-curses.ads.m4 @@ -1,6 +1,6 @@ -- -*- ada -*- define(`HTMLNAME',`terminal_interface-curses__ads.htm')dnl -include(M4MACRO)------------------------------------------------------------------------------ +include(M4MACRO)include(options.m4)------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- @@ -9,7 +9,7 @@ include(M4MACRO)---------------------------------------------------------------- -- S P E C -- -- -- ------------------------------------------------------------------------------ --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020,2024 Thomas E. Dickey -- -- Copyright 1998-2011,2014 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -38,8 +38,8 @@ include(M4MACRO)---------------------------------------------------------------- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.48 $ --- $Date: 2020/02/02 23:34:34 $ +-- $Revision: 1.49 $ +-- $Date: 2024/01/19 16:51:30 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System.Storage_Elements; @@ -377,8 +377,8 @@ package Terminal_Interface.Curses is := Curses_Constants.KEY_UNDO; Key_Mouse : constant Special_Key_Code := Curses_Constants.KEY_MOUSE; - Key_Resize : constant Special_Key_Code - := Curses_Constants.KEY_RESIZE; +OPT_KEY_RESIZE Key_Resize : constant Special_Key_Code +OPT_KEY_RESIZE := Curses_Constants.KEY_RESIZE; Key_Max : constant Special_Key_Code := Special_Key_Code'Last; diff --git a/Ada95/include/MKncurses_def.sh b/Ada95/include/MKncurses_def.sh index 4b2ae416..9d802441 100755 --- a/Ada95/include/MKncurses_def.sh +++ b/Ada95/include/MKncurses_def.sh @@ -1,7 +1,7 @@ #! /bin/sh -# $Id: MKncurses_def.sh,v 1.4 2020/02/02 23:34:34 tom Exp $ +# $Id: MKncurses_def.sh,v 1.5 2022/07/16 17:03:59 tom Exp $ ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2022 Thomas E. Dickey # # Copyright 2003 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -56,7 +56,7 @@ cat <" "$1" | sed -e "s/^$2[ ]*=[ ]*//" -e 's/"//g'` eval "$2"=\""$grep_assign"\" @@ -62,6 +67,7 @@ edit_specfile() { -e "s/\\/$NCURSES_PATCH/g" "$1" >"$1.new" chmod u+w "$1" mv "$1.new" "$1" + same_timestamp "$1" } make_changelog() { @@ -73,6 +79,7 @@ make_changelog() { -- `head -n 1 "$HOME"/.signature` `date -R` EOF + same_timestamp "$1" } # This can be run from either the subdirectory, or from the top-level @@ -84,7 +91,8 @@ fi SOURCE=`cd ..;pwd` BUILD=$TMPDIR/make-tar$$ -trap "cd /; rm -rf $BUILD; exit 0" EXIT INT QUIT TERM HUP +trap "cd /; rm -rf $BUILD; exit 1" 1 2 3 15 +trap "cd /; rm -rf $BUILD" 0 umask 077 if ! ( mkdir $BUILD ) @@ -125,6 +133,8 @@ then cp -p -r Ada* $BUILD/$ROOTNAME/doc/ cp -p -r ada $BUILD/$ROOTNAME/doc/ + + cd ../../Ada95 || exit fi cp -p "$SOURCE/NEWS" $BUILD/$ROOTNAME @@ -133,6 +143,7 @@ cp -p "$SOURCE/NEWS" $BUILD/$ROOTNAME touch $BUILD/$ROOTNAME/MANIFEST ( cd $BUILD/$ROOTNAME && find . -type f -print | "$SOURCE/misc/csort" >MANIFEST ) +same_timestamp $BUILD/$ROOTNAME/MANIFEST cd $BUILD || exit @@ -151,7 +162,10 @@ find . -name "*.gz" -exec rm -rf {} \; # Make the files writable... chmod -R u+w . -tar cf - $ROOTNAME | gzip >"$DESTDIR/$ROOTNAME.tar.gz" +# Cleanup timestamps +[ -n "$TOUCH_DIRS" ] && "$TOUCH_DIRS" "$ROOTNAME" + +tar cf - $TAR_OPTIONS $ROOTNAME | gzip >"$DESTDIR/$ROOTNAME.tar.gz" cd "$DESTDIR" || exit pwd diff --git a/Ada95/mk-pkg.awk b/Ada95/mk-pkg.awk new file mode 100644 index 00000000..bb07abe0 --- /dev/null +++ b/Ada95/mk-pkg.awk @@ -0,0 +1,90 @@ +# $Id: mk-pkg.awk,v 1.1 2022/12/17 23:41:18 tom Exp $ +############################################################################## +# Copyright 2022 Thomas E. Dickey # +# # +# Permission is hereby granted, free of charge, to any person obtaining a # +# copy of this software and associated documentation files (the "Software"), # +# to deal in the Software without restriction, including without limitation # +# the rights to use, copy, modify, merge, publish, distribute, distribute # +# with modifications, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the # +# following conditions: # +# # +# The above copyright notice and this permission notice shall be included in # +# all copies or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # +# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # +# DEALINGS IN THE SOFTWARE. # +# # +# Except as contained in this notice, the name(s) of the above copyright # +# holders shall not be used in advertising or otherwise to promote the sale, # +# use or other dealings in this Software without prior written # +# authorization. # +############################################################################## +# +# Author: Thomas E. Dickey +# +# add rules to Makefile for AdaCurses binding package. +BEGIN { + print "# generated by mk-pkg.awk\n"; + } +END { + printf "PACKAGE = %s\n", PACKAGE + print "real_bindir = $(libexecdir)/$(PACKAGE)" + print "REAL_BINDIR = $(LIBEXECDIR)/$(PACKAGE)" + print "SUB_MFLAGS = $(TOP_MFLAGS) BINDIR=$(REAL_BINDIR)" + print "samples = samples" + print "" + print "TESTS = \\" + print " $(samples)/ncurses \\" + print " $(samples)/rain \\" + print " $(samples)/tour" + print "" + print "DATAFILES = \\" + print " $(samples)/explain.txt" + print "" + print "all:: $(TESTS)" + print "" + print "# we might install the example-programs" + print "$(PACKAGE) :" + print " @echo \"creating $(PACKAGE) script\"" + print " @$(SHELL) -c '\\" + print " L=$(real_bindir); \\" + print " rm -f $@; \\" + print " echo \"#!$(SHELL)\" > $@;\\" + print " echo \"PATH=\\\"$$L\\\":\\$$PATH\" >>$@;\\" + print " echo \"export PATH\" >>$@;\\" + print " echo \"if test \\$$# != 0; then\" >>$@;\\" + print " echo \" exec \\\"\\$$@\\\"\" >>$@;\\" + print " echo \"elif test -t 1; then\" >>$@;\\" + print " echo \" cd \\\"$$L\\\" || exit\" >>$@;\\" + print " echo \" ls -l | \\$${PAGER:-less}\" >>$@;\\" + print " echo \"fi\" >>$@;\\" + print " echo \"echo \\\"usage: $@ [program]\\\"\" >>$@'" + print "" + print "install \\" + print "install.examples:: $(PACKAGE) $(BINDIR) $(REAL_BINDIR) $(DATADIR) $(TESTS)" + print " @echo \"installing $(PACKAGE) -> $(BINDIR)/\"" + print " $(INSTALL_SCRIPT) $(PACKAGE) $(BINDIR)" + print " ( cd samples && $(MAKE) $(SUB_MFLAGS) install.examples )" + print "" + print "uninstall \\" + print "uninstall.examples ::" + print " -rm -f $(BINDIR)/$(PACKAGE)" + print " ( cd samples && $(MAKE) $(SUB_MFLAGS) uninstall.examples )" + print "" + print "clean \\" + print "mostlyclean \\" + print "realclean \\" + print "distclean ::" + print " -rm -f $(PACKAGE)" + print "" + print "$(BINDIR) $(REAL_BINDIR) $(DATADIR) :" + print " mkdir -p $@" + + } diff --git a/Ada95/package/AdaCurses.spec b/Ada95/package/AdaCurses.spec index 9b39110e..540e8e54 100644 --- a/Ada95/package/AdaCurses.spec +++ b/Ada95/package/AdaCurses.spec @@ -2,7 +2,7 @@ Summary: Ada95 binding for ncurses %define AppProgram AdaCurses %define AppVersion MAJOR.MINOR %define AppRelease YYYYMMDD -# $Id: AdaCurses.spec,v 1.25 2019/11/23 21:15:31 tom Exp $ +# $Id: AdaCurses.spec,v 1.31 2022/12/18 00:08:17 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: %{AppRelease} @@ -20,9 +20,13 @@ In addition to a library, this package installs sample programs in "bin/%{AppProgram}" to avoid conflict with other packages. %prep +%global is_mandriva %(test -f /etc/mandriva-release && echo 1 || echo 0) +%global is_redhat %(test -f /etc/redhat-release && echo 1 || echo 0) +%global is_suse %(if grep -E -i '(opensuse)' /etc/issue >/dev/null; then echo 1; else echo 0; fi) + %define debug_package %{nil} -%define need_filter %(if grep -E -i '(mageia|red hat|fedora)' /etc/issue >/dev/null; then echo 1; elif test -f /etc/fedora-release; then echo 1; else echo 0; fi) +%define need_filter %(if grep -E -i '(red hat|fedora)' /etc/issue >/dev/null; then echo 1; elif test -f /etc/fedora-release; then echo 1; else echo 0; fi) %if %{need_filter} == 1 # http://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering @@ -34,22 +38,38 @@ In addition to a library, this package installs sample programs in %build -%define ada_libdir %{_prefix}/lib/ada/adalib +%define ada_libdir %{_libdir}/ada/adalib %define ada_include %{_prefix}/share/ada/adainclude +%if %{is_mandriva} +# Mageia 8 lacks gprbuild, needed for building shared libraries. +%define ada_model --without-shared --without-ada-sharedlib --with-ada-objects=%{_libdir}/adalib +%else +# OpenSUSE actually lacks gprbuild, but there is a workable "community" package. +%define ada_model --with-shared --with-ada-sharedlib +%if %{is_redhat} +# Fedora 36 LTO does not work with gprbuild system configuration. +unset CFLAGS +unset LDFLAGS +unset LT_SYS_LIBRARY_PATH +%endif +%endif + INSTALL_PROGRAM='${INSTALL}' \ - ./configure \ + ./configure %{ada_model} \ --target %{_target_platform} \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --libdir=%{_libdir} \ + --libexecdir=%{_libexecdir} \ --with-ada-include=%{ada_include} \ --with-ada-objects=%{ada_libdir} \ --mandir=%{_mandir} \ --datadir=%{_datadir} \ --disable-rpath-link \ - --with-shared \ - --with-ada-sharedlib + --disable-echo \ + --verbose \ + --enable-warnings make @@ -57,12 +77,7 @@ make [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT - -( cd samples && - make install.examples \ - DESTDIR=$RPM_BUILD_ROOT \ - BINDIR=$RPM_BUILD_ROOT%{_bindir}/%{AppProgram} -) +make install.examples DESTDIR=$RPM_BUILD_ROOT %clean if rm -rf $RPM_BUILD_ROOT; then @@ -74,12 +89,16 @@ exit 0 %files %defattr(-,root,root) +%{_bindir}/%{AppProgram} %{_bindir}/adacurses*-config -%{_bindir}/%{AppProgram}/* +%{_libexecdir}/%{AppProgram}/* %{ada_libdir}/ %if %{need_filter} == 1 %{_libdir}/lib%{AppProgram}.* %endif +%if %{is_suse} +%{_libdir}/lib%{AppProgram}.* +%endif %{_mandir}/man1/adacurses*-config.1* %{_datadir}/%{AppProgram}/* %{ada_include}/ @@ -87,6 +106,16 @@ exit 0 %changelog # each patch should add its ChangeLog entries here +* Sat Dec 17 2022 Thomas Dickey +- install sample programs in libexec + +* Sat Nov 19 2022 Thomas Dickey +- use static libraries for Mageia. + +* Sat Nov 12 2022 Thomas Dickey +- unset environment variables to work around Fedora LTO bugs. +- build-fix for OpenSUSE with gprbuild. + * Sat Nov 16 2019 Thomas Dickey - modify clean-rule to work around Fedora NFS bugs. diff --git a/Ada95/package/debian/compat b/Ada95/package/debian/compat index f599e28b..48082f72 100644 --- a/Ada95/package/debian/compat +++ b/Ada95/package/debian/compat @@ -1 +1 @@ -10 +12 diff --git a/Ada95/package/debian/control b/Ada95/package/debian/control index 030adb17..1a9aefda 100644 --- a/Ada95/package/debian/control +++ b/Ada95/package/debian/control @@ -2,9 +2,11 @@ Source: adacurses Maintainer: Thomas E. Dickey Section: misc Priority: optional -Standards-Version: 3.8.4 -Build-Depends: debhelper (>= 5) +Build-Depends: debhelper (>= 5), + gnat, + gprbuild Homepage: https://invisible-island.net/adacurses/ +Standards-Version: 4.6.1.0 Package: adacurses Architecture: any diff --git a/Ada95/package/debian/copyright b/Ada95/package/debian/copyright index 6e033f7d..b4060150 100644 --- a/Ada95/package/debian/copyright +++ b/Ada95/package/debian/copyright @@ -4,13 +4,13 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 by Thomas E. Dickey +Copyright: 2017-2023,2024 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 2010-2020,2021 by Thomas E. Dickey -Licence: X11 +Copyright: 2010-2023,2024 by Thomas E. Dickey +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -39,7 +39,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/Ada95/package/debian/rules b/Ada95/package/debian/rules index 47bbdc04..0adde8de 100755 --- a/Ada95/package/debian/rules +++ b/Ada95/package/debian/rules @@ -12,7 +12,7 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) TARGET_DIR = $(CURDIR)/debian/adacurses -SAMPLE_DIR = $(TARGET_DIR)/usr/bin/AdaCurses +SAMPLE_DIR = $(TARGET_DIR)/usr/libexec/AdaCurses CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL) CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) @@ -67,7 +67,7 @@ install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs $(MAKE) install DESTDIR=$(TARGET_DIR) diff --git a/Ada95/samples/ncurses2-overlap_test.adb b/Ada95/samples/ncurses2-overlap_test.adb index c0fd6209..6f3341ba 100644 --- a/Ada95/samples/ncurses2-overlap_test.adb +++ b/Ada95/samples/ncurses2-overlap_test.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright 2020,2021 Thomas E. Dickey -- +-- Copyright 2020-2021,2024 Thomas E. Dickey -- -- Copyright 2000-2014,2015 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -36,8 +36,8 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.9 $ --- $Date: 2021/09/04 10:52:55 $ +-- $Revision: 1.10 $ +-- $Date: 2024/03/30 13:21:15 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; @@ -73,8 +73,8 @@ procedure ncurses2.overlap_test is Get_Size (win, y1, x1); for y in 0 .. y1 - 1 loop for x in 0 .. x1 - 1 loop - if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3)) or - (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3))) + if (x > (x1 - 1) / 3 and x <= (2 * (x1 - 1)) / 3) or + (y > (y1 - 1) / 3 and y <= (2 * (y1 - 1)) / 3) then Move_Cursor (win, y, x); Add (win, Ch => ch); diff --git a/Ada95/samples/ncurses2-trace_set.adb b/Ada95/samples/ncurses2-trace_set.adb index d2739809..3b1983da 100644 --- a/Ada95/samples/ncurses2-trace_set.adb +++ b/Ada95/samples/ncurses2-trace_set.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020,2023 Thomas E. Dickey -- -- Copyright 2000-2011,2014 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -36,8 +36,8 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.7 $ --- $Date: 2020/02/02 23:34:34 $ +-- $Revision: 1.8 $ +-- $Date: 2023/06/17 17:21:47 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; @@ -121,7 +121,7 @@ procedure ncurses2.trace_set is Trace_Attribute_Set'(Character_Calls => True, others => False)), (new String'("Termcap_TermInfo"), Trace_Attribute_Set'(Termcap_TermInfo => True, others => False)), - (new String'("Maximium"), + (new String'("Maximum"), Trace_Maximum) ); @@ -353,7 +353,7 @@ procedure ncurses2.trace_set is if subset (tlevel, Trace_Maximum) then - Append (buf, "Maximium"); + Append (buf, "Maximum"); Append (buf, ", "); end if; end if; diff --git a/Ada95/samples/sample-menu_demo-aux.adb b/Ada95/samples/sample-menu_demo-aux.adb index f430c88c..f64e41da 100644 --- a/Ada95/samples/sample-menu_demo-aux.adb +++ b/Ada95/samples/sample-menu_demo-aux.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright 2020 Thomas E. Dickey -- +-- Copyright 2020,2023 Thomas E. Dickey -- -- Copyright 1998-2006,2009 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -36,8 +36,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control --- $Revision: 1.15 $ --- $Date: 2020/02/02 23:34:34 $ +-- $Revision: 1.16 $ +-- $Date: 2023/06/17 17:21:59 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; @@ -79,7 +79,7 @@ package body Sample.Menu_Demo.Aux is -- Calculate horizontal coordinate at the screen center X := (Columns - C) / 2; - Y := 1; -- always startin line 1 + Y := 1; -- always starting on line 1 end Geometry; diff --git a/Ada95/samples/split-path.awk b/Ada95/samples/split-path.awk index 86e8ccdc..5b340ba5 100644 --- a/Ada95/samples/split-path.awk +++ b/Ada95/samples/split-path.awk @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2022 Thomas E. Dickey # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -28,9 +28,11 @@ # # Author: Thomas E. Dickey # -# $Id: split-path.awk,v 1.3 2020/02/02 23:34:34 tom Exp $ +# $Id: split-path.awk,v 1.4 2022/11/26 23:46:20 tom Exp $ BEGIN { cols = 72; } /[$]THIS_DATADIR/ { + if (substr(this_datadir, length(this_datadir)) != "/") + this_datadir = this_datadir "/"; gsub("[$]THIS_DATADIR", "\"" this_datadir "\""); if ( length ($0) > cols ) { indent = index($0, "\"") - 1; diff --git a/Ada95/src/c_threaded_variables.c b/Ada95/src/c_threaded_variables.c index 4c13153e..44b4bcbc 100644 --- a/Ada95/src/c_threaded_variables.c +++ b/Ada95/src/c_threaded_variables.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ #define WRAP(type, name) \ type \ - name ## _as_function () \ + name ## _as_function (void) \ { \ return name; \ } diff --git a/Ada95/src/library-cfg.sh b/Ada95/src/library-cfg.sh index c4166170..b9b5c938 100755 --- a/Ada95/src/library-cfg.sh +++ b/Ada95/src/library-cfg.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright 2018-2019,2020 Thomas E. Dickey # +# Copyright 2018-2020,2022 Thomas E. Dickey # # Copyright 2016,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -28,7 +28,7 @@ # authorization. # ############################################################################## # -# $Id: library-cfg.sh,v 1.7 2020/02/02 23:34:34 tom Exp $ +# $Id: library-cfg.sh,v 1.8 2022/07/16 17:03:59 tom Exp $ # # Work around incompatible behavior introduced with gnat6, which causes # gnatmake to attempt to compile all of the C objects which might be part of @@ -67,7 +67,7 @@ cat >$SCRIPT < have been made opaque by default; + + the FORM, MENU, and PANEL structures and related internal data types + from their corresponding header files have been made opqaue by + default; and + + support for wide characters is now enabled by default. + + 6.4 (Dec 31, 2022) + Interface changes: + + + none + + Added extensions: + + + none + + Added internal functions (other than "_sp" variants): + + + add _nc_free_termtype1 and _nc_free_tparm, for memory-leaks + + Removed internal functions: + + + none + + Modified internal functions: + + + none + 6.3 (Oct 21, 2021) Interface changes: @@ -2205,10 +2276,10 @@ FOR SYSTEM INTEGRATORS: Naming the Console Terminal In various systems there has been a practice of designating the system - console driver type as `console'. Please do not do this! It + console driver type as 'console'. Please do not do this! It complicates peoples' lives, because it can mean that several different terminfo entries from different operating systems all logically want to - be called `console'. + be called 'console'. Please pick a name unique to your console driver and set that up in the /etc/inittab table or local equivalent. Send the entry to the @@ -2446,4 +2517,4 @@ BUG REPORTS: The Hacker's Guide in the doc directory includes some guidelines on how to report bugs in ways that will get them fixed most quickly. --- vile:txtmode +-- vile:txtmode fc=78 diff --git a/MANIFEST b/MANIFEST index 9d8227f0..a9395d2f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -33,6 +33,7 @@ ./Ada95/include/ncurses_defs ./Ada95/make-tar.sh ./Ada95/mk-1st.awk +./Ada95/mk-pkg.awk ./Ada95/package/AdaCurses-doc.spec ./Ada95/package/AdaCurses.spec ./Ada95/package/debian/compat @@ -342,7 +343,7 @@ ./doc/html/announce.html ./doc/html/hackguide.html ./doc/html/index.html -./doc/html/man/adacurses6-config.1.html +./doc/html/man/adacursesw6-config.1.html ./doc/html/man/captoinfo.1m.html ./doc/html/man/clear.1.html ./doc/html/man/curs_add_wch.3x.html @@ -463,7 +464,7 @@ ./doc/html/man/mitem_value.3x.html ./doc/html/man/mitem_visible.3x.html ./doc/html/man/ncurses.3x.html -./doc/html/man/ncurses6-config.1.html +./doc/html/man/ncursesw6-config.1.html ./doc/html/man/new_pair.3x.html ./doc/html/man/panel.3x.html ./doc/html/man/resizeterm.3x.html @@ -671,7 +672,7 @@ ./man/keyok.3x ./man/legacy_coding.3x ./man/make_sed.sh -./man/man_db.renames +./man/man_db.renames.in ./man/manhtml.aliases ./man/manhtml.externs ./man/manlinks.sed @@ -1216,15 +1217,19 @@ ./test/test_addstr.c ./test/test_addwstr.c ./test/test_arrays.c +./test/test_delwin.c +./test/test_endwin.c ./test/test_get_wstr.c ./test/test_getstr.c ./test/test_instr.c ./test/test_inwstr.c +./test/test_mouse.c ./test/test_opaque.c ./test/test_setupterm.c ./test/test_sgr.c ./test/test_termattrs.c ./test/test_tparm.c +./test/test_unget_wch.c ./test/test_vid_puts.c ./test/test_vidputs.c ./test/testaddch.c diff --git a/Makefile.in b/Makefile.in index f87c19fd..1303e171 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.45 2021/08/07 22:06:59 tom Exp $ +# $Id: Makefile.in,v 1.46 2022/10/01 22:53:36 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2021,2022 Thomas E. Dickey # # Copyright 1998-2014,2015 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -62,6 +62,8 @@ pkgdir = @PKG_CONFIG_LIBDIR@ include_dir = ${includedir}${includesubdir} +FGREP = @FGREP@ + INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -103,10 +105,10 @@ preinstall : @ test "$(include_dir)" = "$(prefix)/include" || \ echo '** Include-directory is not in a standard location' @ test ! -f $(include_dir)/termcap.h || \ - fgrep NCURSES_VERSION $(include_dir)/termcap.h >/dev/null || \ + $(FGREP) NCURSES_VERSION $(include_dir)/termcap.h >/dev/null || \ echo '** Will overwrite non-ncurses termcap.h' @ test ! -f $(include_dir)/curses.h || \ - fgrep NCURSES_VERSION $(include_dir)/curses.h >/dev/null || \ + $(FGREP) NCURSES_VERSION $(include_dir)/curses.h >/dev/null || \ echo '** Will overwrite non-ncurses curses.h' distclean \ diff --git a/NEWS b/NEWS index eb487423..7a5ca227 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2018-2021,2022 Thomas E. Dickey -- +-- Copyright 2018-2023,2024 Thomas E. Dickey -- -- Copyright 1998-2017,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3768 2022/01/16 01:26:12 tom Exp $ +-- $Id: NEWS,v 1.4111 2024/04/20 21:37:56 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,802 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20240420 + + improve formatting/style of manpages (patches by Branden Robinson). + + compiler warning/portability fixes. + +20240414 + + build/bug-fix for check-size feature (reports by Sam James, Gabriele + Balducci). + +20240413 + + improve formatting/style of manpages (patches by Branden Robinson). + + provide for padding in check-size feature, using new_prescr() to + pass interim SCREEN pointer. + + complete change for opaque options (Gentoo #928973, cf: 20231021). + + update package /debian/rules and related lintian overrides + + revise progs.priv.h to provide for NC_ISATTY reuse + +20240330 + + remove masking of ISIG in cbreak() (report by Benno Schulenberg). + + modify test/test_mouse.c to use curses api for raw/noraw. + > improved configure macros from other program development: + + build-fix for clang on Solaris + + suppress filename/timestamp in gzip'd manpages (suggested for + byacc by Andrin Geiger) + +20240323 + + modify tput/tset reset feature to avoid 1-second sleep if running in + a pseudo-terminal. + + modify check-size feature to avoid using it in a pseudoterminal + (cf: 20231016) + + improve formatting/style of manpages (patches by Branden Robinson). + + trim a space after some "-R" options, fixing builds for applications + built using clang and ncurses on Solaris. + +20240309 + + modify xgterm to work around line-drawing bug -TD + + use CSI 3J in vte-2017 (report by Sven Joachim) + +20240302 + + add configure check for MB_LEN_MAX, to provide warning as needed. + + improve formatting/style of manpages (patches by Branden Robinson). + + fix regression in tput which disallowed hex/octal parameters (report + by Werner Fink, cf: 20230408) + + update config.guess, config.sub + +20240224 + + improve man/curs_mouse.3x style (Branden Robinson, Sven Joachim). + + provide for CCHARW_MAX greater than 1 + + eliminate use of PATH_MAX in lib_trace.c + + work around misconfiguration of MacPorts gcc13, which exposes invalid + definition of MB_LEN_MAX in gcc's fallback copy of limits.h (MacPorts + #69374). + +20240217 + + add vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from + xterm #389 -TD + + fix inconsistent description of wmouse_trafo() (Debian #1059778). + + modify wenclose() to handle pads (Debian #1059783). + + improve manpage discussion of mouseinterval() (Debian #1058560). + +20240210 + + compiler-warning fixes, while investigating an optimizer bug in + "gcc (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0" + which results in only the first byte of a multibyte character being + printed to the screen. + +20240203 + + minor changes to tracing and locale-checks. + +20240127 + + amend change to z39-a (report by Sven Joachim). + + use xterm+nopcfkeys, vt52-basic, dec+pp, dec+sl, vt52+arrows, + hp+pfk+cr, klone+acs, klone+color, klone+sgr, ncr160wy50+pp + to trim -TD + + NetBSD-related fixes for x68k and wsvt52 (patch by Thomas Klausner) + +20240120 + + improve formatting/style of manpages (patches by Branden Robinson). + + amend discussion of aliases in tput.1 + + use ansi+sgrbold, ansi+sgrdim, ansi+sgrso, ansi+sgrul, ansi+tabs + ecma+color, ecma+sgr, vt100+4bsd, vt100+pfkeys, vt220+pcedit + xterm+256color, xterm+acs, xterm+nopcfkeys, xterm+pcf2 to trim -TD + + modify configure scripts/makefiles to omit KEY_RESIZE if the + corresponding SIGWINCH feature is disabled. + +20240113 + + improve formatting/style of manpages (patches by Branden Robinson). + + modify dist.mk to avoid passing developer's comments in manpages into + the generated html documentation. + + use ansi+local, ansi+local1, ansi+pp, ansi+rca, ansi+rca2, ansi+sgr + to trim -TD + + restore padding for wy520* and vt320-k311 (report by Sven Joachim). + +20240106 + + use ansi+arrows, ansi+apparrows, ansi+csr, ansi+erase, ansi+idc, + ansi+idc1, ansi+idl, ansi+idl1, ansi+inittabs to trim -TD + + minor manpage formatting changes for consistency. + + modify doc-html test package's install-directory, per lintian. + + add attr_get.3x to man_db.renames.in (patch by Sven Joachim). + +20231230 + + improve formatting/style of manpages (patches by Branden Robinson). + + add ms-vt100-16color, winconsole -TD + + add rio, rio-direct -TD + + add mostlike -TD + + add wezterm, contour -TD + +20231223 + + improve formatting/style of manpages (patches by Branden Robinson). + +20231217 + + improve formatting/style of manpages (patches by Branden Robinson). + + correct an assignment in infocmp "-u" for detecting if a boolean + is unset in a base entry and set in a use'd chunk, i.e., if it was + cancelled. + + modify infocmp "-u" option to not report cancels for strings which + were already cancelled in a use'd chunk. + + join two lines in infotocap.3x to eliminate a spurious "description" + link in installed manpages (report by Sven Joachim). + + fix typo in NEWS (report by Sven Joachim). + +20231209 + + modify infocmp "-u" option to not report cancels in use'd chunks + which are not mentioned in the top-level terminal description. + + remove xterm+sm+1006 from tmux (Debian #1057688). + + used "infocmp -u" to help trim redundant capabilities -TD + + updated man/edit_man.sh to allow for "\%" markers embedded after + bold font escapes in manpage cross-references (Debian #1057651). + + reduce compiler-warnings in configure checks + +20231202 + + correct initial alignment of extended capabilities in infocmp, so + that the "-u" option can be used for more than two terminal types. + + improve formatting/style of manpages, changing environment variables + to italics (patches by Branden Robinson). + +20231125 + + add information about "ttycap", termcap's forerunner, to tset.1 + (patch by Branden Robinson). + + improve formatting/style of manpages, including section reordering + (patches by Branden Robinson). + + modify usage messages in configure script, bracketing optional values + (report by Branden Robinson). + +20231121 + + amend fix for Debian #1055882, correcting nul terminator check in + waddnstr (Debian #1056340). + +20231118 + + improve description of length-parameter and error-returns in several + manpages: curs_addchstr.3x, curs_addstr.3x, curs_addwstr.3x, + curs_in_wch.3x, curs_in_wchstr.3x, curs_inchstr.3x, curs_ins_wstr.3x, + curs_insstr.3x, curs_instr.3x, curs_inwstr.3x + + amend parameter check for entire string versus specific length in + winsnstr() and wins_nwstr() to match Solaris. + + make similar correction to wins_nwstr(). + + correct loop termination condition in waddnstr() and waddnwstr() + (Debian #1055882, cf: 20201205). + +20231111 + + used "infocmp -u" to help trim redundant capabilities -TD + + add limit checks in infocmp needed when processing extended + capabilities with the "-u" option. + + fix inconsistent sort-order in see-also sections of manpages. + + fix a few compiler warnings for Solaris 10. + + modify endwin() to return an error if it is called again without an + intervening screen update (report by Rajeev Pillai, NetBSD #57592). + +20231104 + + modify reset command to avoid altering clocal if the terminal uses a + modem (prompted by discussion with Werner Fink, Michal Suchanek, + OpenSUSE #1201384, Debian #60377). + + build-fixes for --with-caps variations. + + correct a couple of section-references in INSTALL. + +20231028 + + move xterm focus mode 1004 from xterm+sm+1006 into xterm+focus as + fe/fd capabilities, like vim (vim-pr #13440). + + modify --with-pkg-config-libdir option to make "libdir" the default, + as documented, rather than "auto" (report by Branden Robinson). + + improve messages from configure script (patches by Branden Robinson). + +20231021 + + use oldxterm+sm+1006 in vte-2014 (report by Benno Schulenberg) -TD + + add ansi+apparrows -TD + + change defaults for configure opaque and widec options (prompted by + discussion with Branden Robinson). + + minor cleanup of compiler- and manpage-warnings. + +20231016 + + make the recent change to setupterm optional "--enable-check-size" + (Debian #1054022). + +20231014 + + improve formatting/style of manpages (patches by Branden Robinson). + + updated configure script macro CF_XOPEN_SOURCE, for uClibc-ng + + update config.guess, config.sub + +20231007 + + improve loop-limit for get_position(). + + improve manual description of immedok (Debian #1053603). + + fix a few formatting issues with manpages (Debian #1053123). + + improve formatting/style of manpages (patches by Branden Robinson). + +20231001 + + modify setupterm to provide for using ANSI cursor-position report (in + user6/user7 terminfo capabilities) to obtain screensize if neither + environment variables or ioctl is used. The ncurses test-program + with options "-E -T" demonstrates this feature. + + improve error messages in tic (patch by Branden Robinson). + + improve formatting/style of manpages (patches by Branden Robinson). + + modify test/clip_printw.c to optionally test non-wrapped updates. + + fix reallocation loop for vsnprintf() in _nc_sprintf_string() by + copying the va_list variable (patch by Ian Abbott). + +20230923 + + improve formatting of manpages (patches by Branden Robinson). + + amend change to delscreen() to limit the windows which it creates to + just those associated with the screen (report by Frederic Boiteux, + cf: 20220813). + +20230918 + + new tarball/errata (report by Sven Joachim). + +20230917 + + improve formatting of manpages (integrated patches by Branden + Robinson). + + correct limit for name-length in write_entry.c (report/testcase by + Luna Saphie Mittelbach). + + limit delays to 30 seconds, i.e., padding delays in terminfo, as well + as napms() and delay_output() functions. + + improve a few pointer-checks. + + improve parsing in _nc_msec_cost, allowing a single decimal point. + +20230909 + + improve formatting of manpages (patches by Branden Robinson), for + captoinfo.1m and terminfo.5 + > patches by Nicholas Marriott: + + use string-hacks in alloc_entry.c, alloc_type.c and hardscroll.c, + overlooked due to compiler changes in recent OpenBSD releases. + + add "-6" option to ncu2openbsd script. + +20230902 + + improve description of search rules for terminal descriptions in + terminfo manpage (report by Sven Joachim). + +20230826 + + fixes for compiler-warnings. + + update config.guess, config.sub + +20230819 + + various manpage-formatting fixes. + + correct formatting of table header in curs_inopts.3x (Branden + Robinson). + + correct manpage description of panel_hidden (report by Benjamin + Mordaunt). + +20230812 + + add/use putty+cursor to reflect amending of modified cursor-keys in + 2021 -TD + + add ecma+strikeout to putty -TD + + add functions to query tty-flags in SCREEN (request by Bill Gray). + +20230805 + + fix a few manpages needing tbl marker, seen by lintian warning. + + fixes for compiler-warnings. + + minor grammatical fix for manpages (Branden Robinson). + +20230729 + + improve manpages for wgetnstr() and wget_wnstr(). + + modify MinGW configuration to provide for running in MSYS/MSYS2 + shells, assuming ConPTY support (patch by Pavel Fedin). + + add assignment in CF_MAN_PAGES to fill in value for TERMINFO_DIRS in + ncurses, terminfo and tic manpages (patch by Sven Joachim). + +20230722 + + add "auto" default for --with-xterm-kbs configure option. + +20230715 + + correct wadd_wch_literal() when adding a non-spacing character to a + double-width character. + + improve manual page for curs_util. + + improve manual page for wadd_wch(). + +20230708 + + add linux+kbs for terminals which imitate xterm's behavior with + Linux -TD + + modify MinGW driver to return KEY_BACKSPACE when an unmodified + VK_BACK virtual key is entered (prompted by patch by Pavel Fedin, + Savannah #64292). + + disallow using $TERMINFO or $HOME/.terminfo when tic "-o" option is + used (report by Sven Joachim, Debian #1040048). + +20230701 + + fix mandoc warnings about unnecessary markup. + + improve parameter check in tparm_setup() + +20230625 + + adjust man/make_sed.sh to work with dates as the third field of TH. + + fixes for out-of-memory condition (report by "eaglegai"). + +20230624 + + fixes for out-of-memory condition (report by "eaglegai"). + +20230617 + + markup manpages with revision information (prompted by discussion + with Bjarni Ingi Gislason). + +20230615 + + modify _nc_read_file_entry() to show relevant filename in warnings. + + improve checks in convert_string() for corrupt terminfo entry (report + and test-case by Gregory James Duck). + +20230610 + + improve manpages discussing file descriptors in low-level functions. + + modify flushinp to use file descriptors in SCREEN, rather than from + TERMINAL, and check if they are for a terminal, like SVr4. + + modify mcprint to use file descriptor in SCREEN, for consistency. + + add xterm+focus to foot+base (patch by Daniel Ekloef). + + correct definition of Charable() for non-wide ncurses library (report + and test-case by Zbigniew Baniewski). + +20230603 + + add configure option --with-strip-program, to override program + chosen by the install program for stripping executables (prompted + by discussion with Aapo Rantalainen). + + fix typo in INSTALL (report/patch by Aapo Rantalainen). + + improve error-checks for isEILSEQ() + + increase MB_CUR_MAX to 16, matching glibc's MB_LEN_MAX. + + corrected mouse mask in test/testcurs.c + + improve thread lock in lib_trace.c + +20230527 + + fixes for compiler warnings/cppcheck. + +20230520 + + fixes for compiler warnings in MinGW environments. + +20230514 + + modify test-package "ncurses6-doc" to use manpage-aliases, which in + turn required a change to the configure script to factor in the + extra-suffix option when deriving alias names. + + add mode 1004 to xterm+sm+1006 from xterm #380 -TD + +20230506 + > build-fixes related to configure-options and/or platform: + + fix for --enable-fvisibility + + fix for unusual values of --with-rel-version + + fix for unusual values of --with-abi-version + + fix for --disable-tcap-names + + fix for termcap in nc_access.h (report by Werner Fink). + +20230429 + + revise recent change to _nc_write_entry to isolate it to a Cygwin bug + (cf: 20230311) + + amend fix for wgetnstr, wgetn_wstr to use cbreak mode unless raw + mode was set (cf: 20210522). + + fix a few warnings from cppcheck, etc. + + correct copy/paste error in nc_access.h (report by Werner Fink). + +20230424 + + check return value of _nc_save_str(), in special case for tic where + extended capabilities are processed but the terminal description was + not initialized (report by Ziqiao Kong). + + regenerate llib-* files. + +20230423 + + add tiscan_s() to help applications check formatting capabilities + that would be passed to tiparm_s, etc. + + add tiparm_s() to provide applications a way to tell ncurses what + the expected parameters are for a capability (tmux #3531). + + improve check in lib_tparm.c, ensuring that a char* fits into a + TPARM_ARG. + + add --disable-setuid-environ configure option (request by Sven + Joachim). + + drop compatibility with obsolete versions of tack, e.g., pre-1.08 + (Debian #1034549, cf: 20170722). + +20230418 + + improve checks for limits on privileged execution: + + modify _nc_syserr_abort() to use _nc_env_access(), rather than + only checking root uid. + + use getauxval() when available, to improve setuid/setgid checks. + + modify test packages to disable root access/environ options. + + modify tgoto() to accept no-parameter capabilities, for joe editor + (OpenSUSE #1210485, Gentoo #904263). + +20230415 + + configure script fixes: + + fix copy/paste error in configure option --disable-root-access + (report/patch by Sven Joachim). + + modify CF_XOPEN_SOURCE macro's amend default case to avoid + undefining _XOPEN_SOURCE if _POSIX_C_SOURCE is defined. + + modify test_tparm to account for extended capabilities. + + add checks in tparm() and tiparm() for misuse of numeric parameters, + overlooked in 20230408. + + fix errata in clear.1 and curs_terminfo.3x + +20230408 + + document limitations of tparm, and error-returns in curs_terminfo.3x + + document limitations of tgoto, and error-returns in curs_termcap.3x + + add xterm+focus to alacritty+common (patch by Christian Duerr). + + add "-v" option to tput, to show warnings. + > improve checks for malformed terminfo data (report/analysis by + Jonathan Bar Or, Michael Pearse, Emanuele Cozzi). + + make the parameter type/count checks in _nc_tiparm() more stringent + + update tgoto() to account for _nc_tiparm() changes + + add checks in tparm() and tiparm() for misuse of string parameters + + add special cases in tput to handle extensions Cs/Ms parameters + + ignore compiled-terminfo where the array sizes exceed the standard + +20230401 + + modify experimental Windows driver to work with xterm mouse protocol. + + remove DECCOLM+DECSCLM from foot (patch by Daniel Ekloef). + +20230311 + + improve manpage description for addch versus unctrl format used for + non-printable characters. + + modify version-check for gcc/g++, now works for msys2. + + modify check in _nc_write_entry() for multiply defined aliases to + report problems within the current runtime of tic rather than for + conflicts with pre-existing terminal descriptions. + + allow for MinGW32-/64-bit configurations to use _DEFAULT_SOURCE + + clarify interaction of -R option versus -C, -I and -r in infocmp + manpage. + + build-fix in lib_win32con.c (cf: 20230211). + +20230225 + + build-fixes for rpm test-packages. + + add/use configure check for clock_gettime(), to supersede + gettimeofday(). + +20230218 + + configure-script improvements: + + recent msys2 headers work with _DEFAULT_SOURCE; amend check + + use $ac_includes_default in most cases where stdlib.h should work + + use #error consistently vs "make an error" + + add configure macro for gettimeofday vs inline check + +20230211 + + set dwShareMode in calls to CreateConsoleScreenBuffer() (patch by + Hannes Domani). + + use CreateFile with "CONIN$", "CONOUT$" rather than GetStdHandle to + obtain a handle on the actual console, avoiding redirection in the + MinGW/Win32 configurations (adapted from patch by LIU Hao). + +20230128 + + document XF, kxIN and kxOUT -TD + + add note on sun/wscons/cmdtool/shelltool -TD + + modify configure script check for pkg-config library directory to + take into account an older version 0.15.0 which used PKG_CONFIG_PATH + but not PKG_CONFIG_LIBDIR + +20230121 + + correct limit-check when dumping tc/use clause via tic -I (report by + Gabriel Ravier). + + correct a check for manpage-alias in edit_man.sh, to work with out of + tree builds (report by Sven Joachim). + +20230114 + + change RV to XR/xr, to avoid conflict with pre-existing usage in vim, + to use RV/rv to denote DA2 and its response (discussion with Bram + Moolenaar) -TD + + add XF flag to xterm+focus so that termcap applications can be aware + of terminals which may support focus in/out -TD + + use xterm+focus in xterm-p370 and tmux -TD + + improve configure-script macros vs compiler warnings. + +20230107 + + add --with-abi-altered configure option (prompted by discussion with + Brian Inglis). + + add BSD erase2 to characters handled by tset/reset. + + improve configure-script macros vs compiler warnings. + + regenerate configure scripts with autoconf 2.52.20221202 + + add RV report+version (suggested by Bram Moolenaar). + + add comment to bracketed+paste explaining that vim patch 9.0.1117 is + needed for use with the updated xterm descriptions (suggested by Bram + Moolenaar). + +20221231 6.4 release for upload to ftp.gnu.org + + update release notes + + regenerate llib-* files. + + correct PS vs PE names in bracketed+paste (report by Bram Moolenaar) + -TD + +20221224 + + add mutex lock/unlock in a few places reported by thread-sanitizer + + add/use bracketed+paste to help identify terminals supporting this + xterm feature (prompted by discussion with Bram Moolenaar) -TD + +20221217 + + install Ada95 sample programs in libexecdir, adding a wrapper + script to invoke those. + +20221210 + + add minimal -h/-V getopt logic to the remaining test-programs. + + free new_pair() data in delscreen (report by "magiblot"). + + add clarification of the scope of dynamic variables in terminfo(5). + + remove a stray '/' from description of %g in terminfo(5). + +20221203 + + add -h usage and -V version options to the test-programs which use + getopt. + + use "command -v" rather than "type" in Ada95/gen/Makefile.in to fix + a portability issue (patch by Nicolas Boulenguez). + + update ncurses-howto, more documentation fixes along with corrections + to example programs. + +20221126 + + fix an error in pathname of explain.txt (cf: 20200201). + + fix an error in "@" command in test/ncurses.c F-menu (cf: 20190121). + + improve formatting of ncurses-intro.html and hackguide.html + + improve man/curs_clear.3x links to other pages + +20221119 + + use static libraries for AdaCurses test-package for Mageia, since no + gprbuild package is available. + + updated test packages for Debian. + +20221112 + + build-fixes for AdaCurses RPM test-package. + +20221105 + + regenerate configure scripts with autoconf 2.52.20221009 + + modify "--with-manpage-format" to support bzip2 and xz compression + (prompted by discussion with Sam James). + + modify make-tar.sh scripts to make timestamps more predictable. + +20221029 + + improve curs_slk.3x discussion of extensions and portability (report + by Bill Gray). + +20221023 + + change man_db.renames to template, to handle ncurses*-config script + with the extra-suffix configure option. + +20221015 + + fix another memory-leak in tic. + + update install-sh script from autoconf, to fix install problem for + Ada95 with Arch; as noted in + https://lists.gnu.org/archive/html/automake/2018-09/msg00005.html + there are unaddressed issues. + + update CF_XOPEN_SOURCE, adding GNU libc suffixes for abi64, abin32, + x32 (report by Sven Joachim): + + correct ifdef's for _nc_set_read_thread() (patch by Mikhail Korolev, + cf: 20220813). + +20221008 + + correct a switch-statement case in configure script to allow for test + builds with ABI=7. + + modify misc/gen-pkgconfig.in to allow for the case where the library + directory does not yet exist, since this is processed before doing an + install (report by Michal Liszcz). + +20221001 + + modify configure/scripts to work around interference by GNU grep 3.8 + (report by Sam James). + + update CF_XOPEN_SOURCE, adding variants "gnueabi" and "gnueabihf" to + get _DEFAULT_SOURCE special case (report by Adam Sampson) + +20220924 + + modify configure macro CF_BUILD_CC to check if the build-compiler + works, rather than that it is different from the cross-compiler, e.g., + to accommodate a compiler which can be used for either purpose with + different flags (report by Mikhail Korolev). + + fix another memory-leak in tic. + + correct change for cppcheck in menu library (report/analysis by + "tuxway", cf: 20220903). + + update config.guess, config.sub + +20220917 + + reduce memory-leak in tic by separating allocations for struct entry + from TERMTYPE2 (cf: 20220430). + + improve interaction between tic -v option and NCURSES_TRACE, by + processing the latter only when -v option does not set _nc_tracing. + + modify curses_trace() to show the trace-mask as symbols, e.g., + TRACE_ORDINARY, DEBUG_LEVEL(3). + +20220910 + + amend verbose-option change to make this affect level 3, e.g., using + "tic -cv3 terminfo". + + work around musl's nonstandard use of feature test macros by adding + a definition for NCURSES_WIDECHAR to the generated ".pc" and *-config + files (report by Sam James). + +20220903 + + modify verbose-option of infocmp, tic, toe to enable debug-tracing + if that is configured. + +20220827 + + modify configure scripts to use overlooked cases for LD and + PKG_CONFIG variables (report by Alan Webb, Gentoo #866398). + + modify nsterm to use xterm+alt1049 (report by Paul Handly) -TD + + modify putty to use xterm+alt1049 -TD + +20220820 + + fix some cppcheck warnings, mostly style, in ncurses and c++ + libraries and progs directory. + + add curses_trace to ifdef's for START_TRACE in test/test.priv.h + + update config.guess + +20220813 + + modify delscreen to more effectively delete all windows on the given + screen. + + amend portability note for delwin in manual page. + + adapt test/test_delwin.c from example by Bill Gray. + + account for prescreen data if freeing leaks in pthread-configuration + + split-out _nc_set_read_thread(), to reduce compiler warnings about + pthread_self(), which may/may not be a weak symbol. + + improve pthread-configuration for test/worm.c + +20220806 + + amend end_of_stream() to allow for input files without a final + newline. + + check for non-textfiles to tic. + +20220729 + + fixes to build with dietlibc: + + add configure check for fpathconf (report by Georg Lehner). + + add configure check for math sine/cosine, needed in test/tclock, + and eliminate pow() from test/hanoi (report by Georg Lehner). + + use wcsnlen as an alternative to wmemchr if it is not found + (adapted from patch by Georg Lehner). + + trim out some unwanted linker options from ncurses*config and .pc + files seen in Fedora 36+. + +20220724 + + add portability notes for delscreen and delwin in manual. + + improve pthread-configuration for test/worm.c, test/rain.c + + improve pointer/limit checks associated with deleting a screen + (Debian #1015756). + +20220716 + + build-fix for test_mouse.c, for non-standard cfmakeraw. + + improve shell-scripts with shellcheck + + fix typo in run_tic.in (report/patch by Jan Starke). + +20220709 + + lock the prescreen data consistently in newterm, etc., for the + pthreads configuration (report by Tom de Vries). + +20220703 + + add consistency check in tic for u6/u7/u8/u9 and NQ capabilities. + + use NQ to flag entries where the terminal does not support query and + response -TD + + use ansi+enq and decid+cpr in cases where the terminal probably + supported the u6-u9 extension -TD + + add/use apollo+vt132, xterm+alt47 -TD + +20220625 + + improve man/curs_bkgd.3x, explaining that bkgdset can affect results + for bkgd (report by Anton Vidovic). + + correct dsl in dec+sl (report by Rajeev Pillai) -TD + + add/use ansi+cpr, decid+cpr -TD + +20220618 + + add a null-pointer check for term_names field in copy_termtype(), + needed for MinGW port (report by Peiyuan Song, cf: 20220521). + + revise kon/kon2/jfbterm to undo "linux2.6" change to + smacs/rmacs/enacs (Debian #1012800) -TD + + amended note for att610+cvis0, as per documentation for att610, + att620, att730 -TD + +20220612 + + modify waddch_literal() to allow for double-width base character when + merging a combining character (report by Gavin Troy). + + improve _tracecchar_t2() formatting of base+combining character. + +20220604 + + add note on portable memory-leak checking in man/curs_memleaks.3x + + remove u6-u9 from teken-2018 -TD + + set "xterm-new" to "xterm-p370", add "xterm-p371" -TD + +20220529 + + expanded notes for teken/syscons -TD + + fix overlooked copying of extended string-heap in copy_termtype + (cf: 20220430). + + update config.guess + +20220521 + + improve memory-leak checking in several test-programs. + + set trailing null on string passed from winsnstr() to wins_nwstr(). + + modify del_curterm() to fix memory-leak introduced by change to + copy_termtype(). + +20220514 + + further improvements to test/test_mouse.c; compare with ncurses test + program menu A/a. + +20220507 + + add test/test_mouse.c (patch by Leonid S Usov). + + add a few debug-traces for tic, fix a couple of memory-leaks. + +20220501 + + build-fix for debug-traces (report/patch by Chris Clayton). + +20220430 + + modify samples for xterm mouse 1002/1003 modes to use 1006 mode, and + also provide for focus in/out responses -TD + + modify default case in handle_wheel() to always report button-release + events, e.g., for xterm mouse mode 1003 (patch by Leonid S Usov). + + improve valid_entryname() to disallow characters used in terminfo + syntax: '#', '=', '|', '\'. + + alter copy_termtype() to allocate new str_table and ext_str_table + data rather than relying upon its callers. + + use calloc in _nc_init_entry() when allocating stringbuf, to ensure + it is initialized. + + add library-level TYPE_CALLOC for consistency with TYPE_MALLOC. + + add some debug-traces for tic/infocmp. + +20220423 + + in-progress work on invalid_merge(), disable it (cf: 20220402). + + fix memory leak in _nc_tic_dir() when called from _nc_set_writedir(). + + fix memory leak in tic when "-c" option is used. + +20220416 + + add a limit-check to guard against corrupt terminfo data + (report/testcase by NCNIPC of China). + + add check/warning in configure script if option --with-xterm-kbs is + missing or inconsistent (Arch #74379). + + add setlocale call to several test-programs. + + allow extended-color number in opts parameter of wattr_on. + +20220409 + + add test/test_unget_wch.c + +20220402 + + amend extended_captype(), returning CANCEL if a string is explicitly + cancelled. + + make description-fields distinct -TD + +20220326 + + update teken -TD + + add teken-16color, teken-vt and teken-sc -TD + + add a few missing details for vte-2018 (report by Robert Lange) -TD + +20220319 + + add xgterm -TD + + correct setal in mintty/tmux entries, add to vte-2018 (report by + Robert Lange) + + add blink to vte-2018 (report by Robert Lange) + + improve tic warning about XT versus redundant tsl, etc. + +20220312 + + add xterm+acs building-block -TD + + add xterm-p370, for use in older terminals -TD + + add dec+sl to xterm-new, per xterm patch #371 -TD + + add mosh and mosh-256color -TD + +20220305 + + replace obsolescent "-gnatg" option with "-gnatwa" and "-gnatyg", to + work around build problems with gnat 12. + + update external links in Ada95.html + + trim unused return-value from canonical_name(). + +20220226 + + fix issues found with coverity: + + rewrite canonical_name() function of infocmp to ensure buffer size + + corrected use of original tty-modes in tput init/reset subcommands + + modify tabs program to limit tab-stop values to max-columns + + add limit-checks for palette rgb values in test/ncurses.c + + add a few null-pointer checks to help with static-analysis. + + enforce limit on number of soft-keys used in c++ binding. + + adjust a buffer-limit in write_entry.c to quiet a bogus warning from + gcc 12.0.1 + +20220219 + + expanded description in man/resizeterm.3x + + additional workaround for ImageMagick in test/picsmap.c + +20220212 + + improve font-formatting in other manpages, for consistency. + + correct/improve font-formatting in curs_wgetch.3x (patch by Benno + Schulenberg). + +20220205 + + workaround in test/picsmap.c for use of floating point for rgb values + by ImageMagick 6.9.11, which appears to use the wrong upper limit. + + improve use of "trap" in shell scripts, using "fixup-trap". + +20220129 + + minor updates for test-packages + + improve handling of --with-pkg-config-libdir option, allowing for the + case where either $PKG_CONFIG_LIBDIR or the option value has a + colon-separated list of directories (report by Rudi Heitbaum, + cf: 20211113). + + update kitty -TD + +20220122 + + add ABI 7 defaults to configure script. + + add warning in configure script if file specified for "--with-caps" + does not exist. + + use fix for CF_FIX_WARNINGS from cdk-perl, ignoring error-exit on + format-warnings. + + improve readability of long parameterized expressions with the + infocmp "-f" option by allowing split before a "%p" marker. + 20220115 + improve checks for valid mouse events when an intermediate mouse state is not part of the mousemask specified by the caller (report by @@ -4962,7 +5758,7 @@ it is not possible to add this information. function pointer passed to tputs(). + modify init_pair() to accept -1's for color value after assume_default_colors() has been called (Debian #337095). - + modify test/background.c, adding commmand-line options to demonstrate + + modify test/background.c, adding command-line options to demonstrate assume_default_colors() and use_default_colors(). 20110416 @@ -10697,7 +11493,7 @@ it is not possible to add this information. + add mgterm terminfo entry from NetBSD, minor adjustments to sun-ss5, aixterm entries -TD + modify tack/ansi.c to make it more tolerant of bad ANSI replies. An - example of an illegal ANSI resonse can be found using Microsoft's + example of an illegal ANSI response can be found using Microsoft's Telnet client. A correct display can be found using a VT-4xx terminal or XFree86 xterm with: XTerm*VT100*decTerminalID: 450 @@ -11591,7 +12387,7 @@ it is not possible to add this information. + correct a typo in term.7 (Todd C Miller). + add configure --with-shlib-version option to allow installing shared libraries named according to release or ABI versions. This - parameterizes some existing logic in the configure script, and is + parametrizes some existing logic in the configure script, and is intended for compatibility upgrades on Digital Unix, which used versioned libraries in ncurses 4.2, but no longer does (cf: 980425). + resync configure script against autoconf 2.13 + patches diff --git a/README b/README index 84998f23..5587f5b7 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2020,2021 Thomas E. Dickey -- +-- Copyright 2020-2021,2023 Thomas E. Dickey -- -- Copyright 1998-2012,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README,v 1.29 2021/06/17 21:20:30 tom Exp $ +-- $Id: README,v 1.31 2023/10/28 14:49:04 tom Exp $ ------------------------------------------------------------------------------- README file for the ncurses package @@ -35,18 +35,19 @@ See the file INSTALL for instructions on how to build and install ncurses. See the file NEWS for a release history and bug-fix notes. See the file TO-DO for things that still need doing, including known bugs. -Browse the file misc/ncurses-intro.html for narrative descriptions of how +Browse the file doc/html/ncurses-intro.html for narrative descriptions of how to use ncurses and the panel, menu, and form libraries. Browse the file doc/html/hackguide.html for a tour of the package internals. +Find plain text versions of both of these documents in doc/. + ROADMAP AND PACKAGE OVERVIEW: You should be reading this file in a directory called: ncurses-d.d, where d.d is the current version number (see the dist.mk file in this directory for that). There should be a number of subdirectories, including `c++', `form', -`man', `menu', `misc', `ncurses', `panel', `progs', `test', 'tack' and `Ada95'. -(The 'tack' program may be distributed separately). +`man', `menu', `misc', `ncurses', `panel', `progs', `test', and `Ada95'. A full build/install of this package typically installs several libraries, a handful of utilities, and a database hierarchy. Here is an inventory of the @@ -81,7 +82,7 @@ version. If you configure using the --enable-reentrant option, a "t" is appended to the library names (e.g., libncursest.a) and the resulting libraries have a -different binary interface which makes the ncurses interface more "opaque". +different binary interface, making the ncurses interface more opaque. The ncurses libraries implement the curses API. The panel, menu and forms libraries implement clones of the SVr4 panel, menu and forms APIs. The source @@ -89,9 +90,9 @@ code for these lives in the `ncurses', `panel', `menu', and `form' directories respectively. In the `c++' directory, you'll find code that defines an interface to the -curses, forms, menus and panels library packaged as C++ classes, and a demo program in C++ -to test it. These class definition modules are not installed by the 'make -install.libs' rule as libncurses++. +curses, forms, menus and panels library packaged as C++ classes, and a demo +program in C++ to test it. These class definition modules are not installed +by the 'make install.libs' rule as libncurses++. In the `Ada95' directory, you'll find code and documentation for an Ada95 binding of the curses API, to be used with the GNAT compiler. @@ -102,8 +103,8 @@ for documentation of the binding. To do its job, the ncurses code needs your terminal type to be set in the environment variable TERM (normally set by your OS; under UNIX, getty(1) -typically does this, but you can override it in your .profile); and, it needs a -database of terminal descriptions in which to look up your terminal type's +typically does this, but you can override it in your .profile); and, it needs +a database of terminal descriptions in which to look up your terminal type's capabilities. In older (V7/BSD) versions of curses, the database was a flat text file, @@ -117,10 +118,10 @@ second form. In the `misc' directory, there is a text file terminfo.src, in editable terminfo format, which can be used to generate the terminfo binaries (that's what make install.data does). If the package was built with the ---enable-termcap option enabled, and the ncurses library cannot find a terminfo -description for your terminal, it will fall back to the termcap file supplied -with your system (which the ncurses package installation leaves strictly -alone). +--enable-termcap option enabled, and the ncurses library cannot find a +terminfo description for your terminal, it will fall back to the termcap file +supplied with your system (which the ncurses package installation leaves +strictly alone). The utilities are as follows: @@ -176,8 +177,8 @@ Eric S. Raymond: xterm mouse support, and the ncurses test program. Juergen Pfeifer - The menu and form libraries, C++ bindings for ncurses, menus, forms and - panels, as well as the Ada95 binding. Ongoing support for panel. + The menu and form libraries, C++ bindings for ncurses, menus, forms + and panels, as well as the Ada95 binding. Ongoing support for panel. CONTRIBUTORS: @@ -216,3 +217,5 @@ BUGS: See the INSTALL file for bug and developer-list addresses. The Hacker's Guide in the doc directory includes some guidelines on how to report bugs in ways that will get them fixed most quickly. + +-- vile:txtmode fc=78 diff --git a/VERSION b/VERSION index b0eb992a..2afdc1a7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.3 20220115 +5:0:10 6.4 20240420 diff --git a/aclocal.m4 b/aclocal.m4 index 8d9a3ba2..1c2b788b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.999 2021/12/04 23:30:56 tom Exp $ +dnl $Id: aclocal.m4,v 1.1069 2024/03/30 22:15:45 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -42,7 +42,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_LANGINFO_CODESET version: 6 updated: 2021/01/01 16:53:59 +dnl AM_LANGINFO_CODESET version: 7 updated: 2023/01/11 04:05:23 dnl ------------------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -54,7 +54,9 @@ dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, - [AC_TRY_LINK([#include ], + [AC_TRY_LINK([ +$ac_includes_default +#include ], [char* cs = nl_langinfo(CODESET); (void)cs], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) @@ -65,37 +67,57 @@ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ABI_DEFAULTS version: 2 updated: 2015/06/06 13:49:58 +dnl CF_ABI_DEFAULTS version: 5 updated: 2023/10/21 08:54:23 dnl --------------- dnl Provide configure-script defaults for different ncurses ABIs. AC_DEFUN([CF_ABI_DEFAULTS],[ AC_REQUIRE([CF_NCURSES_WITH_ABI_VERSION]) -case x$cf_cv_abi_version in + +# ABI 5 defaults: +cf_dft_ccharw_max=5 +cf_dft_chtype=auto +cf_dft_ext_colors=no +cf_dft_ext_const=no +cf_dft_ext_mouse=no +cf_dft_ext_putwin=no +cf_dft_ext_spfuncs=no +cf_dft_filter_syms=no +cf_dft_interop=no +cf_dft_mmask_t=auto +cf_dft_opaque_curses=no +cf_dft_ordinate_type=short +cf_dft_signed_char=no +cf_dft_tparm_arg=long +cf_dft_widec=no +cf_dft_with_lp64=no + +# ABI 6 default differences from ABI 5: +case x$cf_cv_abi_default in (x[[6789]]) + cf_dft_chtype=uint32_t cf_dft_ext_colors=yes cf_dft_ext_const=yes cf_dft_ext_mouse=yes cf_dft_ext_putwin=yes cf_dft_ext_spfuncs=yes cf_dft_filter_syms=yes - cf_dft_chtype=uint32_t - cf_dft_mmask_t=uint32_t cf_dft_interop=yes + cf_dft_mmask_t=uint32_t + cf_dft_opaque_curses=yes cf_dft_tparm_arg=intptr_t + cf_dft_widec=yes cf_dft_with_lp64=yes ;; -(*) - cf_dft_ext_colors=no - cf_dft_ext_const=no - cf_dft_ext_mouse=no - cf_dft_ext_putwin=no - cf_dft_ext_spfuncs=no - cf_dft_filter_syms=no - cf_dft_chtype=auto - cf_dft_mmask_t=auto - cf_dft_interop=no - cf_dft_tparm_arg=long - cf_dft_with_lp64=no +esac + +# ABI 7 default differences from ABI 6: +case x$cf_cv_abi_default in +(x[[789]]) + cf_dft_ccharw_max=6 + cf_dft_mmask_t=uint64_t + cf_dft_ordinate_type=int + cf_dft_signed_char=yes + # also: remove the wgetch-events feature in ABI 7 ;; esac ])dnl @@ -576,7 +598,7 @@ AC_DEFUN([CF_AWK_BIG_PRINTF], esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18 +dnl CF_BOOL_DECL version: 9 updated: 2023/12/03 09:21:34 dnl ------------ dnl Test if 'bool' is a builtin type in the configured C++ compiler. Some dnl older compilers (e.g., gcc 2.5.8) don't support 'bool' directly; gcc @@ -591,13 +613,13 @@ AC_DEFUN([CF_BOOL_DECL], AC_MSG_CHECKING(if we should include stdbool.h) AC_CACHE_VAL(cf_cv_header_stdbool_h,[ - AC_TRY_COMPILE([],[bool foo = false], + AC_TRY_COMPILE([],[bool foo = false; (void)foo], [cf_cv_header_stdbool_h=0], [AC_TRY_COMPILE([ #ifndef __BEOS__ #include #endif -],[bool foo = false], +],[bool foo = false; (void)foo], [cf_cv_header_stdbool_h=1], [cf_cv_header_stdbool_h=0])])]) @@ -612,7 +634,7 @@ AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[ AC_TRY_COMPILE([ #include #include -],[bool x = false], +],[bool x = false; (void)x], [ifelse($1,,cf_cv_builtin_bool,[$1])=1], [ifelse($1,,cf_cv_builtin_bool,[$1])=0]) ]) @@ -623,7 +645,7 @@ else AC_MSG_RESULT(no) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BOOL_SIZE version: 18 updated: 2021/09/04 06:35:04 +dnl CF_BOOL_SIZE version: 20 updated: 2023/02/18 17:41:25 dnl ------------ dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type). dnl Don't bother looking for bool.h, since it has been deprecated. @@ -633,8 +655,7 @@ dnl from . AC_DEFUN([CF_BOOL_SIZE], [ AC_CHECK_SIZEOF(bool,,[ -#include -#include +$ac_includes_default #if defined(__cplusplus) @@ -658,8 +679,7 @@ AC_CHECK_SIZEOF(bool,,[ AC_CACHE_CHECK(for type of bool, cf_cv_type_of_bool,[ rm -f cf_test.out AC_TRY_RUN([ -#include -#include +$ac_includes_default #if defined(__cplusplus) @@ -721,7 +741,7 @@ if test "$cf_cv_type_of_bool" = unknown ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUILD_CC version: 9 updated: 2021/01/02 09:31:20 +dnl CF_BUILD_CC version: 11 updated: 2022/12/04 15:40:08 dnl ----------- dnl If we're cross-compiling, allow the user to override the tools and their dnl options. The configure script is oriented toward identifying the host @@ -787,7 +807,32 @@ if test "$cross_compiling" = yes ; then : ${BUILD_CC:='${CC}'} - if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then + AC_MSG_CHECKING(if the build-compiler "$BUILD_CC" works) + + cf_save_crossed=$cross_compiling + cf_save_ac_link=$ac_link + cross_compiling=no + cf_build_cppflags=$BUILD_CPPFLAGS + test "$cf_build_cppflags" = "#" && cf_build_cppflags= + ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&AS_MESSAGE_LOG_FD' + + AC_TRY_RUN([#include + int main(int argc, char *argv[]) + { + ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0); + } + ], + cf_ok_build_cc=yes, + cf_ok_build_cc=no, + cf_ok_build_cc=unknown) + + cross_compiling=$cf_save_crossed + ac_link=$cf_save_ac_link + + AC_MSG_RESULT($cf_ok_build_cc) + + if test "$cf_ok_build_cc" != yes + then AC_MSG_ERROR([Cross-build requires two compilers. Use --with-build-cc to specify the native compiler.]) fi @@ -813,7 +858,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23 +dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25 dnl --------------- AC_DEFUN([CF_C11_NORETURN], [ @@ -827,8 +872,7 @@ AC_MSG_RESULT($enable_stdnoreturn) if test $enable_stdnoreturn = yes; then AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, [AC_TRY_COMPILE([ -#include -#include +$ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } ], @@ -852,7 +896,7 @@ AC_SUBST(HAVE_STDNORETURN_H) AC_SUBST(STDC_NORETURN) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20 +dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -893,7 +937,7 @@ case "$CC" in AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -971,14 +1015,14 @@ AC_MSG_RESULT($includedir) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CGETENT version: 6 updated: 2017/01/21 11:06:25 +dnl CF_CGETENT version: 7 updated: 2023/02/18 17:41:25 dnl ---------- dnl Check if the terminal-capability database functions are available. If not, dnl ncurses has a much-reduced version. AC_DEFUN([CF_CGETENT],[ AC_CACHE_CHECK(for terminal-capability database functions,cf_cv_cgetent,[ AC_TRY_LINK([ -#include ],[ +$ac_includes_default],[ char temp[128]; char *buf = temp; char *db_array = temp; @@ -996,7 +1040,7 @@ then AC_CACHE_CHECK(if cgetent uses const parameter,cf_cv_cgetent_const,[ AC_TRY_LINK([ #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers" -#include ],[ +$ac_includes_default],[ char temp[128]; char *buf = temp; #ifndef _NETBSD_SOURCE /* given, since April 2004 in stdlib.h */ @@ -1051,7 +1095,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_ENVIRON version: 3 updated: 2010/05/26 16:44:57 +dnl CF_CHECK_ENVIRON version: 5 updated: 2023/02/18 17:41:25 dnl ---------------- dnl Check for data that is usually declared in , e.g., the 'environ' dnl variable. Define a DECL_xxx symbol if we must declare it ourselves. @@ -1062,11 +1106,8 @@ AC_DEFUN([CF_CHECK_ENVIRON], [ AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[ AC_TRY_COMPILE([ -#ifdef HAVE_STDLIB_H -#include -#endif -#include ], - ifelse([$2],,int,[$2]) x = (ifelse([$2],,int,[$2])) $1, +$ac_includes_default], + ifelse([$2],,void*,[$2]) x = (ifelse([$2],,void*,[$2])) $1; (void)x, [cf_cv_dcl_$1=yes], [cf_cv_dcl_$1=no]) ]) @@ -1080,7 +1121,7 @@ fi CF_CHECK_EXTERN_DATA($1,ifelse([$2],,int,[$2])) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_ERRNO version: 13 updated: 2020/03/10 18:53:47 +dnl CF_CHECK_ERRNO version: 14 updated: 2023/02/18 17:41:25 dnl -------------- dnl Check for data that is usually declared in or , e.g., dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it @@ -1092,11 +1133,7 @@ AC_DEFUN([CF_CHECK_ERRNO], [ AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[ AC_TRY_COMPILE([ -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#include +$ac_includes_default #include ], ifelse([$2],,int,[$2]) x = (ifelse([$2],,int,[$2])) $1; (void)x, [cf_cv_dcl_$1=yes], @@ -1159,7 +1196,7 @@ __attribute__ ((visibility("default"))) int somefunc() {return 42;} ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_GETENV version: 2 updated: 2021/01/02 17:09:14 +dnl CF_CHECK_GETENV version: 4 updated: 2023/12/03 10:18:09 dnl --------------- dnl Check if repeated getenv calls return the same pointer, e.g., it does not dnl discard the previous pointer when returning a new one. @@ -1170,11 +1207,7 @@ AC_CHECK_FUNC( getenv, ,, AC_MSG_ERROR(getenv not found) ) AC_CHECK_FUNCS( putenv setenv strdup ) AC_CACHE_CHECK(if getenv returns consistent values,cf_cv_consistent_getenv,[ AC_TRY_RUN([ -#include -#include -#include -#include -#include +$ac_includes_default #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ) extern char **environ; /* POSIX, but some systems are not... */ @@ -1240,7 +1273,7 @@ int main(void) } } } while (found); - sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]); + sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]); set_value(name, value); mynames[j] = str_alloc(name); myvalues[j] = str_alloc(value); @@ -1412,7 +1445,7 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_WCHAR_H version: 3 updated: 2021/01/01 13:31:04 +dnl CF_CHECK_WCHAR_H version: 5 updated: 2023/12/03 09:21:34 dnl ---------------- dnl Check if wchar.h can be used, i.e., without defining _XOPEN_SOURCE_EXTENDED AC_DEFUN([CF_CHECK_WCHAR_H],[ @@ -1423,7 +1456,7 @@ wctype.h \ AC_CACHE_CHECK(if wchar.h can be used as is,cf_cv_wchar_h_okay,[ AC_TRY_COMPILE( [ -#include +$ac_includes_default #ifdef HAVE_WCHAR_H #include #endif @@ -1432,7 +1465,7 @@ AC_TRY_COMPILE( #endif ],[ wint_t foo = 0; - int bar = iswpunct(foo)], + int bar = iswpunct(foo); (void) bar], [cf_cv_wchar_h_okay=yes], [cf_cv_wchar_h_okay=no])]) @@ -1442,7 +1475,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_WCWIDTH_GRAPHICS version: 2 updated: 2021/01/02 17:09:14 +dnl CF_CHECK_WCWIDTH_GRAPHICS version: 4 updated: 2023/12/03 10:17:07 dnl ------------------------- dnl Most "modern" terminal emulators are based to some degree on VT100, and dnl should support line-drawing. Even with Unicode. There is a problem. @@ -1540,8 +1573,9 @@ cat >conftest.in < -#include #include #define MY_LEN 80 @@ -1550,7 +1584,7 @@ int main(void) { FILE *fp; - int value; + unsigned value; char buffer[MY_LEN + 1]; char notes[MY_LEN + 1]; int totals = 0; @@ -1566,9 +1600,9 @@ main(void) fprintf(stderr, "\\t%s", buffer); } else if (sscanf(buffer, "%x %s", &value, notes) == 2) { ++totals; - if (wcwidth(value) == 1) + if (wcwidth((int)value) == 1) ++passed; - fprintf(stderr, "%d\\t%s", wcwidth(value), buffer); + fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer); } else { fprintf(stderr, "?\\t%s", buffer); } @@ -1585,7 +1619,7 @@ main(void) ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04 +dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does @@ -1607,7 +1641,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes ],[]) @@ -1653,7 +1687,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17 +dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. @@ -1688,6 +1722,7 @@ AC_TRY_COMPILE( AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( [ +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include @@ -1713,6 +1748,42 @@ esac ]) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CPP_OVERRIDE version: 1 updated: 2022/08/20 16:07:10 +dnl --------------- +dnl Check if the C++ compiler accepts the override keyword. This is a C++-11 +dnl feature. +AC_DEFUN([CF_CPP_OVERRIDE], +[ +if test -n "$CXX"; then +AC_CACHE_CHECK(if $CXX accepts override keyword,cf_cv_cpp_override,[ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_RUN([ + +class base +{ +public: + virtual int foo(float x) = 0; +}; + + +class derived: public base +{ +public: + int foo(float x) override { return x != 0.0 ? 1 : 0; } +}; + +int main(void) { } +], + [cf_cv_cpp_override=yes], + [cf_cv_cpp_override=no], + [cf_cv_cpp_override=unknown]) + AC_LANG_RESTORE +]) +fi +test "$cf_cv_cpp_override" = yes && AC_DEFINE(CPP_HAS_OVERRIDE,1,[Define to 1 if C++ has override keyword]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_CPP_PARAM_INIT version: 7 updated: 2017/01/21 11:06:25 dnl ----------------- dnl Check if the C++ compiler accepts duplicate parameter initialization. This @@ -2203,7 +2274,7 @@ AC_DEFUN([CF_ERRNO], CF_CHECK_ERRNO(errno) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ETIP_DEFINES version: 6 updated: 2021/01/02 17:09:14 +dnl CF_ETIP_DEFINES version: 7 updated: 2023/10/28 11:59:01 dnl --------------- dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between dnl math.h and builtin.h, only for ncurses @@ -2235,7 +2306,7 @@ AC_TRY_COMPILE([ ],[]) done done -AC_MSG_RESULT($cf_result) +AC_MSG_RESULT([${cf_result:-(none)}]) CXXFLAGS="$cf_save_CXXFLAGS" ]) dnl --------------------------------------------------------------------------- @@ -2423,7 +2494,7 @@ AC_DEFUN([CF_FIXUP_ADAFLAGS],[ AC_MSG_RESULT($ADAFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FIX_WARNINGS version: 3 updated: 2020/12/31 18:40:20 +dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31 dnl --------------- dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's dnl "-Werror" flags can interfere with configure-checks. Those go into @@ -2435,11 +2506,13 @@ if test "$GCC" = yes || test "$GXX" = yes then case [$]$1 in (*-Werror=*) - CF_VERBOSE(repairing $1: [$]$1) cf_temp_flags= for cf_temp_scan in [$]$1 do case "x$cf_temp_scan" in + (x-Werror=format*) + CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan) + ;; (x-Werror=*) CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan) ;; @@ -2448,16 +2521,20 @@ then ;; esac done - $1="$cf_temp_flags" - CF_VERBOSE(... fixed [$]$1) - CF_VERBOSE(... extra $EXTRA_CFLAGS) + if test "x[$]$1" != "x$cf_temp_flags" + then + CF_VERBOSE(repairing $1: [$]$1) + $1="$cf_temp_flags" + CF_VERBOSE(... fixed [$]$1) + CF_VERBOSE(... extra $EXTRA_CFLAGS) + fi ;; esac fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FOPEN_BIN_R version: 2 updated: 2019/12/31 08:53:54 +dnl CF_FOPEN_BIN_R version: 3 updated: 2023/01/05 18:05:46 dnl -------------- dnl Check if fopen works when the "b" (binary) flag is added to the mode dnl parameter. POSIX ignores the "b", which c89 specified. Some very old @@ -2465,8 +2542,10 @@ dnl systems do not accept it. AC_DEFUN([CF_FOPEN_BIN_R],[ AC_CACHE_CHECK(if fopen accepts explicit binary mode,cf_cv_fopen_bin_r,[ AC_TRY_RUN([ -#include -int main(void) { +$ac_includes_default + +int main(void) +{ FILE *fp = fopen("conftest.tmp", "wb"); int rc = 0; if (fp != 0) { @@ -2544,7 +2623,34 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_GETTTYNAM version: 1 updated: 2021/12/04 18:29:47 +dnl CF_FUNC_GETTIME version: 2 updated: 2023/02/25 08:45:56 +dnl --------------- +dnl Check for gettimeofday or clock_gettime. In 2023, the former is still more +dnl widely supported, but "deprecated" (2008), so we will use the latter if it +dnl is available, to reduce compiler warnings. +AC_DEFUN([CF_FUNC_GETTIME],[ +AC_CACHE_CHECK(for clock_gettime,cf_cv_func_clock_gettime,[ + AC_TRY_LINK([#include ], + [struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts], + [cf_cv_func_clock_gettime=yes], + [cf_cv_func_clock_gettime=no]) +]) + +if test "$cf_cv_func_clock_gettime" = yes +then + AC_DEFINE(HAVE_CLOCK_GETTIME,1,[Define to 1 if we have clock_gettime function]) +else +AC_CHECK_FUNC(gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ + +AC_CHECK_LIB(bsd, gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) + CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FUNC_GETTTYNAM version: 2 updated: 2023/01/05 18:06:28 dnl ----------------- dnl Check if the 4.3BSD function getttyname exists, as well as if dnl defines the _PATH_TTYS symbol. If the corresponding file exists, but the @@ -2575,8 +2681,10 @@ if test $cf_cv_PATH_TTYS != no then AC_CACHE_CHECK(if _PATH_TTYS file exists,cf_cv_have_PATH_TTYS,[ AC_TRY_RUN([ -#include +$ac_includes_default + #include + int main(void) { FILE *fp = fopen(_PATH_TTYS, "r"); ${cf_cv_main_return:-return} (fp == 0); @@ -2599,7 +2707,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_MEMMOVE version: 9 updated: 2017/01/21 11:06:25 +dnl CF_FUNC_MEMMOVE version: 10 updated: 2023/01/05 18:51:28 dnl --------------- dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither dnl is found, add our own version of memmove to the list of objects. @@ -2609,6 +2717,8 @@ AC_CHECK_FUNC(memmove,,[ AC_CHECK_FUNC(bcopy,[ AC_CACHE_CHECK(if bcopy does overlapping moves,cf_cv_good_bcopy,[ AC_TRY_RUN([ +$ac_includes_default + int main(void) { static char data[] = "abcdefghijklmnopqrstuwwxyz"; char temp[40]; @@ -2630,14 +2740,15 @@ int main(void) { fi ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_NANOSLEEP version: 5 updated: 2017/01/21 11:06:25 +dnl CF_FUNC_NANOSLEEP version: 6 updated: 2023/01/05 18:51:33 dnl ----------------- dnl Check for existence of workable nanosleep() function. Some systems, e.g., dnl AIX 4.x, provide a non-working version. AC_DEFUN([CF_FUNC_NANOSLEEP],[ AC_CACHE_CHECK(if nanosleep really works,cf_cv_func_nanosleep,[ AC_TRY_RUN([ -#include +$ac_includes_default + #include #include @@ -2664,7 +2775,7 @@ int main(void) { test "$cf_cv_func_nanosleep" = "yes" && AC_DEFINE(HAVE_NANOSLEEP,1,[Define to 1 if we have nanosleep()]) ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_OPENPTY version: 6 updated: 2021/01/01 13:31:04 +dnl CF_FUNC_OPENPTY version: 7 updated: 2023/12/03 09:21:34 dnl --------------- dnl Check for openpty() function, along with header. It may need the dnl "util" library as well. @@ -2681,6 +2792,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ ],[ int x = openpty((int *)0, (int *)0, (char *)0, (struct termios *)0, (struct winsize *)0); + (void)x; ],[ cf_cv_func_openpty=$cf_header break @@ -2692,7 +2804,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_POLL version: 10 updated: 2021/01/04 19:13:57 +dnl CF_FUNC_POLL version: 11 updated: 2023/01/05 18:51:40 dnl ------------ dnl See if the poll function really works. Some platforms have poll(), but dnl it does not work for terminals or files. @@ -2700,15 +2812,16 @@ AC_DEFUN([CF_FUNC_POLL],[ tty >/dev/null 2>&1 || { AC_CHECK_FUNCS(posix_openpt) } AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[ AC_TRY_RUN([ -#include -#include -#include +$ac_includes_default + #include + #ifdef HAVE_POLL_H #include #else #include #endif + int main(void) { struct pollfd myfds; int ret; @@ -2782,19 +2895,29 @@ tcgetattr(1, &foo);], test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR,1,[Define to 1 if we have tcgetattr]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_VSSCANF version: 7 updated: 2021/01/01 13:31:04 +dnl CF_FUNC_VSSCANF version: 8 updated: 2023/12/03 19:09:59 dnl --------------- dnl Check for vsscanf() function, which is in c9x but generally not in earlier -dnl versions of C. It is in the GNU C library, and can often be simulated by -dnl other functions. +dnl versions of C. It can often be simulated by other functions on older +dnl systems (where FILE is not opaque). AC_DEFUN([CF_FUNC_VSSCANF], [ AC_CACHE_CHECK(for vsscanf function or workaround,cf_cv_func_vsscanf,[ AC_TRY_LINK([ #include -#include ],[ +#include + +static void +myfunc(const char *str, const char *fmt, ...) +{ va_list ap; - vsscanf("from", "%d", ap)],[cf_cv_func_vsscanf=vsscanf],[ + va_start(ap, fmt); + vsscanf(str, fmt, ap); + va_end(ap); +} +],[ + myfunc("55", "%d"); +],[cf_cv_func_vsscanf=vsscanf],[ AC_TRY_LINK([ #include #include ],[ @@ -2857,6 +2980,7 @@ then AC_CHECKING([for $CC __attribute__ directives]) cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -2939,7 +3063,7 @@ rm -rf ./conftest* fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_VERSION version: 8 updated: 2019/09/07 13:38:36 +dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Find version of gcc, and (because icc/clang pretend to be gcc without being dnl compatible), attempt to determine if icc/clang is actually used. @@ -2948,7 +3072,7 @@ AC_REQUIRE([AC_PROG_CC]) GCC_VERSION=none if test "$GCC" = yes ; then AC_MSG_CHECKING(version of $CC) - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown AC_MSG_RESULT($GCC_VERSION) fi @@ -3531,7 +3655,7 @@ if test "$GXX" = yes; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GXX_VERSION version: 8 updated: 2017/02/11 14:48:57 +dnl CF_GXX_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Check for version of g++ AC_DEFUN([CF_GXX_VERSION],[ @@ -3539,7 +3663,7 @@ AC_REQUIRE([AC_PROG_CPP]) GXX_VERSION=none if test "$GXX" = yes; then AC_MSG_CHECKING(version of ${CXX:-g++}) - GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" if test -z "$GXX_VERSION" then GXX_VERSION=unknown @@ -3784,7 +3908,7 @@ done ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_HASHED_DB_VERSION version: 4 updated: 2014/04/12 16:47:01 +dnl CF_HASHED_DB_VERSION version: 5 updated: 2023/02/18 17:41:25 dnl -------------------- dnl Given that we have the header file for hashed database, find the version dnl information. @@ -3805,13 +3929,13 @@ $ac_includes_default #if $cf_db_version == DB_VERSION_MAJOR /* ok */ #else - make an error + #error $cf_db_version is not DB_VERSION_MAJOR #endif #else #if $cf_db_version == 1 /* ok: assuming this is DB 1.8.5 */ #else - make an error + #error $cf_db_version is not 1 #endif #endif ],[DBT *foo = 0],[ @@ -3893,7 +4017,7 @@ CPPFLAGS="-I. $CPPFLAGS" AC_SUBST(CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INSTALL_OPTS version: 2 updated: 2018/08/18 12:19:21 +dnl CF_INSTALL_OPTS version: 3 updated: 2023/06/03 15:17:30 dnl --------------- dnl prompt for/fill-in useful install-program options AC_DEFUN([CF_INSTALL_OPTS], @@ -3901,6 +4025,7 @@ AC_DEFUN([CF_INSTALL_OPTS], CF_INSTALL_OPT_S CF_INSTALL_OPT_P CF_INSTALL_OPT_O +CF_INSTALL_OPT_STRIP_PROG ])dnl dnl --------------------------------------------------------------------------- dnl CF_INSTALL_OPT_O version: 3 updated: 2020/12/31 20:19:42 @@ -3987,7 +4112,73 @@ fi AC_SUBST(INSTALL_OPT_S) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59 +dnl CF_INSTALL_OPT_STRIP_PROG version: 1 updated: 2023/06/03 15:17:30 +dnl ------------------------- +dnl Provide an option for overriding the strip program used in install "-s" +dnl +dnl coreutils install provides a --strip-program option +dnl FreeBSD uses STRIPBIN environment variable, while NetBSD and OpenBSD use +dnl STRIP environment variable. Other versions of install do not support this. +AC_DEFUN([CF_INSTALL_OPT_STRIP_PROG], +[ +AC_REQUIRE([CF_INSTALL_OPT_S]) +if test -n "$INSTALL_OPT_S" +then + AC_MSG_CHECKING(if you want to specify strip-program) + AC_ARG_WITH(strip-program, + [ --with-strip-program=XX specify program to use when stripping in install], + [with_strip_program=$withval], + [with_strip_program=no]) + AC_MSG_RESULT($with_strip_program) + if test "$with_strip_program" != no + then + AC_MSG_CHECKING(if strip-program is supported with this installer) + cf_install_program=`echo "$INSTALL" | sed -e 's%[[ ]]*[[ ]]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable[$]" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + AC_MSG_RESULT($check_install_strip) + case "$check_install_strip" in + (no) + AC_MSG_WARN($cf_install_program does not support strip program option) + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "[$]@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + CF_VERBOSE(created $INSTALL) + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi +AC_SUBST(INSTALL_OPT_S) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch @@ -4013,7 +4204,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -4025,14 +4216,14 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147" fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ISASCII version: 4 updated: 2012/10/06 17:56:13 +dnl CF_ISASCII version: 5 updated: 2023/12/03 09:21:34 dnl ---------- dnl Check if we have either a function or macro for 'isascii()'. AC_DEFUN([CF_ISASCII], [ AC_MSG_CHECKING(for isascii) AC_CACHE_VAL(cf_cv_have_isascii,[ - AC_TRY_LINK([#include ],[int x = isascii(' ')], + AC_TRY_LINK([#include ],[int x = isascii(' '); (void)x], [cf_cv_have_isascii=yes], [cf_cv_have_isascii=no]) ])dnl @@ -4040,7 +4231,7 @@ AC_MSG_RESULT($cf_cv_have_isascii) test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII,1,[Define to 1 if we have isascii()]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LARGEFILE version: 12 updated: 2020/03/19 20:23:48 +dnl CF_LARGEFILE version: 13 updated: 2023/12/03 19:09:59 dnl ------------ dnl Add checks for large file support. AC_DEFUN([CF_LARGEFILE],[ @@ -4074,11 +4265,15 @@ ifdef([AC_FUNC_FSEEKO],[ #pragma GCC diagnostic error "-Wincompatible-pointer-types" #include #include + +#ifndef __REDIRECT +/* if transitional largefile support is setup, this is true */ +extern struct dirent64 * readdir(DIR *); +#endif ],[ - /* if transitional largefile support is setup, this is true */ - extern struct dirent64 * readdir(DIR *); - struct dirent64 *x = readdir((DIR *)0); - struct dirent *y = readdir((DIR *)0); + DIR *dp = opendir("."); + struct dirent64 *x = readdir(dp); + struct dirent *y = readdir(dp); int z = x - y; (void)z; ], @@ -4249,7 +4444,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LD_SEARCHPATH version: 3 updated: 2021/03/05 19:13:35 +dnl CF_LD_SEARCHPATH version: 4 updated: 2022/08/27 15:43:08 dnl ---------------- dnl Try to obtain the linker's search-path, for use in scripts. dnl @@ -4260,7 +4455,7 @@ AC_CACHE_CHECK(for linker search path,cf_cv_ld_searchpath,[ if test "$cross_compiling" != yes ; then # GNU binutils' ld does not involve permissions which may stop ldconfig. -cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]*,,g' -e 's/"[[)]];//gp' | sort -u` +cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]*,,g' -e 's/"[[)]];//gp' | sort -u` # The -NX options tell newer versions of Linux ldconfig to not attempt to # update the cache, which makes it run faster. @@ -4408,7 +4603,7 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_RULES version: 97 updated: 2021/07/17 13:10:54 +dnl CF_LIB_RULES version: 100 updated: 2023/06/03 15:17:30 dnl ------------ dnl Append definitions and rules for the given models to the subdirectory dnl Makefiles, and the recursion rule for the top-level Makefile. If the @@ -4463,11 +4658,11 @@ do SHARED_LIB= Libs_To_Make= cf_awk_program= - if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5" + if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5" then cf_awk_program="$cf_awk_program\ -/deprecated in ABI${cf_cv_abi_version}/ { next; }\ -{ sub(\"NCURSES([[WT]]+)?\", \"&${cf_cv_abi_version}\"); }\ +/deprecated in ABI${cf_cv_abi_default}/ { next; }\ +{ sub(\"NCURSES([[WT]]+)?\", \"&${cf_cv_abi_default}\"); }\ " fi @@ -4915,22 +5110,10 @@ cat >> Makefile <> Makefile <conftest.$ac_ext < -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif +$ac_includes_default + int main(void) { int fail = 0; - char *src = "conftest.tmp"; - char *dst = "conftest.chk"; + char src[] = "conftest.tmp"; + char dst[] = "conftest.chk"; struct stat src_sb, dst_sb; FILE *fp = fopen(src, "w"); if (fp == 0) { fail = 3; } else { @@ -5498,13 +5681,16 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_FORMAT version: 15 updated: 2021/09/04 06:35:04 +dnl CF_MANPAGE_FORMAT version: 19 updated: 2024/03/30 08:27:40 dnl ----------------- dnl Option to allow user to override automatic configuration of manpage format. dnl There are several special cases: dnl -dnl gzip - man checks for, can display gzip'd files dnl compress - man checks for, can display compressed files +dnl bzip2 - man checks for, can display bzip2'd files +dnl gzip - man checks for, can display gzip'd files +dnl xz - man checks for, can display xz'd files +dnl dnl BSDI - files in the cat-directories are suffixed ".0" dnl formatted - installer should format (put files in cat-directory) dnl catonly - installer should only format, e.g., for a turnkey system. @@ -5518,8 +5704,9 @@ AC_REQUIRE([CF_PATHSEP]) AC_MSG_CHECKING(format of man-pages) AC_ARG_WITH(manpage-format, - [ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and - optionally formatted/catonly, e.g., gzip,formatted], + [ --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz, + BSDI/normal and optionally formatted/catonly, + e.g., gzip,formatted], [MANPAGE_FORMAT=$withval], [MANPAGE_FORMAT=unknown]) @@ -5549,10 +5736,12 @@ case "$MANPAGE_FORMAT" in if test "x$cf_test" = "x$cf_name" ; then case "$cf_name" in - (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; - (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; - (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; - (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; + (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";; + (*.xz) MANPAGE_FORMAT="$MANPAGE_FORMAT xz";; + (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; + (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; + (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; + (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; esac case "$cf_name" in @@ -5591,7 +5780,7 @@ case "$MANPAGE_FORMAT" in (*) for cf_option in $MANPAGE_FORMAT; do case "$cf_option" in - (gzip|compress|BSDI|normal|formatted|catonly) + (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly) ;; (*) cf_unknown="$cf_unknown $cf_option" @@ -5605,9 +5794,53 @@ AC_MSG_RESULT($MANPAGE_FORMAT) if test -n "$cf_unknown" ; then AC_MSG_WARN(Unexpected manpage-format $cf_unknown) fi + +cf_manpage_format=no +cf_manpage_inboth=no +cf_manpage_so_strip= +cf_manpage_compress= +cf_manpage_coptions= + +for cf_item in $MANPAGE_FORMAT +do +case "$cf_item" in +(catonly) + cf_manpage_format=yes + cf_manpage_inboth=no + ;; +(formatted) + cf_manpage_format=yes + cf_manpage_inboth=yes + ;; +(compress) + cf_manpage_so_strip="Z" + cf_manpage_compress=compress + ;; +(gzip) + cf_manpage_so_strip="gz" + cf_manpage_compress=gzip + cf_manpage_coptions=-n + ;; +(bzip2) + cf_manpage_so_strip="bz2" + cf_manpage_compress=bzip2 + ;; +(xz) + cf_manpage_so_strip="xz" + cf_manpage_compress=xz + ;; +esac +done + +AC_SUBST(cf_manpage_format) +AC_SUBST(cf_manpage_inboth) +AC_SUBST(cf_manpage_so_strip) +AC_SUBST(cf_manpage_compress) +AC_SUBST(cf_manpage_coptions) + ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_RENAMES version: 12 updated: 2021/01/01 16:53:59 +dnl CF_MANPAGE_RENAMES version: 17 updated: 2022/10/23 07:46:29 dnl ------------------ dnl The Debian people have their own naming convention for manpages. This dnl option lets us override the name of the file containing renaming, or @@ -5627,34 +5860,26 @@ case ".$MANPAGE_RENAMES" in (.|.yes) # Debian 'man' program? if test -f /etc/debian_version ; then - MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames + MANPAGE_RENAMES=man/man_db.renames else MANPAGE_RENAMES=no fi ;; esac -if test "$MANPAGE_RENAMES" != no ; then - if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then - MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES - elif test ! -f "$MANPAGE_RENAMES" ; then - AC_MSG_ERROR(not a filename: $MANPAGE_RENAMES) - fi - - test ! -d man && mkdir man - - # Construct a sed-script to perform renaming within man-pages - if test -n "$MANPAGE_RENAMES" ; then - test ! -d man && mkdir man - $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed - fi +if test "$MANPAGE_RENAMES" = man/man_db.renames ; then + MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES +elif test "$MANPAGE_RENAMES" = no ; then + : +elif test ! -f "$MANPAGE_RENAMES" ; then + AC_MSG_ERROR(not a filename: $MANPAGE_RENAMES) fi AC_MSG_RESULT($MANPAGE_RENAMES) AC_SUBST(MANPAGE_RENAMES) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_SYMLINKS version: 6 updated: 2015/04/17 21:13:04 +dnl CF_MANPAGE_SYMLINKS version: 7 updated: 2023/01/21 16:37:17 dnl ------------------- dnl Some people expect each tool to make all aliases for manpages in the dnl man-directory. This accommodates the older, less-capable implementations @@ -5688,7 +5913,7 @@ AC_ARG_WITH(manpage-symlinks, [MANPAGE_SYMLINKS=$withval], [MANPAGE_SYMLINKS=$cf_use_symlinks]) -if test "$$cf_use_symlinks" = no; then +if test "$cf_use_symlinks" = no; then if test "$MANPAGE_SYMLINKS" = yes ; then AC_MSG_WARN(cannot make symlinks, will use .so files) MANPAGE_SYMLINKS=no @@ -5716,7 +5941,32 @@ AC_ARG_WITH(manpage-tbl, AC_MSG_RESULT($MANPAGE_TBL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAN_PAGES version: 51 updated: 2021/01/05 16:29:19 +dnl CF_MB_LEN_MAX version: 1 updated: 2024/03/02 15:45:10 +dnl ------------- +dnl Check if defines a usable MB_LEN_MAX. That may be because it is +dnl not defined, or it may be a bogus value. +AC_DEFUN([CF_MB_LEN_MAX],[ +AC_CACHE_CHECK(if MB_LEN_MAX is usable,cf_cv_mb_len_max,[ +AC_TRY_COMPILE([ +$ac_includes_default +#include ], +[ +#if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6 + ${cf_cv_main_return:-return}(0); +#else +#error MB_LEN_MAX is not usable +#endif +], [cf_cv_mb_len_max=yes], + [cf_cv_mb_len_max=no])]) +if test "$cf_cv_mb_len_max" = yes +then + AC_DEFINE(HAVE_CONSISTENT_MB_LEN_MAX,1,[Define to 1 if MB_LEN_MAX is usable]) +else + AC_MSG_WARN(MB_LEN_MAX is missing/inconsistent in system headers) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_MAN_PAGES version: 59 updated: 2024/03/30 08:27:40 dnl ------------ dnl Try to determine if the man-pages on the system are compressed, and if dnl so, what format is used. Use this information to construct a script that @@ -5735,36 +5985,8 @@ else cf_prefix="$prefix" fi -case "$MANPAGE_FORMAT" in -(*catonly*) - cf_format=yes - cf_inboth=no - ;; -(*formatted*) - cf_format=yes - cf_inboth=yes - ;; -(*) - cf_format=no - cf_inboth=no - ;; -esac - test ! -d man && mkdir man -cf_so_strip= -cf_compress= -case "$MANPAGE_FORMAT" in -(*compress*) - cf_so_strip="Z" - cf_compress=compress - ;; -(*gzip*) - cf_so_strip="gz" - cf_compress=gzip - ;; -esac - cf_edit_man=./edit_man.sh cf_man_alias=`pwd`/man_alias.sed @@ -5782,6 +6004,7 @@ NCURSES_PATCH="$NCURSES_PATCH" NCURSES_OSPEED="$NCURSES_OSPEED" TERMINFO="$TERMINFO" +TERMINFO_DIRS="$TERMINFO_DIRS" INSTALL="$INSTALL" INSTALL_DATA="$INSTALL_DATA" @@ -5789,7 +6012,8 @@ INSTALL_DATA="$INSTALL_DATA" transform="$program_transform_name" TMP=\${TMPDIR:=/tmp}/man\$\$ -trap "rm -f \$TMP" 0 1 2 3 15 +trap "rm -f \$TMP; exit 1" 1 2 3 15 +trap "rm -f \$TMP" 0 form=\[$]1 shift || exit 1 @@ -5805,8 +6029,8 @@ top_srcdir=\[$]srcdir/.. shift || exit 1 if test "\$form" = normal ; then - if test "$cf_format" = yes ; then - if test "$cf_inboth" = no ; then + if test "$cf_manpage_format" = yes ; then + if test "$cf_manpage_inboth" = no ; then $SHELL "\[$]0" format "\$verb" "\$mandir" "\$srcdir" "\[$]@" exit $? fi @@ -5858,9 +6082,9 @@ CF_EOF2 aliases= cf_source=\`basename "\$i"\` - inalias=\$cf_source - test ! -f "\$inalias" && inalias="\$srcdir/\$inalias" - if test ! -f "\$inalias" ; then + cf_full_alias=\$cf_source + test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias" + if test ! -f "\$cf_full_alias" ; then echo ".. skipped \$cf_source" continue fi @@ -5869,8 +6093,9 @@ CF_EOF if test "$MANPAGE_ALIASES" != no ; then cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF @@ -5937,15 +6162,15 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF -if test -n "$cf_compress" ; then +if test -n "$cf_manpage_compress" ; then cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man < - #include - #include + #include + #include + #include ], [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)], [cf_cv_need_libm=no], [cf_cv_need_libm=yes])]) + if test "$cf_cv_need_libm" = yes then -ifelse($1,,[ - CF_ADD_LIB(m) -],[$1=-lm]) + + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_CACHE_CHECK(if -lm is available for math functions, + cf_cv_have_libm,[ + AC_TRY_LINK([ + #include + #include + #include + ], + [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)], + [cf_cv_have_libm=yes], + [cf_cv_have_libm=no])]) + LIBS="$cf_save_LIBS" + + if test "$cf_cv_have_libm" = yes + then + ifelse($1,,[CF_ADD_LIB(m)],[$1=-lm]) + fi +else + cf_cv_have_libm=yes +fi + +if test "$cf_cv_have_libm" = yes +then + AC_DEFINE(HAVE_MATH_FUNCS,1,[Define to 1 if math functions are available]) fi ]) dnl --------------------------------------------------------------------------- @@ -6124,7 +6383,7 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MKSTEMP version: 11 updated: 2021/01/01 13:31:04 +dnl CF_MKSTEMP version: 13 updated: 2023/12/01 17:22:50 dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). @@ -6135,17 +6394,11 @@ unistd.h \ AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ rm -rf ./conftest* AC_TRY_RUN([ -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include -#include +$ac_includes_default + int main(void) { - char *tmpl = "conftestXXXXXX"; + static char tmpl[] = "conftestXXXXXX"; char name[2][80]; int n; int result = 0; @@ -6190,7 +6443,7 @@ AC_DEFUN([CF_MSG_LOG],[ echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_ABI_6 version: 4 updated: 2021/01/01 13:31:04 +dnl CF_NCURSES_ABI_6 version: 5 updated: 2023/01/07 16:32:06 dnl ---------------- dnl Set ncurses' ABI to 6 unless overridden by explicit configure option, and dnl warn about this. @@ -6200,7 +6453,8 @@ if test "${with_abi_version+set}" != set; then (5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - AC_MSG_WARN(overriding ABI version to $cf_cv_abi_version) + cf_cv_abi_default=6 + AC_MSG_WARN(overriding ABI version to $cf_cv_abi_default) ;; esac fi @@ -6265,15 +6519,15 @@ case ".$with_cflags" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NUMBER_SYNTAX version: 2 updated: 2015/04/17 21:13:04 +dnl CF_NUMBER_SYNTAX version: 3 updated: 2023/05/06 16:14:29 dnl ---------------- -dnl Check if the given variable is a number. If not, report an error. +dnl Check if the given variable is a positive integer. Report an error if not. dnl $1 is the variable dnl $2 is the message AC_DEFUN([CF_NUMBER_SYNTAX],[ if test -n "$1" ; then - case $1 in - ([[0-9]]*) + case `echo "$1" | sed -e 's/^[[0-9]]*$/0/g'` in + (0) ;; (*) AC_MSG_ERROR($2 is not a number: $1) @@ -6304,6 +6558,21 @@ AC_DEFUN([CF_OBJ_SUBDIR], esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_OUTPUT_MANPAGE_RENAMES version: 2 updated: 2022/10/22 19:12:31 +dnl ------------------------- +dnl This runs in the output step to config.status, after man_db.renames has +dnl been generated. +AC_DEFUN([CF_OUTPUT_MANPAGE_RENAMES], +[ +AC_REQUIRE([CF_MANPAGE_RENAMES]) +if test "$MANPAGE_RENAMES" != no ; then + # Construct a sed-script to perform renaming within man-pages + test -n "$verbose" && echo "creating edit_man.sed" + test ! -d man && mkdir man + FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_PATHSEP version: 8 updated: 2021/01/01 13:31:04 dnl ---------- dnl Provide a value for the $PATH and similar separator (or amend the value @@ -6402,7 +6671,7 @@ case ".[$]$1" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 12 updated: 2021/10/10 20:18:09 +dnl CF_PKG_CONFIG version: 13 updated: 2023/10/28 11:59:01 dnl ------------- dnl Check for the package-config program, unless disabled by command-line. dnl @@ -6411,7 +6680,7 @@ AC_DEFUN([CF_PKG_CONFIG], [ AC_MSG_CHECKING(if you want to use pkg-config) AC_ARG_WITH(pkg-config, - [ --with-pkg-config{=path} enable/disable use of pkg-config], + [[ --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]], [cf_pkg_config=$withval], [cf_pkg_config=yes]) AC_MSG_RESULT($cf_pkg_config) @@ -6440,7 +6709,7 @@ fi AC_SUBST(PKG_CONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 +dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -6471,7 +6740,7 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[ CF_MSG_LOG(if the symbol is already defined go no further) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif], [cf_cv_posix_c_source=no], [cf_want_posix_source=no @@ -6490,7 +6759,7 @@ make an error if test "$cf_want_posix_source" = yes ; then AC_TRY_COMPILE([#include ],[ #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif],[], cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE") fi @@ -6501,7 +6770,7 @@ make an error CF_MSG_LOG(if the second compile does not leave our definition intact error) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif],, [cf_cv_posix_c_source=no]) CFLAGS="$cf_save_CFLAGS" @@ -6546,7 +6815,7 @@ AC_TRY_COMPILE([#include ],[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PREDEFINE version: 2 updated: 2010/05/26 16:44:57 +dnl CF_PREDEFINE version: 3 updated: 2023/02/18 17:41:25 dnl ------------ dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles. dnl @@ -6558,7 +6827,7 @@ AC_MSG_CHECKING(if we must define $1) AC_TRY_COMPILE([#include ],[ #ifndef $1 -make an error +#error $1 is not defined #endif],[cf_result=no],[cf_result=yes]) AC_MSG_RESULT($cf_result) @@ -6569,7 +6838,7 @@ elif test "x$2" != "x" ; then AC_TRY_COMPILE([#include ],[ #if $1-$2 < 0 -make an error +#error $1-$2 is negative #endif],[cf_result=yes],[cf_result=no]) AC_MSG_RESULT($cf_result) if test "$cf_result" = no ; then @@ -6820,7 +7089,7 @@ fi AC_SUBST(LDCONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_LINT version: 4 updated: 2019/11/20 18:55:37 +dnl CF_PROG_LINT version: 5 updated: 2022/08/20 15:44:13 dnl ------------ AC_DEFUN([CF_PROG_LINT], [ @@ -6831,6 +7100,7 @@ case "x$LINT" in ;; esac AC_SUBST(LINT_OPTS) +AC_SUBST(LINT_LIBS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 @@ -7153,7 +7423,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 107 updated: 2021/09/04 06:47:34 +dnl CF_SHARED_OPTS version: 111 updated: 2024/03/29 20:08:49 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -7199,9 +7469,9 @@ AC_DEFUN([CF_SHARED_OPTS], cf_ld_rpath_opt= test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" - AC_MSG_CHECKING(if release/abi version should be used for shared libs) + AC_MSG_CHECKING(whether to use release or ABI version in shared library file names) AC_ARG_WITH(shlib-version, - [ --with-shlib-version=X Specify rel or abi version for shared libs], + [[ --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names]], [test -z "$withval" && withval=auto case "$withval" in (yes) @@ -7243,7 +7513,7 @@ AC_DEFUN([CF_SHARED_OPTS], for CC_SHARED_OPTS in -fPIC -fpic '' do CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" - AC_TRY_COMPILE([#include ],[int x = 1],[break],[]) + AC_TRY_COMPILE([#include ],[int x = 1; (void)x],[break],[]) done AC_MSG_RESULT($CC_SHARED_OPTS) CFLAGS="$cf_save_CFLAGS" @@ -7613,11 +7883,11 @@ CF_EOF # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 if test "$DFT_LWR_MODEL" = "shared" ; then - LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" + LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi if test "$cf_cv_enable_rpath" = yes ; then - EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" + EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS" fi CF_SHARED_SONAME if test "$GCC" != yes; then @@ -7629,9 +7899,9 @@ CF_EOF done CFLAGS="$cf_save_CFLAGS" CC_SHARED_OPTS=$cf_shared_opts - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $[@]' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]' else - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]' + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]' fi ;; (sysv5uw7*|unix_sv*) @@ -7732,7 +8002,7 @@ define([CF_SHARED_SONAME], fi ]) dnl --------------------------------------------------------------------------- -dnl CF_SIGWINCH version: 6 updated: 2021/01/01 13:31:04 +dnl CF_SIGWINCH version: 7 updated: 2023/02/18 17:41:25 dnl ----------- dnl Use this macro after CF_XOPEN_SOURCE, but do not require it (not all dnl programs need this test). @@ -7775,7 +8045,7 @@ do #include ],[ #if SIGWINCH != $cf_sigwinch -make an error +#error SIGWINCH is not $cf_sigwinch #endif int x = SIGWINCH; (void)x], [cf_cv_fixup_sigwinch=$cf_sigwinch @@ -7907,7 +8177,7 @@ if test "$cf_cv_sizechange" != no ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SRC_MODULES version: 33 updated: 2021/01/01 13:31:04 +dnl CF_SRC_MODULES version: 34 updated: 2023/04/22 11:51:06 dnl -------------- dnl For each parameter, test if the source-directory exists, and if it contains dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll @@ -7937,14 +8207,6 @@ for cf_dir in $1 do if test -f "$srcdir/$cf_dir/modules" ; then - # We may/may not have tack in the distribution, though the - # makefile is. - if test "$cf_dir" = tack ; then - if test "x$cf_with_tack" != "xyes"; then - continue - fi - fi - if test -z "$cf_cv_src_modules"; then cf_cv_src_modules=$cf_dir else @@ -7955,9 +8217,7 @@ do # well. These are header files that are the same name as their # directory. Ncurses is the only library that does not follow # that pattern. - if test "$cf_dir" = tack ; then - continue - elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then + if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then CF_UPPER(cf_have_include,$cf_dir) AC_DEFINE_UNQUOTED(HAVE_${cf_have_include}_H) AC_DEFINE_UNQUOTED(HAVE_LIB${cf_have_include}) @@ -8092,7 +8352,7 @@ dnl Remove "-g" option from the compiler options AC_DEFUN([CF_STRIP_G_OPT], [$1=`echo "${$1}" | CF__SED_TRIMBLANKS(-e 's%-g %%' -e 's%-g$%%')`])dnl dnl --------------------------------------------------------------------------- -dnl CF_STRUCT_SIGACTION version: 5 updated: 2012/10/06 17:56:13 +dnl CF_STRUCT_SIGACTION version: 6 updated: 2023/12/03 09:21:34 dnl ------------------- dnl Check if we need _POSIX_SOURCE defined to use struct sigaction. We'll only dnl do this if we've found the sigaction function. @@ -8104,14 +8364,14 @@ AC_MSG_CHECKING(whether sigaction needs _POSIX_SOURCE) AC_TRY_COMPILE([ #include #include ], - [struct sigaction act], + [struct sigaction act; (void)act], [sigact_bad=no], [ AC_TRY_COMPILE([ #define _POSIX_SOURCE #include #include ], - [struct sigaction act], + [struct sigaction act; (void)act], [sigact_bad=yes AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE])], [sigact_bad=unknown])]) @@ -8119,7 +8379,7 @@ AC_MSG_RESULT($sigact_bad) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_STRUCT_TERMIOS version: 11 updated: 2020/03/19 20:46:13 +dnl CF_STRUCT_TERMIOS version: 13 updated: 2023/12/03 19:38:54 dnl ----------------- dnl Some machines require _POSIX_SOURCE to completely define struct termios. AC_DEFUN([CF_STRUCT_TERMIOS],[ @@ -8142,12 +8402,12 @@ if test "$ac_cv_header_termios_h" = yes ; then if test "$termios_bad" = maybe ; then AC_MSG_CHECKING(whether termios.h needs _POSIX_SOURCE) AC_TRY_COMPILE([#include ], - [struct termios foo; int x = foo.c_iflag = 1; (void)x], + [struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x], termios_bad=no, [ AC_TRY_COMPILE([ #define _POSIX_SOURCE #include ], - [struct termios foo; int x = foo.c_iflag = 2; (void)x], + [struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x], termios_bad=unknown, termios_bad=yes AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE])) ]) @@ -8199,7 +8459,7 @@ fi AC_SUBST($2) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SUBST_NCURSES_VERSION version: 10 updated: 2021/01/04 18:48:01 +dnl CF_SUBST_NCURSES_VERSION version: 11 updated: 2023/01/07 16:32:06 dnl ------------------------ dnl Get the version-number for use in shared-library naming, etc. AC_DEFUN([CF_SUBST_NCURSES_VERSION], @@ -8209,10 +8469,11 @@ NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[[ ]]*=' "$srcdir/dist.mk" | sed NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'`" NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'`" cf_cv_abi_version=${NCURSES_MAJOR} +cf_cv_abi_default=${NCURSES_MAJOR} cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} dnl Show the computed version, for logging cf_cv_timestamp=`date` -AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)) +AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)) dnl We need these values in the generated headers AC_SUBST(NCURSES_MAJOR) AC_SUBST(NCURSES_MINOR) @@ -8220,6 +8481,7 @@ AC_SUBST(NCURSES_PATCH) dnl We need these values in the generated makefiles AC_SUBST(cf_cv_rel_version) AC_SUBST(cf_cv_abi_version) +AC_SUBST(cf_cv_abi_default) AC_SUBST(cf_cv_builtin_bool) AC_SUBST(cf_cv_header_stdbool_h) AC_SUBST(cf_cv_type_of_bool)dnl @@ -8284,34 +8546,20 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TRY_XOPEN_SOURCE version: 3 updated: 2021/08/28 15:20:37 +dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, [cf_cv_xopen_source=no], [cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE) - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" ]) ]) @@ -8323,7 +8571,7 @@ if test "$cf_cv_xopen_source" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TYPEOF_CHTYPE version: 10 updated: 2017/01/21 11:06:25 +dnl CF_TYPEOF_CHTYPE version: 11 updated: 2023/01/05 17:57:59 dnl ---------------- dnl Determine the type we should use for chtype (and attr_t, which is treated dnl as the same thing). We want around 32 bits, so on most machines want a @@ -8334,8 +8582,8 @@ AC_DEFUN([CF_TYPEOF_CHTYPE], AC_MSG_CHECKING([for type of chtype]) AC_CACHE_VAL(cf_cv_typeof_chtype,[ AC_TRY_RUN([ +$ac_includes_default #define WANT_BITS 31 -#include int main(void) { FILE *fp = fopen("cf_test.out", "w"); @@ -8375,7 +8623,7 @@ AC_SUBST(cf_cv_typeof_chtype) AC_DEFINE_UNQUOTED(TYPEOF_CHTYPE,$cf_cv_typeof_chtype,[Define to actual type if needed for chtype]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TYPE_SIGACTION version: 4 updated: 2012/10/06 17:56:13 +dnl CF_TYPE_SIGACTION version: 5 updated: 2023/12/03 09:21:34 dnl ----------------- dnl AC_DEFUN([CF_TYPE_SIGACTION], @@ -8384,14 +8632,14 @@ AC_MSG_CHECKING([for type sigaction_t]) AC_CACHE_VAL(cf_cv_type_sigaction,[ AC_TRY_COMPILE([ #include ], - [sigaction_t x], + [sigaction_t x; (void)x], [cf_cv_type_sigaction=yes], [cf_cv_type_sigaction=no])]) AC_MSG_RESULT($cf_cv_type_sigaction) test "$cf_cv_type_sigaction" = yes && AC_DEFINE(HAVE_TYPE_SIGACTION,1,[Define to 1 if we have the sigaction_t type]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UNSIGNED_LITERALS version: 2 updated: 1998/02/07 22:10:16 +dnl CF_UNSIGNED_LITERALS version: 3 updated: 2023/12/03 10:02:17 dnl -------------------- dnl Test if the compiler supports 'U' and 'L' suffixes. Only old compilers dnl won't, but they're still there. @@ -8399,7 +8647,7 @@ AC_DEFUN([CF_UNSIGNED_LITERALS], [ AC_MSG_CHECKING([if unsigned literals are legal]) AC_CACHE_VAL(cf_cv_unsigned_literals,[ - AC_TRY_COMPILE([],[long x = 1L + 1UL + 1U + 1], + AC_TRY_COMPILE([],[long x = 1L + 1UL + 1U + 1; (void)x], [cf_cv_unsigned_literals=yes], [cf_cv_unsigned_literals=no]) ]) @@ -8415,7 +8663,7 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTF8_LIB version: 9 updated: 2021/05/19 19:35:25 +dnl CF_UTF8_LIB version: 10 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for multibyte support, and if not found, utf8 compatibility library AC_DEFUN([CF_UTF8_LIB], @@ -8424,8 +8672,7 @@ AC_HAVE_HEADERS(wchar.h) AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ cf_save_LIBS="$LIBS" AC_TRY_LINK([ -#include -#include +$ac_includes_default #ifdef HAVE_WCHAR_H #include #endif @@ -8628,7 +8875,7 @@ ifelse($1,,,[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WCHAR_TYPE version: 4 updated: 2012/10/06 16:39:58 +dnl CF_WCHAR_TYPE version: 5 updated: 2023/12/03 09:21:34 dnl ------------- dnl Check if type wide-character type $1 is declared, and if so, which header dnl file is needed. The second parameter is used to set a shell variable when @@ -8645,7 +8892,7 @@ AC_TRY_COMPILE([ #ifdef HAVE_LIBUTF8_H #include #endif], - [$1 state], + [$1 state; (void)state], [cf_cv_$1=no], [AC_TRY_COMPILE([ #include @@ -8655,7 +8902,7 @@ AC_TRY_COMPILE([ #ifdef HAVE_LIBUTF8_H #include #endif], - [$1 value], + [$1 value; (void) value], [cf_cv_$1=yes], [cf_cv_$1=unknown])])]) @@ -8704,7 +8951,25 @@ weak_symbol(fopen); ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ABI_VERSION version: 4 updated: 2021/01/01 13:31:04 +dnl CF_WITH_ABI_ALTERED version: 1 updated: 2023/01/07 16:32:06 +dnl ------------------- +dnl Provide a way to override the displayed ABI version, e.g., in filenames. +dnl Check this option after using the ABI version in configuration decisions. +AC_DEFUN([CF_WITH_ABI_ALTERED],[ +AC_REQUIRE([CF_WITH_ABI_VERSION]) +AC_REQUIRE([CF_ABI_DEFAULTS]) +AC_ARG_WITH(abi-altered, +[ --with-abi-altered=XXX override visible ABI version, for packaging],[ + CF_NUMBER_SYNTAX($withval,ABI altered) + if test "$cf_cv_abi_version" != "$withval" + then + AC_MSG_WARN(altering visible ABI from $cf_cv_abi_version to $withval) + cf_cv_abi_version=$withval + fi +])dnl +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_ABI_VERSION version: 5 updated: 2023/01/07 16:32:06 dnl ------------------- dnl Allow library's ABI to be overridden. Generally this happens when a dnl packager has incremented the ABI past that used in the original package, @@ -8733,28 +8998,29 @@ AC_ARG_WITH(abi-version, ifelse($1,,,[ $1_ABI=$cf_cv_abi_version ]) +cf_cv_abi_default=$cf_cv_abi_version ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_COMPILER version: 3 updated: 2023/10/28 11:59:01 dnl -------------------- dnl Command-line option to specify the Ada95 compiler. AC_DEFUN([CF_WITH_ADA_COMPILER],[ -AC_MSG_CHECKING(for ada-compiler) +AC_MSG_CHECKING(for Ada95 compiler) AC_ARG_WITH(ada-compiler, - [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)], + [[ --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)]], [cf_ada_compiler=$withval], [cf_ada_compiler=gnatmake]) AC_SUBST(cf_ada_compiler) AC_MSG_RESULT($cf_ada_compiler) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_INCLUDE version: 3 updated: 2023/10/28 11:59:01 dnl ------------------- dnl Command-line option to specify where Ada includes will install. AC_DEFUN([CF_WITH_ADA_INCLUDE],[ -AC_MSG_CHECKING(for ada-include) +AC_MSG_CHECKING(for Ada95 include directory) CF_WITH_PATH(ada-include, - [ --with-ada-include=DIR Ada includes are in DIR], + [ --with-ada-include=DIR find Ada95 includes in DIR], ADA_INCLUDE, PREFIX/share/ada/adainclude, [$]prefix/share/ada/adainclude) @@ -8762,16 +9028,16 @@ AC_SUBST(ADA_INCLUDE) AC_MSG_RESULT($ADA_INCLUDE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_LIBNAME version: 1 updated: 2019/09/07 18:59:41 +dnl CF_WITH_ADA_LIBNAME version: 3 updated: 2023/11/22 20:48:30 dnl ------------------- dnl CF_WITH_ADA_LIBNAME dnl ------------------- dnl Command-line option to specify how to name the resulting Ada library. dnl $1 = default value AC_DEFUN([CF_WITH_ADA_LIBNAME],[ -AC_MSG_CHECKING(for ada-libname) +AC_MSG_CHECKING(for Ada95 curses library name) AC_ARG_WITH(ada-libname, - [ --with-ada-libname=XXX override default Ada library-name], + [[ --with-ada-libname[=XXX] use XXX as Ada95 library name]], ADA_LIBNAME=[$]withval, ADA_LIBNAME=$1) case "x$ADA_LIBNAME" in @@ -8783,13 +9049,13 @@ AC_SUBST(ADA_LIBNAME) AC_MSG_RESULT($ADA_LIBNAME) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58 +dnl CF_WITH_ADA_OBJECTS version: 3 updated: 2023/10/28 11:59:01 dnl ------------------- dnl Command-line option to specify where Ada objects will install. AC_DEFUN([CF_WITH_ADA_OBJECTS],[ -AC_MSG_CHECKING(for ada-objects) +AC_MSG_CHECKING(for Ada95 object directory) CF_WITH_PATH(ada-objects, - [ --with-ada-objects=DIR Ada objects are in DIR], + [ --with-ada-objects=DIR find Ada95 objects in DIR], ADA_OBJECTS, PREFIX/lib/ada/adalib, [$]prefix/lib/ada/adalib) @@ -8797,28 +9063,34 @@ AC_SUBST(ADA_OBJECTS) AC_MSG_RESULT($ADA_OBJECTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_SHAREDLIB version: 5 updated: 2018/07/21 19:10:35 +dnl CF_WITH_ADA_SHAREDLIB version: 6 updated: 2023/10/28 11:59:01 dnl --------------------- -dnl Command-line option to specify if an Ada95 shared-library should be built, +dnl Command-line option to specify if an Ada95 shared library should be built, dnl and optionally what its soname should be. AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[ AC_REQUIRE([CF_GNAT_PROJECTS]) -AC_MSG_CHECKING(if an Ada95 shared-library should be built) +AC_MSG_CHECKING(whether to build an Ada95 shared library) AC_ARG_WITH(ada-sharedlib, - [ --with-ada-sharedlib=soname build shared-library (requires GNAT projects)], + [ --with-ada-sharedlib build Ada95 shared library; requires GNAT project support], [with_ada_sharedlib=$withval], [with_ada_sharedlib=no]) -AC_MSG_RESULT($with_ada_sharedlib) +cf_ada_sharedlib_warn=no if test "x$with_ada_sharedlib" != xno then if test "x$cf_gnat_projects" != xyes then - AC_MSG_WARN(disabling shared-library since GNAT projects are not supported) with_ada_sharedlib=no + cf_ada_sharedlib_warn=yes fi fi +AC_MSG_RESULT($with_ada_sharedlib) +if test "x$cf_ada_sharedlib_warn" != xno +then + AC_MSG_WARN(disabling Ada95 shared library since GNAT projects are not supported) +fi + ADA_SHAREDLIB='lib$(LIB_NAME).so.1' MAKE_ADA_SHAREDLIB="#" @@ -8865,7 +9137,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_EXPORT_SYMS version: 3 updated: 2014/12/20 19:16:08 +dnl CF_WITH_EXPORT_SYMS version: 5 updated: 2023/11/22 20:48:30 dnl ------------------- dnl Use this with libtool to specify the list of symbols that may be exported. dnl The input file contains one symbol per line; comments work with "#". @@ -8875,7 +9147,7 @@ AC_DEFUN([CF_WITH_EXPORT_SYMS], [ AC_MSG_CHECKING(if exported-symbols file should be used) AC_ARG_WITH(export-syms, - [ --with-export-syms=XXX limit exported symbols using libtool], + [[ --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE]], [with_export_syms=$withval], [with_export_syms=no]) if test "x$with_export_syms" = xyes @@ -9067,7 +9339,7 @@ AC_SUBST(LIB_UNINSTALL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL_OPTS version: 4 updated: 2015/04/17 21:13:04 +dnl CF_WITH_LIBTOOL_OPTS version: 6 updated: 2023/11/22 20:48:30 dnl -------------------- dnl Allow user to pass additional libtool options into the library creation dnl and link steps. The main use for this is to do something like @@ -9077,7 +9349,7 @@ dnl ./configure --enable-static AC_DEFUN([CF_WITH_LIBTOOL_OPTS],[ AC_MSG_CHECKING(for additional libtool options) AC_ARG_WITH(libtool-opts, - [ --with-libtool-opts=XXX specify additional libtool options], + [[ --with-libtool-opts[=XXX] give libtool additional options XXX]], [with_libtool_opts=$withval], [with_libtool_opts=no]) AC_MSG_RESULT($with_libtool_opts) @@ -9093,7 +9365,7 @@ esac AC_SUBST(LIBTOOL_OPTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIB_BASENAME version: 1 updated: 2020/03/07 20:05:14 +dnl CF_WITH_LIB_BASENAME version: 2 updated: 2023/11/22 20:48:30 dnl -------------------- dnl Allow for overriding the basename of a library, i.e., the part to which dnl prefixes/suffixes are attached. @@ -9105,7 +9377,7 @@ AC_DEFUN([CF_WITH_LIB_BASENAME], [ AC_MSG_CHECKING(for desired basename for $2 library) AC_ARG_WITH($2-libname, - [ --with-$2-libname=XXX override ifelse($3,,$2,$3) basename of library], + [[ --with-$2-libname[=XXX] override ifelse($3,,$2,$3) basename of library]], [with_lib_basename=$withval], [with_lib_basename=ifelse($3,,$2,$3)]) $1="$with_lib_basename" @@ -9293,7 +9565,7 @@ if test "x$with_pcre2" != xno ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PKG_CONFIG_LIBDIR version: 19 updated: 2021/11/20 14:57:36 +dnl CF_WITH_PKG_CONFIG_LIBDIR version: 23 updated: 2023/11/22 20:48:30 dnl ------------------------- dnl Allow the choice of the pkg-config library directory to be overridden. dnl @@ -9304,7 +9576,8 @@ dnl b) $PKG_CONFIG_LIBDIR (tested second, added if set) dnl c) builtin-list (added if $PKG_CONFIG_LIBDIR is not set) dnl dnl pkgconf (used with some systems such as FreeBSD in place of pkg-config) -dnl optionally ignores $PKG_CONFIG_LIBDIR. +dnl optionally ignores $PKG_CONFIG_LIBDIR. Very old versions of pkg-config, +dnl e.g., Solaris 10 also do not recognize $PKG_CONFIG_LIBDIR. AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[ case "$PKG_CONFIG" in @@ -9317,15 +9590,21 @@ case "$PKG_CONFIG" in esac # if $PKG_CONFIG_LIBDIR is set, try to use that -cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,'` +if test -n "$PKG_CONFIG_PATH"; then + cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'` +elif test -n "$PKG_CONFIG_LIBDIR"; then + cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'` +else + cf_search_path=auto +fi # if the option is used, let that override. otherwise default to "libdir" AC_ARG_WITH(pkg-config-libdir, - [ --with-pkg-config-libdir=XXX use given directory for installing pc-files], + [[ --with-pkg-config-libdir[=XXX] use given directory for installing pc-files]], [cf_search_path=$withval], [test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir]) -case x$cf_search_path in +case "x$cf_search_path" in (xlibdir) PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' AC_MSG_RESULT($PKG_CONFIG_LIBDIR) @@ -9333,6 +9612,9 @@ case x$cf_search_path in ;; (x) ;; +(x/*\ *) + PKG_CONFIG_LIBDIR= + ;; (x/*) PKG_CONFIG_LIBDIR="$cf_search_path" AC_MSG_RESULT($PKG_CONFIG_LIBDIR) @@ -9467,7 +9749,7 @@ if test "$with_pthread" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49 +dnl CF_WITH_REL_VERSION version: 2 updated: 2023/05/06 18:18:18 dnl ------------------- dnl Allow library's release-version to be overridden. Generally this happens when a dnl packager has incremented the release-version past that used in the original package, @@ -9487,6 +9769,7 @@ ifelse($1,,[ ],[ $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'` $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'` + test -n "$1_MINOR" || $1_MINOR=0 CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version) CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version) ]) @@ -9542,6 +9825,27 @@ AC_ARG_WITH(system-type, ]) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WITH_TYPE version: 2 updated: 2023/11/25 16:11:47 +dnl ------------ +dnl Accept a TYPE for substitution: +dnl $1 = name of type +dnl $2 = help/usage message +dnl $3 = symbol to set +dnl $4 = default value +AC_DEFUN([CF_WITH_TYPE],[ +AC_MSG_CHECKING(for type of $1) +AC_ARG_WITH([$1], [$2], + [$3="$withval"], + [$3=$4]) +AC_MSG_RESULT([$]$3) +case x[$]$3 in +(x|xyes|xno) + AC_MSG_ERROR(expected a type name for $1) + ;; +esac +AC_SUBST($3) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 dnl ---------------- AC_DEFUN([CF_WITH_VALGRIND],[ @@ -9550,7 +9854,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_VERSIONED_SYMS version: 10 updated: 2021/01/04 18:48:01 +dnl CF_WITH_VERSIONED_SYMS version: 13 updated: 2023/12/03 09:24:04 dnl ---------------------- dnl Use this when building shared library with ELF, to markup symbols with the dnl version identifier from the given input file. Generally that identifier is @@ -9563,7 +9867,7 @@ AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING(if versioned-symbols file should be used) AC_ARG_WITH(versioned-syms, - [ --with-versioned-syms=X markup versioned symbols using ld], + [[ --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE]], [with_versioned_syms=$withval], [with_versioned_syms=no]) case "x$with_versioned_syms" in @@ -9650,15 +9954,15 @@ local: EOF cat >conftest.$ac_ext <conftest.mk <],[ #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif], [cf_XOPEN_SOURCE_set=yes], [cf_XOPEN_SOURCE_set=no]) @@ -9899,7 +10220,7 @@ make an error then AC_TRY_COMPILE([#include ],[ #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif], [cf_XOPEN_SOURCE_set_ok=yes], [cf_XOPEN_SOURCE_set_ok=no]) @@ -9919,3 +10240,21 @@ dnl ------------------ dnl Trim something using sed, then trim extra whitespace dnl $1 = extra parameters, e.g., in CF_STRIP_G_OPT define([CF__SED_TRIMBLANKS],[sed ifelse($1,,,[$1] )-e 's%[[ ]]% %g' -e 's% [[ ]]*% %g' -e 's%^ %%' -e 's% [$]%%'])dnl +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl body of test when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_BODY], +[ +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif +]) +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl headers to include when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_HEAD], +[ +$ac_includes_default +]) diff --git a/announce.html.in b/announce.html.in index caaa2899..9da51191 100644 --- a/announce.html.in +++ b/announce.html.in @@ -1,7 +1,7 @@ - - + "HTML Tidy for HTML5 for Linux version 5.6.0"> A Hacker's Guide to Ncurses Internals - -

A Hacker's Guide to NCURSES

+

A Hacker's Guide to NCURSES

-

Contents

+

A Hacker's Guide to NCURSES

- + -

Abstract

+

Abstract

This document is a hacker's tour of the ncurses library and utilities. It discusses @@ -117,8 +115,8 @@ this one. anyone who is interested in porting, extending or improving the package.

-

Objective of the - Package

+

Objective of the + Package

The objective of the ncurses package is to provide a free software API for character-cell terminals and @@ -144,7 +142,7 @@ this one. — we cannot add features if it means breaking the portion of the API corresponding to historical curses versions.

-

Why System V Curses?

+

Why System V Curses?

We used System V curses as a model, reverse-engineering their API, in order to fulfill the first two objectives.

@@ -158,8 +156,8 @@ this one. So conformance with System V took us most of the way to base-level XSI conformance.

-

How to Design - Extensions

+

How to Design + Extensions

The third objective (standards conformance) requires that it be easy to condition source code using ncurses @@ -177,8 +175,8 @@ this one. library header. You can use this to condition the calls to the mouse API calls.

-

Portability and - Configuration

+

Portability and + Configuration

Code written for ncurses may assume an ANSI-standard C compiler and POSIX-compatible OS interface. It @@ -208,8 +206,8 @@ this one. (configure.in and aclocal.m4) to set up a new feature macro, which you then use to condition your code.

-

Documentation - Conventions

+

Documentation + Conventions

There are three kinds of documentation associated with this package. Each has a different preferred format:

@@ -226,7 +224,7 @@ this one.
  1. Maintain package-internal files in plain - text. The expected viewer for them more(1) or + text. The expected viewer for them is more(1) or an editor window; there is no point in elaborate mark-up.
  2. Mark up manual pages in the man macros. @@ -249,7 +247,7 @@ this one. course, it make exporting things like the announcement document to WWW pretty trivial.

    -

    How to Report Bugs

    +

    How to Report Bugs

    The reporting address for bugs is bug-ncurses-request@gnu.org with a message containing the line:

    -
    +  
                  subscribe <name>@<host.domain>
     
    -

    The ncurses code is maintained by a small group of volunteers. While we try our best to fix bugs promptly, we simply do not have a lot of hours to spend on elementary @@ -276,8 +273,7 @@ this one. tail end and have to wait a while.

      -
    1. Develop a recipe to reproduce the bug. - +
    2. Develop a recipe to reproduce the bug.

      Bugs we can reproduce are likely to be fixed very quickly, often within days. The most effective single thing you can do to get a quick fix is develop a way we can duplicate the bad @@ -287,8 +283,7 @@ this one. with the distribution.)

    3. -
    4. Try to reproduce the bug on a different terminal type. - +
    5. Try to reproduce the bug on a different terminal type.

      In our experience, most of the behaviors people report as library bugs are actually due to subtle problems in terminal descriptions. This is especially likely to be true if you are @@ -309,8 +304,7 @@ this one. triggered or masked by these.

    6. -
    7. Generate and examine a trace file for the broken behavior. - +
    8. Generate and examine a trace file for the broken behavior.

      Recompile your program with the debugging versions of the libraries. Insert a trace() call with the argument set to TRACE_UPDATE. (See

    9. -
    10. Report details and symptoms, not just interpretations. - +
    11. Report details and symptoms, not just interpretations.

      If you do the preceding two steps, it is very likely that you will discover the nature of the problem yourself and be able to send us a fix. This will create happy feelings all @@ -397,10 +390,10 @@ this one. out. You can also test the hardware-scrolling optimization separately with hardscroll.

      -

      A Tour of the Ncurses - Library

      +

      A Tour of the Ncurses + Library

      -

      Library Overview

      +

      Library Overview

      Most of the library is superstructure — fairly trivial convenience interfaces to a small set of basic functions and data @@ -495,9 +488,9 @@ this one.

      We will discuss these in the compiler tour.

      -

      The Engine Room

      +

      The Engine Room

      -

      Keyboard Input

      +

      Keyboard Input

      All ncurses input funnels through the function wgetch(), defined in lib_getch.c. This @@ -523,7 +516,7 @@ this one. The function timed_wait() effectively simulates a System V select.

      -

      Mouse Events

      +

      Mouse Events

      If the mouse interface is active, wgetch() polls for mouse events each call, before it goes to the keyboard for @@ -568,7 +561,7 @@ this one. reports (low-level events) into a gesture (a high-level or composite event).

      -

      Output and Screen Updating

      +

      Output and Screen Updating

      With the single exception of character echoes during a wgetnstr() call (which simulates cooked-mode line @@ -630,7 +623,7 @@ this one. include/curses.h.in for mask values, near the end.

      -

      The Forms and Menu Libraries

      +

      The Forms and Menu Libraries

      The forms and menu libraries should work reliably in any environment you can port ncurses to. The only portability issue @@ -647,7 +640,7 @@ this one. This version has been slightly cleaned up for ncurses.

      -

      A Tour of the Terminfo Compiler

      +

      A Tour of the Terminfo Compiler

      The ncurses implementation of tic is rather complex internally; it has to do a @@ -664,8 +657,8 @@ this one. values; the grammar above it is trivial, just "parse entries till you run out of file".

      -

      Translation of - Non-use Capabilities

      +

      Translation of + Non-use Capabilities

      Translation of most things besides use capabilities is pretty straightforward. The lexical analyzer's @@ -689,7 +682,7 @@ this one. file. We will have more to say about this in the section on Source-Form Translation.

      -

      Use Capability Resolution

      +

      Use Capability Resolution

      The background problem that makes tic tricky is not the capability translation itself, it is the resolution of @@ -744,8 +737,8 @@ this one. overwriting entries newly made during the tic run, but not about overwriting ones that predate it.

      -

      Source-Form - Translation

      +

      Source-Form + Translation

      Another use of tic is to do source translation between various termcap and terminfo formats. There @@ -773,7 +766,7 @@ this one. where the AIX box1 capability get translated to an acsc string.

      -

      Other Utilities

      +

      Other Utilities

      The infocmp utility is just a wrapper around the same entry-dumping code used by tic for @@ -787,7 +780,7 @@ this one. just do an entry load followed by a tputs() of a selected capability.

      -

      Style Tips for Developers

      +

      Style Tips for Developers

      See the TO-DO file in the top-level directory of the source distribution for additions that would be particularly useful.

      @@ -816,7 +809,7 @@ this one.

      Have fun!

      -

      Porting Hints

      +

      Porting Hints

      The following notes are intended to be a first step towards DOS and Macintosh ports of the ncurses libraries.

      diff --git a/doc/html/index.html b/doc/html/index.html index 48377819..3f35122d 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,7 +1,7 @@ - - + "HTML Tidy for HTML5 for Linux version 5.6.0"> Welcome to ncurses - -

      Welcome to ncurses

      From this index page you have access - to these further documents +

      Welcome to ncurses

      + +

      From this index page you have access to these further + documents

      • The Announcement of the current diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html deleted file mode 100644 index 8b5ee776..00000000 --- a/doc/html/man/adacurses6-config.1.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -ADACURSES 1 User Commands - - - - -

        ADACURSES 1 User Commands

        -
        -ADACURSES(1)                     User Commands                    ADACURSES(1)
        -
        -
        -
        -
        -

        NAME

        -       adacurses6-config - helper script for AdaCurses libraries
        -
        -
        -

        SYNOPSIS

        -       adacurses6-config [options]
        -
        -
        -

        DESCRIPTION

        -       This  is  a shell script which simplifies configuring an application to
        -       use the AdaCurses library binding to ncurses.
        -
        -
        -

        OPTIONS

        -       --cflags
        -              echos the gnat (Ada  compiler)  flags  needed  to  compile  with
        -              AdaCurses.
        -
        -       --libs echos the gnat libraries needed to link with AdaCurses.
        -
        -       --version
        -              echos  the  release+patchdate  version  of the ncurses libraries
        -              used to configure and build AdaCurses.
        -
        -       --help prints a list of the adacurses6-config script's options.
        -
        -       If no options are given, adacurses6-config prints  the  combination  of
        -       --cflags and --libs that gnatmake expects (see example).
        -
        -
        -

        EXAMPLE

        -       For  example,  supposing  that  you  want to compile the "Hello World!"
        -       program for AdaCurses.  Make a file named "hello.adb":
        -              with Terminal_Interface.Curses; use Terminal_Interface.Curses;
        -
        -              procedure Hello is
        -
        -                 Visibility : Cursor_Visibility := Invisible;
        -                 done : Boolean := False;
        -                 c : Key_Code;
        -
        -              begin
        -
        -                 Init_Screen;
        -                 Set_Echo_Mode (False);
        -
        -                 Set_Cursor_Visibility (Visibility);
        -                 Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
        -
        -                 Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2);
        -                 Add (Str => "Hello World!");
        -
        -                 while not done loop
        -
        -                    c := Get_Keystroke (Standard_Window);
        -                    case c is
        -                    when Character'Pos ('q') => done := True;
        -                    when others => null;
        -                    end case;
        -
        -                    Nap_Milli_Seconds (50);
        -                 end loop;
        -
        -                 End_Windows;
        -
        -              end Hello;
        -
        -       Then, using
        -              gnatmake `adacurses-config --cflags`  hello  -largs  `adacurses-
        -              config --libs`
        -
        -       or (simpler):
        -              gnatmake hello `adacurses-config`
        -
        -       you will compile and link the program.
        -
        -
        -

        SEE ALSO

        -       curses(3x)
        -
        -       This describes ncurses version 6.3 (patch 20220115).
        -
        -
        -
        -                                                                  ADACURSES(1)
        -
        - - - diff --git a/doc/html/man/adacursesw6-config.1.html b/doc/html/man/adacursesw6-config.1.html new file mode 100644 index 00000000..3c61feef --- /dev/null +++ b/doc/html/man/adacursesw6-config.1.html @@ -0,0 +1,144 @@ + + + + + + +adacursesw6\-config 1 2024-04-20 ncurses 6.4 User commands + + + + +

        adacursesw6\-config 1 2024-04-20 ncurses 6.4 User commands

        +
        +adacursesw6-config(1)            User commands           adacursesw6-config(1)
        +
        +
        +
        +
        +

        NAME

        +       adacursesw6-config - configuration helper for AdaCurses libraries
        +
        +
        +

        SYNOPSIS

        +       adacursesw6-config [--cflags] [--libs]
        +
        +       adacursesw6-config --version
        +
        +       adacursesw6-config --help
        +
        +
        +

        DESCRIPTION

        +       This  program  development  aid  simplifies  the process of configuring
        +       applications to use the AdaCurses library binding to ncurses.
        +
        +
        +

        OPTIONS

        +       --cflags   reports the GNAT (Ada compiler) flags needed to compile with
        +                  AdaCurses.
        +
        +       --libs     reports the GNAT libraries needed to link with AdaCurses.
        +
        +       --version  reports  the  release  and  patch  date  information  of the
        +                  ncurses libraries used to configure and build AdaCurses  and
        +                  exits successfully.
        +
        +       --help     issues a usage message and exits successfully.
        +
        +       Omitting options implies "--cflags --libs".
        +
        +
        +

        EXAMPLES

        +       Consider a program using AdaCurses to write the message "Hello, world!"
        +       in the center of the screen and wait for the user to press the "q"  key
        +       before exiting.  Populate a file hello.adb with the following.
        +
        +           with Terminal_Interface.Curses; use Terminal_Interface.Curses;
        +
        +           procedure Hello is
        +              Visibility : Cursor_Visibility := Invisible;
        +              Message : constant String := "Hello, World!";
        +              done : Boolean := False;
        +              c : Key_Code;
        +           begin
        +              Init_Screen;
        +              Set_Echo_Mode (False);
        +              Set_Cursor_Visibility (Visibility);
        +              Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
        +
        +              Move_Cursor (Line => Lines / 2,
        +                           Column => (Columns - Message'Length) / 2);
        +              Add (Str => Message);
        +
        +              while not done loop
        +                 c := Get_Keystroke (Standard_Window);
        +
        +                 case c is
        +                     when Character'Pos ('q') => done := True;
        +                     when others => null;
        +                 end case;
        +
        +                 Nap_Milli_Seconds (50);
        +              end loop;
        +
        +              End_Windows;
        +
        +           end Hello;
        +
        +       Then, using
        +           gnatmake `adacursesw6-config --cflags` hello \
        +               -largs `adacursesw6-config --libs`
        +       or, more simply,
        +           gnatmake hello `adacursesw6-config`
        +       you can compile and link the program.
        +
        +
        +

        SEE ALSO

        +       curses(3x)
        +
        +
        +
        +ncurses 6.4                       2024-04-20             adacursesw6-config(1)
        +
        + + + diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html index e5985f3f..fcf71ff7 100644 --- a/doc/html/man/captoinfo.1m.html +++ b/doc/html/man/captoinfo.1m.html @@ -1,7 +1,7 @@ -captoinfo 1m +captoinfo 1m 2024-03-23 ncurses 6.4 User commands -

        captoinfo 1m

        +

        captoinfo 1m 2024-03-23 ncurses 6.4 User commands

        -captoinfo(1m)                                                    captoinfo(1m)
        +captoinfo(1m)                    User commands                   captoinfo(1m)
         
         
         
        @@ -52,175 +52,163 @@
         
         
         

        SYNOPSIS

        -       captoinfo [-vn width]  [-V] [-1] [-w width] file ...
        +       captoinfo [tic-option] [file ...]
         
        +       captoinfo -V
         
        -

        DESCRIPTION

        -       captoinfo  looks in each given text file for termcap descriptions.  For
        -       each one found,  an  equivalent  terminfo  description  is  written  to
        -       standard  output.   Termcap  tc capabilities are translated directly to
        -       terminfo use capabilities.
        -
        -       If no file is given, then the environment variable TERMCAP is used  for
        -       the  filename  or entry.  If TERMCAP is a full pathname to a file, only
        -       the terminal whose name is specified in the environment  variable  TERM
        -       is  extracted  from  that file.  If the environment variable TERMCAP is
        -       not set, then the file /usr/share/terminfo is read.
        -
        -       -v   print out tracing information on standard  error  as  the  program
        -            runs.
        -
        -       -V   print  out the version of the program in use on standard error and
        -            exit.
         
        -       -1   cause the fields to print out  one  to  a  line.   Otherwise,  the
        -            fields  will be printed several to a line to a maximum width of 60
        -            characters.
        -
        -       -w   change the output to width characters.
        +

        DESCRIPTION

        +       captoinfo  translates  terminal  descriptions.   It looks in each given
        +       text file for termcap entries  and,  for  each  one  found,  writes  an
        +       equivalent terminfo description to the standard output stream.  termcap
        +       tc capabilities translate to terminfo "use" capabilities.
        +
        +       If no files are specified, captoinfo  interprets  the  content  of  the
        +       environment  variable  TERMCAP  as  a  file name, and extracts only the
        +       entry for the terminal named in the environment variable TERM from  it.
        +       If  the  environment  variable  TERMCAP  is  not  set,  captoinfo reads
        +       /etc/termcap.
        +
        +       This utility is implemented as a link to tic(1m), with the latter's  -I
        +       option  implied.  You can use other tic options such as -1, -f, -v, -w,
        +       and -x.  The -V option reports the version of ncurses  associated  with
        +       this program and exits with a successful status.
        +
        +
        +

        Translations from Nonstandard Capabilities

        +       captoinfo  translates  some  obsolete,  nonstandard  capabilities  into
        +       standard  (SVr4/XSI  Curses)  terminfo  capabilities.   It   issues   a
        +       diagnostic  to the standard error stream for each, inviting the user to
        +       check that it has not mistakenly  translated  an  unknown  or  mistyped
        +       capability name.
        +
        +                     Name
        +              Obsolete   Standard    Origin      terminfo capability
        +              ---------------------------------------------------------
        +                 BO         mr        AT&T      enter_reverse_mode
        +                 CI         vi        AT&T      cursor_invisible
        +                 CV         ve        AT&T      cursor_normal
        +                 DS         mh        AT&T      enter_dim_mode
        +                 EE         me        AT&T      exit_attribute_mode
        +                 FE         LF        AT&T      label_on
        +                 FL         LO        AT&T      label_off
        +                 XS         mk        AT&T      enter_secure_mode
        +                 EN         @7        XENIX     key_end
        +                 GE         ae        XENIX     exit_alt_charset_mode
        +                 GS         as        XENIX     enter_alt_charset_mode
        +                 HM         kh        XENIX     key_home
        +                 LD         kL        XENIX     key_dl
        +                 PD         kN        XENIX     key_npage
        +                 PN         po        XENIX     prtr_off
        +                 PS         pf        XENIX     prtr_on
        +                 PU         kP        XENIX     key_ppage
        +                 RT         @8        XENIX     kent
        +                 UP         ku        XENIX     kcuu1
        +                 KA         k;      Tektronix   key_f10
        +                 KB         F1      Tektronix   key_f11
        +                 KC         F2      Tektronix   key_f12
        +                 KD         F3      Tektronix   key_f13
        +                 KE         F4      Tektronix   key_f14
        +                 KF         F5      Tektronix   key_f15
        +                 BC         Sb      Tektronix   set_background
        +
        +                 FC         Sf      Tektronix   set_foreground
        +                 HS         mh        IRIX      enter_dim_mode
        +
        +       XENIX termcap had a set of extension capabilities, corresponding to box
        +       drawing characters of CCSID ("code page") 437, as follows.
        +
        +                      termcap Name            Graphic
        +                      -----------------------------------------
        +                           G2        upper left corner
        +                           G3        lower left corner
        +                           G1        upper right corner
        +                           G4        lower right corner
        +                           GR        tee pointing right
        +                           GL        tee pointing left
        +                           GU        tee pointing up
        +                           GD        tee pointing down
        +                           GH        horizontal line
        +                           GV        vertical line
        +                           GC        intersection
        +                           G6        double upper left corner
        +                           G7        double lower left corner
        +                           G5        double upper right corner
        +                           G8        double lower right corner
        +                           Gr        double tee pointing right
        +                           Gr        double tee pointing left
        +                           Gu        double tee pointing up
        +                           Gd        double tee pointing down
        +                           Gh        double horizontal line
        +                           Gv        double vertical line
        +                           Gc        double intersection
        +                           GG        ACS magic cookie count
        +
        +       captoinfo composes single-line capabilities into an  acsc  string,  and
        +       discards GG and double-line capabilities with a warning diagnostic.
        +
        +       IBM's  AIX  has  a  terminfo facility descended from SVr1 terminfo, but
        +       which is incompatible with the SVr4 format.  captoinfo  translates  the
        +       following AIX extensions.
        +
        +                                     IBM    XSI
        +                                    -------------
        +                                    ksel    kslt
        +                                    kbtab   kcbt
        +                                    font0   s0ds
        +                                    font1   s1ds
        +                                    font2   s2ds
        +                                    font3   s3ds
        +
        +       Additionally,  this  program  translates  the AIX box1 capability to an
        +       acsc string.
        +
        +       The  HP-UX  terminfo  library   supports   two   nonstandard   terminfo
        +       capabilities,  meml  (memory lock) and memu (memory unlock).  captoinfo
        +       discards these with a warning message.
         
         
         

        FILES

        -       /usr/share/terminfo Compiled terminal description database.
        -
        -
        -

        TRANSLATIONS FROM NONSTANDARD CAPABILITIES

        -       Some obsolete nonstandard capabilities will automatically be translated
        -       into  standard  (SVr4/XSI  Curses)  terminfo capabilities by captoinfo.
        -       Whenever one of these automatic translations is done, the program  will
        -       issue an notification to stderr, inviting the user to check that it has
        -       not mistakenly translated a completely unknown  and  random  capability
        -       and/or syntax error.
        -
        -       Nonstd   Std    From           Terminfo
        -        name    name                 capability
        -       -----------------------------------------------
        -       BO       mr     AT&T    enter_reverse_mode
        -       CI       vi     AT&T    cursor_invisible
        -       CV       ve     AT&T    cursor_normal
        -       DS       mh     AT&T    enter_dim_mode
        -       EE       me     AT&T    exit_attribute_mode
        -       FE       LF     AT&T    label_on
        -       FL       LO     AT&T    label_off
        -       XS       mk     AT&T    enter_secure_mode
        -       EN       @7     XENIX   key_end
        -       GE       ae     XENIX   exit_alt_charset_mode
        -       GS       as     XENIX   enter_alt_charset_mode
        -       HM       kh     XENIX   key_home
        -       LD       kL     XENIX   key_dl
        -       PD       kN     XENIX   key_npage
        -       PN       po     XENIX   prtr_off
        -       PS       pf     XENIX   prtr_on
        -       PU       kP     XENIX   key_ppage
        -
        -       RT       @8     XENIX   kent
        -       UP       ku     XENIX   kcuu1
        -       KA       k;     Tek     key_f10
        -       KB       F1     Tek     key_f11
        -       KC       F2     Tek     key_f12
        -       KD       F3     Tek     key_f13
        -       KE       F4     Tek     key_f14
        -       KF       F5     Tek     key_f15
        -       BC       Sb     Tek     set_background
        -       FC       Sf     Tek     set_foreground
        -       HS       mh     Iris    enter_dim_mode
        -
        -       XENIX  termcap  also  used  to have a set of extension capabilities for
        -       forms drawing, designed to take  advantage  of  the  IBM  PC  high-half
        -       graphics.  They were as follows:
        -
        -       Cap          Graphic
        -       -----------------------------
        -       G2    upper left
        -       G3    lower left
        -       G1    upper right
        -       G4    lower right
        -       GR    pointing right
        -       GL    pointing left
        -       GU    pointing up
        -       GD    pointing down
        -       GH    horizontal line
        -       GV    vertical line
        -       GC    intersection
        -       G6    upper left
        -       G7    lower left
        -       G5    upper right
        -       G8    lower right
        -       Gr    tee pointing right
        -       Gr    tee pointing left
        -       Gu    tee pointing up
        -       Gd    tee pointing down
        -       Gh    horizontal line
        -       Gv    vertical line
        -       Gc    intersection
        -       GG    acs magic cookie count
        -
        -       If   the   single-line  capabilities  occur  in  an  entry,  they  will
        -       automatically  be  composed  into  an  acsc  string.   The  double-line
        -       capabilities and GG are discarded with a warning message.
        -
        -       IBM's  AIX  has  a  terminfo  facility descended from SVr1 terminfo but
        -       incompatible with the SVr4 format.  The following  AIX  extensions  are
        -       automatically translated:
        -
        -        IBM    XSI
        -       -------------
        -       ksel    kslt
        -       kbtab   kcbt
        -       font0   s0ds
        -       font1   s1ds
        -       font2   s2ds
        -       font3   s3ds
        -
        -       Additionally,  the AIX box1 capability will be automatically translated
        -       to an acsc string.
        -
        -       Hewlett-Packard's terminfo library supports  two  nonstandard  terminfo
        -       capabilities  meml  (memory lock) and memu (memory unlock).  These will
        -       be discarded with a warning message.
        -
        -
        -

        NOTES

        -       This utility is actually a link to tic(1m), running in  -I  mode.   You
        -       can use other tic options such as -f and  -x.
        -
        -       The  verbose option is not identical to SVr4's.  Under SVr4, instead of
        -       following the -v with a trace level n, you repeat it n times.
        +       /etc/termcap
        +              default termcap terminal capability database
         
         
         

        PORTABILITY

                X/Open Curses, Issue 7 (2009) describes tic  briefly,  but  omits  this
        -       program.  SVr4 systems provide captoinfo as a separate application from
        -       tic.
        -
        -       NetBSD does not provide this application.
        +       program.
         
        +       SVr4 systems provide captoinfo as a separate application from tic.  Its
        +       -v option does not accept a trace level argument n; repeat -v  n  times
        +       instead.
         
        -

        SEE ALSO

        -       infocmp(1m), curses(3x), terminfo(5)
        -
        -       This describes ncurses version 6.3 (patch 20220115).
        +       NetBSD does not provide this application.
         
         
        -

        AUTHOR

        +

        AUTHORS

                Eric S. Raymond <esr@snark.thyrsus.com> and
                Thomas E. Dickey <dickey@invisible-island.net>
         
         
        +

        SEE ALSO

        +       infocmp(1m), tic(1m), curses(3x), terminfo(5)
        +
        +
         
        -                                                                 captoinfo(1m)
        +ncurses 6.4                       2024-03-23                     captoinfo(1m)
         
        diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html index b107bbf1..a6dbfb60 100644 --- a/doc/html/man/clear.1.html +++ b/doc/html/man/clear.1.html @@ -1,6 +1,6 @@ -clear 1 +clear 1 2024-03-16 ncurses 6.4 User commands -

        clear 1

        +

        clear 1 2024-03-16 ncurses 6.4 User commands

        -clear(1)                    General Commands Manual                   clear(1)
        +clear(1)                         User commands                        clear(1)
         
         
         
        @@ -53,108 +51,104 @@
         
         
         

        SYNOPSIS

        -       clear [-Ttype] [-V] [-x]
        +       clear [-x] [-T terminal-type]
        +
        +       clear -V
         
         
         

        DESCRIPTION

        -       clear  clears your terminal's screen if this is possible, including the
        -       terminal's scrollback  buffer  (if  the  extended  "E3"  capability  is
        -       defined).   clear  looks in the environment for the terminal type given
        -       by the environment variable TERM, and then in the terminfo database  to
        -       determine how to clear the screen.
        +       clear  clears your terminal's screen and its scrollback buffer, if any.
        +       clear retrieves the terminal type from the environment  variable  TERM,
        +       then  consults the terminfo terminal capability database entry for that
        +       type to determine how to perform these actions.
         
        -       clear  writes  to  the  standard output.  You can redirect the standard
        -       output to a file (which  prevents  clear  from  actually  clearing  the
        -       screen),  and  later  cat  the  file to the screen, clearing it at that
        -       point.
        +       The capabilities to clear the screen and scrollback  buffer  are  named
        +       "clear"   and   "E3",  respectively.   The  latter  is  a  user-defined
        +       capability, applying an extension mechanism introduced in  ncurses  5.0
        +       (1999).
         
         
         

        OPTIONS

        -       -T type
        -            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.
        +       clear recognizes the following options.
        +
        +       -T type  produces   instructions   suitable   for  the  terminal  type.
        +                Normally, this option is  unnecessary,  because  the  terminal
        +                type  is inferred from the environment variable TERM.  If this
        +                option is specified, clear ignores the  environment  variables
        +                LINES and COLUMNS as well.
        +
        +       -V       reports  the  version  of ncurses associated with this program
        +                and exits with a successful status.
         
        -       -V   reports the version of ncurses which was used in this program, and
        -            exits.  The options are as follows:
        +       -x       prevents clear from attempting to clear the scrollback buffer.
         
        -       -x   do not attempt to clear the terminal's scrollback buffer using the
        -            extended "E3" capability.
        +
        +

        PORTABILITY

        +       Neither IEEE Std 1003.1/The Open  Group  Base  Specifications  Issue  7
        +       (POSIX.1-2008) nor X/Open Curses Issue 7 documents clear.
        +
        +       The  latter documents tput, which could be used to replace this utility
        +       either via a shell script or by an alias (such as a symbolic  link)  to
        +       run tput as clear.
         
         
         

        HISTORY

        -       A  clear  command  appeared  in 2.79BSD dated February 24, 1979.  Later
        -       that was provided in Unix 8th edition (1985).
        +       A clear command using the termcap database and library appeared in 2BSD
        +       (1979).  Eighth Edition Unix (1985) later included it.
         
        -       AT&T adapted a different BSD program  (tset)  to  make  a  new  command
        -       (tput),  and used this to replace the clear command with a shell script
        -       which calls tput clear, e.g.,
        +       The commercial Unix arm of AT&T adapted a different BSD program  (tset)
        +       to  make  a  new  command,  tput, and replaced the clear program with a
        +       shell script that called "tput clear".
         
                    /usr/bin/tput ${1:+-T$1} clear 2> /dev/null
                    exit
         
                In 1989, when Keith Bostic revised the BSD  tput  command  to  make  it
        -       similar  to  the  AT&T  tput,  he  added  a  shell script for the clear
        -       command:
        +       similar to AT&T's tput, he added a clear shell script as well.
         
                    exec tput clear
         
                The remainder of the script in each case is a copyright notice.
         
        -       The ncurses clear command began in 1995 by adapting  the  original  BSD
        -       clear command (with terminfo, of course).
        -
        -       The E3 extension came later:
        +       In 1995, ncurses's clear began by adapting BSD's original clear command
        +       to use terminfo.  The E3 extension came later.
         
        -       o   In  June  1999, xterm provided an extension to the standard control
        -           sequence for clearing the screen.  Rather than  clearing  just  the
        +       o   In June 1999, xterm provided an extension to the  standard  control
        +           sequence  for  clearing  the screen.  Rather than clearing just the
                    visible part of the screen using
         
                        printf '\033[2J'
         
        -           one could clear the scrollback using
        +           one could clear the scrollback buffer as well by using
         
                        printf '\033[3J'
         
        -           This  is  documented  in  XTerm  Control  Sequences  as  a  feature
        -           originating with xterm.
        +           instead.  "XTerm  Control  Sequences"  documents  this  feature  as
        +           originating with xterm.
         
        -       o   A few other terminal developers adopted the feature, e.g., PuTTY in
        -           2006.
        +       o   A few other terminal emulators adopted it, such as PuTTY in 2006.
         
                o   In  April  2011, a Red Hat developer submitted a patch to the Linux
        -           kernel, modifying its console driver to do  the  same  thing.   The
        -           Linux  change,  part  of  the  3.0  release, did not mention xterm,
        -           although it was cited in the Red Hat bug report (#683733) which led
        -           to the change.
        +           kernel,  modifying  its  console  driver  to  do  the  same  thing.
        +           Documentation  of  this  change,  appearing  in  Linux 3.0, did not
        +           mention xterm, although that program was cited in the Red  Hat  bug
        +           report (#683733) motivating the feature.
         
        -       o   Again,  a  few  other terminal developers adopted the feature.  But
        -           the next relevant step was a change to the clear program in 2013 to
        -           incorporate this extension.
        +       o   Subsequently,  more  terminal  developers adopted the feature.  The
        +           next relevant step was to change the ncurses clear program in  2013
        +           to incorporate this extension.
         
        -       o   In  2013,  the E3 extension was overlooked in tput with the "clear"
        -           parameter.  That was addressed in  2016  by  reorganizing  tput  to
        -           share its logic with clear and tset.
        -
        -
        -

        PORTABILITY

        -       Neither IEEE Std 1003.1/The Open  Group  Base  Specifications  Issue  7
        -       (POSIX.1-2008) nor X/Open Curses Issue 7 documents tset or reset.
        -
        -       The latter documents tput, which could be used to replace this  utility
        -       either  via  a shell script or by an alias (such as a symbolic link) to
        -       run tput as clear.
        +       o   In 2013, the E3 capability was not exercised by "tput clear".  That
        +           oversight was addressed in 2016 by reorganizing tput to  share  its
        +           logic with clear and tset.
         
         
         

        SEE ALSO

        -       tput(1), terminfo(5), xterm(1).
        -
        -       This describes ncurses version 6.3 (patch 20220115).
        +       tput(1), xterm(1), terminfo(5)
         
         
         
        -                                                                      clear(1)
        +ncurses 6.4                       2024-03-16                          clear(1)
         
        diff --git a/doc/html/man/curs_add_wch.3x.html b/doc/html/man/curs_add_wch.3x.html index 7a4ad423..6b90bd0f 100644 --- a/doc/html/man/curs_add_wch.3x.html +++ b/doc/html/man/curs_add_wch.3x.html @@ -1,6 +1,7 @@ -curs_add_wch 3x +curs_add_wch 3x 2024-04-20 ncurses 6.4 Library calls -

        curs_add_wch 3x

        +

        curs_add_wch 3x 2024-04-20 ncurses 6.4 Library calls

        -curs_add_wch(3x)                                              curs_add_wch(3x)
        +curs_add_wch(3x)                 Library calls                curs_add_wch(3x)
         
         
         
         
         

        NAME

                add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, wecho_wchar - add
        -       a complex character and rendition to a curses window, then advance  the
        -       cursor
        +       a curses complex character to a window and advance the cursor
         
         
         

        SYNOPSIS

                #include <curses.h>
         
        -       int add_wch( const cchar_t *wch );
        -       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 add_wch(const cchar_t *wch);
        +       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 );
        +       int echo_wchar(const cchar_t *wch);
        +       int wecho_wchar(WINDOW *win, const cchar_t *wch);
         
         
         

        DESCRIPTION

         
         

        add_wch

        -       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-
        +       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
        -           cursor then advances to the next spacing character on the screen.
        +       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
        +           cursor then advances after this spacing character, to  prepare  for
        +           writing the next 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
        -           specified by wch is ignored.
        +           The newly added spacing character is the base of the active complex
        +           character.  Subsequent non-spacing characters can be combined  with
        +           this base until another spacing character is written to the screen,
        +           or the cursor is moved, e.g., using wmove.
        +
        +       o   If wch refers to a non-spacing character, it  is  appended  to  the
        +           active complex character, retaining the previous characters at that
        +           location.  The rendition specified by wch is ignored.
        +
        +           The cursor is not advanced after adding  a  non-spacing  character.
        +           Subsequent calls to add non-spacing characters will update the same
        +           position.
         
                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
        @@ -102,80 +111,82 @@
                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
        +                       Unicode   ASCII     acsc
        +
        +
        +       ACS Name        Default   Default   Char   Glyph Name
                ------------------------------------------------------------------------
        -       WACS_BLOCK        0x25ae     #         0       solid square block
        -       WACS_BOARD        0x2592     #         h       board of squares
        -       WACS_BTEE         0x2534     +         v       bottom tee
        -       WACS_BULLET       0x00b7     o         ~       bullet
        -       WACS_CKBOARD      0x2592     :         a       checker board (stipple)
        -       WACS_DARROW       0x2193     v         .       arrow pointing down
        -       WACS_DEGREE       0x00b0     '         f       degree symbol
        -
        -       WACS_DIAMOND      0x25c6     +         `       diamond
        -       WACS_GEQUAL       0x2265     >         >       greater-than-or-equal-to
        -       WACS_HLINE        0x2500     -         q       horizontal line
        -       WACS_LANTERN      0x2603     #         i       lantern symbol
        -       WACS_LARROW       0x2190     <         ,       arrow pointing left
        -       WACS_LEQUAL       0x2264     <         y       less-than-or-equal-to
        -       WACS_LLCORNER     0x2514     +         m       lower left-hand corner
        -       WACS_LRCORNER     0x2518     +         j       lower right-hand corner
        -       WACS_LTEE         0x2524     +         t       left tee
        -       WACS_NEQUAL       0x2260     !         |       not-equal
        -       WACS_PI           0x03c0     *         {       greek pi
        -       WACS_PLMINUS      0x00b1     #         g       plus/minus
        -       WACS_PLUS         0x253c     +         n       plus
        -       WACS_RARROW       0x2192     >         +       arrow pointing right
        -       WACS_RTEE         0x251c     +         u       right tee
        -       WACS_S1           0x23ba     -         o       scan line 1
        -       WACS_S3           0x23bb     -         p       scan line 3
        -       WACS_S7           0x23bc     -         r       scan line 7
        -       WACS_S9           0x23bd     _         s       scan line 9
        -       WACS_STERLING     0x00a3     f         }       pound-sterling symbol
        -       WACS_TTEE         0x252c     +         w       top tee
        -       WACS_UARROW       0x2191     ^         -       arrow pointing up
        -       WACS_ULCORNER     0x250c     +         l       upper left-hand corner
        -       WACS_URCORNER     0x2510     +         k       upper right-hand corner
        -       WACS_VLINE        0x2502     |         x       vertical line
        -
        -       The wide-character configuration of ncurses also  defines  symbols  for
        +       WACS_BLOCK      0x25ae    #         0      solid square block
        +       WACS_BOARD      0x2592    #         h      board of squares
        +       WACS_BTEE       0x2534    +         v      bottom tee
        +       WACS_BULLET     0x00b7    o         ~      bullet
        +       WACS_CKBOARD    0x2592    :         a      checker board (stipple)
        +       WACS_DARROW     0x2193    v         .      arrow pointing down
        +       WACS_DEGREE     0x00b0    '         f      degree symbol
        +       WACS_DIAMOND    0x25c6    +         `      diamond
        +       WACS_GEQUAL     0x2265    >         >      greater-than-or-equal-to
        +       WACS_HLINE      0x2500    -         q      horizontal line
        +       WACS_LANTERN    0x2603    #         i      lantern symbol
        +       WACS_LARROW     0x2190    <         ,      arrow pointing left
        +       WACS_LEQUAL     0x2264    <         y      less-than-or-equal-to
        +       WACS_LLCORNER   0x2514    +         m      lower left-hand corner
        +       WACS_LRCORNER   0x2518    +         j      lower right-hand corner
        +       WACS_LTEE       0x2524    +         t      left tee
        +       WACS_NEQUAL     0x2260    !         |      not-equal
        +       WACS_PI         0x03c0    *         {      greek pi
        +       WACS_PLMINUS    0x00b1    #         g      plus/minus
        +       WACS_PLUS       0x253c    +         n      plus
        +       WACS_RARROW     0x2192    >         +      arrow pointing right
        +       WACS_RTEE       0x251c    +         u      right tee
        +       WACS_S1         0x23ba    -         o      scan line 1
        +       WACS_S3         0x23bb    -         p      scan line 3
        +       WACS_S7         0x23bc    -         r      scan line 7
        +       WACS_S9         0x23bd    _         s      scan line 9
        +       WACS_STERLING   0x00a3    f         }      pound-sterling symbol
        +       WACS_TTEE       0x252c    +         w      top tee
        +       WACS_UARROW     0x2191    ^         -      arrow pointing up
        +       WACS_ULCORNER   0x250c    +         l      upper left-hand corner
        +       WACS_URCORNER   0x2510    +         k      upper right-hand corner
        +       WACS_VLINE      0x2502    |         x      vertical line
        +
        +       The wide-character configuration of ncurses also  defines  symbols  for
                thick lines (acsc "J" to "V"):
         
        -       ACS               Unicode   ASCII     acsc    Glyph
        -       Name              Default   Default   char    Name
        -       -----------------------------------------------------------------------
        -       WACS_T_BTEE       0x253b    +         V       thick tee pointing up
        -       WACS_T_HLINE      0x2501    -         Q       thick horizontal line
        -       WACS_T_LLCORNER   0x2517    +         M       thick lower left corner
        -       WACS_T_LRCORNER   0x251b    +         J       thick lower right corner
        -       WACS_T_LTEE       0x252b    +         T       thick tee pointing right
        -       WACS_T_PLUS       0x254b    +         N       thick large plus
        -       WACS_T_RTEE       0x2523    +         U       thick tee pointing left
        -       WACS_T_TTEE       0x2533    +         W       thick tee pointing down
        -       WACS_T_ULCORNER   0x250f    +         L       thick upper left corner
        -       WACS_T_URCORNER   0x2513    +         K       thick upper right corner
        -       WACS_T_VLINE      0x2503    |         X       thick vertical line
        +                         Unicode   ASCII     acsc
        +       ACS Name          Default   Default   Char   Glyph Name
        +       ------------------------------------------------------------------------
        +       WACS_T_BTEE       0x253b    +         V      thick tee pointing up
        +       WACS_T_HLINE      0x2501    -         Q      thick horizontal line
        +       WACS_T_LLCORNER   0x2517    +         M      thick lower left corner
        +       WACS_T_LRCORNER   0x251b    +         J      thick lower right corner
        +       WACS_T_LTEE       0x252b    +         T      thick tee pointing right
        +       WACS_T_PLUS       0x254b    +         N      thick large plus
        +       WACS_T_RTEE       0x2523    +         U      thick tee pointing left
        +       WACS_T_TTEE       0x2533    +         W      thick tee pointing down
        +       WACS_T_ULCORNER   0x250f    +         L      thick upper left corner
        +       WACS_T_URCORNER   0x2513    +         K      thick upper right corner
        +       WACS_T_VLINE      0x2503    |         X      thick vertical line
         
                and for double-lines (acsc "A" to "I"):
         
        -       ACS               Unicode   ASCII     acsc    Glyph
        -       Name              Default   Default   char    Name
        +                         Unicode   ASCII     acsc
        +       ACS Name          Default   Default   Char   Glyph Name
                ------------------------------------------------------------------------
        -       WACS_D_BTEE       0x2569    +         H       double tee pointing up
        -       WACS_D_HLINE      0x2550    -         R       double horizontal line
        -       WACS_D_LLCORNER   0x255a    +         D       double lower left corner
        -       WACS_D_LRCORNER   0x255d    +         A       double lower right corner
        -       WACS_D_LTEE       0x2560    +         F       double tee pointing right
        -       WACS_D_PLUS       0x256c    +         E       double large plus
        -       WACS_D_RTEE       0x2563    +         G       double tee pointing left
        -       WACS_D_TTEE       0x2566    +         I       double tee pointing down
        -       WACS_D_ULCORNER   0x2554    +         C       double upper left corner
        -       WACS_D_URCORNER   0x2557    +         B       double upper right corner
        -       WACS_D_VLINE      0x2551    |         Y       double vertical line
        +       WACS_D_BTEE       0x2569    +         H      double tee pointing up
        +       WACS_D_HLINE      0x2550    -         R      double horizontal line
        +       WACS_D_LLCORNER   0x255a    +         D      double lower left corner
        +       WACS_D_LRCORNER   0x255d    +         A      double lower right corner
        +       WACS_D_LTEE       0x2560    +         F      double tee pointing right
        +       WACS_D_PLUS       0x256c    +         E      double large plus
        +       WACS_D_RTEE       0x2563    +         G      double tee pointing left
        +
        +       WACS_D_TTEE       0x2566    +         I      double tee pointing down
        +       WACS_D_ULCORNER   0x2554    +         C      double upper left corner
        +       WACS_D_URCORNER   0x2557    +         B      double upper right corner
        +       WACS_D_VLINE      0x2551    |         Y      double vertical line
         
                Unicode's  descriptions  for  these  characters  differs  slightly from
        -       ncurses, by introducing the term "light"  (along  with  less  important
        +       ncurses, by introducing the term "light"  (along  with  less  important
                details).   Here are its descriptions for the normal, thick, and double
                horizontal lines:
         
        @@ -189,8 +200,8 @@
         

        RETURN VALUE

                All routines return the integer ERR upon failure and OK on success.
         
        -       X/Open does not  define  any  error  conditions.   This  implementation
        -       returns an error
        +       X/Open  Curses  does  not   specify   any   error   conditions.    This
        +       implementation returns an error
         
                o   if the window pointer is null or
         
        @@ -198,17 +209,16 @@
         
                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  scrollok(3x)  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.
        +       Functions  prefixed with "mv" first perform cursor movement and fail if
        +       the position (y, x) is outside the window boundaries.
         
         
         

        NOTES

        @@ -216,41 +226,42 @@
         
         
         

        PORTABILITY

        -       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.
        +       These functions are described in X/Open Curses, Issue 4.  The  defaults
        +       specified for line-drawing characters apply in the POSIX locale.
         
        +
        +

        WACS Symbols

                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
        +       o   HP-UX  curses  equates  some  of  the ACS_ symbols to the analogous
        +           WACS_ 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,
        +       X/Open Curses does not specify  symbols  for  thick-  or  double-lines.
        +       SVr4 curses implementations defined their line-drawing symbols in terms
        +       of intermediate symbols.  This implementation  extends  those  symbols,
                providing new definitions which are not in the SVr4 implementations.
         
                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
        +       Existing  implementations of Unix curses (AIX, HP-UX, 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
        +       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.
        +       environment  variable  NCURSES_NO_UTF8_ACS.   In contrast, for the same
        +       cases, the line-drawing characters described in addch(3x) will use only
        +       the ASCII default values.
         
                Having  Unicode available does not solve all of the problems with line-
                drawing for curses:
        @@ -284,13 +295,40 @@
                    and horizontal), and  U+2612 (ballot box with x).
         
         
        +

        Complex Characters

        +       The complex character  type  cchar_t  can  store  more  than  one  wide
        +       character  (wchar_t).   The  X/Open Curses description does not mention
        +       this possibility, describing only the cases  where  wch  is  a  spacing
        +       character or a non-spacing character.
        +
        +       This implementation assumes that wch is constructed using setcchar(3x),
        +       and in turn that the result
        +
        +       o   contains at most one spacing character in the beginning of its list
        +           of wide characters, and zero or more non-spacing characters or
        +
        +       o   may hold one non-spacing character.
        +
        +       In  the  latter  case,  ncurses  adds  the non-spacing character to the
        +       active (base) spacing character.
        +
        +
        +

        TABSIZE

        +       The TABSIZE variable is implemented  in  SVr4  and  other  versions  of
        +       curses, but is not specified by X/Open Curses (see curs_variables(3x)).
        +
        +
         

        SEE ALSO

        -       curses(3x), curs_addch(3x), curs_attr(3x), curs_clear(3x),
        -       curs_outopts(3x), curs_refresh(3x), putwc(3)
        +       curs_addch(3x) describes comparable functions of the ncurses library in
        +       its non-wide-character configuration.
         
        +       curses(3x),   curs_addwstr(3x),   curs_add_wchstr(3x),   curs_attr(3x),
        +       curs_clear(3x),  curs_getcchar(3x), curs_outopts(3x), curs_refresh(3x),
        +       curs_variables(3x), putwc(3)
         
         
        -                                                              curs_add_wch(3x)
        +
        +ncurses 6.4                       2024-04-20                  curs_add_wch(3x)
         
        diff --git a/doc/html/man/curs_add_wchstr.3x.html b/doc/html/man/curs_add_wchstr.3x.html index a3894caf..aa3ebaf5 100644 --- a/doc/html/man/curs_add_wchstr.3x.html +++ b/doc/html/man/curs_add_wchstr.3x.html @@ -1,6 +1,6 @@ -curs_add_wchstr 3x +curs_add_wchstr 3x 2024-04-20 ncurses 6.4 Library calls -

        curs_add_wchstr 3x

        +

        curs_add_wchstr 3x 2024-04-20 ncurses 6.4 Library calls

        -curs_add_wchstr(3x)                                        curs_add_wchstr(3x)
        +curs_add_wchstr(3x)              Library calls             curs_add_wchstr(3x)
         
         
         
         
         

        NAME

        -       add_wchstr, add_wchnstr, wadd_wchstr, wadd_wchnstr, mvadd_wchstr,
        -       mvadd_wchnstr, mvwadd_wchstr, mvwadd_wchnstr - add an array of complex
        -       characters (and attributes) to a curses window
        +       add_wchstr,   add_wchnstr,   wadd_wchstr,  wadd_wchnstr,  mvadd_wchstr,
        +       mvadd_wchnstr, mvwadd_wchstr, mvwadd_wchnstr -  add  a  curses  complex
        +       character string to a window
         
         
         

        SYNOPSIS

                #include <curses.h>
         
                int add_wchstr(const cchar_t *wchstr);
        -       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);
        +
        +       int add_wchnstr(const cchar_t *wchstr, int n);
        +       int wadd_wchnstr(WINDOW * win, const cchar_t *wchstr, int n);
        +       int mvadd_wchnstr(int y, int x, const cchar_t *wchstr, int n);
                int mvwadd_wchnstr(WINDOW *win, int y, int x, const cchar_t *wchstr, int n);
         
         
         

        DESCRIPTION

                These  functions copy the (null-terminated) array of complex characters
                wchstr into the window image structure starting at the  current  cursor
        -       position.   The four functions with n as the last argument copy at most
        -       n elements, but no more than will fit on the line.  If  n=-1  then  the
        -       whole  array  is  copied, to the maximum number of characters that will
        -       fit on the line.
        +       position.
        +
        +       The four functions with n as the last argument copy at most n elements,
        +       but no more than will fit on the line.  If n=-1 then the whole array is
        +       copied, to the maximum number of characters that will fit on the line.
         
        -       The window cursor is not advanced.  These functions  work  faster  than
        +       The  window  cursor  is  not advanced.  These functions are faster than
                waddnstr.  On the other hand:
         
        -       o   they  do  not perform checking (such as for the newline, backspace,
        +       o   they do not perform checking (such as for the  newline,  backspace,
                    or carriage return characters),
         
                o   they do not advance the current cursor position,
         
                o   they do not expand other control characters to ^-escapes, and
         
        -       o   they truncate the string if it crosses  the  right  margin,  rather
        +       o   they  truncate  the  string  if it crosses the right margin, rather
                    than wrapping it around to the new line.
         
        -       These  functions  end  successfully  on encountering a null cchar_t, or
        -       when they have filled the current line.  If a complex character  cannot
        -       completely  fit  at  the end of the current line, the remaining columns
        +       These functions end successfully on encountering  a  null  cchar_t,  or
        +       when  they have filled the current line.  If a complex character cannot
        +       completely fit at the end of the current line,  the  remaining  columns
                are filled with the background character and rendition.
         
         
         

        RETURN VALUE

                All functions return the integer ERR upon failure and OK on success.
         
        -       X/Open does not define any error conditions.  This  implementation  re-
        -       turns an error if the window pointer is null.
        +       X/Open   Curses   does   not   specify   any  error  conditions.   This
        +       implementation returns an error
        +
        +       o   if the win parameter is null or
        +
        +       o   if the wchstr parameter is null.
         
        -       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.
        +       Functions prefixed with "mv" first perform cursor movement and fail  if
        +       the position (y, x) is outside the window boundaries.
         
         
         

        NOTES

        @@ -109,18 +113,18 @@
         
         
         

        PORTABILITY

        -       These entry points are described in the XSI Curses standard, Issue 4.
        +       These functions are described in X/Open Curses, Issue 4.
         
         
         

        SEE ALSO

        -       curses(3x), curs_addwstr(3x).
        +       curs_addchstr(3x) describes comparable functions of the ncurses library
        +       in its non-wide-character configuration.
         
        -       Comparable  functions in the narrow-character (ncurses) library are de-
        -       scribed in curs_addchstr(3x).
        +       curses(3x), curs_addwstr(3x), curs_add_wch(3x)
         
         
         
        -                                                           curs_add_wchstr(3x)
        +ncurses 6.4                       2024-04-20               curs_add_wchstr(3x)
         
    -

    Selecting items

    +

    Selecting items

    Menus may be multi-valued or (the default) single-valued (see the manual page menu_opts(3x) to see how to change @@ -1654,7 +1634,7 @@ static void finish(int sig) so far defined for menus, but it is good practice to code as though other option bits might be on.

    -

    Menu Display

    +

    Menu Display

    The menu library calculates a minimum display size for your window, based on the following variables:

    @@ -1710,7 +1690,7 @@ static void finish(int sig) which the library allows you to change (see the menu_attribs(3x) manual page.

    -

    Menu Windows

    +

    Menu Windows

    Each menu has, as mentioned previously, a pair of associated windows. Both these windows are painted when the menu is posted @@ -1732,7 +1712,7 @@ static void finish(int sig) the screen. To do that, call wrefresh() or some equivalent.

    -

    Processing Menu Input

    +

    Processing Menu Input

    The main loop of your menu-processing code should call menu_driver() repeatedly. The first argument of this @@ -1784,7 +1764,7 @@ static void finish(int sig) commands. The menu_driver() code ignores them and returns E_UNKNOWN_COMMAND.

    -

    Miscellaneous Other Features

    +

    Miscellaneous Other Features

    Various menu options can affect the processing and visual appearance and input processing of menus. See menu_opts(3x) @@ -1807,7 +1787,7 @@ static void finish(int sig) mitem_userptr(3x) and menu_userptr(3x).

    -

    The Forms Library

    +

    The Forms Library

    The form library is a curses extension that supports easy programming of on-screen forms for data entry and @@ -1817,16 +1797,15 @@ static void finish(int sig) System V. The version documented here is the form code distributed with ncurses.

    -

    Compiling With the form - Library

    +

    Compiling With the form + Library

    Your form-using modules must import the form library declarations with

    -
    +  
               #include <form.h>
     
    -

    and must be linked explicitly with the forms library using an -lform argument. Note that they must also link the ncurses library with -lncurses. Many @@ -1834,7 +1813,7 @@ static void finish(int sig) still good practice to put -lform first and -lncurses second.

    -

    Overview of Forms

    +

    Overview of Forms

    A form is a collection of fields; each field may be either a label (explanatory text) or a data-entry location. Long forms may @@ -1903,19 +1882,18 @@ static void finish(int sig) Besides menu-like navigation operations, the menu driver loop has to support field editing and data validation.

    -

    Creating and Freeing Fields - and Forms

    +

    Creating and Freeing Fields + and Forms

    The basic function for creating fields is new_field():

    -
    +  
     FIELD *new_field(int height, int width,   /* new field size */
                      int top, int left,       /* upper left corner */
                      int offscreen,           /* number of offscreen rows */
                      int nbuf);               /* number of working buffers */
     
    -

    Menu items always occupy a single row, but forms fields may have multiple rows. So new_field() requires you to specify a width and height (the first two arguments, which mist @@ -1943,21 +1921,19 @@ FIELD *new_field(int height, int width, /* new field size */ buffers to allocate for the field; your application can use them for its own purposes.

    -
    +  
     FIELD *dup_field(FIELD *field,            /* field to copy */
                      int top, int left);      /* location of new copy */
     
    -

    The function dup_field() duplicates an existing field at a new location. Size and buffering information are copied; some attribute flags and status bits are not (see the form_field_new(3X) for details).

    -
    +  
     FIELD *link_field(FIELD *field,           /* field to copy */
                       int top, int left);     /* location of new copy */
     
    -

    The function link_field() also duplicates an existing field at a new location. The difference from dup_field() is that it arranges for the new field's @@ -1978,10 +1954,9 @@ FIELD *link_field(FIELD *field, /* field to copy */

    To connect fields to a form, use

    -
    +  
     FORM *new_form(FIELD **fields);
     
    -

    This function expects to see a NULL-terminated array of field pointers. Said fields are connected to a newly-allocated form object; its address is returned (or else NULL if the allocation @@ -1999,8 +1974,8 @@ FORM *new_form(FIELD **fields); form, but not vice-versa; thus, you will generally free your form objects first.

    -

    Fetching and Changing - Field Attributes

    +

    Fetching and Changing + Field Attributes

    Each form field has a number of location and size attributes associated with it. There are other field attributes used to @@ -2016,56 +1991,53 @@ FORM *new_form(FIELD **fields); to it persist as defaults until your forms application terminates.

    -

    Fetching Size and Location - Data

    +

    Fetching Size and Location + Data

    You can retrieve field sizes and locations through:

    -
    +  
     int field_info(FIELD *field,              /* field from which to fetch */
                    int *height, *int width,   /* field size */
                    int *top, int *left,       /* upper left corner */
                    int *offscreen,            /* number of offscreen rows */
                    int *nbuf);                /* number of working buffers */
     
    -

    This function is a sort of inverse of new_field(); instead of setting size and location attributes of a new field, it fetches them from an existing one.

    -

    Changing the Field - Location

    +

    Changing the Field + Location

    It is possible to move a field's location on the screen:

    -
    +  
     int move_field(FIELD *field,              /* field to alter */
                    int top, int left);        /* new upper-left corner */
     
    -

    You can, of course. query the current location through field_info().

    -

    The Justification Attribute

    +

    The Justification Attribute

    One-line fields may be unjustified, justified right, justified left, or centered. Here is how you manipulate this attribute:

    -
    +  
     int set_field_just(FIELD *field,          /* field to alter */
                        int justmode);         /* mode to set */
     
     int field_just(FIELD *field);             /* fetch mode of field */
     
    -

    The mode values accepted and returned by this functions are preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER.

    -

    Field Display - Attributes

    +

    Field Display + Attributes

    For each field, you can set a foreground attribute for entered characters, a background attribute for the entire field, and a @@ -2076,7 +2048,7 @@ int field_just(FIELD *field); /* fetch mode of field */ appearance of the field on the screen, without affecting in any way the data in the field buffer.

    -
    +  
     int set_field_fore(FIELD *field,          /* field to alter */
                        chtype attr);          /* attribute to set */
     
    @@ -2097,20 +2069,19 @@ int set_new_page(FIELD *field,            /* field to alter */
     
     chtype new_page(FIELD *field);            /* field to query */
     
    -

    The attributes set and returned by the first four functions are normal curses(3x) display attribute values (A_STANDOUT, A_BOLD, A_REVERSE etc). The page bit of a field controls whether it is displayed at the start of a new form screen.

    -

    Field Option Bits

    +

    Field Option Bits

    There is also a large collection of field option bits you can set to control various aspects of forms processing. You can manipulate them with these functions:

    -
    +  
     int set_field_opts(FIELD *field,          /* field to alter */
                        int attr);             /* attribute to set */
     
    @@ -2122,7 +2093,6 @@ int field_opts_off(FIELD *field,          /* field to alter */
     
     int field_opts(FIELD *field);             /* field to query */
     
    -

    By default, all options are on. Here are the available option bits:

    @@ -2209,19 +2179,18 @@ int field_opts(FIELD *field); /* field to query */

    The option values are bit-masks and can be composed with logical-or in the obvious way.

    -

    Field Status

    +

    Field Status

    Every field has a status flag, which is set to FALSE when the field is created and TRUE when the value in field buffer 0 changes. This flag can be queried and set directly:

    -
    +  
     int set_field_status(FIELD *field,      /* field to alter */
                        int status);         /* mode to set */
     
     int field_status(FIELD *field);         /* fetch mode of field */
     
    -

    Setting this flag under program control can be useful if you use the same form repeatedly, looking for modified fields each time.

    @@ -2238,14 +2207,14 @@ int field_status(FIELD *field); /* fetch mode of field */ just after a REQ_VALIDATION request has been processed by the forms driver.

    -

    Field User Pointer

    +

    Field User Pointer

    Each field structure contains one character pointer slot that is not used by the forms library. It is intended to be used by applications to store private per-field data. You can manipulate it with:

    -
    +  
     int set_field_userptr(FIELD *field,       /* field to alter */
                        char *userptr);        /* mode to set */
     
    @@ -2253,13 +2222,12 @@ char *field_userptr(FIELD *field);        /* fetch mode of field */
     
    (Properly, this user pointer field ought to have (void *) type. The (char *) type is retained for System V compatibility.) -

    It is valid to set the user pointer of the default field (with a set_field_userptr() call passed a NULL field pointer.) When a new field is created, the default-field user pointer is copied to initialize the new field's user pointer.

    -

    Variable-Sized Fields

    +

    Variable-Sized Fields

    Normally, a field is fixed at the size specified for it at creation time. If, however, you turn off its O_STATIC bit, it @@ -2279,11 +2247,10 @@ System V compatibility.) But it is possible to set an upper limit on the size of a dynamic field. You do it with this function:

    -
    +  
     int set_max_field(FIELD *field,     /* field to alter (may not be NULL) */
                        int max_size);   /* upper limit on field size */
     
    -

    If the field is one-line, max_size is taken to be a column size limit; if it is multi-line, it is taken to be a line size limit. To disable any limit, use an argument of zero. @@ -2314,7 +2281,7 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ size.

  3. -

    Field Validation

    +

    Field Validation

    By default, a field will accept any data that will fit in its input buffer. However, it is possible to attach a validation type @@ -2332,14 +2299,13 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ define custom ones of your own. You can examine and change field validation attributes with the following functions:

    -
    +  
     int set_field_type(FIELD *field,          /* field to alter */
                        FIELDTYPE *ftype,      /* type to associate */
                        ...);                  /* additional arguments*/
     
     FIELDTYPE *field_type(FIELD *field);      /* field to query */
     
    -

    The validation type of a field is considered an attribute of the field. As with other field attributes, Also, doing set_field_type() with a NULL field @@ -2348,56 +2314,53 @@ FIELDTYPE *field_type(FIELD *field); /* field to query */

    Here are the pre-defined validation types:

    -

    TYPE_ALPHA

    +

    TYPE_ALPHA

    This field type accepts alphabetic data; no blanks, no digits, no special characters (this is checked at character-entry time). It is set up with:

    -
    +  
     int set_field_type(FIELD *field,          /* field to alter */
                        TYPE_ALPHA,            /* type to associate */
                        int width);            /* maximum width of field */
     
    -

    The width argument sets a minimum width of data. Typically you will want to set this to the field width; if it is greater than the field width, the validation check will always fail. A minimum width of zero makes field completion optional.

    -

    TYPE_ALNUM

    +

    TYPE_ALNUM

    This field type accepts alphabetic data and digits; no blanks, no special characters (this is checked at character-entry time). It is set up with:

    -
    +  
     int set_field_type(FIELD *field,          /* field to alter */
                        TYPE_ALNUM,            /* type to associate */
                        int width);            /* maximum width of field */
     
    -

    The width argument sets a minimum width of data. As with TYPE_ALPHA, typically you will want to set this to the field width; if it is greater than the field width, the validation check will always fail. A minimum width of zero makes field completion optional.

    -

    TYPE_ENUM

    +

    TYPE_ENUM

    This type allows you to restrict a field's values to be among a specified set of string values (for example, the two-letter postal codes for U.S. states). It is set up with:

    -
    +  
     int set_field_type(FIELD *field,          /* field to alter */
                        TYPE_ENUM,             /* type to associate */
                        char **valuelist;      /* list of possible values */
                        int checkcase;         /* case-sensitive? */
                        int checkunique);      /* must specify uniquely? */
     
    -

    The valuelist parameter must point at a NULL-terminated list of valid strings. The checkcase argument, if true, makes comparison with the string @@ -2419,18 +2382,17 @@ int set_field_type(FIELD *field, /* field to alter */ REQ_PREV_CHOICE input requests can be particularly useful with these fields.

    -

    TYPE_INTEGER

    +

    TYPE_INTEGER

    This field type accepts an integer. It is set up as follows:

    -
    +  
     int set_field_type(FIELD *field,          /* field to alter */
                        TYPE_INTEGER,          /* type to associate */
                        int padding,           /* # places to zero-pad to */
                        int vmin, int vmax);   /* valid range */
     
    -

    Valid characters consist of an optional leading minus and digits. The range check is performed on exit. If the range maximum is less than or equal to the minimum, the range is @@ -2443,18 +2405,17 @@ int set_field_type(FIELD *field, /* field to alter */

    A TYPE_INTEGER value buffer can conveniently be interpreted with the C library function atoi(3).

    -

    TYPE_NUMERIC

    +

    TYPE_NUMERIC

    This field type accepts a decimal number. It is set up as follows:

    -
    +  
     int set_field_type(FIELD *field,              /* field to alter */
                        TYPE_NUMERIC,              /* type to associate */
                        int padding,               /* # places of precision */
                        double vmin, double vmax); /* valid range */
     
    -

    Valid characters consist of an optional leading minus and digits. possibly including a decimal point. If your system supports locale's, the decimal point character used must be the @@ -2469,44 +2430,41 @@ int set_field_type(FIELD *field, /* field to alter */

    A TYPE_NUMERIC value buffer can conveniently be interpreted with the C library function atof(3).

    -

    TYPE_REGEXP

    +

    TYPE_REGEXP

    This field type accepts data matching a regular expression. It is set up as follows:

    -
    +  
     int set_field_type(FIELD *field,          /* field to alter */
                        TYPE_REGEXP,           /* type to associate */
                        char *regexp);         /* expression to match */
     
    -

    The syntax for regular expressions is that of regcomp(3). The check for regular-expression match is performed on exit.

    -

    Direct Field Buffer - Manipulation

    +

    Direct Field Buffer + Manipulation

    The chief attribute of a field is its buffer contents. When a form has been completed, your application usually needs to know the state of each field buffer. You can find this out with:

    -
    +  
     char *field_buffer(FIELD *field,          /* field to query */
                        int bufindex);         /* number of buffer to query */
     
    -

    Normally, the state of the zero-numbered buffer for each field is set by the user's editing actions on that field. It is sometimes useful to be able to set the value of the zero-numbered (or some other) buffer from your application:

    -
    +  
     int set_field_buffer(FIELD *field,        /* field to alter */
                        int bufindex,          /* number of buffer to alter */
                        char *value);          /* string value to set */
     
    -

    If the field is not large enough and cannot be resized to a sufficiently large size to contain the specified value, the value will be truncated to fit.

    @@ -2525,7 +2483,7 @@ int set_field_buffer(FIELD *field, /* field to alter */ REQ_VALIDATION request has been processed by the forms driver.

    -

    Attributes of Forms

    +

    Attributes of Forms

    As with field attributes, form attributes inherit a default from a system default form structure. These defaults can be @@ -2535,7 +2493,7 @@ int set_field_buffer(FIELD *field, /* field to alter */

    The principal attribute of a form is its field list. You can query and change this list with:

    -
    +  
     int set_form_fields(FORM *form,           /* form to alter */
                         FIELD **fields);      /* fields to connect */
     
    @@ -2543,7 +2501,6 @@ char *form_fields(FORM *form);            /* fetch fields of form */
     
     int field_count(FORM *form);              /* count connect fields */
     
    -

    The second argument of set_form_fields() may be a NULL-terminated field pointer array like the one required by new_form(). In that case, the old fields of the form @@ -2557,7 +2514,7 @@ int field_count(FORM *form); /* count connect fields */ number of fields connected to a given from. It returns -1 if the form-pointer argument is NULL.

    -

    Control of Form Display

    +

    Control of Form Display

    In the overview section, you saw that to display a form you normally start by defining its size (and fields), posting it, and @@ -2589,17 +2546,16 @@ int field_count(FORM *form); /* count connect fields */ need to know the size of the form's bounding rectangle. You can get this information with:

    -
    +  
     int scale_form(FORM *form,                /* form to query */
                    int *rows,                 /* form rows */
                    int *cols);                /* form cols */
     
    -

    The form dimensions are passed back in the locations pointed to by the arguments. Once you have this information, you can use it to declare of windows, then use one of these functions:

    -
    +  
     int set_form_win(FORM *form,              /* form to alter */
                      WINDOW *win);            /* frame window to connect */
     
    @@ -2610,7 +2566,6 @@ int set_form_sub(FORM *form,              /* form to alter */
     
     WINDOW *form_sub(FORM *form);             /* fetch form subwindow of form */
     
    -

    Note that curses operations, including refresh(), on the form, should be done on the frame window, not the form subwindow.

    @@ -2619,12 +2574,11 @@ WINDOW *form_sub(FORM *form); /* fetch form subwindow of form */ scrollable field is actually displayed within the menu subwindow. Use these functions:

    -
    +  
     int data_ahead(FORM *form);               /* form to be queried */
     
     int data_behind(FORM *form);              /* form to be queried */
     
    -

    The function data_ahead() returns TRUE if (a) the current field is one-line and has undisplayed data off to the right, (b) the current field is multi-line and there is data @@ -2637,27 +2591,25 @@ int data_behind(FORM *form); /* form to be queried */

    Finally, there is a function to restore the form window's cursor to the value expected by the forms driver:

    -
    +  
     int pos_form_cursor(FORM *)               /* form to be queried */
     
    -

    If your application changes the form window cursor, call this function before handing control back to the forms driver in order to re-synchronize it.

    -

    Input Processing in the Forms - Driver

    +

    Input Processing in the Forms + Driver

    The function form_driver() handles virtualized input requests for form navigation, editing, and validation requests, just as menu_driver does for menus (see the section on menu input handling).

    -
    +  
     int form_driver(FORM *form,               /* form to pass input to */
                     int request);             /* form request code */
     
    -

    Your input virtualization function needs to take input and then convert it to either an alphanumeric character (which is treated as data to be entered in the currently-selected field), @@ -2668,7 +2620,7 @@ int form_driver(FORM *form, /* form to pass input to */ check that the input taken by the driver matched what was expected.

    -

    Page Navigation Requests

    +

    Page Navigation Requests

    These requests cause page-level moves through the form, triggering display of a new form screen.

    @@ -2700,8 +2652,8 @@ int form_driver(FORM *form, /* form to pass input to */ and REQ_PREV_PAGE from the first page goes to the last.

    -

    Inter-Field Navigation - Requests

    +

    Inter-Field Navigation + Requests

    These requests handle navigation between fields on the same page.

    @@ -2794,8 +2746,8 @@ int form_driver(FORM *form, /* form to pass input to */ from A will go to B only if A, B, and C all share the same first line; otherwise it will skip over B to C.

    -

    Intra-Field Navigation - Requests

    +

    Intra-Field Navigation + Requests

    These requests drive movement of the edit cursor within the currently selected field.

    @@ -2877,7 +2829,7 @@ int form_driver(FORM *form, /* form to pass input to */ end of line or field look for the first or last non-pad character in their ranges.

    -

    Scrolling Requests

    +

    Scrolling Requests

    Fields that are dynamic and have grown and fields explicitly created with offscreen rows are scrollable. One-line fields @@ -2952,7 +2904,7 @@ int form_driver(FORM *form, /* form to pass input to */

    For scrolling purposes, a page of a field is the height of its visible part.

    -

    Editing Requests

    +

    Editing Requests

    When you pass the forms driver an ASCII character, it is treated as a request to add the character to the field's data @@ -3068,7 +3020,7 @@ int form_driver(FORM *form, /* form to pass input to */

    See Form Options for discussion of how to set and clear the overload options.

    -

    Order Requests

    +

    Order Requests

    If the type of your field is ordered, and has associated functions for getting the next and previous values of the type @@ -3094,7 +3046,7 @@ int form_driver(FORM *form, /* form to pass input to */ field type of your own (see Custom Validation Types), you can associate our own ordering functions.

    -

    Application Commands

    +

    Application Commands

    Form requests are represented as integers above the curses value greater than KEY_MAX and @@ -3102,13 +3054,13 @@ int form_driver(FORM *form, /* form to pass input to */ your input-virtualization routine returns a value above MAX_COMMAND, the forms driver will ignore it.

    -

    Field Change Hooks

    +

    Field Change Hooks

    It is possible to set function hooks to be executed whenever the current field or form changes. Here are the functions that support this:

    -
    +  
     typedef void    (*HOOK)();       /* pointer to function returning void */
     
     int set_form_init(FORM *form,    /* form to alter */
    @@ -3131,7 +3083,6 @@ int set_field_term(FORM *form,   /* form to alter */
     
     HOOK field_term(FORM *form);     /* form to query */
     
    -

    These functions allow you to either set or query four different hooks. In each of the set functions, the second argument should be the address of a hook function. These @@ -3182,7 +3133,7 @@ HOOK field_term(FORM *form); /* form to query */

    You can disable any of these hooks by (re)setting them to NULL, the default value.

    -

    Field Change Commands

    +

    Field Change Commands

    Normally, navigation through the form will be driven by the user's input requests. But sometimes it is useful to be able to @@ -3190,7 +3141,7 @@ HOOK field_term(FORM *form); /* form to query */ application, or ask which field it currently is in. The following functions help you accomplish this:

    -
    +  
     int set_current_field(FORM *form,         /* form to alter */
                           FIELD *field);      /* field to shift to */
     
    @@ -3199,7 +3150,6 @@ FIELD *current_field(FORM *form);         /* form to query */
     int field_index(FORM *form,               /* form to query */
                     FIELD *field);            /* field to get index of */
     
    -

    The function field_index() returns the index of the given field in the given form's field array (the array passed to new_form() or @@ -3211,22 +3161,21 @@ int field_index(FORM *form, /* form to query */

    It is also possible to move around by pages.

    -
    +  
     int set_form_page(FORM *form,             /* form to alter */
                       int page);              /* page to go to (0-origin) */
     
     int form_page(FORM *form);                /* return form's current page */
     
    -

    The initial page of a newly-created form is 0. The function set_form_fields() resets this.

    -

    Form Options

    +

    Form Options

    Like fields, forms may have control option bits. They can be changed or queried with these functions:

    -
    +  
     int set_form_opts(FORM *form,             /* form to alter */
                       int attr);              /* attribute to set */
     
    @@ -3238,7 +3187,6 @@ int form_opts_off(FORM *form,             /* form to alter */
     
     int form_opts(FORM *form);                /* form to query */
     
    -

    By default, all options are on. Here are the available option bits:

    @@ -3261,7 +3209,7 @@ int form_opts(FORM *form); /* form to query */

    The option values are bit-masks and can be composed with logical-or in the obvious way.

    -

    Custom Validation Types

    +

    Custom Validation Types

    The form library gives you the capability to define custom validation types of your own. Further, the optional @@ -3271,16 +3219,15 @@ int form_opts(FORM *form); /* form to query */ the handling of the additional arguments within custom validation functions.

    -

    Union Types

    +

    Union Types

    The simplest way to create a custom data type is to compose it from two preexisting ones:

    -
    +  
     FIELD *link_fieldtype(FIELDTYPE *type1,
                           FIELDTYPE *type2);
     
    -

    This function creates a field type that will accept any of the values legal for either of its argument field types (which may be either predefined or programmer-defined). If a @@ -3292,7 +3239,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1, function for the first type, then for the second, to figure what type the buffer contents should be treated as.

    -

    New Field Types

    +

    New Field Types

    To create a field type from scratch, you need to specify one or both of the following things:

    @@ -3307,7 +3254,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1,

    Here is how you do that:

    -
    +  
     typedef int     (*HOOK)();       /* pointer to function returning int */
     
     FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */
    @@ -3315,7 +3262,6 @@ FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */
     
     int free_fieldtype(FIELDTYPE *ftype);     /* type to free */
     
    -

    At least one of the arguments of new_fieldtype() must be non-NULL. The forms driver will automatically call the new type's validation functions at appropriate points in @@ -3334,8 +3280,8 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ argument. It too should return TRUE if the character is valid, FALSE otherwise.

    -

    Validation Function - Arguments

    +

    Validation Function + Arguments

    Your field- and character- validation functions will be passed a second argument as well. This second argument is the address of @@ -3353,7 +3299,7 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */

    Here is how you make the association:

    -
    +  
     typedef char    *(*PTRHOOK)();    /* pointer to function returning (char *) */
     typedef void    (*VOIDHOOK)();    /* pointer to function returning void */
     
    @@ -3362,7 +3308,6 @@ int set_fieldtype_arg(FIELDTYPE *type,    /* type to alter */
                           PTRHOOK copy_str,   /* make copy of structure */
                           VOIDHOOK free_str); /* free structure storage */
     
    -

    Here is how the storage-management hooks are used:

    @@ -3398,8 +3343,8 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ this happens. Thus, your validation functions should never see a NULL file pointer and need not check specially for it.

    -

    Order Functions For - Custom Types

    +

    Order Functions For + Custom Types

    Some custom field types are simply ordered in the same well-defined way that TYPE_ENUM is. For such types, @@ -3407,14 +3352,13 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ support the REQ_NEXT_CHOICE and REQ_PREV_CHOICE requests. Here is how:

    -
    +  
     typedef int     (*INTHOOK)();     /* pointer to function returning int */
     
     int set_fieldtype_arg(FIELDTYPE *type,    /* type to alter */
                           INTHOOK succ,       /* get successor value */
                           INTHOOK pred);      /* get predecessor value */
     
    -

    The successor and predecessor arguments will each be passed two arguments; a field pointer, and a pile pointer (as for the validation functions). They are expected to use the function @@ -3424,7 +3368,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ (a legal next or previous value was set) or FALSE to indicate failure.

    -

    Avoiding Problems

    +

    Avoiding Problems

    The interface for defining custom types is complicated and tricky. Rather than attempting to create a custom type entirely diff --git a/doc/ncurses-intro.doc b/doc/ncurses-intro.doc index 4e752ed0..a20ee1a1 100644 --- a/doc/ncurses-intro.doc +++ b/doc/ncurses-intro.doc @@ -1,9 +1,11 @@ Writing Programs with NCURSES +Writing Programs with NCURSES + by Eric S. Raymond and Zeyd M. Ben-Halim updates since release 1.9.9e by Thomas Dickey - Contents +Contents * Introduction + A Brief History of Curses @@ -96,7 +98,7 @@ o Avoiding Problems _________________________________________________________________ - Introduction +Introduction This document is an introduction to programming with curses. It is not an exhaustive reference for the curses Application Programming @@ -129,7 +131,7 @@ will typically be a great deal simpler and less expensive than one using an X toolkit. -A Brief History of Curses + A Brief History of Curses Historically, the first ancestor of curses was the routines written to provide screen-handling for the vi editor; these used the termcap @@ -163,7 +165,7 @@ A Brief History of Curses releases, curses evolved to use more facilities and offer more capabilities, going far beyond BSD curses in power and flexibility. -Scope of This Document + Scope of This Document This document describes ncurses, a free implementation of the System V curses API with some clearly marked extensions. It includes the @@ -206,7 +208,7 @@ Scope of This Document extension libraries, also cloned from System V, which support easy construction and sequences of menus and fill-in forms. -Terminology + Terminology In this document, the following terminology is used with reasonable consistency: @@ -227,11 +229,11 @@ Terminology The package's idea of what the terminal display currently looks like, i.e., what the user sees now. This is a special screen. - The Curses Library +The Curses Library -An Overview of Curses + An Overview of Curses - Compiling Programs using Curses + Compiling Programs using Curses In order to use the library, it is necessary to have certain types and variables defined. Therefore, the programmer must have a line: @@ -245,7 +247,7 @@ An Overview of Curses your LDFLAGS or on the command line. There is no need for any other libraries. - Updating the Screen + Updating the Screen In order to update the screen optimally, it is necessary for the routines to know what the screen currently looks like and what the @@ -273,7 +275,7 @@ An Overview of Curses package implementation determine the most efficient way to repaint the screen. - Standard Windows and Function Naming Conventions + Standard Windows and Function Naming Conventions As hinted above, the routines can use several windows, but two are automatically given: curscr, which knows what the terminal looks like, @@ -313,7 +315,7 @@ An Overview of Curses (y, x) coordinates. If a function requires a window pointer, it is always the first parameter passed. - Variables + Variables The curses library sets some variables describing the terminal capabilities. @@ -340,7 +342,7 @@ An Overview of Curses OK error flag returned by routines when things go right. -Using the Library + Using the Library Now we describe how to actually use the screen package. In it, we assume all updating, reading, etc. is applied to stdscr. These @@ -409,7 +411,7 @@ static void finish(int sig) exit(0); } - Starting up + Starting up In order to use the screen package, the routines must know about terminal characteristics, and the space for curscr and stdscr must be @@ -435,7 +437,7 @@ static void finish(int sig) of old windows. All the options described above can be applied to any window. - Output + Output Now that we have set things up, we will want to actually update the terminal. The basic functions used to change what will go on a window @@ -464,7 +466,7 @@ static void finish(int sig) implementing a command which would redraw the screen in case it get messed up. - Input + Input The complementary function to addch() is getch() which, if echo is set, will call addch() to echo the character. Since the screen package @@ -488,7 +490,7 @@ static void finish(int sig) curses.h The mapping from sequences to #define values is determined by key_ capabilities in the terminal's terminfo entry. - Using Forms Characters + Using Forms Characters The addch() function (and some others, including box() and border()) can accept some pseudo-character arguments which are specially defined @@ -500,7 +502,7 @@ static void finish(int sig) the terminal does not have such characters, curses.h will map them to a recognizable (though ugly) set of ASCII defaults. - Character Attributes and Color + Character Attributes and Color The ncurses package supports screen highlights including standout, reverse-video, underline, and blink. It also supports color, which is @@ -531,7 +533,7 @@ static void finish(int sig) combination. Note that COLOR_PAIR(N), for constant N, is itself a compile-time constant and can be used in initializers. - Mouse Interfacing + Mouse Interfacing The ncurses library also provides a mouse interface. @@ -603,7 +605,7 @@ static void finish(int sig) See the manual page curs_mouse(3X) for full details of the mouse-interface functions. - Finishing Up + Finishing Up In order to clean up after the ncurses routines, the routine endwin() is provided. It restores tty modes to what they were when initscr() @@ -611,12 +613,12 @@ static void finish(int sig) Thus, anytime after the call to initscr, endwin() should be called before exiting. -Function Descriptions + Function Descriptions We describe the detailed behavior of some important curses functions here, as a supplement to the manual page descriptions. - Initialization and Wrapup + Initialization and Wrapup initscr() The first function called should almost always be initscr(). @@ -660,7 +662,7 @@ Function Descriptions The inverse of newterm(); deallocates the data structures associated with a given SCREEN reference. - Causing Output to the Terminal + Causing Output to the Terminal refresh() and wrefresh(win) These functions must be called to actually get any output on @@ -689,7 +691,7 @@ Function Descriptions with fewer total characters transmitted (this also avoids a visually annoying flicker at each update). - Low-Level Capability Access + Low-Level Capability Access setupterm(term, filenum, errret) This routine is called to initialize a terminal's description, @@ -719,7 +721,7 @@ Function Descriptions array ttytype[]. Subsequent calls to setupterm() will overwrite this array, so you will have to save it yourself if need be. - Debugging + Debugging NOTE: These functions are not part of the standard curses API! @@ -747,13 +749,13 @@ Function Descriptions single-line pseudo-operations. These pseudo-ops can be distinguished by the fact that they are named in capital letters. -Hints, Tips, and Tricks + Hints, Tips, and Tricks The ncurses manual pages are a complete reference for this library. In the remainder of this document, we discuss various useful methods that may not be obvious from the manual page descriptions. - Some Notes of Caution + Some Notes of Caution If you find yourself thinking you need to use noraw() or nocbreak(), think again and move carefully. It is probably better design to use @@ -787,7 +789,7 @@ Hints, Tips, and Tricks in an environment with window resizes, in which case several screens could be open with different sizes. - Temporarily Leaving NCURSES Mode + Temporarily Leaving NCURSES Mode Sometimes you will want to write a program that spends most of its time in screen mode, but occasionally returns to ordinary "cooked" @@ -812,7 +814,7 @@ Hints, Tips, and Tricks addstr("returned.\n"); /* prepare return message */ refresh(); /* restore save modes, repaint screen */ - Using NCURSES under XTERM + Using NCURSES under XTERM A resize operation in X sends SIGWINCH to the application running under xterm. The easiest way to handle SIGWINCH is to do an endwin, @@ -835,7 +837,7 @@ Hints, Tips, and Tricks it cannot know how you want the screen re-painted. You will usually have to write special-purpose code to handle KEY_RESIZE yourself. - Handling Multiple Terminal Screens + Handling Multiple Terminal Screens The initscr() function actually calls a function named newterm() to do most of its work. If you are writing a program that opens multiple @@ -847,7 +849,7 @@ Hints, Tips, and Tricks with the set_term call. Note that you will also have to call def_shell_mode and def_prog_mode on each tty yourself. - Testing for Terminal Capabilities + Testing for Terminal Capabilities Sometimes you may want to write programs that test for the presence of various capabilities before deciding whether to go into ncurses mode. @@ -861,14 +863,14 @@ Hints, Tips, and Tricks can include the term.h file and test the value of the macro cursor_address. - Tuning for Speed + Tuning for Speed Use the addchstr() family of functions for fast screen-painting of text when you know the text does not contain any control characters. Try to make attribute changes infrequent on your screens. Do not use the immedok() option! - Special Features of NCURSES + Special Features of NCURSES The wresize() function allows you to resize a window in place. The associated resizeterm() function simplifies the construction of @@ -888,14 +890,14 @@ Hints, Tips, and Tricks 8. While most terminals which provide color allow only 8 colors, about a quarter (including XFree86 xterm) support 16 colors. -Compatibility with Older Versions + Compatibility with Older Versions Despite our best efforts, there are some differences between ncurses and the (undocumented!) behavior of older curses implementations. These arise from ambiguities or omissions in the documentation of the API. - Refresh of Overlapping Windows + Refresh of Overlapping Windows If you define two windows A and B that overlap, and then alternately scribble on and refresh them, the changes made to the overlapping @@ -947,7 +949,7 @@ Compatibility with Older Versions you have defined. Then you can do one doupdate() and there will be a single burst of physical I/O that will do all your updates. - Background Erase + Background Erase If you have been using a very old versions of ncurses (1.8.7 or older) you may be surprised by the behavior of the erase functions. In older @@ -962,7 +964,7 @@ Compatibility with Older Versions This change in behavior conforms ncurses to System V Release 4 and the XSI Curses standard. -XSI Curses Conformance + XSI Curses Conformance The ncurses library is intended to be base-level conformant with the XSI Curses standard from X/Open. Many extended-level features (in @@ -976,7 +978,7 @@ XSI Curses Conformance have a corresponding function which may be linked (and will be prototype-checked) if the macro definition is disabled with #undef. - The Panels Library +The Panels Library The ncurses library by itself provides good support for screen displays in which the windows are tiled (non-overlapping). In the more @@ -993,7 +995,7 @@ XSI Curses Conformance The panel library first appeared in AT&T System V. The version documented here is the panel code distributed with ncurses. -Compiling With the Panels Library + Compiling With the Panels Library Your panels-using modules must import the panels library declarations with @@ -1004,7 +1006,7 @@ Compiling With the Panels Library -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice to put -lpanel first and -lncurses second. -Overview of Panels + Overview of Panels A panel object is a window that is implicitly treated as part of a deck including all other panel objects. The deck has an implicit @@ -1047,7 +1049,7 @@ Overview of Panels write, you will generate a lot of unnecessary refresh activity and screen flicker. -Panels, Input, and the Standard Screen + Panels, Input, and the Standard Screen You should not mix wnoutrefresh() or wrefresh() operations with panels code; this will work only if the argument window is either in the top @@ -1065,7 +1067,7 @@ Panels, Input, and the Standard Screen There is presently no way to display changes to one obscured panel without repainting all panels. -Hiding Panels + Hiding Panels It is possible to remove a panel from the deck temporarily; use hide_panel for this. Use show_panel() to render it visible again. The @@ -1076,7 +1078,7 @@ Hiding Panels or bottom_panel on a hidden panel(). Other panels operations are applicable. -Miscellaneous Other Facilities + Miscellaneous Other Facilities It is possible to navigate the deck using the functions panel_above() and panel_below. Handed a panel pointer, they return the panel above @@ -1087,7 +1089,7 @@ Miscellaneous Other Facilities code, to which you can attach application data. See the man page documentation of set_panel_userptr() and panel_userptr for details. - The Menu Library +The Menu Library A menu is a screen display that assists the user to choose some subset of a given set of items. The menu library is a curses extension that @@ -1097,7 +1099,7 @@ Miscellaneous Other Facilities The menu library first appeared in AT&T System V. The version documented here is the menu code distributed with ncurses. -Compiling With the menu Library + Compiling With the menu Library Your menu-using modules must import the menu library declarations with #include @@ -1107,7 +1109,7 @@ Compiling With the menu Library -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice to put -lmenu first and -lncurses second. -Overview of Menus + Overview of Menus The menus created by this library consist of collections of items including a name string part and a description string part. To make @@ -1137,7 +1139,7 @@ Overview of Menus 9. Free the items using free_item(). 10. Terminate curses. -Selecting items + Selecting items Menus may be multi-valued or (the default) single-valued (see the manual page menu_opts(3x) to see how to change the default). Both @@ -1154,7 +1156,7 @@ Selecting items option so far defined for menus, but it is good practice to code as though other option bits might be on. -Menu Display + Menu Display The menu library calculates a minimum display size for your window, based on the following variables: @@ -1197,7 +1199,7 @@ Menu Display have reasonable defaults which the library allows you to change (see the menu_attribs(3x) manual page. -Menu Windows + Menu Windows Each menu has, as mentioned previously, a pair of associated windows. Both these windows are painted when the menu is posted and erased when @@ -1217,7 +1219,7 @@ Menu Windows these actually modifies the screen. To do that, call wrefresh() or some equivalent. -Processing Menu Input + Processing Menu Input The main loop of your menu-processing code should call menu_driver() repeatedly. The first argument of this routine is a menu pointer; the @@ -1261,7 +1263,7 @@ Processing Menu Input considered application-specific commands. The menu_driver() code ignores them and returns E_UNKNOWN_COMMAND. -Miscellaneous Other Features + Miscellaneous Other Features Various menu options can affect the processing and visual appearance and input processing of menus. See menu_opts(3x) for details. @@ -1280,7 +1282,7 @@ Miscellaneous Other Features Each item, and each menu, has an associated user pointer on which you can hang application data. See mitem_userptr(3x) and menu_userptr(3x). - The Forms Library +The Forms Library The form library is a curses extension that supports easy programming of on-screen forms for data entry and program control. @@ -1288,7 +1290,7 @@ Miscellaneous Other Features The form library first appeared in AT&T System V. The version documented here is the form code distributed with ncurses. -Compiling With the form Library + Compiling With the form Library Your form-using modules must import the form library declarations with #include @@ -1298,7 +1300,7 @@ Compiling With the form Library -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice to put -lform first and -lncurses second. -Overview of Forms + Overview of Forms A form is a collection of fields; each field may be either a label (explanatory text) or a data-entry location. Long forms may be @@ -1347,7 +1349,7 @@ Overview of Forms operations, the menu driver loop has to support field editing and data validation. -Creating and Freeing Fields and Forms + Creating and Freeing Fields and Forms The basic function for creating fields is new_field(): FIELD *new_field(int height, int width, /* new field size */ @@ -1423,7 +1425,7 @@ FORM *new_form(FIELD **fields); to a form, but not vice-versa; thus, you will generally free your form objects first. -Fetching and Changing Field Attributes + Fetching and Changing Field Attributes Each form field has a number of location and size attributes associated with it. There are other field attributes used to control @@ -1438,7 +1440,7 @@ Fetching and Changing Field Attributes to mean this field. Changes to it persist as defaults until your forms application terminates. - Fetching Size and Location Data + Fetching Size and Location Data You can retrieve field sizes and locations through: int field_info(FIELD *field, /* field from which to fetch */ @@ -1451,7 +1453,7 @@ int field_info(FIELD *field, /* field from which to fetch */ size and location attributes of a new field, it fetches them from an existing one. - Changing the Field Location + Changing the Field Location It is possible to move a field's location on the screen: int move_field(FIELD *field, /* field to alter */ @@ -1459,7 +1461,7 @@ int move_field(FIELD *field, /* field to alter */ You can, of course. query the current location through field_info(). - The Justification Attribute + The Justification Attribute One-line fields may be unjustified, justified right, justified left, or centered. Here is how you manipulate this attribute: @@ -1472,7 +1474,7 @@ int field_just(FIELD *field); /* fetch mode of field */ preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. - Field Display Attributes + Field Display Attributes For each field, you can set a foreground attribute for entered characters, a background attribute for the entire field, and a pad @@ -1507,7 +1509,7 @@ chtype new_page(FIELD *field); /* field to query */ etc). The page bit of a field controls whether it is displayed at the start of a new form screen. - Field Option Bits + Field Option Bits There is also a large collection of field option bits you can set to control various aspects of forms processing. You can manipulate them @@ -1593,7 +1595,7 @@ int field_opts(FIELD *field); /* field to query */ The option values are bit-masks and can be composed with logical-or in the obvious way. -Field Status + Field Status Every field has a status flag, which is set to FALSE when the field is created and TRUE when the value in field buffer 0 changes. This flag @@ -1616,7 +1618,7 @@ int field_status(FIELD *field); /* fetch mode of field */ initialization or termination hooks, or (3) just after a REQ_VALIDATION request has been processed by the forms driver. -Field User Pointer + Field User Pointer Each field structure contains one character pointer slot that is not used by the forms library. It is intended to be used by applications @@ -1634,7 +1636,7 @@ char *field_userptr(FIELD *field); /* fetch mode of field */ field is created, the default-field user pointer is copied to initialize the new field's user pointer. -Variable-Sized Fields + Variable-Sized Fields Normally, a field is fixed at the size specified for it at creation time. If, however, you turn off its O_STATIC bit, it becomes dynamic @@ -1673,7 +1675,7 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ the field; use dynamic_field_info() to get the actual dynamic size. -Field Validation + Field Validation By default, a field will accept any data that will fit in its input buffer. However, it is possible to attach a validation type to a @@ -1703,7 +1705,7 @@ FIELDTYPE *field_type(FIELD *field); /* field to query */ Here are the pre-defined validation types: - TYPE_ALPHA + TYPE_ALPHA This field type accepts alphabetic data; no blanks, no digits, no special characters (this is checked at character-entry time). It is @@ -1717,7 +1719,7 @@ int set_field_type(FIELD *field, /* field to alter */ width, the validation check will always fail. A minimum width of zero makes field completion optional. - TYPE_ALNUM + TYPE_ALNUM This field type accepts alphabetic data and digits; no blanks, no special characters (this is checked at character-entry time). It is @@ -1731,7 +1733,7 @@ int set_field_type(FIELD *field, /* field to alter */ greater than the field width, the validation check will always fail. A minimum width of zero makes field completion optional. - TYPE_ENUM + TYPE_ENUM This type allows you to restrict a field's values to be among a specified set of string values (for example, the two-letter postal @@ -1760,7 +1762,7 @@ int set_field_type(FIELD *field, /* field to alter */ The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests can be particularly useful with these fields. - TYPE_INTEGER + TYPE_INTEGER This field type accepts an integer. It is set up as follows: int set_field_type(FIELD *field, /* field to alter */ @@ -1778,7 +1780,7 @@ int set_field_type(FIELD *field, /* field to alter */ A TYPE_INTEGER value buffer can conveniently be interpreted with the C library function atoi(3). - TYPE_NUMERIC + TYPE_NUMERIC This field type accepts a decimal number. It is set up as follows: int set_field_type(FIELD *field, /* field to alter */ @@ -1798,7 +1800,7 @@ int set_field_type(FIELD *field, /* field to alter */ A TYPE_NUMERIC value buffer can conveniently be interpreted with the C library function atof(3). - TYPE_REGEXP + TYPE_REGEXP This field type accepts data matching a regular expression. It is set up as follows: @@ -1809,7 +1811,7 @@ int set_field_type(FIELD *field, /* field to alter */ The syntax for regular expressions is that of regcomp(3). The check for regular-expression match is performed on exit. -Direct Field Buffer Manipulation + Direct Field Buffer Manipulation The chief attribute of a field is its buffer contents. When a form has been completed, your application usually needs to know the state of @@ -1840,7 +1842,7 @@ int set_field_buffer(FIELD *field, /* field to alter */ or form's initialization or termination hooks, or (3) just after a REQ_VALIDATION request has been processed by the forms driver. -Attributes of Forms + Attributes of Forms As with field attributes, form attributes inherit a default from a system default form structure. These defaults can be queried or set by @@ -1868,7 +1870,7 @@ int field_count(FORM *form); /* count connect fields */ connected to a given from. It returns -1 if the form-pointer argument is NULL. -Control of Form Display + Control of Form Display In the overview section, you saw that to display a form you normally start by defining its size (and fields), posting it, and refreshing @@ -1938,7 +1940,7 @@ int pos_form_cursor(FORM *) /* form to be queried */ before handing control back to the forms driver in order to re-synchronize it. -Input Processing in the Forms Driver + Input Processing in the Forms Driver The function form_driver() handles virtualized input requests for form navigation, editing, and validation requests, just as menu_driver does @@ -1955,7 +1957,7 @@ int form_driver(FORM *form, /* form to pass input to */ field-termination functions) with which your application code can check that the input taken by the driver matched what was expected. - Page Navigation Requests + Page Navigation Requests These requests cause page-level moves through the form, triggering display of a new form screen. @@ -1976,7 +1978,7 @@ int form_driver(FORM *form, /* form to pass input to */ the last page goes to the first, and REQ_PREV_PAGE from the first page goes to the last. - Inter-Field Navigation Requests + Inter-Field Navigation Requests These requests handle navigation between fields on the same page. @@ -2039,7 +2041,7 @@ int form_driver(FORM *form, /* form to pass input to */ only if A, B, and C all share the same first line; otherwise it will skip over B to C. - Intra-Field Navigation Requests + Intra-Field Navigation Requests These requests drive movement of the edit cursor within the currently selected field. @@ -2090,7 +2092,7 @@ int form_driver(FORM *form, /* form to pass input to */ whitespace. The commands to move to beginning and end of line or field look for the first or last non-pad character in their ranges. - Scrolling Requests + Scrolling Requests Fields that are dynamic and have grown and fields explicitly created with offscreen rows are scrollable. One-line fields scroll @@ -2138,7 +2140,7 @@ int form_driver(FORM *form, /* form to pass input to */ For scrolling purposes, a page of a field is the height of its visible part. - Editing Requests + Editing Requests When you pass the forms driver an ASCII character, it is treated as a request to add the character to the field's data buffer. Whether this @@ -2223,7 +2225,7 @@ int form_driver(FORM *form, /* form to pass input to */ See Form Options for discussion of how to set and clear the overload options. - Order Requests + Order Requests If the type of your field is ordered, and has associated functions for getting the next and previous values of the type from a given value, @@ -2240,14 +2242,14 @@ int form_driver(FORM *form, /* form to pass input to */ Custom Validation Types), you can associate our own ordering functions. - Application Commands + Application Commands Form requests are represented as integers above the curses value greater than KEY_MAX and less than or equal to the constant MAX_COMMAND. If your input-virtualization routine returns a value above MAX_COMMAND, the forms driver will ignore it. -Field Change Hooks + Field Change Hooks It is possible to set function hooks to be executed whenever the current field or form changes. Here are the functions that support @@ -2309,7 +2311,7 @@ HOOK field_term(FORM *form); /* form to query */ You can disable any of these hooks by (re)setting them to NULL, the default value. -Field Change Commands + Field Change Commands Normally, navigation through the form will be driven by the user's input requests. But sometimes it is useful to be able to move the @@ -2340,7 +2342,7 @@ int form_page(FORM *form); /* return form's current page */ The initial page of a newly-created form is 0. The function set_form_fields() resets this. -Form Options + Form Options Like fields, forms may have control option bits. They can be changed or queried with these functions: @@ -2371,7 +2373,7 @@ int form_opts(FORM *form); /* form to query */ The option values are bit-masks and can be composed with logical-or in the obvious way. -Custom Validation Types + Custom Validation Types The form library gives you the capability to define custom validation types of your own. Further, the optional additional arguments of @@ -2380,7 +2382,7 @@ Custom Validation Types with the handling of the additional arguments within custom validation functions. - Union Types + Union Types The simplest way to create a custom data type is to compose it from two preexisting ones: @@ -2397,7 +2399,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1, first type, then for the second, to figure what type the buffer contents should be treated as. - New Field Types + New Field Types To create a field type from scratch, you need to specify one or both of the following things: @@ -2430,7 +2432,7 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ argument. It too should return TRUE if the character is valid, FALSE otherwise. - Validation Function Arguments + Validation Function Arguments Your field- and character- validation functions will be passed a second argument as well. This second argument is the address of a @@ -2479,7 +2481,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ functions should never see a NULL file pointer and need not check specially for it. - Order Functions For Custom Types + Order Functions For Custom Types Some custom field types are simply ordered in the same well-defined way that TYPE_ENUM is. For such types, it is possible to define @@ -2499,7 +2501,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ success (a legal next or previous value was set) or FALSE to indicate failure. - Avoiding Problems + Avoiding Problems The interface for defining custom types is complicated and tricky. Rather than attempting to create a custom type entirely from scratch, diff --git a/form/form.priv.h b/form/form.priv.h index 4cf30713..ad5af63a 100644 --- a/form/form.priv.h +++ b/form/form.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ -/* $Id: form.priv.h,v 0.48 2021/06/17 21:30:22 tom Exp $ */ +/* $Id: form.priv.h,v 0.49 2024/02/24 12:17:31 tom Exp $ */ #ifndef FORM_PRIV_H #define FORM_PRIV_H 1 @@ -47,10 +47,6 @@ #include #endif -#ifndef MB_LEN_MAX -#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */ -#endif - #define FIELD_CELL NCURSES_CH_T #define NCURSES_FIELD_INTERNALS char** expanded; WINDOW *working; diff --git a/include/Caps b/include/Caps index 7bc00ea6..cd077b96 100644 --- a/include/Caps +++ b/include/Caps @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 1998-2015,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -30,7 +30,7 @@ # Author: Zeyd M. Ben-Halim 1992,1995 # and: Eric S. Raymond # -# $Id: Caps,v 1.48 2021/10/08 07:55:48 tom Exp $ +# $Id: Caps,v 1.56 2024/04/20 21:05:02 tom Exp $ # # This is the master termcap/terminfo capability table. # @@ -48,7 +48,7 @@ # # Column 1: terminfo variable name # Column 2: terminfo capability name -# Column 3: capability type (boolean, numeric, or string) +# Column 3: capability type (Boolean, numeric, or string) # Column 4: termcap capability name # Column 5: KEY_xxx name, if any, `-' otherwise # Column 6: value for KEY_xxx name, if any, `-' otherwise @@ -153,67 +153,103 @@ # to buy space for non-essentials Emacs is still using. Capabilities high # on that hit list: rc, sc, uc. # +# FORMATTING THE TABLES +# +# We manually specify a (minimum) column width for the capability name +# and terminfo code columns in the tables to achieve a consistent +# arrangement; as used here, tbl(1) cannot know the width required by +# one table's data while formatting another's. +# +# The longest capability names (C variables) are +# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at +# 25n), and the longest terminfo code is "setcolor" (8n). +# +# The tables are a tight fit on traditional man(7) implementations that +# use a line length of 65n, and the "Description" column has little room +# within which the formatter can make breaking or adjustment decisions. +# Words like "micro_..._address" and "parm_..._micro" don't break. +# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR +# ############################################################################# # # STANDARD CAPABILITIES # -#%The following is a complete table of the capabilities included in a -#%terminfo description block and available to terminfo-using code. In each -#%line of the table, -#% -#%The \fBvariable\fR is the name by which the programmer (at the terminfo level) -#%accesses the capability. -#% -#%The \fBcapname\fR is the short name used in the text of the database, -#%and is used by a person updating the database. -#%Whenever possible, capnames are chosen to be the same as or similar to -#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses -#%identical or very similar names). Semantics are also intended to match -#%those of the specification. -#% -#%The termcap code is the old -#%.B termcap -#%capability name (some capabilities are new, and have names which termcap -#%did not originate). -#%.P -#%Capability names have no hard length limit, but an informal limit of 5 -#%characters has been adopted to keep them short and to allow the tabs in -#%the source file -#%.B Caps +#%Tables of capabilities +#%.I \%ncurses +#%recognizes in a +#%.I \%term\%info +#%terminal type description and available to +#%.IR \%term\%info -using +#%code follow. +#%.bP +#%The capability name identifies the symbol by which the programmer +#%using the +#%.I \%term\%info +#%API accesses the capability. +#%.bP +#%The TI +#%.RI ( \%term\%info ) +#%code is the short name used by a person composing or updating a +#%terminal type entry. +#%.IP +#%Whenever possible, +#%these codes are the same as or similar to those of the ANSI X3.64-1979 +#%standard +#%(now superseded by ECMA-48, +#%which uses identical or very similar names). +#%Semantics are also intended to match those of the specification. +#%.IP +#%.I \%term\%info +#%codes have no hard length limit, +#%but +#%.I \%ncurses +#%maintains an informal one of 5 characters to keep them short and to +#%allow the tabs in the source file +#%.I Caps #%to line up nicely. -#% -#%Finally, the description field attempts to convey the semantics of the -#%capability. You may find some codes in the description field: -#%.TP -#%(P) -#%indicates that padding may be specified +#%(Some standard codes exceed this limit regardless.) +#%.bP +#%The TC +#%.RI ( termcap ) +#%code is that used by the corresponding API of +#%.IR \%ncurses . +#%(Some capabilities are new, +#%and have names that BSD +#%.I termcap +#%did not originate.) +#%.bP +#%The description field attempts to convey the capability's semantics. +#%.PP +#%The description field employs a handful of notations. #%.TP -#%#[1-9] -#%in the description field indicates that the string is passed -#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP). -#%.IP -#%If no parameters are listed in the description, -#%passing the string through \fBtparm\fP(3X) may give unexpected results, -#%e.g., if it contains percent (%%) signs. +#%.B (P) +#%indicates that padding may be specified. #%.TP -#%(P*) -#%indicates that padding may vary in proportion to the number of -#%lines affected +#%.B (P*) +#%indicates that padding may vary in proportion to the number of output +#%lines affected. #%.TP -#%(#\d\fIi\fP\u) -#%indicates the \fIi\fP\uth\d parameter. -#% +#%.BI # i +#%indicates the +#%.IR i th +#%parameter of a string capability; +#%the programmer should pass the string to \fB\%tparm\fP(3X) with the +#%parameters listed. +#%.IP +#%If the description lists no parameters, +#%passing the string to \fB\%tparm\fP(3X) may produce unexpected +#%behavior, +#%for instance if the string contains percent signs. +#%. #%.PP -#% These are the boolean capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBBooleans name Code\fR +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Boolean Capability Name TI TC Description +#%_ auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column auto_right_margin am bool am - - YBCGE terminal has automatic margins no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C) @@ -252,18 +288,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution #%.TE -#%.ad -#% -#%These are the numeric capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ columns cols num co - - YBCGE number of columns in a line init_tabs it num it - - YB-G- tabs initially every # spaces lines lines num li - - YBCGE number of lines on screen or page @@ -282,20 +316,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen no_color_video ncv num NC - - ----- video attributes that cannot be used with colors #%.TE -#%.ad -#% +#%.PP +#%. #%The following numeric capabilities are present in the SVr4.0 term structure, -#%but are not yet documented in the man page. They came in with SVr4's -#%printer support. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%but are not yet documented in the man page. +#%They came in with SVr4's printer support. +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch @@ -314,18 +349,16 @@ buttons btns num BT - - ----- number of buttons on mouse bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row bit_image_type bitype num Yp - - ----- type of bit-image device #%.TE -#%.ad -#% -#%These are the string capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ back_tab cbt str bt - - YBCGE back tab (P) bell bel str bl - - YB-GE audible signal (bell) (P) carriage_return cr str cr - - YBCGE carriage return (P*) (P*) @@ -388,6 +421,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key @@ -414,8 +451,8 @@ key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key -keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode -keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode +keypad_local rmkx str ke - - YBCGE leave keyboard transmit mode +keypad_xmit smkx str ks - - YBCGE enter keyboard transmit mode lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0 lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1 lab_f10 lf10 str la - - ----- label on function key f10 if not f10 @@ -450,6 +487,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*) reset_1string rs1 str r1 - - -B--- reset string reset_2string rs2 str r2 - - -B--- reset string +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. reset_3string rs3 str r3 - - -B--- reset string reset_file rf str rf - - -B--- name of reset file restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor @@ -516,6 +557,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key key_save ksav str &6 KEY_SAVE 0571 ----- save key key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key key_undo kund str &8 KEY_UNDO 0630 ----- undo key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key @@ -578,6 +623,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key key_f40 kf40 str FU KEY_F(40) - ----E F40 function key key_f41 kf41 str FV KEY_F(41) - ----E F41 function key key_f42 kf42 str FW KEY_F(42) - ----E F42 function key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_f43 kf43 str FX KEY_F(43) - ----E F43 function key key_f44 kf44 str FY KEY_F(44) - ----E F44 function key key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key @@ -601,7 +650,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key clr_bol el1 str cb - - ----- Clear to beginning of line clear_margins mgc str MC - - ----- clear right and left soft margins -set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap). +set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP) set_right_margin smgr str MR - - ----- set right soft margin at current column label_format fln str Lf - - ----- label format set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs @@ -646,6 +695,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1 change_res_vert cvr str ZD - - ----- Change vertical resolution to #1 define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3 enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode enter_italics_mode sitm str ZH - - ----- Enter italic mode enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion @@ -691,19 +744,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR zero_motion zerom str Zx - - ----- No motion for subsequent character #%.TE -#%.ad -#% +#%.PP +#%. #%The following string capabilities are present in the SVr4.0 term structure, #%but were originally not documented in the man page. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw18. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred mouse_info minfo str Mi - - ----- Mouse status information @@ -712,7 +766,7 @@ get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3 -device_type devt str dv - - ----- Indicate language/codeset support +device_type devt str dv - - ----- Indicate language, codeset support code_set_init csin str ci - - ----- Init sequence for multiple codesets set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII) set1_des_seq s1ds str s1 - - ----- Shift to codeset 1 @@ -740,9 +794,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options scancode_escape scesc str S7 - - ----- Escape for scancode emulation alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation #%.TE -#%.ad -#% -#%.in .8i +#%.PP +#%. #%The XSI Curses standard added these hardcopy capabilities. #%They were used in some post-4.1 versions of System V curses, #%e.g., Solaris 2.5 and IRIX 6.x. @@ -751,15 +804,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio #%If your compiled terminfo entries use these, #%they may not be binary-compatible with System V terminfo #%entries after SVr4.1; beware! -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode @@ -769,7 +823,6 @@ enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6 set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap). #%.TE -#%.ad # # The magic token below tells the tic compiler-generator code that all the caps # past it should be ignored (not written out) when dumping terminfo objects. It diff --git a/include/Caps-ncurses b/include/Caps-ncurses index 27ea393d..f9a5da06 100644 --- a/include/Caps-ncurses +++ b/include/Caps-ncurses @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2022,2023 Thomas E. Dickey # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -28,7 +28,7 @@ # # Author: Thomas E. Dickey # -# $Id: Caps-ncurses,v 1.11 2021/11/27 20:58:18 tom Exp $ +# $Id: Caps-ncurses,v 1.15 2023/10/28 21:55:47 tom Exp $ # ############################################################################# # @@ -344,6 +344,7 @@ infoalias ksel kslt IBM key_select used_by ncurses userdef CO num n number of indexed colors overlaying RGB space userdef E3 str - clears the terminal's scrollback buffer. +userdef NQ bool - terminal does not support query/response userdef RGB bool - use direct colors with 1/3 of color-pair bits per color. userdef RGB num n use direct colors with given number of bits per color. userdef RGB str - use direct colors with given bit-layout. @@ -401,6 +402,19 @@ userdef Ss str n change the cursor style. userdef rmxx str - reset ECMA-48 strikeout/crossed-out attributes. userdef smxx str - set ECMA-48 strikeout/crossed-out attributes. # +used_by vim +userdef BD str - disables bracketed paste +userdef BE str - enables bracketed paste +userdef PE str - is sent after pasted text +userdef PS str - is sent before pasted text +userdef RV str - report terminal secondary device attributes +userdef XR str - report terminal version as a free-format string. +userdef XF bool - terminal supports xterm focus in/out +userdef fd str - disable xterm focus-events +userdef fe str - enable xterm focus-events +userdef rv str - response to RV, regular expression +userdef xr str - response to XR, regular expression +# used_by xterm userdef csl str - clear status line userdef kDC3 str - alt delete-character @@ -459,4 +473,6 @@ userdef ka2 str - vt220-keypad extensions userdef kb1 str - vt220-keypad extensions userdef kb3 str - vt220-keypad extensions userdef kc2 str - vt220-keypad extensions +userdef kxIN str - mouse response on focus-in +userdef kxOUT str - mouse response on focus-out ############################################################################# diff --git a/include/Caps.aix4 b/include/Caps.aix4 index ee9f2cf2..1adb848e 100644 --- a/include/Caps.aix4 +++ b/include/Caps.aix4 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 2001-2015,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -29,7 +29,7 @@ # # Author: Thomas Dickey # -# $Id: Caps.aix4,v 1.20 2021/10/08 07:55:48 tom Exp $ +# $Id: Caps.aix4,v 1.28 2024/04/20 21:05:02 tom Exp $ # # This is an adaptation of ncurses' termcap/terminfo capability table, which # is designed to align with AIX 4.x's terminfo. @@ -48,7 +48,7 @@ # # Column 1: terminfo variable name # Column 2: terminfo capability name -# Column 3: capability type (boolean, numeric, or string) +# Column 3: capability type (Boolean, numeric, or string) # Column 4: termcap capability name # Column 5: KEY_xxx name, if any, `-' otherwise # Column 6: value for KEY_xxx name, if any, `-' otherwise @@ -153,67 +153,103 @@ # to buy space for non-essentials Emacs is still using. Capabilities high # on that hit list: rc, sc, uc. # +# FORMATTING THE TABLES +# +# We manually specify a (minimum) column width for the capability name +# and terminfo code columns in the tables to achieve a consistent +# arrangement; as used here, tbl(1) cannot know the width required by +# one table's data while formatting another's. +# +# The longest capability names (C variables) are +# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at +# 25n), and the longest terminfo code is "setcolor" (8n). +# +# The tables are a tight fit on traditional man(7) implementations that +# use a line length of 65n, and the "Description" column has little room +# within which the formatter can make breaking or adjustment decisions. +# Words like "micro_..._address" and "parm_..._micro" don't break. +# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR +# ############################################################################# # # STANDARD CAPABILITIES # -#%The following is a complete table of the capabilities included in a -#%terminfo description block and available to terminfo-using code. In each -#%line of the table, -#% -#%The \fBvariable\fR is the name by which the programmer (at the terminfo level) -#%accesses the capability. -#% -#%The \fBcapname\fR is the short name used in the text of the database, -#%and is used by a person updating the database. -#%Whenever possible, capnames are chosen to be the same as or similar to -#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses -#%identical or very similar names). Semantics are also intended to match -#%those of the specification. -#% -#%The termcap code is the old -#%.B termcap -#%capability name (some capabilities are new, and have names which termcap -#%did not originate). -#%.P -#%Capability names have no hard length limit, but an informal limit of 5 -#%characters has been adopted to keep them short and to allow the tabs in -#%the source file -#%.B Caps +#%Tables of capabilities +#%.I \%ncurses +#%recognizes in a +#%.I \%term\%info +#%terminal type description and available to +#%.IR \%term\%info -using +#%code follow. +#%.bP +#%The capability name identifies the symbol by which the programmer +#%using the +#%.I \%term\%info +#%API accesses the capability. +#%.bP +#%The TI +#%.RI ( \%term\%info ) +#%code is the short name used by a person composing or updating a +#%terminal type entry. +#%.IP +#%Whenever possible, +#%these codes are the same as or similar to those of the ANSI X3.64-1979 +#%standard +#%(now superseded by ECMA-48, +#%which uses identical or very similar names). +#%Semantics are also intended to match those of the specification. +#%.IP +#%.I \%term\%info +#%codes have no hard length limit, +#%but +#%.I \%ncurses +#%maintains an informal one of 5 characters to keep them short and to +#%allow the tabs in the source file +#%.I Caps #%to line up nicely. -#% -#%Finally, the description field attempts to convey the semantics of the -#%capability. You may find some codes in the description field: -#%.TP -#%(P) -#%indicates that padding may be specified +#%(Some standard codes exceed this limit regardless.) +#%.bP +#%The TC +#%.RI ( termcap ) +#%code is that used by the corresponding API of +#%.IR \%ncurses . +#%(Some capabilities are new, +#%and have names that BSD +#%.I termcap +#%did not originate.) +#%.bP +#%The description field attempts to convey the capability's semantics. +#%.PP +#%The description field employs a handful of notations. #%.TP -#%#[1-9] -#%in the description field indicates that the string is passed -#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP). -#%.IP -#%If no parameters are listed in the description, -#%passing the string through \fBtparm\fP(3X) may give unexpected results, -#%e.g., if it contains percent (%%) signs. +#%.B (P) +#%indicates that padding may be specified. #%.TP -#%(P*) -#%indicates that padding may vary in proportion to the number of -#%lines affected +#%.B (P*) +#%indicates that padding may vary in proportion to the number of output +#%lines affected. #%.TP -#%(#\d\fIi\fP\u) -#%indicates the \fIi\fP\uth\d parameter. -#% +#%.BI # i +#%indicates the +#%.IR i th +#%parameter of a string capability; +#%the programmer should pass the string to \fB\%tparm\fP(3X) with the +#%parameters listed. +#%.IP +#%If the description lists no parameters, +#%passing the string to \fB\%tparm\fP(3X) may produce unexpected +#%behavior, +#%for instance if the string contains percent signs. +#%. #%.PP -#% These are the boolean capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBBooleans name Code\fR +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Boolean Capability Name TI TC Description +#%_ auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column auto_right_margin am bool am - - YBCGE terminal has automatic margins no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C) @@ -252,18 +288,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution #%.TE -#%.ad -#% -#%These are the numeric capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ columns cols num co - - YBCGE number of columns in a line init_tabs it num it - - YB-G- tabs initially every # spaces lines lines num li - - YBCGE number of lines on screen or page @@ -282,20 +316,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen no_color_video ncv num NC - - ----- video attributes that cannot be used with colors #%.TE -#%.ad -#% +#%.PP +#%. #%The following numeric capabilities are present in the SVr4.0 term structure, -#%but are not yet documented in the man page. They came in with SVr4's -#%printer support. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%but are not yet documented in the man page. +#%They came in with SVr4's printer support. +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch @@ -314,18 +349,16 @@ buttons btns num BT - - ----- number of buttons on mouse bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row bit_image_type bitype num Yp - - ----- type of bit-image device #%.TE -#%.ad -#% -#%These are the string capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ back_tab cbt str bt - - YBCGE back tab (P) bell bel str bl - - YB-GE audible signal (bell) (P) carriage_return cr str cr - - YBCGE carriage return (P*) (P*) @@ -388,6 +421,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key @@ -450,6 +487,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*) reset_1string rs1 str r1 - - -B--- reset string reset_2string rs2 str r2 - - -B--- reset string +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. reset_3string rs3 str r3 - - -B--- reset string reset_file rf str rf - - -B--- name of reset file restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor @@ -598,6 +639,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key key_f40 kf40 str FU KEY_F(40) - ----E F40 function key key_f41 kf41 str FV KEY_F(41) - ----E F41 function key key_f42 kf42 str FW KEY_F(42) - ----E F42 function key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_f43 kf43 str FX KEY_F(43) - ----E F43 function key key_f44 kf44 str FY KEY_F(44) - ----E F44 function key key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key @@ -671,6 +716,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key key_save ksav str &6 KEY_SAVE 0571 ----- save key key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key key_undo kund str &8 KEY_UNDO 0630 ----- undo key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key @@ -703,7 +752,7 @@ key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key req_for_input rfi str RF - - ----- send next input char (for ptys) clr_bol el1 str cb - - ----- Clear to beginning of line clear_margins mgc str MC - - ----- clear right and left soft margins -set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap). +set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP) set_right_margin smgr str MR - - ----- set right soft margin at current column label_format fln str Lf - - ----- label format set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs @@ -748,6 +797,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1 change_res_vert cvr str ZD - - ----- Change vertical resolution to #1 define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3 enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode enter_italics_mode sitm str ZH - - ----- Enter italic mode enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion @@ -793,19 +846,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR zero_motion zerom str Zx - - ----- No motion for subsequent character #%.TE -#%.ad -#% +#%.PP +#%. #%The following string capabilities are present in the SVr4.0 term structure, #%but were originally not documented in the man page. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw18. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred mouse_info minfo str Mi - - ----- Mouse status information @@ -842,9 +896,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options scancode_escape scesc str S7 - - ----- Escape for scancode emulation alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation #%.TE -#%.ad -#% -#%.in .8i +#%.PP +#%. #%The XSI Curses standard added these hardcopy capabilities. #%They were used in some post-4.1 versions of System V curses, #%e.g., Solaris 2.5 and IRIX 6.x. @@ -853,15 +906,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio #%If your compiled terminfo entries use these, #%they may not be binary-compatible with System V terminfo #%entries after SVr4.1; beware! -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ #enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode #enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode #enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode @@ -871,7 +925,6 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio #set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6 set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap). #%.TE -#%.ad # # The magic token below tells the tic compiler-generator code that all the caps # past it should be ignored (not written out) when dumping terminfo objects. It diff --git a/include/Caps.hpux11 b/include/Caps.hpux11 index 3c0444f8..723556fa 100644 --- a/include/Caps.hpux11 +++ b/include/Caps.hpux11 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 2002-2015,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -29,7 +29,7 @@ # # Author: Thomas Dickey # -# $Id: Caps.hpux11,v 1.18 2021/10/08 07:55:48 tom Exp $ +# $Id: Caps.hpux11,v 1.26 2024/04/20 21:05:02 tom Exp $ # # This is an adaptation of ncurses' termcap/terminfo capability table, which # is designed to align with HPUX 11.x's terminfo. @@ -48,7 +48,7 @@ # # Column 1: terminfo variable name # Column 2: terminfo capability name -# Column 3: capability type (boolean, numeric, or string) +# Column 3: capability type (Boolean, numeric, or string) # Column 4: termcap capability name # Column 5: KEY_xxx name, if any, `-' otherwise # Column 6: value for KEY_xxx name, if any, `-' otherwise @@ -153,67 +153,103 @@ # to buy space for non-essentials Emacs is still using. Capabilities high # on that hit list: rc, sc, uc. # +# FORMATTING THE TABLES +# +# We manually specify a (minimum) column width for the capability name +# and terminfo code columns in the tables to achieve a consistent +# arrangement; as used here, tbl(1) cannot know the width required by +# one table's data while formatting another's. +# +# The longest capability names (C variables) are +# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at +# 25n), and the longest terminfo code is "setcolor" (8n). +# +# The tables are a tight fit on traditional man(7) implementations that +# use a line length of 65n, and the "Description" column has little room +# within which the formatter can make breaking or adjustment decisions. +# Words like "micro_..._address" and "parm_..._micro" don't break. +# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR +# ############################################################################# # # STANDARD CAPABILITIES # -#%The following is a complete table of the capabilities included in a -#%terminfo description block and available to terminfo-using code. In each -#%line of the table, -#% -#%The \fBvariable\fR is the name by which the programmer (at the terminfo level) -#%accesses the capability. -#% -#%The \fBcapname\fR is the short name used in the text of the database, -#%and is used by a person updating the database. -#%Whenever possible, capnames are chosen to be the same as or similar to -#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses -#%identical or very similar names). Semantics are also intended to match -#%those of the specification. -#% -#%The termcap code is the old -#%.B termcap -#%capability name (some capabilities are new, and have names which termcap -#%did not originate). -#%.P -#%Capability names have no hard length limit, but an informal limit of 5 -#%characters has been adopted to keep them short and to allow the tabs in -#%the source file -#%.B Caps +#%Tables of capabilities +#%.I \%ncurses +#%recognizes in a +#%.I \%term\%info +#%terminal type description and available to +#%.IR \%term\%info -using +#%code follow. +#%.bP +#%The capability name identifies the symbol by which the programmer +#%using the +#%.I \%term\%info +#%API accesses the capability. +#%.bP +#%The TI +#%.RI ( \%term\%info ) +#%code is the short name used by a person composing or updating a +#%terminal type entry. +#%.IP +#%Whenever possible, +#%these codes are the same as or similar to those of the ANSI X3.64-1979 +#%standard +#%(now superseded by ECMA-48, +#%which uses identical or very similar names). +#%Semantics are also intended to match those of the specification. +#%.IP +#%.I \%term\%info +#%codes have no hard length limit, +#%but +#%.I \%ncurses +#%maintains an informal one of 5 characters to keep them short and to +#%allow the tabs in the source file +#%.I Caps #%to line up nicely. -#% -#%Finally, the description field attempts to convey the semantics of the -#%capability. You may find some codes in the description field: -#%.TP -#%(P) -#%indicates that padding may be specified +#%(Some standard codes exceed this limit regardless.) +#%.bP +#%The TC +#%.RI ( termcap ) +#%code is that used by the corresponding API of +#%.IR \%ncurses . +#%(Some capabilities are new, +#%and have names that BSD +#%.I termcap +#%did not originate.) +#%.bP +#%The description field attempts to convey the capability's semantics. +#%.PP +#%The description field employs a handful of notations. #%.TP -#%#[1-9] -#%in the description field indicates that the string is passed -#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP). -#%.IP -#%If no parameters are listed in the description, -#%passing the string through \fBtparm\fP(3X) may give unexpected results, -#%e.g., if it contains percent (%%) signs. +#%.B (P) +#%indicates that padding may be specified. #%.TP -#%(P*) -#%indicates that padding may vary in proportion to the number of -#%lines affected +#%.B (P*) +#%indicates that padding may vary in proportion to the number of output +#%lines affected. #%.TP -#%(#\d\fIi\fP\u) -#%indicates the \fIi\fP\uth\d parameter. -#% +#%.BI # i +#%indicates the +#%.IR i th +#%parameter of a string capability; +#%the programmer should pass the string to \fB\%tparm\fP(3X) with the +#%parameters listed. +#%.IP +#%If the description lists no parameters, +#%passing the string to \fB\%tparm\fP(3X) may produce unexpected +#%behavior, +#%for instance if the string contains percent signs. +#%. #%.PP -#% These are the boolean capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBBooleans name Code\fR +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Boolean Capability Name TI TC Description +#%_ auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column auto_right_margin am bool am - - YBCGE terminal has automatic margins no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C) @@ -235,7 +271,7 @@ dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t106 tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine) transparent_underline ul bool ul - - YBCGE underline character overstrikes xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking -# end booleans for HPUX 9, 10 (non-color curses) +# end Booleans for HPUX 9, 10 (non-color curses) needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required prtr_silent mc5i bool 5i - - ----- printer will not echo on screen hard_cursor chts bool HC - - ----- cursor is hard to see @@ -253,18 +289,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution #%.TE -#%.ad -#% -#%These are the numeric capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ columns cols num co - - YBCGE number of columns in a line init_tabs it num it - - YB-G- tabs initially every # spaces lines lines num li - - YBCGE number of lines on screen or page @@ -284,20 +318,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen no_color_video ncv num NC - - ----- video attributes that cannot be used with colors #%.TE -#%.ad -#% +#%.PP +#%. #%The following numeric capabilities are present in the SVr4.0 term structure, -#%but are not yet documented in the man page. They came in with SVr4's -#%printer support. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%but are not yet documented in the man page. +#%They came in with SVr4's printer support. +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch @@ -316,18 +351,16 @@ buttons btns num BT - - ----- number of buttons on mouse bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row bit_image_type bitype num Yp - - ----- type of bit-image device #%.TE -#%.ad -#% -#%These are the string capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ back_tab cbt str bt - - YBCGE back tab (P) bell bel str bl - - YB-GE audible signal (bell) (P) carriage_return cr str cr - - YBCGE carriage return (P*) (P*) @@ -390,6 +423,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key @@ -452,6 +489,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*) reset_1string rs1 str r1 - - -B--- reset string reset_2string rs2 str r2 - - -B--- reset string +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. reset_3string rs3 str r3 - - -B--- reset string reset_file rf str rf - - -B--- name of reset file restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor @@ -517,6 +558,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key key_f40 kf40 str FU KEY_F(40) - ----E F40 function key key_f41 kf41 str FV KEY_F(41) - ----E F41 function key key_f42 kf42 str FW KEY_F(42) - ----E F42 function key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_f43 kf43 str FX KEY_F(43) - ----E F43 function key key_f44 kf44 str FY KEY_F(44) - ----E F44 function key key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key @@ -577,6 +622,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key key_save ksav str &6 KEY_SAVE 0571 ----- save key key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key key_undo kund str &8 KEY_UNDO 0630 ----- undo key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key @@ -609,7 +658,7 @@ key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key req_for_input rfi str RF - - ----- send next input char (for ptys) clr_bol el1 str cb - - ----- Clear to beginning of line clear_margins mgc str MC - - ----- clear right and left soft margins -set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap). +set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP) set_right_margin smgr str MR - - ----- set right soft margin at current column label_format fln str Lf - - ----- label format set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs @@ -654,6 +703,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1 change_res_vert cvr str ZD - - ----- Change vertical resolution to #1 define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3 enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode enter_italics_mode sitm str ZH - - ----- Enter italic mode enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion @@ -699,19 +752,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR zero_motion zerom str Zx - - ----- No motion for subsequent character #%.TE -#%.ad -#% +#%.PP +#%. #%The following string capabilities are present in the SVr4.0 term structure, #%but were originally not documented in the man page. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw18. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred mouse_info minfo str Mi - - ----- Mouse status information @@ -748,9 +802,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options scancode_escape scesc str S7 - - ----- Escape for scancode emulation alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation #%.TE -#%.ad -#% -#%.in .8i +#%.PP +#%. #%The XSI Curses standard added these hardcopy capabilities. #%They were used in some post-4.1 versions of System V curses, #%e.g., Solaris 2.5 and IRIX 6.x. @@ -759,17 +812,18 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio #%If your compiled terminfo entries use these, #%they may not be binary-compatible with System V terminfo #%entries after SVr4.1; beware! -#% +#%. #%AIX and Solaris do not provide termcap names for these; HPUX does. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap). enter_horizontal_hl_mode ehhlm str Q1 - - ----- Enter horizontal highlight mode enter_left_hl_mode elhlm str Q2 - - ----- Enter left highlight mode @@ -785,7 +839,6 @@ exit_right_hl_mode rmrhlm str Qb - - ----K Exit right highlight mode exit_top_hl_mode rmthlm str Qc - - ----K Exit top highlight mode exit_vertical_hl_mode rmvhlm str Qd - - ----K Exit vertical highlight mode #%.TE -#%.ad # # The magic token below tells the tic compiler-generator code that all the caps # past it should be ignored (not written out) when dumping terminfo objects. It diff --git a/include/Caps.keys b/include/Caps.keys index 09d7a472..6f8a84e3 100644 --- a/include/Caps.keys +++ b/include/Caps.keys @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 2001-2015,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -30,7 +30,7 @@ # Author: Thomas Dickey # and: Ilya Zakharevich # -# $Id: Caps.keys,v 1.17 2021/10/08 07:55:48 tom Exp $ +# $Id: Caps.keys,v 1.25 2024/04/20 21:05:02 tom Exp $ # # This is an adaptation of ncurses' termcap/terminfo capability table, which # is illustrates an experimental extension to describe alt-, shift- and @@ -50,7 +50,7 @@ # # Column 1: terminfo variable name # Column 2: terminfo capability name -# Column 3: capability type (boolean, numeric, or string) +# Column 3: capability type (Boolean, numeric, or string) # Column 4: termcap capability name # Column 5: KEY_xxx name, if any, `-' otherwise # Column 6: value for KEY_xxx name, if any, `-' otherwise @@ -155,67 +155,104 @@ # to buy space for non-essentials Emacs is still using. Capabilities high # on that hit list: rc, sc, uc. # +# FORMATTING THE TABLES +# +# We manually specify a (minimum) column width for the capability name +# and terminfo code columns in the tables to achieve a consistent +# arrangement; as used here, tbl(1) cannot know the width required by +# one table's data while formatting another's. +# +# The longest capability names (C variables) are +# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at +# 25n), and the longest terminfo codes are "setcolor", "kcdelete", +# "kcinsert", "kadelete", and "kcinsert" (8n). +# +# The tables are a tight fit on traditional man(7) implementations that +# use a line length of 65n, and the "Description" column has little room +# within which the formatter can make breaking or adjustment decisions. +# Words like "micro_..._address" and "parm_..._micro" don't break. +# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR +# ############################################################################# # # STANDARD CAPABILITIES # -#%The following is a complete table of the capabilities included in a -#%terminfo description block and available to terminfo-using code. In each -#%line of the table, -#% -#%The \fBvariable\fR is the name by which the programmer (at the terminfo level) -#%accesses the capability. -#% -#%The \fBcapname\fR is the short name used in the text of the database, -#%and is used by a person updating the database. -#%Whenever possible, capnames are chosen to be the same as or similar to -#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses -#%identical or very similar names). Semantics are also intended to match -#%those of the specification. -#% -#%The termcap code is the old -#%.B termcap -#%capability name (some capabilities are new, and have names which termcap -#%did not originate). -#%.P -#%Capability names have no hard length limit, but an informal limit of 5 -#%characters has been adopted to keep them short and to allow the tabs in -#%the source file -#%.B Caps +#%Tables of capabilities +#%.I \%ncurses +#%recognizes in a +#%.I \%term\%info +#%terminal type description and available to +#%.IR \%term\%info -using +#%code follow. +#%.bP +#%The capability name identifies the symbol by which the programmer +#%using the +#%.I \%term\%info +#%API accesses the capability. +#%.bP +#%The TI +#%.RI ( \%term\%info ) +#%code is the short name used by a person composing or updating a +#%terminal type entry. +#%.IP +#%Whenever possible, +#%these codes are the same as or similar to those of the ANSI X3.64-1979 +#%standard +#%(now superseded by ECMA-48, +#%which uses identical or very similar names). +#%Semantics are also intended to match those of the specification. +#%.IP +#%.I \%term\%info +#%codes have no hard length limit, +#%but +#%.I \%ncurses +#%maintains an informal one of 5 characters to keep them short and to +#%allow the tabs in the source file +#%.I Caps #%to line up nicely. -#% -#%Finally, the description field attempts to convey the semantics of the -#%capability. You may find some codes in the description field: -#%.TP -#%(P) -#%indicates that padding may be specified +#%(Some standard codes exceed this limit regardless.) +#%.bP +#%The TC +#%.RI ( termcap ) +#%code is that used by the corresponding API of +#%.IR \%ncurses . +#%(Some capabilities are new, +#%and have names that BSD +#%.I termcap +#%did not originate.) +#%.bP +#%The description field attempts to convey the capability's semantics. +#%.PP +#%The description field employs a handful of notations. #%.TP -#%#[1-9] -#%in the description field indicates that the string is passed -#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP). -#%.IP -#%If no parameters are listed in the description, -#%passing the string through \fBtparm\fP(3X) may give unexpected results, -#%e.g., if it contains percent (%%) signs. +#%.B (P) +#%indicates that padding may be specified. #%.TP -#%(P*) -#%indicates that padding may vary in proportion to the number of -#%lines affected +#%.B (P*) +#%indicates that padding may vary in proportion to the number of output +#%lines affected. #%.TP -#%(#\d\fIi\fP\u) -#%indicates the \fIi\fP\uth\d parameter. -#% +#%.BI # i +#%indicates the +#%.IR i th +#%parameter of a string capability; +#%the programmer should pass the string to \fB\%tparm\fP(3X) with the +#%parameters listed. +#%.IP +#%If the description lists no parameters, +#%passing the string to \fB\%tparm\fP(3X) may produce unexpected +#%behavior, +#%for instance if the string contains percent signs. +#%. #%.PP -#% These are the boolean capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBBooleans name Code\fR +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Boolean Capability Name TI TC Description +#%_ auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column auto_right_margin am bool am - - YBCGE terminal has automatic margins no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C) @@ -254,18 +291,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution #%.TE -#%.ad -#% -#%These are the numeric capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ columns cols num co - - YBCGE number of columns in a line init_tabs it num it - - YB-G- tabs initially every # spaces lines lines num li - - YBCGE number of lines on screen or page @@ -284,20 +319,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen no_color_video ncv num NC - - ----- video attributes that cannot be used with colors #%.TE -#%.ad -#% +#%.PP +#%. #%The following numeric capabilities are present in the SVr4.0 term structure, -#%but are not yet documented in the man page. They came in with SVr4's -#%printer support. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%but are not yet documented in the man page. +#%They came in with SVr4's printer support. +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch @@ -316,18 +352,16 @@ buttons btns num BT - - ----- number of buttons on mouse bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row bit_image_type bitype num Yp - - ----- type of bit-image device #%.TE -#%.ad -#% -#%These are the string capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ back_tab cbt str bt - - YBCGE back tab (P) bell bel str bl - - YB-GE audible signal (bell) (P) carriage_return cr str cr - - YBCGE carriage return (P*) (P*) @@ -390,6 +424,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key @@ -452,6 +490,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*) reset_1string rs1 str r1 - - -B--- reset string reset_2string rs2 str r2 - - -B--- reset string +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. reset_3string rs3 str r3 - - -B--- reset string reset_file rf str rf - - -B--- name of reset file restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor @@ -518,6 +560,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key key_save ksav str &6 KEY_SAVE 0571 ----- save key key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key key_undo kund str &8 KEY_UNDO 0630 ----- undo key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key @@ -580,6 +626,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key key_f40 kf40 str FU KEY_F(40) - ----E F40 function key key_f41 kf41 str FV KEY_F(41) - ----E F41 function key key_f42 kf42 str FW KEY_F(42) - ----E F42 function key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_f43 kf43 str FX KEY_F(43) - ----E F43 function key key_f44 kf44 str FY KEY_F(44) - ----E F44 function key key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key @@ -603,7 +653,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key clr_bol el1 str cb - - ----- Clear to beginning of line clear_margins mgc str MC - - ----- clear right and left soft margins -set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap). +set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP) set_right_margin smgr str MR - - ----- set right soft margin at current column label_format fln str Lf - - ----- label format set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs @@ -736,6 +786,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1 change_res_vert cvr str ZD - - ----- Change vertical resolution to #1 define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3 enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode enter_italics_mode sitm str ZH - - ----- Enter italic mode enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion @@ -781,19 +835,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR zero_motion zerom str Zx - - ----- No motion for subsequent character #%.TE -#%.ad -#% +#%.PP +#%. #%The following string capabilities are present in the SVr4.0 term structure, #%but were originally not documented in the man page. -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw18. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred mouse_info minfo str Mi - - ----- Mouse status information @@ -830,9 +885,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options scancode_escape scesc str S7 - - ----- Escape for scancode emulation alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation #%.TE -#%.ad -#% -#%.in .8i +#%.PP +#%. #%The XSI Curses standard added these hardcopy capabilities. #%They were used in some post-4.1 versions of System V curses, #%e.g., Solaris 2.5 and IRIX 6.x. @@ -841,15 +895,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio #%If your compiled terminfo entries use these, #%they may not be binary-compatible with System V terminfo #%entries after SVr4.1; beware! -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%. +#%.PP +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode @@ -859,7 +914,6 @@ enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6 set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap). #%.TE -#%.ad # # The magic token below tells the tic compiler-generator code that all the caps # past it should be ignored (not written out) when dumping terminfo objects. It diff --git a/include/Caps.osf1r5 b/include/Caps.osf1r5 index beb71c34..ece14aef 100644 --- a/include/Caps.osf1r5 +++ b/include/Caps.osf1r5 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 2002-2015,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -29,7 +29,7 @@ # # Author: Thomas Dickey # -# $Id: Caps.osf1r5,v 1.16 2021/10/08 07:55:48 tom Exp $ +# $Id: Caps.osf1r5,v 1.24 2024/04/20 21:05:02 tom Exp $ # # This is an adaptation of ncurses' termcap/terminfo capability table, which # is designed to align with OSF/1 version 5 (Tru64) terminfo. @@ -48,7 +48,7 @@ # # Column 1: terminfo variable name # Column 2: terminfo capability name -# Column 3: capability type (boolean, numeric, or string) +# Column 3: capability type (Boolean, numeric, or string) # Column 4: termcap capability name # Column 5: KEY_xxx name, if any, `-' otherwise # Column 6: value for KEY_xxx name, if any, `-' otherwise @@ -153,67 +153,103 @@ # to buy space for non-essentials Emacs is still using. Capabilities high # on that hit list: rc, sc, uc. # +# FORMATTING THE TABLES +# +# We manually specify a (minimum) column width for the capability name +# and terminfo code columns in the tables to achieve a consistent +# arrangement; as used here, tbl(1) cannot know the width required by +# one table's data while formatting another's. +# +# The longest capability names (C variables) are +# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at +# 25n), and the longest terminfo code is "setcolor" (8n). +# +# The tables are a tight fit on traditional man(7) implementations that +# use a line length of 65n, and the "Description" column has little room +# within which the formatter can make breaking or adjustment decisions. +# Words like "micro_..._address" and "parm_..._micro" don't break. +# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR +# ############################################################################# # # STANDARD CAPABILITIES # -#%The following is a complete table of the capabilities included in a -#%terminfo description block and available to terminfo-using code. In each -#%line of the table, -#% -#%The \fBvariable\fR is the name by which the programmer (at the terminfo level) -#%accesses the capability. -#% -#%The \fBcapname\fR is the short name used in the text of the database, -#%and is used by a person updating the database. -#%Whenever possible, capnames are chosen to be the same as or similar to -#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses -#%identical or very similar names). Semantics are also intended to match -#%those of the specification. -#% -#%The termcap code is the old -#%.B termcap -#%capability name (some capabilities are new, and have names which termcap -#%did not originate). -#%.P -#%Capability names have no hard length limit, but an informal limit of 5 -#%characters has been adopted to keep them short and to allow the tabs in -#%the source file -#%.B Caps +#%Tables of capabilities +#%.I \%ncurses +#%recognizes in a +#%.I \%term\%info +#%terminal type description and available to +#%.IR \%term\%info -using +#%code follow. +#%.bP +#%The capability name identifies the symbol by which the programmer +#%using the +#%.I \%term\%info +#%API accesses the capability. +#%.bP +#%The TI +#%.RI ( \%term\%info ) +#%code is the short name used by a person composing or updating a +#%terminal type entry. +#%.IP +#%Whenever possible, +#%these codes are the same as or similar to those of the ANSI X3.64-1979 +#%standard +#%(now superseded by ECMA-48, +#%which uses identical or very similar names). +#%Semantics are also intended to match those of the specification. +#%.IP +#%.I \%term\%info +#%codes have no hard length limit, +#%but +#%.I \%ncurses +#%maintains an informal one of 5 characters to keep them short and to +#%allow the tabs in the source file +#%.I Caps #%to line up nicely. -#% -#%Finally, the description field attempts to convey the semantics of the -#%capability. You may find some codes in the description field: -#%.TP -#%(P) -#%indicates that padding may be specified +#%(Some standard codes exceed this limit regardless.) +#%.bP +#%The TC +#%.RI ( termcap ) +#%code is that used by the corresponding API of +#%.IR \%ncurses . +#%(Some capabilities are new, +#%and have names that BSD +#%.I termcap +#%did not originate.) +#%.bP +#%The description field attempts to convey the capability's semantics. +#%.PP +#%The description field employs a handful of notations. #%.TP -#%#[1-9] -#%in the description field indicates that the string is passed -#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP). -#%.IP -#%If no parameters are listed in the description, -#%passing the string through \fBtparm\fP(3X) may give unexpected results, -#%e.g., if it contains percent (%%) signs. +#%.B (P) +#%indicates that padding may be specified. #%.TP -#%(P*) -#%indicates that padding may vary in proportion to the number of -#%lines affected +#%.B (P*) +#%indicates that padding may vary in proportion to the number of output +#%lines affected. #%.TP -#%(#\d\fIi\fP\u) -#%indicates the \fIi\fP\uth\d parameter. -#% +#%.BI # i +#%indicates the +#%.IR i th +#%parameter of a string capability; +#%the programmer should pass the string to \fB\%tparm\fP(3X) with the +#%parameters listed. +#%.IP +#%If the description lists no parameters, +#%passing the string to \fB\%tparm\fP(3X) may produce unexpected +#%behavior, +#%for instance if the string contains percent signs. +#%. #%.PP -#% These are the boolean capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBBooleans name Code\fR +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Boolean Capability Name TI TC Description +#%_ auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column auto_right_margin am bool am - - YBCGE terminal has automatic margins no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C) @@ -252,18 +288,16 @@ prtr_silent mc5i bool 5i - - ----- printer will not echo on screen row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr #%.TE -#%.ad -#% -#%These are the numeric capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ columns cols num co - - YBCGE number of columns in a line init_tabs it num it - - YB-G- tabs initially every # spaces lines lines num li - - YBCGE number of lines on screen or page @@ -298,18 +332,16 @@ output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inc print_rate cps num Ym - - ----- print rate in characters per second wide_char_size widcs num Yn - - ----- character step size when in double wide mode #%.TE -#%.ad -#% -#%These are the string capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ back_tab cbt str bt - - YBCGE back tab (P) bell bel str bl - - YB-GE audible signal (bell) (P) carriage_return cr str cr - - YBCGE carriage return (P*) (P*) @@ -372,6 +404,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key @@ -434,6 +470,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*) reset_1string rs1 str r1 - - -B--- reset string reset_2string rs2 str r2 - - -B--- reset string +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. reset_3string rs3 str r3 - - -B--- reset string reset_file rf str rf - - -B--- name of reset file restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor @@ -589,6 +629,10 @@ ena_acs enacs str eA - - ----- enable alternate char set end_bit_image_region endbi str Yy - - ----- End a bit-image region enter_am_mode smam str SA - - ----- turn on automatic margins enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode enter_italics_mode sitm str ZH - - ----- Enter italic mode enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion @@ -635,6 +679,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key key_f40 kf40 str FU KEY_F(40) - ----E F40 function key key_f41 kf41 str FV KEY_F(41) - ----E F41 function key key_f42 kf42 str FW KEY_F(42) - ----E F42 function key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_f43 kf43 str FX KEY_F(43) - ----E F43 function key key_f44 kf44 str FY KEY_F(44) - ----E F44 function key key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key @@ -673,6 +721,10 @@ key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key key_restart krst str &4 KEY_RESTART 0567 ----- restart key key_resume kres str &5 KEY_RESUME 0570 ----- resume key key_save ksav str &6 KEY_SAVE 0571 ----- save key +#%.TE +#%.TS +#%center; +#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx. key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key @@ -743,7 +795,7 @@ set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs set_color_band setcolor str Yz - - ----- Change to ribbon color #1 set_color_pair scp str sp - - ----- Set current color pair to #1 set_foreground setf str Sf - - ----- Set foreground color #1 -set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap). +set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP) set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1 set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap). set_page_length slines str YZ - - ----- Set page length to #1 lines diff --git a/include/Caps.uwin b/include/Caps.uwin index af47de9c..a41e9eca 100644 --- a/include/Caps.uwin +++ b/include/Caps.uwin @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 2001-2015,2016 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -29,7 +29,7 @@ # # Author: Thomas Dickey # -# $Id: Caps.uwin,v 1.15 2021/10/08 07:55:48 tom Exp $ +# $Id: Caps.uwin,v 1.23 2024/04/20 21:05:02 tom Exp $ # # This is an adaptation of ncurses' termcap/terminfo capability table, which # is designed to align with U/Win's terminfo. @@ -48,7 +48,7 @@ # # Column 1: terminfo variable name # Column 2: terminfo capability name -# Column 3: capability type (boolean, numeric, or string) +# Column 3: capability type (Boolean, numeric, or string) # Column 4: termcap capability name # Column 5: KEY_xxx name, if any, `-' otherwise # Column 6: value for KEY_xxx name, if any, `-' otherwise @@ -153,67 +153,103 @@ # to buy space for non-essentials Emacs is still using. Capabilities high # on that hit list: rc, sc, uc. # +# FORMATTING THE TABLES +# +# We manually specify a (minimum) column width for the capability name +# and terminfo code columns in the tables to achieve a consistent +# arrangement; as used here, tbl(1) cannot know the width required by +# one table's data while formatting another's. +# +# The longest capability names (C variable) is +# "hue_lightness_saturation" (24n), and the longest terminfo code is +# "colornm" (7n). +# +# The tables are a tight fit on traditional man(7) implementations that +# use a line length of 65n, and the "Description" column has little room +# within which the formatter can make breaking or adjustment decisions. +# Words like "micro_..._address" and "parm_..._micro" don't break. +# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR +# ############################################################################# # # STANDARD CAPABILITIES # -#%The following is a complete table of the capabilities included in a -#%terminfo description block and available to terminfo-using code. In each -#%line of the table, -#% -#%The \fBvariable\fR is the name by which the programmer (at the terminfo level) -#%accesses the capability. -#% -#%The \fBcapname\fR is the short name used in the text of the database, -#%and is used by a person updating the database. -#%Whenever possible, capnames are chosen to be the same as or similar to -#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses -#%identical or very similar names). Semantics are also intended to match -#%those of the specification. -#% -#%The termcap code is the old -#%.B termcap -#%capability name (some capabilities are new, and have names which termcap -#%did not originate). -#%.P -#%Capability names have no hard length limit, but an informal limit of 5 -#%characters has been adopted to keep them short and to allow the tabs in -#%the source file -#%.B Caps +#%Tables of capabilities +#%.I \%ncurses +#%recognizes in a +#%.I \%term\%info +#%terminal type description and available to +#%.IR \%term\%info -using +#%code follow. +#%.bP +#%The capability name identifies the symbol by which the programmer +#%using the +#%.I \%term\%info +#%API accesses the capability. +#%.bP +#%The TI +#%.RI ( \%term\%info ) +#%code is the short name used by a person composing or updating a +#%terminal type entry. +#%.IP +#%Whenever possible, +#%these codes are the same as or similar to those of the ANSI X3.64-1979 +#%standard +#%(now superseded by ECMA-48, +#%which uses identical or very similar names). +#%Semantics are also intended to match those of the specification. +#%.IP +#%.I \%term\%info +#%codes have no hard length limit, +#%but +#%.I \%ncurses +#%maintains an informal one of 5 characters to keep them short and to +#%allow the tabs in the source file +#%.I Caps #%to line up nicely. -#% -#%Finally, the description field attempts to convey the semantics of the -#%capability. You may find some codes in the description field: -#%.TP -#%(P) -#%indicates that padding may be specified +#%(Some standard codes exceed this limit regardless.) +#%.bP +#%The TC +#%.RI ( termcap ) +#%code is that used by the corresponding API of +#%.IR \%ncurses . +#%(Some capabilities are new, +#%and have names that BSD +#%.I termcap +#%did not originate.) +#%.bP +#%The description field attempts to convey the capability's semantics. +#%.PP +#%The description field employs a handful of notations. #%.TP -#%#[1-9] -#%in the description field indicates that the string is passed -#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP). -#%.IP -#%If no parameters are listed in the description, -#%passing the string through \fBtparm\fP(3X) may give unexpected results, -#%e.g., if it contains percent (%%) signs. +#%.B (P) +#%indicates that padding may be specified. #%.TP -#%(P*) -#%indicates that padding may vary in proportion to the number of -#%lines affected +#%.B (P*) +#%indicates that padding may vary in proportion to the number of output +#%lines affected. #%.TP -#%(#\d\fIi\fP\u) -#%indicates the \fIi\fP\uth\d parameter. -#% +#%.BI # i +#%indicates the +#%.IR i th +#%parameter of a string capability; +#%the programmer should pass the string to \fB\%tparm\fP(3X) with the +#%parameters listed. +#%.IP +#%If the description lists no parameters, +#%passing the string to \fB\%tparm\fP(3X) may produce unexpected +#%behavior, +#%for instance if the string contains percent signs. +#%. #%.PP -#% These are the boolean capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBBooleans name Code\fR +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. +#%\& Code \& +#%Boolean Capability Name TI TC Description +#%_ auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column auto_right_margin am bool am - - YBCGE terminal has automatic margins no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C) @@ -245,18 +281,16 @@ back_color_erase bce bool ut - - ----- screen erased with background color can_change ccc bool cc - - ----- terminal can re-define existing colors hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix) #%.TE -#%.ad -#% -#%These are the numeric capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBNumeric name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. +#%\& Code \& +#%Numeric Capability Name TI TC Description +#%_ columns cols num co - - YBCGE number of columns in a line init_tabs it num it - - YB-G- tabs initially every # spaces lines lines num li - - YBCGE number of lines on screen or page @@ -276,24 +310,16 @@ max_colors colors num Co - - ----- maximum number of colors on screen max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen no_color_video ncv num NC - - ----- video attributes that cannot be used with colors #%.TE -#%.ad -#% -#%The following numeric capabilities are present in the SVr4.0 term structure, -#%but are not yet documented in the man page. They came in with SVr4's -#%printer support. -#% -#%.na -#% -#%These are the string capabilities: -#% -#%.na -#%.TS H -#%center expand; -#%c l l c -#%c l l c -#%lw25 lw6 lw2 lw20. -#%\fBVariable Cap- TCap Description\fR -#%\fBString name Code\fR +#%.PP +#%. +#%.TS +#%center; +#%Lb Cb S Lb +#%Lb Lb Lb Lb +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. +#%\& Code \& +#%String Capability Name TI TC Description +#%_ back_tab cbt str bt - - YBCGE back tab (P) bell bel str bl - - YB-GE audible signal (bell) (P) carriage_return cr str cr - - YBCGE carriage return (P*) (P*) @@ -356,6 +382,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key +#%.TE +#%.TS +#%center; +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key @@ -418,6 +448,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*) reset_1string rs1 str r1 - - -B--- reset string reset_2string rs2 str r2 - - -B--- reset string +#%.TE +#%.TS +#%center; +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. reset_3string rs3 str r3 - - -B--- reset string reset_file rf str rf - - -B--- name of reset file restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor @@ -484,6 +518,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key key_save ksav str &6 KEY_SAVE 0571 ----- save key key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key key_undo kund str &8 KEY_UNDO 0630 ----- undo key +#%.TE +#%.TS +#%center; +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key @@ -546,6 +584,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key key_f40 kf40 str FU KEY_F(40) - ----E F40 function key key_f41 kf41 str FV KEY_F(41) - ----E F41 function key key_f42 kf42 str FW KEY_F(42) - ----E F42 function key +#%.TE +#%.TS +#%center; +#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx. key_f43 kf43 str FX KEY_F(43) - ----E F43 function key key_f44 kf44 str FY KEY_F(44) - ----E F44 function key key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key @@ -569,7 +611,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key clr_bol el1 str cb - - ----- Clear to beginning of line clear_margins mgc str MC - - ----- clear right and left soft margins -set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap). +set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP) set_right_margin smgr str MR - - ----- set right soft margin at current column device_type devt str dv - - ----- Indicate language/codeset support code_set_init csin str ci - - ----- Init sequence for multiple codesets @@ -593,7 +635,6 @@ set_background setb str Sb - - ----- Set background color #1 set_color_pair scp str sp - - ----- Set current color pair to #1 set_foreground setf str Sf - - ----- Set foreground color #1 #%.TE -#%.ad #% # The magic token below tells the tic compiler-generator code that all the caps # past it should be ignored (not written out) when dumping terminfo objects. It diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh index 86d6891c..e58ee2b6 100755 --- a/include/MKkey_defs.sh +++ b/include/MKkey_defs.sh @@ -1,7 +1,7 @@ #! /bin/sh -# $Id: MKkey_defs.sh,v 1.21 2020/08/17 10:45:33 tom Exp $ +# $Id: MKkey_defs.sh,v 1.24 2024/01/19 12:26:17 tom Exp $ ############################################################################## -# Copyright 2019,2020 Thomas E. Dickey # +# Copyright 2019-2022,2024 Thomas E. Dickey # # Copyright 2001-2013,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -35,7 +35,7 @@ # # Extract function-key definitions from the Caps file # -: ${AWK-awk} +: "${AWK-awk}" test $# = 0 && set Caps @@ -44,7 +44,8 @@ pass1=pass1_$$ pass2=pass2_$$ pass3=pass3_$$ pass4=pass4_$$ -trap 'rm -f $data pass[1234]_$$' EXIT INT QUIT TERM HUP +trap 'rm -f $data pass[1234]_$$; exit 1' 1 2 3 15 +trap 'rm -f $data pass[1234]_$$' 0 # change repeated tabs (used for readability) to single tabs (needed to make # awk see the right field alignment of the corresponding columns): @@ -63,10 +64,10 @@ fi # add keys that we generate automatically: cat >>$data <&1 >$TMP ) + mv "$2" "$BAK" + if ( grep "[ ]${name}[ ]" "$1" >$TMP 2>&1 ) then value=1 else @@ -58,11 +59,11 @@ do -e "s@#define ${name}.*\$@#define $name $value@" \ -e "s@#if $name\$@#if $value /* $name */@" \ -e "s@#if !$name\$@#if $value /* !$name */@" \ - $BAK >$2 - if (cmp -s $2 $BAK) + "$BAK" >"$2" + if (cmp -s "$2" "$BAK") then - mv $BAK $2 + mv "$BAK" "$2" else - rm -f $BAK + rm -f "$BAK" fi done diff --git a/include/headers b/include/headers index 32e33fdb..e1293b28 100644 --- a/include/headers +++ b/include/headers @@ -1,6 +1,6 @@ -# $Id: headers,v 1.15 2020/08/29 18:51:13 tom Exp $ +# $Id: headers,v 1.16 2023/04/22 12:09:09 tom Exp $ ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2023 Thomas E. Dickey # # Copyright 1998-2012,2013 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -39,11 +39,9 @@ ncurses_dll.h term.h termcap.h -# Headers used only for tic, other programs using internal interfaces +# Header used by tack 1.08 @ ticlib -$(srcdir)/tic.h $(srcdir)/term_entry.h -$(srcdir)/nc_tparm.h # Porting @ port_win32con diff --git a/include/nc_access.h b/include/nc_access.h index 2e893aa9..1d2fb0a4 100644 --- a/include/nc_access.h +++ b/include/nc_access.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2021 Thomas E. Dickey * + * Copyright 2021,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ -/* $Id: nc_access.h,v 1.2 2021/07/10 22:07:06 tom Exp $ */ +/* $Id: nc_access.h,v 1.6 2023/05/06 10:54:55 tom Exp $ */ #ifndef NC_ACCESS_included #define NC_ACCESS_included 1 @@ -41,33 +41,33 @@ extern "C" { #endif /* - * Turn off this symbol to limit access to environment variables when root. + * Turn off the 'use_terminfo_vars()' symbol to limit access to environment + * variables when running with privileges. */ -#ifdef USE_ROOT_ENVIRON - +#if defined(USE_ROOT_ENVIRON) && defined(USE_SETUID_ENVIRON) #define use_terminfo_vars() 1 - #else - #define use_terminfo_vars() _nc_env_access() -extern NCURSES_EXPORT(int) _nc_env_access (void); - #endif +extern NCURSES_EXPORT(int) _nc_env_access (void); + /* * Turn off this symbol to limit access to files when running setuid. */ #ifdef USE_ROOT_ACCESS -#define safe_fopen(name,mode) fopen(name,mode) +#define safe_fopen(name,mode) fopen(name,mode) +#define safe_open2(name,flags) open(name,flags) #define safe_open3(name,flags,mode) open(name,flags,mode) #else -#define safe_fopen(name,mode) fopen(name,mode) -#define safe_open3(name,flags,mode) open(name,flags,mode) -extern NCURSES_EXPORT(FILE *) _nc_safe_fopen (const char *, const char *); -extern NCURSES_EXPORT(int) _nc_safe_open3 (const char *, int, mode_t); +#define safe_fopen(name,mode) _nc_safe_fopen(name,mode) +#define safe_open2(name,flags) _nc_safe_open3(name,flags,0) +#define safe_open3(name,flags,mode) _nc_safe_open3(name,flags,mode) +extern NCURSES_EXPORT(FILE *) _nc_safe_fopen (const char *, const char *); +extern NCURSES_EXPORT(int) _nc_safe_open3 (const char *, int, mode_t); #endif diff --git a/include/nc_mingw.h b/include/nc_mingw.h index 6729b29d..1bfc4b0d 100644 --- a/include/nc_mingw.h +++ b/include/nc_mingw.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2008-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Thomas Dickey, 2008-on * ****************************************************************************/ -/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 tom Exp $ */ +/* $Id: nc_mingw.h,v 1.10 2023/02/25 19:59:24 tom Exp $ */ #ifndef NC_MINGW_H #define NC_MINGW_H 1 @@ -50,9 +50,6 @@ #undef sleep #define sleep(n) Sleep((n) * 1000) -#undef gettimeofday -#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) - #if HAVE_SYS_TIME_H #include /* for struct timeval */ #endif @@ -67,10 +64,12 @@ extern "C" { #include +#if !HAVE_CLOCK_GETTIME && !HAVE_GETTIMEOFDAY NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *); - #undef HAVE_GETTIMEOFDAY -#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GETTIMEOFDAY 2 +#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) +#endif #define SIGHUP 1 #define SIGKILL 9 diff --git a/include/nc_tparm.h b/include/nc_tparm.h index 943d9476..78170993 100644 --- a/include/nc_tparm.h +++ b/include/nc_tparm.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2006-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Thomas E. Dickey 2006 * ****************************************************************************/ -/* $Id: nc_tparm.h,v 1.11 2020/05/27 23:33:31 tom Exp $ */ +/* $Id: nc_tparm.h,v 1.12 2023/04/16 17:57:28 tom Exp $ */ #ifndef NC_TPARM_included #define NC_TPARM_included 1 @@ -78,6 +78,7 @@ #endif #ifdef NCURSES_INTERNALS +#define TIPARM_0(s) _nc_tiparm(0,s) #define TIPARM_1(s,a) _nc_tiparm(1,s,a) #define TIPARM_2(s,a,b) _nc_tiparm(2,s,a,b) #define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c) diff --git a/include/nc_win32.h b/include/nc_win32.h index 790e8dfe..e67b8e04 100644 --- a/include/nc_win32.h +++ b/include/nc_win32.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2008-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Thomas Dickey, 2008-on * ****************************************************************************/ -/* $Id: nc_win32.h,v 1.9 2020/09/13 00:17:30 tom Exp $ */ +/* $Id: nc_win32.h,v 1.10 2023/02/25 20:09:23 tom Exp $ */ #ifndef NC_WIN32_H #define NC_WIN32_H 1 @@ -79,9 +79,11 @@ extern "C" { #include +#if !HAVE_CLOCK_GETTIME && !HAVE_GETTIMEOFDAY #undef HAVE_GETTIMEOFDAY -#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GETTIMEOFDAY 2 extern NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *); +#endif #undef wcwidth #define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs)) diff --git a/include/ncurses_defs b/include/ncurses_defs index fc0b778a..c0da3ad5 100644 --- a/include/ncurses_defs +++ b/include/ncurses_defs @@ -1,6 +1,6 @@ -# $Id: ncurses_defs,v 1.98 2021/12/04 23:01:31 tom Exp $ +# $Id: ncurses_defs,v 1.110 2024/03/02 20:38:23 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2023,2024 Thomas E. Dickey # # Copyright 2000-2016,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -51,13 +51,16 @@ HAVE_BSD_STRING_H HAVE_BTOWC HAVE_BUILTIN_H HAVE_CHGAT 1 +HAVE_CLOCK_GETTIME HAVE_COLOR_CONTENT 1 HAVE_COLOR_SET 1 HAVE_CONSISTENT_GETENV +HAVE_CONSISTENT_MB_LEN_MAX HAVE_COPYWIN 1 HAVE_CURSCR 1 HAVE_CURSES_DATA_TABSIZE 1 HAVE_CURSES_DATA_TTYTYPE 1 +HAVE_CURSES_TRACE 1 HAVE_DELSCREEN 1 HAVE_DERWIN 1 HAVE_DIRENT_H @@ -68,6 +71,8 @@ HAVE_EXIT_TERMINFO 1 HAVE_FCNTL_H HAVE_FILTER 1 HAVE_FORM_H +HAVE_FPATHCONF +HAVE_GETAUXVAL HAVE_GETBEGX 1 HAVE_GETCURX 1 HAVE_GETCWD @@ -79,6 +84,7 @@ HAVE_GETOPT_H HAVE_GETPARX 1 HAVE_GETTIMEOFDAY HAVE_GETTTYNAM +HAVE_GETUID HAVE_GETWIN 1 HAVE_GPM_H HAVE_GPP_BUILTIN_H @@ -105,6 +111,7 @@ HAVE_LINK HAVE_LOCALECONV HAVE_LOCALE_H HAVE_LONG_FILE_NAMES +HAVE_MATH_FUNCS HAVE_MATH_H HAVE_MBLEN HAVE_MBRLEN @@ -119,6 +126,7 @@ HAVE_MVVLINE 1 HAVE_MVWIN 1 HAVE_MVWVLINE 1 HAVE_NANOSLEEP +HAVE_NAPMS 1 HAVE_NC_ALLOC_H HAVE_NEWPAD 1 HAVE_PANEL_H @@ -144,8 +152,8 @@ HAVE_SCR_DUMP 1 HAVE_SELECT HAVE_SETBUF HAVE_SETBUFFER -HAVE_SETFSUID HAVE_SETENV +HAVE_SETFSUID HAVE_SETUPTERM 1 HAVE_SETVBUF HAVE_SGTTY_H @@ -163,6 +171,7 @@ HAVE_STRSTR HAVE_SYMLINK HAVE_SYSCONF HAVE_SYS_BSDTYPES_H +HAVE_SYS_AUXV_H HAVE_SYS_IOCTL_H HAVE_SYS_PARAM_H HAVE_SYS_POLL_H @@ -184,6 +193,9 @@ HAVE_TERM_H 1 HAVE_TGETENT 1 HAVE_TIGETNUM 1 HAVE_TIGETSTR 1 +HAVE_TIPARM 1 +HAVE_TIPARM_S 1 +HAVE_TISCAN_S 1 HAVE_TIMES HAVE_TPUTS_SP HAVE_TSEARCH @@ -192,11 +204,12 @@ HAVE_TYPEINFO HAVE_TYPE_ATTR_T HAVE_TYPE_SIGACTION HAVE_UNCTRL_H 1 +HAVE_UNGET_WCH 1 HAVE_UNISTD_H HAVE_UNLINK HAVE_USE_DEFAULT_COLORS HAVE_USE_ENV 1 -HAVE_USE_EXTENDED_NAMES +HAVE_USE_EXTENDED_NAMES NCURSES_XNAMES HAVE_USE_SCREEN HAVE_USE_WINDOW HAVE_VFSCANF @@ -213,11 +226,13 @@ HAVE_WCTOMB HAVE_WCTYPE_H HAVE_WINSDELLN 1 HAVE_WINSSTR 1 +HAVE_WMEMCHR HAVE_WORKING_POLL HAVE_WRESIZE HAVE_WSYNCDOWN 1 HAVE__DOSCAN HAVE__TRACEF +HAVE__NC_TPARM_ANALYZE 1 MIXEDCASE_FILENAMES NCURSES_CHAR_EQ NCURSES_EXPANDED diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in index 437c54de..401d47a8 100644 --- a/include/ncurses_dll.h.in +++ b/include/ncurses_dll.h.in @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2009,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -26,7 +26,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ -/* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen Exp $ */ +/* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */ #ifndef NCURSES_DLL_H_incl #define NCURSES_DLL_H_incl 1 @@ -92,7 +92,11 @@ # define NCURSES_API __cdecl #else # define NCURSES_EXPORT_GENERAL_IMPORT -# define NCURSES_EXPORT_GENERAL_EXPORT +# if (__GNUC__ >= 4) && !defined(__cplusplus) +# define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default"))) +# else +# define NCURSES_EXPORT_GENERAL_EXPORT +# endif # define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */ #endif diff --git a/include/term_entry.h b/include/term_entry.h index e2cf8380..24389ad3 100644 --- a/include/term_entry.h +++ b/include/term_entry.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2015,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,7 +33,7 @@ * and: Thomas E. Dickey 1998-on * ****************************************************************************/ -/* $Id: term_entry.h,v 1.61 2021/09/04 10:52:55 tom Exp $ */ +/* $Id: term_entry.h,v 1.64 2023/04/22 13:37:14 tom Exp $ */ /* * term_entry.h -- interface to entry-manipulation code @@ -135,6 +135,7 @@ struct entry { extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head; extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail; #define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next) +#define for_entry_list2(qp,q0) for (qp = q0; qp; qp = qp->next) #define MAX_LINE 132 @@ -176,6 +177,8 @@ extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool); extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *); /* free_ttype.c: elementary allocation code */ +extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *); +extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *); extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *); /* lib_termcap.c: trim sgr0 string for termcap users */ @@ -208,26 +211,6 @@ extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *); #endif /* NCURSES_INTERNALS */ -/* - * These entrypoints were used by tack before 1.08. - */ - -#undef NCURSES_TACK_1_08 -#ifdef NCURSES_INTERNALS -#define NCURSES_TACK_1_08 /* nothing */ -#else -#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08") -#endif - -/* alloc_ttype.c: elementary allocation code */ -extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *) NCURSES_TACK_1_08; - -/* lib_acs.c */ -extern NCURSES_EXPORT(void) _nc_init_acs (void) NCURSES_TACK_1_08; /* corresponds to traditional 'init_acs()' */ - -/* free_ttype.c: elementary allocation code */ -extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *) NCURSES_TACK_1_08; - #ifdef __cplusplus } #endif diff --git a/include/tic.h b/include/tic.h index 36169f02..7569aae9 100644 --- a/include/tic.h +++ b/include/tic.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: tic.h,v 1.84 2021/08/21 00:24:45 tom Exp $ + * $Id: tic.h,v 1.87 2023/04/22 13:37:21 tom Exp $ * tic.h - Global variables and structures for the terminfo compiler. */ @@ -135,8 +135,7 @@ extern "C" { #define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT) #define set_trace_level(n) \ - _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \ - + DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \ + _nc_tracing &= TRACE_MAXIMUM, \ _nc_tracing |= DEBUG_LEVEL(n) #ifdef TRACE @@ -348,6 +347,14 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *); /* lib_tputs.c */ extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */ +/* comp_expand.c: expand string into readable form */ +extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int); + +/* comp_hash.c: name lookup */ +extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry + (const char *, const HashValue *); +extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool); + /* comp_main.c: compiler main */ extern const char * _nc_progname; @@ -362,31 +369,6 @@ extern NCURSES_EXPORT(int) _nc_tic_written (void); #endif /* NCURSES_INTERNALS */ -/* - * These entrypoints were used by tack before 1.08. - */ - -#undef NCURSES_TACK_1_08 -#ifdef NCURSES_INTERNALS -#define NCURSES_TACK_1_08 /* nothing */ -#else -#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08") -#endif - -/* comp_hash.c: name lookup */ -extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry - (const char *, const HashValue *) NCURSES_TACK_1_08; -extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool) NCURSES_TACK_1_08; - -/* comp_scan.c: lexical analysis */ -extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *) NCURSES_TACK_1_08; - -/* comp_expand.c: expand string into readable form */ -extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int) NCURSES_TACK_1_08; - -/* comp_scan.c: decode string from readable form */ -extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *) NCURSES_TACK_1_08; - #endif /* NCURSES_TERM_ENTRY_H_incl */ #ifdef __cplusplus diff --git a/install-sh b/install-sh index 462fa9c3..ec298b53 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,8 @@ -#! /bin/sh -# +#!/bin/sh # install - install a program, script, or datafile -# + +scriptversion=2020-11-14.01; # UTC + # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. @@ -34,261 +35,507 @@ # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. +doit=${DOITPROG-} +doit_exec=${doit:-exec} -# set DOITPROG to echo to test this script +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} +posix_mkdir= -# put in absolute paths if you don't have them in your path; or use env. vars. +# Desired mode of installed file. +mode=0755 -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +backupsuffix= +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd=$cpprog - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done +stripcmd= -if [ x"$src" = x ] -then - echo "$0: no input file specified" >&2 - exit 1 -else - : -fi +src= +dst= +dir_arg= +dst_arg= -if [ x"$dir_arg" != x ]; then - dst=$src - src="" +copy_on_change=false +is_target_a_directory=possibly - if [ -d "$dst" ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - if [ -f "$src" ] || [ -d "$src" ] - then - : - else - echo "$0: $src does not exist" >&2 - exit 1 - fi +Options: + --help display this help and exit. + --version display version info and exit. - if [ x"$dst" = x ] - then - echo "$0: no destination specified" >&2 - exit 1 - else - : - fi + -c (ignored) + -C install only if different (preserve data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. + -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG - if [ -d "$dst" ] - then - dst=$dst/`basename "$src"` - else - : - fi -fi +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. -## this sed command emulates the dirname command -dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +If -S is not specified, no backups are attempted. -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ +" -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-$defaultIFS}" +while test $# -ne 0; do + case $1 in + -c) ;; -oIFS=$IFS -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS=$oIFS + -C) copy_on_change=true;; -pathcomp='' + -d) dir_arg=true;; -while [ $# -ne 0 ] ; do - pathcomp=$pathcomp$1 - shift + -g) chgrpcmd="$chgrpprog $2" + shift;; - if [ ! -d "$pathcomp" ] ; - then - $mkdirprog "$pathcomp" - else - : - fi + --help) echo "$usage"; exit $?;; - pathcomp=$pathcomp/ -done -fi + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -if [ x"$dir_arg" != x ] -then - $doit $instcmd "$dst" && + -o) chowncmd="$chownprog $2" + shift;; - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi -else + -p) cpprog="$cpprog -p";; -# If we're going to rename the final executable, determine the name now. + -s) stripcmd=$stripprog;; - if [ x"$transformarg" = x ] - then - dstfile=`basename "$dst"` - else - dstfile=`basename "$dst" $transformbasename | - sed $transformarg`$transformbasename - fi + -S) backupsuffix="$2" + shift;; -# don't allow the sed command to completely eliminate the filename + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - if [ x"$dstfile" = x ] - then - dstfile=`basename "$dst"` - else - : - fi + -T) is_target_a_directory=never;; -# Make a couple of temp file names in the proper directory. + --version) echo "$0 $scriptversion"; exit $?;; - dsttmp=$dstdir/#inst.$$# - rmtmp=$dstdir/#rm.$$# + --) shift + break;; -# Trap to clean up temp files at exit. + -*) echo "$0: invalid option: $1" >&2 + exit 1;; - trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 - trap '(exit $?); exit' 1 2 13 15 + *) break;; + esac + shift +done -# Move or copy the file name to the temp name +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. - $doit $instcmd "$src" "$dsttmp" && +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi -# and set any options; do chmod last to preserve setuid bits +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi -# Now remove or move aside any old file at destination location. We try this -# two ways since rm can't unlink itself on some systems and the destination -# file might be busy for other reasons. In this case, the final cleanup -# might fail but the new file should still install successfully. +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi -{ - if [ -f "$dstdir/$dstfile" ] +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || - $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || - { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else - : + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi -} && - -# Now rename the file to the real destination. - - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - -fi && + trap '' 0;; + esac -# The final little trick to "correctly" pass the exit status to the exit trap. + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done -{ - (exit 0); exit -} +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/m/0001-ncurses-6.4.patch b/m/0001-ncurses-6.4.patch new file mode 100644 index 00000000..b58656e4 --- /dev/null +++ b/m/0001-ncurses-6.4.patch @@ -0,0 +1,36 @@ +From d95c6f1429c30562ca4604482b1379776d594490 Mon Sep 17 00:00:00 2001 +From: "Thomas E. Dickey" +Date: Sat, 31 Dec 2022 23:49:40 +0000 +Subject: [PATCH] ncurses 6.4 + +--- + ncurses/tinfo/MKkeys_list.sh | 0 + progs/MKtermsort.sh | 0 + test/savescreen.sh | 0 + test/tput-colorcube | 0 + test/tput-initc | 0 + 5 files changed, 0 insertions(+), 0 deletions(-) + mode change 100644 => 100755 ncurses/tinfo/MKkeys_list.sh + mode change 100644 => 100755 progs/MKtermsort.sh + mode change 100644 => 100755 test/savescreen.sh + mode change 100644 => 100755 test/tput-colorcube + mode change 100644 => 100755 test/tput-initc + +diff --git a/ncurses/tinfo/MKkeys_list.sh b/ncurses/tinfo/MKkeys_list.sh +old mode 100644 +new mode 100755 +diff --git a/progs/MKtermsort.sh b/progs/MKtermsort.sh +old mode 100644 +new mode 100755 +diff --git a/test/savescreen.sh b/test/savescreen.sh +old mode 100644 +new mode 100755 +diff --git a/test/tput-colorcube b/test/tput-colorcube +old mode 100644 +new mode 100755 +diff --git a/test/tput-initc b/test/tput-initc +old mode 100644 +new mode 100755 +-- +2.30.2 + diff --git a/man/MKada_config.in b/man/MKada_config.in index 4552c5dd..a017d09f 100644 --- a/man/MKada_config.in +++ b/man/MKada_config.in @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2021,2023 Thomas E. Dickey * .\" Copyright 2010-2014,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,98 +27,123 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: MKada_config.in,v 1.14 2021/12/25 17:39:16 tom Exp $ +.\" $Id: MKada_config.in,v 1.34 2024/04/20 21:13:27 tom Exp $ +.TH adacurses@USE_CFG_SUFFIX@\-config 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" .ds C adacurses@USE_CFG_SUFFIX@\-config -.TH ADACURSES "1" "" "" "User Commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ' \(aq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ie t .ds ' \(aq +.el .ds ' ' +.\} +. +.\" Fix broken EX/EE macros on DWB troff. +.\" Detect it: only DWB sets up a `)Y` register. +.if !\n(.g .if \n()Y \{\ +.\" Revert the undesired changes to indentation. +.am EX +.in -5n +.. +.am EE +.in +5n +.. +.\} +. .SH NAME -adacurses@USE_CFG_SUFFIX@\-config \- helper script for @ADA_LIBNAME@ libraries +\fB\%adacurses@USE_CFG_SUFFIX@\-config\fP \- +configuration helper for \fI@ADA_LIBNAME@\fP libraries .SH SYNOPSIS .B \*C -[\fIoptions\fP] +.RB [ \-\-cflags ] +.RB [ \-\-libs ] +.PP +.B \*C \-\-version +.PP +.B \*C \-\-help .SH DESCRIPTION -This is a shell script which simplifies configuring an application to use -the @ADA_LIBNAME@ library binding to ncurses. +This program development aid simplifies the process of configuring +applications to use the \fI@ADA_LIBNAME@\fP library binding to +\fI\%ncurses\fP. .SH OPTIONS -.TP +.TP 11 \" "--version" + 2n \fB\-\-cflags\fP -echos the gnat (Ada compiler) flags needed to compile with @ADA_LIBNAME@. +reports the GNAT (Ada compiler) flags needed to compile with +\fI@ADA_LIBNAME@\fP. .TP \fB\-\-libs\fP -echos the gnat libraries needed to link with @ADA_LIBNAME@. +reports the GNAT libraries needed to link with \fI@ADA_LIBNAME@\fP. .TP \fB\-\-version\fP -echos the release+patchdate version of the ncurses libraries used -to configure and build @ADA_LIBNAME@. +reports the release and patch date information of the \fI\%ncurses\fP +libraries used to configure and build \fI@ADA_LIBNAME@\fP and exits +successfully. .TP \fB\-\-help\fP -prints a list of the \fB\*C\fP script's options. +issues a usage message and exits successfully. .PP -If no options are given, \fB\*C\fP prints the combination -of -\fB\-\-cflags\fP and -\fB\-\-libs\fP -that \fBgnatmake\fP expects (see example). -.SH EXAMPLE +Omitting options implies \*(``\fB\-\-cflags \-\-libs\fP\*(''. +.SH EXAMPLES +Consider a program using \fI@ADA_LIBNAME@\fP to write the message +\*(``Hello, world!\*('' in the center of the screen and wait for the +user to press the \*(``q\*('' key before exiting. +Populate a file \fIhello.adb\fP with the following. .PP -For example, supposing that you want to compile the "Hello World!" -program for @ADA_LIBNAME@. -Make a file named "hello.adb": -.RS -.nf -.ft CW +.if \n(LL>67n .RS 4 +.EX with Terminal_Interface.Curses; use Terminal_Interface.Curses; procedure Hello is - Visibility : Cursor_Visibility := Invisible; + Message : constant String := "Hello, World!"; done : Boolean := False; c : Key_Code; - begin - Init_Screen; Set_Echo_Mode (False); - Set_Cursor_Visibility (Visibility); Set_Timeout_Mode (Standard_Window, Non_Blocking, 0); - Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2); - Add (Str => "Hello World!"); + Move_Cursor (Line => Lines / 2, + Column => (Columns \- Message\*'Length) / 2); + Add (Str => Message); while not done loop - c := Get_Keystroke (Standard_Window); + case c is - when Character'Pos ('q') => done := True; - when others => null; + when Character\*'Pos (\*'q\*') => done := True; + when others => null; end case; Nap_Milli_Seconds (50); end loop; End_Windows; - end Hello; -.fi -.RE +.EE +.if \n(LL>67n .RE +.ne 2 .PP Then, using -.RS -.ft CW -gnatmake `adacurses-config --cflags` hello -largs `adacurses-config --libs` -.ft +.RS 4 +.EX +gnatmake \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-cflags\(ga hello \e + \-largs \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-libs\(ga +.EE .RE -.PP -or (simpler): -.RS -.ft CW -gnatmake hello `adacurses-config` -.ft +or, more simply, +.RS 4 +.EX +gnatmake hello \(gaadacurses@USE_CFG_SUFFIX@\-config\(ga +.EE .RE -.PP -you will compile and link the program. +you can compile and link the program. .SH "SEE ALSO" -\fBcurses\fP(3X) -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +\fB\%curses\fP(3X) diff --git a/man/MKncu_config.in b/man/MKncu_config.in index 6abeb4b7..461c8432 100644 --- a/man/MKncu_config.in +++ b/man/MKncu_config.in @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2021,2023 Thomas E. Dickey * .\" Copyright 2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,73 +27,78 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: MKncu_config.in,v 1.6 2021/12/25 17:39:16 tom Exp $ -.TH @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config 1 "" +.\" $Id: MKncu_config.in,v 1.23 2024/04/20 21:13:38 tom Exp $ +.TH @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" .SH NAME -@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \- helper script for ncurses libraries +\fB\%@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config\fP \- +configuration helper for \fI\%ncurses\fP libraries .SH SYNOPSIS .B @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config -[\fIoptions\fP] +.I option +\&.\|.\|. +.PP +.B "@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \-\-version" +.PP +.B "@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \-\-help" .SH DESCRIPTION -This is a shell script which simplifies configuring applications against -a particular set of ncurses libraries. +This program development aid simplifies the process of configuring +applications against a particular set of \fI\%ncurses\fP libraries. .SH OPTIONS -.TP +.TP 18 \" "--mouse-version" + 2n + adjustment for PDF \fB\-\-prefix\fP -echos the package\-prefix of ncurses +reports the package prefix of \fI\%ncurses\fP. .TP \fB\-\-exec\-prefix\fP -echos the executable\-prefix of ncurses +reports the executable prefix of \fI\%ncurses\fP. .TP \fB\-\-cflags\fP -echos the C compiler flags needed to compile with ncurses +reports the C compiler flags needed to compile with \fI\%ncurses\fP. .TP \fB\-\-libs\fP -echos the libraries needed to link with ncurses -.TP -\fB\-\-version\fP -echos the release+patchdate version of ncurses +reports the libraries needed to link with \fI\%ncurses\fP. .TP \fB\-\-abi\-version\fP -echos the ABI version of ncurses +reports the ABI version of \fI\%ncurses\fP. .TP \fB\-\-mouse\-version\fP -echos the mouse\-interface version of ncurses +reports the mouse\-interface version of \fI\%ncurses\fP. .TP \fB\-\-bindir\fP -echos the directory containing ncurses programs +reports the directory containing \fI\%ncurses\fP programs. .TP \fB\-\-datadir\fP -echos the directory containing ncurses data +reports the directory containing \fI\%ncurses\fP data. .TP \fB\-\-includedir\fP -echos the directory containing ncurses header files +reports the directory containing \fI\%ncurses\fP header files. .TP \fB\-\-libdir\fP -echos the directory containing ncurses libraries +reports the directory containing \fI\%ncurses\fP libraries. .TP \fB\-\-mandir\fP -echos the directory containing ncurses manpages +reports the directory containing \fI\%ncurses\fP man pages. .TP \fB\-\-terminfo\fP -echos the $TERMINFO terminfo database path, e.g., -.RS -@TERMINFO@ -.RE +reports the \fI\%TERMINFO\fP \fIterminfo\fP database path, +for example \fI\%@TERMINFO@\fP. .TP \fB\-\-terminfo\-dirs\fP -echos the $TERMINFO_DIRS directory list, e.g., -.RS -@TERMINFO_DIRS@ -.RE +reports the \fI\%TERMINFO_DIRS\fP supplemental search path for the +\fIterminfo\fP database, +for example \fI\%@TERMINFO_DIRS@\fP. .TP \fB\-\-termpath\fP -echos the $TERMPATH termcap list, if support for termcap is configured. -.TP +reports the \fI\%TERMPATH\fP supplemental search path for the +\fItermcap\fP database, +if support for \fItermcap\fP is configured. +.PP +The following options cause all others to be ignored. +.TP 11 .\" "--version" + 2n \fB\-\-help\fP -prints this message +issues a usage message and exits successfully. +.TP +\fB\-\-version\fP +issues the release and patch date information of \fI\%ncurses\fP and +exits successfully. .SH "SEE ALSO" -\fBcurses\fP(3X) -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +\fB\%curses\fP(3X) diff --git a/man/MKterminfo.sh b/man/MKterminfo.sh index c79dbd8f..882ef2ad 100755 --- a/man/MKterminfo.sh +++ b/man/MKterminfo.sh @@ -1,10 +1,10 @@ #!/bin/sh -# $Id: MKterminfo.sh,v 1.18 2020/02/02 23:34:34 tom Exp $ +# $Id: MKterminfo.sh,v 1.20 2024/01/13 20:37:40 tom Exp $ # # MKterminfo.sh -- generate terminfo.5 from Caps tabular data # #*************************************************************************** -# Copyright 2018-2019,2020 Thomas E. Dickey * +# Copyright 2018-2020,2022 Thomas E. Dickey * # Copyright 1998-2003,2017 Free Software Foundation, Inc. * # * # Permission is hereby granted, free of charge, to any person obtaining a * @@ -50,7 +50,7 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi # -head=$1 +head="$1" shift 1 caps= while test $# -gt 1 @@ -58,7 +58,7 @@ do caps="$caps $1" shift 1 done -tail=$1 +tail="$1" cat <../edit_man.sed distclean realclean: clean - rm -f Makefile *-config.1 ../edit_man.* ../man_alias.* + -rm -f Makefile *-config.1 ../edit_man.* ../man_alias.* man_db.renames diff --git a/man/captoinfo.1m b/man/captoinfo.1m index aa8592c5..4693b06b 100644 --- a/man/captoinfo.1m +++ b/man/captoinfo.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,64 +28,76 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: captoinfo.1m,v 1.32 2021/12/25 21:37:49 tom Exp $ -.TH @CAPTOINFO@ 1M "" -.ds n 5 -.ds d @TERMINFO@ +.\" $Id: captoinfo.1m,v 1.63 2024/03/23 20:37:25 tom Exp $ +.TH @CAPTOINFO@ 1M 2024-03-23 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fB@CAPTOINFO@\fP \- convert a \fItermcap\fP description into a \fIterminfo\fP description +\fB\%@CAPTOINFO@\fP \- +convert a \fItermcap\fP description into a \fI\%term\%info\fP description .SH SYNOPSIS -\fB@CAPTOINFO@\fP [\fB\-v\fP\fIn\fP \fIwidth\fP] [\fB\-V\fP] [\fB\-1\fP] [\fB\-w\fP \fIwidth\fP] \fIfile\fP ... +.B @CAPTOINFO@ +.RI [ tic-option ] +.RI [ file +\&.\|.\|.] +.P +.B "@CAPTOINFO@ \-V" .SH DESCRIPTION -\fB@CAPTOINFO@\fP looks in each given text -\fIfile\fP for \fBtermcap\fP descriptions. -For each -one found, an equivalent \fBterminfo\fP description is written to standard -output. -Termcap \fBtc\fP capabilities are translated directly to terminfo -\fBuse\fP capabilities. +\fB\%@CAPTOINFO@\fP translates terminal descriptions. +It looks in each given text \fIfile\fP for \fI\%termcap\fP entries and, +for each one found, +writes an equivalent \fI\%\%term\%info\fP description to the standard +output stream. +\fI\%termcap\fP \fBtc\fP capabilities translate to \fI\%\%term\%info\fP +\*(``\fBuse\fP\*('' capabilities. .PP -If no \fIfile\fP is given, then the environment variable \fBTERMCAP\fP is used -for the filename or entry. -If \fBTERMCAP\fP is a full pathname to a file, only -the terminal whose name is specified in the environment variable \fBTERM\fP is -extracted from that file. -If the environment variable \fBTERMCAP\fP is not -set, then the file \fB\*d\fP is read. -.TP 5 -\fB\-v\fP -print out tracing information on standard error as the program runs. -.TP 5 -\fB\-V\fP -print out the version of the program in use on standard error and exit. -.TP 5 -\fB\-1\fP -cause the fields to print out one to a line. -Otherwise, the fields -will be printed several to a line to a maximum width of 60 -characters. -.TP 5 -\fB\-w\fP -change the output to \fIwidth\fP characters. -.SH FILES -.TP 20 -\*d -Compiled terminal description database. -.SH TRANSLATIONS FROM NONSTANDARD CAPABILITIES +If no \fIfile\fPs are specified, +\fB\%@CAPTOINFO@\fP interprets the content of the environment variable +\fI\%TERMCAP\fP as a file name, +and extracts only the entry for the terminal named in the environment +variable \fITERM\fP from it. +If the environment variable \fI\%TERMCAP\fP is not set, +\fB\%@CAPTOINFO@\fP reads +.IR \%/etc/termcap . .PP -Some obsolete nonstandard capabilities will automatically be translated -into standard (SVr4/XSI Curses) terminfo capabilities by \fB@CAPTOINFO@\fP. -Whenever one of these automatic translations is done, the program -will issue an notification to stderr, inviting the user to check that -it has not mistakenly translated a completely unknown and random -capability and/or syntax error. +This utility is implemented as a link to \fB\%@TIC@\fP(1M), +with the latter's +.B \-I +option implied. +You can use other \fB\%@TIC@\fP options such as +.BR \-1 , +.BR \-f , +.BR \-v , +.BR \-w , +and +.BR \-x . +The \fB\-V\fP option reports the version of \fI\%ncurses\fP associated +with this program and exits with a successful status. +.SS "Translations from Nonstandard Capabilities" +\fB\%@CAPTOINFO@\fP translates some obsolete, +nonstandard capabilities into standard +(SVr4/XSI Curses) +\fI\%\%term\%info\fP capabilities. +It issues a diagnostic to the standard error stream for each, +inviting the user to check that it has not mistakenly translated an +unknown or mistyped capability name. .PP -.TS H -c c c c -c c c c -l l l l. -Nonstd Std From Terminfo -name name capability +.\" DWB 3.3 tbl requires the two junk "L" specifiers in the first row. +.TS +center; +Cb S L L +Cb Cb Cb Cb +Cb Cb C Lb. +Name +Obsolete Standard Origin \f(BIterminfo\fP capability _ BO mr AT&T enter_reverse_mode CI vi AT&T cursor_invisible @@ -106,64 +118,72 @@ PS pf XENIX prtr_on PU kP XENIX key_ppage RT @8 XENIX kent UP ku XENIX kcuu1 -KA k; Tek key_f10 -KB F1 Tek key_f11 -KC F2 Tek key_f12 -KD F3 Tek key_f13 -KE F4 Tek key_f14 -KF F5 Tek key_f15 -BC Sb Tek set_background -FC Sf Tek set_foreground -HS mh Iris enter_dim_mode +KA k; Tektronix key_f10 +KB F1 Tektronix key_f11 +KC F2 Tektronix key_f12 +KD F3 Tektronix key_f13 +KE F4 Tektronix key_f14 +KF F5 Tektronix key_f15 +BC Sb Tektronix set_background +FC Sf Tektronix set_foreground +HS mh IRIX enter_dim_mode .TE .PP -XENIX termcap also used to have a set of extension capabilities -for forms drawing, designed to take advantage of the IBM PC -high-half graphics. -They were as follows: +XENIX \fI\%termcap\fP had a set of extension capabilities, +corresponding to box drawing characters of CCSID +(\*(``code page\*('') 437, +as follows. .PP -.TS H -c c -l l. -Cap Graphic +.TS +center; +cb cb +cb l . +\f(BItermcap\fP Name Graphic _ -G2 upper left -G3 lower left -G1 upper right -G4 lower right -GR pointing right -GL pointing left -GU pointing up -GD pointing down +G2 upper left corner +G3 lower left corner +G1 upper right corner +G4 lower right corner +GR tee pointing right +GL tee pointing left +GU tee pointing up +GD tee pointing down GH horizontal line GV vertical line GC intersection -G6 upper left -G7 lower left -G5 upper right -G8 lower right -Gr tee pointing right -Gr tee pointing left -Gu tee pointing up -Gd tee pointing down -Gh horizontal line -Gv vertical line -Gc intersection -GG acs magic cookie count +G6 double upper left corner +G7 double lower left corner +G5 double upper right corner +G8 double lower right corner +Gr double tee pointing right +Gr double tee pointing left +Gu double tee pointing up +Gd double tee pointing down +Gh double horizontal line +Gv double vertical line +Gc double intersection +.\" TODO: There are about 40 box drawing code points in CCSID 437; +.\" were there no XENIX capabilities for the mixed single- and double- +.\" line intersections? +.\" +.\" TODO: GG doesn't seem to fit with the others; explain it. +GG ACS magic cookie count .TE .PP -If the single-line capabilities occur in an entry, they will automatically -be composed into an \fBacsc\fP string. -The double-line capabilities and -\fBGG\fP are discarded with a warning message. +\fB\%@CAPTOINFO@\fP composes single-line capabilities into an \fBacsc\fP +string, +and discards \fBGG\fP and double-line capabilities with a warning +diagnostic. +.PP +IBM's AIX has a \fI\%\%term\%info\fP facility descended from SVr1 +\fI\%\%term\%info\fP, +but which is incompatible with the SVr4 format. +\fB\%@CAPTOINFO@\fP translates the following AIX extensions. .PP -IBM's AIX has a terminfo facility descended from SVr1 terminfo but incompatible -with the SVr4 format. -The following AIX extensions are automatically -translated: .TS -c c -l l. +center; +cb cb +l l . IBM XSI _ ksel kslt @@ -174,34 +194,42 @@ font2 s2ds font3 s3ds .TE .PP -Additionally, the AIX \fIbox1\fP capability will be automatically translated to -an \fBacsc\fP string. +Additionally, +this program translates the AIX \fBbox1\fP capability to an \fBacsc\fP +string. .PP -Hewlett-Packard's terminfo library supports two nonstandard terminfo -capabilities \fBmeml\fP (memory lock) and \fBmemu\fP (memory unlock). -These will be discarded with a warning message. -.SH NOTES -This utility is actually a link to \fB@TIC@\fP(1M), running in \fI\-I\fP mode. -You can use other \fB@TIC@\fP options such as \fB\-f\fP and \fB\-x\fP. -.PP -The verbose option is not identical to SVr4's. -Under SVr4, instead of following -the \fB\-v\fP with a trace level n, you repeat it n times. +The HP-UX \fI\%\%term\%info\fP library supports two nonstandard +\fI\%\%term\%info\fP capabilities, +\fBmeml\fP (memory lock) and \fBmemu\fP (memory unlock). +\fB\%@CAPTOINFO@\fP discards these with a warning message. +.SH FILES +.TP +.I /etc/termcap +default \fI\%termcap\fP terminal capability database .SH PORTABILITY -X/Open Curses, Issue 7 (2009) describes \fBtic\fP briefly, +X/Open Curses, +Issue 7 (2009) describes \fBtic\fP briefly, but omits this program. -SVr4 systems provide \fBcaptoinfo\fP as a separate application from \fBtic\fP. .PP -NetBSD does not provide this application. -.SH SEE ALSO -\fB@INFOCMP@\fP(1M), -\fBcurses\fP(3X), -\fBterminfo\fP(\*n) +SVr4 systems provide \fB\%captoinfo\fP as a separate application from +\fBtic\fP. +Its +.B \-v +option does not accept a trace level argument +.IR n ; +repeat +.B \-v +.I n +times instead. .PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.SH AUTHOR +NetBSD does not provide this application. +.SH AUTHORS Eric S. Raymond and .br -Thomas E. Dickey +Thomas E. Dickey +.SH SEE ALSO +\fB\%@INFOCMP@\fP(1M), +\fB\%@TIC@\fP(1M), +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/clear.1 b/man/clear.1 index a854baae..a1034db7 100644 --- a/man/clear.1 +++ b/man/clear.1 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,137 +27,160 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: clear.1,v 1.26 2021/12/26 00:13:25 tom Exp $ -.TH @CLEAR@ 1 "" -.\" these would be fallbacks for DS/DE, -.\" but groff changed the meaning of the macros. -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: clear.1,v 1.48 2024/03/16 15:35:01 tom Exp $ +.TH @CLEAR@ 1 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ' \(aq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ie t .ds ' \(aq +.el .ds ' ' +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ds n 5 +. .SH NAME -\fB@CLEAR@\fP \- clear the terminal screen +\fB\%@CLEAR@\fP \- +clear the terminal screen .SH SYNOPSIS -\fB@CLEAR@\fP [\fB\-T\fP\fItype\fP] [\fB\-V\fP] [\fB\-x\fP] -.br +.B @CLEAR@ +.RB [ \-x ] +.RB [ \-T\ \c +.IR terminal-type ] +.PP +.B "@CLEAR@ \-V" .SH DESCRIPTION -\fB@CLEAR@\fP clears your terminal's screen if this is possible, -including the terminal's scrollback buffer -(if the extended \*(``E3\*('' capability is defined). -\fB@CLEAR@\fP looks in the environment for the terminal type -given by the environment variable \fBTERM\fP, -and then in the -\fBterminfo\fP database to determine how to clear the screen. +\fB\%@CLEAR@\fP clears your terminal's screen and its scrollback buffer, +if any. +\fB\%@CLEAR@\fP retrieves the terminal type from the environment +variable \fITERM\fP, +then consults the \fIterminfo\fP terminal capability database entry for +that type to determine how to perform these actions. .PP -\fB@CLEAR@\fP writes to the standard output. -You can redirect the standard output to a file (which prevents -\fB@CLEAR@\fP from actually clearing the screen), -and later \fBcat\fP the file to the screen, clearing it at that point. +The capabilities to clear the screen and scrollback buffer are named +\*(``clear\*('' and \*(``E3\*('', respectively. +The latter is a \fIuser-defined capability\fP, +applying an extension mechanism introduced in \fI\%ncurses\fP 5.0 +(1999). .SH OPTIONS -.PP -.TP 5 +\fB\%@CLEAR@\fP recognizes the following options. +.TP 9 \" "-T type" + 2n .B \-T \fItype\fP -indicates the \fItype\fP of terminal. -Normally this option is -unnecessary, because the default is taken from the environment -variable \fBTERM\fP. -If \fB\-T\fP is specified, then the shell -variables \fBLINES\fP and \fBCOLUMNS\fP will also be ignored. +produces instructions suitable for the terminal \fItype\fP. +Normally, +this option is unnecessary, +because the terminal type is inferred from the environment variable +\fITERM\fP. +If this option is specified, +\fB\%@CLEAR@\fP ignores the environment variables \fILINES\fP and +\fI\%COLUMNS\fP as well. .TP .B \-V -reports the version of ncurses which was used in this program, and exits. -The options are as follows: +reports the version of \fI\%ncurses\fP associated with this program and +exits with a successful status. .TP .B \-x -do not attempt to clear the terminal's scrollback buffer -using the extended \*(``E3\*('' capability. +prevents \fB\%@CLEAR@\fP from attempting to clear the scrollback buffer. +.SH PORTABILITY +Neither IEEE Std 1003.1/The Open Group Base Specifications Issue 7 +(POSIX.1-2008) nor X/Open Curses Issue 7 documents \fB\%@CLEAR@\fP. +.PP +The latter documents \fBtput\fP, +which could be used to replace this utility either via a shell script or +by an alias +(such as a symbolic link) +to run \fB\%@TPUT@\fP as \fB\%@CLEAR@\fP. .SH HISTORY -A \fBclear\fP command appeared in 2.79BSD dated February 24, 1979. -Later that was provided in Unix 8th edition (1985). +A \fBclear\fP command using the \fItermcap\fP database and library +appeared in 2BSD (1979). +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/clear.c +Eighth Edition Unix (1985) later included it. +.PP +The commercial Unix arm of AT&T adapted a different BSD program +(\fBtset\fP) to make a new command, +\fBtput\fP, +and replaced the \fBclear\fP program with a shell script that called +\*(``\fBtput clear\fP\*(''. .PP -AT&T adapted a different BSD program (\fBtset\fP) to make -a new command (\fBtput\fP), -and used this to replace the \fBclear\fP command with a shell script -which calls \fBtput clear\fP, e.g., -.NS -/usr/bin/tput ${1:+-T$1} clear 2> /dev/null +.RS 4 +.EX +/usr/bin/tput ${1:+\-T$1} clear 2> /dev/null exit -.NE +.EE +.RE .PP In 1989, when Keith Bostic revised the BSD \fBtput\fP command -to make it similar to the AT&T \fBtput\fP, -he added a shell script for the \fBclear\fP command: -.NS +to make it similar to AT&T's \fBtput\fP, +he added a \fBclear\fP shell script as well. +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=Net2/usr/src/usr.bin/\ +.\" tput/clear.sh +.PP +.RS 4 +.EX exec tput clear -.NE +.EE +.RE .PP The remainder of the script in each case is a copyright notice. .PP -The ncurses \fBclear\fP command began in 1995 by adapting the original -BSD \fBclear\fP command (with terminfo, of course). -.PP -The \fBE3\fP extension came later: +In 1995, +\fI\%ncurses\fP's \fBclear\fP began by adapting BSD's original +\fBclear\fP command to use \fIterminfo\fP. +The \fBE3\fP extension came later. .bP -In June 1999, \fBxterm\fP provided an extension to the standard control +In June 1999, \fIxterm\fP provided an extension to the standard control sequence for clearing the screen. Rather than clearing just the visible part of the screen using -.NS -printf '\\033[2J' -.NE +.RS 8 +.PP +.EX +printf \*'\e033[2J\*' +.EE +.RE .IP -one could clear the \fIscrollback\fP using -.NS -printf '\\033[\fB3\fPJ' -.NE +one could clear the scrollback buffer as well by using +.RS 8 +.PP +.EX +printf \*'\e033[\fB3\fPJ\*' +.EE +.RE .IP -This is documented in \fIXTerm Control Sequences\fP as a feature originating -with \fBxterm\fP. +instead. +\*(``XTerm Control Sequences\fP\*('' documents this feature as +originating with \fIxterm\fP. .bP -A few other terminal developers adopted the feature, e.g., PuTTY in 2006. +A few other terminal emulators adopted it, +such as PuTTY in 2006. .bP In April 2011, a Red Hat developer submitted a patch to the Linux kernel, modifying its console driver to do the same thing. -The Linux change, part of the 3.0 release, did not mention \fBxterm\fP, -although it was cited in the Red Hat bug report (#683733) -which led to the change. +Documentation of this change, +appearing in Linux 3.0, +did not mention \fIxterm\fP, +although that program was cited in the Red Hat bug report (#683733) +motivating the feature. .bP -Again, a few other terminal developers adopted the feature. -But the -next relevant step was a change to the \fBclear\fP program in 2013 -to incorporate this extension. +Subsequently, +more terminal developers adopted the feature. +The next relevant step was to change the \fI\%ncurses\fP \fBclear\fP +program in 2013 to incorporate this extension. .bP -In 2013, the \fBE3\fP extension was overlooked in \fB@TPUT@\fP with -the \*(``clear\*('' parameter. -That was addressed in 2016 by reorganizing \fB@TPUT@\fP to share -its logic with \fB@CLEAR@\fP and \fB@TSET@\fP. -.SH PORTABILITY -Neither IEEE Std 1003.1/The Open Group Base Specifications Issue 7 -(POSIX.1-2008) nor X/Open Curses Issue 7 documents @TSET@ or @RESET@. -.PP -The latter documents \fBtput\fP, which could be used to replace this utility -either via a shell script or by an alias (such as a symbolic link) to -run \fB@TPUT@\fP as \fB@CLEAR@\fP. +In 2013, +the \fBE3\fP capability was not exercised by +\*(``\fB\%@TPUT@ clear\fP\*(''. +That oversight was addressed in 2016 by reorganizing \fB\%@TPUT@\fP to +share its logic with \fB\%@CLEAR@\fP and \fB\%@TSET@\fP. .SH SEE ALSO -\fB@TPUT@\fP(1), \fBterminfo\fP(\*n), \fBxterm\fP(1). -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +\fB\%@TPUT@\fP(1), +\fB\%xterm\fP(1), +\fB\%terminfo\fP(5) diff --git a/man/curs_add_wch.3x b/man/curs_add_wch.3x index ed84ece2..d1eb9a31 100644 --- a/man/curs_add_wch.3x +++ b/man/curs_add_wch.3x @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2001-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,42 +28,45 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_add_wch.3x,v 1.31 2021/12/25 21:37:49 tom Exp $ -.TH curs_add_wch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_add_wch.3x,v 1.62 2024/04/20 21:20:07 tom Exp $ +.TH curs_add_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBadd_wch\fP, -\fBwadd_wch\fP, -\fBmvadd_wch\fP, -\fBmvwadd_wch\fP, -\fBecho_wchar\fP, -\fBwecho_wchar\fP \- add a complex character and rendition to a \fBcurses\fP window, then advance the cursor +\fB\%add_wch\fP, +\fB\%wadd_wch\fP, +\fB\%mvadd_wch\fP, +\fB\%mvwadd_wch\fP, +\fB\%echo_wchar\fP, +\fB\%wecho_wchar\fP \- +add a \fIcurses\fR complex character to a window and advance the cursor .SH SYNOPSIS +.nf +\fB#include .PP -\fB#include \fP -.sp -.B "int add_wch( const cchar_t *\fIwch\fB );" -.br -.B "int wadd_wch( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );" -.br -.B "int mvadd_wch( int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );" -.br -.B "int mvwadd_wch( WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );" -.sp -.B "int echo_wchar( const cchar_t *\fIwch\fB );" -.br -.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );" -.br +\fBint add_wch(const cchar_t *\fIwch\fP); +\fBint wadd_wch(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP); +\fBint mvadd_wch(int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP); +\fBint mvwadd_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP); +.PP +\fBint echo_wchar(const cchar_t *\fIwch\fP); +\fBint wecho_wchar(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP); +.fi .SH DESCRIPTION .SS add_wch -.PP The \fBadd_wch\fP, \fBwadd_wch\fP, @@ -78,25 +82,31 @@ If \fIwch\fP refers to a spacing character, then any previous character at that location is removed. A new character specified by \fIwch\fP is placed at that location with rendition specified by \fIwch\fP. -The cursor then advances to -the next spacing character on the screen. +The cursor then advances after this spacing character, +to prepare for writing the next character on the screen. +.IP +The newly added spacing character is the base of the active complex character. +Subsequent non-spacing characters can be combined with this base +until another spacing character is written to the screen, +or the cursor is moved, e.g., using \fBwmove\fP. .bP If \fIwch\fP refers to a non-spacing character, -all previous characters at that location are preserved. -The non-spacing characters of \fIwch\fP -are added to the spacing complex character, -and the rendition specified by \fIwch\fP is ignored. +it is appended to the active complex character, +retaining the previous characters at that location. +The rendition specified by \fIwch\fP is ignored. +.IP +The cursor is not advanced after adding a non-spacing character. +Subsequent calls to add non-spacing characters will update the same position. .bP If the character part of \fIwch\fP is a tab, newline, backspace or other control character, the window is updated and the cursor moves as if \fBaddch\fP were called. .SS echo_wchar -.PP The \fBecho_wchar\fP function is functionally equivalent to a call to \fBadd_wch\fP followed by a call to -\fBrefresh\fP(3X). +\fB\%refresh\fP(3X). Similarly, the \fBwecho_wchar\fP is functionally equivalent to a call to @@ -107,99 +117,171 @@ 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 *\fBecho\fP* functions instead of their equivalents. -.SS Line Graphics -Like \fBaddch\fP(3X), +.SS "Line Graphics" +Like \fB\%addch\fP(3X), \fBaddch_wch\fP accepts symbols which make it simple to draw lines and other frequently used special characters. These symbols correspond to the same VT100 line-drawing set as -\fBaddch\fP(3X). +\fB\%addch\fP(3X). .PP .TS -l l l l l -l l l l l -_ _ _ _ _ -lw(1.5i) lw5 lw5 lw5 lw20. -\fBACS\fP \fBUnicode\fP \fBASCII\fP \fBacsc\fP \fBGlyph\fP -\fBName\fP \fBDefault\fP \fBDefault\fP \fBchar\fP \fBName\fP -WACS_BLOCK 0x25ae # 0 solid square block -WACS_BOARD 0x2592 # h board of squares -WACS_BTEE 0x2534 + v bottom tee -WACS_BULLET 0x00b7 o ~ bullet -WACS_CKBOARD 0x2592 : a checker board (stipple) -WACS_DARROW 0x2193 v . arrow pointing down -WACS_DEGREE 0x00b0 ' f degree symbol -WACS_DIAMOND 0x25c6 + ` diamond -WACS_GEQUAL 0x2265 > > greater-than-or-equal-to -WACS_HLINE 0x2500 \- q horizontal line -WACS_LANTERN 0x2603 # i lantern symbol -WACS_LARROW 0x2190 < , arrow pointing left -WACS_LEQUAL 0x2264 < y less-than-or-equal-to -WACS_LLCORNER 0x2514 + m lower left-hand corner -WACS_LRCORNER 0x2518 + j lower right-hand corner -WACS_LTEE 0x2524 + t left tee -WACS_NEQUAL 0x2260 ! | not-equal -WACS_PI 0x03c0 * { greek pi -WACS_PLMINUS 0x00b1 # g plus/minus -WACS_PLUS 0x253c + n plus -WACS_RARROW 0x2192 > + arrow pointing right -WACS_RTEE 0x251c + u right tee -WACS_S1 0x23ba \- o scan line 1 -WACS_S3 0x23bb \- p scan line 3 -WACS_S7 0x23bc \- r scan line 7 -WACS_S9 0x23bd \&_ s scan line 9 -WACS_STERLING 0x00a3 f } pound-sterling symbol -WACS_TTEE 0x252c + w top tee -WACS_UARROW 0x2191 ^ \- arrow pointing up -WACS_ULCORNER 0x250c + l upper left-hand corner -WACS_URCORNER 0x2510 + k upper right-hand corner -WACS_VLINE 0x2502 | x vertical line +Lb Lb Lb Lb Lb +Lb Lb Lb Lb Lb +Lb L L L Lx. +\& Unicode ASCII acsc \& +ACS Name Default Default Char Glyph Name +_ +WACS_BLOCK 0x25ae # 0 T{ +solid square block +T} +WACS_BOARD 0x2592 # h board of squares +WACS_BTEE 0x2534 + v bottom tee +WACS_BULLET 0x00b7 o ~ bullet +WACS_CKBOARD 0x2592 : a T{ +checker board (stipple) +T} +WACS_DARROW 0x2193 v . T{ +arrow pointing down +T} +WACS_DEGREE 0x00b0 ' f degree symbol +WACS_DIAMOND 0x25c6 + \(ga diamond +WACS_GEQUAL 0x2265 > > T{ +greater-than-or-equal-to +T} +WACS_HLINE 0x2500 \- q horizontal line +WACS_LANTERN 0x2603 # i lantern symbol +WACS_LARROW 0x2190 < , T{ +arrow pointing left +T} +WACS_LEQUAL 0x2264 < y T{ +less-than-or-equal-to +T} +WACS_LLCORNER 0x2514 + m T{ +lower left-hand corner +T} +WACS_LRCORNER 0x2518 + j T{ +lower right-hand corner +T} +WACS_LTEE 0x2524 + t left tee +WACS_NEQUAL 0x2260 ! | not-equal +WACS_PI 0x03c0 * { greek pi +WACS_PLMINUS 0x00b1 # g plus/minus +WACS_PLUS 0x253c + n plus +WACS_RARROW 0x2192 > + T{ +arrow pointing right +T} +WACS_RTEE 0x251c + u right tee +WACS_S1 0x23ba \- o scan line 1 +WACS_S3 0x23bb \- p scan line 3 +WACS_S7 0x23bc \- r scan line 7 +WACS_S9 0x23bd \&_ s scan line 9 +WACS_STERLING 0x00a3 f } T{ +pound-sterling symbol +T} +WACS_TTEE 0x252c + w top tee +WACS_UARROW 0x2191 ^ \- T{ +arrow pointing up +T} +WACS_ULCORNER 0x250c + l T{ +upper left-hand corner +T} +WACS_URCORNER 0x2510 + k T{ +upper right-hand corner +T} +WACS_VLINE 0x2502 | x vertical line .TE .PP -The wide-character configuration of ncurses also defines symbols +The wide-character configuration of \fI\%ncurses\fP also defines symbols for thick lines (\fBacsc\fP \*(``J\*('' to \*(``V\*(''): +.PP .TS -l l l l l -l l l l l -_ _ _ _ _ -lw(1.5i) lw5 lw5 lw5 lw20. -\fBACS\fP \fBUnicode\fP \fBASCII\fP \fBacsc\fP \fBGlyph\fP -\fBName\fP \fBDefault\fP \fBDefault\fP \fBchar\fP \fBName\fP -WACS_T_BTEE 0x253b + V thick tee pointing up -WACS_T_HLINE 0x2501 - Q thick horizontal line -WACS_T_LLCORNER 0x2517 + M thick lower left corner -WACS_T_LRCORNER 0x251b + J thick lower right corner -WACS_T_LTEE 0x252b + T thick tee pointing right -WACS_T_PLUS 0x254b + N thick large plus -WACS_T_RTEE 0x2523 + U thick tee pointing left -WACS_T_TTEE 0x2533 + W thick tee pointing down -WACS_T_ULCORNER 0x250f + L thick upper left corner -WACS_T_URCORNER 0x2513 + K thick upper right corner -WACS_T_VLINE 0x2503 | X thick vertical line +Lb Lb Lb Lb Lb +Lb Lb Lb Lb Lb +Lb L L L Lx. +\& Unicode ASCII acsc \& +ACS Name Default Default Char Glyph Name +_ +WACS_T_BTEE 0x253b + V T{ +thick tee pointing up +T} +WACS_T_HLINE 0x2501 - Q T{ +thick horizontal line +T} +WACS_T_LLCORNER 0x2517 + M T{ +thick lower left corner +T} +WACS_T_LRCORNER 0x251b + J T{ +thick lower right corner +T} +WACS_T_LTEE 0x252b + T T{ +thick tee pointing right +T} +WACS_T_PLUS 0x254b + N T{ +thick large plus +T} +WACS_T_RTEE 0x2523 + U T{ +thick tee pointing left +T} +WACS_T_TTEE 0x2533 + W T{ +thick tee pointing down +T} +WACS_T_ULCORNER 0x250f + L T{ +thick upper left corner +T} +WACS_T_URCORNER 0x2513 + K T{ +thick upper right corner +T} +WACS_T_VLINE 0x2503 | X T{ +thick vertical line +T} .TE .PP and for double-lines (\fBacsc\fP \*(``A\*('' to \*(``I\*(''): .PP .TS -l l l l l -l l l l l -_ _ _ _ _ -lw(1.5i) lw5 lw5 lw5 lw20. -\fBACS\fP \fBUnicode\fP \fBASCII\fP \fBacsc\fP \fBGlyph\fP -\fBName\fP \fBDefault\fP \fBDefault\fP \fBchar\fP \fBName\fP -WACS_D_BTEE 0x2569 + H double tee pointing up -WACS_D_HLINE 0x2550 - R double horizontal line -WACS_D_LLCORNER 0x255a + D double lower left corner -WACS_D_LRCORNER 0x255d + A double lower right corner -WACS_D_LTEE 0x2560 + F double tee pointing right -WACS_D_PLUS 0x256c + E double large plus -WACS_D_RTEE 0x2563 + G double tee pointing left -WACS_D_TTEE 0x2566 + I double tee pointing down -WACS_D_ULCORNER 0x2554 + C double upper left corner -WACS_D_URCORNER 0x2557 + B double upper right corner -WACS_D_VLINE 0x2551 | Y double vertical line +Lb Lb Lb Lb Lb +Lb Lb Lb Lb Lb +Lb L L L Lx. +\& Unicode ASCII acsc \& +ACS Name Default Default Char Glyph Name +_ +WACS_D_BTEE 0x2569 + H T{ +double tee pointing up +T} +WACS_D_HLINE 0x2550 - R T{ +double horizontal line +T} +WACS_D_LLCORNER 0x255a + D T{ +double lower left corner +T} +WACS_D_LRCORNER 0x255d + A T{ +double lower right corner +T} +WACS_D_LTEE 0x2560 + F T{ +double tee pointing right +T} +WACS_D_PLUS 0x256c + E T{ +double large plus +T} +WACS_D_RTEE 0x2563 + G T{ +double tee pointing left +T} +WACS_D_TTEE 0x2566 + I T{ +double tee pointing down +T} +WACS_D_ULCORNER 0x2554 + C T{ +double upper left corner +T} +WACS_D_URCORNER 0x2557 + B T{ +double upper right corner +T} +WACS_D_VLINE 0x2551 | Y T{ +double vertical line +T} .TE .PP -Unicode's descriptions for these characters differs slightly from ncurses, +Unicode's descriptions for these characters differs slightly from +\fI\%ncurses\fP, by introducing the term \*(``light\*('' (along with less important details). Here are its descriptions for the normal, thick, and double horizontal lines: .bP @@ -209,10 +291,9 @@ U+2501 BOX DRAWINGS HEAVY HORIZONTAL .bP U+2550 BOX DRAWINGS DOUBLE HORIZONTAL .SH RETURN VALUE -.PP All routines return the integer \fBERR\fP upon failure and \fBOK\fP on success. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. This implementation returns an error .bP if the window pointer is null or @@ -221,21 +302,22 @@ if it is not possible to add a complete character in the window. .PP The latter may be due to different causes: .bP -If \fBscrollok\fP is not enabled, +If \fB\%scrollok\fP(3X) 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 +However, +an error is returned because it is not possible to wrap to a new line. .bP 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. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -.PP Note that \fBadd_wch\fP, \fBmvadd_wch\fP, @@ -243,23 +325,22 @@ Note that \fBecho_wchar\fP may be macros. .SH PORTABILITY -.PP -All of these functions are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. The defaults specified for line-drawing characters apply in the POSIX locale. -.PP +.SS "WACS Symbols" X/Open Curses makes it clear that the WACS_ symbols should be defined as a pointer to \fBcchar_t\fP data, e.g., in the discussion of \fBborder_set\fP. A few implementations are problematic: .bP NetBSD curses defines the symbols as a \fBwchar_t\fP within a \fBcchar_t\fP. .bP -HPUX curses equates some of the \fBACS_\fP symbols +HP-UX curses equates some of the \fBACS_\fP symbols to the analogous \fBWACS_\fP symbols as if the \fBACS_\fP symbols were wide characters. The misdefined symbols are the arrows and other symbols which are not used for line-drawing. .PP -X/Open Curses does not define symbols for thick- or double-lines. +X/Open Curses does not specify symbols for thick- or double-lines. SVr4 curses implementations defined their line-drawing symbols in terms of intermediate symbols. This implementation extends those symbols, providing new definitions @@ -270,18 +351,20 @@ alternate character sets (i.e., the \fBacsc\fP capability), with their corresponding line-drawing characters. X/Open Curses did not address the aspect of integrating Unicode with line-drawing characters. -Existing implementations of Unix curses (AIX, HPUX, Solaris) +Existing implementations of Unix curses (AIX, HP-UX, Solaris) use only the \fBacsc\fP character-mapping to provide this feature. As a result, those implementations can only use single-byte line-drawing characters. -Ncurses 5.3 (2002) provided a table of Unicode values to solve these problems. +\fI\%ncurses\fP 5.3 (2002) provided a table of Unicode values to solve +these problems. NetBSD curses incorporated that table in 2010. .PP In this implementation, the Unicode values are used instead of the -terminal description's \fBacsc\fP mapping as discussed in ncurses(3X) -for the environment variable \fBNCURSES_NO_UTF8_ACS\fP. +terminal description's \fBacsc\fP mapping as discussed in +\fB\%ncurses\fP(3X) for the environment variable +\fINCURSES_NO_UTF8_ACS\fP. In contrast, for the same cases, the line-drawing characters -described in \fBcurs_addch\fP(3X) will use only the ASCII default values. +described in \fB\%addch\fP(3X) will use only the ASCII default values. .PP Having Unicode available does not solve all of the problems with line-drawing for curses: @@ -322,13 +405,45 @@ Others have suggested these alternatives: \[u2327] U+2327 (x in a rectangle), \[u256C] U+256C (forms double vertical and horizontal), and \[u2612] U+2612 (ballot box with x). +.SS "Complex Characters" +The complex character type \fBcchar_t\fR +can store more than one wide character (\fBwchar_t\fR). +The X/Open Curses description does not mention this possibility, +describing only the cases where \fIwch\fP is a spacing character +or a non-spacing character. +.PP +This implementation assumes that \fIwch\fP is constructed using +\fB\%setcchar\fP(3X), and in turn that the result +.bP +contains at most one spacing character in the beginning of its list of wide +characters, +and zero or more non-spacing characters +or +.bP +may hold one non-spacing character. +.PP +In the latter case, +\fI\%ncurses\fP adds the non-spacing character to the active +(base) spacing character. +.SS TABSIZE +The +.B TABSIZE +variable is implemented in SVr4 and other versions of +.IR curses , +but is not specified by X/Open Curses +(see \fBcurs_variables\fP(3X)). .SH SEE ALSO -.na +\fB\%curs_addch\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. .PP -\fBcurses\fP(3X), -\fBcurs_addch\fP(3X), -\fBcurs_attr\fP(3X), -\fBcurs_clear\fP(3X), -\fBcurs_outopts\fP(3X), -\fBcurs_refresh\fP(3X), -\fBputwc\fP(3) +\fB\%curses\fP(3X), +\fB\%curs_addwstr\fP(3X), +\fB\%curs_add_wchstr\fP(3X), +\fB\%curs_attr\fP(3X), +\fB\%curs_clear\fP(3X), +\fB\%curs_getcchar\fP(3X), +\fB\%curs_outopts\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%putwc\fP(3) diff --git a/man/curs_add_wchstr.3x b/man/curs_add_wchstr.3x index d76a9e19..5dd3e8f4 100644 --- a/man/curs_add_wchstr.3x +++ b/man/curs_add_wchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,54 +27,53 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_add_wchstr.3x,v 1.18 2021/12/25 21:41:58 tom Exp $ -.TH curs_add_wchstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_add_wchstr.3x,v 1.39 2024/04/20 21:20:07 tom Exp $ +.TH curs_add_wchstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBadd_wchstr\fP, -\fBadd_wchnstr\fP, -\fBwadd_wchstr\fP, -\fBwadd_wchnstr\fP, -\fBmvadd_wchstr\fP, -\fBmvadd_wchnstr\fP, -\fBmvwadd_wchstr\fP, -\fBmvwadd_wchnstr\fP \- add an array of complex characters (and attributes) to a curses window -.ad -.hy +\fB\%add_wchstr\fP, +\fB\%add_wchnstr\fP, +\fB\%wadd_wchstr\fP, +\fB\%wadd_wchnstr\fP, +\fB\%mvadd_wchstr\fP, +\fB\%mvadd_wchnstr\fP, +\fB\%mvwadd_wchstr\fP, +\fB\%mvwadd_wchnstr\fP \- +add a \fIcurses\fR complex character string to a window .SH SYNOPSIS .nf -\fB#include \fP +\fB#include .PP -\fBint add_wchstr(const cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint add_wchnstr(const cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint wadd_wchstr(WINDOW *\fP \fIwin\fP\fB, const cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint wadd_wchnstr(WINDOW *\fP \fIwin\fP\fB, const cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvadd_wchstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint mvadd_wchnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwadd_wchstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint mvwadd_wchnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP +\fBint add_wchstr(const cchar_t *\fIwchstr\fP); +\fBint wadd_wchstr(WINDOW * \fIwin\fP, const cchar_t *\fIwchstr\fP); +\fBint mvadd_wchstr(int \fIy\fP, int \fIx\fP, const cchar_t *\fIwchstr\fP); +\fBint mvwadd_wchstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwchstr\fP); +.PP +\fBint add_wchnstr(const cchar_t *\fIwchstr\fP, int \fIn\fP); +\fBint wadd_wchnstr(WINDOW * \fIwin\fP, const cchar_t *\fIwchstr\fP, int \fIn\fP); +\fBint mvadd_wchnstr(int \fIy\fP, int \fIx\fP, const cchar_t *\fIwchstr\fP, int \fIn\fP); +\fBint mvwadd_wchnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwchstr\fP, int \fIn\fP); .fi .SH DESCRIPTION These functions copy the (null-terminated) array of complex characters \fIwchstr\fP into the window image structure starting at the current cursor position. +.PP The four functions with \fIn\fP as the last argument copy at most \fIn\fP elements, but no more than will fit on the line. @@ -82,7 +81,7 @@ If \fBn\fP=\fB\-1\fP then the whole array is copied, to the maximum number of characters that will fit on the line. .PP The window cursor is \fInot\fP advanced. -These functions work faster than \fBwaddnstr\fP. +These functions are faster than \fBwaddnstr\fP. On the other hand: .bP they do not perform checking @@ -103,21 +102,27 @@ the remaining columns are filled with the background character and rendition. .SH RETURN VALUE All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. This implementation returns an error -if the window pointer is null. +.bP +if the \fIwin\fP parameter is null or +.bP +if the \fIwchstr\fP parameter is null. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES All functions except \fBwadd_wchnstr\fP may be macros. .SH PORTABILITY -These entry points are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_addwstr\fP(3X). +\fB\%curs_addchstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. .PP -Comparable functions in the narrow-character (ncurses) library are -described in -\fBcurs_addchstr\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_addwstr\fP(3X), +\fB\%curs_add_wch\fP(3X) diff --git a/man/curs_addch.3x b/man/curs_addch.3x index bf512cb1..ad548520 100644 --- a/man/curs_addch.3x +++ b/man/curs_addch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,120 +28,176 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addch.3x,v 1.58 2021/12/25 20:18:06 tom Exp $ -.TH curs_addch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_addch.3x,v 1.85 2024/04/20 19:03:47 tom Exp $ +.TH curs_addch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ' \(aq +.ds ^ \(ha +.ds ~ \(ti +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ds ' ' +.ds ^ ^ +.ds ~ ~ +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBaddch\fP, -\fBwaddch\fP, -\fBmvaddch\fP, -\fBmvwaddch\fP, -\fBechochar\fP, -\fBwechochar\fP \- add a character (with attributes) to a \fBcurses\fP window, then advance the cursor +\fB\%addch\fP, +\fB\%waddch\fP, +\fB\%mvaddch\fP, +\fB\%mvwaddch\fP, +\fB\%echochar\fP, +\fB\%wechochar\fP \- +add a \fIcurses\fP character to a window and advance the cursor .SH SYNOPSIS -\fB#include \fP +.nf +\fB#include .PP -\fBint addch(const chtype \fP\fIch\fP\fB);\fP -.br -\fBint waddch(WINDOW *\fP\fIwin\fP\fB, const chtype \fP\fIch\fP\fB);\fP -.br -\fBint mvaddch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype \fP\fIch\fP\fB);\fP -.br -\fBint mvwaddch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype \fP\fIch\fP\fB);\fP -.sp -\fBint echochar(const chtype \fP\fIch\fP\fB);\fP -.br -\fBint wechochar(WINDOW *\fP\fIwin\fP\fB, const chtype \fP\fIch\fP\fB);\fP -.br +\fBint addch(const chtype \fIch\fP); +\fBint waddch(WINDOW *\fIwin\fP, const chtype \fIch\fP); +\fBint mvaddch(int \fIy\fP, int \fIx\fP, const chtype \fIch\fP); +\fBint mvwaddch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const chtype \fIch\fP); +.PP +\fBint echochar(const chtype \fIch\fP); +\fBint wechochar(WINDOW *\fIwin\fP, const chtype \fIch\fP); +.fi .SH DESCRIPTION -.SS Adding characters -The \fBaddch\fP, \fBwaddch\fP, \fBmvaddch\fP and \fBmvwaddch\fP routines put -the character \fIch\fP into the given window at its current window position, -which is then advanced. -They are analogous to \fBputchar\fP(3) in \fBstdio\fP(3). -If the advance is at the right margin: -.bP -The cursor automatically wraps to the beginning of the next line. +.SS "Adding Characters" +.B \%waddch +puts the character +.I ch +at the cursor position of window +.IR win , +then advances the cursor position, +analogously to the standard C library's \fI\%putchar\fP(3). +\fB\%ncurses\fP(3X) describes the variants of this function. +.PP +If advancement occurs at the right margin, .bP -At the bottom of the current scrolling region, -and if \fBscrollok\fP is enabled, -the scrolling region is scrolled up one line. +the cursor automatically wraps to the beginning of the next line; +and .bP -If \fBscrollok\fP 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 +at the bottom of the current scrolling region, +and if \fB\%scrollok\fP(3X) is enabled for +.IR win , +the scrolling region scrolls up one line. .PP -If \fIch\fP is a tab, newline, carriage return or backspace, -the cursor is moved appropriately within the window: +If +.I ch +is a +backspace, +carriage return, +line feed, +or +tab, +the cursor moves appropriately within the window. .bP -Backspace moves the cursor one character left; at the left -edge of a window it does nothing. +Backspace moves the cursor one character left; +at the left margin of a window, +it does nothing. .bP -Carriage return moves the cursor to the window left margin on the current line. +Carriage return moves the cursor to the left margin on the current line +of the window. .bP -Newline does a \fBclrtoeol\fP, -then moves the cursor to the window left margin on the next line, -scrolling the window if on the last line. +Line feed does a \fB\%clrtoeol\fP(3X), +then moves the cursor to the left margin on the next line of the window, +and if \fB\%scrollok\fP(3X) is enabled for +.IR win , +scrolls the window if the cursor was already on the last line. .bP -Tabs are considered to be at every eighth column. -The tab interval may be altered by setting the \fBTABSIZE\fP variable. +Tab advances the cursor to the next tab stop +(possibly on the next line); +these are placed at every eighth column by default. +Alter the tab interval with the +.B \%TABSIZE +extension; +see \fB\%curs_variables\fP(3X). .PP -If \fIch\fP is any other nonprintable character, +If +.I ch +is any other nonprintable character, it is drawn in printable form, -i.e., the \fB^\fP\fIX\fP notation used by \fBunctrl\fP(3X). -Calling \fBwinch\fP after adding a -nonprintable character does not return the character itself, -but instead returns the printable representation of the character. -.PP -Video attributes can be combined with a character argument passed to -\fBaddch\fP or related functions by logical-ORing them into the character. -(Thus, text, including attributes, can be copied from one place to another -using \fBinch\fP(3X) and \fBaddch\fP.) See the \fBcurs_attr\fP(3X) page for -values of predefined video attribute constants that can be usefully OR'ed -into characters. -.SS Echoing characters +using the same convention as \fB\%unctrl\fP(3X). .PP -The \fBechochar\fP and \fBwechochar\fP routines are equivalent to a call to -\fBaddch\fP followed by a call to \fBrefresh\fP(3X), or a call to \fBwaddch\fP -followed by a call to \fBwrefresh\fP. -The knowledge that only a single -character is being output is used and, for non-control characters, a -considerable performance gain may be seen by using these routines instead of -their equivalents. -.SS Line Graphics -The following variables may be used to add line drawing characters to the -screen with routines of the \fBaddch\fP family. -The default character listed -below is used if the \fBacsc\fP capability does not define a terminal-specific -replacement for it, -or if the terminal and locale configuration requires Unicode but the -library is unable to use Unicode. +Calling \fB\%winch\fP(3X) on the location of a nonprintable character +does not return the character itself, +but its \fB\%unctrl\fP(3X) representation. .PP -The names are taken from VT100 nomenclature. +.I ch +may contain rendering and/or color attributes, +and others can be combined with the parameter +by logically \*(``or\*(''ing with it. +(A character with its attributes can be copied from place to place +using \fB\%winch\fP(3X) and +.BR \%waddch .) +See \fB\%curs_attr\fP(3X) for values of predefined video attribute +constants that can be usefully \*(``or\*(''ed with characters. +.SS "Echoing Characters" +.B \%echochar +and +.B \%wechochar +are equivalent to calling +.RB \%( w ) addch +followed by +.RB \%( w ) refresh . +.I curses +interprets these functions as a hint that only a single character is +being output; +for non-control characters, +a considerable performance gain may be enjoyed by employing them. +.\" TODO: Combine the following with the "Line Drawing" subsection of +.\" terminfo(5) and replace this with a cross reference there. +.SS "Forms-Drawing Characters" +.I curses +defines macros starting with +.B \%ACS_ +that can be used with +.B \%waddch +to write line-drawing and other special characters to the screen. +.I \%ncurses +terms these +.I "forms-drawing characters." +The ACS default listed below is used if the +.B \%acs_chars +.RB ( \%acsc ) +.I \%term\%info +capability does not define a terminal-specific replacement for it, +or if the terminal and locale configuration requires Unicode to access +these characters but the library is unable to use Unicode. +The \*(``acsc char\*('' column corresponds to how the characters are +specified in the +.B \%acs_chars +string capability, +and the characters in it may appear on the screen if the terminal's +database entry incorrectly advertises ACS support. +The name \*(``ACS\*('' originates in the Alternate Character Set feature +of the DEC VT100 terminal. .PP .TS -l l l l -l l l l -_ _ _ _ -l l l l. -\fBACS\fP \fBACS\fP \fBacsc\fP \fBGlyph\fP -\fBName\fP \fBDefault\fP \fBchar\fP \fBName\fP +Lb Lb Lb Lb +Lb Lb Lb Lb +Lb L L Lx. +\& ACS acsc \& +Symbol Default char Glyph Name +_ ACS_BLOCK # 0 solid square block ACS_BOARD # h board of squares ACS_BTEE + v bottom tee -ACS_BULLET o ~ bullet +ACS_BULLET o \*~ bullet ACS_CKBOARD : a checker board (stipple) ACS_DARROW v . arrow pointing down -ACS_DEGREE ' f degree symbol -ACS_DIAMOND + ` diamond +ACS_DEGREE \*' f degree symbol +ACS_DIAMOND + \(ga diamond ACS_GEQUAL > > greater-than-or-equal-to ACS_HLINE \- q horizontal line ACS_LANTERN # i lantern symbol @@ -162,153 +218,260 @@ ACS_S7 \- r scan line 7 ACS_S9 \&_ s scan line 9 ACS_STERLING f } pound-sterling symbol ACS_TTEE + w top tee -ACS_UARROW ^ \- arrow pointing up +ACS_UARROW \*^ \- arrow pointing up ACS_ULCORNER + l upper left-hand corner ACS_URCORNER + k upper right-hand corner ACS_VLINE | x vertical line .TE .SH RETURN VALUE -All routines return the integer \fBERR\fP upon failure and \fBOK\fP on success -(the SVr4 manuals specify only -\*(``an integer value other than \fBERR\fP\*('') upon successful completion, -unless otherwise noted in the preceding routine descriptions. +These functions return +.B OK +on success and +.B ERR +on failure. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +In +.IR \%ncurses , +.B \%waddch +returns +.B ERR +if it is not possible to add a complete character at the cursor +position, +as when conversion of a multibyte character to a byte sequence fails, +or at least one of the resulting bytes cannot be added to the window. +See section \*(``PORTABILITY\*('' below regarding the use of +.B \%waddch +with multibyte characters. .PP -If it is not possible to add a complete character, -an error is returned: -.bP -If \fBscrollok\fP 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 -.bP -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. +.B \%waddch +can successfully write a character at the bottom right location of the +window. +However, +.I \%ncurses +returns +.B ERR +if \fB\%scrollok\fP(3X) is not enabled in that event, +because it is not possible to wrap to a new line. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that \fBaddch\fP, \fBmvaddch\fP, \fBmvwaddch\fP, and -\fBechochar\fP may be macros. +.BR \%addch , +.BR \%mvaddch , +.BR \%mvwaddch , +and +.B \%echochar +may be implemented as macros. .SH PORTABILITY -All these functions are described in the XSI Curses standard, Issue 4. -The defaults specified for forms-drawing characters apply in the POSIX locale. -.SS ACS Symbols -.LP -X/Open Curses states that the \fBACS_\fP definitions are \fBchar\fP constants. -For the wide-character implementation (see \fBcurs_add_wch\fP), -there are analogous \fBWACS_\fP definitions which are \fBcchar_t\fP constants. -Some implementations are problematic: +X/Open Curses, +Issue 4 describes these functions. +It specifies no error conditions for them. +.PP +SVr4 +.I curses +describes a successful return value only as +\*(``an integer value other than +.BR ERR \*(''. +.PP +The defaults specified for forms-drawing characters apply in the POSIX +locale. +.SS "ACS Symbols" +X/Open Curses states that the +.B \%ACS_ +definitions are +.I char +constants. +.PP +Some implementations are problematic. .bP -Some implementations define the ACS symbols to a constant -(such as Solaris), while others define those to entries in an array. +Solaris +.IR curses , +for example, +define the ACS symbols as constants; +others define them as elements of an array. .IP -This implementation uses an array \fBacs_map\fP, as done in SVr4 curses. -NetBSD also uses an array, actually named \fB_acs_char\fP, with a \fB#define\fP +This implementation uses an array, +.BR \%acs_map , +as did SVr4 +.IR curses . +NetBSD also uses an array, +actually named +.BR \%_acs_char , +with a +.B \%#define for compatibility. .bP -HPUX curses equates some of the \fBACS_\fP symbols -to the analogous \fBWACS_\fP symbols as if the \fBACS_\fP symbols were -wide characters. -The misdefined symbols are the arrows -and other symbols which are not used for line-drawing. +HP-UX +.I curses +equates some of the +.B \%ACS_ +symbols to the analogous +.B \%WACS_ +symbols as if the +.B \%ACS_ +symbols were wide characters +(see \fB\%curs_add_wch\fP(3X)). +The misdefined symbols are the arrows and others that are not used for +line drawing. .bP -X/Open Curses (issues 2 through 7) has a typographical error -for the ACS_LANTERN symbol, equating its \*(``VT100+ Character\*('' -to \fBI\fP (capital I), while the header files for SVr4 curses -and the various implementations use \fBi\fP (lowercase). +X/Open Curses +(Issues 2 through 7) +has a typographical error +for the +.B \%ACS_LANTERN +symbol, equating its \*(``VT100+ Character\*('' to \*(``I\*('' +(capital I), +while the header files for SVr4 +.I curses +and other implementations use \*(``i\*('' +(small i). .IP -None of the terminal descriptions on Unix platforms use uppercase-I, -except for Solaris (i.e., \fBscreen\fP's terminal description, +None of the terminal descriptions on Unix platforms use uppercase I, +except for Solaris +(in its +.I \%term\%info +entry for \fI\%screen\fP(1), apparently based on the X/Open documentation around 1995). -On the other hand, the terminal description \fIgs6300\fP -(AT&T PC6300 with EMOTS Terminal Emulator) uses lowercase-i. -.LP +On the other hand, +its +.B \%gs6300 +(AT&T PC6300 with EMOTS Terminal Emulator) +description uses lowercase i. +.PP Some ACS symbols -(ACS_S3, -ACS_S7, -ACS_LEQUAL, -ACS_GEQUAL, -ACS_PI, -ACS_NEQUAL, -ACS_STERLING) -were not documented in -any publicly released System V. -However, many publicly available terminfos -include \fBacsc\fP strings in which their key characters (pryz{|}) are -embedded, and a second-hand list of their character descriptions has come -to light. -The ACS-prefixed names for them were invented for \fBncurses\fP(3X). -.LP -The \fIdisplayed\fP values for the \fBACS_\fP and \fBWACS_\fP constants -depend on +.RB ( \%ACS_S3 , +.BR \%ACS_S7 , +.BR \%ACS_LEQUAL , +.BR \%ACS_GEQUAL , +.BR \%ACS_PI , +.BR \%ACS_NEQUAL , +and +.BR \%ACS_STERLING ) +were not documented in any publicly released System\ V. +However, +many publicly available +.I \%term\%info +entries include +.B \%acsc +strings in which their key characters +.BR ( pryz{|} ) +are embedded, +and a second-hand list of their character descriptions has come to +light. +The +.I \%ncurses +developers invented ACS-prefixed names for them. +.PP +The +.I displayed +values of +.B \%ACS_ +constants depend on .bP -the library configuration, i.e., \fBncurses\fP versus \fBncursesw\fP, -where the latter is capable of displaying Unicode while the former is not, and +the +.I \%ncurses +ABI\(emfor example, +wide-character versus non-wide-character configurations +(the former is capable of displaying Unicode while the latter is not), +and .bP -whether the \fIlocale\fP uses UTF-8 encoding. -.LP -In certain cases, the terminal is unable to display line-drawing characters -except by using UTF-8 (see the discussion of \fBNCURSES_NO_UTF8_ACS\fP in -ncurses(3X)). -.SS Character Set -X/Open Curses assumes that the parameter passed to \fBwaddch\fP contains -a single character. -As discussed in \fBcurs_attr\fP(3X), that character may have been -more than eight bits in an SVr3 or SVr4 implementation, -but in the X/Open Curses model, the details are not given. -The important distinction between SVr4 curses and X/Open Curses is -that the non-character information (attributes and color) was -separated from the character information which is packed in a \fBchtype\fP -to pass to \fBwaddch\fP. +whether the locale uses UTF-8 encoding. +.PP +In certain cases, +the terminal is unable to display forms-drawing characters +.I except +by using UTF-8; +see the discussion of the +.I \%NCURSES_NO_UTF8_ACS +environment variable in \fB\%ncurses\fP(3X)). +.SS "Character Set" +X/Open Curses assumes that the parameter passed to +.B \%waddch +contains a single character. +As discussed in \fB\%curs_attr\fP(3X), +that character may have been more than eight bits wide in an SVr3 or +SVr4 implementation, +but in the X/Open Curses model, +the details are not given. +The important distinction between SVr4 +.I curses +and X/Open Curses is that the latter separates non-character information +(attributes and color) +from the character code, +which SVr4 packs into a +.I \%chtype +for passage to +.BR \%waddch . .PP -In this implementation, \fBchtype\fP holds an eight-bit character. -But ncurses allows multibyte characters to be passed in a succession -of calls to \fBwaddch\fP. -The other implementations do not do this; -a call to \fBwaddch\fP passes exactly one character -which may be rendered as one or more cells on the screen -depending on whether it is printable. +In +.IR \%ncurses , +.I \%chtype +holds an eight-bit character. +But the library allows a multibyte character to be passed in a +succession of calls to +.BR \%waddch . +Other implementations do not; +a +.B \%waddch +call transmits exactly one character, +which may be rendered in one or more screen locations depending on +whether it is printable. .PP Depending on the locale settings, -ncurses will inspect the byte passed in each call to \fBwaddch\fP, -and check if the latest call will continue a multibyte sequence. -When a character is \fIcomplete\fP, -ncurses displays the character and moves to the next position in the screen. +.I \%ncurses +inspects the byte passed in each +.B \%waddch +call, +and checks whether the latest call continues a multibyte sequence. +When a character is +.IR complete , +.I \%ncurses +displays the character and advances the cursor. .PP If the calling application interrupts the succession of bytes in -a multibyte character by moving the current location (e.g., using \fBwmove\fP), -ncurses discards the partially built character, -starting over again. +a multibyte character sequence by changing the current location\(emfor +example, +with \fB\%wmove\fP(3X)\(em\c +.I \%ncurses +discards the incomplete character. .PP For portability to other implementations, -do not rely upon this behavior: +do not rely upon this behavior. +Check whether a character can be represented as a single byte in the +current locale. .bP -check if a character can be represented as a single byte in the current locale -before attempting call \fBwaddch\fP, and +If it can, +call either +.B \%waddch +or \fB\%wadd_wch\fP(3X). .bP -call \fBwadd_wch\fP for characters which cannot be handled by \fBwaddch\fP. +If it cannot, +use only +\fB\%wadd_wch\fP(3X). .SS TABSIZE -.LP -The \fBTABSIZE\fP variable is implemented in SVr4 and other versions of curses, -but is not part of X/Open curses -(see \fBcurs_variables\fP(3X) for more details). -.LP -If \fIch\fP is a carriage return, -the cursor is moved to the beginning of the current row of the window. -This is true of other implementations, but is not documented. +SVr4 and other versions of +.I curses +implement the +.B \%TABSIZE +variable, +but X/Open Curses does not specify it +(see \fB\%curs_variables\fP(3X)). .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_attr\fP(3X), -\fBcurs_clear\fP(3X), -\fBcurs_inch\fP(3X), -\fBcurs_outopts\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_variables\fP(3X), -\fBputc\fP(3). +\fB\%curs_add_wch\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). .PP -Comparable functions in the wide-character (ncursesw) library are -described in -\fBcurs_add_wch\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_addchstr\fP(3X), +\fB\%curs_addstr\fP(3X), +\fB\%curs_attr\fP(3X), +\fB\%curs_clear\fP(3X), +\fB\%curs_inch\fP(3X), +\fB\%curs_outopts\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%putchar\fP(3) diff --git a/man/curs_addchstr.3x b/man/curs_addchstr.3x index 31b45184..25d322af 100644 --- a/man/curs_addchstr.3x +++ b/man/curs_addchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,54 +27,53 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addchstr.3x,v 1.24 2021/12/25 21:41:58 tom Exp $ -.TH curs_addchstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_addchstr.3x,v 1.45 2024/04/20 21:20:07 tom Exp $ +.TH curs_addchstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBaddchstr\fP, -\fBaddchnstr\fP, -\fBwaddchstr\fP, -\fBwaddchnstr\fP, -\fBmvaddchstr\fP, -\fBmvaddchnstr\fP, -\fBmvwaddchstr\fP, -\fBmvwaddchnstr\fP \- add a string of characters (and attributes) to a \fBcurses\fP window -.ad -.hy +\fB\%addchstr\fP, +\fB\%addchnstr\fP, +\fB\%waddchstr\fP, +\fB\%waddchnstr\fP, +\fB\%mvaddchstr\fP, +\fB\%mvaddchnstr\fP, +\fB\%mvwaddchstr\fP, +\fB\%mvwaddchnstr\fP \- +add a \fIcurses\fR character string to a window .SH SYNOPSIS .nf -\fB#include \fP +\fB#include .PP -\fBint addchstr(const chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint addchnstr(const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint waddchstr(WINDOW *\fP\fIwin\fP\fB, const chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint waddchnstr(WINDOW *\fP\fIwin\fP\fB, const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvaddchstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint mvaddchnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwaddchstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint mvwaddchnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP +\fBint addchstr(const chtype *\fIchstr\fP); +\fBint waddchstr(WINDOW *\fIwin\fP, const chtype *\fIchstr\fP); +\fBint mvaddchstr(int \fIy\fP, int \fIx\fP, const chtype *\fIchstr\fP); +\fBint mvwaddchstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const chtype *\fIchstr\fP); +.PP +\fBint addchnstr(const chtype *\fIchstr\fP, int \fIn\fP); +\fBint waddchnstr(WINDOW *\fIwin\fP, const chtype *\fIchstr\fP, int \fIn\fP); +\fBint mvaddchnstr(int \fIy\fP, int \fIx\fP, const chtype *\fIchstr\fP, int \fIn\fP); +\fBint mvwaddchnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const chtype *\fIchstr\fP, int \fIn\fP); .fi .SH DESCRIPTION These functions copy the (null-terminated) \fIchstr\fP array into the window image structure starting at the current cursor position. +.PP The four functions with \fIn\fP as the last argument copy at most \fIn\fP elements, but no more than will fit on the line. @@ -82,7 +81,7 @@ If \fBn\fP=\fB\-1\fP then the whole array is copied, to the maximum number of characters that will fit on the line. .PP The window cursor is \fInot\fP advanced. -These functions work faster than \fBwaddnstr\fP. +These functions are faster than \fBwaddnstr\fP. On the other hand: .bP they do not perform checking @@ -97,21 +96,28 @@ rather than wrapping it around to the new line. .SH RETURN VALUE All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. This implementation returns an error -if the window pointer is null. +.bP +if the \fIwin\fP parameter is null or +.bP +if the \fIwchstr\fP parameter is null. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES All functions except \fBwaddchnstr\fP may be macros. .SH PORTABILITY -These entry points are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_addstr\fP(3X). +\fB\%curs_add_wchstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). .PP -Comparable functions in the wide-character (ncursesw) library are -described in -\fBcurs_add_wchstr\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_addstr\fP(3X) diff --git a/man/curs_addstr.3x b/man/curs_addstr.3x index 8f940e74..1244001d 100644 --- a/man/curs_addstr.3x +++ b/man/curs_addstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,93 +27,109 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addstr.3x,v 1.25 2021/12/25 21:41:58 tom Exp $ -.TH curs_addstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_addstr.3x,v 1.45 2024/04/20 19:18:18 tom Exp $ +.TH curs_addstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBaddstr\fP, -\fBaddnstr\fP, -\fBwaddstr\fP, -\fBwaddnstr\fP, -\fBmvaddstr\fP, -\fBmvaddnstr\fP, -\fBmvwaddstr\fP, -\fBmvwaddnstr\fP \- add a string of characters to a \fBcurses\fP window and advance cursor -.ad -.hy +\fB\%addstr\fP, +\fB\%addnstr\fP, +\fB\%waddstr\fP, +\fB\%waddnstr\fP, +\fB\%mvaddstr\fP, +\fB\%mvaddnstr\fP, +\fB\%mvwaddstr\fP, +\fB\%mvwaddnstr\fP \- +add a string to a \fIcurses\fR window and advance the cursor .SH SYNOPSIS .nf -\fB#include \fP +\fB#include .PP -\fBint addstr(const char *\fP\fIstr\fP\fB);\fP -.br -\fBint addnstr(const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint waddstr(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint waddnstr(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvaddstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvaddnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwaddstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvwaddnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr, int \fP\fIn\fP\fB);\fP +\fBint addstr(const char *\fIstr\fP); +\fBint mvaddstr(int \fIy\fP, int \fIx\fP, const char *\fIstr\fP); +\fBint mvwaddstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const char *\fIstr\fP); +\fBint waddstr(WINDOW *\fIwin\fP, const char *\fIstr\fP); +.PP +\fBint addnstr(const char *\fIstr\fP, int \fIn\fP); +\fBint mvaddnstr(int \fIy\fP, int \fIx\fP, const char *\fIstr\fP, int \fIn\fP); +\fBint mvwaddnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const char *\fIstr\fP, int \fIn\fP); +\fBint waddnstr(WINDOW *\fIwin\fP, const char *\fIstr\fP, int \fIn\fP); .fi .SH DESCRIPTION -These functions write the (null-terminated) character string -\fIstr\fP on the given window. -It is similar to calling \fBwaddch\fP once for each byte in the string. +.B waddstr +writes the characters of the (null-terminated) string +.I str +to the window +.IR win . +Its process is similar to calling \fB\%waddch\fP(3X) for each +.I char +in +.IR str . +Control characters are processed as in \fB\%waddch\fP(3X). .PP -The \fImv\fP functions perform cursor movement once, before writing any -characters. -Thereafter, the cursor is advanced as a side-effect of writing to the window. +.B waddnstr +writes at most +.I n +characters, +or until a terminating null character occurs in +.IR str . +If +.I n +is \-1, +.B +.B waddnstr +writes the entire string. .PP -The four functions with \fIn\fP as the last argument -write at most \fIn\fP bytes, -or until a terminating null is reached. -If \fIn\fP is \-1, then the entire string will be added. +\fB\%ncurses\fP(3X) describes the variants of these functions. .SH RETURN VALUE -All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. +These functions return +.B OK +on success and +.B ERR +on failure. .PP -X/Open does not define any error conditions. -This implementation returns an error +X/Open Curses does not specify any error conditions. +.I \%ncurses +returns an error .bP -if the window pointer is null or +if the window pointer is +.BR NULL , .bP -if the string pointer is null or +if the string pointer is +.BR NULL , +or .bP -if the corresponding calls to \fBwaddch\fP return an error. -.PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. -If an error is returned by the \fBwmove\fP, -no characters are added to the window. +if an internal \fB\%waddch\fP(3X) call returns an error. .PP -If an error is returned by \fBwaddch\fP -(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 \fBwaddch\fP where an error may be -returned after successfully writing a character to the lower-right corner -of a window when \fBscrollok\fP is disabled. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES All of these functions except \fBwaddnstr\fP may be macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +X/Open Curses, +Issue 4 describes these functions. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_addch\fP(3X). +\fB\%curs_addwstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). +.PP +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_addchstr\fP(3X) diff --git a/man/curs_addwstr.3x b/man/curs_addwstr.3x index 70886a65..78d5788e 100644 --- a/man/curs_addwstr.3x +++ b/man/curs_addwstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,83 +27,120 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addwstr.3x,v 1.17 2021/12/25 21:41:58 tom Exp $ -.TH curs_addwstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_addwstr.3x,v 1.37 2024/04/20 19:18:18 tom Exp $ +.TH curs_addwstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBaddwstr\fP, -\fBaddnwstr\fP, -\fBwaddwstr\fP, -\fBwaddnwstr\fP, -\fBmvaddwstr\fP, -\fBmvaddnwstr\fP, -\fBmvwaddwstr\fP, -\fBmvwaddnwstr\fP \- add a string of wide characters to a \fBcurses\fP window and advance cursor -.ad -.hy +\fB\%addwstr\fP, +\fB\%addnwstr\fP, +\fB\%waddwstr\fP, +\fB\%waddnwstr\fP, +\fB\%mvaddwstr\fP, +\fB\%mvaddnwstr\fP, +\fB\%mvwaddwstr\fP, +\fB\%mvwaddnwstr\fP \- +add a wide-character string to a \fIcurses\fR window and advance the cursor .SH SYNOPSIS .nf -\fB#include \fP +\fB#include .PP -\fBint addwstr(const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint addnwstr(const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint waddwstr(WINDOW *\fP\fIwin\fP\fB, const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint waddnwstr(WINDOW *\fP\fIwin\fP\fB, const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvaddwstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvaddnwstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwaddwstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvwaddnwstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP +\fBint addwstr(const wchar_t *\fIwstr\fP); +\fBint mvaddwstr(int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP); +\fBint mvwaddwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP); +\fBint waddwstr(WINDOW *\fIwin\fP, const wchar_t *\fIwstr\fP); +.PP +\fBint addnwstr(const wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint mvaddnwstr(int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint mvwaddnwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint waddnwstr(WINDOW *\fIwin\fP, const wchar_t *\fIwstr\fP, int \fIn\fP); .fi .SH DESCRIPTION -These functions write the characters of the -(null-terminated) \fBwchar_t\fP character string -\fIwstr\fP on the given window. -It is similar to constructing a \fBcchar_t\fP for each wchar_t in the string, -then calling \fBwadd_wch\fP for the resulting \fBcchar_t\fP. +.B waddwstr +writes the characters of the (wide-null-terminated) wide-character +string +.I wstr +to the window +.IR win . +Its process is similar to constructing a +.I cchar_t +for each +.I wchar_t +in +.IR wstr , +then calling \fB\%wadd_wch\fP(3X) with the resulting +.IR cchar_t . +.bP +Spacing and non-spacing characters in the string +are processed one at a time, +and +.bP +control characters are processed as in \fB\%wadd_wch\fP(3X). .PP -The \fImv\fP functions perform cursor movement once, before writing any -characters. -Thereafter, the cursor is advanced as a side-effect of writing to the window. +.B waddnwstr +writes at most +.I n +wide characters, +or until a terminating wide null character occurs in +.IR wstr . +If +.I n +is \-1, +.B +.B waddnwstr +writes the entire wide string. .PP -The four functions with \fIn\fP as the last argument -write at most \fIn\fP \fBwchar_t\fP characters, -or until a terminating null is reached. -If \fIn\fP is \-1, then the entire string will be added. +\fB\%ncurses\fP(3X) describes the variants of these functions. .SH RETURN VALUE -All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. +These functions return +.B OK +on success and +.B ERR +on failure. .PP -X/Open does not define any error conditions. -This implementation returns an error +X/Open Curses does not specify any error conditions. +.I \%ncurses +returns an error .bP -if the window pointer is null or +if the window pointer is +.BR NULL , .bP -if the string pointer is null or +if the string pointer is +.BR NULL , +or .bP -if the corresponding calls to \fBwadd_wch\fP return an error. +if an internal \fB\%wadd_wch\fP(3X) call returns an error. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -All of these functions except \fBwaddnwstr\fP may be macros. +All of these functions except +.B waddnwstr +may be implemented as macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +X/Open Curses, +Issue 4 describes these functions. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_add_wch\fP(3X) +\fB\%curs_addstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. +.PP +\fB\%curses\fP(3X), +\fB\%curs_add_wch\fP(3X), +\fB\%curs_add_wchstr\fP(3X) diff --git a/man/curs_attr.3x b/man/curs_attr.3x index 71a2bb56..af275f5a 100644 --- a/man/curs_attr.3x +++ b/man/curs_attr.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,123 +28,90 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_attr.3x,v 1.70 2021/12/25 21:49:32 tom Exp $ -.TH curs_attr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +.\" $Id: curs_attr.3x,v 1.103 2024/04/20 21:24:19 tom Exp $ +.TH curs_attr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .\" --------------------------------------------------------------------------- .SH NAME -.\" attr_get -\fBattr_get\fP, -\fBwattr_get\fP, -\fBattr_set\fP, -\fBwattr_set\fP, -.\" .br -\fBattr_off\fP, -\fBwattr_off\fP, -\fBattr_on\fP, -\fBwattr_on\fP, -.\" .br -\fBattroff\fP, -\fBwattroff\fP, -\fBattron\fP, -\fBwattron\fP, -\fBattrset\fP, -\fBwattrset\fP, -.\" .br -\fBchgat\fP, -\fBwchgat\fP, -\fBmvchgat\fP, -\fBmvwchgat\fP, -.\" .br -\fBcolor_set\fP, -\fBwcolor_set\fP, -.\" .br -\fBstandend\fP, -\fBwstandend\fP, -\fBstandout\fP, -\fBwstandout\fP \- \fBcurses\fP character and window attribute control routines -.ad -.hy +\fB\%attr_get\fP, +\fB\%wattr_get\fP, +\fB\%attr_set\fP, +\fB\%wattr_set\fP, +\fB\%attr_off\fP, +\fB\%wattr_off\fP, +\fB\%attr_on\fP, +\fB\%wattr_on\fP, +\fB\%attroff\fP, +\fB\%wattroff\fP, +\fB\%attron\fP, +\fB\%wattron\fP, +\fB\%attrset\fP, +\fB\%wattrset\fP, +\fB\%chgat\fP, +\fB\%wchgat\fP, +\fB\%mvchgat\fP, +\fB\%mvwchgat\fP, +\fB\%color_set\fP, +\fB\%wcolor_set\fP, +\fB\%standend\fP, +\fB\%wstandend\fP, +\fB\%standout\fP, +\fB\%wstandout\fP \- +manipulate attributes of character cells in \fIcurses\fR windows .\" --------------------------------------------------------------------------- .SH SYNOPSIS -\fB#include \fP -.sp -\fBint attr_get(attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fP -.br -\fBint wattr_get(WINDOW *\fP\fIwin\fP\fB, attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB,\fP \fBvoid *\fP\fIopts\fP\fB);\fP -.br -\fBint attr_set(attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fP -.br -\fBint wattr_set(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fP -.sp -\fBint attr_off(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fP -.br -\fBint wattr_off(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fP -.br -\fBint attr_on(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fP -.br -\fBint wattr_on(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fP -.sp -\fBint attroff(int \fP\fIattrs);\fP -.br -\fBint wattroff(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fP -.br -\fBint attron(int \fP\fIattrs\fP\fB);\fP -.br -\fBint wattron(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fP -.br -\fBint attrset(int \fP\fIattrs\fP\fB);\fP -.br -\fBint wattrset(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fP -.sp -\fBint chgat(int \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB,\fP \fBconst void *\fP\fIopts\fP\fB);\fP -.br -\fBint wchgat(WINDOW *\fP\fIwin\fP\fB,\fP - \fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fP \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fP -.br -\fBint mvchgat(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB,\fP - \fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fP \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fP -.br -\fBint mvwchgat(WINDOW *\fP\fIwin, int \fP\fIy, int \fP\fIx\fP\fB,\fP - \fBint \fP\fIn,\fP \fBattr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fP -.sp -\fBint color_set(short \fP\fIpair\fP\fB, void* \fP\fIopts\fP\fB);\fP -.br -\fBint wcolor_set(WINDOW *\fP\fIwin\fP\fB, short \fP\fIpair\fP\fB,\fP \fBvoid* \fP\fIopts);\fP -.sp +.nf +\fB#include +.PP +\fBint attr_get(attr_t *\fIattrs\fP, short *\fIpair\fP, void *\fIopts\fP); +\fBint wattr_get(WINDOW *\fIwin\fP, attr_t *\fIattrs\fP, short *\fIpair\fP,\fR \fPvoid *\fIopts\fP); +\fBint attr_set(attr_t \fIattrs\fP, short \fIpair\fP, void *\fIopts\fP); +\fBint wattr_set(WINDOW *\fIwin\fP, attr_t \fIattrs\fP, short \fIpair\fP, void *\fIopts\fP); +.PP +\fBint attr_off(attr_t \fIattrs\fP, void *\fIopts\fP); +\fBint wattr_off(WINDOW *\fIwin\fP, attr_t \fIattrs\fP, void *\fIopts\fP); +\fBint attr_on(attr_t \fIattrs\fP, void *\fIopts\fP); +\fBint wattr_on(WINDOW *\fIwin\fP, attr_t \fIattrs\fP, void *\fIopts\fP); +.PP +\fBint attroff(int \fIattrs\fP); +\fBint wattroff(WINDOW *\fIwin\fP, int \fIattrs\fP); +\fBint attron(int \fIattrs\fP); +\fBint wattron(WINDOW *\fIwin\fP, int \fIattrs\fP); +\fBint attrset(int \fIattrs\fP); +\fBint wattrset(WINDOW *\fIwin\fP, int \fIattrs\fP); +.PP +\fBint chgat(int \fIn\fP, attr_t \fIattr\fP, short \fIpair\fP,\fR \fPconst void *\fIopts\fP); +\fBint wchgat(WINDOW *\fIwin\fP, + \fBint \fIn\fB, attr_t \fIattr\fB,\fR \fBshort \fIpair\fB, const void *\fIopts\fB);\fR +\fBint mvchgat(int \fIy\fB, int \fIx\fB,\fR + \fBint \fIn\fB, attr_t \fIattr\fB, short \fIpair\fB, const void *\fIopts\fB);\fR +\fBint mvwchgat(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB,\fR + \fBint \fIn\fB, attr_t \fIattr\fB, short \fIpair\fB, const void *\fIopts\fB);\fR +.PP +\fBint color_set(short \fIpair\fB, void* \fIopts\fB);\fR +\fBint wcolor_set(WINDOW *\fIwin\fB, short \fIpair\fB,\fR \fBvoid* \fIopts\fP);\fR +.PP \fBint standend(void);\fP -.br -\fBint wstandend(WINDOW *\fP\fIwin\fP\fB);\fP -.br +\fBint wstandend(WINDOW *\fIwin\fB);\fR \fBint standout(void);\fP -.br -\fBint wstandout(WINDOW *\fP\fIwin\fP\fB);\fP +\fBint wstandout(WINDOW *\fIwin\fB);\fR +.fi .\" --------------------------------------------------------------------------- .SH DESCRIPTION -.PP These routines manipulate the current attributes of the named window, which then apply to all characters that are written into the window with \fBwaddch\fP, \fBwaddstr\fP and \fBwprintw\fP. @@ -159,13 +126,8 @@ These routines do not affect the attributes used when erasing portions of the window. See \fBcurs_bkgd\fP(3X) for functions which modify the attributes used for erasing and clearing. -.PP -Routines which do not have a \fBWINDOW*\fP parameter apply to \fBstdscr\fP. -For example, -\fBattr_set\fP is the \fBstdscr\fP variant of \fBwattr_set\fP. .\" --------------------------------------------------------------------------- -.SS Window attributes -.PP +.SS "Window Attributes" There are two sets of functions: .bP functions for manipulating the window attributes and color: @@ -186,7 +148,7 @@ Use \fBattr_off\fP and \fBwattr_off\fP to turn off window attributes, again values OR'd together in \fIattr\fP, without affecting other attributes. .\" --------------------------------------------------------------------------- -.SS Legacy window attributes +.SS "Legacy Window Attributes" The X/Open window attribute routines which \fIset\fP or \fIget\fP, turn \fIon\fP or \fIoff\fP are extensions of older routines @@ -204,25 +166,32 @@ the attribute parameter. For example, as long as that value fits into the \fBA_COLOR\fP mask, then these calls produce similar results: -.NS +.PP +.RS 4 +.EX attrset(A_BOLD | COLOR_PAIR(\fIpair\fP)); attr_set(A_BOLD, \fIpair\fP, NULL); -.NE +.EE +.RE .PP However, if the value does not fit, then the \fBCOLOR_PAIR\fP macro uses only the bits that fit. -For example, because in ncurses \fBA_COLOR\fP has eight (8) bits, -then \fBCOLOR_PAIR(\fP\fI259\fP\fB)\fP is 4 +For example, +because in \fI\%ncurses\fP \fBA_COLOR\fP has eight (8) bits, +then \fBCOLOR_PAIR(\fI259\fB)\fR is 4 (i.e., 259 is 4 more than the limit 255). .PP The \fBPAIR_NUMBER\fP macro extracts a pair number from an \fBint\fP (or \fBchtype\fP). For example, the \fIinput\fP and \fIoutput\fP values in these statements would be the same: -.NS +.PP +.RS 4 +.EX int value = A_BOLD | COLOR_PAIR(\fIinput\fP); int \fIoutput\fP = PAIR_NUMBER(value); -.NE +.EE +.RE .PP The \fBattrset\fP routine is a legacy feature predating SVr4 curses but kept in X/Open Curses for the same reason that SVr4 curses kept it: @@ -232,11 +201,12 @@ The remaining \fBattr\fP* functions operate exactly like the corresponding \fBattr_\fP* functions, except that they take arguments of type \fBint\fP rather than \fBattr_t\fP. .PP -There is no corresponding \fBattrget\fP function as such in X/Open Curses, -although ncurses provides \fBgetattrs\fP (see curs_legacy(3X)). +There is no corresponding \fB\%attrget\fP function as such +in X/Open Curses, +although \fI\%ncurses\fP provides \fB\%getattrs\fP +(see \fB\%curs_legacy\fP(3X)). .\" --------------------------------------------------------------------------- -.SS Change character rendition -.PP +.SS "Change Character Rendition" The routine \fBchgat\fP changes the attributes of a given number of characters starting at the current cursor location of \fBstdscr\fP. It does not update @@ -248,69 +218,74 @@ The \fBwchgat\fP function generalizes this to any window; the \fBmvwchgat\fP function does a cursor move before acting. .PP In these functions, -the color \fIpair\fP argument is a color-pair index +the color \fIpair\fP argument is a color pair index (as in the first argument of \fBinit_pair\fP, see \fBcurs_color\fP(3X)). .\" --------------------------------------------------------------------------- -.SS Change window color +.SS "Change Window Color" The routine \fBcolor_set\fP sets the current color of the given window to the foreground/background combination described by the color \fIpair\fP parameter. .\" --------------------------------------------------------------------------- .SS Standout -.PP The routine \fBstandout\fP is the same as \fBattron(A_STANDOUT)\fP. The routine \fBstandend\fP is the same as \fBattrset(A_NORMAL)\fP or \fBattrset(0)\fP, that is, it turns off all attributes. .PP -X/Open does not mark these \*(``restricted\*('', because +X/Open Curses does not mark these \*(``restricted\*('', because .bP they have well established legacy use, and .bP there is no ambiguity about the way the attributes might be combined with a color pair. .\" --------------------------------------------------------------------------- -.SH VIDEO ATTRIBUTES +.SS "Video Attributes" The following video attributes, defined in \fB\fP, can be passed to the routines \fBattron\fP, \fBattroff\fP, and \fBattrset\fP, or OR'd with the characters passed to \fBaddch\fP (see \fBcurs_addch\fP(3X)). .PP +.ne 15 .RS .TS -l l -_ _ _ -l l . -\fBName\fP \fBDescription\fP -\fBA_NORMAL\fP Normal display (no highlight) -\fBA_STANDOUT\fP Best highlighting mode of the terminal. -\fBA_UNDERLINE\fP Underlining -\fBA_REVERSE\fP Reverse video -\fBA_BLINK\fP Blinking -\fBA_DIM\fP Half bright -\fBA_BOLD\fP Extra bright or bold -\fBA_PROTECT\fP Protected mode -\fBA_INVIS\fP Invisible or blank mode -\fBA_ALTCHARSET\fP Alternate character set -\fBA_ITALIC\fP Italics (non-X/Open extension) -\fBA_CHARTEXT\fP Bit-mask to extract a character -\fBA_COLOR\fP Bit-mask to extract a color (legacy routines) +Lb Lb +Lb Lx. +Name Description +_ +A_NORMAL Normal display (no highlight) +A_STANDOUT T{ +Best highlighting mode of the terminal +T} +A_UNDERLINE Underlining +A_REVERSE Reverse video +A_BLINK Blinking +A_DIM Half bright +A_BOLD Extra bright or bold +A_PROTECT Protected mode +A_INVIS Invisible or blank mode +A_ALTCHARSET Alternate character set +A_ITALIC Italics (non-X/Open extension) +A_CHARTEXT Bit-mask to extract a character +A_COLOR T{ +Bit-mask to extract a color (legacy routines) +T} .TE .RE .PP These video attributes are supported by \fBattr_on\fP and related functions (which also support the attributes recognized by \fBattron\fP, etc.): +.PP .RS .TS -l l -_ _ _ -l l . -\fBName\fP \fBDescription\fP -\fBWA_HORIZONTAL\fP Horizontal highlight -\fBWA_LEFT\fP Left highlight -\fBWA_LOW\fP Low highlight -\fBWA_RIGHT\fP Right highlight -\fBWA_TOP\fP Top highlight -\fBWA_VERTICAL\fP Vertical highlight +Lb Lb +Lb Lx. +Name Description +_ +WA_HORIZONTAL Horizontal highlight +WA_LEFT Left highlight +WA_LOW Low highlight +WA_RIGHT Right highlight +WA_TOP Top highlight +WA_VERTICAL Vertical highlight .TE .RE .PP @@ -318,6 +293,26 @@ The return values of many of these routines are not meaningful (they are implemented as macro-expanded assignments and simply return their argument). The SVr4 manual page claims (falsely) that these routines always return \fB1\fP. .\" --------------------------------------------------------------------------- +.SH RETURN VALUE +All routines return the integer \fBOK\fP on success, or \fBERR\fP on failure. +.PP +X/Open Curses does not specify any error conditions. +.PP +This implementation +.bP +returns an error if the window pointer is null. +.bP +returns an error if the color pair parameter +for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1. +.bP +does not return an error if either of the parameters of \fBwattr_get\fP +used for retrieving attribute or color pair values is \fBNULL\fP. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +.\" --------------------------------------------------------------------------- .SH NOTES These functions may be macros: .sp @@ -330,9 +325,133 @@ Color pair values can only be OR'd with attributes if the pair number is less than 256. The alternate functions such as \fBcolor_set\fP can pass a color pair value directly. -However, ncurses ABI 4 and 5 simply OR this value +However, \fI\%ncurses\fP ABI 4 and 5 simply OR this value within the alternate functions. -You must use ncurses ABI 6 to support more than 256 color pairs. +You must use \fI\%ncurses\fP ABI 6 to support more than 256 color pairs. +.\" --------------------------------------------------------------------------- +.SH EXTENSIONS +This implementation provides the \fBA_ITALIC\fP attribute for terminals +which have the \fBenter_italics_mode\fP (\fBsitm\fP) +and \fBexit_italics_mode\fP (\fBritm\fP) capabilities. +Italics are not mentioned in X/Open Curses. +Unlike the other video attributes, \fBA_ITALIC\fP is unrelated +to the \fBset_attributes\fP capabilities. +This implementation makes the assumption that +\fBexit_attribute_mode\fP may also reset italics. +.PP +Each of the functions added by XSI Curses has a parameter \fIopts\fP, +which X/Open Curses still (after more than twenty years) documents +as reserved for future use, saying that it should be \fBNULL\fP. +This implementation uses that parameter in ABI 6 for the functions which +have a color pair parameter to support \fIextended color pairs\fP: +.bP +For functions which modify the color, e.g., +\fBwattr_set\fP and \fBwattr_on\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter. +.bP +For functions which retrieve the color, e.g., +\fBwattr_get\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to retrieve the color pair as an \fBint\fP value, +in addition to +retrieving it via the standard pointer to \fBshort\fP parameter. +.bP +For functions which turn attributes off, e.g., +\fBwattr_off\fP, +the \fIopts\fP parameter is ignored except +except to check that it is \fBNULL\fP. +.\" --------------------------------------------------------------------------- +.SH PORTABILITY +These functions are described in X/Open Curses, Issue 4. +The standard defined the dedicated type for highlights, +\fBattr_t\fP, which was not defined in SVr4 curses. +The functions taking \fBattr_t\fP arguments were not supported under SVr4. +.PP +Very old versions of this library did not force an update of the screen +when changing the attributes. +Use \fBtouchwin\fP to force the screen to match the updated attributes. +.PP +X/Open Curses states that whether the traditional functions +\fBattron\fP/\fBattroff\fP/\fBattrset\fP can manipulate attributes other than +\fBA_BLINK\fP, \fBA_BOLD\fP, \fBA_DIM\fP, \fBA_REVERSE\fP, \fBA_STANDOUT\fP, or +\fBA_UNDERLINE\fP is \*(``unspecified\*(''. +Under this implementation as well as +SVr4 curses, these functions correctly manipulate all other highlights +(specifically, \fBA_ALTCHARSET\fP, \fBA_PROTECT\fP, and \fBA_INVIS\fP). +.PP +X/Open Curses added these entry points: +.sp +.RS +\fBattr_get\fP, \fBattr_on\fP, +\fBattr_off\fP, \fBattr_set\fP, \fBwattr_on\fP, \fBwattr_off\fP, +\fBwattr_get\fP, \fBwattr_set\fP +.RE +.PP +The new functions are intended to work with +a new series of highlight macros prefixed with \fBWA_\fP. +The older macros have direct counterparts in the newer set of names: +.PP +.RS +.ne 9 +.TS +Lb Lb +Lb Lx. +Name Description +_ +WA_NORMAL Normal display (no highlight) +WA_STANDOUT T{ +Best highlighting mode of the terminal +T} +WA_UNDERLINE Underlining +WA_REVERSE Reverse video +WA_BLINK Blinking +WA_DIM Half bright +WA_BOLD Extra bright or bold +WA_ALTCHARSET Alternate character set +.TE +.RE +.PP +X/Open Curses does not assign values to these symbols, +nor does it state whether or not they are related to the +similarly-named A_NORMAL, etc.: +.bP +X/Open Curses specifies that each pair of corresponding \fBA_\fP +and \fBWA_\fP-using functions operates on the same current-highlight +information. +.bP +However, in some implementations, those symbols have unrelated values. +.IP +For example, the Solaris \fIxpg4\fP (X/Open) curses declares +\fBattr_t\fP to be an unsigned short integer (16-bits), +while \fBchtype\fP is a unsigned integer (32-bits). +The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols +because they are used for a smaller datatype which does not +represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP. +.IP +In this implementation (as in many others), the values happen to be +the same because it simplifies copying information between +\fBchtype\fP and \fBcchar_t\fP variables. +.bP +Because \fI\%ncurses\fP's \fBattr_t\fP can hold a color pair +(in the \fBA_COLOR\fP field), +a call to +\fBwattr_on\fP, +\fBwattr_off\fP, or +\fBwattr_set\fP +may alter the window's color. +If the color pair information in the attribute parameter is zero, +no change is made to the window's color. +.IP +This is consistent with SVr4 curses; +X/Open Curses does not specify this. +.PP +The X/Open Curses extended conformance level adds new highlights +\fBA_HORIZONTAL\fP, \fBA_LEFT\fP, \fBA_LOW\fP, \fBA_RIGHT\fP, \fBA_TOP\fP, +\fBA_VERTICAL\fP (and corresponding \fBWA_\fP macros for each). +As of August 2013, +no known terminal provides these highlights +(i.e., via the \fBsgr1\fP capability). .\" --------------------------------------------------------------------------- .SH HISTORY X/Open Curses is largely based on SVr4 curses, @@ -391,25 +510,26 @@ the format and size of the defined constants as well as clues such as the alternate character set implementation. A 32-bit library can be used on a 64-bit system, but not necessarily the reverse. -.RS +.PP .TS -l l l l l l -_ _ _ _ _ _ -l l l l l l . -\fBYear\fP \fBSystem\fP \fBArch\fP \fBColor\fP \fBChar\fP \fBNotes\fP -1992 Solaris 5.2 32 6 17 SVr4 curses -1992 HPUX 9 32 no 8 SVr2 curses -1992 AIX 3.2 32 no 23 SVr2 curses -1994 OSF/1 r3 32 no 23 SVr2 curses -1995 HP-UX 10.00 32 6 16 SVr3 \*(``curses_colr\*('' -1995 HP-UX 10.00 32 6 8 SVr4, X/Open curses -1995 Solaris 5.4 32/64 7 16 X/Open curses -1996 AIX 4.2 32 7 16 X/Open curses -1996 OSF/1 r4 32 6 16 X/Open curses -1997 HP-UX 11.00 32 6 8 X/Open curses -2000 U/Win 32/64 7/31 16 uses \fBchtype\fP +Lb Lb Lb Cb S Lb +Lb2 Lb Lb2 Lb2 Lb2 Lb +L L L L L Lx. +\& \& \& Bits \& +Year System Arch Color Char Notes +_ +1992 Solaris 5.2 32 6 17 SVr4 \fIcurses\fP +1992 HP-UX 9 32 no 8 SVr2 \fIcurses\fP +1992 AIX 3.2 32 no 23 SVr2 \fIcurses\fP +1994 OSF/1 r3 32 no 23 SVr2 \fIcurses\fP +1995 HP-UX 10.00 32 6 16 SVr3 \fIcurses_colr\fP +1995 HP-UX 10.00 32 6 8 SVr4, X/Open \fIcurses\fP +1995 Solaris 5.4 32/64 7 16 X/Open \fIcurses\fP +1996 AIX 4.2 32 7 16 X/Open \fIcurses\fP +1996 OSF/1 r4 32 6 16 X/Open \fIcurses\fP +1997 HP-UX 11.00 32 6 8 X/Open \fIcurses\fP +2000 U/Win 32/64 7/31 16 uses \fIchtype\fP .TE -.RE .PP Notes: .RS 3 @@ -424,8 +544,9 @@ That version of curses was dropped with HP-UX 11.30 in 2006. Regarding OSF/1 (and Tru64), .bP These used 64-bit hardware. -Like ncurses, the OSF/1 curses interface is not customized for 32-bit -and 64-bit versions. +Like \fI\%ncurses\fP, +the OSF/1 curses interface is not customized for 32-bit and 64-bit +versions. .bP Unlike other systems which evolved from AT&T code, OSF/1 provided a new implementation for X/Open curses. @@ -462,144 +583,15 @@ BSD curses was improved slightly in 1993/1994 using Keith Bostic's modification to make the library 8-bit clean for \fBnvi\fP(1). He moved \fIstandout\fP attribute to a structure member. .IP -The resulting 4.4BSD curses was replaced by ncurses over the next ten years. +The resulting 4.4BSD curses was replaced by \fI\%ncurses\fP over the +next ten years. .bP U/Win is rarely used now. .\" --------------------------------------------------------------------------- -.SH EXTENSIONS -.PP -This implementation provides the \fBA_ITALIC\fP attribute for terminals -which have the \fBenter_italics_mode\fP (\fBsitm\fP) -and \fBexit_italics_mode\fP (\fBritm\fP) capabilities. -Italics are not mentioned in X/Open Curses. -Unlike the other video attributes, \fBA_ITALIC\fP is unrelated -to the \fBset_attributes\fP capabilities. -This implementation makes the assumption that -\fBexit_attribute_mode\fP may also reset italics. -.PP -Each of the functions added by XSI Curses has a parameter \fIopts\fP, -which X/Open Curses still (after more than twenty years) documents -as reserved for future use, saying that it should be \fBNULL\fP. -This implementation uses that parameter in ABI 6 for the functions which -have a color-pair parameter to support \fIextended color pairs\fP: -.bP -For functions which modify the color, e.g., -\fBwattr_set\fP, -if \fIopts\fP is set it is treated as a pointer to \fBint\fP, -and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter. -.bP -For functions which retrieve the color, e.g., -\fBwattr_get\fP, -if \fIopts\fP is set it is treated as a pointer to \fBint\fP, -and used to retrieve the color pair as an \fBint\fP value, -in addition -retrieving it via the standard pointer to \fBshort\fP parameter. -.PP -The remaining functions which have \fIopts\fP, -but do not manipulate color, -e.g., \fBwattr_on\fP and \fBwattr_off\fP -are not used by this implementation except to check that they are \fBNULL\fP. -.\" --------------------------------------------------------------------------- -.SH PORTABILITY -These functions are supported in the XSI Curses standard, Issue 4. -The standard defined the dedicated type for highlights, -\fBattr_t\fP, which was not defined in SVr4 curses. -The functions taking \fBattr_t\fP arguments were not supported under SVr4. -.PP -Very old versions of this library did not force an update of the screen -when changing the attributes. -Use \fBtouchwin\fP to force the screen to match the updated attributes. -.PP -The XSI Curses standard states that whether the traditional functions -\fBattron\fP/\fBattroff\fP/\fBattrset\fP can manipulate attributes other than -\fBA_BLINK\fP, \fBA_BOLD\fP, \fBA_DIM\fP, \fBA_REVERSE\fP, \fBA_STANDOUT\fP, or -\fBA_UNDERLINE\fP is \*(``unspecified\*(''. -Under this implementation as well as -SVr4 curses, these functions correctly manipulate all other highlights -(specifically, \fBA_ALTCHARSET\fP, \fBA_PROTECT\fP, and \fBA_INVIS\fP). -.PP -XSI Curses added these entry points: -.sp -.RS -\fBattr_get\fP, \fBattr_on\fP, -\fBattr_off\fP, \fBattr_set\fP, \fBwattr_on\fP, \fBwattr_off\fP, -\fBwattr_get\fP, \fBwattr_set\fP -.RE -.PP -The new functions are intended to work with -a new series of highlight macros prefixed with \fBWA_\fP. -The older macros have direct counterparts in the newer set of names: -.PP -.RS -.ne 9 -.TS -l l -_ _ _ -l l . -\fBName\fP \fBDescription\fP -\fBWA_NORMAL\fP Normal display (no highlight) -\fBWA_STANDOUT\fP Best highlighting mode of the terminal. -\fBWA_UNDERLINE\fP Underlining -\fBWA_REVERSE\fP Reverse video -\fBWA_BLINK\fP Blinking -\fBWA_DIM\fP Half bright -\fBWA_BOLD\fP Extra bright or bold -\fBWA_ALTCHARSET\fP Alternate character set -.TE -.RE -.PP -XSI curses does not assign values to these symbols, -nor does it state whether or not they are related to the -similarly-named A_NORMAL, etc.: -.bP -The XSI curses standard specifies that each pair of corresponding \fBA_\fP -and \fBWA_\fP-using functions operates on the same current-highlight -information. -.bP -However, in some implementations, those symbols have unrelated values. -.IP -For example, the Solaris \fIxpg4\fP (X/Open) curses declares -\fBattr_t\fP to be an unsigned short integer (16-bits), -while \fBchtype\fP is a unsigned integer (32-bits). -The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols -because they are used for a smaller datatype which does not -represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP. -.IP -In this implementation (as in many others), the values happen to be -the same because it simplifies copying information between -\fBchtype\fP and \fBcchar_t\fP variables. -.PP -The XSI standard extended conformance level adds new highlights -\fBA_HORIZONTAL\fP, \fBA_LEFT\fP, \fBA_LOW\fP, \fBA_RIGHT\fP, \fBA_TOP\fP, -\fBA_VERTICAL\fP (and corresponding \fBWA_\fP macros for each). -As of August 2013, -no known terminal provides these highlights -(i.e., via the \fBsgr1\fP capability). -.\" --------------------------------------------------------------------------- -.SH RETURN VALUE -All routines return the integer \fBOK\fP on success, or \fBERR\fP on failure. -.PP -X/Open does not define any error conditions. -.PP -This implementation -.bP -returns an error if the window pointer is null. -.bP -returns an error if the color pair parameter -for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1. -.bP -does not return an error if either of the parameters of \fBwattr_get\fP -used for retrieving attribute or color-pair values is \fBNULL\fP. -.PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. -.\" --------------------------------------------------------------------------- .SH SEE ALSO -.na -\fBcurses\fP(3X), -\fBcurs_addch\fP(3X), -\fBcurs_addstr\fP(3X), -\fBcurs_bkgd\fP(3X), -\fBcurs_printw\fP(3X), -\fBcurs_variables\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_addstr\fP(3X), +\fB\%curs_bkgd\fP(3X), +\fB\%curs_printw\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_beep.3x b/man/curs_beep.3x index 4368045c..9806f42b 100644 --- a/man/curs_beep.3x +++ b/man/curs_beep.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2005,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,17 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_beep.3x,v 1.16 2021/12/25 21:41:58 tom Exp $ -.TH curs_beep 3X "" +.\" $Id: curs_beep.3x,v 1.29 2024/04/20 21:20:07 tom Exp $ +.TH curs_beep 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBbeep\fP, \fBflash\fP \- \fBcurses\fP bell and screen flash routines +\fB\%beep\fP, +\fB\%flash\fP \- +ring the (visual) bell of the terminal with \fIcurses\fR .SH SYNOPSIS -\fB#include \fP +.nf +\fB#include .PP -\fBint beep(void);\fP -.br -\fBint flash(void);\fP -.br +\fBint beep(void); +\fBint flash(void); +.fi .SH DESCRIPTION The \fBbeep\fP and \fBflash\fP routines are used to alert the terminal user. The routine \fBbeep\fP sounds an audible alarm on the terminal, if possible; @@ -55,7 +57,7 @@ These routines return \fBOK\fP if they succeed in beeping or flashing, SVr4's beep and flash routines always returned \fBOK\fP, so it was not possible to tell when the beep or flash failed. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. Like SVr4, it specifies that they always return \fBOK\fP. .SH SEE ALSO -\fBcurses\fP(3X) +\fB\%curses\fP(3X) diff --git a/man/curs_bkgd.3x b/man/curs_bkgd.3x index db5680d2..25ba1f9f 100644 --- a/man/curs_bkgd.3x +++ b/man/curs_bkgd.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,135 +27,200 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_bkgd.3x,v 1.33 2021/12/25 17:39:16 tom Exp $ +.\" $Id: curs_bkgd.3x,v 1.61 2024/04/20 18:54:36 tom Exp $ +.TH curs_bkgd 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_bkgd 3X "" .SH NAME -\fBbkgdset\fP, \fBwbkgdset\fP, -\fBbkgd\fP, \fBwbkgd\fP, -\fBgetbkgd\fP \- \fBcurses\fP window background manipulation routines +\fB\%bkgdset\fP, +\fB\%wbkgdset\fP, +\fB\%bkgd\fP, +\fB\%wbkgd\fP, +\fB\%getbkgd\fP \- +manipulate background of a \fIcurses\fR window of characters .SH SYNOPSIS -\fB#include \fP -.PP -\fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fP -.br -\fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fP -.sp -\fBint bkgd(chtype \fP\fIch\fP\fB);\fP -.br -\fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fP -.sp -\fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fP -.br -.SH DESCRIPTION -.SS bkgdset -The \fBbkgdset\fP and \fBwbkgdset\fP routines manipulate the -background of the named window. -The window background is a \fBchtype\fP consisting of -any combination of attributes (i.e., rendition) and a character. -The attribute part of the background is combined (OR'ed) with all non-blank -characters that are written into the window with \fBwaddch\fP. -Both the character and attribute parts of the background are combined with -the blank characters. -The background becomes a property of the -character and moves with the character through any scrolling and -insert/delete line/character operations. -.PP -To the extent possible on a particular terminal, -the attribute part of the background is displayed -as the graphic rendition of the character put on the screen. -.SS bkgd -.PP -The \fBbkgd\fP and \fBwbkgd\fP functions -set the background property of the current or specified window -and then apply this setting to every character position in that window. -According to X/Open Curses, it should do this: +.nf +\fB#include +.PP +\fBint bkgd(chtype \fIch\fP); +\fBint wbkgd(WINDOW *\fIwin\fP, chtype \fIch\fP); +.PP +\fBvoid bkgdset(chtype \fIch\fP); +\fBvoid wbkgdset(WINDOW *\fIwin\fP, chtype \fIch\fP); .PP +\fBchtype getbkgd(WINDOW *\fIwin\fP); +.fi +.SH DESCRIPTION +The +.I background +of a +.I curses +window +(in the library's non-\*(``wide\*('' configuration) +is a +.I \%chtype +combining a set of attributes +(see \fB\%curs_attr\fP(3X)) +with a character called the +.I "blank character." +.PP +The blank character is a spacing character that populates a window's +character cells when their contents are erased without replacement. +The background's attributes are combined with all non-blank characters +written to the window, +as with the \fB\%waddch\fP(3X) and \fB\%winsch\fP(3X) families of +functions. +.PP +The blank character and attributes of the background combine with +characters written to the window as described below. +The background becomes a property of the character and moves with it +through any scrolling and insert/delete line/character operations. +.PP +To the extent possible on a given terminal, +the attribute part of the background is displayed as the graphic +rendition of the character put on the screen. +.SS "bkgd, wbkgd" +\fB\%bkgd\fP and \fB\%wbkgd\fP set the background property of +\fB\%stdscr\fP or the specified window and then apply this setting to +every character cell in that window. .bP -The rendition of every character on the screen is changed to -the new background rendition. +The rendition of every character in the window changes to the new +background rendition. .bP -Wherever the former background character -appears, it is changed to the new background character. -.PP -Neither X/Open Curses nor the SVr4 manual pages give details about -the way the rendition of characters on the screen is updated when -\fBbkgd\fP or \fBwbkgd\fP is used to change the background character. -.PP -This implementation, like SVr4 curses, does not store the background -and window attribute contributions to each cell separately. -It updates the rendition by comparing the character, non-color attributes and -colors contained in the background. -For each cell in the window, whether or not it is blank: +Wherever the former background character appears, +it changes to the new background character. +.PP +.I \%ncurses +updates the rendition of each character cell by comparing the character, +non-color attributes, +and colors. +The library applies to following procedure to each cell in the window, +whether or not it is blank. .bP -The library first compares the \fIcharacter\fP, -and if it matches the current character part of the background, -it replaces that with the new background character. +.I \%ncurses +first compares the cell's character to the previously specified blank +character; +if they match, +.I \%ncurses +writes the new blank character to the cell. .bP -The library then checks if the cell uses color, -i.e., its color pair value is nonzero. -If not, it simply replaces the attributes and color pair in the -cell with those from the new background character. +.I \%ncurses +then checks if the cell uses color, +that is, +its color pair value is nonzero. +If not, +it simply replaces the attributes and color pair in the cell with those +from the new background character. .bP If the cell uses color, -and that matches the color in the current background, -the library removes attributes -which may have come from the current background -and adds attributes from the new background. -It finishes by setting the cell -to use the color from the new background. +and its background color matches that of the current window background, +.I \%ncurses +removes attributes that may have come from the current background and +adds those from the new background. +It finishes by setting the cell's background to use the new window +background color. .bP If the cell uses color, -and that does not match the color in the current background, -the library updates only the non-color attributes, -first removing those which may have come from the current background, +and its background color does not match that of the current window +background, +.I \%ncurses +updates only the non-color attributes, +first removing those that may have come from the current background, and then adding attributes from the new background. .PP -If the background's character value is zero, a space is assumed. +.I \%ncurses +treats a background character value of zero (0) as a blank character. .PP If the terminal does not support color, -or if color has not been started with \fBstart_color\fP, -the new background character's color attribute will be ignored. +or if color has not been initialized with \fB\%start_color\fP(3X), +.I \%ncurses +ignores the new background character's color attribute. +.SS "bkgdset, wbkgdset" +\fB\%bkgdset\fP and \fB\%wbkgdset\fP manipulate the background of +the applicable window, +without updating the character cells as \fB\%bkgd\fP and +\fB\%wbkgd\fP do; +only future writes reflect the updated background. .SS getbkgd -.PP -The \fBgetbkgd\fP function returns the given window's current background -character/attribute pair. +\fB\%getbkgd\fP obtains the given window's background character and +attribute combination. .SH RETURN VALUE +Functions returning an \fIint\fP return \fBOK\fP on success. +\fB\%bkgd\fP returns \fBERR\fP if the library has not been initialized. +\fB\%wbkgd\fP and \fB\%getbkgd\fP return \fBERR\fP if a \fI\%WINDOW\fP +pointer argument is null. .PP -These functions are described in the XSI Curses standard, Issue 4. -It specifies that \fBbkgd\fP and \fBwbkgd\fP return \fBERR\fP on failure, -but gives no failure conditions. +\fB\%bkgdset\fP and \fBwbkgdset\fP do not return a value. .PP -The routines \fBbkgd\fP and \fBwbkgd\fP return the integer \fBOK\fP, -unless the library has not been initialized. -.PP -In contrast, -the SVr4.0 manual says \fBbkgd\fP and \fBwbkgd\fP may return \fBOK\fP -"or a non-negative integer if \fBimmedok\fP is set", -which refers to the return value from \fBwrefresh\fP -(used to implement the immediate repainting). -The SVr4 curses \fBwrefresh\fP returns the number of characters -written to the screen during the refresh. -This implementation does not do that. +\fB\%getbkgd\fP returns a window's background character and attribute +combination. .SH NOTES +Unusually, +there is no \fB\%wgetbkgd\fP function; +\fB\%getbkgd\fP behaves as one would expect \fB\%wgetbkgd\fP to, +accepting a \fI\%WINDOW\fP pointer argument. .PP -Note that \fBbkgdset\fP and \fBbkgd\fP may be macros. +\fB\%bkgd\fP and +\fB\%bkgdset\fP +may be implemented as macros. .PP X/Open Curses mentions that the character part of the background must be a single-byte value. -This implementation, like SVr4, checks to ensure that, +\fI\%ncurses\fP, +like SVr4 \fIcurses\fP, +checks to ensure that, and will reuse the old background character if the check fails. .SH PORTABILITY -.PP -These functions are described in the XSI Curses standard, Issue 4 -(X/Open Curses). +X/Open Curses, +Issue 4 describes these functions. +It specifies that +\fB\%bkgd\fP, +\fB\%wbkgd\fP, +and +\fB\%getbkgd\fP +return \fBERR\fP on failure +(in the case of the last, +this value is cast to +.IR \%chtype ), +but describes no failure conditions. +.PP +The SVr4.0 manual says that \fB\%bkgd\fP and \fB\%wbkgd\fP may return +\fBOK\fP +\*(``or a non-negative integer if \fB\%immedok\fP is set\*('', +which refers to the return value from \fB\%wrefresh\fP(3X), +used to implement the immediate repainting. +SVr4 \fIcurses\fP's \fB\%wrefresh\fP returns the number of characters +written to the screen during the refresh. +\fI\%ncurses\fP does not do that. +.PP +Neither X/Open Curses nor the SVr4 manual pages detail how the rendition +of characters on the screen updates when \fB\%bkgd\fP or \fB\%wbkgd\fP +changes the background character. +.IR \%ncurses , +like SVr4 +.IR curses , +does not +(in its non-\*(``wide\*('' configuration) +store the background and window attribute contributions to each +character cell separately. .SH SEE ALSO -.na +\fB\%curs_bkgrnd\fP(3X) describes the corresponding functions in the +\*(``wide\*('' configuration of +.IR \%ncurses . .PP -\fBcurses\fP(3X), -\fBcurs_addch\fP(3X), -\fBcurs_attr\fP(3X), -\fBcurs_outopts\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_attr\fP(3X) diff --git a/man/curs_bkgrnd.3x b/man/curs_bkgrnd.3x index d5933cb5..2551924c 100644 --- a/man/curs_bkgrnd.3x +++ b/man/curs_bkgrnd.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,95 +27,190 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_bkgrnd.3x,v 1.14 2021/12/25 21:41:58 tom Exp $ +.\" $Id: curs_bkgrnd.3x,v 1.42 2024/04/20 18:54:36 tom Exp $ +.TH curs_bkgrnd 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_bkgrnd 3X "" .SH NAME -\fBbkgrnd\fP, -\fBwbkgrnd\fP, -\fBbkgrndset\fP, -\fBwbkgrndset\fP, -\fBgetbkgrnd\fP, -\fBwgetbkgrnd\fP \- \fBcurses\fP window complex background manipulation routines +\fB\%bkgrnd\fP, +\fB\%wbkgrnd\fP, +\fB\%bkgrndset\fP, +\fB\%wbkgrndset\fP, +\fB\%getbkgrnd\fP, +\fB\%wgetbkgrnd\fP \- +manipulate background of a \fIcurses\fP window of wide characters .SH SYNOPSIS +.nf +\fB#include .PP -.B #include -.sp -\fBint bkgrnd(\fP\fB const cchar_t *\fP\fIwch\fP\fB);\fP -.br -\fBint wbkgrnd(\fP\fB WINDOW *\fP\fIwin\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP -.sp -\fBvoid bkgrndset(const cchar_t *\fP\fIwch\fP \fB);\fP -.br -\fBvoid wbkgrndset(WINDOW *\fP\fIwin\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP -.sp -\fBint getbkgrnd(cchar_t *\fP\fIwch\fP\fB);\fP -.br -\fBint wgetbkgrnd(WINDOW *\fP\fIwin\fP\fB, cchar_t *\fP\fIwch\fP\fB);\fP -.br +\fBint bkgrnd(const cchar_t *\fIwch\fP); +\fBint wbkgrnd(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP); +.PP +\fBvoid bkgrndset(const cchar_t *\fIwch\fP); +\fBvoid wbkgrndset(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP); +.PP +\fBint getbkgrnd(cchar_t *\fIwch\fP); +\fBint wgetbkgrnd(WINDOW *\fIwin\fP, cchar_t *\fIwch\fP); +.fi .SH DESCRIPTION -.SS bkgrndset +The +.I background +of a +.I curses +window +(in the library's \*(``wide\*('' configuration) +is a +.I \%cchar_t +combining a set of attributes +(see \fB\%curs_attr\fP(3X)) +with a complex character called the +.I "blank character." .PP -The \fBbkgrndset\fP and \fBwbkgrndset\fP routines manipulate the -background of the named window. -The window background is a \fBcchar_t\fP consisting of -any combination of attributes (i.e., rendition) and a complex character. -The attribute part of the background is combined (OR'ed) with all non-blank -characters that are written into the window with \fBwaddch\fP. -Both -the character and attribute parts of the background are combined with -the blank characters. -The background becomes a property of the -character and moves with the character through any scrolling and -insert/delete line/character operations. +The blank character is a spacing character that populates a window's +character cells when their contents are erased without replacement. +The background's attributes are combined with all non-blank characters +written to the window, +as with the \fB\%wadd_wch\fP(3X) and \fB\%wins_wch\fP(3X) families of +functions. .PP -To the extent possible on a -particular terminal, the attribute part of the background is displayed -as the graphic rendition of the character put on the screen. -.SS bkgrnd +The blank character and attributes of the background combine with +characters written to the window as described below. +The background becomes a property of the character and moves with it +through any scrolling and insert/delete line/character operations. .PP -The \fBbkgrnd\fP and \fBwbkgrnd\fP functions -set the background property of the current or specified window -and then apply this setting to every character position in that window: +To the extent possible on a given terminal, +the attribute part of the background is displayed as the graphic +rendition of the character put on the screen. +.SS "bkgrnd, wbkgrnd" +\fB\%bkgrnd\fP and \fB\%wbkgrnd\fP set the background property of +\fB\%stdscr\fP or the specified window and then apply this setting to +every character cell in that window. .bP -The rendition of every character on the screen is changed to -the new background rendition. +The rendition of every character in the window changes to the new +background rendition. .bP -Wherever the former background character -appears, it is changed to the new background character. -.SS getbkgrnd +Wherever the former background character appears, +it changes to the new background character. .PP -The \fBgetbkgrnd\fP function returns the given window's current background -character/attribute pair via the \fBwch\fP pointer. -If the given window pointer is null, -the character is not updated (but no error returned). -.SH NOTES -Note that -\fBbkgrnd\fP, -\fBbkgrndset\fP, and -\fBgetbkgrnd\fP -may be macros. +.I \%ncurses +updates the rendition of each character cell by comparing the character, +non-color attributes, +and colors. +The library applies to following procedure to each cell in the window, +whether or not it is blank. +.bP +.I \%ncurses +first compares the cell's character to the previously specified blank +character; +if they match, +.I \%ncurses +writes the new blank character to the cell. +.bP +.I \%ncurses +then checks if the cell uses color, +that is, +its color pair value is nonzero. +If not, +it simply replaces the attributes and color pair in the cell with those +from the new background character. +.bP +If the cell uses color, +and its background color matches that of the current window background, +.I \%ncurses +removes attributes that may have come from the current background and +adds those from the new background. +It finishes by setting the cell's background to use the new window +background color. +.bP +If the cell uses color, +and its background color does not match that of the current window +background, +.I \%ncurses +updates only the non-color attributes, +first removing those that may have come from the current background, +and then adding attributes from the new background. .PP -X/Open Curses does not provide details on how the rendition is changed. -This implementation follows the approach used in SVr4 curses, -which is explained in the manual page for \fBwbkgd\fP. -.SH RETURN VALUE +.I \%ncurses +treats a background character value of zero (0) as a blank character. .PP -The \fBbkgrndset\fP and \fBwbkgrndset\fP routines do not return a value. +If the terminal does not support color, +or if color has not been initialized with \fB\%start_color\fP(3X), +.I \%ncurses +ignores the new background character's color attribute. +.SS "bkgrndset, wbkgrndset" +\fB\%bkgrndset\fP and \fB\%wbkgrndset\fP manipulate the background of +the applicable window, +without updating the character cells as \fB\%bkgrnd\fP and +\fB\%wbkgrnd\fP do; +only future writes reflect the updated background. +.SS "getbkgrnd, wgetbkgrnd" +The \fB\%getbkgrnd\fP and \fB\%wgetbkgrnd\fP functions obtain the +background character and attribute pair of \fB\%stdscr\fP or the +specified window and store it via the +.I wch +pointer. +.SH RETURN VALUE +\fBbkgrndset\fP and \fBwbkgrndset\fP do not return a value. .PP -Upon successful completion, the other functions return \fBOK\fP. -Otherwise, they return \fBERR\fP: +The other functions return +.B ERR +upon failure and +.B OK +upon success. +In +.IR \%ncurses , +failure occurs if .bP -A null window pointer is treated as an error. +a +.I \%WINDOW +pointer +.I win +is null, or .bP -A null character pointer is treated as an error. +a +.I \%cchar_t +pointer +.I wch +is null. +.SH NOTES +\fB\%bkgrnd\fP, +\fB\%bkgrndset\fP, and +\fB\%getbkgrnd\fP +may be implemented as macros. +.PP +Unlike their counterparts in the non-\*(``wide\*('' configuration of +.IR \%ncurses , +\fB\%getbkgrnd\fP and \fB\%wgetbkgrnd\fP supply the background character +and attribute in a modifiable +.I \%cchar_t +parameter, +not as the return value. .SH PORTABILITY +X/Open Curses, +Issue 4 describes these functions. +It specifies no error conditions for them. .PP -These functions are described in the XSI Curses standard, Issue 4 -(X/Open Curses). +X/Open Curses does not provide details of how the rendition is updated. +This implementation follows the approach used in SVr4 +.IR curses . .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_bkgd\fP(3X) +\fB\%curs_bkgd\fP(3X) describes the corresponding functions in the +non-\*(``wide\*('' configuration of +.IR \%ncurses . +.PP +\fB\%curses\fP(3X), +\fB\%curs_add_wch\fP(3X), +\fB\%curs_attr\fP(3X) diff --git a/man/curs_border.3x b/man/curs_border.3x index 588174a4..2a5e72c1 100644 --- a/man/curs_border.3x +++ b/man/curs_border.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,56 +27,53 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_border.3x,v 1.29 2021/12/25 21:49:32 tom Exp $ -.TH curs_border 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_border.3x,v 1.49 2024/04/20 21:20:07 tom Exp $ +.TH curs_border 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBborder\fP, -\fBwborder\fP, -\fBbox\fP, -\fBhline\fP, -\fBwhline\fP, -\fBvline\fP, -\fBwvline\fP, -\fBmvhline\fP, -\fBmvwhline\fP, -\fBmvvline\fP, -\fBmvwvline\fP \- create \fBcurses\fP borders, horizontal and vertical lines -.ad -.hy +\fB\%border\fP, +\fB\%wborder\fP, +\fB\%box\fP, +\fB\%hline\fP, +\fB\%whline\fP, +\fB\%vline\fP, +\fB\%wvline\fP, +\fB\%mvhline\fP, +\fB\%mvwhline\fP, +\fB\%mvvline\fP, +\fB\%mvwvline\fP \- +draw borders and lines in a \fIcurses\fR window of characters .SH SYNOPSIS -\fB#include \fP -.sp -\fBint border(chtype \fP\fIls\fP\fB, chtype \fP\fIrs\fP\fB, chtype \fP\fIts\fP\fB, chtype \fP\fIbs\fP\fB,\fP - \fBchtype \fP\fItl\fP\fB, chtype \fP\fItr\fP\fB, chtype \fP\fIbl\fP\fB, chtype \fP\fIbr\fP\fB);\fP -.br -\fBint wborder(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIls\fP\fB, chtype \fP\fIrs\fP\fB,\fP - \fBchtype \fP\fIts\fP\fB, chtype \fP\fIbs\fP\fB, chtype \fP\fItl\fP\fB, chtype \fP\fItr\fP\fB,\fP - \fBchtype \fP\fIbl\fP\fB, chtype \fP\fIbr\fP\fB);\fP -.sp -\fBint box(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIverch\fP\fB, chtype \fP\fIhorch\fP\fB);\fP -.sp -\fBint hline(chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint whline(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint vline(chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint wvline(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvhline(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwhline(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvvline(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwvline(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint border(chtype \fIls\fP, chtype \fIrs\fP, chtype \fIts\fP, chtype \fIbs\fP, + \fBchtype \fItl\fB, chtype \fItr\fB, chtype \fIbl\fB, chtype \fIbr\fB);\fR +\fBint wborder(WINDOW *\fIwin\fB, chtype \fIls\fB, chtype \fIrs\fB,\fR + \fBchtype \fIts\fB, chtype \fIbs\fB, chtype \fItl\fB, chtype \fItr\fB,\fR + \fBchtype \fIbl\fB, chtype \fIbr\fB);\fR +.PP +\fBint box(WINDOW *\fIwin\fB, chtype \fIverch\fB, chtype \fIhorch\fB);\fR +.PP +\fBint hline(chtype \fIch\fB, int \fIn\fB);\fR +\fBint whline(WINDOW *\fIwin\fB, chtype \fIch\fB, int \fIn\fB);\fR +\fBint vline(chtype \fIch\fB, int \fIn\fB);\fR +\fBint wvline(WINDOW *\fIwin\fB, chtype \fIch\fB, int \fIn\fB);\fR +.PP +\fBint mvhline(int \fIy\fB, int \fIx\fB, chtype \fIch\fB, int \fIn\fB);\fR +\fBint mvwhline(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB, chtype \fIch\fB, int \fIn\fB);\fR +\fBint mvvline(int \fIy\fB, int \fIx\fB, chtype \fIch\fB, int \fIn\fB);\fR +\fBint mvwvline(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB, chtype \fIch\fB, int \fIn\fB);\fR +.fi .SH DESCRIPTION The \fBborder\fP, \fBwborder\fP and \fBbox\fP routines draw a box around the edges of a window. @@ -121,9 +118,9 @@ default values (defined in \fBcurses.h\fP) are used instead: \fBACS_LRCORNER\fP. .RE .PP -\fBbox(\fP\fIwin\fP\fB, \fP\fIverch\fP\fB, \fP\fIhorch\fP\fB)\fP is a shorthand -for the following call: \fBwborder(\fP\fIwin\fP\fB,\fP \fIverch\fP\fB,\fP -\fIverch\fP\fB,\fP \fIhorch\fP\fB,\fP \fIhorch\fP\fB, 0, 0, 0, 0)\fP. +\fBbox(\fIwin\fB, \fIverch\fB, \fIhorch\fB)\fR is a shorthand +for the following call: \fBwborder(\fIwin\fB,\fR \fIverch\fB,\fR +\fIverch\fB,\fR \fIhorch\fB,\fR \fIhorch\fB, 0, 0, 0, 0)\fR. .PP The \fBhline\fP and \fBwhline\fP functions draw a horizontal (left to right) line using \fIch\fP starting at the current cursor position in the window. @@ -140,24 +137,26 @@ The line is at most \fIn\fP characters long, or as many as fit into the window. .SH RETURN VALUE All routines return the integer \fBOK\fP. -The SVr4.0 manual says "or a -non-negative integer if \fBimmedok\fP is set", but this appears to be an error. +The SVr4.0 manual says +\*(``or a non-negative integer if \fB\%immedok\fP is set\*('', +but this appears to be an error. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. This implementation returns an error if the window pointer is null. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES The borders generated by these functions are \fIinside\fP borders (this is also true of SVr4 curses, though the fact is not documented). .PP Note that \fBborder\fP and \fBbox\fP may be macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -The standard specifies that they return \fBERR\fP on failure, -but specifies no error conditions. +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBcurses\fP(3X), \fBcurs_outopts\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_outopts\fP(3X) diff --git a/man/curs_border_set.3x b/man/curs_border_set.3x index 9d52ca5a..3077da6b 100644 --- a/man/curs_border_set.3x +++ b/man/curs_border_set.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2011,2012 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,85 +27,77 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_border_set.3x,v 1.15 2021/12/25 21:41:58 tom Exp $ -.TH curs_border_set 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_border_set.3x,v 1.36 2024/04/20 21:20:07 tom Exp $ +.TH curs_border_set 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBborder_set\fP, -\fBwborder_set\fP, -\fBbox_set\fP, -\fBhline_set\fP, -\fBwhline_set\fP, -\fBmvhline_set\fP, -\fBmvwhline_set\fP, -\fBvline_set\fP, -\fBwvline_set\fP, -\fBmvvline_set\fP, -\fBmvwvline_set\fP \- create \fBcurses\fP borders or lines using complex characters and renditions -.ad -.hy +\fB\%border_set\fP, +\fB\%wborder_set\fP, +\fB\%box_set\fP, +\fB\%hline_set\fP, +\fB\%whline_set\fP, +\fB\%mvhline_set\fP, +\fB\%mvwhline_set\fP, +\fB\%vline_set\fP, +\fB\%wvline_set\fP, +\fB\%mvvline_set\fP, +\fB\%mvwvline_set\fP \- +draw borders and lines in a \fIcurses\fR window of wide characters .SH SYNOPSIS +.nf +\fB#include .PP -\fB#include \fP -.sp -\fBint border_set(\fP - \fBconst cchar_t *\fP\fIls\fP, \fBconst cchar_t *\fP\fIrs\fP, - \fBconst cchar_t *\fP\fIts\fP, \fBconst cchar_t *\fP\fIbs\fP, - \fBconst cchar_t *\fP\fItl\fP, \fBconst cchar_t *\fP\fItr\fP, - \fBconst cchar_t *\fP\fIbl\fP, \fBconst cchar_t *\fP\fIbr\fP -\fB);\fP +\fBint border_set( + \fBconst cchar_t *\fIls\fB, const cchar_t *\fIrs\fP, + \fBconst cchar_t *\fIts\fB, const cchar_t *\fIbs\fP, + \fBconst cchar_t *\fItl\fB, const cchar_t *\fItr\fP, + \fBconst cchar_t *\fIbl\fB, const cchar_t *\fIbr\fB);\fR .br \fBint wborder_set(\fP - \fBWINDOW *win\fP, - \fBconst cchar_t *\fP\fIls\fP, \fBconst cchar_t *\fP\fIrs\fP, - \fBconst cchar_t *\fP\fIts\fP, \fBconst cchar_t *\fP\fIbs\fP, - \fBconst cchar_t *\fP\fItl\fP, \fBconst cchar_t *\fP\fItr\fP, - \fBconst cchar_t *\fP\fIbl\fP, \fBconst cchar_t *\fP\fIbr\fP\fB);\fP -.br + \fBWINDOW *\fIwin\fP, + \fBconst cchar_t *\fIls\fB, const cchar_t *\fIrs\fP, + \fBconst cchar_t *\fIts\fB, const cchar_t *\fIbs\fP, + \fBconst cchar_t *\fItl\fB, const cchar_t *\fItr\fP, + \fBconst cchar_t *\fIbl\fB, const cchar_t *\fIbr\fB);\fR \fBint box_set(\fP - \fBWINDOW *win\fP, - \fBconst cchar_t *\fP\fIverch\fP, - \fBconst cchar_t *\fP\fIhorch\fP\fB);\fP -.br + \fBWINDOW *\fIwin\fP, + \fBconst cchar_t *\fIverch\fP, + \fBconst cchar_t *\fIhorch\fB);\fR \fBint hline_set(\fP - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint whline_set(\fP - \fBWINDOW *\fP\fIwin\fP, - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBWINDOW *\fIwin\fP, + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint mvhline_set(\fP - \fBint \fP\fIy\fP, \fBint \fP\fIx\fP, - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBint \fIy\fB, int \fIx\fP, + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint mvwhline_set(\fP - \fBWINDOW *\fP\fIwin\fP, - \fBint \fP\fIy\fP, \fBint \fP\fIx\fP, - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBWINDOW *\fIwin\fP, + \fBint \fIy\fB, int \fIx\fP, + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint vline_set(\fP - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint wvline_set(\fP - \fBWINDOW *\fP\fIwin\fP, - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBWINDOW *\fIwin\fP, + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint mvvline_set(\fP - \fBint \fP\fIy\fP, \fBint \fP\fIx\fP, - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBint \fIy\fB, int \fIx\fP, + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR \fBint mvwvline_set(\fP - \fBWINDOW *\fP\fIwin\fP, - \fBint \fP\fIy\fP, \fBint \fP\fIx\fP, - \fBconst cchar_t *\fP\fIwch\fP, \fBint \fP\fIn\fP\fB);\fP -.br + \fBWINDOW *\fIwin\fP, + \fBint \fIy\fB, int \fIx\fP, + \fBconst cchar_t *\fIwch\fB, int \fIn\fB);\fR +.fi .SH DESCRIPTION -.PP The \fBborder_set\fP and @@ -152,11 +144,11 @@ default values (defined in \fBcurses.h\fP) are used instead: \fBWACS_LRCORNER\fP. .RE .PP -\fBbox_set(\fP\fIwin\fP, \fIverch\fP\fB, \fP\fIhorch\fP\fB);\fP +\fBbox_set(\fIwin\fR, \fIverch\fB, \fIhorch\fB);\fR is a shorthand for the following call: .PP -\fBwborder_set(\fP\fIwin\fP\fB, \fP\fIverch\fP\fB, \fP\fIverch\fP\fB,\fP - \fIhorch\fP\fB, \fP\fIhorch\fP\fB, NULL, NULL, NULL, NULL);\fP +\fBwborder_set(\fIwin\fB, \fIverch\fB, \fIverch\fB,\fR + \fIhorch\fB, \fIhorch\fB, NULL, NULL, NULL, NULL);\fR .PP The \fB*line_set\fP @@ -179,9 +171,20 @@ The \fBmvwvline_set\fP, and \fBwvline_set\fP functions draw a line proceeding toward the last line of the window. -.br -.SH NOTES +.SH RETURN VALUE +Upon successful completion, these functions return +\fBOK\fP. +Otherwise, they return +\fBERR\fP. .PP +Functions using a window parameter return an error if it is null. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.SH NOTES Note that \fBborder_set\fP, \fBhline_set\fP, @@ -191,21 +194,10 @@ Note that \fBmvwvline_set\fP, and \fBvline_set\fP may be macros. -.br -.SH RETURN VALUE -.PP -Upon successful completion, these functions return -\fBOK\fP. -Otherwise, they return -\fBERR\fP. -.PP -Functions using a window parameter return an error if it is null. -.PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +.SH PORTABILITY +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBncurses\fP(3X), -\fBcurs_add_wch\fP(3X), -\fBcurs_border\fP(3X), -\fBcurs_outopts\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_add_wch\fP(3X), +\fB\%curs_border\fP(3X), +\fB\%curs_outopts\fP(3X) diff --git a/man/curs_clear.3x b/man/curs_clear.3x index 234574f5..0ab00645 100644 --- a/man/curs_clear.3x +++ b/man/curs_clear.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,63 +27,69 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_clear.3x,v 1.22 2021/12/25 21:41:58 tom Exp $ -.TH curs_clear 3X "" -.na -.hy 0 +.\" $Id: curs_clear.3x,v 1.48 2024/04/20 21:20:07 tom Exp $ +.TH curs_clear 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBerase\fP, -\fBwerase\fP, -\fBclear\fP, -\fBwclear\fP, -\fBclrtobot\fP, -\fBwclrtobot\fP, -\fBclrtoeol\fP, -\fBwclrtoeol\fP \- clear all or part of a \fBcurses\fP window -.ad -.hy +\fB\%erase\fP, +\fB\%werase\fP, +\fB\%clear\fP, +\fB\%wclear\fP, +\fB\%clrtobot\fP, +\fB\%wclrtobot\fP, +\fB\%clrtoeol\fP, +\fB\%wclrtoeol\fP \- +clear all or part of a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint erase(void);\fP -.br -\fBint werase(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint clear(void);\fP -.br -\fBint wclear(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint clrtobot(void);\fP -.br -\fBint wclrtobot(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint clrtoeol(void);\fP -.br -\fBint wclrtoeol(WINDOW *\fP\fIwin\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint erase(void); +\fBint werase(WINDOW *\fIwin\fP); +.PP +\fBint clear(void); +\fBint wclear(WINDOW *\fIwin\fP); +.PP +\fBint clrtobot(void); +\fBint wclrtobot(WINDOW *\fIwin\fP); +.PP +\fBint clrtoeol(void); +\fBint wclrtoeol(WINDOW *\fIwin\fP); +.fi .SH DESCRIPTION +.SS "erase, werase" The \fBerase\fP and \fBwerase\fP routines copy blanks to every position in the window, clearing the screen. .PP +Blanks created by erasure have the current background rendition (as set +by \fBwbkgdset\fP(3X)) merged into them. +.SS "clear, wclear" The \fBclear\fP and \fBwclear\fP routines are like \fBerase\fP and -\fBwerase\fP, but they also call \fBclearok\fP, so that the screen is +\fBwerase\fP, but they also call \fBclearok\fP(3X), so that the screen is cleared completely on the next call to \fBwrefresh\fP for that window and repainted from scratch. -.PP +.SS "clrtobot, wclrtobot" The \fBclrtobot\fP and \fBwclrtobot\fP routines erase from the cursor to the end of screen. That is, they erase all lines below the cursor in the window. Also, the current line to the right of the cursor, inclusive, is erased. -.PP +.SS "clrtoeol, wclrtoeol" The \fBclrtoeol\fP and \fBwclrtoeol\fP routines erase the current line to the right of the cursor, inclusive, to the end of the current line. -.PP -Blanks created by erasure have the current background rendition (as set -by \fBwbkgdset\fP) merged into them. .SH RETURN VALUE All routines return the integer \fBOK\fP on success and \fBERR\fP on failure. .PP @@ -98,13 +104,10 @@ if the cursor position is about to wrap. Note that \fBerase\fP, \fBwerase\fP, \fBclear\fP, \fBwclear\fP, \fBclrtobot\fP, and \fBclrtoeol\fP may be macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -The -standard specifies that they return \fBERR\fP on failure, but specifies no -error conditions. +These functions are described in X/Open Curses, Issue 4. .PP -The SVr4.0 manual says that these functions could -return "a non-negative integer if \fBimmedok\fP is set", +The SVr4.0 manual says that these functions could return +\*(``or a non-negative integer if \fB\%immedok\fP is set\*('', referring to the return-value of \fBwrefresh\fP. In that implementation, \fBwrefresh\fP would return a count of the number of characters written to the terminal. @@ -113,7 +116,7 @@ Some historic curses implementations had, as an undocumented feature, the ability to do the equivalent of \fBclearok(..., 1)\fP by saying \fBtouchwin(stdscr)\fP or \fBclear(stdscr)\fP. This will not work under -ncurses. +\fI\%ncurses\fP. .PP This implementation, and others such as Solaris, sets the current position to 0,0 after erasing @@ -128,7 +131,7 @@ even for a subwindow or derived window. If you do not want to clear the screen during the next \fBwrefresh\fP, use \fBwerase\fP instead. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_outopts\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_variables\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_outopts\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_color.3x b/man/curs_color.3x index 9e9b9472..7a5a02f2 100644 --- a/man/curs_color.3x +++ b/man/curs_color.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,145 +27,164 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_color.3x,v 1.67 2021/12/25 17:39:16 tom Exp $ -.TH curs_color 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_color.3x,v 1.100 2024/04/20 21:24:19 tom Exp $ +.TH curs_color 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ds n 5 -.na -.hy 0 +. .SH NAME -\fBstart_color\fP, -\fBhas_colors\fP, -\fBcan_change_color\fP, -\fBinit_pair\fP, -\fBinit_color\fP, -\fBinit_extended_pair\fP, -\fBinit_extended_color\fP, -\fBcolor_content\fP, -\fBpair_content\fP, -\fBextended_color_content\fP, -\fBextended_pair_content\fP, -\fBreset_color_pairs\fP, -\fBCOLOR_PAIR\fP, -\fBPAIR_NUMBER\fP \- \fBcurses\fP color manipulation routines -.ad -.hy +\fB\%start_color\fP, +\fB\%has_colors\fP, +\fB\%can_change_color\fP, +\fB\%init_pair\fP, +\fB\%init_color\fP, +\fB\%init_extended_pair\fP, +\fB\%init_extended_color\fP, +\fB\%color_content\fP, +\fB\%pair_content\fP, +\fB\%extended_color_content\fP, +\fB\%extended_pair_content\fP, +\fB\%reset_color_pairs\fP, +\fB\%COLOR_PAIR\fP, +\fB\%PAIR_NUMBER\fP, +\fB\%COLORS\fP, +\fB\%COLOR_PAIRS\fP, +\fB\%COLOR_BLACK\fP, +\fB\%COLOR_RED\fP, +\fB\%COLOR_GREEN\fP, +\fB\%COLOR_YELLOW\fP, +\fB\%COLOR_BLUE\fP, +\fB\%COLOR_MAGENTA\fP, +\fB\%COLOR_CYAN\fP, +\fB\%COLOR_WHITE\fP \- +manipulate terminal colors with \fIcurses\fR .SH SYNOPSIS -\fB#include \fP -.sp -\fBint start_color(void);\fP -.sp -\fBbool has_colors(void);\fP -.br -\fBbool can_change_color(void);\fP -.sp -\fBint init_pair(short \fP\fIpair\fP\fB, short \fP\fIf\fP\fB, short \fP\fIb\fP\fB);\fP -.br -\fBint init_color(short \fP\fIcolor\fP\fB, short \fP\fIr\fP\fB, short \fP\fIg\fP\fB, short \fP\fIb\fP\fB);\fP -.br -/* extensions */ -.br -\fBint init_extended_pair(int \fP\fIpair\fP\fB, int \fP\fIf\fP\fB, int \fP\fIb\fP\fB);\fP -.br -\fBint init_extended_color(int \fP\fIcolor\fP\fB, int \fP\fIr\fP\fB, int \fP\fIg\fP\fB, int \fP\fIb\fP\fB);\fP -.sp -\fBint color_content(short \fP\fIcolor\fP\fB, short *\fP\fIr\fP\fB, short *\fP\fIg\fP\fB, short *\fP\fIb\fP\fB);\fP -.br -\fBint pair_content(short \fP\fIpair\fP\fB, short *\fP\fIf\fP\fB, short *\fP\fIb\fP\fB);\fP -.br -/* extensions */ -.br -\fBint extended_color_content(int \fP\fIcolor\fP\fB, int *\fP\fIr\fP\fB, int *\fP\fIg\fP\fB, int *\fP\fIb\fP\fB);\fP -.br -\fBint extended_pair_content(int \fP\fIpair\fP\fB, int *\fP\fIf\fP\fB, int *\fP\fIb\fP\fB);\fP -.sp -/* extensions */ -.br -\fBvoid reset_color_pairs(void);\fP -.sp -\fBint COLOR_PAIR(int \fP\fIn\fP\fB);\fP -.br -\fBPAIR_NUMBER(\fP\fIattrs\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fI/* variables */ +\fBint COLOR_PAIRS; +\fBint COLORS; +.PP +\fBint start_color(void); +.PP +\fBbool has_colors(void); +\fBbool can_change_color(void); +.PP +\fBint init_pair(short \fIpair\fP, short \fIf\fP, short \fIb\fP); +\fBint init_color(short \fIcolor\fP, short \fIr\fP, short \fIg\fP, short \fIb\fP); +\fI/* extensions */ +\fBint init_extended_pair(int \fIpair\fP, int \fIf\fP, int \fIb\fP); +\fBint init_extended_color(int \fIcolor\fP, int \fIr\fP, int \fIg\fP, int \fIb\fP); +.PP +\fBint color_content(short \fIcolor\fP, short *\fIr\fP, short *\fIg\fP, short *\fIb\fP); +\fBint pair_content(short \fIpair\fP, short *\fIf\fP, short *\fIb\fP); +\fI/* extensions */ +\fBint extended_color_content(int \fIcolor\fP, int *\fIr\fP, int *\fIg\fP, int *\fIb\fP); +\fBint extended_pair_content(int \fIpair\fP, int *\fIf\fP, int *\fIb\fP); +.PP +\fI/* extension */ +\fBvoid reset_color_pairs(void); +.PP +\fBint COLOR_PAIR(int \fIn\fP); +\fBPAIR_NUMBER(int \fIattr\fP); +.fi .SH DESCRIPTION .SS Overview -\fBcurses\fP supports color attributes on terminals with that capability. -To use these routines \fBstart_color\fP must be called, usually right after -\fBinitscr\fP. -Colors are always used in pairs (referred to as color-pairs). -A color-pair consists of a foreground color (for characters) and a background -color (for the blank field on which the characters are displayed). -A programmer initializes a color-pair with the routine \fBinit_pair\fP. -After it has been initialized, \fBCOLOR_PAIR\fP(\fIn\fP) -can be used to convert the pair to a video attribute. -.PP -If a terminal is capable of redefining colors, the programmer can use the -routine \fBinit_color\fP to change the definition of a color. -The routines \fBhas_colors\fP and \fBcan_change_color\fP +\fIcurses\fP supports color attributes on terminals with that +capability. +Call \fB\%start_color\fP +(typically right after \fB\%initscr\fP(3X)) +to enable this feature. +Colors are always used in pairs. +A +.I "color pair" +couples a foreground color for characters with a background color for +the blank field on which characters are rendered. +\fB\%init_pair\fP initializes a color pair. +The macro \fB\%COLOR_PAIR\fP(\fIn\fP) can then convert the pair to a +video attribute. +.PP +If a terminal has the relevant capability, +\fB\%init_color\fP permits (re)definition of a color. +\fB\%has_colors\fP and \fB\%can_change_color\fP return \fBTRUE\fP or \fBFALSE\fP, -depending on whether the terminal has color capabilities and whether the +depending on whether the terminal has color capability and whether the programmer can change the colors. -The routine \fBcolor_content\fP allows a -programmer to extract the amounts of red, green, and blue components in an -initialized color. -The routine \fBpair_content\fP allows a programmer to find -out how a given color-pair is currently defined. -.SS Color Rendering -The \fBcurses\fP library combines these inputs to produce the -actual foreground and background colors shown on the screen: +\fB\%color_content\fP permits extraction of the +red, +green, +and blue components of an initialized color. +\fB\%pair_content\fP permits discovery of a color pair's current +definition. +.SS Rendering +.I curses +combines the following data to render a character cell. +Any of them can include color information. .bP -per-character video attributes (e.g., via \fBwaddch\fP), +.I curses +character attributes, +as from \fB\%waddch\fP(3X) or \fB\%wadd_wch\fP(3X) .bP -the window attribute (e.g., by \fBwattrset\fP), and +window attributes, +as from \fB\%wattrset\fP(3X) or \fB\%wattr_set\fP(3X) .bP -the background character (e.g., \fBwbkgdset\fP). +window background character attributes, +as from \fB\%wbkgdset\fP(3X) or \fB\%wbkgrndset\fP(3X) .PP -Per-character and window attributes are usually set by a parameter containing -video attributes including a color pair value. -Some functions such as \fBwattr_set\fP use a separate parameter which -is the color pair number. +Per-character and window attributes are usually set through a function +parameter containing attributes including a color pair value. +Some functions, +such as \fB\%wattr_set\fP, +use a separate color pair number parameter. .PP -The background character is a special case: it includes a character value, -just as if it were passed to \fBwaddch\fP. +The background character is a special case: +it includes a character code, +just as if it were passed to \fB\%waddch\fP. .PP -The \fBcurses\fP library does the actual work of combining these color -pairs in an internal function called from \fBwaddch\fP: +The \fIcurses\fP library does the actual work of combining these color +pairs in an internal function called from \fB\%waddch\fP: .bP -If the parameter passed to \fBwaddch\fP is \fIblank\fP, +If the parameter passed to \fB\%waddch\fP is \fIblank\fP, and it uses the special color pair 0, .RS .bP -\fBcurses\fP next checks the window attribute. +\fIcurses\fP next checks the window attribute. .bP If the window attribute does not use color pair 0, -\fBcurses\fP uses the color pair from the window attribute. +\fIcurses\fP uses the color pair from the window attribute. .bP -Otherwise, \fBcurses\fP uses the background character. +Otherwise, \fIcurses\fP uses the background character. .RE .bP -If the parameter passed to \fBwaddch\fP is \fInot blank\fP, +If the parameter passed to \fB\%waddch\fP is \fInot blank\fP, or it does not use the special color pair 0, -\fBcurses\fP prefers the color pair from the parameter, +\fIcurses\fP prefers the color pair from the parameter, if it is nonzero. Otherwise, it tries the window attribute next, and finally the background character. .PP -Some \fBcurses\fP functions such as \fBwprintw\fP call \fBwaddch\fP. +Some \fIcurses\fP functions such as \fB\%wprintw\fP call \fB\%waddch\fP. Those do not combine its parameter with a color pair. Consequently those calls use only the window attribute or the background character. .SH CONSTANTS -.PP -In \fB\fP the following macros are defined. +In \fB\%\fP the following macros are defined. These are the standard colors (ISO-6429). -\fBcurses\fP also assumes that \fBCOLOR_BLACK\fP is the default +\fIcurses\fP also assumes that \fB\%COLOR_BLACK\fP is the default background color for all terminals. .PP .nf @@ -183,38 +202,51 @@ Some terminals support more than the eight (8) \*(``ANSI\*('' colors. There are no standard names for those additional colors. .SH VARIABLES .SS COLORS -is initialized by \fBstart_color\fP to the maximum number of colors +is initialized by \fB\%start_color\fP to the maximum number of colors the terminal can support. .SS COLOR_PAIRS -is initialized by \fBstart_color\fP to the maximum number of color pairs -the terminal can support. +is initialized by \fB\%start_color\fP to the maximum number of color +pairs the terminal can support. +Often, +its value is the product \fB\%COLORS\fP \(mu \fB\%COLORS\fP, +but this is not always true. +.bP +A few terminals use the HLS color space +(see \fB\%start_color\fP below), +ignoring this rule; +and +.bP +terminals supporting a large number of colors are limited to the number +of color pairs that a +.I "signed short" +value can represent. .SH FUNCTIONS .SS start_color -The \fBstart_color\fP routine requires no arguments. +The \fB\%start_color\fP routine requires no arguments. It must be called if the programmer wants to use colors, and before any other color manipulation routine is called. -It is good practice to call this routine right after \fBinitscr\fP. -\fBstart_color\fP does this: +It is good practice to call this routine right after \fB\%initscr\fP. +\fB\%start_color\fP does this: .bP -It initializes two global variables, \fBCOLORS\fP and -\fBCOLOR_PAIRS\fP (respectively defining the maximum number of colors -and color-pairs the terminal can support). +It initializes two global variables, \fB\%COLORS\fP and +\fB\%COLOR_PAIRS\fP (respectively defining the maximum number of colors +and color pairs the terminal can support). .bP -It initializes the special color pair \fB0\fP to the default foreground +It initializes the special color pair \fB\%0\fP to the default foreground and background colors. No other color pairs are initialized. .bP It restores the colors on the terminal to the values they had when the terminal was just turned on. .bP -If the terminal supports the \fBinitc\fP (\fBinitialize_color\fP) capability, -\fBstart_color\fP +If the terminal supports the \fBinitc\fP \%(\fBinitialize_color\fP) capability, +\fB\%start_color\fP initializes its internal table representing the red, green, and blue components of the color palette. .IP The components depend on whether the terminal uses CGA (aka \*(``ANSI\*('') or -HLS (i.e., the \fBhls\fP (\fBhue_lightness_saturation\fP) capability is set). +HLS (i.e., the \fBhls\fP \%(\fBhue_lightness_saturation\fP) capability is set). The table is initialized first for eight basic colors (black, red, green, yellow, blue, magenta, cyan, and white), using weights that depend upon the CGA/HLS choice. @@ -229,28 +261,28 @@ but with weights of \fB1000\fP. SVr4 uses a similar scheme, but uses \fB1000\fP for the components of the initial eight colors. .IP -\fBstart_color\fP does not attempt to set the terminal's color palette +\fB\%start_color\fP does not attempt to set the terminal's color palette to match its built-in table. -An application may use \fBinit_color\fP to alter the internal table +An application may use \fB\%init_color\fP to alter the internal table along with the terminal's color. .PP These limits apply to color values and color pairs. -Values outside these limits are not legal, and may result in a runtime error: +Values outside these limits are not valid, and may result in a runtime error: .bP -\fBCOLORS\fP corresponds to the terminal database's \fBmax_colors\fP capability, -(see \fBterminfo\fP(\*n)). +\fBCOLORS\fP corresponds to the terminal database's \fB\%max_colors\fP capability, +(see \fB\%terminfo\fP(5)). .bP -color values are expected to be in the range \fB0\fP to \fBCOLORS\-1\fP, -inclusive (including \fB0\fP and \fBCOLORS\-1\fP). +color values are expected to be in the range \fB0\fP to \fB\%COLORS\-1\fP, +inclusive (including \fB0\fP and \fB\%COLORS\-1\fP). .bP a special color value \fB\-1\fP is used in certain extended functions -to denote the \fIdefault color\fP (see \fBuse_default_colors\fP(3X)). +to denote the \fIdefault color\fP (see \fB\%use_default_colors\fP(3X)). .bP -\fBCOLOR_PAIRS\fP corresponds to -the terminal database's \fBmax_pairs\fP capability, -(see \fBterminfo\fP(\*n)). +\fB\%COLOR_PAIRS\fP corresponds to +the terminal database's \fB\%max_pairs\fP capability, +(see \fB\%terminfo\fP(5)). .bP -legal color pair values are in the range \fB1\fP to \fBCOLOR_PAIRS\-1\fP, +valid color pair values are in the range \fB1\fP to \fB\%COLOR_PAIRS\-1\fP, inclusive. .bP color pair \fB0\fP is special; it denotes \*(``no color\*(''. @@ -259,143 +291,134 @@ Color pair \fB0\fP is assumed to be white on black, but is actually whatever the terminal implements before color is initialized. It cannot be modified by the application. .SS has_colors -.PP -The \fBhas_colors\fP routine requires no arguments. +The \fB\%has_colors\fP routine requires no arguments. It returns \fBTRUE\fP if the terminal can manipulate colors; otherwise, it returns \fBFALSE\fP. This routine facilitates writing terminal-independent programs. For example, a programmer can use it to decide whether to use color or some other video attribute. .SS can_change_color -.PP -The \fBcan_change_color\fP routine requires no arguments. +The \fB\%can_change_color\fP routine requires no arguments. It returns \fBTRUE\fP if the terminal supports colors and can change their definitions; other, it returns \fBFALSE\fP. This routine facilitates writing terminal-independent programs. .SS init_pair -.PP -The \fBinit_pair\fP routine changes the definition of a color-pair. +The \fB\%init_pair\fP routine changes the definition of a color pair. It takes three arguments: -the number of the color-pair to be changed, the foreground +the number of the color pair to be changed, the foreground color number, and the background color number. For portable applications: .bP -The first argument must be a legal color pair value. -If default colors are used (see \fBuse_default_colors\fP(3X)) +The first argument must be a valid color pair value. +If default colors are used (see \fB\%use_default_colors\fP(3X)) the upper limit is adjusted to allow for extra pairs which use a default color in foreground and/or background. .bP -The second and third arguments must be legal color values. +The second and third arguments must be valid color values. .PP -If the color-pair was previously initialized, -the screen is refreshed and all occurrences of that color-pair +If the color pair was previously initialized, +the screen is refreshed and all occurrences of that color pair are changed to the new definition. .PP -As an extension, ncurses allows you to set color pair \fB0\fP via -the \fBassume_default_colors\fP(3X) routine, or to specify the use of +As an extension, +\fI\%ncurses\fP allows you to set color pair \fB0\fP via the +\fB\%assume_default_colors\fP(3X) routine, or to specify the use of default colors (color number \fB\-1\fP) if you first invoke the -\fBuse_default_colors\fP(3X) routine. +\fB\%use_default_colors\fP(3X) routine. .SS init_extended_pair -.PP -Because \fBinit_pair\fP uses signed \fBshort\fPs for its parameters, -that limits color-pairs and color-values +Because \fB\%init_pair\fP uses signed \fBshort\fPs for its parameters, +that limits color pairs and color-values to 32767 on modern hardware. -The extension \fBinit_extended_pair\fP uses \fBint\fPs -for the color-pair and color-value, +The extension \fB\%init_extended_pair\fP uses \fBint\fPs +for the color pair and color-value, allowing a larger number of colors to be supported. .SS init_color -.PP -The \fBinit_color\fP routine changes the definition of a color. +The \fB\%init_color\fP routine changes the definition of a color. It takes four arguments: the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). .bP -The first argument must be a legal color value; +The first argument must be a valid color value; default colors are not allowed here. -(See the section \fBColors\fP for the default color index.) +(See the section \fB\%Colors\fP for the default color index.) .bP Each of the last three arguments must be a value in the range \fB0\fP through \fB1000\fP. .PP -When \fBinit_color\fP is used, all +When \fB\%init_color\fP is used, all occurrences of that color on the screen immediately change to the new definition. .SS init_extended_color -.PP -Because \fBinit_color\fP uses signed \fBshort\fPs for its parameters, +Because \fB\%init_color\fP uses signed \fBshort\fPs for its parameters, that limits color-values and their red, green, and blue components to 32767 on modern hardware. -The extension \fBinit_extended_color\fP uses \fBint\fPs +The extension \fB\%init_extended_color\fP uses \fBint\fPs for the color value and for setting the red, green, and blue components, allowing a larger number of colors to be supported. .SS color_content -.PP -The \fBcolor_content\fP routine gives programmers a way to find the intensity +The \fB\%color_content\fP routine gives programmers a way to find the intensity of the red, green, and blue (RGB) components in a color. It requires four arguments: the color number, and three addresses of \fBshort\fRs for storing the information about the amounts of red, green, and blue components in the given color. .bP -The first argument must be a legal color value, i.e., -\fB0\fP through \fBCOLORS\-1\fP, inclusive. +The first argument must be a valid color value, i.e., +\fB0\fP through \fB\%COLORS\-1\fP, inclusive. .bP The values that are stored at the addresses pointed to by the last three arguments are in the range \fB0\fP (no component) through \fB1000\fP (maximum amount of component), inclusive. .SS extended_color_content -.PP -Because \fBcolor_content\fP uses signed \fBshort\fPs for its parameters, +Because \fB\%color_content\fP uses signed \fBshort\fPs for its parameters, that limits color-values and their red, green, and blue components to 32767 on modern hardware. -The extension \fBextended_color_content\fP uses \fBint\fPs +The extension \fB\%extended_color_content\fP uses \fBint\fPs for the color value and for returning the red, green, and blue components, allowing a larger number of colors to be supported. .SS pair_content -.PP -The \fBpair_content\fP routine allows programmers to find out what colors a -given color-pair consists of. -It requires three arguments: the color-pair +The \fB\%pair_content\fP routine allows programmers to find out what colors a +given color pair consists of. +It requires three arguments: the color pair number, and two addresses of \fBshort\fRs for storing the foreground and the background color numbers. .bP -The first argument must be a legal color value, -i.e., in the range \fB1\fP through \fBCOLOR_PAIRS\-1\fP, inclusive. +The first argument must be a valid color value, +i.e., in the range \fB1\fP through \fB\%COLOR_PAIRS\-1\fP, inclusive. .bP The values that are stored at the addresses pointed to by the second and third arguments are in the -range \fB0\fP through \fBCOLORS\fP, inclusive. +range \fB0\fP through \fB\%COLORS\fP, inclusive. .SS extended_pair_content -.PP -Because \fBpair_content\fP uses signed \fBshort\fPs for its parameters, -that limits color-pair and color-values to 32767 on modern hardware. -The extension \fBextended_pair_content\fP uses \fBint\fPs +Because \fB\%pair_content\fP uses signed \fBshort\fPs for its parameters, +that limits color pair and color-values to 32767 on modern hardware. +The extension \fB\%extended_pair_content\fP uses \fBint\fPs for the color pair and for returning the foreground and background colors, allowing a larger number of colors to be supported. .SS reset_color_pairs -.PP -The extension \fBreset_color_pairs\fP tells ncurses to discard all -of the color-pair information which was set with \fBinit_pair\fP. +The extension \fB\%reset_color_pairs\fP tells \fI\%ncurses\fP to discard +all of the color pair information which was set with \fB\%init_pair\fP. It also touches the current- and standard-screens, allowing an application to switch color palettes rapidly. -.SS PAIR_NUMBER -.PP -\fBPAIR_NUMBER(\fP\fIattrs\fP) extracts the color -value from its \fIattrs\fP parameter and returns it as a color pair number. .SS COLOR_PAIR -Its inverse \fBCOLOR_PAIR(\fP\fIn\fP\fB)\fP converts a color pair number -to an attribute. +\fB\%COLOR_PAIR(\fIn\fB)\fR converts a color pair number to an +attribute. Attributes can hold color pairs in the range 0 to 255. -If you need a color pair larger than that, you must use functions -such as \fBattr_set\fP (which pass the color pair as a separate parameter) -rather than the legacy functions such as \fBattrset\fP. +If you need a color pair larger than that, +you must use functions such as \fB\%attr_set\fP +(which pass the color pair as a separate parameter) +rather than the legacy functions such as \fB\%attrset\fP. +.SS PAIR_NUMBER +\fB\%PAIR_NUMBER(\fIattr\fR) extracts the color information from its +\fIattr\fP parameter and returns it as a color pair number; +it is the inverse operation of \fB\%COLOR_PAIR\fP. .SH RETURN VALUE -The routines \fBcan_change_color\fP and \fBhas_colors\fP return \fBTRUE\fP +The routines \fB\%can_change_color\fP and \fB\%has_colors\fP return \fBTRUE\fP or \fBFALSE\fP. .PP All other routines return the integer \fBERR\fP upon failure and an \fBOK\fP @@ -406,24 +429,24 @@ X/Open defines no error conditions. SVr4 does document some error conditions which apply in general: .bP This implementation will return \fBERR\fP on attempts to -use color values outside the range \fB0\fP to \fBCOLORS\fP\-1 +use color values outside the range \fB0\fP to \fB\%COLORS\fP\-1 (except for the default colors extension), -or use color pairs outside the range \fB0\fP to \fBCOLOR_PAIRS\-1\fP. +or use color pairs outside the range \fB0\fP to \fB\%COLOR_PAIRS\-1\fP. .IP -Color values used in \fBinit_color\fP must be +Color values used in \fB\%init_color\fP must be in the range \fB0\fP to \fB1000\fP. .IP An error is returned from all functions if the terminal has not been initialized. .IP -An error is returned from secondary functions such as \fBinit_pair\fP -if \fBstart_color\fP was not called. +An error is returned from secondary functions such as \fB\%init_pair\fP +if \fB\%start_color\fP was not called. .bP SVr4 does much the same, except that -it returns \fBERR\fP from \fBpair_content\fP if the pair was not initialized -using \fBinit_pairs\fP +it returns \fBERR\fP from \fB\%pair_content\fP if the pair was not initialized +using \fB\%init_pairs\fP and -it returns \fBERR\fP from \fBcolor_content\fP +it returns \fBERR\fP from \fB\%color_content\fP if the terminal does not support changing colors. .IP This implementation does not return \fBERR\fP for either case. @@ -431,19 +454,20 @@ This implementation does not return \fBERR\fP for either case. Specific functions make additional checks: .RS 3 .TP 5 -\fBinit_color\fP +\fB\%init_color\fP returns an error if the terminal does not support -this feature, e.g., if the \fBinitialize_color\fP capability is absent +this feature, e.g., if the \fB\%initialize_color\fP capability is absent from the terminal description. .TP 5 -\fBstart_color\fP +\fB\%start_color\fP returns an error if the color table cannot be allocated. .RE .SH NOTES -In the \fBncurses\fP implementation, there is a separate color activation flag, +In the \fI\%ncurses\fP implementation, +there is a separate color activation flag, color palette, color pairs table, -and associated \fBCOLORS\fP and \fBCOLOR_PAIRS\fP counts -for each screen; the \fBstart_color\fP function only affects the current +and associated \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP counts +for each screen; the \fB\%start_color\fP function only affects the current screen. The SVr4/XSI interface is not really designed with this in mind, and historical implementations may use a single shared color palette. @@ -452,7 +476,7 @@ Setting an implicit background color via a color pair affects only character cells that a character write operation explicitly touches. To change the background color used when parts of a window are blanked by erasing or -scrolling operations, see \fBcurs_bkgd\fP(3X). +scrolling operations, see \fB\%curs_bkgd\fP(3X). .PP Several caveats apply on older x86 machines (e.g., i386, i486) with VGA-compatible graphics: @@ -467,20 +491,61 @@ Paradise and compatibles) do the wrong thing when you try to set a bright \*(``yellow\*('' background (you get a blinking yellow foreground instead). .bP Color RGB values are not settable. -.SH HISTORY +.SH EXTENSIONS +The functions marked as extensions were designed for +\fB\%ncurses\fP(3X), +and are not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous curses implementation. +.SH PORTABILITY +Applications employing +.I \%ncurses +extensions should condition their use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. +.PP +This implementation satisfies X/Open Curses's minimum maximums +for \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP. +.PP +The \fB\%init_pair\fP routine accepts negative values of foreground +and background color to support the \fB\%use_default_colors\fP(3X) extension, +but only if that routine has been first invoked. +.PP +The assumption that \fB\%COLOR_BLACK\fP is the default +background color for all terminals can be modified using the +\fB\%assume_default_colors\fP(3X) extension. +.PP +This implementation checks the pointers, +e.g., for the values returned by +\fB\%color_content\fP and \fB\%pair_content\fP, +and will treat those as optional parameters when null. .PP +X/Open Curses does not specify a limit for the number of colors and +color pairs which a terminal can support. +However, in its use of \fBshort\fP for the parameters, +it carries over SVr4's implementation detail for the compiled +terminfo database, which uses signed 16-bit numbers. +This implementation provides extended versions of those functions +which use \fBshort\fP parameters, +allowing applications to use larger color- and pair-numbers. +.PP +The \fB\%reset_color_pairs\fP function is an extension of +\fI\%ncurses\fP. +.SH HISTORY SVr3.2 introduced color support to curses in 1987. .PP SVr4 made internal changes, e.g., moving the storage for the color state -from \fBSP\fP (the \fBSCREEN\fP structure) -to \fBcur_term\fP (the \fBTERMINAL\fP structure), +from \fBSP\fP (the \fISCREEN\fP structure) +to \fB\%cur_term\fP (the \fI\%TERMINAL\fP structure), but provided the same set of library functions. .PP 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 \fBchtype\fP data type (denoted by \fBA_COLOR\fP). +in the \fB\%chtype\fP data type (denoted by \fB\%A_COLOR\fP). .PP Other implementations of curses had different limits: .bP @@ -488,63 +553,37 @@ PCCurses (1987-1990) provided for only eight (8) colors. .bP PDCurses (1992-present) inherited the 8-color limitation from PCCurses, but changed this to 256 in version 2.5 (2001), -along with changing \fBchtype\fP from 16-bits to 32-bits. +along with changing \fB\%chtype\fP from 16-bits to 32-bits. .bP X/Open Curses (1992-present) -added a new structure \fBcchar_t\fP to store the character, -attributes and color-pair values, allowing increased range of color-pairs. -Both color-pairs and color-values used a signed \fBshort\fP, +added a new structure \fB\%cchar_t\fP to store the character, +attributes and color pair values, allowing increased range of color pairs. +Both color pairs and color-values used a signed \fBshort\fP, limiting values to 15 bits. .bP -ncurses (1992-present) uses eight bits for \fBA_COLOR\fP in \fBchtype\fP values. +\fI\%ncurses\fP (1992-present) uses eight bits +for \fB\%A_COLOR\fP in \fB\%chtype\fP values. .IP Version 5.3 provided a wide-character interface (2002), -but left color-pairs as part of the attributes-field. +but left color pairs as part of the attributes-field. .IP Since version 6 (2015), -ncurses uses a separate \fBint\fP for color-pairs in the \fBcchar_t\fP values. -When those color-pair values fit in 8 bits, -ncurses allows color-pairs to be manipulated -via the functions using \fBchtype\fP values. +ncurses uses a separate \fBint\fP for color pairs in the \fB\%cchar_t\fP values. +When those color pair values fit in 8 bits, +ncurses allows color pairs to be manipulated +via the functions using \fB\%chtype\fP values. .bP NetBSD curses used 6 bits from 2000 (when colors were first supported) 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 \fBcchar_t\fP, limiting the number of color-pairs +Like \fI\%ncurses\fP before version 6, +the NetBSD color pair information is stored in +the attributes field of \fB\%cchar_t\fP, limiting the number of color pairs by the size of the bitfield. -.SH PORTABILITY -This implementation satisfies XSI Curses's minimum maximums -for \fBCOLORS\fP and \fBCOLOR_PAIRS\fP. -.PP -The \fBinit_pair\fP routine accepts negative values of foreground -and background color to support the \fBuse_default_colors\fP(3X) extension, -but only if that routine has been first invoked. -.PP -The assumption that \fBCOLOR_BLACK\fP is the default -background color for all terminals can be modified using the -\fBassume_default_colors\fP(3X) extension. -.PP -This implementation checks the pointers, -e.g., for the values returned by -\fBcolor_content\fP and \fBpair_content\fP, -and will treat those as optional parameters when null. -.PP -X/Open Curses does not specify a limit for the number of colors and -color pairs which a terminal can support. -However, in its use of \fBshort\fP for the parameters, -it carries over SVr4's implementation detail for the compiled -terminfo database, which uses signed 16-bit numbers. -This implementation provides extended versions of those functions -which use \fBshort\fP parameters, -allowing applications to use larger color- and pair-numbers. -.PP -The \fBreset_color_pairs\fP function is an extension of ncurses. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_attr\fP(3X), -\fBcurs_variables\fP(3X), -\fBdefault_colors\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_attr\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%default_colors\fP(3X) diff --git a/man/curs_delch.3x b/man/curs_delch.3x index bc206de6..e62ecc13 100644 --- a/man/curs_delch.3x +++ b/man/curs_delch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,50 +27,87 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_delch.3x,v 1.17 2021/12/25 21:49:32 tom Exp $ -.TH curs_delch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_delch.3x,v 1.34 2024/04/20 19:24:14 tom Exp $ +.TH curs_delch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBdelch\fP, -\fBwdelch\fP, -\fBmvdelch\fP, -\fBmvwdelch\fP \- delete character under the cursor in a \fBcurses\fP window +\fB\%delch\fP, +\fB\%wdelch\fP, +\fB\%mvdelch\fP, +\fB\%mvwdelch\fP \- +delete a character from a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint delch(void);\fP -.br -\fBint wdelch(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint mvdelch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBint mvwdelch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint delch(void); +\fBint wdelch(WINDOW *\fIwin\fP); +\fBint mvdelch(int \fIy\fP, int \fIx\fP); +\fBint mvwdelch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +.fi .SH DESCRIPTION -These routines delete the character under the cursor; all characters to the -right of the cursor on the same line are moved to the left one position and the -last character on the line is filled with a blank. -The cursor position does -not change (after moving to \fIy\fP, \fIx\fP, if specified). -(This does not -imply use of the hardware delete character feature.) +.B \%wdelch +deletes the character at the cursor position in +.IR win . +\fB\%ncurses\fP(3X) describes the variants of this function. +.PP +.B \%wdelch +moves all characters to the right of the cursor on the same line to the +left one position and replaces the contents of the rightmost position on +the line with the window's blank character; +see \fB\%bkgd\fP(3X) +(wide-character API users may consult \fB\%bkgrnd\fP(3X) instead). +The cursor position does not change +(after moving to +.RI ( y , +.IR x ), +if specified). .SH RETURN VALUE -All routines return the integer \fBERR\fP upon failure and an \fBOK\fP (SVr4 -specifies only "an integer value other than \fBERR\fP") upon successful -completion. +These functions return +.B OK +on success and +.B ERR +on failure. +.PP +Functions taking a +.I \%WINDOW +pointer argument fail if the pointer is +.BR NULL . .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that \fBdelch\fP, \fBmvdelch\fP, and \fBmvwdelch\fP may be macros. +.BR \%delch , +.BR \%mvdelch , +and +.B \%mvwdelch +may be implemented as macros. +.PP +A terminal's +.B \%delete_character +.RB ( dch1 ) +capability +is not necessarily employed. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -The -standard specifies that they return \fBERR\fP on failure, but specifies no -error conditions. +X/Open Curses, +Issue 4 describes these functions. +.PP +SVr4 +.I curses +describes a successful return value only as +\*(``an integer value other than +.BR ERR \*(''. .SH SEE ALSO -\fBcurses\fP(3X) +\fB\%curses\fP(3X) diff --git a/man/curs_deleteln.3x b/man/curs_deleteln.3x index 7a3916f3..6d70a435 100644 --- a/man/curs_deleteln.3x +++ b/man/curs_deleteln.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,30 +27,40 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_deleteln.3x,v 1.19 2021/12/25 21:41:58 tom Exp $ -.TH curs_deleteln 3X "" +.\" $Id: curs_deleteln.3x,v 1.38 2024/04/20 21:20:07 tom Exp $ +.TH curs_deleteln 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .SH NAME -\fBdeleteln\fP, -\fBwdeleteln\fP, -\fBinsdelln\fP, -\fBwinsdelln\fP, -\fBinsertln\fP, -\fBwinsertln\fP \- delete and insert lines in a \fBcurses\fP window +\fB\%deleteln\fP, +\fB\%wdeleteln\fP, +\fB\%insdelln\fP, +\fB\%winsdelln\fP, +\fB\%insertln\fP, +\fB\%winsertln\fP \- +delete or insert lines in a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint deleteln(void);\fP -.br -\fBint wdeleteln(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint insdelln(int \fP\fIn\fP\fB);\fP -.br -\fBint winsdelln(WINDOW *\fP\fIwin\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint insertln(void);\fP -.br -\fBint winsertln(WINDOW *\fP\fIwin\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint deleteln(void); +\fBint wdeleteln(WINDOW *\fIwin\fP); +.PP +\fBint insdelln(int \fIn\fP); +\fBint winsdelln(WINDOW *\fIwin\fP, int \fIn\fP); +.PP +\fBint insertln(void); +\fBint winsertln(WINDOW *\fIwin\fP); +.fi .SH DESCRIPTION The \fBdeleteln\fP and \fBwdeleteln\fP routines delete the line under the cursor in the window; all lines below the current line are moved up one line. @@ -70,18 +80,14 @@ The current cursor position remains the same. The \fBinsertln\fP and \fBwinsertln\fP routines insert a blank line above the current line and the bottom line is lost. .SH RETURN VALUE -All routines return the integer \fBERR\fP upon failure and an \fBOK\fP (SVr4 -specifies only "an integer value other than \fBERR\fP") upon successful -completion. +These routines return the integer \fBERR\fP upon failure and an \fBOK\fP +(SVr4 specifies only +\*(``an integer value other than \fBERR\fP\*('') +upon successful completion. .PP X/Open defines no error conditions. In this implementation, if the window parameter is null, an error is returned. -.SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -The -standard specifies that they return \fBERR\fP on failure, but specifies no -error conditions. .SH NOTES Note that all but \fBwinsdelln\fP may be macros. .PP @@ -89,5 +95,10 @@ 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 \fBidlok(..., TRUE)\fP has been set on the current window. +.SH PORTABILITY +These functions are described in X/Open Curses, Issue 4. +The +standard specifies that they return \fBERR\fP on failure, but specifies no +error conditions. .SH SEE ALSO -\fBcurses\fP(3X) +\fB\%curses\fP(3X) diff --git a/man/curs_extend.3x b/man/curs_extend.3x index 5ad90dd2..01cf9d2e 100644 --- a/man/curs_extend.3x +++ b/man/curs_extend.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1999-2010,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,27 +29,33 @@ .\" .\" Author: Thomas E. Dickey 1999-on .\" -.\" $Id: curs_extend.3x,v 1.27 2021/12/25 17:39:16 tom Exp $ -.TH curs_extend 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_extend.3x,v 1.46 2024/03/16 15:35:01 tom Exp $ +.TH curs_extend 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBcurses_version\fP, -\fBuse_extended_names\fP \- miscellaneous curses extensions -. +\fB\%curses_version\fP, +\fB\%use_extended_names\fP \- +miscellaneous \fIcurses\fR extensions .SH SYNOPSIS -\fB#include \fP -.sp -\fBconst char * curses_version(void);\fP -.br -\fBint use_extended_names(bool \fP\fIenable\fP\fB);\fP +.nf +\fB#include +.PP +\fBconst char * curses_version(void); +\fBint use_extended_names(bool \fIenable\fP); +.fi .SH DESCRIPTION These functions are extensions to the curses library which do not fit easily into other categories. .SS curses_version -.PP Use \fBcurses_version\fP to get the version number, including patch level of the library, prefixed by \*(``ncurses\*('', e.g., @@ -58,7 +64,6 @@ prefixed by \*(``ncurses\*('', e.g., .B ncurses 5.0.19991023 .RE .SS use_extended_names -.PP The \fBuse_extended_names\fP function controls whether the calling application is able to use user-defined or nonstandard names @@ -70,28 +75,34 @@ extended terminal definitions. However you can disable this feature to ensure compatibility with other implementations of curses. .SH RETURN VALUE -.PP \fBcurses_version\fP returns a pointer to static memory; you should not free this in your application. .PP \fBuse_extended_names\fP returns the previous state, allowing you to save this and restore it. +.SH EXTENSIONS +These functions are \fB\%ncurses\fP(3X) extensions, +and are not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous curses implementation. .SH PORTABILITY -These routines are specific to ncurses. -They were not supported on -Version 7, BSD or System V implementations. -It is recommended that -any code depending on them be conditioned using NCURSES_VERSION. -.SH SEE ALSO -\fBcurs_getch\fP(3X), -\fBcurs_mouse\fP(3X), -\fBcurs_print\fP(3X), -\fBcurs_util\fP(3X), -\fBdefault_colors\fP(3X), -\fBdefine_key\fP(3X), -\fBkeybound\fP(3X), -\fBkeyok\fP(3X), -\fBresizeterm\fP(3X), -\fBwresize\fP(3X). -.SH AUTHOR +Applications employing +.I \%ncurses +extensions should condition their use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. +.SH AUTHORS Thomas Dickey. +.SH SEE ALSO +\fB\%curs_getch\fP(3X), +\fB\%curs_mouse\fP(3X), +\fB\%curs_print\fP(3X), +\fB\%curs_util\fP(3X), +\fB\%default_colors\fP(3X), +\fB\%define_key\fP(3X), +\fB\%keybound\fP(3X), +\fB\%keyok\fP(3X), +\fB\%resizeterm\fP(3X), +\fB\%wresize\fP(3X) diff --git a/man/curs_get_wch.3x b/man/curs_get_wch.3x index 2dec02e3..02932b91 100644 --- a/man/curs_get_wch.3x +++ b/man/curs_get_wch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,168 +27,233 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wch.3x,v 1.16 2021/12/25 17:39:16 tom Exp $ -.TH curs_get_wch 3X "" -.na -.hy 0 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_get_wch.3x,v 1.40 2024/04/20 19:23:03 tom Exp $ +.TH curs_get_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBget_wch\fP, -\fBwget_wch\fP, -\fBmvget_wch\fP, -\fBmvwget_wch\fP, -\fBunget_wch\fP \- get (or push back) a wide character from curses terminal keyboard -.ad -.hy +\fB\%get_wch\fP, +\fB\%wget_wch\fP, +\fB\%mvget_wch\fP, +\fB\%mvwget_wch\fP, +\fB\%unget_wch\fP \- +get (or push back) a wide character from \fIcurses\fR terminal keyboard .SH SYNOPSIS -\fB#include \fP -.sp -\fBint get_wch(wint_t *\fP\fIwch\fP\fB);\fP -.br -\fBint wget_wch(WINDOW *\fP\fIwin\fP\fB, wint_t *\fP\fIwch\fP\fB);\fP -.br -\fBint mvget_wch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wint_t *\fP\fIwch\fP\fB);\fP -.br -\fBint mvwget_wch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wint_t *\fP\fIwch\fP\fB);\fP -.sp -\fBint unget_wch(const wchar_t \fP\fIwch\fP\fB);\fP +.nf +\fB#include +.PP +\fBint get_wch(wint_t *\fIwch\fP); +\fBint wget_wch(WINDOW *\fIwin\fP, wint_t *\fIwch\fP); +\fBint mvget_wch(int \fIy\fP, int \fIx\fP, wint_t *\fIwch\fP); +\fBint mvwget_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wint_t *\fIwch\fP); +.PP +\fBint unget_wch(const wchar_t \fIwc\fP); +.fi .SH DESCRIPTION -.SS wget_wch -The -\fBget_wch\fP, -\fBwget_wch\fP, -\fBmvget_wch\fP, and -\fBmvwget_wch\fP -functions read a character -from the terminal associated with the current or specified window. -In no-delay mode, -if no input is waiting, the value \fBERR\fP is returned. -In delay mode, -the program waits until the system passes text through to the program. -Depending on the setting of \fBcbreak\fP, -this is after one character (cbreak mode), -or after the first newline (nocbreak mode). -In half-delay mode, -the program waits until the user types a character or the specified -timeout interval has elapsed. +.SS "Reading Characters" +.B \%wget_wch +gathers a key stroke +.I wch +from the terminal keyboard associated with a +.I curses +window +.IR win , +returning +.B OK +if a wide character is read, +.B \%KEY_CODE_YES +if a function key is read, +and +.B ERR +if no key event is available. +\fB\%ncurses\fP(3X) describes the variants of this function. .PP -Unless \fBnoecho\fP has been set, -these routines echo the character into the designated window. +When input is pending, +.B \%wget_wch +stores an integer +identifying the key stroke in +.IR wch ; +for alphanumeric and punctuation keys, +this value corresponds to the character encoding used by the terminal. +Use of the control key as a modifier often results in a distinct code. +The behavior of other keys depends on whether +.I win +is in keypad mode; +see subsections \*(``Keypad Mode\*('' and \*(``Predefined Key Codes\*('' +in \fB\%getch\fP(3X). .PP -If the window is not a pad and has been moved or modified since the -last call to \fBwrefresh\fP, -\fBwrefresh\fP will be called before another character is read. +If no input is pending, +then if the no-delay flag is set in the window +(see \fB\%nodelay\fP(3X)), +the function returns +.BR ERR ; +otherwise, +.I curses +waits until the terminal has input. +If \fB\%cbreak\fP(3X) +has been called, +this happens after one character is read. +If \fB\%nocbreak\fP(3X) +has been called, +it occurs when the next newline is read. +If \fB\%halfdelay\fP(3X) +has been called, +.I curses +waits until a character is typed or the specified delay elapses. .PP -If \fBkeypad\fP is enabled, -these functions respond to -the pressing of a function key by setting the object pointed to by -\fIwch\fP -to the keycode assigned to the function key, -and returning \fBKEY_CODE_YES\fP. -If a character (such as escape) that could be the -beginning of a function key is received, curses sets a timer. -If the remainder -of the sequence does arrive within the designated time, curses passes through -the character; otherwise, curses returns the function key value. -For this -reason, many terminals experience a delay between the time a user presses -the escape key and the time the escape is returned to the program. +If \fB\%echo\fP(3X) has been called, +and the window is not a pad, +.I curses +writes +.I wch +to the window +(at the cursor position) +per the following rules. +.bP +If +.I wch +matches the terminal's erase character, +the cursor moves leftward one position +and the new position is erased +as if \fB\%wmove\fP(3X) and then \fB\%wdelch\fP(3X) were called. +When the window's keypad mode is enabled +(see below), +.B \%KEY_LEFT +and +.B \%KEY_BACKSPACE +are handled the same way. +.bP +.I curses +writes any other +.I wch +to the window, +as with \fB\%wecho_wchar\fP(3X). +.bP +If the window has been moved or modified since the last call to +\fB\%wrefresh\fP(3X), +.I curses +calls +.BR \%wrefresh . .PP -The keycodes returned by these functions are the same as those -returned by \fBwgetch\fP: +If +.I wch +is a carriage return and \fBnl\fP(3X) has been called, +.B \%wgetch +stores the the character code for newline +(line feed) +in +.I wch +instead. +.SS "Ungetting Characters" +.B \%unget_wch +places +.I wch +into the input queue to be returned by the next call to +.BR \%wget_wch . +A single input queue serves all windows. +.SH RETURN VALUE +.B \%wget_wch +returns +.B OK +when it reads a wide character and +.B \%KEY_CODE_YES +when it reads a function key code. +It returns +.B ERR +if .bP -The predefined function -keys are listed in \fB\fP as macros with values outside the range -of 8-bit characters. -Their names begin with \fBKEY_\fP. +the +.I \%WINDOW +pointer is +.BR NULL , +or .bP -Other (user-defined) function keys -which may be defined using \fBdefine_key\fP(3X) have no names, -but also are expected to have values outside the range of 8-bit characters. -.SS unget_wch -The -\fBunget_wch\fP -function pushes the wide character -\fIwch\fP -back onto the head of the input queue, so the wide character -is returned by the next call to -\fBget_wch\fP. -The pushback of -one character is guaranteed. -If the program calls -\fBunget_wch\fP -too many times without an intervening call to -\fBget_wch\fP, -the operation may fail. +its timeout expires without any data arriving, +or +.bP +execution was interrupted by a signal, +in which case +.B \%errno +is set to +.BR \%EINTR . +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .PP -Unlike \fBungetch\fP and \fBwgetch\fP, -\fBunget_wch\fP cannot distinguish special characters -returned by \fBwget_wch\fP from ordinary characters. -An application can push special keys -which it may read via \fBwget_wch\fP -by checking for the \fBKEY_CODE_YES\fP result, -and using \fBungetch\fP for those special keys. +.B \%unget_wch +returns +.B OK +on success and +.B ERR +if there is no more room in the input queue. .SH NOTES -The header file -\fB\fP -automatically -includes the header file -\fB\fP. +See the \*(``NOTES\*('' section of \fB\%wgetch\fP(3X). .PP -Applications should not define the escape key by itself as a single-character -function. +All of these functions except +.B \%wget_wch +and +.B \%unget_wch +may be implemented as macros. .PP -When using -\fBget_wch\fP, -\fBwget_wch\fP, -\fBmvget_wch\fP, or -\fBmvwget_wch\fP, applications should -not use -\fBnocbreak\fP -mode and -\fBecho\fP -mode -at the same time. -Depending on the state of the tty driver when each character -is typed, the program may produce undesirable results. +Unlike \fB\%wgetch\fP(3X), +.B \%wget_wch +and its variants store the value of the input character in an additional +.I wch +parameter instead of the return value. .PP -All functions except \fBwget_wch\fP and \fBunget_wch\fP -may be macros. -.SH RETURN VALUE -When -\fBget_wch\fP, -\fBwget_wch\fP, -\fBmvget_wch\fP, and -\fBmvwget_wch\fP -functions successfully -report the pressing of a function key, they return -\fBKEY_CODE_YES\fP. -When they successfully report a wide character, they return -\fBOK\fP. -Otherwise, they return -\fBERR\fP. +Unlike +.BR \%ungetch , +.B \%unget_wch +cannot distinguish function key codes +.B \%wget_wch +from conventional character codes. +An application can overcome this limitation by pushing function key +codes with +.B \%ungetch +and subsequently checking the return value of +.B \%wget_wch +for a match with +.BR \%KEY_CODE_YES . +.SH EXTENSIONS +See the \*(``EXTENSIONS\*('' section of \fB\%wgetch\fP(3X). +.SH PORTABILITY +Applications employing +.I \%ncurses +extensions should condition their use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. .PP -Upon successful completion, -\fBunget_wch\fP -returns -\fBOK\fP. -Otherwise, the function returns -\fBERR\fP. +X/Open Curses, +Issue 4 describes these functions. +It specifies no error conditions for them. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +See the \*(``PORTABILITY\*('' section of \fB\%wgetch\fP(3X) regarding +the interaction of +.B \%wget_wch +with signal handlers. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_getch\fP(3X), -\fBcurs_ins_wch\fP(3X), -\fBcurs_inopts\fP(3X), -\fBcurs_move\fP(3X), -\fBcurs_refresh\fP(3X) +\fB\%curs_getch\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. +.PP +\fB\%curses\fP(3X), +\fB\%curs_add_wch\fP(3X), +\fB\%curs_inopts\fP(3X), +\fB\%curs_move\fP(3X), +\fB\%curs_refresh\fP(3X) diff --git a/man/curs_get_wstr.3x b/man/curs_get_wstr.3x index 07ceb354..32ae541a 100644 --- a/man/curs_get_wstr.3x +++ b/man/curs_get_wstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,97 +27,90 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wstr.3x,v 1.25 2021/12/25 21:49:32 tom Exp $ -.TH curs_get_wstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_get_wstr.3x,v 1.48 2024/04/20 19:18:18 tom Exp $ +.TH curs_get_wstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBget_wstr\fP, -\fBgetn_wstr\fP, -\fBwget_wstr\fP, -\fBwgetn_wstr\fP, -\fBmvget_wstr\fP, -\fBmvgetn_wstr\fP, -\fBmvwget_wstr\fP, -\fBmvwgetn_wstr\fP \- get an array of wide characters from a curses terminal keyboard -.ad -.hy +\fB\%get_wstr\fP, +\fB\%getn_wstr\fP, +\fB\%wget_wstr\fP, +\fB\%wgetn_wstr\fP, +\fB\%mvget_wstr\fP, +\fB\%mvgetn_wstr\fP, +\fB\%mvwget_wstr\fP, +\fB\%mvwgetn_wstr\fP \- +get a wide-character string from a \fIcurses\fR terminal keyboard .SH SYNOPSIS .nf -\fB#include \fP -.sp -\fBint get_wstr(wint_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint getn_wstr(wint_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint wget_wstr(WINDOW *\fP\fIwin\fP\fB, wint_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint wgetn_wstr(WINDOW *\fP\fIwin\fP\fB, wint_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvget_wstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wint_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvgetn_wstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wint_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwget_wstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wint_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvwgetn_wstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wint_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP +\fB#include +.PP +\fBint get_wstr(wint_t *\fIwstr\fP); +\fBint getn_wstr(wint_t *\fIwstr\fP, int \fIn\fP); +\fBint wget_wstr(WINDOW *\fIwin\fP, wint_t *\fIwstr\fP); +\fBint wgetn_wstr(WINDOW *\fIwin\fP, wint_t *\fIwstr\fP, int \fIn\fP); +.PP +\fBint mvget_wstr(int \fIy\fP, int \fIx\fP, wint_t *\fIwstr\fP); +\fBint mvgetn_wstr(int \fIy\fP, int \fIx\fP, wint_t *\fIwstr\fP, int \fIn\fP); +\fBint mvwget_wstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wint_t *\fIwstr\fP); +\fBint mvwgetn_wstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wint_t *\fIwstr\fP, int \fIn\fP); .fi .SH DESCRIPTION -The effect of -\fBget_wstr\fP -is as though a series of calls -to -\fBget_wch\fP(3X) -were made, until a newline, other end-of-line, -or end-of-file condition is processed. +The function +\fBwgetn_wstr\fP +is equivalent to a series of calls to +\fBwget_wch\fP(3X) +until a newline or carriage return terminates the series: +.bP +The terminating character is not included in the returned string. +.bP An end-of-file condition is represented by \fBWEOF\fP, as defined in \fB\fP. -The newline and end-of-line conditions are represented -by the \fB\\n\fP \fBwchar_t\fP value. -In all instances, the end of the string is terminated by a null \fBwchar_t\fP. -The routine places resulting values in the area pointed to by \fIwstr\fP. +.bP +In all instances, the end of the string is terminated +by a null \fBwchar_t\fP. +.bP +The function stores the result in the area pointed to +by the \fIwstr\fP parameter. +.bP +The function reads at most \fIn\fP characters, +thus preventing a possible overflow of the input buffer. +.IP +Any attempt to enter more characters +(other than the terminating newline or carriage return) +causes a beep. +.IP +Function keys also cause a beep and are ignored. .PP -The user's erase and kill characters are interpreted. -If keypad -mode is on for the window, \fBKEY_LEFT\fP and \fBKEY_BACKSPACE\fP -are both considered equivalent to the user's kill character. +The user's \fIerase\fP and \fIkill\fP characters are interpreted: +.bP +The \fIerase\fP character (e.g., \fB^H\fP) erases the character +at the end of the buffer, moving the cursor to the left. +.IP +If \fIkeypad\fP mode is on for the window, +\fBKEY_LEFT\fP and \fBKEY_BACKSPACE\fP +are both considered equivalent to the user's \fIerase\fP character. +.bP +The \fIkill\fP character (e.g., \fB^U\fP) erases the entire buffer, +leaving the cursor at the beginning of the buffer. .PP Characters input are echoed only if \fBecho\fP is currently on. In that case, -backspace is echoed as deletion of the previous character (typically a left -motion). -.PP -The effect of -\fBwget_wstr\fP -is as though a series of -calls to -\fBwget_wch\fP -were made. -.PP -The effect of -\fBmvget_wstr\fP -is as though a call to -\fBmove\fP -and then a series of calls to -\fBget_wch\fP -were -made. -.PP -The effect of -\fBmvwget_wstr\fP -is as though a call to -\fBwmove\fP -and then a series of calls to -\fBwget_wch\fP -were made. +backspace is echoed as deletion of the previous character +(typically a left motion). .PP The \fBgetn_wstr\fP, @@ -137,7 +130,33 @@ versions read at most \fIn\fP characters, letting the application prevent overflow of the input buffer. +.SH RETURN VALUE +All of these functions return the integer \fBOK\fP upon successful completion. +If unsuccessful, they return \fBERR\fP. +.PP +X/Open defines no error conditions. +.PP +In this implementation, +these functions return an error +.bP +if the window pointer is null, +.bP +if its timeout expires without having any data, or +.bP +if the associated call to +\fBwget_wch\fP +failed. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES +Any of these functions other than +\fBwgetn_wstr\fP +may be macros. +.PP Using \fBget_wstr\fP, \fBmvget_wstr\fP, @@ -152,29 +171,15 @@ The use of \fBgetn_wstr\fP, \fBmvgetn_wstr\fP, \fBmvwgetn_wstr\fP, or -\fBwgetn_wstr\fP, respectively, is recommended. +\fBwgetn_wstr\fP, +respectively, is recommended. .PP These functions cannot return \fBKEY_\fP values because there is no way to distinguish a \fBKEY_\fP value from a valid \fBwchar_t\fP value. -.PP -All of these routines except \fBwgetn_wstr\fP may be macros. -.SH RETURN VALUE -All of these functions return \fBOK\fP upon successful completion. -Otherwise, they return \fBERR\fP. -.PP -Functions using a window parameter return an error if it is null. -.RS -.TP 5 -\fBwgetn_wstr\fP -returns an error if the associated call to \fBwget_wch\fP failed. -.RE -.PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. .SH PORTABILITY These functions are described in The Single Unix Specification, Version 2. No error conditions are defined. +.PP This implementation returns \fBERR\fP if the window pointer is null, or if the lower-level \fBwget_wch\fP call returns an \fBERR\fP. In the latter case, @@ -195,7 +200,7 @@ while \fBwchar_t\fP is a unsigned type. All of the vendors implement this using \fBwint_t\fP, following the standard. .PP X/Open Curses, Issue 7 (2009) is unclear regarding whether -the terminating \fInull \fP\fBwchar_t\fP +the terminating \fInull \fBwchar_t\fR value is counted in the length parameter \fIn\fP. X/Open Curses, Issue 7 revised the corresponding description of \fBwgetnstr\fP to address this issue. @@ -205,15 +210,17 @@ This implementation counts the terminator in the length. X/Open Curses does not specify what happens if the length \fIn\fP is negative. .bP For analogy with \fBwgetnstr\fP, -ncurses 6.2 uses a limit (based on \fBLINE_MAX\fP). +\fI\%ncurses\fP 6.2 uses a limit (based on \fBLINE_MAX\fP). .bP Some other implementations (such as Solaris xcurses) do the same, while others (PDCurses) do not allow this. .bP -NetBSD 7 curses imitates ncurses 6.1 in this regard, +NetBSD 7 curses imitates \fI\%ncurses\fP 6.1 in this regard, treating a \fB\-1\fP as an indefinite number of characters. .SH SEE ALSO -Functions: -\fBcurses\fP(3X), -\fBcurs_get_wch\fP(3X), -\fBcurs_getstr\fP(3X). +\fB\%curs_getstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. +.PP +\fB\%curses\fP(3X), +\fB\%curs_get_wch\fP(3X) diff --git a/man/curs_getcchar.3x b/man/curs_getcchar.3x index 46d36110..523cc99d 100644 --- a/man/curs_getcchar.3x +++ b/man/curs_getcchar.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2001-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,73 +27,64 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getcchar.3x,v 1.27 2021/12/25 20:35:03 tom Exp $ -.TH curs_getcchar 3X "" +.\" $Id: curs_getcchar.3x,v 1.49 2024/04/20 18:55:09 tom Exp $ +.TH curs_getcchar 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBgetcchar\fP, -\fBsetcchar\fP \- Get a wide character string and rendition from a \fBcchar_t\fP or set a \fBcchar_t\fP from a wide-character string +\fB\%getcchar\fP, +\fB\%setcchar\fP \- +convert between a wide-character string and a \fIcurses\fR complex character .SH SYNOPSIS -\fB#include \fP -.sp -\fBint getcchar(\fP -.br -.B " const cchar_t *\fIwcval\fP," -.br -.B " wchar_t *\fIwch\fP," -.br +.nf +\fB#include +.PP +\fBint getcchar( +.B " const cchar_t *\fIwch\fP," +.B " wchar_t *\fIwc\fP," .B " attr_t *\fIattrs\fP," -.br .B " short *\fIcolor_pair\fP," -.br .B " void *\fIopts\fP );" -.sp +.PP .B "int setcchar(" -.br -.B " cchar_t *\fIwcval\fP," -.br -.B " const wchar_t *\fIwch\fP," -.br +.B " cchar_t *\fIwch\fP," +.B " const wchar_t *\fIwc\fP," .B " const attr_t \fIattrs\fP," -.br .B " short \fIcolor_pair\fP," -.br .B " const void *\fIopts\fP );" +.fi .SH DESCRIPTION .SS getcchar -.PP The \fBgetcchar\fP function gets a wide-character string and rendition from a \fBcchar_t\fP argument. -When \fIwch\fP is not a null pointer, +When \fIwc\fP is not a null pointer, the \fBgetcchar\fP function does the following: .bP -Extracts information from a \fBcchar_t\fP value \fIwcval\fP +Extracts information from a \fBcchar_t\fP value \fIwch\fP .bP Stores the character attributes in the location pointed to by \fIattrs\fP .bP -Stores the color-pair in the location pointed to by \fIcolor_pair\fP +Stores the color pair in the location pointed to by \fIcolor_pair\fP .bP Stores the wide-character string, -characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP. +characters referenced by \fIwch\fP, into the array pointed to by \fIwc\fP. .PP When -\fIwch\fP +\fIwc\fP is a null pointer, the \fBgetcchar\fP function does the following: .bP -Obtains the number of wide characters pointed to by \fIwcval\fP +Obtains the number of wide characters pointed to by \fIwch\fP .bP Does not change the data referenced by \fIattrs\fP or \fIcolor_pair\fP .SS setcchar -.PP -The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP +The \fBsetcchar\fP function initializes the location pointed to by \fIwch\fP by using: .bP The character attributes in @@ -102,22 +93,37 @@ The character attributes in The color pair in \fIcolor_pair\fP .bP -The wide-character string pointed to by \fIwch\fP. -The string must be L'\\0' terminated, +The wide-character string pointed to by \fIwc\fP. +The string must be L'\e0' terminated, contain at most one spacing character, which must be the first. .IP -Up to \fBCCHARW_MAX\fP\-1 nonspacing characters may follow. -Additional nonspacing characters are ignored. +Up to \fBCCHARW_MAX\fP\-1 non-spacing characters may follow. +Additional non-spacing characters are ignored. .IP The string may contain a single control character instead. -In that case, no nonspacing characters are allowed. -.SH EXTENSIONS +In that case, no non-spacing characters are allowed. +.SH RETURN VALUE +When \fIwc\fP is a null pointer, +\fBgetcchar\fP returns the number of wide characters referenced by +\fIwch\fP, +including one for a trailing null. .PP +When \fIwc\fP is not a null pointer, +\fBgetcchar\fP returns \fBOK\fP upon successful completion, +and \fBERR\fP otherwise. +.PP +Upon successful completion, \fBsetcchar\fP returns \fBOK\fP. +Otherwise, it returns \fBERR\fP. +.SH NOTES +The \fIwch\fP argument may be a value generated by a call to +\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument. +If \fIwch\fP is constructed by any other means, the effect is unspecified. +.SH EXTENSIONS X/Open Curses documents the \fIopts\fP argument as reserved for future use, saying that it must be null. This implementation -uses that parameter in ABI 6 for the functions which have a color-pair +uses that parameter in ABI 6 for the functions which have a color pair parameter to support extended color pairs: .bP For functions which modify the color, e.g., \fBsetcchar\fP, @@ -128,26 +134,8 @@ For functions which retrieve the color, e.g., \fBgetcchar\fP, if \fIopts\fP is set it is treated as a pointer to \fBint\fP, and used to retrieve the color pair as an \fBint\fP value, in addition retrieving it via the standard pointer to \fBshort\fP parameter. -.SH NOTES -.PP -The \fIwcval\fP argument may be a value generated by a call to -\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument. -If \fIwcval\fP is constructed by any other means, the effect is unspecified. -.SH RETURN VALUE -.PP -When \fIwch\fP is a null pointer, -\fBgetcchar\fP returns the number of wide characters referenced by -\fIwcval\fP, -including one for a trailing null. -.PP -When \fIwch\fP is not a null pointer, -\fBgetcchar\fP returns \fBOK\fP upon successful completion, -and \fBERR\fP otherwise. -.PP -Upon successful completion, \fBsetcchar\fP returns \fBOK\fP. -Otherwise, it returns \fBERR\fP. .SH PORTABILITY -The \fBCCHARW_MAX\fP symbol is specific to ncurses. +The \fBCCHARW_MAX\fP symbol is specific to \fI\%ncurses\fP. X/Open Curses does not provide details for the layout of the \fBcchar_t\fP structure. It tells what data are stored in it: @@ -194,9 +182,7 @@ including using them for ligatures between characters Unicode does not limit the (analogous) number of combining characters, so some applications may be affected. .SH SEE ALSO -.PP -Functions: -\fBcurs_attr\fP(3X), -\fBcurs_color\fP(3X), -\fBcurses\fP(3X), -\fBwcwidth\fP(3). +\fB\%curses\fP(3X), +\fB\%curs_attr\fP(3X), +\fB\%curs_color\fP(3X), +\fB\%wcwidth\fP(3) diff --git a/man/curs_getch.3x b/man/curs_getch.3x index 07d54562..9433c614 100644 --- a/man/curs_getch.3x +++ b/man/curs_getch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,391 +28,670 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getch.3x,v 1.61 2021/12/25 21:49:32 tom Exp $ -.TH curs_getch 3X "" -.na -.hy 0 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_getch.3x,v 1.87 2024/04/20 19:18:18 tom Exp $ +.TH curs_getch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ^ \(ha +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ds ^ ^ +.\} +. +.ie \n(.g .ds : \: +.el .ds : \" empty +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBgetch\fP, -\fBwgetch\fP, -\fBmvgetch\fP, -\fBmvwgetch\fP, -\fBungetch\fP, -\fBhas_key\fP \- get (or push back) characters from \fBcurses\fP terminal keyboard -.ad -.hy +\fB\%getch\fP, +\fB\%wgetch\fP, +\fB\%mvgetch\fP, +\fB\%mvwgetch\fP, +\fB\%ungetch\fP, +\fB\%has_key\fP \- +get (or push back) characters from \fIcurses\fR terminal keyboard .SH SYNOPSIS -\fB#include \fP +.nf +.B #include .PP -\fBint getch(void);\fP -.br -\fBint wgetch(WINDOW *\fP\fIwin);\fP -.sp -\fBint mvgetch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBint mvwgetch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.sp -\fBint ungetch(int \fP\fIch\fP\fB);\fP -.sp -/* extension */ -.br -\fBint has_key(int \fP\fIch\fP\fB);\fP -.br +.B int getch(void); +.B int wgetch(WINDOW *\fIwin\fP); +.B int mvgetch(int \fIy\fP, int \fIx\fP); +.B int mvwgetch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +.PP +.B int ungetch(int \fIc\fP); +.PP +.\" XXX: Move has_key into its own page like define_key and key_defined? +\fI/* extension */\fP +.B int has_key(int \fIc\fP); +.fi .SH DESCRIPTION -.SS Reading characters -The \fBgetch\fP, \fBwgetch\fP, \fBmvgetch\fP and \fBmvwgetch\fP, routines read -a character from the window. -In no-delay mode, if no input is waiting, the value \fBERR\fP is returned. -In delay mode, the program waits until the system -passes text through to the program. -Depending on the setting of \fBcbreak\fP, -this is after one character (cbreak mode), -or after the first newline (nocbreak mode). -In half-delay mode, -the program waits until a character is typed or the -specified timeout has been reached. -.PP -If \fBecho\fP is enabled, and the window is not a pad, -then the character will also be echoed into the -designated window according to the following rules: -.bP -If the character is the current erase character, left arrow, or backspace, -the cursor is moved one space to the left and that screen position is erased -as if \fBdelch\fP had been called. +.SS "Reading Characters" +.B \%wgetch +gathers a key stroke from the terminal keyboard associated with a +.I curses +window +.IR win . +\fB\%ncurses\fP(3X) describes the variants of this function. +.PP +When input is pending, +.B \%wgetch +returns an integer identifying the key stroke; +for alphanumeric and punctuation keys, +this value corresponds to the character encoding used by the terminal. +Use of the control key as a modifier often results in a distinct code. +The behavior of other keys depends on whether +.I win +is in keypad mode; +see subsection \*(``Keypad Mode\*('' below. +.PP +If no input is pending, +then if the no-delay flag is set in the window +(see \fB\%nodelay\fP(3X)), +the function returns +.BR ERR ; +otherwise, +.I curses +waits until the terminal has input. +If \fB\%cbreak\fP(3X) +has been called, +this happens after one character is read. +If \fB\%nocbreak\fP(3X) +has been called, +it occurs when the next newline is read. +If \fB\%halfdelay\fP(3X) +has been called, +.I curses +waits until a character is typed or the specified delay elapses. +.PP +If \fB\%echo\fP(3X) has been called, +and the window is not a pad, +.I curses +writes the returned character +.I c +to the window +(at the cursor position) +per the following rules. .bP -If the character value is any other \fBKEY_\fP define, the user is alerted -with a \fBbeep\fP call. +If +.I c +matches the terminal's erase character, +the cursor moves leftward one position +and the new position is erased +as if \fB\%wmove\fP(3X) and then \fB\%wdelch\fP(3X) were called. +When the window's keypad mode is enabled +(see below), +.B \%KEY_LEFT +and +.B \%KEY_BACKSPACE +are handled the same way. .bP -If the character is a carriage-return, -and if \fBnl\fP is enabled, -it is translated to a line-feed after echoing. +.I curses +writes any other +.I c +to the window, +as with \fB\%wechochar\fP(3X). .bP -Otherwise the character is simply output to the screen. +If the window has been moved or modified since the last call to +\fB\%wrefresh\fP(3X), +.I curses +calls +.BR \%wrefresh . .PP -If the window is not a pad, and it has been moved or modified since the last -call to \fBwrefresh\fP, \fBwrefresh\fP will be called before another character -is read. -.SS Keypad mode -.PP -If \fBkeypad\fP is \fBTRUE\fP, and a function key is pressed, the token for -that function key is returned instead of the raw characters: +If +.I c +is a carriage return and \fBnl\fP(3X) has been called, +.B \%wgetch +returns the character code for line feed instead. +.SS "Keypad Mode" +To +.IR curses , +key strokes not from the alphabetic section of the keyboard +(those corresponding to the ECMA-6 character set\(emsee +\fIascii\fP(7)\(emoptionally modified by either the control or shift +keys) +are treated as +.I function +keys. +(In +.IR curses , +the term \*(``function key\*('' includes but is not limited to keycaps +engraved with \*(``F1\*('', +\*(``PF1\*('', +and so on.) +If the window is in keypad mode, +these produce a numeric code corresponding to the +.B KEY_ +symbols listed in subsection \*(``Predefined Key Codes\*('' below; +otherwise, +they transmit a sequence of codes typically starting with the escape +character, +and which must be collected with multiple +.B \%wgetch +calls. .bP -The predefined function -keys are listed in \fB\fP as macros with values outside the range -of 8-bit characters. -Their names begin with \fBKEY_\fP. +The +.I \%curses.h +header file declares many +.I "predefined function keys" +whose names begin with +.BR KEY_ ; +these object-like macros have values outside the range of eight-bit +character codes. .bP -Other (user-defined) function keys which may be defined -using \fBdefine_key\fP(3X) -have no names, but also are expected to have values outside the range of -8-bit characters. -.PP -Thus, a variable -intended to hold the return value of a function key must be of short size or -larger. -.PP -When a character that could be the beginning of a function key is received -(which, on modern terminals, means an escape character), -\fBcurses\fP sets a timer. -If the remainder of the sequence does not come in within the designated -time, the character is passed through; -otherwise, the function key value is returned. -For this reason, many terminals experience a delay between the time -a user presses the escape key and the escape is returned to the program. -.PP -In \fBncurses\fP, the timer normally expires after -the value in \fBESCDELAY\fP (see \fBcurs_variables\fP(3X)). -If \fBnotimeout\fP is \fBTRUE\fP, the timer does not expire; -it is an infinite (or very large) value. -Because function keys usually begin with an escape character, -the terminal may appear to hang in notimeout mode after pressing the escape key -until another key is pressed. -.SS Ungetting characters -.PP -The \fBungetch\fP routine places \fIch\fP back onto the input queue to be -returned by the next call to \fBwgetch\fP. -There is just one input queue for all windows. -.PP -.SS Predefined key-codes -The following special keys are defined in \fB\fP. +In +.IR \%ncurses , +.I "user-defined function keys" +are configured with \fB\%define_key\fP(3X); +they have no names, +but are also expected to have values outside the range of eight-bit +codes. +.PP +A variable intended to hold a function key code must thus be of type +.I short +or larger. +.PP +Most terminals one encounters follow the ECMA-48 standard insofar as +their function keys produce character sequences prefixed with the +escape character ESC. +This fact implies that +.I curses +cannot know whether the terminal has sent an ESC key stroke or the +beginning of a function key's character sequence without waiting to see +if, +and how soon, +further input arrives. +When +.I curses +reads such an ambiguous character, +it sets a timer. +If the remainder of the sequence does not arrive within the designated +time, +.B \%wgetch +returns the prefix character; +otherwise, +it returns the function key code corresponding to the unique sequence +defined by the terminal. +Consequently, +a user of a +.I curses +application may experience a delay after pressing ESC while +.I curses +disambiguates the input; +see section \*(``EXTENSIONS\*('' below. +If the window is in \*(``no time-out\*('' mode, +the timer does not expire; +it is an infinite +(or very large) +value. +See \fB\%notimeout\fP(3X). +Because function key sequences usually begin with an escape character, +the terminal may appear to hang in no time-out mode after the user has +pressed ESC. +Generally, +further typing \*(``awakens\*('' +.IR curses . +.SS "Ungetting Characters" +.B \%ungetch +places +.I c +into the input queue to be returned by the next call to +.BR \%wgetch . +A single input queue serves all windows. +.SS "Predefined Key Codes" +The header file +.I \%curses.h +defines the following function key codes. .bP -Except for the special case \fBKEY_RESIZE\fP, -it is necessary to enable \fBkeypad\fP for \fBgetch\fP to return these codes. +Except for the special case of +.BR \%KEY_RESIZE , +a window's keypad mode must be enabled for +.B \%wgetch +to read these codes from it. .bP Not all of these are necessarily supported on any particular terminal. .bP -The naming convention may seem obscure, with some apparent -misspellings (such as \*(``RSUME\*('' for \*(``resume\*(''). -The names correspond to the long terminfo capability names for the keys, -and were defined long ago, in the 1980s. +The naming convention may seem obscure, +with some apparent misspellings +(such as \*(``RSUME\*('' for \*(``resume\*(''); +the names correspond to the +.I \%term\%info +capability names for the keys, +and were standardized before the IBM PC/AT keyboard layout achieved a +dominant position in industry. .PP +.RS +.\" XXX: Move this list into ncurses(3X), rather than duplicating it in +.\" get_wch(3X) or having that page cross reference this one? .TS -center tab(/) ; -l l . -\fBName\fP/\fBKey\fP \fBname\fP -_ -KEY_BREAK/Break key -KEY_DOWN/The four arrow keys ... -KEY_UP -KEY_LEFT -KEY_RIGHT -KEY_HOME/Home key (upward+left arrow) -KEY_BACKSPACE/Backspace -KEY_F0/T{ -Function keys; space for 64 keys is reserved. +Lb Lb +Lb Lx. +Symbol Key name += +KEY_BREAK Break key +KEY_DOWN Arrow keys +KEY_UP \^ +KEY_LEFT \^ +KEY_RIGHT \^ +KEY_HOME Home key (upward+left arrow) +KEY_BACKSPACE Backspace +KEY_F0 T{ +Function keys; space for 64 keys is reserved T} -KEY_F(\fIn\fP)/T{ -For 0 \(<= \fIn\fP \(<= 63 +KEY_F(\fIn\fP) T{ +Function key \fIn\fP where 0 \(<= \fIn\fP \(<= 63 T} -KEY_DL/Delete line -KEY_IL/Insert line -KEY_DC/Delete character -KEY_IC/Insert char or enter insert mode -KEY_EIC/Exit insert char mode -KEY_CLEAR/Clear screen -KEY_EOS/Clear to end of screen -KEY_EOL/Clear to end of line -KEY_SF/Scroll 1 line forward -KEY_SR/Scroll 1 line backward (reverse) -KEY_NPAGE/Next page -KEY_PPAGE/Previous page -KEY_STAB/Set tab -KEY_CTAB/Clear tab -KEY_CATAB/Clear all tabs -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 -KEY_BTAB/Back tab key -KEY_BEG/Beg(inning) key -KEY_CANCEL/Cancel key -KEY_CLOSE/Close key -KEY_COMMAND/Cmd (command) key -KEY_COPY/Copy key -KEY_CREATE/Create key -KEY_END/End key -KEY_EXIT/Exit key -KEY_FIND/Find key -KEY_HELP/Help key -KEY_MARK/Mark key -KEY_MESSAGE/Message key -KEY_MOUSE/Mouse event read -KEY_MOVE/Move key -KEY_NEXT/Next object key -KEY_OPEN/Open key -KEY_OPTIONS/Options key -KEY_PREVIOUS/Previous object key -KEY_REDO/Redo key -KEY_REFERENCE/Ref(erence) key -KEY_REFRESH/Refresh key -KEY_REPLACE/Replace key -KEY_RESIZE/Screen resized -KEY_RESTART/Restart key -KEY_RESUME/Resume key -KEY_SAVE/Save key -KEY_SBEG/Shifted beginning key -KEY_SCANCEL/Shifted cancel key -KEY_SCOMMAND/Shifted command key -KEY_SCOPY/Shifted copy key -KEY_SCREATE/Shifted create key -KEY_SDC/Shifted delete char key -KEY_SDL/Shifted delete line key -KEY_SELECT/Select key -KEY_SEND/Shifted end key -KEY_SEOL/Shifted clear line key -KEY_SEXIT/Shifted exit key -KEY_SFIND/Shifted find key -KEY_SHELP/Shifted help key -KEY_SHOME/Shifted home key -KEY_SIC/Shifted input key -KEY_SLEFT/Shifted left arrow key -KEY_SMESSAGE/Shifted message key -KEY_SMOVE/Shifted move key -KEY_SNEXT/Shifted next key -KEY_SOPTIONS/Shifted options key -KEY_SPREVIOUS/Shifted prev key -KEY_SPRINT/Shifted print key -KEY_SREDO/Shifted redo key -KEY_SREPLACE/Shifted replace key -KEY_SRIGHT/Shifted right arrow -KEY_SRSUME/Shifted resume key -KEY_SSAVE/Shifted save key -KEY_SSUSPEND/Shifted suspend key -KEY_SUNDO/Shifted undo key -KEY_SUSPEND/Suspend key -KEY_UNDO/Undo key +KEY_DL Delete line +KEY_IL Insert line +KEY_DC Delete character +KEY_IC Insert character/Enter insert mode +KEY_EIC Exit insert character mode +KEY_CLEAR Clear screen +KEY_EOS Clear to end of screen +KEY_EOL Clear to end of line +KEY_SF Scroll one line forward +KEY_SR Scroll one line backward (reverse) +KEY_NPAGE Next page/Page up +KEY_PPAGE Previous page/Page down +KEY_STAB Set tab +KEY_CTAB Clear tab +KEY_CATAB Clear all tabs +KEY_ENTER Enter/Send +KEY_SRESET Soft (partial) reset +KEY_RESET (Hard) reset +KEY_PRINT Print/Copy +KEY_LL Home down/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 +KEY_BTAB Back tab key +KEY_BEG Beg(inning) key +KEY_CANCEL Cancel key +KEY_CLOSE Close key +KEY_COMMAND Cmd (command) key +KEY_COPY Copy key +KEY_CREATE Create key +KEY_END End key +KEY_EXIT Exit key +KEY_FIND Find key +KEY_HELP Help key +KEY_MARK Mark key +KEY_MESSAGE Message key +KEY_MOUSE Mouse event occurred +KEY_MOVE Move key +KEY_NEXT Next object key +KEY_OPEN Open key +KEY_OPTIONS Options key +KEY_PREVIOUS Previous object key +KEY_REDO Redo key +KEY_REFERENCE Ref(erence) key +KEY_REFRESH Refresh key +KEY_REPLACE Replace key +KEY_RESIZE Screen resized +KEY_RESTART Restart key +KEY_RESUME Resume key +KEY_SAVE Save key +KEY_SELECT Select key +KEY_SUSPEND Suspend key +KEY_UNDO Undo key +_ +KEY_SBEG Shifted beginning key +KEY_SCANCEL Shifted cancel key +KEY_SCOMMAND Shifted command key +KEY_SCOPY Shifted copy key +KEY_SCREATE Shifted create key +KEY_SDC Shifted delete character key +KEY_SDL Shifted delete line key +KEY_SEND Shifted end key +KEY_SEOL Shifted clear line key +KEY_SEXIT Shifted exit key +KEY_SFIND Shifted find key +KEY_SHELP Shifted help key +KEY_SHOME Shifted home key +KEY_SIC Shifted insert key +KEY_SLEFT Shifted left arrow key +KEY_SMESSAGE Shifted message key +KEY_SMOVE Shifted move key +KEY_SNEXT Shifted next object key +KEY_SOPTIONS Shifted options key +KEY_SPREVIOUS Shifted previous object key +KEY_SPRINT Shifted print key +KEY_SREDO Shifted redo key +KEY_SREPLACE Shifted replace key +KEY_SRIGHT Shifted right arrow key +KEY_SRSUME Shifted resume key +KEY_SSAVE Shifted save key +KEY_SSUSPEND Shifted suspend key +KEY_SUNDO Shifted undo key .TE +.RE +.PP +Many keyboards feature a nine-key directional pad. .PP -Keypad is arranged like this: -.br +.RS .TS -center allbox tab(/) ; -c c c . -\fBA1\fP/\fBup\fP/\fBA3\fP -\fBleft\fP/\fBB2\fP/\fBright\fP -\fBC1\fP/\fBdown\fP/\fBC3\fP +allbox center; +C C C. +A1 up A3 +left B2 right +C1 down C3 .TE +.RE .sp -A few of these predefined values do \fInot\fP correspond to a real key: +Two of the symbols in the list above do +.I not +correspond to a physical key. .bP -.B KEY_RESIZE -is returned when the \fBSIGWINCH\fP signal has been detected -(see \fBinitscr\fP(3X) and \fBresizeterm\fP(3X)). -This code is returned whether or not \fBkeypad\fP has been enabled. +.B \%wgetch +returns +.BR \%KEY_RESIZE , +even if the window's keypad mode is disabled, +when +.I \%ncurses +handles a +.B \%SIGWINCH +signal; +see \fB\%initscr\fP(3X) and \fB\%resizeterm\fP(3X). .bP -.B KEY_MOUSE -is returned for mouse-events (see \fBcurs_mouse\fP(3X)). -This code relies upon whether or not \fBkeypad\fP(3X) has been enabled, -because (e.g., with \fBxterm\fP(1) mouse prototocol) ncurses must -read escape sequences, -just like a function key. -.SS Testing key-codes -.PP -The \fBhas_key\fP routine takes a key-code value from the above list, and -returns \fBTRUE\fP or \fBFALSE\fP according to whether -the current terminal type recognizes a key with that value. -.PP -The library also supports these extensions: -.RS 3 -.TP 5 -.B define_key -defines a key-code for a given string (see \fBdefine_key\fP(3X)). -.TP 5 -.B key_defined -checks if there is a key-code defined for a given -string (see \fBkey_defined\fP(3X)). -.RE -.PP +.B \%wgetch +returns +.B \%KEY_MOUSE +to indicate that a mouse event is pending collection; +see \fB\%curs_mouse\fP(3X). +Receipt of this code requires a window's keypad mode to be enabled, +because to interpret mouse input +(as with with \fI\%xterm\fP(1)'s mouse prototocol), +.I \%ncurses +must read an escape sequence, +as with a function key. +.SS "Testing Key Codes" +In +.IR \%ncurses , +.B \%has_key +returns a Boolean value indicating whether the terminal type recognizes +its parameter as a key code value. +See also +\fB\%define_key\fP(3X) and \fB\%key_defined\fP(3X). .SH RETURN VALUE -All routines return the integer \fBERR\fP upon failure and an integer value -other than \fBERR\fP (\fBOK\fP in the case of \fBungetch\fP) upon successful -completion. -.RS 3 -.TP 5 -\fBungetch\fP -returns \fBERR\fP -if there is no more room in the FIFO. -.TP -\fBwgetch\fP -returns \fBERR\fP -if the window pointer is null, or -if its timeout expires without having any data, or -if the execution was interrupted by a signal (\fBerrno\fP will be set to -\fBEINTR\fP). -.RE +Except for +.BR \%has_key , +these functions return +.B OK +on success and +.B ERR +on failure. +.PP +Functions taking a +.I \%WINDOW +pointer argument fail if the pointer is +.BR NULL . .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.PP +.B \%wgetch +also fails if +.bP +its timeout expires without any data arriving, +or +.bP +execution was interrupted by a signal, +in which case +.B \%errno +is set to +.BR \%EINTR . +.PP +.B \%ungetch +fails if there is no more room in the input queue. +.PP +.B \%has_key +returns +.B TRUE +or +.BR FALSE . .SH NOTES -Use of the escape key by a programmer for a single character function is -discouraged, as it will cause a delay of up to one second while the -keypad code looks for a following function-key sequence. -.PP -Some keys may be the same as commonly used control -keys, e.g., -\fBKEY_ENTER\fP versus control/M, -\fBKEY_BACKSPACE\fP versus control/H. -Some curses implementations may differ according to whether they -treat these control keys specially (and ignore the terminfo), or -use the terminfo definitions. -\fBNcurses\fP uses the terminfo definition. -If it says that \fBKEY_ENTER\fP is control/M, -\fBgetch\fP will return \fBKEY_ENTER\fP -when you press control/M. -.PP -Generally, \fBKEY_ENTER\fP denotes the character(s) sent by the \fIEnter\fP -key on the numeric keypad: +.I curses +discourages assignment of the ESC key to a discrete function by the +programmer because the library requires a delay while it awaits the +potential remainder of a terminal escape sequence. +.PP +Some key strokes are indistinguishable from control characters; +for example, +.B \%KEY_ENTER +may be the same as +.BR \*^M , +.\" as with att630 or pccon+keys +and +.B \%KEY_BACKSPACE +may be the same as +.B \*^H +.\" as with att505 or vt52-basic +or +.BR \*^? . +.\" as with pccon+keys or vt320 +Consult the terminal's +.I \%term\%info +entry to determine whether this is the case; +see \fB\%infocmp\fP(1). +Some +.I curses +implementations, +including +.IR \%ncurses , +honor the +.I \%term\%info +key definitions; +others treat such control characters specially. +.PP +.I curses +distinguishes the Enter keys in the alphabetic and numeric keypad +sections of a keyboard because (most) terminals do. +.B \%KEY_ENTER +refers to the key on the numeric keypad and, +like other function keys, +and is reliably recognized only if the window's keypad mode is enabled. .bP -the terminal description lists the most useful keys, +The +.I \%term\%info +.B \%key_enter +.RB ( kent ) +capability describes the character (sequence) sent by the Enter key of +a terminal's numeric +(or similar) +keypad. .bP -the \fIEnter\fP key on the regular keyboard is already handled by -the standard ASCII characters for carriage-return and line-feed, +\*(``Enter or send\*('' is X/Open Curses's description of this key. +.PP +.I curses +treats the Enter or Return key in the +.I alphabetic +section of the keyboard differently. .bP -depending on whether \fBnl\fP or \fBnonl\fP was called, -pressing \*(``Enter\*('' on the regular keyboard -may return either a carriage-return or line-feed, and finally +It usually produces a control code for carriage return +.RB ( \*^M ) +or line feed +.RB ( \*^J ). .bP -\*(``Enter or send\*('' is the standard description for this key. -.PP -When using \fBgetch\fP, \fBwgetch\fP, \fBmvgetch\fP, or -\fBmvwgetch\fP, nocbreak mode (\fBnocbreak\fP) and echo mode -(\fBecho\fP) should not be used at the same time. -Depending on the -state of the tty driver when each character is typed, the program may -produce undesirable results. -.PP -Note that \fBgetch\fP, \fBmvgetch\fP, and \fBmvwgetch\fP may be macros. -.PP -Historically, the set of keypad macros was largely defined by the extremely -function-key-rich keyboard of the AT&T 7300, aka 3B1, aka Safari 4. -Modern -personal computers usually have only a small subset of these. -IBM PC-style -consoles typically support little more than \fBKEY_UP\fP, \fBKEY_DOWN\fP, -\fBKEY_LEFT\fP, \fBKEY_RIGHT\fP, \fBKEY_HOME\fP, \fBKEY_END\fP, -\fBKEY_NPAGE\fP, \fBKEY_PPAGE\fP, and function keys 1 through 12. -The Ins key -is usually mapped to \fBKEY_IC\fP. +Depending on the terminal mode +(raw, +cbreak, +or +\*(``cooked\*(''), +and whether \fB\%nl\fP(3X) or \fB\%nonl\fP(3X) has been called, +.B \%wgetch +may return either a carriage return or line feed upon an Enter or Return +key stroke. +.PP +Use of +.B \%wgetch +with \fB\%echo\fP(3X) and neither \fB\%cbreak\fP(3X) nor \fB\%raw\fP(3X) +is not well-defined. +.PP +Historically, +the list of key code macros above was influenced by the +function-key-rich keyboard of the AT&T 7300 +(also known variously as the \*(``3B1\*('', \*(``Safari 4\*('', and +\*(``UNIX PC\*(''), +a 1985 machine. +Today's computer keyboards are based that of the IBM PC/AT and tend to +have fewer. +A +.I curses +application can expect such a keyboard to transmit key codes +.BR \%KEY_UP , +.BR \%KEY_DOWN , +.BR \%KEY_LEFT , +.BR \%KEY_RIGHT , +.BR \%KEY_HOME , +.BR \%KEY_END , +.B \%KEY_PPAGE +(Page Up), +.B \%KEY_NPAGE +(Page Down), +.B \%KEY_IC +(Insert), +.B \%KEY_DC +(Delete), +and +.BI \%KEY_F( n ) +for 1 \(<= +.I n +\(<= 12. +.PP +.BR \%getch , +.BR \%mvgetch , +and +.B \%mvwgetch +may be implemented as macros. +.SH EXTENSIONS +In +.IR \%ncurses , +when a window's \*(``no time-out\*('' mode is +.I not +set, +the +.B \%ESCDELAY +variable configures the duration of the timer used to disambiguate a +function key character sequence from a series of key strokes beginning +with ESC typed by the user; +see +\fB\%curs_variables\fP(3X). +.PP +\fB\%has_key\fP was designed for \fB\%ncurses\fP(3X), +and is not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous curses implementation. .SH PORTABILITY -The *get* functions are described in the XSI Curses standard, Issue 4. -They -read single-byte characters only. -The standard specifies that they return -\fBERR\fP on failure, but specifies no error conditions. -.PP -The echo behavior of these functions on input of \fBKEY_\fP or backspace -characters was not specified in the SVr4 documentation. -This description is -adopted from the XSI Curses standard. -.PP -The behavior of \fBgetch\fP and friends in the presence of handled signals is -unspecified in the SVr4 and XSI Curses documentation. -Under historical curses -implementations, it varied depending on whether the operating system's -implementation of handled signal receipt interrupts a \fBread\fP(2) call in -progress or not, and also (in some implementations) depending on whether an -input timeout or non-blocking mode has been set. -.PP -\fBKEY_MOUSE\fP is mentioned in XSI Curses, along with a few related -terminfo capabilities, but no higher-level functions use the feature. -The implementation in ncurses is an extension. -.PP -\fBKEY_RESIZE\fP is an extension first implemented for ncurses. -NetBSD curses later added this extension. -.PP -Programmers concerned about portability should be prepared for either of two -cases: (a) signal receipt does not interrupt \fBgetch\fP; (b) signal receipt -interrupts \fBgetch\fP and causes it to return \fBERR\fP with \fBerrno\fP set to -\fBEINTR\fP. -.PP -The \fBhas_key\fP function is unique to \fBncurses\fP. -We recommend that -any code using it be conditionalized on the \fBNCURSES_VERSION\fP feature macro. +Applications employing +.I \%ncurses +extensions should condition their use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. +.PP +X/Open Curses, +Issue 4 describes +\fB\%getch\fP, +\fB\%wgetch\fP, +\fB\%mvgetch\fP, +\fB\%mvwgetch\fP, +and +\fB\%ungetch\fP. +It specifies no error conditions for them. +.PP +.B \%wgetch +reads only single-byte characters. +.PP +The echo behavior of these functions on input of +.B KEY_ +or backspace characters was not specified in the SVr4 documentation. +This description is adapted from X/Open Curses. +.PP +The behavior of +.B \%wgetch +in the presence of signal handlers is unspecified in the SVr4 +documentation and X/Open Curses. +In historical +.I curses +implementations, +it varied depending on whether the operating system's dispatch of a +signal to a handler interrupting a \fIread\fP(2) call in progress, +and also +(in some implementations) +whether an input timeout or non-blocking mode has been set. +Programmers concerned about portability should be prepared for either of +two cases: +(a) signal receipt does not interrupt +.BR \%wgetch ; +or +(b) signal receipt interrupts +.B \%wgetch +and causes it to return +.B ERR +with +.B \%errno +set to +.BR \%EINTR . +.PP +.B \%KEY_MOUSE +is mentioned in X/Open Curses, +along with a few related +.I \%term\%info +capabilities, +but no higher-level functions use the feature. +The implementation in +.I \%ncurses +is an extension. +.PP +.B \%KEY_RESIZE +and +.B \%has_key +are extensions first implemented for +.IR \%ncurses . +By 2022, +.I \%PDCurses +.\" https://web.archive.org/web/20220117232009/https://pdcurses.org/docs/MANUAL.html +and +NetBSD +.I curses +.\" https://web.archive.org/web/20200923185647/https://man.netbsd.org/curses_input.3 +had added them along with +.BR \%KEY_MOUSE . .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_inopts\fP(3X), -\fBcurs_mouse\fP(3X), -\fBcurs_move\fP(3X), -\fBcurs_outopts\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_variables\fP(3X), -\fBresizeterm\fP(3X). -.PP -Comparable functions in the wide-character (ncursesw) library are -described in -\fBcurs_get_wch\fP(3X). +\fB\%curs_get_wch\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). +.PP +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_inopts\fP(3X), +\fB\%curs_mouse\fP(3X), +\fB\%curs_move\fP(3X), +\fB\%curs_outopts\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%resizeterm\fP(3X), +\fB\%ascii\fP(7) +.PP +ECMA-6 \*(``7-bit coded Character Set\*('' +\% +.PP +ECMA-48 \*(``Control Functions for Coded Character Sets\*('' +\% diff --git a/man/curs_getstr.3x b/man/curs_getstr.3x index bf5f63f0..4a49352a 100644 --- a/man/curs_getstr.3x +++ b/man/curs_getstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,70 +27,70 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getstr.3x,v 1.35 2021/12/25 20:14:56 tom Exp $ -.TH curs_getstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_getstr.3x,v 1.58 2024/04/20 19:18:18 tom Exp $ +.TH curs_getstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBgetstr\fP, -\fBgetnstr\fP, -\fBwgetstr\fP, -\fBwgetnstr\fP, -\fBmvgetstr\fP, -\fBmvgetnstr\fP, -\fBmvwgetstr\fP, -\fBmvwgetnstr\fP \- accept character strings from \fBcurses\fP terminal keyboard -.ad -.hy +\fB\%getstr\fP, +\fB\%getnstr\fP, +\fB\%wgetstr\fP, +\fB\%wgetnstr\fP, +\fB\%mvgetstr\fP, +\fB\%mvgetnstr\fP, +\fB\%mvwgetstr\fP, +\fB\%mvwgetnstr\fP \- +accept character strings from \fIcurses\fR terminal keyboard .SH SYNOPSIS -\fB#include \fP -.sp -\fBint getstr(char *\fP\fIstr\fP\fB);\fP -.br -\fBint getnstr(char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint wgetstr(WINDOW *\fP\fIwin\fP\fB, char *\fP\fIstr\fP\fB);\fP -.br -\fBint wgetnstr(WINDOW *\fP\fIwin\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvgetstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvwgetstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvgetnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwgetnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint getstr(char *\fIstr\fP); +\fBint getnstr(char *\fIstr\fP, int \fIn\fP); +\fBint wgetstr(WINDOW *\fIwin\fP, char *\fIstr\fP); +\fBint wgetnstr(WINDOW *\fIwin\fP, char *\fIstr\fP, int \fIn\fP); +.PP +\fBint mvgetstr(int \fIy\fP, int \fIx\fP, char *\fIstr\fP); +\fBint mvwgetstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, char *\fIstr\fP); +\fBint mvgetnstr(int \fIy\fP, int \fIx\fP, char *\fIstr\fP, int \fIn\fP); +\fBint mvwgetnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, char *\fIstr\fP, int \fIn\fP); +.fi .SH DESCRIPTION -The function \fBgetstr\fP is equivalent to a series of calls to \fBgetch\fP, -until a newline or carriage return is received (the terminating character is -not included in the returned string). -.\" X/Open says also until EOf -.\" X/Open says then an EOS is added to the result -.\" X/Open doesn't mention n<0 -The resulting value is placed in the -area pointed to by the character pointer \fIstr\fP, -followed by a NUL. -.PP -The \fBgetnstr\fP function reads -from the \fIstdscr\fP default window. -The other functions, such as \fBwgetnstr\fP, -read from the window given as a parameter. -.PP -\fBgetnstr\fP reads at most \fIn\fP characters, thus preventing a possible -overflow of the input buffer. -Any attempt to enter more characters (other -than the terminating newline or carriage return) causes a beep. -Function -keys also cause a beep and are ignored. +The function +\fBwgetnstr\fP +is equivalent to a series of calls to +\fBwgetch\fP(3X), +until a newline or carriage return terminates the series: +.bP +The terminating character is not included in the returned string. +.bP +In all instances, the end of the string is terminated +by a NUL. +.bP +The function stores the result in the area pointed to +by the \fIstr\fP parameter. +.bP +The function reads at most \fIn\fP characters, +thus preventing a possible overflow of the input buffer. +.IP +Any attempt to enter more characters +(other than the terminating newline or carriage return) +causes a beep. +.IP +Function keys also cause a beep and are ignored. .PP The user's \fIerase\fP and \fIkill\fP characters are interpreted: .bP @@ -99,40 +99,86 @@ at the end of the buffer, moving the cursor to the left. .IP If \fIkeypad\fP mode is on for the window, \fBKEY_LEFT\fP and \fBKEY_BACKSPACE\fP -are both considered equivalent to the user's erase character. +are both considered equivalent to the user's \fIerase\fP character. .bP The \fIkill\fP character (e.g., \fB^U\fP) erases the entire buffer, leaving the cursor at the beginning of the buffer. .PP Characters input are echoed only if \fBecho\fP is currently on. In that case, -backspace is echoed as deletion of the previous character (typically a left -motion). +backspace is echoed as deletion of the previous character +(typically a left motion). +.PP +The +\fBgetnstr\fP, +\fBmvgetnstr\fP, +\fBmvwgetnstr\fP, and +\fBwgetnstr\fP +functions are identical +to the +\fBgetstr\fP, +\fBmvgetstr\fP, +\fBmvwgetstr\fP, and +\fBwgetstr\fP +functions, respectively, +except that the +\fB*n*\fP +versions read at most +\fIn\fP +characters, letting the application prevent overflow of the +input buffer. .SH RETURN VALUE -All routines return the integer \fBERR\fP upon failure and an \fBOK\fP (SVr4 -specifies only \*(``an integer value other than \fBERR\fP\*('') upon successful -completion. +All of these functions return the integer \fBOK\fP upon successful completion. +(SVr4 specifies only \*(``an integer value other than \fBERR\fP\*('') +If unsuccessful, they return \fBERR\fP. .PP X/Open defines no error conditions. .PP In this implementation, these functions return an error -if the window pointer is null, or -if its timeout expires without having any data. +.bP +if the window pointer is null, +.bP +if its timeout expires without having any data, or +.bP +if the associated call to +\fBwgetch\fP +failed. .PP This implementation provides an extension as well. If a \fBSIGWINCH\fP interrupts the function, it will return \fBKEY_RESIZE\fP rather than \fBOK\fP or \fBERR\fP. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that \fBgetstr\fP, \fBmvgetstr\fP, and \fBmvwgetstr\fP may be macros. +Any of these functions other than +\fBwgetnstr\fP +may be macros. +.PP +Using +\fBgetstr\fP, +\fBmvgetstr\fP, +\fBmvwgetstr\fP, or +\fBwgetstr\fP +to read a line that +overflows the array pointed to by +\fBstr\fP +causes undefined +results. +The use of +\fBgetnstr\fP, +\fBmvgetnstr\fP, +\fBmvwgetnstr\fP, or +\fBwgetnstr\fP, +respectively, is recommended. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -They read single-byte characters only. -The standard does not define any error conditions. +These functions are described in The Single Unix Specification, Version 2. +No error conditions are defined. +.PP This implementation returns \fBERR\fP if the window pointer is null, or if the lower-level \fBwgetch\fP(3X) call returns an \fBERR\fP. .PP @@ -157,9 +203,9 @@ but did not state whether the terminating NUL is counted in that limit. X/Open Curses, Issue 7 (2009) changed that to say they \*(``read at most \fIn\fP\-1 bytes\*('' to allow for the terminating NUL. -As of 2018, some implementations do, some do not count it: +As of 2018, some implementations count it, some do not: .bP -ncurses 6.1 and PDCurses do not count the NUL in the given limit, while +\fI\%ncurses\fP 6.1 and PDCurses do not count the NUL in the given limit, while .bP Solaris SVr4 and NetBSD curses count the NUL as part of the limit. .bP @@ -187,15 +233,15 @@ that it is greater than zero. .IP A comment in NetBSD's source code states that this is specified in SUSv2. .bP -ncurses (before 6.2) assumes no particular limit for the result +\fI\%ncurses\fP (before 6.2) assumes no particular limit for the result from \fBwgetstr\fP, and treats the \fIn\fP parameter of \fBwgetnstr\fP like SVr4 curses. .bP -ncurses 6.2 uses \fBLINE_MAX\fP, +\fI\%ncurses\fP 6.2 uses \fBLINE_MAX\fP, or a larger (system-dependent) value which the \fBsysconf\fP function may provide. If neither \fBLINE_MAX\fP or \fBsysconf\fP is available, -ncurses uses the POSIX value for \fBLINE_MAX\fP (a 2048 byte limit). +\fI\%ncurses\fP uses the POSIX value for \fBLINE_MAX\fP (a 2048 byte limit). In either case, it reserves a byte for the terminating NUL. .PP Although \fBgetnstr\fP is equivalent to a series of calls to \fBgetch\fP, @@ -225,22 +271,31 @@ They may take the \fIcbreak\fP mode set by the caller into account when deciding whether to handle echoing within \fBgetnstr\fP or as a side-effect of the \fBgetch\fP calls. .bP -The original ncurses (as \fIpcurses\fP in 1986) set \fBnoraw\fP and \fBcbreak\fP -when accepting input for \fBgetnstr\fP. +The original \fI\%ncurses\fP +(as \fIpcurses\fP in 1986) +set \fBnoraw\fP and \fBcbreak\fP when accepting input for \fBgetnstr\fP. That may have been done to make function- and cursor-keys work; -it is not necessary with ncurses. +it is not necessary with \fI\%ncurses\fP. .IP -Since 1995, ncurses has provided signal handlers for INTR and QUIT -(e.g., \fB^C\fP or \fB^\\\fP). +Since 1995, +\fI\%ncurses\fP has provided signal handlers for INTR and QUIT +(e.g., \fB^C\fP or \fB^\e\fP). With the \fBnoraw\fP and \fBcbreak\fP settings, those may catch a signal and stop the program, where other implementations allow one to enter those characters in the buffer. .bP -Starting in 2021 (ncurses 6.3), \fBgetnstr\fP sets \fBraw\fP, +Starting in 2021 +(\fI\%ncurses\fP 6.3), +\fBgetnstr\fP sets \fBraw\fP, rather than \fBnoraw\fP and \fBcbreak\fP for better compatibility with SVr4-curses, e.g., allowing one to enter a \fB^C\fP into the buffer. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_getch\fP(3X), -\fBcurs_termattrs\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curs_get_wstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). +.PP +\fB\%curses\fP(3X), +\fB\%curs_getch\fP(3X), +\fB\%curs_termattrs\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_getyx.3x b/man/curs_getyx.3x index 69d0c829..eadcecef 100644 --- a/man/curs_getyx.3x +++ b/man/curs_getyx.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,75 +27,87 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getyx.3x,v 1.22 2021/12/25 21:50:36 tom Exp $ -.TH curs_getyx 3X "" +.\" $Id: curs_getyx.3x,v 1.44 2024/04/20 21:20:07 tom Exp $ +.TH curs_getyx 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .SH NAME -\fBgetyx\fP, -\fBgetparyx\fP, -\fBgetbegyx\fP, -\fBgetmaxyx\fP \- get \fBcurses\fP cursor and window coordinates +\fB\%getyx\fP, +\fB\%getparyx\fP, +\fB\%getbegyx\fP, +\fB\%getmaxyx\fP \- +get \fIcurses\fR cursor and window coordinates .SH SYNOPSIS -\fB#include \fP -.sp -\fBvoid getyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBvoid getparyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBvoid getbegyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBvoid getmaxyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBvoid getyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +\fBvoid getparyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +\fBvoid getbegyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +\fBvoid getmaxyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +.fi .SH DESCRIPTION -The \fBgetyx\fP macro places the current cursor position of the given window in -the two integer variables \fIy\fP and \fIx\fP. +The \fB\%getyx\fP macro places the current cursor position +of the given window in the two integer variables \fIy\fP and \fIx\fP. .PP -If \fIwin\fP is a subwindow, the \fBgetparyx\fP macro places the beginning +If \fIwin\fP is a subwindow, the \fB\%getparyx\fP macro places the beginning coordinates of the subwindow relative to the parent window into two integer variables \fIy\fP and \fIx\fP. Otherwise, \fB\-1\fP is placed into \fIy\fP and \fIx\fP. .PP -Like \fBgetyx\fP, the \fBgetbegyx\fP and \fBgetmaxyx\fP macros store +Like \fB\%getyx\fP, the \fB\%getbegyx\fP and \fB\%getmaxyx\fP macros store the current beginning coordinates and size of the specified window. .SH RETURN VALUE The return values of these macros are undefined (i.e., they should not be used as the right-hand side of assignment statements). .SH NOTES All of these interfaces are macros. -A "\fB&\fP" is not necessary before the variables \fIy\fP and \fIx\fP. +A \*(``&\*('' is not necessary before the variables \fIy\fP and \fIx\fP. .SH PORTABILITY The -\fBgetyx\fP, -\fBgetparyx\fP, -\fBgetbegyx\fP and -\fBgetmaxyx\fP -macros are described in the XSI Curses standard, Issue 4. +\fB\%getyx\fP, +\fB\%getparyx\fP, +\fB\%getbegyx\fP and +\fB\%getmaxyx\fP +macros are described in X/Open Curses, Issue 4. .PP This implementation also provides functions -\fBgetbegx\fP, -\fBgetbegy\fP, -\fBgetcurx\fP, -\fBgetcury\fP, -\fBgetmaxx\fP, -\fBgetmaxy\fP, -\fBgetparx\fP and -\fBgetpary\fP -for compatibility with older versions of curses. +\fB\%getbegx\fP, +\fB\%getbegy\fP, +\fB\%getcurx\fP, +\fB\%getcury\fP, +\fB\%getmaxx\fP, +\fB\%getmaxy\fP, +\fB\%getparx\fP and +\fB\%getpary\fP +for compatibility with older versions of \fIcurses\fP; +see \fB\%curs_legacy\fP(3X). .PP Although X/Open Curses does not address this, -many implementations provide members of the WINDOW structure +many implementations provide members of the \fB\%WINDOW\fP 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 +For best portability, do not rely on using the data in \fB\%WINDOW\fP, +since some implementations make \fB\%WINDOW\fP opaque (do not allow direct use of its members). .PP 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 implementations. -The difference is hidden by means of the macro \fBgetmaxyx\fP. +For example, the \fB\%WINDOW._maxx\fP and \fB\%WINDOW._maxy\fP values +in \fI\%ncurses\fP have +(at least since release 1.8.1) +differed by one from some other implementations. +The difference is hidden by means of the macro \fB\%getmaxyx\fP. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_legacy\fP(3X), -\fBcurs_opaque\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_legacy\fP(3X), +\fB\%curs_opaque\fP(3X) diff --git a/man/curs_in_wch.3x b/man/curs_in_wch.3x index 26034145..8512e6d3 100644 --- a/man/curs_in_wch.3x +++ b/man/curs_in_wch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,45 +27,58 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_in_wch.3x,v 1.12 2021/12/25 21:49:32 tom Exp $ -.TH curs_in_wch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_in_wch.3x,v 1.31 2024/04/20 21:20:07 tom Exp $ +.TH curs_in_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBin_wch\fP, -\fBmvin_wch\fP, -\fBmvwin_wch\fP, -\fBwin_wch\fP \- extract a complex character and rendition from a window +\fB\%in_wch\fP, +\fB\%mvin_wch\fP, +\fB\%mvwin_wch\fP, +\fB\%win_wch\fP \- +get a \fIcurses\fR complex character from a window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint in_wch(cchar_t *\fP\fIwcval\fP\fB);\fP -.br -\fBint win_wch(WINDOW *\fP\fIwin\fP\fB, cchar_t *\fP\fIwcval\fP\fB);\fP -.sp -\fBint mvin_wch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, cchar_t *\fP\fIwcval\fP\fB);\fP -.br -\fBint mvwin_wch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, cchar_t *\fP\fIwcval\fP\fB);\fP +.nf +\fB#include +.PP +\fBint in_wch(cchar_t *\fIwch\fP); +\fBint win_wch(WINDOW *\fIwin\fP, cchar_t *\fIwch\fP); +.PP +\fBint mvin_wch(int \fIy\fP, int \fIx\fP, cchar_t *\fIwch\fP); +\fBint mvwin_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, cchar_t *\fIwch\fP); +.fi .SH DESCRIPTION These functions extract the complex character and rendition from the current position in the named window into the \fBcchar_t\fP object -referenced by wcval. +referenced by wch. .SH RETURN VALUE -No errors are defined in the XSI Curses standard. +No errors are defined in X/Open Curses. This implementation checks for null pointers, returns \fBERR\fP in that case. Also, the \fImv\fP routines check for error moving the cursor, returning \fBERR\fP in that case. Otherwise they return \fBOK\fP. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES Note that all of these routines may be macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_inch\fP(3X). +\fB\%curs_inch\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. +.PP +\fB\%curses\fP(3X), +\fB\%curs_inwstr\fP(3X) diff --git a/man/curs_in_wchstr.3x b/man/curs_in_wchstr.3x index ddf8fc10..53c98464 100644 --- a/man/curs_in_wchstr.3x +++ b/man/curs_in_wchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,67 +27,81 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_in_wchstr.3x,v 1.16 2021/12/25 21:49:32 tom Exp $ -.TH curs_in_wchstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_in_wchstr.3x,v 1.39 2024/04/20 21:24:19 tom Exp $ +.TH curs_in_wchstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME -\fBin_wchstr\fP, -\fBin_wchnstr\fP, -\fBwin_wchstr\fP, -\fBwin_wchnstr\fP, -\fBmvin_wchstr\fP, -\fBmvin_wchnstr\fP, -\fBmvwin_wchstr\fP, -\fBmvwin_wchnstr\fP \- get an array of complex characters and renditions from a curses window -.ad -.hy +\fB\%in_wchstr\fP, +\fB\%in_wchnstr\fP, +\fB\%win_wchstr\fP, +\fB\%win_wchnstr\fP, +\fB\%mvin_wchstr\fP, +\fB\%mvin_wchnstr\fP, +\fB\%mvwin_wchstr\fP, +\fB\%mvwin_wchnstr\fP \- +get a \fIcurses\fR complex character string from a window .SH SYNOPSIS .nf -\fB#include \fP -.sp -\fBint in_wchstr(cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint in_wchnstr(cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint win_wchstr(WINDOW *\fP\fIwin\fP\fB, cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint win_wchnstr(WINDOW *\fP\fIwin\fP\fB, cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvin_wchstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint mvin_wchnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, cchar_t *\fP\fIwchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwin_wchstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, cchar_t *\fP\fIwchstr\fP\fB);\fP -.br -\fBint mvwin_wchnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, cchar_t *\fP\fIwchstr\fP, int \fIn\fP\fB);\fP +\fB#include +.PP +\fBint in_wchstr(cchar_t *\fIwchstr\fP); +\fBint win_wchstr(WINDOW *\fIwin\fP, cchar_t *\fIwchstr\fP); +\fBint mvin_wchstr(int \fIy\fP, int \fIx\fP, cchar_t *\fIwchstr\fP); +\fBint mvwin_wchstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, cchar_t *\fIwchstr\fP); +.PP +\fBint in_wchnstr(cchar_t *\fIwchstr\fP, int \fIn\fP); +\fBint win_wchnstr(WINDOW *\fIwin\fP, cchar_t *\fIwchstr\fP, int \fIn\fP); +\fBint mvin_wchnstr(int \fIy\fP, int \fIx\fP, cchar_t *\fIwchstr\fP, int \fIn\fP); +\fBint mvwin_wchnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, cchar_t *\fIwchstr\fP, int \fIn\fP); .fi .SH DESCRIPTION These functions return an array of complex characters in \fIwchstr\fP, starting at the current cursor position in the named window. Attributes (rendition) are stored with the characters. .PP -The -\fBin_wchnstr\fP, -\fBmvin_wchnstr\fP, -\fBmvwin_wchnstr\fP -and -\fBwin_wchnstr\fP -fill the array -with at most -\fIn\fP -\fBcchar_t\fP -elements. -.br +The four functions with \fIn\fP as the last argument return +a leading substring at most \fIn\fP characters long +(exclusive of the trailing zeroed \fBcchar_t\fR. +Transfer stops at the end of the current line, or when \fIn\fP characters have +been stored at the location referenced by \fIwchstr\fP. +.PP +Constants defined in \fB\fP can be used with the \fB&\fP (logical +AND) operator to extract the character or the attribute alone from any position +in the \fIwchstr\fP [see \fBgetcchar\fP(3X)]. +.SH RETURN VALUE +Upon successful completion, these functions return +\fBOK\fP. +Otherwise, they return +\fBERR\fP. +.PP +X/Open Curses defines no error conditions. +This implementation returns an error +.bP +if the \fIwin\fP parameter is null or +.bP +if the \fIwchstr\fP parameter is null. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that all routines except -\fBwin_wchnstr\fP -may be -macros. +All routines except \fBwin_wchnstr\fP may be macros. .PP Reading a line that overflows the array pointed to by \fIwchstr\fP @@ -104,23 +118,15 @@ Therefore, the use of \fBmvwin_wchnstr\fP, or \fBwin_wchnstr\fP is recommended. -.SH RETURN VALUE -Upon successful completion, these functions return -\fBOK\fP. -Otherwise, they return -\fBERR\fP. -.PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. .SH PORTABILITY -The XSI Curses defines no error conditions. +X/Open Curses defines no error conditions. This implementation checks for null pointers, returning \fBERR\fP in that case. .SH SEE ALSO -Functions: -\fBcurses\fP(3X), -\fBcurs_in_wch\fP(3X), -\fBcurs_instr\fP(3X), -\fBcurs_inwstr\fP(3X) -\fBcurs_inchstr\fP(3X) +\fB\%curs_inchstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. +.PP +\fB\%curses\fP(3X), +\fB\%curs_inwstr\fP(3X), +\fB\%curs_in_wch\fP(3X) diff --git a/man/curs_inch.3x b/man/curs_inch.3x index 60bf4467..962e9dc8 100644 --- a/man/curs_inch.3x +++ b/man/curs_inch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,32 +28,39 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inch.3x,v 1.27 2021/12/25 17:39:16 tom Exp $ -.TH curs_inch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_inch.3x,v 1.51 2024/04/20 21:20:07 tom Exp $ +.TH curs_inch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBinch\fP, -\fBwinch\fP, -\fBmvinch\fP, -\fBmvwinch\fP \- get a character and attributes from a \fBcurses\fP window +\fB\%inch\fP, +\fB\%winch\fP, +\fB\%mvinch\fP, +\fB\%mvwinch\fP \- +get a \fIcurses\fR character from a window .SH SYNOPSIS -\fB#include \fP -.sp -\fBchtype inch(void);\fP -.br -\fBchtype winch(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBchtype mvinch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBchtype mvwinch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBchtype inch(void); +\fBchtype winch(WINDOW *\fIwin\fP); +.PP +\fBchtype mvinch(int \fIy\fP, int \fIx\fP); +\fBchtype mvwinch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +.fi .SH DESCRIPTION These routines return the character, of type \fBchtype\fP, at the current position in the named window. @@ -64,18 +71,23 @@ Constants defined in extract the character or attributes alone. . .SS Attributes -The following bit-masks may be AND-ed with characters returned by \fBwinch\fP. -. +The following bit masks may be AND-ed with characters returned by \fBwinch\fP. +.PP .TS -l l . -\fBA_CHARTEXT\fP Bit-mask to extract character -\fBA_ATTRIBUTES\fP Bit-mask to extract attributes -\fBA_COLOR\fP Bit-mask to extract color-pair field information +Lb Lb +Lb Lx. +Name Description +_ +A_CHARTEXT Extract character +A_ATTRIBUTES Extract attributes +A_COLOR Extract color pair information .TE .SH RETURN VALUE -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .PP The \fBwinch\fP function does not return an error if the window contains characters larger than 8-bits (255). @@ -83,7 +95,7 @@ Only the low-order 8 bits of the character are used by \fBwinch\fP. .SH NOTES Note that all of these routines may be macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. .PP Very old systems (before standardization) provide a different function with the same name: @@ -107,13 +119,10 @@ This implementation uses 8 bits for character values. An application using more bits, e.g., a Unicode value, should use the wide-character equivalents to these functions. .SH SEE ALSO -.TP 5 -\fBcurses\fP(3X) -gives an overview of the WINDOW and \fBchtype\fP data types. -.TP 5 -\fBcurs_attr\fP(3X) -goes into more detail, pointing out portability problems and -constraints on the use of \fBchtype\fP for returning window information. -.TP 5 -\fBcurs_in_wch\fP(3X) -describes comparable functions for the wide-character (ncursesw) library. +\fB\%curs_in_wch\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). +.PP +\fB\%curses\fP(3X), +\fB\%curs_instr\fP(3X) diff --git a/man/curs_inchstr.3x b/man/curs_inchstr.3x index 84b3dfd7..bcd5d685 100644 --- a/man/curs_inchstr.3x +++ b/man/curs_inchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,55 +27,58 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inchstr.3x,v 1.23 2021/12/25 21:41:58 tom Exp $ -.TH curs_inchstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_inchstr.3x,v 1.45 2024/04/20 21:20:07 tom Exp $ +.TH curs_inchstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBinchstr\fP, -\fBinchnstr\fP, -\fBwinchstr\fP, -\fBwinchnstr\fP, -\fBmvinchstr\fP, -\fBmvinchnstr\fP, -\fBmvwinchstr\fP, -\fBmvwinchnstr\fP \- get a string of characters (and attributes) from a \fBcurses\fP window -.ad -.hy +\fB\%inchstr\fP, +\fB\%inchnstr\fP, +\fB\%winchstr\fP, +\fB\%winchnstr\fP, +\fB\%mvinchstr\fP, +\fB\%mvinchnstr\fP, +\fB\%mvwinchstr\fP, +\fB\%mvwinchnstr\fP \- +get a \fIcurses\fR character string from a window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint inchstr(chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint inchnstr(chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint winchstr(WINDOW *\fP\fIwin\fP\fB, chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint winchnstr(WINDOW *\fP\fIwin\fP\fB, chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvinchstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint mvinchnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwinchstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype *\fP\fIchstr\fP\fB);\fP -.br -\fBint mvwinchnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint inchstr(chtype *\fIchstr\fP); +\fBint inchnstr(chtype *\fIchstr\fP, int \fIn\fP); +\fBint winchstr(WINDOW *\fIwin\fP, chtype *\fIchstr\fP); +\fBint winchnstr(WINDOW *\fIwin\fP, chtype *\fIchstr\fP, int \fIn\fP); +.PP +\fBint mvinchstr(int \fIy\fP, int \fIx\fP, chtype *\fIchstr\fP); +\fBint mvinchnstr(int \fIy\fP, int \fIx\fP, chtype *\fIchstr\fP, int \fIn\fP); +\fBint mvwinchstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, chtype *\fIchstr\fP); +\fBint mvwinchnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, chtype *\fIchstr\fP, int \fIn\fP); +.fi .SH DESCRIPTION These routines return a NULL-terminated array of \fBchtype\fP quantities, starting at the current cursor position in the named window and ending at the right margin of the window. -The four functions with \fIn\fP as -the last argument, return a leading substring at most \fIn\fP characters long +.PP +The four functions with \fIn\fP as the last argument, return +a leading substring at most \fIn\fP characters long (exclusive of the trailing (chtype)0). +Transfer stops at the end of the current line, or when \fIn\fP characters have +been stored at the location referenced by \fIchstr\fP. +.PP Constants defined in \fB\fP can be used with the \fB&\fP (logical AND) operator to extract the character or the attribute alone from any position in the \fIchstr\fP [see \fBcurs_inch\fP(3X)]. @@ -85,30 +88,48 @@ other than \fBERR\fP upon successful completion (the number of characters retrieved, exclusive of the trailing 0). .PP X/Open Curses defines no error conditions. -In this implementation: +This implementation returns an error .bP -If the \fIwin\fP parameter is null, an error is returned, +if the \fIwin\fP parameter is null or .bP -If the \fIchstr\fP parameter is null, an error is returned, +if the \fIchstr\fP parameter is null. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that all routines except \fBwinchnstr\fP may be macros. +All routines except \fBwinchnstr\fP may be macros. +.PP SVr4 does not document whether the result string is zero-terminated; it does not document whether a length limit argument includes any trailing 0; and it does not document the meaning of the return value. +.PP +Reading a line that overflows the array pointed to by +\fIchstr\fP +with +\fBinchstr\fP, +\fBmvinchstr\fP, +\fBmvwinchstr\fP +or +\fBwinchstr\fP +causes undefined results. +Therefore, the use of +\fBinchnstr\fP, +\fBmvinchnstr\fP, +\fBmvwinchnstr\fP, or +\fBwinchnstr\fP +is recommended. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +These functions are described in X/Open Curses, Issue 4. It is no more specific than the SVr4 documentation on the trailing 0. It does specify that the successful return of the functions is \fBOK\fP. .SH SEE ALSO -\fBcurses\fP(3X), \fBcurs_inch\fP(3X). -.PP -Comparable functions in the wide-character (ncursesw) library are -described in -\fBcurs_in_wchstr\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_inch\fP(3X), +\fB\%curs_inwstr\fP(3X), +\fB\%curs_in_wchstr\fP(3X) diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x index 00366177..0f460af1 100644 --- a/man/curs_initscr.3x +++ b/man/curs_initscr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,42 +27,44 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_initscr.3x,v 1.36 2021/12/25 21:41:58 tom Exp $ -.TH curs_initscr 3X "" +.\" $Id: curs_initscr.3x,v 1.69 2024/04/20 21:24:19 tom Exp $ +.TH curs_initscr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 .SH NAME -\fBinitscr\fP, -\fBnewterm\fP, -\fBendwin\fP, -\fBisendwin\fP, -\fBset_term\fP, -\fBdelscreen\fP \- \fBcurses\fP screen initialization and manipulation routines -.ad -.hy +\fB\%initscr\fP, +\fB\%newterm\fP, +\fB\%endwin\fP, +\fB\%isendwin\fP, +\fB\%set_term\fP, +\fB\%delscreen\fP \- +initialize, manipulate, or tear down \fIcurses\fR terminal interface .SH SYNOPSIS -\fB#include \fP -.sp -\fBWINDOW *initscr(void);\fP -.br -\fBint endwin(void);\fP -.sp -\fBbool isendwin(void);\fP -.sp -\fBSCREEN *newterm(const char *\fP\fItype\fP\fB, FILE *\fP\fIoutfd\fP\fB, FILE *\fP\fIinfd\fP\fB);\fP -.br -\fBSCREEN *set_term(SCREEN *\fP\fInew\fP\fB);\fP -.br -\fBvoid delscreen(SCREEN* \fP\fIsp\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBWINDOW *initscr(void); +\fBint endwin(void); +.PP +\fBbool isendwin(void); +.PP +\fBSCREEN *newterm(const char *\fItype\fP, FILE *\fIoutf\fP, FILE *\fIinf\fP); +\fBSCREEN *set_term(SCREEN *\fInew\fP); +\fBvoid delscreen(SCREEN* \fIsp\fP); +.fi .SH DESCRIPTION .SS initscr \fBinitscr\fP is normally the first \fBcurses\fP routine to call when @@ -81,27 +83,30 @@ If errors occur, \fBinitscr\fP writes an appropriate error message to standard error and exits; otherwise, a pointer is returned to \fBstdscr\fP. .SS newterm -.PP A program that outputs to more than one terminal should use the \fBnewterm\fP routine for each terminal instead of \fBinitscr\fP. A program that needs to inspect capabilities, so it can continue to run in a line-oriented mode if the terminal cannot support a screen-oriented program, would also use \fBnewterm\fP. +.PP The routine \fBnewterm\fP should be called once for each terminal. -It returns a variable of type \fBSCREEN *\fP which should be saved +It returns a variable of type \fISCREEN *\fP which should be saved as a reference to that terminal. \fBnewterm\fP's arguments are .bP the \fItype\fP of the terminal to be used in place of \fB$TERM\fP, .bP -a file pointer for output to the terminal, and +an output stream connected to the terminal, and .bP -another file pointer for input from the terminal +an input stream connected to the terminal .PP If the \fItype\fP parameter is \fBNULL\fP, \fB$TERM\fP will be used. -.SS endwin .PP +The file descriptor of the output stream is passed to \fBsetupterm\fP(3X), +which returns a pointer to a \fI\%TERMINAL\fP structure. +\fBnewterm\fP's return value holds a pointer to the \fI\%TERMINAL\fP structure. +.SS endwin The program must also call \fBendwin\fP for each terminal being used before exiting from \fBcurses\fP. If \fBnewterm\fP is called more than once for the same terminal, the first @@ -126,24 +131,21 @@ restores tty modes (see \fBreset_shell_mode\fP(3X)). Calling \fBrefresh\fP(3X) or \fBdoupdate\fP(3X) after a temporary escape causes the program to resume visual mode. .SS isendwin -.PP The \fBisendwin\fP routine returns \fBTRUE\fP if \fBendwin\fP has been called without any subsequent calls to \fBwrefresh\fP, and \fBFALSE\fP otherwise. .SS set_term -.PP The \fBset_term\fP routine is used to switch between different terminals. The screen reference \fInew\fP becomes the new current terminal. The previous terminal is returned by the routine. -This is the only routine which manipulates \fBSCREEN\fP pointers; +This is the only routine which manipulates \fISCREEN\fP pointers; all other routines affect only the current terminal. .SS delscreen -.PP The \fBdelscreen\fP routine frees storage associated with the -\fBSCREEN\fP data structure. +\fISCREEN\fP data structure. The \fBendwin\fP routine does not do this, so \fBdelscreen\fP should be called after \fBendwin\fP if a -particular \fBSCREEN\fP is no longer needed. +particular \fISCREEN\fP is no longer needed. .SH RETURN VALUE \fBendwin\fP returns the integer \fBERR\fP upon failure and \fBOK\fP upon successful completion. @@ -153,7 +155,15 @@ Routines that return pointers always return \fBNULL\fP on error. X/Open defines no error conditions. In this implementation .bP -\fBendwin\fP returns an error if the terminal was not initialized. +\fBendwin\fP returns an error if +.RS +.bP +the terminal was not initialized, or +.bP +\fBendwin\fP is called more than once without updating the screen, or +.bP +\fBreset_shell_mode\fP(3X) returns an error. +.RE .bP \fBnewterm\fP returns an error if it cannot allocate the data structures for the screen, @@ -164,47 +174,95 @@ i.e., \fBset_term\fP returns no error. .SH PORTABILITY -These functions were described in the XSI Curses standard, Issue 4. +These functions were described in X/Open Curses, Issue 4. As of 2015, the current document is X/Open Curses, Issue 7. .SS Differences -X/Open specifies that portable applications must not +X/Open Curses specifies that portable applications must not call \fBinitscr\fP more than once: .bP The portable way to use \fBinitscr\fP is once only, -using \fBrefresh\fP (see curs_refresh(3X)) +using \fB\%refresh\fP(3X) to restore the screen after \fBendwin\fP. .bP This implementation allows using \fBinitscr\fP after \fBendwin\fP. .PP -Old versions of curses, e.g., BSD 4.4, may have returned a null pointer +Old versions of curses, e.g., BSD 4.4, would return a null pointer from \fBinitscr\fP when an error is detected, rather than exiting. It is safe but redundant to check the return value of \fBinitscr\fP -in XSI Curses. -.SS Unset TERM Variable +in X/Open Curses. .PP -If the TERM variable is missing or empty, \fBinitscr\fP uses the +Calling \fBendwin\fP does not dispose of the memory allocated in \fBinitscr\fP +or \fBnewterm\fP. +Deleting a \fISCREEN\fP provides a way to do this: +.bP +X/Open Curses does not say what happens to \fI\%WINDOW\fPs when \fBdelscreen\fP +\*(``frees storage associated with the \fISCREEN\fP\*('' +nor does the SVr4 documentation help, +adding that it should be called after \fBendwin\fP if a \fISCREEN\fP +is no longer needed. +.bP +However, \fI\%WINDOW\fPs are implicitly associated with a \fISCREEN\fP. +so that it is reasonable to expect \fBdelscreen\fP to deal with these. +.bP +SVr4 curses deletes the standard \fI\%WINDOW\fP structures +\fBstdscr\fP and \fBcurscr\fP as well as a work area \fBnewscr\fP. +SVr4 curses ignores other windows. +.bP +Since version 4.0 (1996), +\fI\%ncurses\fP has maintained a list of all windows for each screen, +using that information to delete those windows when \fBdelscreen\fP is called. +.bP +NetBSD copied this feature of \fI\%ncurses\fP in 2001. +PDCurses follows the SVr4 model, +deleting only the standard \fI\%WINDOW\fP structures. +.SS "High-level versus Low-level" +Different implementations may disagree regarding the level of some functions. +For example, \fISCREEN\fP (returned by \fBnewterm\fP) and +\fI\%TERMINAL\fP (returned by \fBsetupterm\fP(3X)) hold file descriptors for +the output stream. +If an application switches screens using \fBset_term\fR, +or switches terminals using \fBset_curterm\fP(3X), +applications which use the output file descriptor can have different +behavior depending on which structure holds the corresponding descriptor. +.PP +For example +.bP +NetBSD's \fBbaudrate\fP(3X) function uses the descriptor in \fI\%TERMINAL\fP. +\fI\%ncurses\fP and SVr4 use the descriptor in \fISCREEN\fP. +.bP +NetBSD and \fI\%ncurses\fP use the descriptor +in \fI\%TERMINAL\fP +for terminal I/O modes, +e.g., +\fBdef_shell_mode\fP(3X), +\fBdef_prog_mode\fP(3X). +SVr4 curses uses the descriptor in \fISCREEN\fP. +.SS "Unset \fITERM\fP Variable" +If the \fITERM\fP variable is missing or empty, \fBinitscr\fP uses the value \*(``unknown\*('', which normally corresponds to a terminal entry with the \fIgeneric\fP (\fIgn\fP) capability. -Generic entries are detected by \fBsetupterm\fP -(see curs_terminfo(3X)) and cannot be used for full-screen operation. -Other implementations may handle a missing/empty TERM variable differently. -.SS Signal Handlers -.PP -Quoting from X/Open Curses, section 3.1.1: +Generic entries are detected by \fBsetupterm\fP(3X) +and cannot be used for full-screen operation. +Other implementations may handle +a missing/empty \fITERM\fP variable differently. +.SS "Signal Handlers" +Quoting from X/Open Curses Issue 7, section 3.1.1: .RS 5 .PP -\fICurses implementations may provide for special handling of the \fBSIGINT\fP, -\fBSIGQUIT\fP and \fBSIGTSTP\fP signals -if their disposition is \fBSIG_DFL\fP at the time -\fBinitscr\fP is called \fP... +Curses implementations may provide for special handling of the +\%SIGINT, +\%SIGQUIT, +and \%SIGTSTP signals if their disposition is \%SIG_DFL at the time +.I \%initscr +is called.\|.\|. .PP -\fIAny special handling for these signals may remain in effect for the +Any special handling for these signals may remain in effect for the life of the process or until the process changes the disposition of -the signal.\fP +the signal. .PP -\fINone of the Curses functions are required to be safe -with respect to signals \fP... +None of the Curses functions are required to be safe +with respect to signals.\|.\|. .RE .PP This implementation establishes signal handlers during initialization, @@ -213,18 +271,19 @@ Applications which must handle these signals should set up the corresponding handlers \fIafter\fP initializing the library: .TP 5 .B SIGINT -The handler \fIattempts\fP to cleanup the screen on exit. +The handler \fIattempts\fP to clean up the screen on exit. Although it \fIusually\fP works as expected, there are limitations: .RS 5 .bP -Walking the \fBSCREEN\fP list is unsafe, since all list management +Walking the \fISCREEN\fP list is unsafe, since all list management is done without any signal blocking. .bP On systems which have \fBREENTRANT\fP turned on, \fBset_term\fP uses functions which could deadlock or misbehave in other ways. .bP -\fBendwin\fP calls other functions, many of which use stdio or -other library functions which are clearly unsafe. +\fBendwin\fP calls other functions, +many of which use \fI\%stdio\fP(3) or other library functions which are +clearly unsafe. .RE .TP 5 .B SIGTERM @@ -235,26 +294,26 @@ purpose than \fBSIGQUIT\fP (which is used in debugging). .B SIGTSTP This handles the \fIstop\fP signal, used in job control. When resuming the process, this implementation discards pending -input with \fBflushinput\fP (see curs_util(3X)), and repaints the screen +input with \fB\%flushinp\fP(3X), and repaints the screen assuming that it has been completely altered. -It also updates the saved terminal modes with \fBdef_shell_mode\fP -(see \fBcurs_kernel\fP(3X)). +It also updates the saved terminal modes with +\fB\%def_shell_mode\fP(3X). .TP 5 .B SIGWINCH This handles the window-size changes which were ignored in the standardization efforts. The handler sets a (signal-safe) variable -which is later tested in \fBwgetch\fP (see curs_getch(3X)). +which is later tested in \fB\%wgetch\fP(3X). If \fBkeypad\fP has been enabled for the corresponding window, \fBwgetch\fP returns the key symbol \fBKEY_RESIZE\fP. At the same time, \fBwgetch\fP calls \fBresizeterm\fP to adjust the standard screen \fBstdscr\fP, and update other data such as \fBLINES\fP and \fBCOLS\fP. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_kernel\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_slk\fP(3X), -\fBcurs_terminfo\fP(3X), -\fBcurs_util\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_kernel\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_slk\fP(3X), +\fB\%curs_terminfo\fP(3X), +\fB\%curs_util\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_inopts.3x b/man/curs_inopts.3x index 473e4921..63db4967 100644 --- a/man/curs_inopts.3x +++ b/man/curs_inopts.3x @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,354 +28,527 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inopts.3x,v 1.35 2021/12/25 21:49:32 tom Exp $ -.TH curs_inopts 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_inopts.3x,v 1.66 2024/04/13 22:20:29 tom Exp $ +.TH curs_inopts 3X 2024-04-13 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBcbreak\fP, -\fBnocbreak\fP, -\fBecho\fP, -\fBnoecho\fP, -\fBhalfdelay\fP, -\fBintrflush\fP, -\fBkeypad\fP, -\fBmeta\fP, -\fBnl\fP, -\fBnonl\fP, -\fBnodelay\fP, -\fBnotimeout\fP, -\fBraw\fP, -\fBnoraw\fP, -\fBqiflush\fP, -\fBnoqiflush\fP, -\fBtimeout\fP, -\fBwtimeout\fP, -\fBtypeahead\fP \- \fBcurses\fP input options -.ad -.hy +\fB\%cbreak\fP, +\fB\%echo\fP, +\fB\%halfdelay\fP, +\fB\%intrflush\fP, +\fB\%is_cbreak\fP, +\fB\%is_echo\fP, +\fB\%is_nl\fP, +\fB\%is_raw\fP, +\fB\%keypad\fP, +\fB\%meta\fP, +\fB\%nl\fP, +\fB\%nocbreak\fP, +\fB\%nodelay\fP, +\fB\%noecho\fP, +\fB\%nonl\fP, +\fB\%noqiflush\fP, +\fB\%noraw\fP, +\fB\%notimeout\fP, +\fB\%qiflush\fP, +\fB\%raw\fP, +\fB\%timeout\fP, +\fB\%wtimeout\fP, +\fB\%typeahead\fP \- +get and set \fIcurses\fR terminal input options .SH SYNOPSIS -\fB#include \fP +.nf +\fB#include +.PP +\fBint cbreak(void); +\fBint nocbreak(void); +.PP +\fBint echo(void); +\fBint noecho(void); +.PP +\fBint intrflush(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint keypad(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint meta(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint nodelay(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint notimeout(WINDOW *\fIwin\fP, bool \fIbf\fP); .PP -\fBint cbreak(void);\fP -.br -\fBint nocbreak(void);\fP -.sp -\fBint echo(void);\fP -.br -\fBint noecho(void);\fP -.sp -\fBint intrflush(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint keypad(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint meta(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint nodelay(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint notimeout(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.sp -\fBint nl(void);\fP -.br -\fBint nonl(void);\fP -.sp -\fBint raw(void);\fP -.br -\fBint noraw(void);\fP -.sp -\fBvoid qiflush(void);\fP -.br -\fBvoid noqiflush(void);\fP -.sp -\fBint halfdelay(int \fP\fItenths\fP\fB);\fP -.br -\fBvoid timeout(int \fP\fIdelay\fP\fB);\fP -.br -\fBvoid wtimeout(WINDOW *\fP\fIwin\fP\fB, int \fP\fIdelay\fP\fB);\fP -.sp -\fBint typeahead(int \fP\fIfd\fP\fB);\fP -.br +\fBint nl(void); +\fBint nonl(void); +.PP +\fBint raw(void); +\fBint noraw(void); +.PP +\fBvoid qiflush(void); +\fBvoid noqiflush(void); +.PP +\fBint halfdelay(int \fItenths\fP); +\fBvoid timeout(int \fIdelay\fP); +\fBvoid wtimeout(WINDOW *\fIwin\fP, int \fIdelay\fP); +.PP +\fBint typeahead(int \fIfd\fP); +.PP +\fI/* extensions */ +\fBint is_cbreak(void); +\fBint is_echo(void); +\fBint is_nl(void); +\fBint is_raw(void); +.fi .SH DESCRIPTION -The \fBncurses\fP library provides several functions which let an application -change the way input from the terminal is handled. -Some are global, applying to all windows. +.I \%ncurses +provides several functions that let an application change the way input +from the terminal is handled. +Some are global, +applying to all windows. Others apply only to a specific window. Window-specific settings are not automatically applied to new or derived windows. -An application must apply these to each window, if the same behavior -is needed. +An application must apply these to each window if the same behavior is +desired. .\" -.SS cbreak/nocbreak -Normally, the tty driver buffers typed characters until a newline or carriage +.SS "cbreak, nocbreak" +Normally, +the terminal driver buffers typed characters until a newline or carriage return is typed. -The \fBcbreak\fP routine disables line buffering and -erase/kill character-processing (interrupt and flow control characters are -unaffected), making characters typed by the user immediately available to the +The \fB\%cbreak\fP routine disables line buffering and +erase/kill character-processing +(interrupt and flow control characters are unaffected), +making characters typed by the user immediately available to the program. -The \fBnocbreak\fP routine returns the terminal to normal (cooked) +The \fB\%nocbreak\fP routine returns the terminal to normal (cooked) mode. .PP -Initially the terminal may or may not be in \fBcbreak\fP mode, as the mode is -inherited; therefore, a program should call \fBcbreak\fP or \fBnocbreak\fP -explicitly. -Most interactive programs using \fBcurses\fP set the \fBcbreak\fP -mode. -Note that \fBcbreak\fP overrides \fBraw\fP. -[See \fBcurs_getch\fP(3X) for a -discussion of how these routines interact with \fBecho\fP and \fBnoecho\fP.] +Initially the terminal may or may not be in \fB\%cbreak\fP mode, +as the mode is inherited; +therefore, +a program should call \fB\%cbreak\fP or \fB\%nocbreak\fP explicitly. +Most interactive programs using +.I curses +set the \fB\%cbreak\fP mode. +Note that \fB\%cbreak\fP overrides \fBraw\fP. +[See \fB\%curs_getch\fP(3X) for a discussion of how these routines +interact with \fBecho\fP and \fB\%noecho\fP.] .\" -.SS echo/noecho -.PP -The \fBecho\fP and \fBnoecho\fP routines control whether characters typed by -the user are echoed by \fBgetch\fP(3X) as they are typed. -Echoing by the tty -driver is always disabled, but initially \fBgetch\fP is in echo mode, so -characters typed are echoed. +.SS "echo, noecho" +The \fBecho\fP and \fB\%noecho\fP routines control whether characters +typed by the user are echoed by \fB\%getch\fP(3X) as they are typed. +Echoing by the terminal driver is always disabled, +but initially \fB\%getch\fP is in echo mode, +so characters typed are echoed. Authors of most interactive programs prefer to do -their own echoing in a controlled area of the screen, or not to echo at all, so -they disable echoing by calling \fBnoecho\fP. -[See \fBcurs_getch\fP(3X) for a -discussion of how these routines interact with \fBcbreak\fP and -\fBnocbreak\fP.] +their own echoing in a controlled area of the screen, +or not to echo at all, +so they disable echoing by calling \fB\%noecho\fP. +[See \fB\%curs_getch\fP(3X) for a +discussion of how these routines interact with \fB\%cbreak\fP and +\fB\%nocbreak\fP.] .\" .SS halfdelay -.PP -The \fBhalfdelay\fP routine is used for half-delay mode, which is similar to -\fBcbreak\fP mode in that characters typed by the user are immediately -available to the program. -However, after blocking for \fItenths\fP tenths of -seconds, \fBERR\fP is returned if nothing has been typed. -The value of \fItenths\fP -must be a number between 1 and 255. -Use \fBnocbreak\fP to leave half-delay -mode. +The \fB\%halfdelay\fP routine is used for half-delay mode, +which is similar to \fB\%cbreak\fP mode in that characters typed by the +user are immediately available to the program. +However, +after blocking for \fItenths\fP tenths of seconds, +\fBERR\fP is returned if nothing has been typed. +The value of \fItenths\fP must be a number between 1 and 255. +Use \fB\%nocbreak\fP to leave half-delay mode. .\" .SS intrflush -.PP -If the \fBintrflush\fP option is enabled (\fIbf\fP is \fBTRUE\fP), and an -interrupt key is pressed on the keyboard (interrupt, break, quit), all output in -the tty driver queue will be flushed, giving the effect of faster response to -the interrupt, but causing \fBcurses\fP to have the wrong idea of what is on -the screen. -Disabling the option (\fIbf\fP is \fBFALSE\fP) prevents the -flush. -The default for the option is inherited from the tty driver settings. -The window argument is ignored. +If the \fB\%intrflush\fP option is enabled +.RI ( bf +is +.BR TRUE ), +and an interrupt key is pressed on the keyboard +(interrupt, +break, +quit), +all output in the terminal driver queue is flushed, +giving the effect of faster response to the interrupt, +but causing +.I curses +to have the wrong idea of what is on the screen. +Disabling the option +.RI ( bf +is +.BR FALSE ), +prevents the flush. +The default for the option is inherited from the terminal driver +settings. +The +.I win +argument is ignored. .\" .SS keypad -.PP -The \fBkeypad\fP option enables the keypad of the user's terminal. +The \fB\%keypad\fP option enables the keypad of the user's terminal. If -enabled (\fIbf\fP is \fBTRUE\fP), the user can press a function key -(such as an arrow key) and \fBwgetch\fP(3X) returns a single value -representing the function key, as in \fBKEY_LEFT\fP. +enabled +.RI ( bf +is +.BR TRUE ), +the user can press a function key +(such as an arrow key) +and \fB\%wgetch\fP(3X) returns a single value representing the function +key, +as in \fB\%KEY_LEFT\fP. If disabled -(\fIbf\fP is \fBFALSE\fP), \fBcurses\fP does not treat function keys -specially and the program has to interpret the escape sequences -itself. -If the keypad in the terminal can be turned on (made to -transmit) and off (made to work locally), turning on this option -causes the terminal keypad to be turned on when \fBwgetch\fP(3X) is -called. +(\fIbf\fP is \fBFALSE\fP), +.I curses +does not treat function keys specially and the program has to interpret +the escape sequences itself. +If the keypad in the terminal can be turned on +(made to transmit) +and off +(made to work locally), +turning on this option causes the terminal keypad to be turned on when +\fB\%wgetch\fP(3X) is called. The default value for keypad is \fBFALSE\fP. .\" .SS meta -.PP -Initially, whether the terminal returns 7 or 8 significant bits on -input depends on the control mode of the tty driver [see \fBtermios\fP(3)]. -To force 8 bits to be returned, invoke \fBmeta\fP(\fIwin\fP, -\fBTRUE\fP); this is equivalent, under POSIX, to setting the CS8 flag -on the terminal. -To force 7 bits to be returned, invoke -\fBmeta\fP(\fIwin\fP, \fBFALSE\fP); this is equivalent, under POSIX, +Initially, +whether the terminal returns 7 or 8 significant bits on input depends on +the control mode of the terminal driver [see \fI\%termios\fP(3)]. +To force 8 bits to be returned, +invoke +\fBmeta\fP(\fIwin\fP, \fBTRUE\fP); +this is equivalent, +under POSIX, +to setting the CS8 flag on the terminal. +To force 7 bits to be returned, +invoke +\fBmeta\fP(\fIwin\fP, \fBFALSE\fP); +this is equivalent, +under POSIX, to setting the CS7 flag on the terminal. The window argument, -\fIwin\fP, is always ignored. -If the terminfo capabilities \fBsmm\fP -(meta_on) and \fBrmm\fP (meta_off) are defined for the terminal, -\fBsmm\fP is sent to the terminal when \fBmeta\fP(\fIwin\fP, -\fBTRUE\fP) is called and \fBrmm\fP is sent when \fBmeta\fP(\fIwin\fP, -\fBFALSE\fP) is called. +.IR win , +is always ignored. +If the terminfo capabilities +\fBsmm\fP (meta_on) and +\fBrmm\fP (meta_off) are defined for the terminal, +\fBsmm\fP is sent to the terminal when +\fBmeta\fP(\fIwin\fP, \fBTRUE\fP) +is called and \fBrmm\fP is sent when +\fBmeta\fP(\fIwin\fP, \fBFALSE\fP) is called. .\" -.SS nl/nonl -.PP -The \fBnl\fP and \fBnonl\fP routines control whether the underlying display -device translates the return key into newline on input. +.SS "nl, nonl" +The \fBnl\fP and \fBnonl\fP routines control whether the underlying +display device translates the return key into newline on input. .\" .SS nodelay -.PP -The \fBnodelay\fP option causes \fBgetch\fP to be a non-blocking call. -If no input is ready, \fBgetch\fP returns \fBERR\fP. +The \fB\%nodelay\fP option causes \fB\%getch\fP to be a non-blocking +call. +If no input is ready, +\fB\%getch\fP returns \fBERR\fP. If disabled -(\fIbf\fP is \fBFALSE\fP), \fBgetch\fP waits until a key is pressed. +.RI ( bf +is +.BR FALSE ), +\fB\%getch\fP waits until a key is pressed. .SS notimeout -.PP -When interpreting an escape sequence, \fBwgetch\fP(3X) sets a timer +When interpreting an escape sequence, +\fB\%wgetch\fP(3X) sets a timer while waiting for the next character. -If \fBnotimeout(\fP\fIwin\fP, -\fBTRUE\fP) is called, then \fBwgetch\fP 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. +If +\fB\%notimeout(\fIwin\fR, \fBTRUE\fP) +is called, +then \fB\%wgetch\fP does not set a timer. +The purpose of the timeout is to distinguish sequences produced by a +function key from those typed by a user. .\" -.SS raw/noraw -.PP -The \fBraw\fP and \fBnoraw\fP routines place the terminal into or out of raw -mode. -Raw mode is similar to \fBcbreak\fP mode, in that characters typed are -immediately 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 -\fBcurses\fP. +.SS "raw, noraw" +The \fBraw\fP and \fB\%noraw\fP routines place the terminal into or out +of raw mode. +Raw mode is similar to \fB\%cbreak\fP mode, +in that characters typed are immediately 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 terminal +driver that are not set by +.IR curses . .\" -.SS qiflush/noqiflush -.PP -When the \fBnoqiflush\fP routine is used, normal flush of input and -output queues associated with the \fBINTR\fP, \fBQUIT\fP and -\fBSUSP\fP characters will not be done [see \fBtermios\fP(3)]. +.SS "qiflush, nqiflush" +When the \fB\%noqiflush\fP routine is used, +normal flush of input and output queues associated with the \fBINTR\fP, +\fBQUIT\fP and \fBSUSP\fP characters will not be done +[see \fB\%termios\fP(3)]. When -\fBqiflush\fP is called, the queues will be flushed when these control -characters are read. -You may want to call \fBnoqiflush\fP in a signal -handler if you want output to continue as though the interrupt -had not occurred, after the handler exits. +\fB\%qiflush\fP is called, +the queues will be flushed when these control characters are read. +You may want to call \fB\%noqiflush\fP in a signal handler if you want +output to continue as though the interrupt had not occurred, +after the handler exits. .\" -.SS timeout/wtimeout -.PP -The \fBtimeout\fP and \fBwtimeout\fP routines set blocking or +.SS "timeout, wtimeout" +The \fB\%timeout\fP and \fB\%wtimeout\fP routines set blocking or non-blocking read for a given window. If \fIdelay\fP is negative, -blocking read is used (i.e., waits indefinitely for -input). -If \fIdelay\fP is zero, then non-blocking read is used -(i.e., read returns \fBERR\fP if no input is waiting). +a blocking read is used +(i.e., +waits indefinitely for input). +If \fIdelay\fP is zero, +then a non-blocking read is used +(i.e., +.I read +returns \fBERR\fP if no input is waiting). If -\fIdelay\fP is positive, then read blocks for \fIdelay\fP -milliseconds, and returns \fBERR\fP if there is still no input. -Hence, these routines provide the same functionality as \fBnodelay\fP, +\fIdelay\fP is positive, +then +.I read +blocks for \fIdelay\fP milliseconds, +and returns \fBERR\fP if there is still no input. +Hence, +these routines provide the same functionality as \fB\%nodelay\fP, plus the additional capability of being able to block for only -\fIdelay\fP milliseconds (where \fIdelay\fP is positive). +\fIdelay\fP milliseconds +(where \fIdelay\fP is positive). .\" .SS typeahead -.PP -The \fBcurses\fP library does \*(``line-breakout optimization\*('' -by looking for typeahead periodically while updating the screen. -If input is found, and it is coming from a tty, +.I curses +does \*(``line-breakout optimization\*('' by looking for typeahead +periodically while updating the screen. +If input is found, +and it is coming from a terminal, the current update is postponed until -\fBrefresh\fP(3X) or \fBdoupdate\fP is called again. +\fB\%refresh\fP(3X) or \fB\%doupdate\fP is called again. This allows faster response to commands typed in advance. -Normally, the input FILE -pointer passed to \fBnewterm\fP, or \fBstdin\fP in the case that -\fBinitscr\fP was used, will be used to do this typeahead checking. -The \fBtypeahead\fP routine specifies that the file descriptor +Normally, +the input +.I FILE +pointer passed to \fB\%newterm\fP, +or \fBstdin\fP in the case that \fB\%initscr\fP was used, +will be used to do this typeahead checking. +The \fB\%typeahead\fP routine specifies that the file descriptor \fIfd\fP is to be used to check for typeahead instead. If \fIfd\fP is -\-1, then no typeahead checking is done. +\-1, +then no typeahead checking is done. .\" .SH RETURN VALUE -All routines that return an integer return \fBERR\fP upon failure and \fBOK\fP +All routines that return an integer return \fBERR\fP upon failure and +\fBOK\fP (SVr4 specifies only \*(``an integer value other than \fBERR\fP\*('') upon successful completion, unless otherwise noted in the preceding routine descriptions. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify 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 initialized. +Any function will also return an error if the terminal was not +initialized. Also, -.RS +.RS 3 .TP 5 -\fBhalfdelay\fP +\fB\%halfdelay\fP returns an error if its parameter is outside the range 1..255. .RE +.SH NOTES +\fBecho\fP, +\fB\%noecho\fP, +\fB\%halfdelay\fP, +\fB\%intrflush\fP, +\fBmeta\fP, +\fBnl\fP, +\fBnonl\fP, +\fB\%nodelay\fP, +\fB\%notimeout\fP, +\fB\%noqiflush\fP, +\fB\%qiflush\fP, +\fB\%timeout\fP, +and +\fB\%wtimeout\fP +may be implemented as macros. +.PP +\fB\%noraw\fP and \fB\%nocbreak\fP follow historical practice in that +they attempt to restore normal (\*(``cooked\*('') mode +from raw and cbreak modes respectively. +Mixing \fBraw\fP/\fB\%noraw\fP and \fB\%cbreak\fP/\fB\%nocbreak\fP calls +leads to terminal driver control states that are hard to predict or +understand; +doing so is not recommended. +.SH EXTENSIONS +.I \%ncurses +provides four \*(``is_\*('' functions that may be used to detect if the +corresponding flags were set or reset. +.PP +.TS +center; +Lb Lb Lb +L L L . +Query Set Reset +_ +is_cbreak cbreak nocbreak +is_echo echo noecho +is_nl nl nonl +is_raw raw noraw +.TE +.PP +In each case, +the function returns +.TP 4 \" "-1" + 2n +1 +if the flag is set, +.TP +0 +if the flag is reset, +or +.TP +\-1 +if the library is not initialized. +.PP +They were designed for +\fB\%ncurses\fP(3X), +and are not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous +.I curses +implementation. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +Applications employing +.I \%ncurses +extensions should condition their use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. +.PP +Except as noted in section \*(``EXTENSIONS\*('' above, +X/Open Curses, Issue 4, Version 2 describes these functions. .PP -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 +.I \%ncurses +follows X/Open Curses +and the historical practice of AT&T +.I curses +implementations, +in that the echo bit is cleared when +.I curses initializes the terminal state. -BSD curses differed from this slightly; it -left the echo bit on at initialization, but the BSD \fBraw\fP call turned it -off as a side-effect. -For best portability, set \fBecho \fPor \fBnoecho\fP explicitly -just after initialization, even if your program remains in cooked mode. +BSD +.I curses +differed from this slightly; +it left the echo bit on at initialization, +but the BSD \fBraw\fP call turned it off as a side effect. +For best portability, +set \fBecho\fP or \fB\%noecho\fP explicitly just after initialization, +even if your program remains in cooked mode. .PP -The XSI Curses standard is ambiguous on the question of whether \fBraw\fP -should disable the CRLF translations controlled by \fBnl\fP and \fBnonl\fP. -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. +X/Open Curses is ambiguous regarding whether \fBraw\fP should disable +the CR/LF translations controlled by \fBnl\fP and \fBnonl\fP. +BSD +.I curses +did turn off these translations; +AT&T +.I curses +(at least as late as SVr1) +did not. +.I \%ncurses +does so, +on the assumption that a programmer requesting raw input wants a clean +(ideally, +8-bit clean) +connection that the operating system will not alter. .PP -When \fBkeypad\fP is first enabled, -ncurses loads the key-definitions for the current terminal description. +When \fB\%keypad\fP is first enabled, +.I \%ncurses +loads the key definitions for the current terminal description. If the terminal description includes extended string capabilities, -e.g., from using the \fB\-x\fP option of \fB@TIC@\fP, -then ncurses also defines keys for the capabilities whose names -begin with \*(``k\*(''. -The corresponding keycodes are generated and (depending on previous -loads of terminal descriptions) may differ from one execution of a -program to the next. -The generated keycodes are recognized by the \fBkeyname\fP function +e.g., +from using the +.B \-x +option of \fB\%@TIC@\fP, +then +.I \%ncurses +also defines keys for the capabilities whose names begin with +\*(``k\*(''. +The corresponding keycodes are generated and +(depending on previous loads of terminal descriptions) +may differ from one execution of a program to the next. +The generated keycodes are recognized by the \fB\%keyname\fP(3X) +function (which will then return a name beginning with \*(``k\*('' denoting the -terminfo capability name rather than \*(``K\*('', used for curses key-names). -On the other hand, an application can use \fBdefine_key\fP to establish +terminfo capability name rather than \*(``K\*('', +used for +.I curses +key names). +On the other hand, +an application can use \fB\%define_key\fP(3X) to establish a specific keycode for a given string. This makes it possible for an application to check for an extended -capability's presence with \fBtigetstr\fP, +capability's presence with \fB\%tigetstr\fP, and reassign the keycode to match its own needs. .PP -Low-level applications can use \fBtigetstr\fP to obtain the definition +Low-level applications can use \fB\%tigetstr\fP to obtain the definition of any particular string capability. -Higher-level applications which use the curses \fBwgetch\fP -and similar functions to return keycodes rely upon the order in which -the strings are loaded. +Higher-level applications which use the +.I curses +\fB\%wgetch\fP and similar functions to return keycodes rely upon the +order in which the strings are loaded. If more than one key definition has the same string value, -then \fBwgetch\fP can return only one keycode. -Most curses implementations (including ncurses) +then \fB\%wgetch\fP can return only one keycode. +Most +.I curses +implementations +(including +.IR \%ncurses ) load key definitions in the order defined by the array of string capability names. The last key to be loaded determines the keycode which will be returned. -In ncurses, you may also have extended capabilities interpreted as -key definitions. +In +.IR \%ncurses , +you may also have extended capabilities interpreted as key definitions. These are loaded after the predefined keys, and if a capability's value is the same as a previously-loaded key definition, the later definition is the one used. -.SH NOTES -Note that -\fBecho\fP, -\fBnoecho\fP, -\fBhalfdelay\fP, -\fBintrflush\fP, -\fBmeta\fP, -\fBnl\fP, -\fBnonl\fP, -\fBnodelay\fP, -\fBnotimeout\fP, -\fBnoqiflush\fP, -\fBqiflush\fP, -\fBtimeout\fP, and -\fBwtimeout\fP may be macros. -.PP -The \fBnoraw\fP and \fBnocbreak\fP calls follow historical practice in that -they attempt to restore to normal (\*(``cooked\*('') mode -from raw and cbreak modes respectively. -Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver -control states that are hard to predict or understand; it is not recommended. +.SH HISTORY +Formerly, +.I \%ncurses +used +.B \%nl +and +.B \%nonl +to control the conversion of newlines to carriage return/line feed +on output as well as input. +X/Open Curses documents the use of these functions only for input. +This difference arose from converting the +.I \%pcurses +source (1986), +which used +\fI\%ioctl\fP(2) calls and the +.I \%sgttyb +structure, +to +.I \%termios +(the POSIX terminal API). +In the former, +both input and output were controlled via a single option +.BR \%CRMOD , +while the latter separates these features. +Because that conversion interferes with output optimization, +.I \%ncurses +6.2 (2020) amended +.B \%nl +and +.B \%nonl +to eliminate their effect on output. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_getch\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_util\fP(3X), -\fBdefine_key\fP(3X), -\fBtermios\fP(3) +\fB\%curses\fP(3X), +\fB\%curs_getch\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_util\fP(3X), +\fB\%define_key\fP(3X), +\fB\%termios\fP(3) diff --git a/man/curs_ins_wch.3x b/man/curs_ins_wch.3x index 009716a4..90b03f64 100644 --- a/man/curs_ins_wch.3x +++ b/man/curs_ins_wch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,42 +27,89 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_ins_wch.3x,v 1.12 2021/12/25 21:41:58 tom Exp $ -.TH curs_ins_wch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_ins_wch.3x,v 1.30 2024/04/20 19:18:18 tom Exp $ +.TH curs_ins_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBins_wch\fP, -\fBmvins_wch\fP, -\fBmvwins_wch\fP, -\fBwins_wch\fP \- insert a complex character and rendition into a window +\fB\%ins_wch\fP, +\fB\%mvins_wch\fP, +\fB\%mvwins_wch\fP, +\fB\%wins_wch\fP \- +insert a \fIcurses\fR complex character in a window .SH SYNOPSIS -#include -.sp -\fBint ins_wch(const cchar_t *\fP\fIwch\fP\fB);\fP -.br -\fBint wins_wch(WINDOW *\fP\fIwin\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP -.sp -\fBint mvins_wch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP -.br -\fBint mvwins_wch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP +.nf +\fB#include \fP +.PP +\fBint ins_wch(const cchar_t *\fIwch\fP); +\fBint wins_wch(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP); +\fBint mvins_wch(int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP); +\fBint mvwins_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP); +.fi .SH DESCRIPTION -These routines, insert the complex character \fIwch\fP with rendition -before the character under the cursor. -All characters to the right of the cursor are moved one space to the right, -with the possibility of the rightmost character on the line being lost. -The insertion operation does not change the cursor position. -.SH RETURN VALUE -If successful, these functions return \fBOK\fP. -If not, they return \fBERR\fP. +These functions insert the +.I curses +complex character +.I wch +at the cursor in the specified window +.I win +(or +.BR \%stdscr ). +The character previously at the cursor and any to its right move one +cell to the right; +the rightmost character on the line is discarded. +The cursor does not advance. +.SH "RETURN VALUE" +These functions return \fBOK\fP on success and \fBERR\fP on failure. +.PP +Functions taking a +.I \%WINDOW +pointer argument fail if the pointer is +.BR NULL . +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.SH NOTES +A terminal's +.B \%insert_character +.RB ( ich1 ) +capability +is not necessarily employed. +.PP +\fB\%ins_wch\fP, +\fB\%mvins_wch\fP, +and +\fB\%mvwins_wch\fP +may be implemented as macros. +.SH PORTABILITY +X/Open Curses, +Issue 4 describes these functions. +.PP +SVr4 describes successful return values only as +\*(``an integer value other than \fBERR\fP\*(''. +.SH HISTORY +SVr4 (1989) implemented these functions under the names +.BR inswch , +.BR winswch , +.BR mvinswch , +and +.BR mvwinswch . +.SH "SEE ALSO" +\fB\%curs_insch\fP(3X) describes comparable functions in the +non-wide-character +.I curses +configuration. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. -.SH ERRORS -No errors are defined. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_insch\fP(3X). +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/curs_ins_wstr.3x b/man/curs_ins_wstr.3x index bc407049..4ebd3ace 100644 --- a/man/curs_ins_wstr.3x +++ b/man/curs_ins_wstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,85 +27,102 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_ins_wstr.3x,v 1.13 2021/12/25 21:41:58 tom Exp $ -.TH curs_ins_wstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_ins_wstr.3x,v 1.38 2024/04/20 21:23:08 tom Exp $ +.TH curs_ins_wstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME -\fBins_wstr\fP, -\fBins_nwstr\fP, -\fBwins_wstr\fP, -\fBwins_nwstr\fP, -\fBmvins_wstr\fP, -\fBmvins_nwstr\fP, -\fBmvwins_wstr\fP, -\fBmvwins_nwstr\fP \- insert a wide-character string into a curses window -.ad -.hy +\fB\%ins_wstr\fP, +\fB\%ins_nwstr\fP, +\fB\%wins_wstr\fP, +\fB\%wins_nwstr\fP, +\fB\%mvins_wstr\fP, +\fB\%mvins_nwstr\fP, +\fB\%mvwins_wstr\fP, +\fB\%mvwins_nwstr\fP \- +insert a wide-character string in a \fIcurses\fR window .SH SYNOPSIS .nf -\fB#include \fP -.sp -\fBint ins_wstr(const wchar_t *\fP\fIwstr);\fP -.br -\fBint ins_nwstr(const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint wins_wstr(WINDOW *\fP\fIwin\fP\fB, const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint wins_nwstr(WINDOW *\fP\fIwin\fP\fB, const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvins_wstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvins_nwstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwins_wstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvwins_nwstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP +\fB#include +.PP +\fBint ins_wstr(const wchar_t *\fIwstr\fP); +\fBint ins_nwstr(const wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint wins_wstr(WINDOW *\fIwin\fP, const wchar_t *\fIwstr\fP); +\fBint wins_nwstr(WINDOW *\fIwin\fP, const wchar_t *\fIwstr\fP, int \fIn\fP); +.PP +\fBint mvins_wstr(int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP); +\fBint mvins_nwstr(int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint mvwins_wstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP); +\fBint mvwins_nwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const wchar_t *\fIwstr\fP, int \fIn\fP); .fi .SH DESCRIPTION These routines insert a \fBwchar_t\fP character string (as many characters as will fit on the line) -before the character under the cursor. +before the character under the cursor, +as if calling \fBwins_wch\fP(3X). All characters to the right of the cursor are shifted right, with the possibility of the rightmost characters on the line being lost. No wrapping is performed. +.PP The cursor position does not change (after moving to \fIy\fP, \fIx\fP, if specified). -The four routines with \fIn\fP as the last argument +.PP +The functions with \fIn\fP as the last argument insert a leading substring of at most \fIn\fP \fBwchar_t\fP characters. -If \fIn\fP is less than 1, the entire string is inserted. +If \fIn\fP is less than zero, the entire string is inserted +(stopping on a L'\e0' character). .PP -If a character in \fIwstr\fP is a tab, newline, carriage return or -backspace, the cursor is moved appropriately within the window. -A newline also does a \fBclrtoeol\fP before moving. -Tabs are considered to be at every eighth column. -If a character in \fIwstr\fP is another control character, -it is drawn in the \fB^\fP\fIX\fP notation. -Calling \fBwin_wch\fP after adding a control character -(and moving to it, if necessary) -does not return the control character, -but instead returns a character in the ^-representation -of the control character. +Special characters are handled as in \fBwadd_wch\fP(3X). +.SH RETURN VALUE +All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. +.PP +X/Open Curses does not specify any error conditions. +This implementation returns an error +.bP +if the \fIwin\fP parameter is null or +.bP +if the \fIwstr\fP parameter is null or +.bP +if the \fBwins_wch\fP function returns an error. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that all but wins_nwstr may be macros. +All but \fBwins_nwstr\fP may be macros. .PP -If the first character in the string is a nonspacing character, these +If the first character in the string is a non-spacing character, these functions will fail. -XSI does not define what will happen if a nonspacing character follows -a control character. -.SH RETURN VALUE -Upon successful completion, these functions return \fBOK\fP. -Otherwise, they return \fBERR\fP. +X/Open Curses does not define what will happen +if a non-spacing character follows a control character. +.SH PORTABILITY +These functions are described in X/Open Curses, Issue 4, +which adds \fI\%const\fP qualifiers to the arguments. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +X/Open states that the entire string is inserted if \fIn\fP is less than 1. +This is probably an error, +because it is inconsistent with other functions, +and differs from the X/Open implementation on Solaris. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_insstr\fP(3X), -\fBcurs_in_wch\fP(3X), -\fBcurs_ins_wch\fP(3X). +\fB\%curs_insstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its non-wide-character configuration. +.PP +\fB\%curses\fP(3X), +\fB\%curs_ins_wch\fP(3X), +\fB\%curs_in_wch\fP(3X) diff --git a/man/curs_insch.3x b/man/curs_insch.3x index 6c4bd6be..baf2f6cc 100644 --- a/man/curs_insch.3x +++ b/man/curs_insch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,53 +27,89 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_insch.3x,v 1.21 2021/12/25 21:49:32 tom Exp $ -.TH curs_insch 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_insch.3x,v 1.40 2024/04/20 19:03:47 tom Exp $ +.TH curs_insch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBinsch\fP, -\fBwinsch\fP, -\fBmvinsch\fP, -\fBmvwinsch\fP \- insert a character before cursor in a \fBcurses\fP window +\fB\%insch\fP, +\fB\%winsch\fP, +\fB\%mvinsch\fP, +\fB\%mvwinsch\fP \- +insert a \fIcurses\fP character in a window .SH SYNOPSIS +.nf \fB#include \fP -.sp -\fBint insch(chtype \fP\fIch\fP\fB);\fP -.br -\fBint winsch(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fP -.sp -\fBint mvinsch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB);\fP -.br -\fBint mvwinsch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB);\fP -.br +.PP +\fBint insch(chtype \fIch\fP); +\fBint winsch(WINDOW *\fIwin\fP, chtype \fIch\fP); +\fBint mvinsch(int \fIy\fP, int \fIx\fP, chtype \fIch\fP); +\fBint mvwinsch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, chtype \fIch\fP); +.fi .SH DESCRIPTION -These routines insert the character \fIch\fP before the character under the -cursor. -All characters to the right of the cursor are moved one space to the -right, with the possibility of the rightmost character on the line being lost. -The insertion operation does not change the cursor position. -.SH RETURN VALUE -All routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 specifies only "an integer value other than \fBERR\fP") -upon successful completion, -unless otherwise noted in the preceding routine descriptions. +These functions insert the +.I curses +character +.I ch +at the cursor in the specified window +.I win +(or +.BR \%stdscr ). +The character previously at the cursor and any to its right move one +cell to the right; +the rightmost character on the line is discarded. +The cursor does not advance. +.SH "RETURN VALUE" +These functions return +.B OK +on success and +.B ERR +on failure. +.PP +Functions taking a +.I \%WINDOW +pointer argument fail if the pointer is +.BR NULL . .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -These routines do not necessarily imply use of a hardware insert character -feature. +.BR \%insch , +.BR \%mvinsch , +and +.B \%mvwinsch +may be implemented as macros. .PP -Note that \fBinsch\fP, \fBmvinsch\fP, and \fBmvwinsch\fP may be macros. +A terminal's +.B \%insert_character +.RB ( ich1 ) +capability +is not necessarily employed. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -.SH SEE ALSO -\fBcurses\fP(3X). +X/Open Curses, +Issue 4 describes these functions. +.PP +SVr4 +.I curses +describes a successful return value only as +\*(``an integer value other than +.BR ERR \*(''. +.SH "SEE ALSO" +\fB\%curs_ins_wch\fP(3X) describes comparable functions in the +wide-character +.I curses +configuration. .PP -Comparable functions in the wide-character (ncursesw) library are -described in -\fBcurs_ins_wch\fP(3X). +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/curs_insstr.3x b/man/curs_insstr.3x index 4877402d..888d4250 100644 --- a/man/curs_insstr.3x +++ b/man/curs_insstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,79 +27,98 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_insstr.3x,v 1.28 2021/12/25 17:39:16 tom Exp $ -.TH curs_insstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_insstr.3x,v 1.51 2024/04/20 21:20:07 tom Exp $ +.TH curs_insstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME -\fBinsstr\fP, -\fBinsnstr\fP, -\fBwinsstr\fP, -\fBwinsnstr\fP, -\fBmvinsstr\fP, -\fBmvinsnstr\fP, -\fBmvwinsstr\fP, -\fBmvwinsnstr\fP \- insert string before cursor in a \fBcurses\fP window +\fB\%insstr\fP, +\fB\%insnstr\fP, +\fB\%winsstr\fP, +\fB\%winsnstr\fP, +\fB\%mvinsstr\fP, +\fB\%mvinsnstr\fP, +\fB\%mvwinsstr\fP, +\fB\%mvwinsnstr\fP \- +insert a string in a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.br -\fBint insstr(const char *\fP\fIstr\fP\fB);\fP -.br -\fBint insnstr(const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint winsstr(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint winsnstr(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvinsstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvinsnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwinsstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvwinsnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br +.nf +\fB#include +\fBint insstr(const char *\fIstr\fP); +\fBint insnstr(const char *\fIstr\fP, int \fIn\fP); +\fBint winsstr(WINDOW *\fIwin\fP, const char *\fIstr\fP); +\fBint winsnstr(WINDOW *\fIwin\fP, const char *\fIstr\fP, int \fIn\fP); +.PP +\fBint mvinsstr(int \fIy\fP, int \fIx\fP, const char *\fIstr\fP); +\fBint mvinsnstr(int \fIy\fP, int \fIx\fP, const char *\fIstr\fP, int \fIn\fP); +\fBint mvwinsstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const char *\fIstr\fP); +\fBint mvwinsnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const char *\fIstr\fP, int \fIn\fP); +.fi .SH DESCRIPTION These routines insert a character string (as many characters as will fit on the line) -before the character under the cursor. -All characters to the right of the cursor are shifted right +before the character under the cursor, +as if calling \fBwinsch\fP(3X). +All characters to the right of the cursor are shifted right, with the possibility of the rightmost characters on the line being lost. +No wrapping is performed. +.PP The cursor position does not change (after moving to \fIy\fP, \fIx\fP, if specified). +.PP The functions with \fIn\fP as the last argument insert a leading substring of at most \fIn\fP characters. -If \fIn\fP<=0, then the entire string is inserted. +If \fIn\fP is less than zero, the entire string is inserted +(stopping on a NUL character). .PP -Special characters are handled as in \fBaddch\fP. +Special characters are handled as in \fBwaddch\fP(3X). .SH RETURN VALUE -All routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 specifies only "an integer value other than \fBERR\fP") -upon successful completion, -unless otherwise noted in the preceding routine descriptions. +All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. .PP -X/Open defines no error conditions. -In this implementation, -if the window parameter is null or the str parameter is null, -an error is returned. +X/Open Curses does not specify any error conditions. +This implementation returns an error +.bP +if the \fIwin\fP parameter is null or +.bP +if the \fIstr\fP parameter is null or +.bP +the \fBwinsch\fP(3X) function returns an error. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that all but \fBwinsnstr\fP may be macros. +All but \fBwinsnstr\fP may be macros. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4, which adds -const qualifiers to the arguments. -.LP +These functions are described in X/Open Curses, Issue 4, +which adds \fI\%const\fP qualifiers to the arguments. +.PP The Single Unix Specification, Version 2 states that \fBinsnstr\fP and \fBwinsnstr\fP perform wrapping. This is probably an error, since it makes this group of functions inconsistent. Also, no implementation of curses documents this inconsistency. +.PP +X/Open states that the entire string is inserted if \fIn\fP is less than 1. +This is probably an error, +because it is inconsistent with other functions, +and differs from the SVr4 and X/Open implementations on Solaris. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_util\fP(3X), -\fBcurs_clear\fP(3X), -\fBcurs_inch\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_inch\fP(3X), +\fB\%curs_ins_wstr\fP(3X), +\fB\%curs_util\fP(3X) diff --git a/man/curs_instr.3x b/man/curs_instr.3x index c64151b9..5b6e4b76 100644 --- a/man/curs_instr.3x +++ b/man/curs_instr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,73 +27,104 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_instr.3x,v 1.24 2021/12/25 21:41:58 tom Exp $ -.TH curs_instr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_instr.3x,v 1.51 2024/04/20 21:24:19 tom Exp $ +.TH curs_instr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBinstr\fP, -\fBinnstr\fP, -\fBwinstr\fP, -\fBwinnstr\fP, -\fBmvinstr\fP, -\fBmvinnstr\fP, -\fBmvwinstr\fP, -\fBmvwinnstr\fP \- get a string of characters from a \fBcurses\fP window +\fB\%instr\fP, +\fB\%innstr\fP, +\fB\%winstr\fP, +\fB\%winnstr\fP, +\fB\%mvinstr\fP, +\fB\%mvinnstr\fP, +\fB\%mvwinstr\fP, +\fB\%mvwinnstr\fP \- +get a string from a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint instr(char *\fP\fIstr\fP\fB);\fP -.br -\fBint innstr(char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint winstr(WINDOW *\fP\fIwin\fP\fB, char *\fP\fIstr\fP\fB);\fP -.br -\fBint winnstr(WINDOW *\fP\fIwin\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvinstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvinnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwinstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB);\fP -.br -\fBint mvwinnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint instr(char *\fIstr\fP); +\fBint innstr(char *\fIstr\fP, int \fIn\fP); +\fBint winstr(WINDOW *\fIwin\fP, char *\fIstr\fP); +\fBint winnstr(WINDOW *\fIwin\fP, char *\fIstr\fP, int \fIn\fP); +.PP +\fBint mvinstr(int \fIy\fP, int \fIx\fP, char *\fIstr\fP); +\fBint mvinnstr(int \fIy\fP, int \fIx\fP, char *\fIstr\fP, int \fIn\fP); +\fBint mvwinstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, char *\fIstr\fP); +\fBint mvwinnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, char *\fIstr\fP, int \fIn\fP); +.fi .SH DESCRIPTION -These routines return a string of characters in \fIstr\fP, extracted starting -at the current cursor position in the named window. +These routines return a string of characters in \fIstr\fP, +starting at the current cursor position in the named window. Attributes are stripped from the characters. -The four -functions with \fIn\fP as the last argument return a leading substring at most -\fIn\fP characters long (exclusive of the trailing NUL). +.PP +The four functions with \fIn\fP as the last argument return +a leading substring at most \fIn\fP characters long +(exclusive of the trailing NUL). +Transfer stops at the end of the current line, or when \fIn\fP characters have +been stored at the location referenced by \fIstr\fP. .SH RETURN VALUE All of the functions return \fBERR\fP upon failure, or the number of characters actually read into the string. .PP X/Open Curses defines no error conditions. -In this implementation: +This implementation returns an error .bP -If the \fIwin\fP parameter is null, an error is returned, +if the \fIwin\fP parameter is null or .bP -If the \fIchstr\fP parameter is null, an error is returned, +if the \fIchstr\fP parameter is null. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH NOTES -Note that all routines except \fBwinnstr\fP may be macros. +All routines except \fBwinnstr\fP may be macros. +.PP +Reading a line that overflows the array pointed to by +\fIstr\fP +with +\fBinstr\fP, +\fBmvinstr\fP, +\fBmvwinstr\fP +or +\fBwinstr\fP +causes undefined results. +Therefore, the use of +\fBinnstr\fP, +\fBmvinnstr\fP, +\fBmvwinnstr\fP, or +\fBwinnstr\fP +is recommended. .SH PORTABILITY SVr4 does not document whether a length limit includes or excludes the trailing NUL. .PP -The ncurses library extends the XSI description by allowing a negative -value for \fIn\fP. +The \fI\%ncurses\fP library extends the X/Open Curses description by allowing a +negative value for \fIn\fP. In this case, the functions return the string ending at the right margin. .SH SEE ALSO -\fBcurses\fP(3X). +\fB\%curs_ins_wstr\fP(3X) describes comparable functions of the +.I \%ncurses +library in its wide-character configuration +.RI ( \%ncursesw ). +.PP +\fB\%curses\fP(3X), +\fB\%curs_inch\fP(3X), +\fB\%curs_inchstr\fP(3X) diff --git a/man/curs_inwstr.3x b/man/curs_inwstr.3x index c33b2f59..eec361d7 100644 --- a/man/curs_inwstr.3x +++ b/man/curs_inwstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,45 +27,49 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inwstr.3x,v 1.16 2021/12/25 21:49:32 tom Exp $ -.TH curs_inwstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_inwstr.3x,v 1.41 2024/04/20 21:20:07 tom Exp $ +.TH curs_inwstr 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME -\fBinwstr\fP, -\fBinnwstr\fP, -\fBwinwstr\fP, -\fBwinnwstr\fP, -\fBmvinwstr\fP, -\fBmvinnwstr\fP, -\fBmvwinwstr\fP, -\fBmvwinnwstr\fP \- get a string of \fBwchar_t\fP characters from a curses window +\fB\%inwstr\fP, +\fB\%innwstr\fP, +\fB\%winwstr\fP, +\fB\%winnwstr\fP, +\fB\%mvinwstr\fP, +\fB\%mvinnwstr\fP, +\fB\%mvwinwstr\fP, +\fB\%mvwinnwstr\fP \- +get a wide-character string from a \fIcurses\fR window .SH SYNOPSIS .nf -\fB#include \fP -.sp -\fBint inwstr(\fP\fBwchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint innwstr(\fP\fBwchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint winwstr(\fP\fBWINDOW *\fP\fIwin\fP\fB, wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint winnwstr(\fP\fBWINDOW *\fP\fIwin\fP\fB, wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.sp -\fBint mvinwstr(\fP\fBint \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvinnwstr(\fP\fBint \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint mvwinwstr(\fP\fBWINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wchar_t *\fP\fIwstr\fP\fB);\fP -.br -\fBint mvwinnwstr(\fP\fBWINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, wchar_t *\fP\fIwstr\fP\fB, int \fP\fIn\fP\fB);\fP +\fB#include +.PP +\fBint inwstr(wchar_t *\fIwstr\fP); +\fBint innwstr(wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint winwstr(WINDOW *\fIwin\fP, wchar_t *\fIwstr\fP); +\fBint winnwstr(WINDOW *\fIwin\fP, wchar_t *\fIwstr\fP, int \fIn\fP); +.PP +\fBint mvinwstr(int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP); +\fBint mvinnwstr(int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint mvwinwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP); +\fBint mvwinnwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP, int \fIn\fP); .fi .SH DESCRIPTION -.PP These routines return a string of \fBwchar_t\fP wide characters in \fIwstr\fP, -extracted starting at the current cursor position in the named window. +starting at the current cursor position in the named window. .PP The four functions with \fIn\fP as the last argument return a leading substring at most \fIn\fP characters long @@ -75,17 +79,6 @@ been stored at the location referenced by \fIwstr\fP. .PP If the size \fIn\fP is not large enough to store a complete complex character, an error is generated. -.SH NOTES -.PP -All routines except -\fBwinnwstr\fP -may be macros. -.PP -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 \fBin_wchstr\fP to return the complex characters from a window. .SH RETURN VALUE All routines return \fBERR\fP @@ -97,10 +90,52 @@ routines return routines return the number of characters read into the string. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +X/Open defines no error conditions. +This implementation returns an error +.bP +if the \fIwin\fP parameter is null or +.bP +if the \fIwstr\fP parameter is null, or +.bP +if no characters could be read. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.SH NOTES +All routines except +\fBwinnwstr\fP +may be macros. +.PP +Each cell in the window holds a complex character +(a spacing character and zero or more non-spacing characters) +together with attributes and color. +These functions store only the wide characters, +ignoring attributes and color. +Use \fBin_wchstr\fP to return the complex characters from a window. +.PP +Reading a line that overflows the array pointed to by +\fIwstr\fP +with +\fBinwstr\fP, +\fBmvinwstr\fP, +\fBmvwinwstr\fP +or +\fBwinwstr\fP +causes undefined results. +Therefore, the use of +\fBinnwstr\fP, +\fBmvinnwstr\fP, +\fBmvwinnwstr\fP, or +\fBwinnwstr\fP +is recommended. +.SH PORTABILITY +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_instr\fP(3X), -\fBcurs_in_wchstr\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_inch\fP(3X), +\fB\%curs_inchstr\fP(3X), +\fB\%curs_instr\fP(3X), +\fB\%curs_in_wchstr\fP(3X) diff --git a/man/curs_kernel.3x b/man/curs_kernel.3x index fe5b6ba5..e85c1327 100644 --- a/man/curs_kernel.3x +++ b/man/curs_kernel.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,87 +27,83 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_kernel.3x,v 1.31 2021/12/25 21:49:32 tom Exp $ -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_kernel.3x,v 1.61 2024/04/20 21:24:19 tom Exp $ +.TH curs_kernel 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_kernel 3X "" -.na -.hy 0 .SH NAME -\fBdef_prog_mode\fP, -\fBdef_shell_mode\fP, -\fBreset_prog_mode\fP, -\fBreset_shell_mode\fP, -\fBresetty\fP, -\fBsavetty\fP, -\fBgetsyx\fP, -\fBsetsyx\fP, -\fBripoffline\fP, -\fBcurs_set\fP, -\fBnapms\fP \- low-level \fBcurses\fP routines -.ad -.hy +\fB\%def_prog_mode\fP, +\fB\%def_shell_mode\fP, +\fB\%reset_prog_mode\fP, +\fB\%reset_shell_mode\fP, +\fB\%resetty\fP, +\fB\%savetty\fP, +\fB\%getsyx\fP, +\fB\%setsyx\fP, +\fB\%ripoffline\fP, +\fB\%curs_set\fP, +\fB\%napms\fP \- +low-level \fIcurses\fR routines .SH SYNOPSIS -\fB#include \fP -.sp -\fBint def_prog_mode(void);\fP -.br -\fBint def_shell_mode(void);\fP -.sp -\fBint reset_prog_mode(void);\fP -.br -\fBint reset_shell_mode(void);\fP -.sp -\fBint resetty(void);\fP -.br -\fBint savetty(void);\fP -.sp -\fBvoid getsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBvoid setsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.sp -\fBint ripoffline(int \fP\fIline\fP\fB, int (*\fP\fIinit\fP\fB)(WINDOW *, int));\fP -.br -\fBint curs_set(int \fP\fIvisibility\fP\fB);\fP -.br -\fBint napms(int \fP\fIms\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint def_prog_mode(void); +\fBint def_shell_mode(void); +.PP +\fBint reset_prog_mode(void); +\fBint reset_shell_mode(void); +.PP +\fBint resetty(void); +\fBint savetty(void); +.PP +\fBvoid getsyx(int \fIy\fP, int \fIx\fP); +\fBvoid setsyx(int \fIy\fP, int \fIx\fP); +.PP +\fBint ripoffline(int \fIline\fP, int (*\fIinit\fP)(WINDOW *, int)); +\fBint curs_set(int \fIvisibility\fP); +\fBint napms(int \fIms\fP); +.fi .SH DESCRIPTION The following routines give low-level access to various \fBcurses\fP capabilities. These routines typically are used inside library routines. -.SS def_prog_mode, def_shell_mode -.PP +.SS "def_prog_mode, def_shell_mode" The \fBdef_prog_mode\fP and \fBdef_shell_mode\fP routines save the -current terminal modes as the \*(``program\*('' (in \fBcurses\fP) or \*(``shell\*('' +current terminal modes as the \*(``program\*('' +(in \fBcurses\fP) or \*(``shell\*('' (not in \fBcurses\fP) state for use by the \fBreset_prog_mode\fP and \fBreset_shell_mode\fP routines. This is done automatically by \fBinitscr\fP. There is one such save area for each screen context allocated by \fBnewterm\fP. -.SS reset_prog_mode, reset_shell_mode -.PP +.SS "reset_prog_mode, reset_shell_mode" The \fBreset_prog_mode\fP and \fBreset_shell_mode\fP routines restore the terminal to \*(``program\*('' (in \fBcurses\fP) or \*(``shell\*('' (out of \fBcurses\fP) state. These are done automatically by \fBendwin\fP(3X) and, after an \fBendwin\fP, by \fBdoupdate\fP, so they normally are not called. -.SS resetty, savetty -.PP +.SS "resetty, savetty" The \fBresetty\fP and \fBsavetty\fP routines save and restore the state of the terminal modes. \fBsavetty\fP saves the current state in a buffer and \fBresetty\fP restores the state to what it was at the last call to \fBsavetty\fP. .SS getsyx -.PP The \fBgetsyx\fP routine returns the current coordinates of the \fIvirtual screen\fP cursor in \fIy\fP and \fIx\fP. If \fBleaveok\fP is currently \fBTRUE\fP, then @@ -120,7 +116,6 @@ therefore, \fIy\fP and \fIx\fP should be used only as arguments for Few applications will use this feature, most use \fBgetyx\fP instead. .SS setsyx -.PP The \fBsetsyx\fP routine sets the \fIvirtual screen\fP cursor to \fIy\fP, \fIx\fP. If \fIy\fP and \fIx\fP are both \fB\-1\fP, then @@ -137,11 +132,10 @@ at the beginning, do its manipulation of its own windows, do a Few applications will use this feature, most use \fBwmove\fP instead. .SS ripoffline -.PP -The \fBripoffline\fP routine provides access to the same facility that -\fBslk_init\fP [see \fBcurs_slk\fP(3X)] uses to reduce the size of the -screen. -\fBripoffline\fP must be called before \fBinitscr\fP or +.B \%ripoffline +provides access to the same facility that \fB\%slk_init\fP(3X) uses to +reduce the size of the screen. +\fB\%ripoffline\fP must be called before \fBinitscr\fP or \fBnewterm\fP is called, to prepare these initial actions: .bP If \fIline\fP is positive, a line is removed from the top of \fBstdscr\fP. @@ -165,7 +159,6 @@ It is allowable to call \fBwnoutrefresh\fP during the initialization routine. \fBripoffline\fP can be called up to five times before calling \fBinitscr\fP or \fBnewterm\fP. .SS curs_set -.PP The \fBcurs_set\fP routine sets the cursor state to invisible, normal, or very visible for \fBvisibility\fP equal to \fB0\fP, \fB1\fP, or \fB2\fP respectively. @@ -173,8 +166,15 @@ If the terminal supports the \fIvisibility\fP requested, the previous \fIcursor\fP state is returned; otherwise, \fBERR\fP is returned. .SS napms -.PP -The \fBnapms\fP routine is used to sleep for \fIms\fP milliseconds. +.B \%napms +sleeps for +.I ms +milliseconds. +If +.I ms +exceeds 30,000 +(thirty seconds), +it is capped at that value. .SH RETURN VALUE Except for \fBcurs_set\fP, these routines always return \fBOK\fP. .PP @@ -185,18 +185,14 @@ requested \fIvisibility\fP is not supported. X/Open defines no error conditions. In this implementation .TP 5 -.na -.hy 0 \fBdef_prog_mode\fP, \fBdef_shell_mode\fP, \fBreset_prog_mode\fP, \fBreset_shell_mode\fP -.hy -.ad return an error if the terminal was not initialized, or if the I/O call to obtain the terminal settings fails. .TP 5 \fBripoffline\fP returns an error if the maximum number of ripped-off lines -exceeds the maximum (NRIPS = 5). +exceeds the maximum (5). .SH NOTES Note that \fBgetsyx\fP is a macro, so \fB&\fP is not necessary before the variables \fIy\fP and \fIx\fP. @@ -206,26 +202,30 @@ of \fBcurs_set\fP \*(``is currently incorrect\*(''. This implementation gets it right, but it may be unwise to count on the correctness of the return value anywhere else. .PP -Both ncurses and SVr4 will call \fBcurs_set\fP in \fBendwin\fP +Both \fI\%ncurses\fP and SVr4 will call \fBcurs_set\fP in \fBendwin\fP if \fBcurs_set\fP has been called to make the cursor other than normal, i.e., either invisible or very visible. -There is no way for ncurses to determine the initial cursor state to -restore that. +There is no way for \fI\%ncurses\fP to determine the initial cursor +state to restore that. .SH PORTABILITY The \fIvirtual screen\fP functions \fBsetsyx\fP and \fBgetsyx\fP -are not described in the XSI Curses standard, Issue 4. -All other functions are as described in XSI Curses. +are not described in X/Open Curses, Issue 4. +All other functions are as described in X/Open Curses. .PP The SVr4 documentation describes \fBsetsyx\fP and \fBgetsyx\fP as having return type int. This is misleading, as they are macros with no documented semantics for the return value. +.PP +If interrupted, \fI\%ncurses\fP restarts \fBnapms\fP. +That, and the limitation to 30 seconds, +are different from other implementations. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_outopts\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_scr_dump\fP(3X), -\fBcurs_slk\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_outopts\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_scr_dump\fP(3X), +\fB\%curs_slk\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x index c2eb86b8..24be01b8 100644 --- a/man/curs_legacy.3x +++ b/man/curs_legacy.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019,2020 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2007-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,82 +27,112 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_legacy.3x,v 1.12 2020/10/18 00:16:04 tom Exp $ +.\" $Id: curs_legacy.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH curs_legacy 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_legacy 3X "" .SH NAME -curs_legacy \- get \fBcurses\fP cursor and window coordinates, attributes +\fB\%getattrs\fP, +\fB\%getbegx\fP, +\fB\%getbegy\fP, +\fB\%getcurx\fP, +\fB\%getcury\fP, +\fB\%getmaxx\fP, +\fB\%getmaxy\fP, +\fB\%getparx\fP, +\fB\%getpary\fP \- +get \fIcurses\fR cursor and window coordinates or attributes (legacy) .SH SYNOPSIS -\fB#include \fP -.sp -\fBint getattrs(const WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint getbegx(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint getbegy(const WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint getcurx(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint getcury(const WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint getmaxx(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint getmaxy(const WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint getparx(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint getpary(const WINDOW *\fP\fIwin\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint getattrs(const WINDOW *\fIwin\fP); +.PP +\fBint getbegx(const WINDOW *\fIwin\fP); +\fBint getbegy(const WINDOW *\fIwin\fP); +.PP +\fBint getcurx(const WINDOW *\fIwin\fP); +\fBint getcury(const WINDOW *\fIwin\fP); +.PP +\fBint getmaxx(const WINDOW *\fIwin\fP); +\fBint getmaxy(const WINDOW *\fIwin\fP); +.PP +\fBint getparx(const WINDOW *\fIwin\fP); +\fBint getpary(const WINDOW *\fIwin\fP); +.fi .SH DESCRIPTION -These legacy functions are simpler to use than the X/Open Curses functions: +These legacy functions are simpler to use +than the X/Open \fIcurses\fP functions: .bP -The \fBgetattrs\fP function returns the same attribute data as \fBwattr_get\fP. +The \fB\%getattrs\fP function returns the same attribute data +as \fB\%wattr_get\fP. .IP -However, \fBgetattrs\fP returns an integer (actually a \fBchtype\fP), -while \fBwattr_get\fP returns the current color pair in a separate parameter. +However, \fB\%getattrs\fP returns an integer (actually a \fB\%chtype\fP), +while \fB\%wattr_get\fP returns the current color pair in a separate parameter. In the wide-character library configuration, -color pairs may not fit into a \fBchtype\fP, -so \fBwattr_get\fP is the only way to obtain the color information. +color pairs may not fit into a \fB\%chtype\fP, +so \fB\%wattr_get\fP is the only way to obtain the color information. .IP -Because \fBgetattrs\fP returns the attributes in a single parameter, +Because \fB\%getattrs\fP returns the attributes in a single parameter, it would not be possible for an application to distinguish that from \fBERR\fP (a \fI-1\fP). -If the window parameter is null, \fBgetattrs\fP returns \fBA_NORMAL\fP (zero). +If the window parameter is null, \fB\%getattrs\fP +returns \fB\%A_NORMAL\fP (zero). .bP -The \fBgetbegy\fP and \fBgetbegx\fP functions return the same -data as \fBgetbegyx\fP. +The \fB\%getbegy\fP and \fB\%getbegx\fP functions return the same +data as \fB\%getbegyx\fP. .bP -The \fBgetcury\fP and \fBgetcurx\fP functions return the same -data as \fBgetyx\fP. +The \fB\%getcury\fP and \fB\%getcurx\fP functions return the same +data as \fB\%getyx\fP. .bP -The \fBgetmaxy\fP and \fBgetmaxx\fP functions return the same -data as \fBgetmaxyx\fP. +The \fB\%getmaxy\fP and \fB\%getmaxx\fP functions return the same +data as \fB\%getmaxyx\fP. .bP -The \fBgetpary\fP and \fBgetparx\fP functions return the same -data as \fBgetparyx\fP. +The \fB\%getpary\fP and \fB\%getparx\fP functions return the same +data as \fB\%getparyx\fP. .SH RETURN VALUE Except as noted, these functions return an integer, or \fBERR\fP if the window parameter is null. .SH NOTES -All of these interfaces are provided as macros and functions. -The macros are suppressed (and only the functions provided) -when \fBNCURSES_OPAQUE\fP is defined. -The standard forms such as \fBgetyx\fP must be implemented as macros, -and (in this implementation) are defined in terms of the functions -described here, -to avoid reliance on internal details of the WINDOW structure. +All of these interfaces are implemented as macros and functions. +The macros are suppressed +(and only the functions provided) +in an \*(``opaque\*('' +.I \%ncurses +build, +which defines the preprocessor symbol +.BR \%NCURSES_OPAQUE . +See section \*(``ALTERNATE CONFIGURATIONS\*('' in \fB\%ncurses\fP(3X). +.PP +The standard forms such as \fB\%getyx\fP +.I must +be implemented as macros, +and +(in this implementation) +are defined in terms of the functions described here, +to avoid reliance on internal details of the \fI\%WINDOW\fP structure. .SH PORTABILITY These functions were supported on Version 7, BSD or System V implementations. None of those implementations checked the window parameter. .PP -The \fBgetattrs\fP function and macro are defined to return a (signed) integer +The \fB\%getattrs\fP function and macro are defined to return a (signed) integer for compatibility with those implementations although an unsigned type would have been more appropriate. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_getyx\fP(3X), -\fBcurs_opaque\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_getyx\fP(3X), +\fB\%curs_opaque\fP(3X) diff --git a/man/curs_memleaks.3x b/man/curs_memleaks.3x index 526b2fca..0626d774 100644 --- a/man/curs_memleaks.3x +++ b/man/curs_memleaks.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2008-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,73 +27,80 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_memleaks.3x,v 1.12 2021/12/25 17:39:16 tom Exp $ -.TH curs_memleaks 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_memleaks.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH curs_memleaks 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME -\fBexit_curses\fP, -\fBexit_terminfo\fP \- \fBcurses\fP memory-leak checking -.ad -.hy +\fB\%exit_curses\fP, +\fB\%exit_terminfo\fP \- +check for memory leaks in \fIcurses\fR .SH SYNOPSIS -\fB#include \fP -.br -\fBvoid exit_curses(int \fP\fIcode\fP\fB);\fP -.sp -\fB#include \fP -.br -\fBvoid exit_terminfo(int \fP\fIcode\fP\fB);\fP -.sp -/* deprecated (intentionally not declared in curses.h or term.h) */ -.br -\fBvoid _nc_freeall(void);\fP -.br -\fBvoid _nc_free_and_exit(int \fP\fIcode\fP\fB);\fP -.br -\fBvoid _nc_free_tinfo(int \fP\fIcode\fP\fB);\fP +.nf +\fB#include +\fBvoid exit_curses(int \fIcode\fP); +.PP +\fB#include +\fBvoid exit_terminfo(int \fIcode\fP); +.PP +\fI/* deprecated (intentionally not declared in curses.h or term.h) */ +\fBvoid _nc_freeall(void); +\fBvoid _nc_free_and_exit(int \fIcode\fP); +\fBvoid _nc_free_tinfo(int \fIcode\fP); +.fi .SH DESCRIPTION -These functions are used to simplify analysis of memory leaks in the ncurses -library. +These functions are used to simplify analysis of memory leaks in the +\fI\%ncurses\fP library. .PP Any implementation of curses must not free the memory associated with -a screen, since (even after calling \fBendwin\fP(3X)), it must be available -for use in the next call to \fBrefresh\fP(3X). +a screen, since (even after calling \fB\%endwin\fP(3X)), it must be available +for use in the next call to \fB\%refresh\fP(3X). There are also chunks of memory held for performance reasons. That makes it hard to analyze curses applications for memory leaks. -When using the specially configured debugging version of the ncurses library, +When using the specially configured debugging version of the +\fI\%ncurses\fP library, applications can call functions which free those chunks of memory, simplifying the process of memory-leak checking. .PP Some of the functions are named with a \*(``_nc_\*('' prefix because they are not intended for use in the non-debugging library: .TP 5 -\fB_nc_freeall\fP -This frees (almost) all of the memory allocated by ncurses. +\fB\%_nc_freeall\fP +This frees (almost) all of the memory allocated by \fI\%ncurses\fP. .TP 5 -\fB_nc_free_and_exit\fP -This frees the memory allocated by ncurses (like \fB_nc_freeall\fP), +\fB\%_nc_free_and_exit\fP +This frees the memory allocated by \fI\%ncurses\fP +(like \fB\%_nc_freeall\fP), and exits the program. -It is preferred over \fB_nc_freeall\fP since some of that memory +It is preferred over \fB\%_nc_freeall\fP since some of that memory may be required to keep the application running. Simply exiting (with the given exit-code) is safer. .TP 5 -\fB_nc_free_tinfo\fP +\fB\%_nc_free_tinfo\fP Use this function if only the low-level terminfo functions (and corresponding library) are used. -Like \fB_nc_free_and_exit\fP, it exits the program after freeing memory. +Like \fB\%_nc_free_and_exit\fP, it exits the program after freeing memory. .PP The functions prefixed \*(``_nc\*('' are normally not available; they must be configured into the library -at build time using the \fB\-\-disable-leaks\fP option. +at build time using the \fB\%\-\-disable-leaks\fP option. That compiles-in code that frees memory that normally would not be freed. .PP -The \fBexit_curses\fP and \fBexit_terminfo\fP functions -call \fB_nc_free_and_exit\fP and \fB_nc_free_tinfo\fP if +The \fB\%exit_curses\fP and \fB\%exit_terminfo\fP functions +call \fB\%_nc_free_and_exit\fP and \fB\%_nc_free_tinfo\fP if the library is configured to support memory-leak checking. If the library is not configured to support memory-leak checking, they simply call \fBexit\fP. @@ -102,5 +109,23 @@ These functions do not return a value. .SH PORTABILITY These functions are not part of X/Open Curses; nor do other implementations of curses provide a similar feature. +.PP +In any implementation of X/Open Curses, an application can free part +of the memory allocated by curses: +.bP +The portable part of \fB\%exit_curses\fP can be freed using \fB\%delscreen\fP, +passing the \fISCREEN\fP pointer returned by \fB\%newterm\fP. +.IP +In some implementations, there is a global variable \fBsp\fP +which could be used, e.g., if the screen were only initialized +using \fB\%initscr\fP. +.bP +The portable part of \fB\%exit_terminfo\fP can be freed +using \fB\%del_curterm\fP. +.IP +In this case, there is a global variable \fB\%cur_term\fP which can be +used as parameter. .SH SEE ALSO -\fBcurses\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_terminfo\fP(3X) diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x index 9571648f..8e5c7018 100644 --- a/man/curs_mouse.3x +++ b/man/curs_mouse.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2021,2022 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,78 +28,77 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_mouse.3x,v 1.58 2022/01/16 01:40:48 tom Exp $ -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +.\" $Id: curs_mouse.3x,v 1.98 2024/04/20 19:02:07 tom Exp $ +.TH curs_mouse 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_mouse 3X "" -.na -.hy 0 .SH NAME -\fBhas_mouse\fP, -\fBgetmouse\fP, \fBungetmouse\fP, -\fBmousemask\fP, \fBwenclose\fP, -\fBmouse_trafo\fP, \fBwmouse_trafo\fP, -\fBmouseinterval\fP \- mouse interface through curses -.ad -.hy +\fB\%has_mouse\fP, +\fB\%getmouse\fP, +\fB\%ungetmouse\fP, +\fB\%mousemask\fP, +\fB\%wenclose\fP, +\fB\%mouse_trafo\fP, +\fB\%wmouse_trafo\fP, +\fB\%mouseinterval\fP \- +get mouse events in \fIcurses\fR .SH SYNOPSIS -\fB#include \fP +.nf +\fB#include .PP -\fBtypedef unsigned long mmask_t;\fP +\fBtypedef unsigned long mmask_t; .PP -.nf -\fBtypedef struct {\fP -\fB short id; \fP\fI/* ID to distinguish multiple devices */\fP -\fB int x, y, z; \fP\fI/* event coordinates */\fP -\fB mmask_t bstate; \fP\fI/* button state bits */\fP -\fB} MEVENT;\fP -.fi +\fBtypedef struct { +\fB short id; \fI/* ID to distinguish multiple devices */ +\fB int x, y, z; \fI/* event coordinates */ +\fB mmask_t bstate; \fI/* button state bits */ +\fB} MEVENT; .PP -\fBbool has_mouse(void);\fP -.sp -\fBint getmouse(MEVENT *\fP\fIevent\fP\fB);\fP -.br -\fBint ungetmouse(MEVENT *\fP\fIevent\fP\fB);\fP -.sp -\fBmmask_t mousemask(mmask_t \fP\fInewmask\fP\fB, mmask_t *\fP\fIoldmask\fP\fB);\fP -.sp -\fBbool wenclose(const WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.sp -\fBbool mouse_trafo(int* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB, bool \fP\fIto_screen\fP\fB);\fP -.br -\fBbool wmouse_trafo(const WINDOW* \fP\fIwin\fP\fB,\fP - \fBint* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB, bool \fP\fIto_screen\fP\fB);\fP -.sp -\fBint mouseinterval(int \fP\fIerval\fP\fB);\fP -.br +\fBbool has_mouse(void); +.PP +\fBmmask_t mousemask(mmask_t \fInewmask\fP, mmask_t *\fIoldmask\fP); +.PP +\fBint getmouse(MEVENT *\fIevent\fP); +\fBint ungetmouse(MEVENT *\fIevent\fP); +.PP +\fBbool wenclose(const WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +.PP +\fBbool mouse_trafo(int* \fIpY\fP, int* \fIpX\fP, bool \fIto_screen\fP); +\fBbool wmouse_trafo(const WINDOW* \fIwin\fP, +.ti +18n \" "bool wmouse_trafo(" +\fBint* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB); +.PP +\fBint mouseinterval(int \fIerval\fB);\fR +.fi .SH DESCRIPTION These functions provide an interface to mouse events from -\fBncurses\fP(3X). -Mouse events are represented by \fBKEY_MOUSE\fP -pseudo-key values in the \fBwgetch\fP(3X) input stream. -.SS mousemask +\fB\%ncurses\fP(3X). +Mouse events are represented by \fB\%KEY_MOUSE\fP +pseudo-key values in the \fB\%wgetch\fP(3X) input stream. +.SS has_mouse +The \fB\%has_mouse\fP function returns \fBTRUE\fP if the mouse driver +has been successfully initialized, +and \fBFALSE\fP otherwise. .PP -To make mouse events visible, use the \fBmousemask\fP function. +Mouse events are ignored when input is in cooked mode, and +cause an error beep when cooked mode is being simulated in a window by a +function such as \fB\%getstr\fP that expects a linefeed for input-loop +termination. +.SS mousemask +To make mouse events visible, use the \fB\%mousemask\fP function. This sets the mouse events to be reported. By default, no mouse events are reported. .bP @@ -110,22 +109,21 @@ If the screen has not been initialized, or if the terminal does not support mouse-events, this function returns 0. .bP -If \fIoldmask\fP is non-NULL, +If \fIoldmask\fP is non-\fBNULL\fP, this function fills the indicated location with the previous value of the current screen's mouse event mask. .PP -As a side effect, setting a zero mousemask may turn off the mouse pointer; +As a side effect, setting a zero mouse mask may turn off the mouse pointer; setting a nonzero mask may turn it on. Whether this happens is device-dependent. -.SS Mouse events -.PP +.SS "Mouse Events" Here are the mouse event type masks which may be defined: .PP .TS -l l -_ _ -l l. -\fBName\fP \fBDescription\fP +Lb Lb +Lb Lx. +Name Description += BUTTON1_PRESSED mouse button 1 down BUTTON1_RELEASED mouse button 1 up BUTTON1_CLICKED mouse button 1 clicked @@ -156,203 +154,156 @@ BUTTON5_CLICKED mouse button 5 clicked BUTTON5_DOUBLE_CLICKED mouse button 5 double clicked BUTTON5_TRIPLE_CLICKED mouse button 5 triple clicked _ -BUTTON_SHIFT shift was down during button state change -BUTTON_CTRL control was down during button state change -BUTTON_ALT alt was down during button state change +BUTTON_SHIFT T{ +shift was down during button state change +T} +BUTTON_CTRL T{ +control was down during button state change +T} +BUTTON_ALT T{ +alt was down during button state change +T} ALL_MOUSE_EVENTS report all button state changes REPORT_MOUSE_POSITION report mouse movement _ .TE .SS getmouse -.PP Once a class of mouse events has been made visible in a window, -calling the \fBwgetch\fP function on that window may return -\fBKEY_MOUSE\fP as an indicator that a mouse event has been queued. +calling the \fB\%wgetch\fP function on that window may return +\fB\%KEY_MOUSE\fP as an indicator that a mouse event has been queued. To read the event data and pop the event off the queue, call -\fBgetmouse\fP. +\fB\%getmouse\fP. This function will return \fBOK\fP if a mouse event is actually visible in the given window, \fBERR\fP otherwise. -When \fBgetmouse\fP returns \fBOK\fP, the data deposited as y and +When \fB\%getmouse\fP returns \fBOK\fP, the data deposited as y and x in the event structure coordinates will be screen-relative character-cell coordinates. The returned state mask will have exactly one bit set to indicate the event type. The corresponding data in the queue is marked invalid. -A subsequent call to \fBgetmouse\fP will retrieve the next older +A subsequent call to \fB\%getmouse\fP will retrieve the next older item from the queue. .SS ungetmouse -.PP -The \fBungetmouse\fP function behaves analogously to \fBungetch\fP. +The \fB\%ungetmouse\fP function behaves analogously to \fB\%ungetch\fP. It pushes -a \fBKEY_MOUSE\fP event onto the input queue, and associates with that event +a \fB\%KEY_MOUSE\fP event onto the input queue, and associates with that event the given state data and screen-relative character-cell coordinates. .SS wenclose -.PP -The \fBwenclose\fP function tests whether a given pair of screen-relative +The \fB\%wenclose\fP function tests whether a given pair of screen-relative character-cell coordinates is enclosed by a given window, returning \fBTRUE\fP if it is and \fBFALSE\fP otherwise. It is useful for determining what subset of the screen windows enclose the location of a mouse event. -.SS wmouse_trafo .PP -The \fBwmouse_trafo\fP function transforms a given pair of coordinates -from stdscr-relative coordinates +If the parameter is a pad, +\fB\%wenclose\fP uses the most recent screen coordinates used for +this pad in +\fB\%prefresh\fP(3X) or +\fB\%pnoutrefresh\fP(3X). +.SS wmouse_trafo +The \fB\%wmouse_trafo\fP function transforms a given pair of coordinates +from \fB\%stdscr\fP-relative coordinates to coordinates relative to the given window or vice versa. -The resulting stdscr-relative coordinates are not always identical -to window-relative coordinates due to the mechanism to reserve lines on top -or bottom of the screen for other purposes -(see the \fBripoffline\fP and \fBslk_init\fP(3X) calls, for example). +The resulting \fB\%stdscr\fP-relative coordinates are not always +identical to screen coordinates due to the mechanism to reserve +lines on top or bottom of the screen for other purposes +(see the \fB\%ripoffline\fP(3X) and \fB\%slk_init\fP(3X) calls, for example). .bP If the parameter \fIto_screen\fP is \fBTRUE\fP, the pointers \fIpY, pX\fP must reference the coordinates of a location inside the window \fIwin\fP. -They are converted to window-relative coordinates and returned +They are converted to \fB\%stdscr\fP-relative coordinates and returned through the pointers. If the conversion was successful, the function returns \fBTRUE\fP. -.bP -If one of the parameters was NULL or the location is +.IP +If one of the parameters was \fBNULL\fP or the location is not inside the window, \fBFALSE\fP is returned. .bP If \fIto_screen\fP is -\fBFALSE\fP, the pointers \fIpY, pX\fP must reference window-relative -coordinates. -They are converted to stdscr-relative coordinates if the +\fBFALSE\fP, the pointers \fIpY, pX\fP must reference +\fB\%stdscr\fP-relative coordinates. +They are converted to window-relative coordinates if the window \fIwin\fP encloses this point. In this case the function returns \fBTRUE\fP. -.bP -If one of the parameters is NULL or the point is not inside the +.IP +If one of the parameters is \fBNULL\fP or the point is not inside the window, \fBFALSE\fP is returned. +.PP The referenced coordinates are only replaced by the converted coordinates if the transformation was successful. .SS mouse_trafo -.PP -The \fBmouse_trafo\fP function performs the same translation -as \fBwmouse_trafo\fP, -using stdscr for \fIwin\fP. +The \fB\%mouse_trafo\fP function performs the same translation +as \fB\%wmouse_trafo\fP, +using \fB\%stdscr\fP for \fIwin\fP. .SS mouseinterval +The \fB\%mouseinterval\fP function sets the maximum time +(in thousands of a second) +that can elapse between press and release events for them to +be resolved as a +.IR click . +An application might interpret button press and release events separated +by more than the mouse interval as a \*(``long press\*('', +or, +with motion, +as a \*(``drag\*(''. +.PP +Calling \fB\%mouseinterval(0)\fP disables click resolution. +When +.I \%ncurses +detects a mouse event, +it awaits further input activity up to this interval, +and then checks for a subsequent mouse event which can be combined +with the first event. +If the timeout expires without input activity +(which would happen with a zero interval), +then no click resolution will occur. .PP -The \fBmouseinterval\fP function sets the maximum time (in thousands of a -second) that can elapse between press and release events for them to -be recognized as a click. -Use \fBmouseinterval(0)\fP to disable click resolution. This function returns the previous interval value. -Use \fBmouseinterval(\-1)\fP to obtain the interval without altering it. -The default is one sixth of a second. -.SS has_mouse +Use \fB\%mouseinterval(\-1)\fP to obtain the interval without altering it. .PP -The \fBhas_mouse\fP function returns \fBTRUE\fP if the mouse driver has been -successfully initialized. -.PP -Note that mouse events will be ignored when input is in cooked mode, and will -cause an error beep when cooked mode is being simulated in a window by a -function such as \fBgetstr\fP that expects a linefeed for input-loop -termination. +The mouse interval is set to one sixth of a second +when the corresponding screen is initialized, +e.g., in \fBinitscr\fP(3X) or \fBsetupterm\fP(3X). .SH RETURN VALUE -\fBgetmouse\fP and \fBungetmouse\fP -return the integer \fBERR\fP upon failure or \fBOK\fP -upon successful completion: -.RS 3 -.TP 5 -\fBgetmouse\fP -returns an error. +\fB\%has_mouse\fP, +\fB\%wenclose\fP, +\fB\%mouse_trafo\fP, +and +\fB\%wmouse_trafo\fP +return \fBTRUE\fP or \fBFALSE\fP as noted above. +.PP +\fB\%getmouse\fP and \fB\%ungetmouse\fP +return \fBERR\fP upon failure and \fBOK\fP upon success. +.PP +\fB\%getmouse\fP fails if: .bP -If no mouse driver was initialized, or -if the mask parameter is zero, +no mouse driver was initialized, .bP -It returns an error if a mouse event was detected which did not match the -current \fImousemask\fP. +the mask of reportable events is zero, .bP -It also returns an error if no more events remain in the queue. -.TP 5 -\fBungetmouse\fP -returns an error if the FIFO is full. -.RE +a mouse event was detected that does not match the mask, +.bP +or if no more events remain in the queue. +.PP +\fB\%ungetmouse\fP returns an error if the event queue is full. .PP -\fBmousemask\fP +\fB\%mousemask\fP returns the mask of reportable events. .PP -\fBmouseinterval\fP +\fB\%mouseinterval\fP returns the previous interval value, unless the terminal was not initialized. In that case, it returns the maximum interval value (166). -.PP -\fBwenclose\fP and \fBwmouse_trafo\fP -are boolean functions returning \fBTRUE\fP or \fBFALSE\fP depending -on their test result. -.SH PORTABILITY -These calls were designed for \fBncurses\fP(3X), and are not found in SVr4 -curses, 4.4BSD curses, or any other previous version of curses. -.PP -SVr4 curses had support for the mouse in a variant of \fBxterm\fP(1). -It is mentioned in a few places, but with no supporting documentation: -.bP -the \*(``libcurses\*('' manual page lists functions for this feature -which are prototyped in \fBcurses.h\fP: -.NS -extern int mouse_set(long int); -extern int mouse_on(long int); -extern int mouse_off(long int); -extern int request_mouse_pos(void); -extern int map_button(unsigned long); -extern void wmouse_position(WINDOW *, int *, int *); -extern unsigned long getmouse(void), getbmap(void); -.NE -.bP -the \*(``terminfo\*('' manual page lists capabilities for the feature -.NS -buttons btns BT Number of buttons on the mouse -get_mouse getm Gm Curses should get button events -key_mouse kmous Km 0631, Mouse event has occurred -mouse_info minfo Mi Mouse status information -req_mouse_pos reqmp RQ Request mouse position report -.NE -.bP -the interface made assumptions (as does ncurses) about the escape sequences -sent to and received from the terminal. -.IP -For instance -the SVr4 curses library used the \fBget_mouse\fP capability to tell the -terminal which mouse button events it should send, -passing the mouse-button bit-mask to the terminal. -Also, it could ask the terminal -where the mouse was using the \fBreq_mouse_pos\fP capability. -.IP -Those features required a terminal which had been modified to work with curses. -They were not part of the X Consortium's xterm. -.PP -When developing the xterm mouse support for ncurses in September 1995, -Eric Raymond was uninterested in using the same interface due to its -lack of documentation. -Later, in 1998, Mark Hesseling provided support in -PDCurses 2.3 using the SVr4 interface. -PDCurses, however, does not use video terminals, -making it unnecessary to be concerned about compatibility with the -escape sequences. -.PP -The feature macro \fBNCURSES_MOUSE_VERSION\fP is provided so the preprocessor -can be used to test whether these features are present. -If the interface is changed, the value of \fBNCURSES_MOUSE_VERSION\fP will be -incremented. -These values for \fBNCURSES_MOUSE_VERSION\fP may be -specified when configuring ncurses: -.RS 3 -.TP 3 -1 -has definitions for reserved events. -The mask uses 28 bits. -.TP 3 -2 -adds definitions for button 5, -removes the definitions for reserved events. -The mask uses 29 bits. -.RE -.PP -The order of the \fBMEVENT\fP structure members is not guaranteed. +.SH NOTES +The order of the \fB\%MEVENT\fP structure members is not guaranteed. Additional fields may be added to the structure in the future. .PP -Under \fBncurses\fP(3X), these calls are implemented using either -xterm's built-in mouse-tracking API or +Under +.IR \%ncurses , +these calls are implemented using either +.IR \%xterm 's +built-in mouse-tracking API or platform-specific drivers including .RS 3 .bP @@ -365,23 +316,31 @@ OS/2 EMX .PP If you are using an unsupported configuration, mouse events will not be visible to -\fBncurses\fP(3X) (and the \fBmousemask\fP function will always +\fI\%ncurses\fP (and the \fB\%mousemask\fP function will always return \fB0\fP). .PP -If the terminfo entry contains a \fBXM\fP string, -this is used in the xterm mouse driver to control the +If the +.I \%term\%info +entry contains a \fBXM\fP string, +this is used in the +.I \%xterm +mouse driver to control the way the terminal is initialized for mouse operation. The default, if \fBXM\fP is not found, -corresponds to private mode 1000 of xterm: +corresponds to private mode 1000 of +.I \%xterm: .PP .RS 3 -\\E[?1000%?%p1%{1}%=%th%el%; +\eE[?1000%?%p1%{1}%=%th%el%; .RE .PP -The mouse driver also recognizes a newer xterm private mode 1006, e.g., +The mouse driver also recognizes a newer +.I \%xterm +private mode 1006, +e.g., .PP .RS 3 -\\E[?1006;1000%?%p1%{1}%=%th%el%; +\eE[?1006;1000%?%p1%{1}%=%th%el%; .RE .PP The \fIz\fP member in the event structure is not presently used. @@ -389,37 +348,178 @@ It is intended for use with touch screens (which may be pressure-sensitive) or with 3D-mice/trackballs/power gloves. .PP -The \fBALL_MOUSE_EVENTS\fP class does not include \fBREPORT_MOUSE_POSITION\fP. +The \fB\%ALL_MOUSE_EVENTS\fP class does not +include \fB\%REPORT_MOUSE_POSITION\fP. They are distinct. -For example, in xterm, +For example, +in +.IR \%xterm , wheel/scrolling mice send position reports as a sequence of presses of buttons 4 or 5 without matching button-releases. +.SH EXTENSIONS +These functions were designed for +\fB\%ncurses\fP(3X), +and are not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous curses implementation. +(SVr4 +.I curses +did have a +.I \%getmouse +function, +which took no argument and returned a different type.) +.SH PORTABILITY +Applications employing the +.I \%ncurses +mouse extension should condition its use on the visibility of the +.B \%NCURSES_MOUSE_VERSION +preprocessor macro. +When the interface changes, +the macro's value increments. +Multiple versions are available when +.I \%ncurses +is configured; +see section \*(``ALTERNATE CONFIGURATIONS\*('' of \fB\%ncurses\fP(3X). +The following values may be specified. +.RS 3 +.TP 3 +1 +has definitions for reserved events. +The mask uses 28 bits. +.TP 3 +2 +adds definitions for button 5, +removes the definitions for reserved events. +The mask uses 29 bits. +.RE +.PP +SVr4 +.I curses +had support for the mouse in a variant of \fI\%xterm\fP(1). +It is mentioned in a few places, +with little supporting documentation. +.bP +Its \*(``libcurses\*('' manual page lists functions for this feature +prototyped in \fI\%curses.h\fP. +.PP +.RS 8 +.EX +extern int mouse_set(long int); +extern int mouse_on(long int); +extern int mouse_off(long int); +extern int request_mouse_pos(void); +extern int map_button(unsigned long); +extern void wmouse_position(WINDOW *, int *, int *); +extern unsigned long getmouse(void), getbmap(void); +.EE +.RE +.bP +Its \*(``terminfo\*('' manual page lists capabilities for the feature. +.\" These don't appear in in the SVID 4th edition, Volume 3, +.\" terminfo(TI_ENV) man page. They can be found in, e.g., the "z/OS +.\" V1R1.0 C Curses" book, Chapter 17, pp. 179-186 (PDF 213-220). +.RS 8 +.TS +Lb Lb Lb Lx. +buttons btns BT T{ +Number of buttons on the mouse +T} +get_mouse getm Gm T{ +Curses should get button events +T} +key_mouse kmous Km T{ +0631, Mouse event has occurred +T} +mouse_info minfo Mi T{ +Mouse status information +T} +req_mouse_pos reqmp RQ T{ +Request mouse position report +T} +.TE +.RE +.bP +The interface made assumptions +(as does +.IR \%ncurses ) +about the escape sequences sent to and received from the terminal. +.IP +For instance, +the SVr4 +.I curses +library used the \fB\%get_mouse\fP capability to tell the terminal which +mouse button events it should send, +passing the mouse-button bit mask to the terminal. +Also, it could ask the terminal +where the mouse was using the \fB\%req_mouse_pos\fP capability. +.IP +Those features required a terminal program that had been modified +to work with SVr4 +.IR curses . +They were not part of the X Consortium's +.IR \%xterm . +.PP +When developing the +.I \%xterm +mouse support for +.I \%ncurses +in September 1995, +Eric Raymond was uninterested in using the same interface due to its +lack of documentation. +Later, in 1998, Mark Hesseling provided support in +.I \%PDCurses +2.3 using the SVr4 interface. +.IR \%PDCurses , +however, +does not use video terminals, +making it unnecessary to be concerned about compatibility with the +escape sequences. .SH BUGS -Mouse events under xterm will not in fact be ignored during cooked mode, -if they have been enabled by \fBmousemask\fP. -Instead, the xterm mouse -report sequence will appear in the string read. -.PP -Mouse events under xterm will not be detected correctly in a window with -its keypad bit off, since they are interpreted as a variety of function key. -Your terminfo description should have \fBkmous\fP set to \*(``\\E[M\*('' -(the beginning of the response from xterm for mouse clicks). -Other values for \fBkmous\fP are permitted, -but under the same assumption, -i.e., it is the beginning of the response. -.PP -Because there are no standard terminal responses that would serve to identify -terminals which support the xterm mouse protocol, \fBncurses\fP assumes that -if \fBkmous\fP is defined in the terminal description, -or if the terminal description's primary name or aliases -contain the string \*(``xterm\*('', +Mouse events from +.I \%xterm +are +.I not +ignored in cooked mode if they have been enabled by \fB\%mousemask\fP. +Instead, +the +.I \%xterm +mouse report sequence appears in the string read. +.PP +Mouse event reports from +.I \%xterm +are not detected correctly in a window with keypad application mode +disabled, +since they are interpreted as a variety of function key. +Set the terminal's +.I \%term\%info +capability \fB\%kmous\fP to \*(``\eE[M\*('' +(the beginning of the response from +.I \%xterm +for mouse clicks). +Other values of \fB\%kmous\fP are permitted under the same assumption, +that is, +the report begins with that sequence. +.PP +Because there are no standard response sequences that serve to identify +terminals supporting the +.I \%xterm +mouse protocol, +.I \%ncurses +assumes that if \fB\%kmous\fP is defined in the terminal description, +or if the terminal type's primary name or aliases contain the string +\%\*(``xterm\*('', then the terminal may send mouse events. -The \fBkmous\fP capability is checked first, -allowing the use of newer xterm mouse protocols -such as xterm's private mode 1006. +The \fB\%kmous\fP capability is checked first, +allowing use of newer +.I \%xterm +mouse protocols, +such as its private mode 1006. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_inopts\fP(3X), -\fBcurs_kernel\fP(3X), -\fBcurs_slk\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_inopts\fP(3X), +\fB\%curs_kernel\fP(3X), +\fB\%curs_pad\fP(3X), +\fB\%curs_slk\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_move.3x b/man/curs_move.3x index d81d8026..3966325c 100644 --- a/man/curs_move.3x +++ b/man/curs_move.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,40 +27,62 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_move.3x,v 1.21 2021/12/25 21:41:58 tom Exp $ -.TH curs_move 3X "" -.na -.hy 0 +.\" $Id: curs_move.3x,v 1.38 2024/04/20 19:51:33 tom Exp $ +.TH curs_move 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBmove\fP, -\fBwmove\fP \- move \fBcurses\fP window cursor -.ad -.hy +\fB\%move\fP, +\fB\%wmove\fP \- +move cursor in a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint move(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBint wmove(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint move(int \fIy\fP, int \fIx\fP); +\fBint wmove(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); +.fi .SH DESCRIPTION -These routines move the cursor associated with the window to line \fIy\fP and -column \fIx\fP. -This routine does not move the physical cursor of the terminal -until \fBrefresh\fP(3X) is called. -The position specified is relative to the upper -left-hand corner of the window, which is (0,0). +.B \%wmove +relocates the cursor associated with the +.I curses +window +.I win +to line +.I y +and column +.IR x . +The terminal's cursor does not move until \fB\%refresh\fP(3X) is called. +The position +.RI ( x , +.IR y ) +is relative to the upper left-hand corner of the window, +which has coordinates +(0,\ 0). +\fB\%ncurses\fP(3X) describes the +.B \%move +variant of this function. .SH RETURN VALUE -These routines return \fBERR\fP upon failure and \fBOK\fP (SVr4 -specifies only "an integer value other than \fBERR\fP") upon successful -completion. +These functions return +.B OK +on success and +.B ERR +on failure. +.PP +They fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .PP -Specifically, they return an error -if the window pointer is null, or -if the position is outside the window. +.B \%wmove +fails if its +.I \%WINDOW +pointer argument is +.BR NULL . .SH NOTES -Note that \fBmove\fP may be a macro. +.B \%move +may be implemented as a macro. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. +X/Open Curses, +Issue 4 describes these functions. .SH SEE ALSO -\fBcurses\fP(3X), \fBcurs_refresh\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_refresh\fP(3X) diff --git a/man/curs_opaque.3x b/man/curs_opaque.3x index 7a4c61f0..fa623eea 100644 --- a/man/curs_opaque.3x +++ b/man/curs_opaque.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2023,2024 Thomas E. Dickey * .\" Copyright 2007-2014,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,129 +27,135 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_opaque.3x,v 1.17 2021/12/25 21:50:36 tom Exp $ -.TH curs_opaque 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_opaque.3x,v 1.43 2024/03/16 15:35:01 tom Exp $ +.TH curs_opaque 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBis_cleared\fP, -\fBis_idlok\fP, -\fBis_idcok\fP, -\fBis_immedok\fP, -\fBis_keypad\fP, -\fBis_leaveok\fP, -\fBis_nodelay\fP, -\fBis_notimeout\fP, -\fBis_pad\fP, -\fBis_scrollok\fP, -\fBis_subwin\fP, -\fBis_syncok\fP, -\fBwgetdelay\fP, -\fBwgetparent\fP, -\fBwgetscrreg\fP \- \fBcurses\fP window properties -.ad -.hy +\fB\%is_cleared\fP, +\fB\%is_idlok\fP, +\fB\%is_idcok\fP, +\fB\%is_immedok\fP, +\fB\%is_keypad\fP, +\fB\%is_leaveok\fP, +\fB\%is_nodelay\fP, +\fB\%is_notimeout\fP, +\fB\%is_pad\fP, +\fB\%is_scrollok\fP, +\fB\%is_subwin\fP, +\fB\%is_syncok\fP, +\fB\%wgetdelay\fP, +\fB\%wgetparent\fP, +\fB\%wgetscrreg\fP \- +obtain \fIcurses\fR window properties .SH SYNOPSIS -\fB#include \fP -.sp -\fBbool is_cleared(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_idcok(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_idlok(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_immedok(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_keypad(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_leaveok(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_nodelay(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_notimeout(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_pad(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_scrollok(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_subwin(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBbool is_syncok(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBWINDOW * wgetparent(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint wgetdelay(const WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint wgetscrreg(const WINDOW *\fP\fIwin\fP\fB, int *\fP\fItop\fP\fB, int *\fP\fIbottom\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBbool is_cleared(const WINDOW *\fIwin\fP); +\fBbool is_idcok(const WINDOW *\fIwin\fP); +\fBbool is_idlok(const WINDOW *\fIwin\fP); +\fBbool is_immedok(const WINDOW *\fIwin\fP); +\fBbool is_keypad(const WINDOW *\fIwin\fP); +\fBbool is_leaveok(const WINDOW *\fIwin\fP); +\fBbool is_nodelay(const WINDOW *\fIwin\fP); +\fBbool is_notimeout(const WINDOW *\fIwin\fP); +\fBbool is_pad(const WINDOW *\fIwin\fP); +\fBbool is_scrollok(const WINDOW *\fIwin\fP); +\fBbool is_subwin(const WINDOW *\fIwin\fP); +\fBbool is_syncok(const WINDOW *\fIwin\fP); +.PP +\fBWINDOW * wgetparent(const WINDOW *\fIwin\fP); +\fBint wgetdelay(const WINDOW *\fIwin\fP); +\fBint wgetscrreg(const WINDOW *\fIwin\fP, int *\fItop\fP, int *\fIbottom\fP); +.fi .SH DESCRIPTION -This implementation provides functions which return properties -set in the WINDOW structure, allowing it to be \*(``opaque\*('' if -the symbol \fBNCURSES_OPAQUE\fP is defined: -.TP 5 +\fI\%ncurses\fP provides functions returning properties of a +\fI\%WINDOW\fP structure, +allowing it to be \*(``opaque\*('' if +the application defines the \fB\%NCURSES_OPAQUE\fP preprocessor symbol. +\fIOpacity\fP in this sense means that the members of \fIstruct\fP data +types are not directly accessible +(for instance, +through \*(``.\*('' or \*(``\->\*('' operators), +but instead must be queried and/or set via library functions. +Advantages of opacity include greater abstraction and improved +management of concurrent accesses to data structures, +keeping object states coherent. +.TP \fBis_cleared\fP -returns the value set in \fBclearok\fP -.TP 5 +returns the value set by \fB\%clearok\fP(3X). +.TP \fBis_idcok\fP -returns the value set in \fBidcok\fP -.TP 5 +returns the value set by \fB\%idcok\fP(3X). +.TP \fBis_idlok\fP -returns the value set in \fBidlok\fP -.TP 5 +returns the value set by \fB\%idlok\fP(3X). +.TP \fBis_immedok\fP -returns the value set in \fBimmedok\fP -.TP 5 +returns the value set by \fB\%immedok\fP(3X). +.TP \fBis_keypad\fP -returns the value set in \fBkeypad\fP -.TP 5 +returns the value set by \fB\%keypad\fP(3X). +.TP \fBis_leaveok\fP -returns the value set in \fBleaveok\fP -.TP 5 +returns the value set by \fB\%leaveok\fP(3X). +.TP \fBis_nodelay\fP -returns the value set in \fBnodelay\fP -.TP 5 +returns the value set by \fB\%nodelay\fP(3X). +.TP \fBis_notimeout\fP -returns the value set in \fBnotimeout\fP -.TP 5 +returns the value set by \fB\%notimeout\fP(3X). +.TP \fBis_pad\fP -returns \fBTRUE\fP if the window is a pad -i.e., created by \fBnewpad\fP -.TP 5 +returns \fBTRUE\fP if the window is a pad; +that is, +it was created by \fB\%newpad\fP(3X). +.TP \fBis_scrollok\fP -returns the value set in \fBscrollok\fP -.TP 5 +returns the value set by \fB\%scrollok\fP(3X). +.TP \fBis_subwin\fP returns \fBTRUE\fP if the window is a subwindow, -i.e., created by \fBsubwin\fP or \fBderwin\fP -.TP 5 +that is, +it was created by \fB\%subwin\fP(3X) or \fB\%derwin\fP(3X). +.TP \fBis_syncok\fP -returns the value set in \fBsyncok\fP -.TP 5 +returns the value set by \fB\%syncok\fP(3X). +.TP \fBwgetdelay\fP -returns the delay timeout as set in \fBwtimeout\fP. -.TP 5 +returns the delay timeout set by \fB\%wtimeout\fP(3X). +.TP \fBwgetparent\fP -returns the parent WINDOW pointer for subwindows, -or NULL for windows having no parent. -.TP 5 +returns the parent \fI\%WINDOW\fP pointer for subwindows, +or \fBNULL\fP for windows having no parent. +.TP \fBwgetscrreg\fP -returns the top and bottom rows for the scrolling margin -as set in \fBwsetscrreg\fP. +stores the the top and bottom rows for the scrolling margin set by +\fB\%wsetscrreg\fP(3X) in the corresponding arguments, +returning \fBERR\fP upon failure and \fBOK\fP upon successful +completion. .SH RETURN VALUE -These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted. +These functions return \fBTRUE\fP or \fBFALSE\fP except as noted. .SH NOTES -Both a macro and a function are provided for each name. +\fI\%ncurses\fP provides both a C function and a preprocessor macro for +each function documented in this page. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. -It is recommended that any code depending on ncurses extensions -be conditioned using NCURSES_VERSION. +It is recommended that any code depending on \fI\%ncurses\fP extensions +be conditioned using \fB\%NCURSES_VERSION\fP. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_inopts\fP(3X), -\fBcurs_outopts\fP(3X), -\fBcurs_window\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_inopts\fP(3X), +\fB\%curs_outopts\fP(3X), +\fB\%curs_threads\fP(3X), +\fB\%curs_window\fP(3X) diff --git a/man/curs_outopts.3x b/man/curs_outopts.3x index cc3b325d..df263f2c 100644 --- a/man/curs_outopts.3x +++ b/man/curs_outopts.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,52 +27,42 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_outopts.3x,v 1.35 2021/12/25 21:41:58 tom Exp $ -.TH curs_outopts 3X "" -.na -.hy 0 +.\" $Id: curs_outopts.3x,v 1.64 2024/04/20 21:24:19 tom Exp $ +.TH curs_outopts 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBclearok\fP, -\fBidlok\fP, -\fBidcok\fP, -\fBimmedok\fP, -\fBleaveok\fP, -\fBsetscrreg\fP, -\fBwsetscrreg\fP, -\fBscrollok\fP \- \fBcurses\fP output options -.ad -.hy +\fB\%clearok\fP, +\fB\%idlok\fP, +\fB\%idcok\fP, +\fB\%immedok\fP, +\fB\%leaveok\fP, +\fB\%setscrreg\fP, +\fB\%wsetscrreg\fP, +\fB\%scrollok\fP \- +set \fIcurses\fR output options .SH SYNOPSIS -\fB#include \fP -.sp -\fBint clearok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint idlok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBvoid idcok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBvoid immedok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint leaveok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint scrollok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.sp -\fBint setscrreg(int \fP\fItop\fP\fB, int \fP\fIbot\fP\fB);\fP -.br -\fBint wsetscrreg(WINDOW *\fP\fIwin\fP\fB, int \fP\fItop\fP\fB, int \fP\fIbot\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint clearok(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint idlok(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBvoid idcok(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBvoid immedok(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint leaveok(WINDOW *\fIwin\fP, bool \fIbf\fP); +\fBint scrollok(WINDOW *\fIwin\fP, bool \fIbf\fP); +.PP +\fBint setscrreg(int \fItop\fP, int \fIbot\fP); +\fBint wsetscrreg(WINDOW *\fIwin\fP, int \fItop\fP, int \fIbot\fP); +.fi .SH DESCRIPTION -.PP These routines set options that change the style of output within \fBcurses\fP. All options are initially \fBFALSE\fP, unless otherwise stated. It is not necessary to turn these options off before calling \fBendwin\fP(3X). .SS clearok -.PP If \fBclearok\fP is called with \fBTRUE\fP as argument, the next call to \fBwrefresh\fP with this window will clear the screen completely and redraw the entire screen from scratch. @@ -83,7 +73,6 @@ the \fIwin\fP argument to \fBclearok\fP is the global variable \fBcurscr\fP, the next call to \fBwrefresh\fP with any window causes the screen to be cleared and repainted from scratch. .SS idlok -.PP If \fBidlok\fP is called with \fBTRUE\fP as second argument, \fBcurses\fP considers using the hardware insert/delete line feature of terminals so equipped. @@ -97,7 +86,6 @@ when used in applications where it is not really needed. If insert/delete line cannot be used, \fBcurses\fP redraws the changed portions of all lines. .SS idcok -.PP If \fBidcok\fP is called with \fBFALSE\fP as second argument, \fBcurses\fP no longer considers using the hardware insert/delete character feature of terminals so equipped. @@ -105,15 +93,16 @@ Use of character insert/delete is enabled by default. Calling \fBidcok\fP with \fBTRUE\fP as second argument re-enables use of character insertion and deletion. .SS immedok -.PP -If \fBimmedok\fP is called with \fBTRUE as argument\fP, any change -in the window image, such as the ones caused by \fBwaddch, wclrtobot, wscrl\fP, -etc., automatically cause a call to \fBwrefresh\fP. -However, it may -degrade performance considerably, due to repeated calls to \fBwrefresh\fP. -It is disabled by default. +If \fBimmedok\fP is called with \fBTRUE\fP as second argument, +any change in the window image, +such as the ones caused by \fBwaddch, wclrtobot, wscrl\fP, +etc., automatically causes a call to \fBwrefresh\fP. +However, it may degrade performance considerably, +due to repeated calls to \fBwrefresh\fP. +Calling \fBimmedok\fP with \fBFALSE\fP as second argument +restores the default behavior, +i.e., deferring screen updates until a refresh is needed. .SS leaveok -.PP Normally, the hardware cursor is left at the location of the window cursor being refreshed. The \fBleaveok\fP option allows the cursor to be left @@ -121,7 +110,6 @@ wherever the update happens to leave it. It is useful for applications where the cursor is not used, since it reduces the need for cursor motions. .SS scrollok -.PP The \fBscrollok\fP 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 character of the last @@ -131,8 +119,7 @@ line. If enabled, (\fIbf\fP is \fBTRUE\fP), the window is scrolled up one line (Note that to get the physical scrolling effect on the terminal, it is also necessary to call \fBidlok\fP). -.SS setscrreg/wsetscrreg -.PP +.SS "setscrreg, wsetscrreg" The \fBsetscrreg\fP and \fBwsetscrreg\fP routines allow the application programmer to set a software scrolling region in a window. The \fItop\fP and @@ -156,7 +143,7 @@ and \fBERR\fP upon failure. All other routines that return an integer always return \fBOK\fP. .PP -X/Open Curses does not define any error conditions. +X/Open Curses does not specify any error conditions. .PP In this implementation, .bP @@ -164,60 +151,49 @@ those functions that have a window pointer will return an error if the window pointer is null .bP \fBwsetscrreg\fP -returns an error if the scrolling region limits extend outside the window. -.RE +returns an error if the scrolling region limits extend outside the +window boundaries. +.SH NOTES +Note that +\fBclearok\fP, +\fBleaveok\fP, +\fBscrollok\fP, +\fBidcok\fP, and +\fBsetscrreg\fP may be macros. .PP -X/Open does not define any error conditions. -This implementation returns an error -if the window pointer is null. +The \fBimmedok\fP routine is useful for windows that are used as terminal +emulators. .SH PORTABILITY -These functions are described in the XSI Curses standard, Issue 4. -.PP -From the outset, ncurses used \fBnl\fP/\fBnonl\fP to control the conversion -of newlines to carriage return/line-feed on output as well as input. -XSI Curses documents only the use of these functions for input. -This difference arose from converting the \fIpcurses\fP source -(which used \fBioctl\fP calls with the \fBsgttyb\fP structure) -to termios (i.e., the POSIX terminal interface). -In the former, both input and output were controlled via a single -option \fBCRMOD\fP, -while the latter separates these features. -Because that conversion interferes with output optimization, -\fBnl\fP/\fBnonl\fP were amended after ncurses 6.2 -to eliminate their effect on output. +These functions are described in X/Open Curses, Issue 4. .PP Some historic curses implementations had, as an undocumented feature, the ability to do the equivalent of \fBclearok(..., 1)\fP by saying \fBtouchwin(stdscr)\fP or \fBclear(stdscr)\fP. -This will not work under ncurses. +This will not work under \fI\%ncurses\fP. .PP Earlier System V curses implementations specified that with \fBscrollok\fP enabled, any window modification triggering a scroll also forced a physical refresh. -XSI Curses does not require this, and \fBncurses\fP avoids doing +X/Open Curses does not require this, and \fI\%ncurses\fP avoids doing it to perform better vertical-motion optimization at \fBwrefresh\fP time. .PP -The XSI Curses standard does not mention that the cursor should be +X/Open Curses does not mention that the cursor should be made invisible as a side-effect of \fBleaveok\fP. SVr4 curses documentation does this, but the code does not. Use \fBcurs_set\fP to make the cursor invisible. -.SH NOTES -Note that -\fBclearok\fP, -\fBleaveok\fP, -\fBscrollok\fP, -\fBidcok\fP, and -\fBsetscrreg\fP may be macros. -.PP -The \fBimmedok\fP routine is useful for windows that are used as terminal -emulators. +.SH HISTORY +.I \%ncurses +formerly treated \fBnl\fP(3X) and \fBnonl\fP(3X) as both input +.I and +output options, +but no longer; +see \fB\%curs_inopts\fP(3X). .SH SEE ALSO -.na -\fBcurses\fP(3X), -\fBcurs_addch\fP(3X), -\fBcurs_clear\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_scroll\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_clear\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_scroll\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_overlay.3x b/man/curs_overlay.3x index 4846fe12..2d4eb729 100644 --- a/man/curs_overlay.3x +++ b/man/curs_overlay.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2013,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,28 +27,36 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_overlay.3x,v 1.21 2021/12/25 21:50:36 tom Exp $ -.TH curs_overlay 3X "" -.na -.hy 0 +.\" $Id: curs_overlay.3x,v 1.43 2024/04/20 21:20:07 tom Exp $ +.TH curs_overlay 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .SH NAME -\fBoverlay\fP, -\fBoverwrite\fP, -\fBcopywin\fP \- overlay and manipulate overlapped \fBcurses\fP windows -.ad -.hy +\fB\%overlay\fP, +\fB\%overwrite\fP, +\fB\%copywin\fP \- +overlay \fIcurses\fR windows and manipulate them .SH SYNOPSIS -\fB#include \fP -.sp -\fBint overlay(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB);\fP -.br -\fBint overwrite(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB);\fP -.br -\fBint copywin(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB, int \fP\fIsminrow\fP\fB,\fP - \fBint \fP\fIsmincol\fP\fB, int \fP\fIdminrow\fP\fB, int \fP\fIdmincol\fP\fB, int \fP\fIdmaxrow\fP\fB,\fP - \fBint \fP\fIdmaxcol\fP\fB, int \fP\fIoverlay\fP\fB);\fP +.nf +\fB#include +.PP +\fBint overlay(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP); +\fBint overwrite(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP); +\fBint copywin(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP, int \fIsminrow\fP, + \fBint \fIsmincol\fB, int \fIdminrow\fB, int \fIdmincol\fB, int \fIdmaxrow\fB,\fR + \fBint \fIdmaxcol\fB, int \fIoverlay\fB);\fR +.fi .SH DESCRIPTION -.SS overlay, overwrite +.SS "overlay, overwrite" The \fBoverlay\fP and \fBoverwrite\fP routines overlay \fIsrcwin\fP on top of \fIdstwin\fP. \fIscrwin\fP and \fIdstwin\fP are not required @@ -56,7 +64,6 @@ to be the same size; only text where the two windows overlap is copied. The difference is that \fBoverlay\fP is non-destructive (blanks are not copied) whereas \fBoverwrite\fP is destructive. .SS copywin -.PP The \fBcopywin\fP routine provides a finer granularity of control over the \fBoverlay\fP and \fBoverwrite\fP routines. As in the \fBprefresh\fP routine, @@ -67,9 +74,10 @@ If the argument \fIoverlay\fP is \fBtrue\fP, then copying is non-destructive, as in \fBoverlay\fP. .SH RETURN VALUE -Routines that return an integer return \fBERR\fP upon failure, and \fBOK\fP -(SVr4 only specifies "an integer value other than \fBERR\fP") upon successful -completion. +These routines return the integer \fBERR\fP upon failure and an \fBOK\fP +(SVr4 specifies only +\*(``an integer value other than \fBERR\fP\*('') +upon successful completion. .PP X/Open defines no error conditions. In this implementation, @@ -80,9 +88,11 @@ if some part of the window would be placed off-screen. .SH NOTES Note that \fBoverlay\fP and \fBoverwrite\fP may be macros. .SH PORTABILITY -The XSI Curses standard, Issue 4 describes these functions (adding the const -qualifiers). +These functions are described in X/Open Curses, Issue 4, +which adds \fI\%const\fP qualifiers to the arguments. It further specifies their behavior in the presence of characters with multibyte renditions (not yet supported in this implementation). .SH SEE ALSO -\fBcurses\fP(3X), \fBcurs_pad\fP(3X), \fBcurs_refresh\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_pad\fP(3X), +\fB\%curs_refresh\fP(3X) diff --git a/man/curs_pad.3x b/man/curs_pad.3x index 01f457c4..37118dd0 100644 --- a/man/curs_pad.3x +++ b/man/curs_pad.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,127 +27,161 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_pad.3x,v 1.28 2021/12/25 21:41:58 tom Exp $ +.\" $Id: curs_pad.3x,v 1.59 2024/04/20 21:20:07 tom Exp $ +.TH curs_pad 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_pad 3X "" -.na -.hy 0 .SH NAME -\fBnewpad\fP, -\fBsubpad\fP, -\fBprefresh\fP, -\fBpnoutrefresh\fP, -\fBpechochar\fP, -\fBpecho_wchar\fP \- create and display \fBcurses\fP pads -.ad -.hy +\fB\%newpad\fP, +\fB\%subpad\fP, +\fB\%prefresh\fP, +\fB\%pnoutrefresh\fP, +\fB\%pechochar\fP, +\fB\%pecho_wchar\fP \- +create and display \fIcurses\fR pads .SH SYNOPSIS -\fB#include \fP -.sp -\fBWINDOW *newpad(int \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB);\fP -.br -\fBWINDOW *subpad(WINDOW *\fP\fIorig\fP\fB, int \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fP - \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fP -.br -\fBint prefresh(WINDOW *\fP\fIpad\fP\fB, int \fP\fIpminrow\fP\fB, int \fP\fIpmincol\fP\fB,\fP - \fBint \fP\fIsminrow\fP\fB, int \fP\fIsmincol\fP\fB, int \fP\fIsmaxrow\fP\fB, int \fP\fIsmaxcol\fP\fB);\fP -.br -\fBint pnoutrefresh(WINDOW *\fP\fIpad\fP\fB, int \fP\fIpminrow\fP\fB, int \fP\fIpmincol\fP\fB,\fP - \fBint \fP\fIsminrow\fP\fB, int \fP\fIsmincol\fP\fB, int \fP\fIsmaxrow\fP\fB, int \fP\fIsmaxcol\fP\fB);\fP -.br -\fBint pechochar(WINDOW *\fP\fIpad\fP\fB, chtype \fP\fIch\fP\fB);\fP -.br -\fBint pecho_wchar(WINDOW *\fP\fIpad\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP -.SH DESCRIPTION -.SS newpad -The \fBnewpad\fP routine creates and returns a pointer to a new pad data -structure with the given number of lines, \fInlines\fP, and columns, -\fIncols\fP. -A pad is like a window, except that it is not restricted by the -screen size, and is not necessarily associated with a particular part of the -screen. -Pads can be used when a large window is needed, and only a part of the -window will be on the screen at one time. -Automatic refreshes of pads -(e.g., from scrolling or echoing of input) do not occur. +.nf +\fB#include .PP -It is not -legal to call \fBwrefresh\fP with a \fIpad\fP as an argument; the routines -\fBprefresh\fP or \fBpnoutrefresh\fP should be called instead. -Note that these -routines require additional parameters to specify the part of the pad to be -displayed and the location on the screen to be used for the display. -.SS subpad +\fBWINDOW *newpad(int \fInlines\fP, int \fIncols\fP); +\fBWINDOW *subpad(WINDOW *\fIparent\fP, int \fInlines\fP, int \fIncols\fP, + \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR .PP -The \fBsubpad\fP routine creates and returns a pointer to a subwindow within a -pad with the given number of lines, \fInlines\fP, and columns, \fIncols\fP. -Unlike \fBsubwin\fP, which uses screen coordinates, the window is at position -(\fIbegin\fR_\fIx\fP\fB,\fP \fIbegin\fR_\fIy\fP) on the pad. -The window is -made in the middle of the window \fIorig\fP, so that changes made to one window -affect both windows. -During the use of this routine, it will often be -necessary to call \fBtouchwin\fP or \fBtouchline\fP on \fIorig\fP before -calling \fBprefresh\fP. -.SS prefresh, pnoutrefresh +\fBint prefresh(WINDOW *\fIpad\fB, int \fIpminrow\fB, int \fIpmincol\fB,\fR + \fBint \fIsminrow\fB, int \fIsmincol\fB, int \fIsmaxrow\fB, int \fIsmaxcol\fB);\fR +\fBint pnoutrefresh(WINDOW *\fIpad\fB, int \fIpminrow\fB, int \fIpmincol\fB,\fR + \fBint \fIsminrow\fB, int \fIsmincol\fB, int \fIsmaxrow\fB, int \fIsmaxcol\fB);\fR +.PP +\fBint pechochar(WINDOW *\fIpad\fB, chtype \fIch\fB);\fR +\fBint pecho_wchar(WINDOW *\fIpad\fB, const cchar_t *\fIwch\fB);\fR +.fi +.SH DESCRIPTION +A +.I curses +.I pad +is like a window, +except that it is not restricted by the screen size, +and is not necessarily associated with a particular part of the screen. +Pads can be used when a large window is needed, +only part of which is to be visible on the screen. +Pads are not automatically refreshed by scrolling or input-echoing +operations. .PP -The \fBprefresh\fP and \fBpnoutrefresh\fP routines are analogous to -\fBwrefresh\fP and \fBwnoutrefresh\fP except that they relate to pads instead -of windows. -The additional parameters are needed to indicate what part of the -pad and screen are involved. +Pads cannot be refreshed with \fB\%wrefresh\fP(3X); +use +.B \%prefresh +or +.B \%pnoutrefresh +instead. +.SS newpad +\fB\%newpad\fP creates and returns a pointer to a new pad data structure +with the given number of lines, +.IR nlines , +and columns, +.IR ncols . +.SS subpad +.B \%subpad +creates and returns a pointer to a subwindow within a pad +with the given number of lines, +.IR nlines , +and columns, +.IR ncols . +Unlike \fB\%subwin\fP(3X), +which uses screen coordinates, +the new pad is placed at position +.RI ( begin_y , +.IR begin_x ) +relative to its parent. +Thus, +changes made to one pad can affect both. +When operating on a subpad, +it is often necessary to call \fB\%touchwin\fP(3X) or +\fB\%touchline\fP(3X) on +.I parent +before calling +.BR \%prefresh . +.SS "prefresh, pnoutrefresh" +.B \%prefresh\fP +and +.B \%pnoutrefresh +are analogous to \fB\%wrefresh\fP(3X) and \fB\%wnoutrefresh\fP(3X) +except that they operate on pads rather than windows. +They require additional parameters are needed to indicate what portions +of the pad and screen are involved. .bP -The \fIpminrow\fP and \fIpmincol\fP parameters specify the upper -left-hand corner of the rectangle to be displayed in the pad. +.I pminrow +and +.I pmincol +specify the upper left-hand corner of a rectanglar view of the pad. .bP -The \fIsminrow\fP, -\fIsmincol\fP, \fIsmaxrow\fP, and \fIsmaxcol\fP -parameters specify the edges of the -rectangle to be displayed on the screen. +.IR sminrow , +.IR smincol , +.IR smaxrow , +and +.I smaxcol +specify the vertices of the rectangle to be displayed on the screen. .PP -The lower right-hand corner of the -rectangle to be displayed in the pad is calculated from the screen coordinates, +The lower right-hand corner +of the rectangle to be displayed in the pad +is calculated from the screen coordinates, since the rectangles must be the same size. -Both rectangles must be entirely -contained within their respective structures. -Negative values of -\fIpminrow\fP, \fIpmincol\fP, \fIsminrow\fP, or \fIsmincol\fP are treated as if -they were zero. +Both rectangles must be entirely contained +within their respective structures. +.I curses +treats +negative values of any of these parameters as zero. .SS pechochar -.PP -The \fBpechochar\fP routine is functionally equivalent to a call to \fBaddch\fP -followed by a call to \fBrefresh\fP(3X), -a call to \fBwaddch\fP followed by a call -to \fBwrefresh\fP, or a call to \fBwaddch\fP followed by a call to -\fBprefresh\fP. -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 these routines instead of their -equivalents. -In the case of \fBpechochar\fP, the last location of the pad on -the screen is reused for the arguments to \fBprefresh\fP. +.B \%pechochar +is functionally equivalent to calling \fB\%waddch\fP(3X) followed by +.BR \%prefresh . +It suggests to the +.I curses +optimizer that only a single character is being output; +a considerable performance benefit may be thus enjoyed. +The location of the character +.I ch +written to the pad is used to populate the arguments to +.BR \%prefresh . .SS pecho_wchar -.PP -The \fBpecho_wchar\fP function is the analogous wide-character -form of \fBpechochar\fP. -It outputs one character to a pad and immediately refreshes the pad. -It does this by a call to \fBwadd_wch\fP followed by a call to \fBprefresh\fP. +.B \%pecho_wchar\fP +is functionally equivalent to calling \fB\%wadd_wch\fP(3X) followed by +.BR \%prefresh . +It suggests to the +.I curses +optimizer that only a single wide character is being output; +a considerable performance benefit may be thus enjoyed. +The location of the character +.I wch +written to the pad is used to populate the arguments to +.BR \%prefresh . .SH RETURN VALUE -Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 only specifies "an integer value other than \fBERR\fP") upon successful -completion. +Functions that return an integer return \fBERR\fP upon failure and +\fBOK\fP +(SVr4 specifies only +\*(``an integer value other than \fBERR\fP\*('') +upon successful completion. .PP -Routines that return pointers return \fBNULL\fP on error, and set \fBerrno\fP -to \fBENOMEM\fP. +Functions that return pointers return \fBNULL\fP on error, +and set \fB\%errno\fP to \fB\%ENOMEM\fP. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. In this implementation .RS 3 .TP 5 -\fBprefresh\fP and \fBpnoutrefresh\fP +\fB\%prefresh\fP and \fB\%pnoutrefresh\fP return an error if the window pointer is null, or if the window is not really a pad or @@ -157,19 +191,19 @@ if the minimum coordinates are greater than the maximum. \fBpechochar\fP returns an error if the window is not really a pad, and the associated call -to \fBwechochar\fP returns an error. +to \fB\%wechochar\fP returns an error. .TP 5 \fBpecho_wchar\fP returns an error if the window is not really a pad, and the associated call -to \fBwecho_wchar\fP returns an error. +to \fB\%wecho_wchar\fP returns an error. .RE .SH NOTES -Note that \fBpechochar\fP may be a macro. +\fB\%pechochar\fP may be a macro. .SH PORTABILITY -BSD curses has no \fIpad\fP feature. +BSD \fIcurses\fP has no \fIpad\fP feature. .PP -SVr2 curses (1986) provided the \fBnewpad\fP and related functions, +SVr2 \fIcurses\fP (1986) provided the \fB\%newpad\fP and related functions, documenting them in a single line each. SVr3 (1987) provided more extensive documentation. .PP @@ -184,59 +218,63 @@ and select text from the pad. .PP The two uses may be related. .PP -The XSI Curses standard, Issue 4 describes these functions, +X/Open Curses, Issue 4 describes these functions, without significant change from the SVr3 documentation. It describes no error conditions. -The behavior of \fBsubpad\fP if the parent window is not +The behavior of \fB\%subpad\fP if the parent window is not a pad is undocumented, and is not checked by the vendor Unix implementations: .bP -SVr4 curses sets a flag in the \fBWINDOW\fP structure in \fBnewpad\fP -which tells if the window is a \fIpad\fP. +SVr4 \fIcurses\fP sets a flag in the \fI\%WINDOW\fP structure in +\fB\%newpad\fP which tells if the window is a \fIpad\fP. .IP However, it uses this information only in -\fBwaddch\fP (to decide if it should call \fBwrefresh\fP) and -\fBwscrl\fP (to avoid scrolling a pad), -and does not check in \fBwrefresh\fP to ensure that the pad +\fB\%waddch\fP (to decide if it should call \fB\%wrefresh\fP) and +\fB\%wscrl\fP (to avoid scrolling a pad), +and does not check in \fB\%wrefresh\fP to ensure that the pad is refreshed properly. .bP -Solaris X/Open Curses checks if a window is a pad in \fBwnoutrefresh\fP, +Solaris \fI\%xcurses\fP checks whether a window is a pad in +\fB\%wnoutrefresh\fP, returning \fBERR\fP in that case. .IP -However, it only sets the flag for subwindows if the parent window is a pad. -Its \fBnewpad\fP function does not set this information. +However, +it only sets the flag for subwindows if the parent window is a pad. +Its \fB\%newpad\fP function does not set this information. Consequently, the check will never fail. .IP -It makes no comparable check in \fBpnoutrefresh\fP, +It makes no comparable check in \fB\%pnoutrefresh\fP, though interestingly enough, a comment in the source code states that the lack of a check was an MKS extension. .bP -NetBSD 7 curses -sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP, -using this to help with the distinction between \fBwnoutrefresh\fP -and \fBpnoutrefresh\fP. +NetBSD 7 \fIcurses\fP +sets a flag in the \fI\%WINDOW\fP structure +for \fB\%newpad\fP and \fB\%subpad\fP, +using this to help with the distinction between \fB\%wnoutrefresh\fP +and \fB\%pnoutrefresh\fP. .IP It does not check for the case where a subwindow is created in -a pad using \fBsubwin\fP or \fBderwin\fP. +a pad using \fB\%subwin\fP or \fB\%derwin\fP. .IP -The \fBdupwin\fP function returns a regular window when duplicating a pad. -Likewise, \fBgetwin\fP always returns a window, even if the saved +The \fB\%dupwin\fP function returns a regular window when duplicating a pad. +Likewise, \fB\%getwin\fP always returns a window, even if the saved data was from a pad. .PP This implementation .bP -sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP, +sets a flag in the \fI\%WINDOW\fP structure +for \fB\%newpad\fP and \fB\%subpad\fP, .bP -allows a \fBsubwin\fP or \fBderwin\fP call to succeed having a pad parent by +allows a \fB\%subwin\fP or \fB\%derwin\fP call to succeed having a pad parent by forcing the subwindow to be a pad, .bP -checks in both \fBwnoutrefresh\fP and \fBpnoutrefresh\fP to ensure +checks in both \fB\%wnoutrefresh\fP and \fB\%pnoutrefresh\fP to ensure that pads and windows are handled distinctly, and .bP -ensures that \fBdupwin\fP and \fBgetwin\fP treat +ensures that \fB\%dupwin\fP and \fB\%getwin\fP treat pads versus windows consistently. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_touch\fP(3X), -\fBcurs_addch\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_addch\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_touch\fP(3X) diff --git a/man/curs_print.3x b/man/curs_print.3x index 101d2935..3694beff 100644 --- a/man/curs_print.3x +++ b/man/curs_print.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,19 +27,23 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_print.3x,v 1.18 2021/12/25 21:41:58 tom Exp $ -.TH curs_print 3X "" +.\" $Id: curs_print.3x,v 1.38 2024/03/16 15:35:01 tom Exp $ +.TH curs_print 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBmcprint\fP \- ship binary data to printer +\fB\%mcprint\fP \- +write binary data to printer using \fIterminfo\fR capabilities .SH SYNOPSIS -\fB#include \fP -.sp -\fBint mcprint(char *\fP\fIdata\fP\fB, int \fP\fIlen\fP\fB);\fP +.nf +\fB#include +.PP +\fBint mcprint(char *\fIdata\fP, int \fIlen\fP); +.fi .SH DESCRIPTION This function uses the \fBmc5p\fP or \fBmc4\fP and \fBmc5\fP capabilities, if they are present, to ship given data to a printer attached to the terminal. .PP -Note that the \fBmcprint\fP code has no way to do flow control with the printer +Note that the \fB\%mcprint\fP code has no way +to do flow control with the 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 @@ -49,24 +53,37 @@ Dot-matrix printers and rule of thumb is to sleep for a second after shipping each 80-character line. . .SH RETURN VALUE -The \fBmcprint\fP function returns \fBERR\fP if the write operation aborted +The \fB\%mcprint\fP function returns \fBERR\fP if the write operation aborted for some reason. -In this case, \fBerrno\fP will contain either an error associated +In this case, \fB\%errno\fP will contain either an error associated with \fBwrite\fP(2) or one of the following: .TP 5 -ENODEV +\fBENODEV\fP Capabilities for printer redirection do not exist. .TP 5 -ENOMEM +\fBENOMEM\fP Couldn't allocate sufficient memory to buffer the printer write. .PP -When \fBmcprint\fP succeeds, it returns the number of characters actually +When \fB\%mcprint\fP succeeds, it returns the number of characters actually sent to the printer. +.SH EXTENSIONS +\fB\%mcprint\fP was designed for +\fB\%ncurses\fP(3X), +and was not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous curses implementation. .SH PORTABILITY -The \fBmcprint\fP call was designed for \fBncurses\fP(3X), and is not found -in SVr4 curses, 4.4BSD curses, or any other previous version of curses. +Applications employing this +.I \%ncurses +extension should condition its use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. .SH BUGS -Padding in the \fBmc5p\fP, \fBmc4\fP and \fBmc5\fP capabilities will not be -interpreted. +Padding in the +\fBmc5p\fP, +\fBmc4\fP, and +\fBmc5\fP capabilities is not interpreted. .SH SEE ALSO -\fBcurses\fP(3X) +\fB\%curses\fP(3X) diff --git a/man/curs_printw.3x b/man/curs_printw.3x index 4a16053f..282536b3 100644 --- a/man/curs_printw.3x +++ b/man/curs_printw.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,128 +27,179 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_printw.3x,v 1.31 2021/12/25 21:49:32 tom Exp $ -.TH curs_printw 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_printw.3x,v 1.53 2024/04/20 19:18:18 tom Exp $ +.TH curs_printw 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBprintw\fP, -\fBwprintw\fP, -\fBmvprintw\fP, -\fBmvwprintw\fP, -\fBvwprintw\fP, \fBvw_printw\fP \- print formatted output in \fBcurses\fP windows -.ad -.hy +\fB\%printw\fP, +\fB\%wprintw\fP, +\fB\%mvprintw\fP, +\fB\%mvwprintw\fP, +\fB\%vwprintw\fP, +\fB\%vw_printw\fP \- +write formatted output to a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint printw(const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint wprintw(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint mvprintw(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint mvwprintw(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint vw_printw(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIvarglist\fP\fB);\fP -.sp -/* obsolete */ -.br -\fBint vwprintw(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIvarglist\fP\fB);\fP +.nf +\fB#include +.PP +\fBint printw(const char *\fIfmt\fP, ...); +\fBint wprintw(WINDOW *\fIwin\fP, const char *\fIfmt\fP, ...); +\fBint mvprintw(int \fIy\fP, int \fIx\fP, const char *\fIfmt\fP, ...); +\fBint mvwprintw(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const char *\fIfmt\fP, ...); +.PP +\fBint vw_printw(WINDOW *\fIwin\fP, const char *\fIfmt\fP, va_list \fIvarglist\fP); +.PP +\fI/* obsolete */\fP +\fBint vwprintw(WINDOW *\fIwin\fP, const char *\fIfmt\fP, va_list \fIvarglist\fP); +.fi .SH DESCRIPTION -The \fBprintw\fP, \fBwprintw\fP, \fBmvprintw\fP and \fBmvwprintw\fP -routines are analogous to \fBprintf\fP [see \fBprintf\fP(3)]. -In -effect, the string that would be output by \fBprintf\fP is output -instead as though \fBwaddstr\fP were used on the given window. +\fB\%printw\fP, +\fB\%wprintw\fP, +\fB\%mvprintw\fP, +and +\fB\%mvwprintw\fP +are analogous to \fI\%printf\fP(3). +In effect, +the string that would be output by \fI\%printf\fP(3) is instead output +as though \fB\%waddstr\fP(3X) were used with +.I win +(or +.BR \%stdscr ) +as its first argument. .PP -The \fBvwprintw\fP and \fBvw_printw\fP routines are analogous -to \fBvprintf\fP [see \fBprintf\fP(3)] -and perform a \fBwprintw\fP using a variable argument list. -The third argument is a \fBva_list\fP, a pointer to a -list of arguments, as defined in \fB\fP. +\fB\%vwprintw\fP +and +\fB\%vw_printw\fP are analogous to \fI\%vprintf\fP(3), +and perform a \fB\%wprintw\fP using a variable argument list. +The third argument is a \fI\%va_list\fP, +a pointer to a list of arguments, +as defined in \fI\%stdarg.h\fP. .SH RETURN VALUE -Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 only specifies "an integer value other than \fBERR\fP") upon successful -completion. +These functions return +.B ERR +upon failure and +.B OK +upon success. .PP -X/Open defines no error conditions. -In this implementation, -an error may be returned if it cannot allocate enough memory for the -buffer used to format the results. -It will return an error if the window pointer is null. +In +.IR \%ncurses , +failure occurs if the library cannot allocate enough memory for the +buffer into which the output is formatted, +or if the window pointer +.I win +is null. +.PP +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.SH NOTES +No wide character counterpart functions are defined by the +\*(``wide\*('' +.I \%ncurses +configuration nor by any standard. +To format and write a wide-character string to a +.I curses +window, +consider using \fI\%swprintf\fP(3) and \fB\%waddwstr\fP(3X) or similar. +.SH PORTABILITY +X/Open Curses, +Issue 4 describes these functions. +It specifies no error conditions for them. .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. +.I \%ncurses +defines \fB\%vw_printw\fP and \fB\%vwprintw\fP identically to support +legacy applications. +However, +the latter is obsolete. +.bP +X/Open Curses, +Issue 4 Version 2 (1996), +marked \fB\%vwprintw\fP as requiring \fI\%varargs.h\fP and +\*(``TO BE WITHDRAWN\*('', +and specified \fB\%vw_printw\fP using the \fI\%stdarg.h\fP interface. +.bP +X/Open Curses, Issue 5, Draft 2 +(December 2007) marked \fBvwprintw\fP (along with +\fBvwscanw\fP and the \fItermcap\fP interface) as withdrawn. +After incorporating review comments, +this became +X/Open Curses, Issue 7 (2009). +.bP +.I \%ncurses +provides \fB\%vwprintw\fP, +but marks it as deprecated. .SH HISTORY -While \fBprintw\fP 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 , though that was available. -In 1991 (a couple of years after SVr4 was generally available, +While \fB\%printw\fP was implemented in 4BSD +(November 1980), +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/lib/\ +.\" libcurses/printw.c +it was unused until 4.2BSD +(August 1983), +which employed it for games. +That early version of +.I curses +preceded the ANSI C standard of 1989. +It did not use \fI\%varargs.h\fP, +though that had been available since Seventh Edition Unix (1979). +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/\ +.\" varargs.h +In 1991 +(a couple of years after SVr4 was generally available, and after the C standard was published), other developers updated the library, -using internally in 4.4BSD curses. +using \fI\%stdarg.h\fP internally in 4.4BSD +.IR curses . Even with this improvement, -BSD curses did not use function prototypes (or even declare -functions) in the header until 1992. +BSD +.I curses +did not use function prototypes +(nor even declare functions) +in \fI\%curses.h\fP until 1992. .PP -SVr2 documented -\fBprintw\fP, -\fBwprintw\fP -tersely as \*(``printf on \fIstdscr\fP\*('' and -tersely as \*(``printf on \fIwin\fP\*('', respectively. +SVr2 (1984) documented \fB\%printw\fP and \fB\%wprintw\fP tersely as +\*(``printf on \fB\%stdscr\fP\*('' and +\*(``printf on \fIwin\fP\*('', +respectively. .PP -SVr3 added -\fBmvprintw\fP, and -\fBmvwprintw\fP, with a three-line summary saying that they were analogous -to \fBprintf\fP(3), -explaining that the string which would be output from \fBprintf\fP(3) would -instead be output using \fBwaddstr\fP on the given window. -SVr3 also added \fBvwprintw\fP, saying that the third parameter -is a \fBva_list\fP, defined in , -and referring the reader to the manual pages for \fIvarargs\fP and -\fBvprintf\fP for detailed descriptions. +SVr3 (1987) added \fB\%mvprintw\fP and \fB\%mvwprintw\fP, +with a three-line summary asserting that they were analogous to +\fI\%printf\fP(3), +explaining that the string that \fI\%printf\fP(3) would write to the +standard output stream would instead be output using \fB\%waddstr\fP to +the given window. +SVr3 also implemented \fB\%vwprintw\fP, +describing its third parameter as a \fI\%va_list\fP, +defined in \fI\%varargs.h\fP, +and referred the reader to the manual pages for \fI\%varargs\fP and +\fI\%vprintf\fP for detailed descriptions. .PP -SVr4 added no new variations of \fBprintw\fP, -but provided for using or to define the \fBva_list\fP -type. +SVr4 (1989) introduced no new variations of \fI\%printw\fP, +but provided for using either \fI\%varargs.h\fP or \fI\%stdarg.h\fP to +define the \fI\%va_list\fP type. +.\" either header declares "va_list", but only one can be used .PP -X/Open Curses added \fBvw_printw\fP to replace \fBvwprintw\fP, -stating that its \fBva_list\fP definition requires . -.SH PORTABILITY -In this implementation, \fBvw_printw\fP and \fBvwprintw\fP are equivalent, -to support legacy applications. -However, the latter (\fBvwprintw\fP) is obsolete: -.bP -The XSI Curses standard, Issue 4 described these functions. -The function -\fBvwprintw\fP is marked TO BE WITHDRAWN, and is to be replaced by a function -\fBvw_printw\fP using the \fB\fP interface. -.bP -The Single Unix Specification, Version 2 states that -\fBvw_printw\fP is preferred to \fBvwprintw\fP since the latter requires -including \fB\fP, which -cannot be used in the same file as \fB\fP. -This implementation uses \fB\fP for both, -because that header is included in \fB. -.bP -X/Open Curses, Issue 5 (December 2007) marked \fBvwprintw\fP (along with -\fBvwscanw\fP and the termcap interface) as withdrawn. +X/Open Curses, Issue 4 (1995), +defined \fB\%vw_printw\fP to replace \fB\%vwprintw\fP, +stating that its \fI\%va_list\fP type is defined in \fI\%stdarg.h\fP. .SH SEE ALSO -.na -\fBcurses\fP(3X), -\fBcurs_addstr\fP(3X), -\fBcurs_scanw\fP(3X), -\fBcurs_termcap\fP(3X), -\fBprintf\fP(3), -\fBvprintf\fP(3). +\fB\%curses\fP(3X), +\fB\%curs_addstr\fP(3X), +\fB\%curs_scanw\fP(3X), +\fB\%printf\fP(3), +\fB\%vprintf\fP(3) diff --git a/man/curs_refresh.3x b/man/curs_refresh.3x index f2b77713..ac81d1e6 100644 --- a/man/curs_refresh.3x +++ b/man/curs_refresh.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,44 +27,45 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_refresh.3x,v 1.24 2021/12/25 21:49:32 tom Exp $ -.TH curs_refresh 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_refresh.3x,v 1.46 2024/04/20 21:20:07 tom Exp $ +.TH curs_refresh 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBdoupdate\fP, -\fBredrawwin\fP, -\fBrefresh\fP, -\fBwnoutrefresh\fP, -\fBwredrawln\fP, -\fBwrefresh\fP \- refresh \fBcurses\fP windows and lines -.ad -.hy +\fB\%doupdate\fP, +\fB\%redrawwin\fP, +\fB\%refresh\fP, +\fB\%wnoutrefresh\fP, +\fB\%wredrawln\fP, +\fB\%wrefresh\fP \- +refresh \fIcurses\fR windows or lines thereupon .SH SYNOPSIS -\fB#include \fP -.sp -\fBint refresh(void);\fP -.br -\fBint wrefresh(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint wnoutrefresh(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint doupdate(void);\fP -.sp -\fBint redrawwin(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint wredrawln(WINDOW *\fP\fIwin\fP\fB, int \fP\fIbeg_line\fP\fB, int \fP\fInum_lines\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint refresh(void); +\fBint wrefresh(WINDOW *\fIwin\fP); +\fBint wnoutrefresh(WINDOW *\fIwin\fP); +\fBint doupdate(void); +.PP +\fBint redrawwin(WINDOW *\fIwin\fP); +\fBint wredrawln(WINDOW *\fIwin\fP, int \fIbeg_line\fP, int \fInum_lines\fP); +.fi .SH DESCRIPTION -.SS refresh/wrefresh +.SS "refresh, wrefresh" The \fBrefresh\fP and \fBwrefresh\fP routines (or \fBwnoutrefresh\fP and \fBdoupdate\fP) must be called to get actual output to the terminal, as other routines merely manipulate data structures. @@ -73,20 +74,21 @@ the named window to the \fIphysical screen\fP, taking into account what is already there to do optimizations. The \fBrefresh\fP routine is the same, using \fBstdscr\fP as the default window. -Unless \fBleaveok\fP has been +Unless \fBleaveok\fP(3X) has been enabled, the physical cursor of the terminal is left at the location of the cursor for that window. -.SS wnoutrefresh/doupdate -.PP +.SS "wnoutrefresh, doupdate" The \fBwnoutrefresh\fP and \fBdoupdate\fP routines allow multiple updates with more efficiency than \fBwrefresh\fP alone. In addition to all the window structures, \fBcurses\fP keeps two data structures representing the terminal screen: .bP -a \fIphysical screen\fP, describing what is actually on the screen, and +a \fIphysical screen\fP, +describing what is actually on the screen, and .bP -a \fIvirtual screen\fP, describing what the programmer wants to have on the screen. +a \fIvirtual screen\fP, +describing what the programmer wants to have on the screen. .PP The routine \fBwrefresh\fP works by .bP @@ -120,18 +122,18 @@ order and the overlap region will be modified only when it is explicitly changed. (But see the section on \fBPORTABILITY\fP below for a warning about exploiting this behavior.) -.SS wredrawln/redrawwin -.PP +.SS "wredrawln, redrawwin" The \fBwredrawln\fP routine indicates to \fBcurses\fP that some screen lines are corrupted and should be thrown away before anything is written over them. It touches the indicated lines (marking them changed). The routine \fBredrawwin\fP touches the entire window. .SH RETURN VALUE -Routines that return an integer return \fBERR\fP upon failure, and \fBOK\fP -(SVr4 only specifies "an integer value other than \fBERR\fP") upon successful -completion. +These routines return the integer \fBERR\fP upon failure and \fBOK\fP +(SVr4 specifies only +\*(``an integer value other than \fBERR\fP\*('') +upon successful completion. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. In this implementation .RS 3 .TP 5 @@ -147,7 +149,7 @@ if the associated call to \fBtouchln\fP returns an error. .SH NOTES Note that \fBrefresh\fP and \fBredrawwin\fP may be macros. .SH PORTABILITY -The XSI Curses standard, Issue 4 describes these functions. +X/Open Curses, Issue 4 describes these functions. .PP Whether \fBwnoutrefresh\fP copies to the virtual screen the entire contents of a window or just its changed portions has never been well-documented in @@ -158,6 +160,6 @@ implementations. Instead, you can do an explicit \fBtouchwin\fP before the \fBwnoutrefresh\fP call to guarantee an entire-contents copy anywhere. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_outopts\fP(3X) -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_outopts\fP(3X) +\fB\%curs_variables\fP(3X) diff --git a/man/curs_scanw.3x b/man/curs_scanw.3x index 34fe64a0..409c297f 100644 --- a/man/curs_scanw.3x +++ b/man/curs_scanw.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,143 +27,229 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scanw.3x,v 1.31 2021/12/25 21:49:32 tom Exp $ -.TH curs_scanw 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_scanw.3x,v 1.53 2024/04/20 19:18:18 tom Exp $ +.TH curs_scanw 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBscanw\fP, -\fBwscanw\fP, -\fBmvscanw\fP, -\fBmvwscanw\fP, -\fBvwscanw\fP, \fBvw_scanw\fP \- convert formatted input from a \fBcurses\fP window +\fB\%scanw\fP, +\fB\%wscanw\fP, +\fB\%mvscanw\fP, +\fB\%mvwscanw\fP, +\fB\%vwscanw\fP, +\fB\%vw_scanw\fP \- +read formatted input from a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint scanw(const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint wscanw(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint mvscanw(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP -.br -\fBint mvwscanw(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP -.sp -\fBint vw_scanw(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIvarglist\fP\fB);\fP -.sp -/* obsolete */ -.br -\fBint vwscanw(WINDOW *\fP\fIwin\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIvarglist\fP\fB);\fP -.SH DESCRIPTION -The \fBscanw\fP, \fBwscanw\fP and \fBmvscanw\fP routines are analogous to -\fBscanf\fP [see \fBscanf\fP(3)]. -The effect of these routines is as though -\fBwgetstr\fP were called on the window, and the resulting line used as input -for \fBsscanf\fP(3). -Fields which do not map to a variable in the \fIfmt\fP -field are lost. +.nf +\fB#include .PP -The \fBvwscanw\fP and \fBvw_scanw\fP routines are analogous to \fBvscanf\fP(3). -They perform a \fBwscanw\fP using a variable argument list. -The third argument is a \fBva_list\fP, -a pointer to a list of arguments, as defined in \fB\fP. -.SH RETURN VALUE -\fBvwscanw\fP returns \fBERR\fP on failure and an integer equal to the -number of fields scanned on success. +\fBint scanw(const char *\fIfmt\fP, ...); +\fBint wscanw(WINDOW *\fIwin\fP, const char *\fIfmt\fP, ...); +\fBint mvscanw(int \fIy\fP, int \fIx\fP, const char *\fIfmt\fP, ...); +\fBint mvwscanw(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const char *\fIfmt\fP, ...); .PP -Applications may use the return value from the \fBscanw\fP, \fBwscanw\fP, -\fBmvscanw\fP and \fBmvwscanw\fP routines to determine the number of fields -which were mapped in the call. +\fBint vw_scanw(WINDOW *\fIwin\fP, const char *\fIfmt\fP, va_list \fIvarglist\fP); .PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. -.SH HISTORY -While \fBscanw\fP 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 , 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 internally in 4.4BSD curses. -Even with this improvement, -BSD curses did not use function prototypes (or even declare -functions) in the header until 1992. +\fI/* obsolete */\fP +\fBint vwscanw(WINDOW *\fIwin\fP, const char *\fIfmt\fP, va_list \fIvarglist\fP); +.fi +.SH DESCRIPTION +\fB\%scanw\fP, +\fB\%wscanw\fP, +\fB\%mvscanw\fP, +and +\fB\%mvwscanw\fP +are analogous to \fI\%scanf\fP(3). +In effect, +they call \fB\%wgetstr\fP(3X) with +.I win +(or +.BR \%stdscr ) +as its first argument, +then attempt conversion of the resulting string with \fI\%vsscanf\fP(3). +Fields in the string that do not map to a variable in the \fIfmt\fP +parameter are discarded. .PP -SVr2 documented -\fBscanw\fP, -\fBwscanw\fP -tersely as \*(``scanf through \fIstdscr\fP\*('' and -tersely as \*(``scanf through \fIwin\fP\*('', respectively. +\fB\%vwscanw\fP +and +\fB\%vw_scanw\fP are analogous to \fI\%vscanf\fP(3), +and perform a \fB\%wscanw\fP using a variable argument list. +The third argument is a \fI\%va_list\fP, +a pointer to a list of arguments, +as defined in \fI\%stdarg.h\fP. +.SH RETURN VALUE +These functions return +.B ERR +upon failure and otherwise a count of successful conversions; +this quantity may be zero. .PP -SVr3 added -\fBmvscanw\fP, and -\fBmvwscanw\fP, with a three-line summary saying that they were analogous -to \fBscanf\fP(3), -explaining that the string which would be output from \fBscanf\fP(3) would -instead be output using \fBwaddstr\fP on the given window. -SVr3 also added \fBvwscanw\fP, saying that the third parameter -is a \fBva_list\fP, defined in , -and referring the reader to the manual pages for \fIvarargs\fP and -\fBvprintf\fP for detailed descriptions. -(Because the SVr3 documentation does not mention \fBvscanf\fP, -that reference to \fBvprintf\fP may not be an error). +In +.IR \%ncurses , +failure occurs if \fI\%vsscanf\fP(3) returns +\fBEOF\fP, +or if the window pointer +.I win +is null. .PP -SVr4 added no new variations of \fBscanw\fP, -but provided for using or to define the \fBva_list\fP -type. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.SH NOTES +No wide character counterpart functions are defined by the +\*(``wide\*('' +.I \%ncurses +configuration nor by any standard. +They are unnecessary: +to retrieve and convert a wide-character string from a +.I curses +terminal keyboard, +use these functions with the \fI\%scanf\fP(3) conversions \*(``%lc\*('' +and \*(``%ls\*('' for wide characters and strings, +respectively. .PP -X/Open Curses added \fBvw_scanw\fP to replace \fBvwscanw\fP, -stating that its \fBva_list\fP definition requires . +.I \%ncurses +implements \fI\%vsscanf\fP(3) internally if it is unavailable when the +library is configured. .SH PORTABILITY -In this implementation, \fBvw_scanw\fP and \fBvwscanw\fP are equivalent, -to support legacy applications. -However, the latter (\fBvwscanw\fP) is obsolete: +X/Open Curses, +Issue 4 describes these functions. +It specifies no error conditions for them. +.PP +.I \%ncurses +defines \fB\%vw_scanw\fP and \fB\%vwscanw\fP identically to support +legacy applications. +However, +the latter is obsolete. .bP -The XSI Curses standard, Issue 4 described these functions, -noting that the function -\fBvwscanw\fP is marked TO BE WITHDRAWN, and is to be replaced by a function -\fBvw_scanw\fP using the \fB\fP interface. +X/Open Curses, +Issue 4 Version 2 (1996), +marked \fB\%vwscanw\fP as requiring \fI\%varargs.h\fP and +\*(``TO BE WITHDRAWN\*('', +and specified \fB\%vw_scanw\fP using the \fI\%stdarg.h\fP interface. .bP -The Single Unix Specification, Version 2 states that -\fBvw_scanw\fP is preferred to \fBvwscanw\fP since the latter requires -including \fB\fP, which -cannot be used in the same file as \fB\fP. -This implementation uses \fB\fP for both, because that header -is included in \fB. +X/Open Curses, +Issue 5, +Draft 2 (December 2007) marked \fB\%vwscanw\fP (along with +\fB\%vwscanw\fP and the \fItermcap\fP interface) as withdrawn. +After incorporating review comments, +this became +X/Open Curses, Issue 7 (2009). .bP -X/Open Curses, Issue 5 (December 2007) marked \fBvwscanw\fP (along with -\fBvwprintw\fP and the termcap interface) as withdrawn. -.LP -Both XSI and The Single Unix Specification, Version 2 state that these -functions return \fBERR\fP or \fBOK\fP. +.I \%ncurses +provides \fB\%vwscanw\fP, +but marks it as deprecated. +.PP +X/Open Curses Issues 4 and 7 both state that these functions return +\fBERR\fP or \fBOK\fP. +This is likely an erratum. .bP -Since the underlying \fBscanf\fP(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 than being done intentionally. +Since the underlying \fI\%scanf\fP(3) returns the number of successful +conversions, +and SVr4 +.I curses +was documented to use this feature, +this may have been an editorial solecism introduced by X/Open, +rather than an intentional change. .bP -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 \fBvsscanf\fP to scan the string, +This implementation retains compatibility with SVr4 +.IR curses . +As of 2018, +NetBSD +.I curses +also returns the number of successful conversions. +Both +.I \%ncurses\fP +and NetBSD +.I curses +call \fI\%vsscanf\fP(3) to scan the string, which returns \fBEOF\fP on error. .bP -Portable applications should only test if the return value is \fBERR\fP, -since the \fBOK\fP value (zero) is likely to be misleading. +Portable applications should test only if the return value is \fBERR\fP, +and not compare it to \fBOK\fP, +since that value (zero) might be misleading. .IP -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. +One portable way to get useful results would be to use a \*(``%n\*('' +conversion at the end of the format string, +and check the value of the corresponding variable to determine how many +conversions succeeded. +.SH HISTORY +\fB\%scanw\fP was implemented in 4BSD +(November 1980); +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/lib/\ +.\" libcurses/scanw.c +that early version of +.I curses +preceded the ANSI C standard of 1989. +The function was unused in Berkeley distributions for over ten years, +until 4.4BSD, +which employed it in a game. +The 4BSD \fB\%scanw\fP did not use \fI\%varargs.h\fP, +though that had been available since Seventh Edition Unix (1979). +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/\ +.\" varargs.h +In 1991 +(a couple of years after SVr4 was generally available, +and after the C standard was published), +other developers updated the library, +using \fI\%stdarg.h\fP internally in 4.4BSD +.IR curses . +Even with this improvement, +BSD +.I curses +did not use function prototypes +(nor even declare functions) +in \fI\%curses.h\fP until 1992. +.PP +SVr2 (1984) documented \fB\%scanw\fP and \fB\%wscanw\fP tersely as +\*(``scanf through \fB\%stdscr\fP\*('' and +\*(``scanf through \fIwin\fP\*('', +respectively. +.PP +SVr3 (1987) added +\fB\%mvscanw\fP, and +\fB\%mvwscanw\fP, stating +.RS +.PP +\*(``[t]hese routines correspond to \fIscanf\fP(3S), +as do their arguments and return values. +\fB\%wgetstr\fP() is called on the window, +and the resulting line is used as input for the scan.\*('' +.RE +.PP +SVr3 also implemented \fB\%vwscanw\fP, +describing its third parameter as a \fI\%va_list\fP, +defined in \fI\%varargs.h\fP, +and referred the reader to the manual pages for \fI\%varargs\fP and +\fI\%vprintf\fP for detailed descriptions. +(Because the SVr3 documentation does not mention \fI\%vscanf\fP, +the reference to \fI\%vprintf\fP might not be an error). +.PP +SVr4 (1989) introduced no new variations of \fI\%scanw\fP, +but provided for using either \fI\%varargs.h\fP or \fI\%stdarg.h\fP to +define the \fI\%va_list\fP type. +.\" either header declares "va_list", but only one can be used +.PP +X/Open Curses, Issue 4 (1995), +defined \fI\%vw_scanw\fP to replace \fI\%vwscanw\fP, +stating that its \fI\%va_list\fP type is defined in \fI\%stdarg.h\fP. .SH SEE ALSO -.na -\fBcurses\fP(3X), -\fBcurs_getstr\fP(3X), -\fBcurs_printw\fP(3X), -\fBcurs_termcap\fP(3X), -\fBscanf\fP(3). +\fB\%curses\fP(3X), +\fB\%curs_getstr\fP(3X), +\fB\%curs_printw\fP(3X), +\fB\%scanf\fP(3), +\fB\%vscanf\fP(3) diff --git a/man/curs_scr_dump.3x b/man/curs_scr_dump.3x index 95994ecc..5f14a228 100644 --- a/man/curs_scr_dump.3x +++ b/man/curs_scr_dump.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,94 +27,126 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scr_dump.3x,v 1.19 2021/12/25 21:12:41 tom Exp $ -.TH curs_scr_dump 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_scr_dump.3x,v 1.43 2024/04/20 18:54:36 tom Exp $ +.TH curs_scr_dump 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBscr_dump\fP, -\fBscr_restore\fP, -\fBscr_init\fP, -\fBscr_set\fP \- read (write) a \fBcurses\fP screen from (to) a file -.ad -.hy +\fB\%scr_dump\fP, +\fB\%scr_restore\fP, +\fB\%scr_init\fP, +\fB\%scr_set\fP \- +read/write a \fIcurses\fR screen from/to a file .SH SYNOPSIS -\fB#include \fP -.sp -\fBint scr_dump(const char *\fP\fIfilename\fP\fB);\fP -.br -\fBint scr_restore(const char *\fP\fIfilename\fP\fB);\fP -.br -\fBint scr_init(const char *\fP\fIfilename\fP\fB);\fP -.br -\fBint scr_set(const char *\fP\fIfilename\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint scr_dump(const char *\fIfilename\fP); +\fBint scr_restore(const char *\fIfilename\fP); +\fBint scr_init(const char *\fIfilename\fP); +\fBint scr_set(const char *\fIfilename\fP); +.fi .SH DESCRIPTION +.I curses +provides applications the ability to write the contents of the screen +to a file and read them back. +To read/write a window +(rather than the whole screen) +from/to a file, +use \fB\%getwin\fP(3X) and +\fB\%putwin\fP(3X), +respectively. .SS scr_dump -.PP -The \fBscr_dump\fP routine dumps the current contents -of the \fIvirtual screen\fP -to the file \fIfilename\fP. +\fB\%scr_dump\fP writes to +.I filename +the contents of the virtual screen; +see \fB\%curscr\fP(3X). .SS scr_restore -.PP -The \fBscr_restore\fP routine sets the \fIvirtual screen\fP to the contents -of \fIfilename\fP, which must have been written using \fBscr_dump\fP. -The next call to \fBdoupdate\fP restores -the \fIphysical screen\fP to the way it looked in the dump file. +\fB\%scr_restore\fP updates the virtual screen to contain the contents +of +.I filename +(if it was validly written with \fB\%scr_dump\fP). +No refresh is performed; +after performing any further desired updates, +call \fB\%doupdate\fP(3X) or similar. .SS scr_init +\fB\%scr_init\fP reads +.IR filename , +using it to initialize +.I curses +data structures describing the state of the terminal screen. +If these data are valid, +.I curses +bases its next update of the screen on this information rather than +clearing it and starting from scratch. .PP -The \fBscr_init\fP routine reads in the contents of \fIfilename\fP and uses -them to initialize the \fBcurses\fP data structures about what the terminal -currently has on its screen. -If the data is determined to be valid, -\fBcurses\fP bases its next update of the screen on this information rather -than clearing the screen and starting from scratch. -\fBscr_init\fP is used -after \fBinitscr\fP(3X) or a \fBsystem\fP(3) call to share -the screen with another process which has done a \fBscr_dump\fP after its -\fBendwin\fP(3X) call. -The data is declared invalid +The data fail the validity check .bP -if the terminfo capabilities \fBrmcup\fP and \fBnrrmc\fP exist, also +if the terminal employs +.I \%term\%info +capabilities +.B \%exit_ca_mode +.RB ( \%rmcup ) +or +.B \%non_rev_rmcup +.RB ( \%nrrmc ) +are defined, +or .bP -if the terminal has been written to since the preceding \fBscr_dump\fP call. -.SS scr_set +if +.I curses +knows that the terminal has been written to since the preceding +\fB\%scr_dump\fP call. .PP +\fB\%scr_init\fP could be used after \fB\%initscr\fP(3X) or +\fB\%system\fP(3) to share the screen with another process that has +done a \fBscr_dump\fP after \fB\%endwin\fP(3X). +.SS scr_set The \fBscr_set\fP routine is a combination of \fBscr_restore\fP and \fBscr_init\fP. It tells the program that the information in \fIfilename\fP is what is currently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function. -.PP -To read (write) a window from (to) a file, use the \fBgetwin\fP and -\fBputwin\fP routines [see \fBcurs_util\fP(3X)]. .SH RETURN VALUE -All routines return the integer \fBERR\fP upon failure and \fBOK\fP -upon success. +These functions return \fBOK\fP on success and \fBERR\fP on failure. .PP -X/Open defines no error conditions. +X/Open defines no failure conditions. In this implementation, -each will return an error if the file cannot be opened. +each function fails if it cannot open +.IR filename . .SH NOTES -Note that \fBscr_init\fP, \fBscr_set\fP, and \fBscr_restore\fP may be macros. +\fB\%scr_init\fP, +\fB\%scr_set\fP, +and +\fB\%scr_restore\fP may be macros. .SH PORTABILITY -The XSI Curses standard, Issue 4, describes these functions (adding the const -qualifiers). +X/Open Curses, +Issue 4 describes these functions. +.PP +.\" SVID 4, p. 529 +SVr4 omitted the +.I \%const +qualifiers. .PP -The SVr4 docs merely say under \fBscr_init\fP that the dump data is also -considered invalid "if the time-stamp of the tty is old" but do not define -\*(``old\*(''. +SVr4 documentation describes \fB\%scr_init\fP such that the dump data is +also considered invalid \*(``if the time-stamp of the tty is old\*('' +but does not define \*(``old\*(''. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_util\fP(3X), -\fBscr_dump\fP(5), -\fBsystem\fP(3) +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_util\fP(3X), +\fB\%system\fP(3), +\fB\%scr_dump\fP(5) diff --git a/man/curs_scroll.3x b/man/curs_scroll.3x index 4e01b55d..16d5a501 100644 --- a/man/curs_scroll.3x +++ b/man/curs_scroll.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,69 +27,111 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scroll.3x,v 1.21 2021/12/25 21:49:32 tom Exp $ -.TH curs_scroll 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_scroll.3x,v 1.43 2024/04/20 18:54:36 tom Exp $ +.TH curs_scroll 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .SH NAME -\fBscroll\fP, -\fBscrl\fP, -\fBwscrl\fP \- scroll a \fBcurses\fP window -.ad -.hy +\fB\%scroll\fP, +\fB\%scrl\fP, +\fB\%wscrl\fP \- +scroll a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint scroll(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBint scrl(int \fP\fIn\fP\fB);\fP -.br -\fBint wscrl(WINDOW *\fP\fIwin\fP\fB, int \fP\fIn\fP\fB);\fP -.br -.SH DESCRIPTION -The \fBscroll\fP routine scrolls the window up one line. -This involves moving -the lines in the window data structure. -As an optimization, if the scrolling -region of the window is the entire screen, -the \fIphysical screen\fP may be scrolled at the same time. +.nf +\fB#include +.PP +\fBint scroll(WINDOW *\fIwin\fP); .PP -For positive \fIn\fP, the \fBscrl\fP and \fBwscrl\fP routines scroll the -window up \fIn\fP lines (line \fIi\fP+\fIn\fP becomes \fIi\fP); otherwise -scroll the window down \fIn\fP lines. -This involves moving the lines in the -window character image structure. -The current cursor position is not changed. +\fBint scrl(int \fIn\fP); +\fBint wscrl(WINDOW *\fIwin\fP, int \fIn\fP); +.fi +.SH DESCRIPTION +\fBscroll\fP scrolls the given window up one line. +That is, +every visible line we might number +.I i +becomes line +.IR i "\-1." +The text of the top line in the window disappears and the bottom line +is populated with blank characters; +see \fB\%bkgd\fP(3X) or \fB\%bkgrnd\fP(3X). +As an optimization, +if the scrolling region of the window is the entire screen, +the physical screen may be scrolled at the same time; +see \fB\%curscr\fP(3X). .PP -For these functions to work, scrolling must be enabled via \fBscrollok\fP. -.SH RETURN VALUE -These routines return \fBERR\fP upon failure, and \fBOK\fP (SVr4 only specifies -"an integer value other than \fBERR\fP") upon successful completion. +\fB\%scrl\fP and \fB\%wscrl\fP scroll +.B \%stdscr +or the specified window up or down depending on the sign of +.IR n . +.bP +For positive +.IR n , +line \fIi\fP+\fIn\fP becomes \fIi\fP (scrolling up); +.bP +for negative +.IR n , +line \fIi\fP-\fIn\fP becomes \fIi\fP (scrolling down). .PP -X/Open defines no error conditions. +The cursor does not move. +These functions perform no operation unless scrolling is enabled for the +window via \fB\%scrollok\fP(3X). +.SH "RETURN VALUE" +These functions return +.B ERR +upon failure and +.B OK +upon success. .PP -This implementation returns an error -if the window pointer is null, or -if scrolling is not enabled in the window, e.g., with \fBscrollok\fP. +.I \%ncurses +returns \fBERR\fP if scrolling is not enabled in the window, +for example with \fB\%scrollok\fP(3X), +or if the +.I \%WINDOW +pointer is null. .SH NOTES -Note that \fBscrl\fP and \fBscroll\fP may be macros. -.PP -The SVr4 documentation says that the optimization of physically scrolling -immediately if the scroll region is the entire screen \*(``is\*('' performed, not -\*(``may be\*('' performed. -This implementation deliberately does not guarantee -that this will occur, to leave open the possibility of smarter -optimization of multiple scroll actions on the next update. +Unusually, +there is no \fB\%wscroll\fP function; +\fBscroll\fP behaves as one would expect \fB\%wscroll\fP to, +accepting a \fI\%WINDOW\fP pointer argument. .PP -Neither the SVr4 nor the XSI documentation specify whether the current -attribute or -current color-pair of blanks generated by the scroll function is zeroed. -Under this implementation it is. +\fB\%scrl\fP and \fB\%scroll\fP may be implemented as macros. .SH PORTABILITY -The XSI Curses standard, Issue 4 describes these functions. +X/Open Curses, +Issue 4 describes these functions. +It defines no error conditions. +.PP +SVr4 specifies only +\*(``an integer value other than \fBERR\fP\*('' as a successful return +value. +.PP +SVr4 indicates that the optimization of physically scrolling immediately +if the scroll region is the entire screen \*(``is\*('' performed, +not \*(``may be\*('' performed. +.I \%ncurses +deliberately does not guarantee that this will occur, +to leave open the possibility of smarter optimization of multiple scroll +actions on the next update. +.PP +Neither SVr4 +.I curses +nor X/Open Curses specify whether the current attribute or current color +pair of blanks generated by the scroll function are zeroed. +.I \%ncurses +does so. .SH SEE ALSO -\fBcurses\fP(3X), \fBcurs_outopts\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_outopts\fP(3X) diff --git a/man/curs_slk.3x b/man/curs_slk.3x index d209ecf8..fbc71811 100644 --- a/man/curs_slk.3x +++ b/man/curs_slk.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,101 +27,96 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_slk.3x,v 1.39 2021/12/25 17:39:16 tom Exp $ -.TH curs_slk 3X "" +.\" $Id: curs_slk.3x,v 1.71 2024/04/20 18:54:36 tom Exp $ +.TH curs_slk 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBslk_init\fP, -\fBslk_set\fP, -\fBslk_wset\fP, -\fBslk_refresh\fP, -\fBslk_noutrefresh\fP, -\fBslk_label\fP, -\fBslk_clear\fP, -\fBslk_restore\fP, -\fBslk_touch\fP, -\fBslk_attron\fP, -\fBslk_attrset\fP, -\fBslk_attroff\fP, -\fBslk_attr_on\fP, -\fBslk_attr_set\fP, -\fBslk_attr_off\fP, -\fBslk_attr\fP, -\fBslk_color\fP, -\fBextended_slk_color\fP \- \fBcurses\fP soft label routines -.ad -.hy +\fB\%slk_init\fP, +\fB\%slk_set\fP, +\fB\%slk_wset\fP, +\fB\%slk_refresh\fP, +\fB\%slk_noutrefresh\fP, +\fB\%slk_label\fP, +\fB\%slk_clear\fP, +\fB\%slk_restore\fP, +\fB\%slk_touch\fP, +\fB\%slk_attron\fP, +\fB\%slk_attrset\fP, +\fB\%slk_attroff\fP, +\fB\%slk_attr_on\fP, +\fB\%slk_attr_set\fP, +\fB\%slk_attr_off\fP, +\fB\%slk_attr\fP, +\fB\%slk_color\fP, +\fB\%extended_slk_color\fP \- +\fIcurses\fR soft label key routines .SH SYNOPSIS -\fB#include \fP -.sp -\fBint slk_init(int \fP\fIfmt\fP\fB);\fP -.sp -\fBint slk_set(int \fP\fIlabnum\fP\fB, const char *\fP\fIlabel\fP\fB, int \fP\fIfmt\fP\fB);\fP -.br -/* extension */ -.br -\fBint slk_wset(int \fP\fIlabnum\fP\fB, const wchar_t *\fP\fIlabel\fP\fB, int \fP\fIfmt\fP\fB);\fP -.sp -\fBchar *slk_label(int \fP\fIlabnum\fP\fB);\fP -.sp -\fBint slk_refresh(void);\fP -.br -\fBint slk_noutrefresh(void);\fP -.br -\fBint slk_clear(void);\fP -.br -\fBint slk_restore(void);\fP -.br -\fBint slk_touch(void);\fP -.sp -\fBint slk_attron(const chtype \fP\fIattrs\fP\fB);\fP -.br -\fBint slk_attroff(const chtype \fP\fIattrs\fP\fB);\fP -.br -\fBint slk_attrset(const chtype \fP\fIattrs\fP\fB);\fP -.br -\fBint slk_attr_on(attr_t \fP\fIattrs\fP\fB, void* \fP\fIopts\fP\fB);\fP -.br -\fBint slk_attr_off(const attr_t \fP\fIattrs\fP\fB, void * \fP\fIopts\fP\fB);\fP -.br -\fBint slk_attr_set(const attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void* \fP\fIopts\fP\fB);\fP -.sp -\fBattr_t slk_attr(void);\fP -.sp -\fBint slk_color(short \fP\fIpair\fP\fB);\fP -.br -/* extension */ -.br -\fBint extended_slk_color(int \fP\fIpair\fP\fB);\fP +.nf +\fB#include +.PP +\fBint slk_init(int \fIfmt\fP); +.PP +\fBint slk_set(int \fIlabnum\fP, const char *\fIlabel\fP, int \fIalign\fP); +\fBint slk_wset(int \fIlabnum\fP, const wchar_t *\fIlabel\fP, int \fIalign\fP); +.PP +\fBchar *slk_label(int \fIlabnum\fP); +.PP +\fBint slk_refresh(void); +\fBint slk_noutrefresh(void); +\fBint slk_clear(void); +\fBint slk_restore(void); +\fBint slk_touch(void); +.PP +\fBint slk_attron(const chtype \fIattrs\fP); +\fBint slk_attroff(const chtype \fIattrs\fP); +\fBint slk_attrset(const chtype \fIattrs\fP); +\fBint slk_attr_on(attr_t \fIattrs\fP, void *\fIopts\fP); +\fBint slk_attr_off(const attr_t \fIattrs\fP, void *\fIopts\fP); +\fBint slk_attr_set(const attr_t \fIattrs\fP, short \fIpair\fP, void*\fIopts\fP); +\fI/* extension */ +\fBattr_t slk_attr(void); +.PP +\fBint slk_color(short \fIpair\fP); +\fI/* extension */ +\fBint extended_slk_color(int \fIpair\fP); +.fi .SH DESCRIPTION -The slk* functions manipulate the set of soft function-key labels that exist on -many terminals. +These functions manipulate the soft function key labels that some +hardware terminals support. For those terminals that do not have soft labels, -\fBcurses\fP takes over the bottom line of \fBstdscr\fP, reducing the size of -\fBstdscr\fP and the variable \fBLINES\fP. -\fBcurses\fP standardizes on eight -labels of up to eight characters each. -In addition to this, the ncurses -implementation supports a mode where it simulates 12 labels of up to five -characters each. -This is useful for PC-like enduser devices. -ncurses simulates this mode by taking over up to two lines at +\fIcurses\fP takes over the bottom line of \fB\%stdscr\fP, +reducing its vertical size and the value of \fBLINES\fP by one. +By default, +\fIcurses\fP uses eight labels of up to eight characters each. +.PP +\fI\%ncurses\fP +furthermore supports a mode comprising twelve labels of up to five +characters each, +following a convention associated with the IBM PC/AT keyboard. +\fI\%ncurses\fP simulates this mode by taking over up to two lines at the bottom of the screen; it does not try to use any hardware support for this mode. .SS Initialization -.PP -The \fBslk_init\fP routine must be called before \fBinitscr\fP or \fBnewterm\fP -is called. -If \fBinitscr\fP eventually uses a line from \fBstdscr\fP to +\fB\%slk_init\fP must be called before \fB\%initscr\fP or +\fB\%newterm\fP. +If \fB\%initscr\fP eventually uses a line from \fB\%stdscr\fP to emulate the soft labels, -then \fIfmt\fP determines how the labels are arranged on the screen: -.RS 3 +then \fIfmt\fP determines how the labels are arranged on the screen. .TP 3 .B 0 indicates a 3\-2\-3 arrangement of @@ -135,85 +130,104 @@ indicates the PC-like 4\-4\-4 mode. .TP 3 .B 3 is again the PC-like 4\-4\-4 mode, -but in addition an index line is generated, helping the user to -identify the key numbers easily. -.RE +but in addition an index line is generated, +helping the user to associate each label with its numbered function key. +\fBLINES\fP and the vertical size of \fB\%stdscr\fP are further reduced. .SS Labels -.PP -The \fBslk_set\fP routine -(and the \fBslk_wset\fP routine for the wide-character library) -has three parameters: -.RS 3 -.TP 5 +Populate the labels with normal strings +(\fB\%slk_set\fP) +or wide-character strings +(\fB\%slk_wset\fP). +Each function takes three parameters. +.TP 8 \" "labnum" + 2n .I labnum is the label number, from \fB1\fP to \fB8\fP -(12 for \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP); +(12 if \fIfmt\fP in \fB\%slk_init\fP is \fB2\fP or \fB3\fP); .TP .I label is be the string to put on the label, up to eight -(five for \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP) +(five if \fIfmt\fP in \fB\%slk_init\fP is \fB2\fP or \fB3\fP) characters in length. -A null string or a null pointer sets up a blank label. +A empty string or a null pointer sets up a blank label. .TP -.I fmt -is either -\fB0\fP, \fB1\fP, or \fB2\fP, indicating whether the label is to be -left-justified, centered, or right-justified, respectively, within the -label. -.RE -.PP -The \fBslk_label\fP routine returns the current label for label number -\fIlabnum\fP, with leading and trailing blanks stripped. -.SS Screen updates -.PP -The \fBslk_refresh\fP and \fBslk_noutrefresh\fP routines correspond to -the \fBwrefresh\fP and \fBwnoutrefresh\fP routines. +.I align +is +.BR 0 , +.BR 1 , +or +.BR 2 , +aligning +.I label +to the left, +center, +or right, +respectively, +within the 8 (5) character cells housing it. .PP -The \fBslk_clear\fP routine clears the soft labels from the screen. +\fB\%slk_label\fP obtains the string assigned to label number +\fIlabnum\fP, +with any leading and trailing blanks stripped. +.SS "Screen Updates" +\fB\%slk_refresh\fP and \fB\%slk_noutrefresh\fP affect the soft key +label lines as \fB\%wrefresh\fP and \fB\%wnoutrefresh\fP do the +.I curses +window. .PP -The \fBslk_restore\fP routine restores the soft labels to the screen -after a \fBslk_clear\fP has been performed. +The \fB\%slk_clear\fP routine clears the soft labels from the screen. .PP -The \fBslk_touch\fP routine forces all the soft labels to be output -the next time a \fBslk_noutrefresh\fP is performed. -.SS Video attributes +The \fB\%slk_restore\fP routine restores the soft labels to the screen +after a \fB\%slk_clear\fP has been performed. .PP +The \fB\%slk_touch\fP routine forces all the soft labels to be output +the next time a \fB\%slk_noutrefresh\fP is performed. +.SS "Video Attributes" The -\fBslk_attron\fP, \fBslk_attrset\fP, \fBslk_attroff\fP and \fBslk_attr\fP +\fB\%slk_attron\fP, +\fB\%slk_attrset\fP, +\fB\%slk_attroff\fP, +and +\fB\%slk_attr\fP routines correspond to -\fBattron\fP, \fBattrset\fP, \fBattroff\fP and \fBattr_get\fP, respectively. -They have an effect only if soft labels are simulated on the bottom line of -the screen. -The default highlight for soft keys is A_STANDOUT (as in -System V curses, which does not document this fact). +\fB\%attron\fP, +\fB\%attrset\fP, +\fB\%attroff\fP, +and +\fB\%attr_get\fP, +respectively. +They have an effect only if soft labels are simulated on the bottom line +of the screen. +The default highlight for soft key labels is \fB\%A_STANDOUT\fP +(as in System\ V \fIcurses\fP, +which does not document this fact). .SS Colors -.PP -The \fBslk_color\fP routine corresponds to \fBcolor_set\fP. +The \fB\%slk_color\fP routine corresponds to \fB\%color_set\fP. It has an effect only if soft labels are simulated on the bottom line of the screen. .PP -Because \fBslk_color\fP accepts only \fBshort\fP (signed 16-bit integer) values, +Because \fB\%slk_color\fP accepts +only \fIshort\fP +(signed 16-bit integer) +values, this implementation provides -\fBextended_slk_color\fP which accepts an integer value, e.g., 32-bits. -. +\fB\%extended_slk_color\fP, +which accepts an \fIint\fP value of at least 32 bits. .SH RETURN VALUE -These routines return \fBERR\fP upon failure -and \fBOK\fP (SVr4 specifies only "an integer value other than \fBERR\fP") +Routines that return an integer return \fBERR\fP upon failure and +\fBOK\fP +(SVr4 specifies only +\*(``an integer value other than \fBERR\fP\*('') upon successful completion. .PP -X/Open defines no error conditions. +X/Open Curses defines no error conditions. +.PP In this implementation .RS 3 .TP 5 \fBslk_attr\fP returns the attribute used for the soft keys. .TP 5 -.na -.hy 0 \fBslk_attroff\fP, \fBslk_attron\fP, \fBslk_clear\fP, \fBslk_noutrefresh\fP, \fBslk_refresh\fP, \fBslk_touch\fP -.ad -.hy return an error if the terminal or the softkeys were not initialized. .TP 5 @@ -224,12 +238,12 @@ if the terminal or the softkeys were not initialized. \fBslk_attr_set\fP returns an error if the terminal or the softkeys were not initialized, or -the color pair is outside the range 0..COLOR_PAIRS\-1. +the color pair is outside the range 0..\fBCOLOR_PAIRS\fP\-1. .TP 5 \fBslk_color\fP returns an error if the terminal or the softkeys were not initialized, or -the color pair is outside the range 0..COLOR_PAIRS\-1. +the color pair is outside the range 0..\fBCOLOR_PAIRS\fP\-1. .TP 5 \fBslk_init\fP returns an error @@ -245,76 +259,121 @@ the \fIlabnum\fP parameter is outside the range of label counts, or if the format parameter is outside the range 0..2, or if memory for the labels cannot be allocated. .RE -.SH HISTORY -SVr3 introduced these functions: - slk_clear - slk_init - slk_label - slk_noutrefresh - slk_refresh - slk_restore - slk_set - slk_touch -.PP -SVr4 added these functions: - slk_attroff - slk_attron - slk_attrset - slk_start -.PP -X/Open Curses added these: - slk_attr_off - slk_attr_on - slk_attr_set - slk_color - slk_wset +.SH NOTES +Most applications would use \fB\%slk_noutrefresh\fP because a +\fB\%wrefresh\fP is likely to follow soon. .SH EXTENSIONS -.PP -X/Open Curses documents the \fIopts\fP argument as reserved for future use, +X/Open Curses documents the \fIopts\fP argument +as reserved for future use, saying that it must be null. This implementation -uses that parameter in ABI 6 for the functions which have a color-pair +uses that parameter in ABI 6 for the functions which have a color pair parameter to support extended color pairs. .PP -For functions which modify the color, e.g., \fBslk_attr_set\fP, -if \fIopts\fP is set it is treated as a pointer to \fBint\fP, -and used to set the color pair instead of the \fBshort\fP pair parameter. -.SH NOTES -Most applications would use \fBslk_noutrefresh\fP because a -\fBwrefresh\fP is likely to follow soon. +For functions which modify the color, +e.g., +\fB\%slk_attr_set\fP, +if \fIopts\fP is set it is treated as a pointer to \fIint\fP, +and used to set the color pair instead of the \fIshort\fP pair +parameter. .SH PORTABILITY -The XSI Curses standard, Issue 4, described the soft-key functions, -with some differences from SVr4 curses: +X/Open Curses, +Issue 4 describes these functions, +with some differences from SVr4 \fIcurses\fP: .bP -It added functions like the SVr4 -attribute-manipulation functions \fBslk_attron\fP, -\fBslk_attroff\fP, \fBslk_attrset\fP, -but which use \fBattr_t\fP parameters (rather than \fBchtype\fP), +X/Open added functions like the SVr4 attribute-manipulation functions +\fB\%slk_attron\fP, +\fB\%slk_attroff\fP, +and +\fB\%slk_attrset\fP, +but which use \fI\%attr_t\fP parameters +(rather than \fI\%chtype\fP), along with a reserved \fIopts\fP parameter. .IP -Two of these new functions (unlike the SVr4 functions) have no provision -for color: \fBslk_attr_on\fP and \fBslk_attr_off\fP. +Two of these new functions +(unlike the SVr4 functions) +have no provision for color: +\fB\%slk_attr_on\fP and \fB\%slk_attr_off\fP. +.IP +The third function \%(\fBslk_attr_set\fP) has a color pair parameter. +.bP +It added \fIconst\fP qualifiers to parameters (unnecessarily), +and +.bP +It added \fB\%slk_color\fP. +.PP +Although \fB\%slk_start\fP is declared in the \fIcurses\fP header file, +it was not documented by SVr4 other than its presence in a list +of libtermlib.so.1 symbols. +Reading the source code (i.e., Illumos): +.bP +\fB\%slk_start\fP has two parameters: +.RS +.bP +\fIng\fP (number of groups) and +.bP +\fIgp\fP (group pointer). +.RE +.bP +Soft-key groups are an array of \fIng\fP integers. +.bP +In SVr4, \fB\%slk_init\fP calls \fB\%slk_start\fP passing a null for \fIgp\fP. +For this case, \fB\%slk_start\fP uses the number of groups \fIng\fP +(3 for the 3-2-3 layout, 2 for the 4-4 layout) which \fB\%slk_init\fP provided. +.IP +If \fIng\fP is neither 2 or 3, +\fB\%slk_start\fP checks the terminfo \fBfln\fP (label_format) capability, +interpreting that as a comma-separated list of numbers, +e.g., \*(``3,2,3\*('' for the 3-2-3 layout. .IP -The third function (\fBslk_attr_set\fP) has a color-pair parameter. +Finally, if there is no \fBfln\fP capability, +\fB\%slk_start\fP returns \fBERR\fP. .bP -It added \fBconst\fP qualifiers to parameters (unnecessarily), and +If \fB\%slk_start\fP is given a non-null \fIgp\fP, +it copies the \fIng\fP elements of the group of soft-keys, up to 16. +.IP +If there are more than 16 elements, \fB\%slk_start\fP returns an error. .bP -It added \fBslk_color\fP. +The format codes \fB2\fP and \fB3\fP for \fB\%slk_init\fP +were added by \fI\%ncurses\fP in 1996. +PDCurses 2.4 added this feature in 2001. .PP -The format codes \fB2\fP and \fB3\fP for \fBslk_init\fP and the -function \fBslk_attr\fP are specific to ncurses. +The function \fB\%slk_attr\fP was added by \fI\%ncurses\fP in 1996. .PP X/Open Curses does not specify a limit for the number of colors and color pairs which a terminal can support. -However, in its use of \fBshort\fP for the parameters, +However, in its use of \fIshort\fP for the parameters, it carries over SVr4's implementation detail for the compiled terminfo database, which uses signed 16-bit numbers. This implementation provides extended versions of those functions -which use \fBshort\fP parameters, +which use \fIint\fP parameters, allowing applications to use larger color- and pair-numbers. +.SH HISTORY +SVr3 introduced these functions: + \fBslk_clear\fP + \fBslk_init\fP + \fBslk_label\fP + \fBslk_noutrefresh\fP + \fBslk_refresh\fP + \fBslk_restore\fP + \fBslk_set\fP + \fBslk_touch\fP +.PP +SVr4 added these functions: + \fBslk_attroff\fP + \fBslk_attron\fP + \fBslk_attrset\fP + \fBslk_start\fP +.PP +X/Open Curses added these: + \fBslk_attr_off\fP + \fBslk_attr_on\fP + \fBslk_attr_set\fP + \fBslk_color\fP + \fBslk_wset\fP .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_attr\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_attr\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_sp_funcs.3x b/man/curs_sp_funcs.3x index 9acf03e8..e58a48e3 100644 --- a/man/curs_sp_funcs.3x +++ b/man/curs_sp_funcs.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2010-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,309 +27,201 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_sp_funcs.3x,v 1.26 2021/12/25 17:54:00 tom Exp $ -.TH curs_sp_funcs 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: curs_sp_funcs.3x,v 1.50 2024/04/20 18:56:31 tom Exp $ +.TH curs_sp_funcs 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -curs_sp_funcs \- \fBcurses\fP screen-pointer extension -.ad -.hy +\fB\%curs_sp_funcs\fP \- +\fIcurses\fR screen-pointer extension .SH SYNOPSIS -\fB#include \fP .nf -.sp -\fBint alloc_pair_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP -.br -\fBint assume_default_colors_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP -.br -\fBint baudrate_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint beep_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBbool can_change_color_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint cbreak_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint color_content_sp(SCREEN* \fP\fIsp\fP\fB, short \fP\fIcolor\fP\fB, short* \fP\fIr\fP\fB, short* \fP\fIg\fP\fB, short* \fP\fIb\fP\fB);\fP -.br -\fBint curs_set_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIvisibility\fP);\fP -.br -\fBint def_prog_mode_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint def_shell_mode_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.sp -\fBint define_key_sp(SCREEN* \fP\fIsp\fP\fB, const char * \fP\fIdefinition\fP\fB, int \fP\fIkeycode\fP\fB);\fP -.br -\fBint delay_output_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIms\fP\fB);\fP -.br -\fBint doupdate_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint echo_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint endwin_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBchar erasechar_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint erasewchar_sp(SCREEN* \fP\fIsp\fP\fB, wchar_t *\fP\fIch\fP\fB);\fP -.br -\fBint extended_color_content_sp(SCREEN * \fP\fIsp\fP\fB, int \fP\fIcolor\fP\fB, int * \fP\fIr\fP\fB, int * \fP\fIg\fP\fB, int * \fP\fIb\fP\fB);\fP -.br -\fBint extended_pair_content_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIpair\fP\fB, int * \fP\fIfg\fP\fB, int * \fP\fIbg\fP\fB);\fP -.br -\fBint extended_slk_color_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIpair\fP\fB);\fP -.sp -\fBvoid filter_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint find_pair_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP -.br -\fBint flash_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint flushinp_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint free_pair_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIpair\fP\fB);\fP -.br -\fBint get_escdelay_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint getmouse_sp(SCREEN* \fP\fIsp\fP\fB, MEVENT* \fP\fBevent\fP\fB);\fP -.br -\fBWINDOW* getwin_sp(SCREEN* \fP\fIsp\fP\fB, FILE* \fP\fIfilep\fP\fB);\fP -.br -\fBint halfdelay_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fItenths\fP\fB);\fP -.br -\fBbool has_colors_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.sp -\fBbool has_ic_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBbool has_il_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint has_key_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIch\fP\fB);\fP -.br -\fBbool has_mouse_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint init_color_sp(SCREEN* \fP\fIsp\fP\fB, short \fP\fIcolor\fP\fB, short \fP\fIr\fP\fB, short \fP\fIg\fP\fB, short \fP\fIb\fP\fB);\fP -.br -\fBint init_extended_color_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIcolor\fP\fB, int \fP\fIr\fP\fB, int \fP\fIg\fP\fB, int \fP\fIb\fP\fB);\fP -.br -\fBint init_extended_pair_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIpair\fP\fB, int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP -.br -\fBint init_pair_sp(SCREEN* \fP\fIsp\fP\fB, short \fP\fIpair\fP\fB, short \fP\fIfg\fP\fB, short \fP\fIbg\fP\fB);\fP -.br -\fBint intrflush_sp(SCREEN* \fP\fIsp\fP\fB, WINDOW* \fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBbool is_term_resized_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP -.sp -\fBbool isendwin_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint key_defined_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIdefinition\fP\fB);\fP -.br -\fBchar* keybound_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIkeycode\fP\fB, int \fP\fIcount\fP\fB);\fP -.br -\fBNCURSES_CONST char * keyname_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIc\fP\fB);\fP -.br -\fBint keyok_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIkeycode\fP\fB, bool \fP\fIenable\fP\fB);\fP -.br -\fBchar killchar_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint killwchar_sp(SCREEN* \fP\fIsp\fP\fB, wchar_t *\fP\fIch\fP\fB);\fP -.br -\fBchar* longname_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint mcprint_sp(SCREEN* \fP\fIsp\fP\fB, char *\fP\fIdata\fP\fB, int \fP\fIlen\fP\fB);\fP -.br -\fBint mouseinterval_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIerval\fP\fB);\fP -.sp -\fBmmask_t mousemask_sp(SCREEN* \fP\fIsp\fP\fB, mmask_t \fP\fInewmask\fP\fB, mmask_t *\fP\fIoldmask\fP\fB);\fP -.br -\fBint mvcur_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIoldrow\fP\fB, int \fP\fIoldcol\fP\fB, int \fP\fInewrow\fP\fB, int \fP\fInewcol\fP\fB);\fP -.br -\fBint napms_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIms\fP\fB);\fP -.br -\fBWINDOW* newpad_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fInrows\fP\fB, int \fP\fIncols\fP\fB);\fP -.br -\fBSCREEN* new_prescr(void);\fP -.br -\fBSCREEN* newterm_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fItype\fP\fB, FILE *\fP\fIoutfd\fP\fB, FILE *\fP\fIinfd\fP\fB);\fP -.br -\fBWINDOW* newwin_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB, int \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fP -.br -\fBint nl_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint nocbreak_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint noecho_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.sp -\fBvoid nofilter_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint nonl_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBvoid noqiflush_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint noraw_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint pair_content_sp(SCREEN* \fP\fIsp\fP\fB, short \fP\fIpair\fP\fB, short* \fP\fIfg\fP\fB, short* \fP\fIbg\fP\fB);\fP -.br -\fBvoid qiflush_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint raw_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint reset_prog_mode_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBvoid reset_color_pairs_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint reset_shell_mode_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.sp -\fBint resetty_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint resize_term_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP -.br -\fBint resizeterm_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP -.br -\fBint ripoffline_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIline\fP\fB, int (*\fP\fIinit\fP\fB)(WINDOW* \fP\fIwin\fP\fB, int \fP\fIfmt\fP\fB));\fP -.br -\fBint savetty_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint scr_init_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIfilename\fP\fB);\fP -.br -\fBint scr_restore_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIfilename\fP\fB);\fP -.br -\fBint scr_set_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIfilename\fP\fB);\fP -.br -\fBint set_escdelay_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIms\fP\fB);\fP -.br -\fBint set_tabsize_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIcols\fP\fB);\fP -.sp -\fBint slk_attr_set_sp(SCREEN* \fP\fIsp\fP\fB, const attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void*\fP\fIopts\fP\fB);\fP -.br -\fBint slk_attrset_sp(SCREEN* \fP\fIsp\fP\fB, const chtype \fP\fIa\fP\fB);\fP -.br -\fBint slk_attroff_sp(SCREEN* \fP\fIsp\fP\fB, const chtype \fP\fIa\fP\fB);\fP -.br -\fBint slk_attron_sp(SCREEN* \fP\fIsp\fP\fB, const chtype \fP\fIa\fP\fB);\fP -.br -\fBattr_t slk_attr_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint slk_clear_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint slk_color_sp(SCREEN* \fP\fIsp\fP\fB, short \fP\fIpair\fP\fB);\fP -.br -\fBint slk_init_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIfmt\fP\fB);\fP -.br -\fBchar* slk_label_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIlabnum\fP\fB);\fP -.br -\fBint slk_noutrefresh_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.sp -\fBint slk_refresh_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint slk_restore_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint slk_set_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIlabnum\fP\fB, const char * \fP\fIlabel\fP\fB, int \fP\fIfmt\fP\fB);\fP -.br -\fBint slk_touch_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint start_color_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBattr_t term_attrs_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBchtype termattrs_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBchar* termname_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBint typeahead_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIfd\fP\fB);\fP -.br -\fBint unget_wch_sp(SCREEN* \fP\fIsp\fP\fB, const wchar_t \fP\fIwch\fP\fB);\fP -.sp -\fBint ungetch_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIch\fP\fB);\fP -.br -\fBint ungetmouse_sp(SCREEN* \fP\fIsp\fP\fB,MEVENT * \fP\fBevent\fP\fB);\fP -.br -\fBint use_default_colors_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBvoid use_env_sp(SCREEN* \fP\fIsp\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint use_legacy_coding_sp(SCREEN* \fP\fIsp\fP\fB, int \fP\fIlevel\fP\fB);\fP -.br -\fBvoid use_tioctl_sp(SCREEN *\fP\fIsp\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBint vid_attr_sp(SCREEN* \fP\fIsp\fP\fB, attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void * \fP\fIopts\fP\fB);\fP -.br -\fBint vid_puts_sp(SCREEN* \fP\fIsp\fP\fB, attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void * \fP\fIopts\fP\fB, NCURSES_SP_OUTC \fP\fIputc\fP\fB);\fP -.br -\fBint vidattr_sp(SCREEN* \fP\fIsp\fP\fB, chtype \fP\fIattrs\fP\fB);\fP -.br -\fBint vidputs_sp(SCREEN* \fP\fIsp\fP\fB, chtype \fP\fIattrs\fP\fB, NCURSES_SP_OUTC \fP\fIputc\fP\fB);\fP -.br -\fBwchar_t* wunctrl_sp(SCREEN* \fP\fIsp\fP\fB, cchar_t *\fP\fIch\fP\fB);\fP -.sp -\fB#include \fP -.sp -\fBFORM* new_form_sp(SCREEN* \fP\fIsp\fP\fB, FIELD **\fP\fIfields\fP\fB);\fP -.sp -\fB#include \fP -.sp -\fBMENU* new_menu_sp(SCREEN* \fP\fIsp\fP\fB, ITEM **\fP\fIitems\fP\fB);\fP -.sp -\fB#include \fP -.sp -\fBPANEL* ceiling_panel(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBPANEL* ground_panel(SCREEN* \fP\fIsp\fP\fB);\fP -.br -\fBvoid update_panels_sp(SCREEN* \fP\fIsp\fP\fB);\fP -.sp -\fB#include \fP -.sp -\fBint del_curterm_sp(SCREEN* \fP\fIsp\fP\fB, TERMINAL *\fP\fIoterm\fP\fB);\fP -.br -\fBint putp_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIstr\fP\fB);\fP -.br -\fBint restartterm_sp(SCREEN* \fP\fIsp\fP\fB, NCURSES_CONST char*\fP\fIterm\fP\fB, int \fP\fIfiledes\fP\fB, int *\fP\fIerrret\fP\fB);\fP -.br -\fBTERMINAL* set_curterm_sp(SCREEN* \fP\fIsp\fP\fB, TERMINAL*\fP\fInterm\fP\fB);\fP -.br -\fBint tgetent_sp(SCREEN* \fP\fIsp\fP\fB, char *\fP\fIbp\fP\fB, const char *\fP\fIname\fP\fB);\fP -.br -\fBint tgetflag_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB);\fP -.br -\fBint tgetnum_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB);\fP -.br -\fBchar* tgetstr_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB, char **\fP\fIarea\fP\fB);\fP -.br -\fBchar* tgoto_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB, int \fP\fIcol\fP\fB, int \fP\fIrow\fP\fB);\fP -.br -\fBint tigetflag_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB);\fP -.br -\fBint tigetnum_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB);\fP -.br -\fBchar* tigetstr_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIcapname\fP\fB);\fP -.br -\fR/* may instead use 9 long parameters */\fP -.br -\fBchar* tparm_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIstr\fP\fB, ...);\fP -.br -\fBint tputs_sp(SCREEN* \fP\fIsp\fP\fB, const char *\fP\fIstr\fP\fB, int \fP\fIaffcnt\fP\fB, NCURSES_SP_OUTC \fP\fIputc\fP\fB);\fP -.sp -\fB#include \fP -.sp -\fBNCURSES_CONST char* unctrl_sp(SCREEN* \fP\fIsp\fP\fB, chtype \fP\fIc\fP\fB);\fP -.ad -.br +\fB#include +.PP +\fBint alloc_pair_sp(SCREEN* \fIsp\fP, int \fIfg\fP, int \fIbg\fP); +\fBint assume_default_colors_sp(SCREEN* \fIsp\fP, int \fIfg\fP, int \fIbg\fP); +\fBint baudrate_sp(SCREEN* \fIsp\fP); +\fBint beep_sp(SCREEN* \fIsp\fP); +\fBbool can_change_color_sp(SCREEN* \fIsp\fP); +\fBint cbreak_sp(SCREEN* \fIsp\fP); +\fBint color_content_sp(SCREEN* \fIsp\fP, short \fIcolor\fP, short* \fIr\fP, short* \fIg\fP, short* \fIb\fP); +\fBint curs_set_sp(SCREEN* \fIsp\fP, int \fIvisibility\fP); +\fBint def_prog_mode_sp(SCREEN* \fIsp\fP); +\fBint def_shell_mode_sp(SCREEN* \fIsp\fP); +.PP +\fBint define_key_sp(SCREEN* \fIsp\fP, const char * \fIdefinition\fP, int \fIkeycode\fP); +\fBint delay_output_sp(SCREEN* \fIsp\fP, int \fIms\fP); +\fBint doupdate_sp(SCREEN* \fIsp\fP); +\fBint echo_sp(SCREEN* \fIsp\fP); +\fBint endwin_sp(SCREEN* \fIsp\fP); +\fBchar erasechar_sp(SCREEN* \fIsp\fP); +\fBint erasewchar_sp(SCREEN* \fIsp\fP, wchar_t *\fIwc\fP); +\fBint extended_color_content_sp(SCREEN * \fIsp\fP, int \fIcolor\fP, int * \fIr\fP, int * \fIg\fP, int * \fIb\fP); +\fBint extended_pair_content_sp(SCREEN* \fIsp\fP, int \fIpair\fP, int * \fIfg\fP, int * \fIbg\fP); +\fBint extended_slk_color_sp(SCREEN* \fIsp\fP, int \fIpair\fP); +.PP +\fBvoid filter_sp(SCREEN* \fIsp\fP); +\fBint find_pair_sp(SCREEN* \fIsp\fP, int \fIfg\fP, int \fIbg\fP); +\fBint flash_sp(SCREEN* \fIsp\fP); +\fBint flushinp_sp(SCREEN* \fIsp\fP); +\fBint free_pair_sp(SCREEN* \fIsp\fP, int \fIpair\fP); +\fBint get_escdelay_sp(SCREEN* \fIsp\fP); +\fBint getmouse_sp(SCREEN* \fIsp\fP, MEVENT* \fIevent\fP); +\fBWINDOW* getwin_sp(SCREEN* \fIsp\fP, FILE* \fIfilep\fP); +\fBint halfdelay_sp(SCREEN* \fIsp\fP, int \fItenths\fP); +\fBbool has_colors_sp(SCREEN* \fIsp\fP); +.PP +\fBbool has_ic_sp(SCREEN* \fIsp\fP); +\fBbool has_il_sp(SCREEN* \fIsp\fP); +\fBint has_key_sp(SCREEN* \fIsp\fP, int \fIc\fP); +\fBbool has_mouse_sp(SCREEN* \fIsp\fP); +\fBint init_color_sp(SCREEN* \fIsp\fP, short \fIcolor\fP, short \fIr\fP, short \fIg\fP, short \fIb\fP); +\fBint init_extended_color_sp(SCREEN* \fIsp\fP, int \fIcolor\fP, int \fIr\fP, int \fIg\fP, int \fIb\fP); +\fBint init_extended_pair_sp(SCREEN* \fIsp\fP, int \fIpair\fP, int \fIfg\fP, int \fIbg\fP); +\fBint init_pair_sp(SCREEN* \fIsp\fP, short \fIpair\fP, short \fIfg\fP, short \fIbg\fP); +\fBint intrflush_sp(SCREEN* \fIsp\fP, WINDOW* \fIwin\fP, bool \fIbf\fP); +\fBint is_cbreak_sp(SCREEN* \fIsp\fP); +.PP +\fBint is_echo_sp(SCREEN* \fIsp\fP); +\fBint is_nl_sp(SCREEN* \fIsp\fP); +\fBint is_raw_sp(SCREEN* \fIsp\fP); +\fBbool is_term_resized_sp(SCREEN* \fIsp\fP, int \fIlines\fP, int \fIcolumns\fP); +\fBbool isendwin_sp(SCREEN* \fIsp\fP); +\fBint key_defined_sp(SCREEN* \fIsp\fP, const char *\fIdefinition\fP); +\fBchar* keybound_sp(SCREEN* \fIsp\fP, int \fIkeycode\fP, int \fIcount\fP); +\fBNCURSES_CONST char* keyname_sp(SCREEN* \fIsp\fP, int \fIc\fP); +\fBint keyok_sp(SCREEN* \fIsp\fP, int \fIkeycode\fP, bool \fIenable\fP); +\fBchar killchar_sp(SCREEN* \fIsp\fP); +.PP +\fBint killwchar_sp(SCREEN* \fIsp\fP, wchar_t *\fIwc\fP); +\fBchar* longname_sp(SCREEN* \fIsp\fP); +\fBint mcprint_sp(SCREEN* \fIsp\fP, char *\fIdata\fP, int \fIlen\fP); +\fBint mouseinterval_sp(SCREEN* \fIsp\fP, int \fIerval\fP); +\fBmmask_t mousemask_sp(SCREEN* \fIsp\fP, mmask_t \fInewmask\fP, mmask_t *\fIoldmask\fP); +\fBint mvcur_sp(SCREEN* \fIsp\fP, int \fIoldrow\fP, int \fIoldcol\fP, int \fInewrow\fP, int \fInewcol\fP); +\fBint napms_sp(SCREEN* \fIsp\fP, int \fIms\fP); +\fBWINDOW* newpad_sp(SCREEN* \fIsp\fP, int \fInrows\fP, int \fIncols\fP); +\fBSCREEN* new_prescr(void); +\fBSCREEN* newterm_sp(SCREEN* \fIsp\fP, const char *\fItype\fP, FILE *\fIoutfd\fP, FILE *\fIinfd\fP); +.PP +\fBWINDOW* newwin_sp(SCREEN* \fIsp\fP, int \fInlines\fP, int \fIncols\fP, int \fIbegin_y\fP, int \fIbegin_x\fP); +\fBint nl_sp(SCREEN* \fIsp\fP); +\fBint nocbreak_sp(SCREEN* \fIsp\fP); +\fBint noecho_sp(SCREEN* \fIsp\fP); +\fBvoid nofilter_sp(SCREEN* \fIsp\fP); +\fBint nonl_sp(SCREEN* \fIsp\fP); +\fBvoid noqiflush_sp(SCREEN* \fIsp\fP); +\fBint noraw_sp(SCREEN* \fIsp\fP); +\fBint pair_content_sp(SCREEN* \fIsp\fP, short \fIpair\fP, short* \fIfg\fP, short* \fIbg\fP); +\fBvoid qiflush_sp(SCREEN* \fIsp\fP); +.PP +\fBint raw_sp(SCREEN* \fIsp\fP); +\fBvoid reset_color_pairs_sp(SCREEN* \fIsp\fP); +\fBint reset_prog_mode_sp(SCREEN* \fIsp\fP); +\fBint reset_shell_mode_sp(SCREEN* \fIsp\fP); +\fBint resetty_sp(SCREEN* \fIsp\fP); +\fBint resize_term_sp(SCREEN* \fIsp\fP, int \fIlines\fP, int \fIcolumns\fP); +\fBint resizeterm_sp(SCREEN* \fIsp\fP, int \fIlines\fP, int \fIcolumns\fP); +\fBint ripoffline_sp(SCREEN* \fIsp\fP, int \fIline\fP, int (*\fIinit\fP)(WINDOW* \fIwin\fP, int \fIfmt\fP)); +\fBint savetty_sp(SCREEN* \fIsp\fP); +\fBint scr_init_sp(SCREEN* \fIsp\fP, const char *\fIfilename\fP); +.PP +\fBint scr_restore_sp(SCREEN* \fIsp\fP, const char *\fIfilename\fP); +\fBint scr_set_sp(SCREEN* \fIsp\fP, const char *\fIfilename\fP); +\fBint set_escdelay_sp(SCREEN* \fIsp\fP, int \fIms\fP); +\fBint set_tabsize_sp(SCREEN* \fIsp\fP, int \fIcols\fP); +\fBint slk_attrset_sp(SCREEN* \fIsp\fP, const chtype \fIa\fP); +\fBint slk_attr_set_sp(SCREEN* \fIsp\fP, const attr_t \fIattrs\fP, short \fIpair\fP, void*\fIopts\fP); +\fBint slk_attroff_sp(SCREEN* \fIsp\fP, const chtype \fIa\fP); +\fBint slk_attron_sp(SCREEN* \fIsp\fP, const chtype \fIa\fP); +\fBattr_t slk_attr_sp(SCREEN* \fIsp\fP); +\fBint slk_clear_sp(SCREEN* \fIsp\fP); +.PP +\fBint slk_color_sp(SCREEN* \fIsp\fP, short \fIpair\fP); +\fBint slk_init_sp(SCREEN* \fIsp\fP, int \fIfmt\fP); +\fBchar* slk_label_sp(SCREEN* \fIsp\fP, int \fIlabnum\fP); +\fBint slk_noutrefresh_sp(SCREEN* \fIsp\fP); +\fBint slk_refresh_sp(SCREEN* \fIsp\fP); +\fBint slk_restore_sp(SCREEN* \fIsp\fP); +\fBint slk_set_sp(SCREEN* \fIsp\fP, int \fIlabnum\fP, const char * \fIlabel\fP, int \fIfmt\fP); +\fBint slk_touch_sp(SCREEN* \fIsp\fP); +\fBint start_color_sp(SCREEN* \fIsp\fP); +\fBattr_t term_attrs_sp(SCREEN* \fIsp\fP); +.PP +\fBchtype termattrs_sp(SCREEN* \fIsp\fP); +\fBchar* termname_sp(SCREEN* \fIsp\fP); +\fBint typeahead_sp(SCREEN* \fIsp\fP, int \fIfd\fP); +\fBint unget_wch_sp(SCREEN* \fIsp\fP, const wchar_t \fIwc\fP); +\fBint ungetch_sp(SCREEN* \fIsp\fP, int \fIc\fP); +\fBint ungetmouse_sp(SCREEN* \fIsp\fP, MEVENT* \fIevent\fP); +\fBint use_default_colors_sp(SCREEN* \fIsp\fP); +\fBvoid use_env_sp(SCREEN* \fIsp\fP, bool \fIbf\fP); +\fBint use_legacy_coding_sp(SCREEN* \fIsp\fP, int \fIlevel\fP); +\fBvoid use_tioctl_sp(SCREEN *\fIsp\fP, bool \fIbf\fP); +.PP +\fBint vid_attr_sp(SCREEN* \fIsp\fP, attr_t \fIattrs\fP, short \fIpair\fP, void * \fIopts\fP); +\fBint vid_puts_sp(SCREEN* \fIsp\fP, attr_t \fIattrs\fP, short \fIpair\fP, void * \fIopts\fP, NCURSES_SP_OUTC \fIputc\fP); +\fBint vidattr_sp(SCREEN* \fIsp\fP, chtype \fIattrs\fP); +\fBint vidputs_sp(SCREEN* \fIsp\fP, chtype \fIattrs\fP, NCURSES_SP_OUTC \fIputc\fP); +\fBwchar_t* wunctrl_sp(SCREEN* \fIsp\fP, cchar_t *\fIwch\fP); +.PP +\fB#include +.PP +\fBFORM* new_form_sp(SCREEN* \fIsp\fP, FIELD **\fIfields\fP); +.PP +\fB#include +.PP +\fBMENU* new_menu_sp(SCREEN* \fIsp\fP, ITEM **\fIitems\fP); +.PP +\fB#include +.PP +\fBPANEL* ceiling_panel(SCREEN* \fIsp\fP); +\fBPANEL* ground_panel(SCREEN* \fIsp\fP); +\fBvoid update_panels_sp(SCREEN* \fIsp\fP); +.PP +\fB#include +.PP +\fBint del_curterm_sp(SCREEN* \fIsp\fP, TERMINAL *\fIoterm\fP); +\fBint putp_sp(SCREEN* \fIsp\fP, const char *\fIstr\fP); +\fBint restartterm_sp(SCREEN* \fIsp\fP, NCURSES_CONST char*\fIterm\fP, int \fIfiledes\fP, int *\fIerrret\fP); +\fBTERMINAL* set_curterm_sp(SCREEN* \fIsp\fP, TERMINAL*\fInterm\fP); +\fBint tgetent_sp(SCREEN* \fIsp\fP, char *\fIbp\fP, const char *\fIname\fP); +\fBint tgetflag_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP); +\fBint tgetnum_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP); +\fBchar* tgetstr_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP, char **\fIarea\fP); +\fBchar* tgoto_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP, int \fIcol\fP, int \fIrow\fP); +\fBint tigetflag_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP); +.PP +\fBint tigetnum_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP); +\fBchar* tigetstr_sp(SCREEN* \fIsp\fP, const char *\fIcapname\fP); +\fI/* tparm_sp may use 9 long parameters rather than being variadic */ +\fBchar* tparm_sp(SCREEN* \fIsp\fP, const char *\fIstr\fP, ...); +\fBint tputs_sp(SCREEN* \fIsp\fP, const char *\fIstr\fP, int \fIaffcnt\fP, NCURSES_SP_OUTC \fIputc\fP); +.PP +\fB#include +.PP +\fBNCURSES_CONST char* unctrl_sp(SCREEN* \fIsp\fP, chtype \fIch\fP); +.fi .SH DESCRIPTION This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. -This feature can be added to any of the configurations supported by ncurses; -it adds new entrypoints +This feature can be added to any of the configurations supported by +\fI\%ncurses\fP; +it adds new symbols without changing the meaning of any of the existing ones. -.PP .\" *************************************************************************** -.SS IMPROVED FUNCTIONS +.SS "Improved Functions" Most of the functions are new versions of existing functions. A parameter is added at the front of the parameter list. -It is a SCREEN pointer. +It is a \fISCREEN\fP pointer. .PP The existing functions all use the current screen, which is a static variable. @@ -337,7 +229,7 @@ The extended functions use the specified screen, thereby reducing the number of variables which must be modified to update multiple screens. .\" *************************************************************************** -.SS NEW FUNCTIONS +.SS "New Functions" Here are the new functions: .TP 5 ceiling_panel @@ -353,8 +245,8 @@ With the screen-pointer extension, there are situations where it must create a current screen before the unextended library does. The \fBnew_prescr\fP function is used internally to handle these cases. -It is also provided as an entrypoint to allow applications to customize -the library initialization. +It is also provided to allow applications to customize library +initialization. .\" *************************************************************************** .SH NOTES This extension introduces some new names: @@ -367,7 +259,8 @@ to make it useful for checking if the extension is provided. NCURSES_SP_NAME The new functions are named using the macro \fINCURSES_SP_NAME\fP, which hides the actual implementation. -Currently this adds a \*(``_sp\*('' suffix to the name of the unextended function. +Currently this adds a \*(``_sp\*('' suffix +to the name of the unextended function. This manual page indexes the extensions showing the full name. However the proper usage of these functions uses the macro, to provide for the possibility of changing the naming convention @@ -380,13 +273,12 @@ where an \fINCURSES_OUTC\fP is used in the unextended library. NCURSES_OUTC This is a function-pointer type used for the cases where a function passes characters to the output stream, e.g., \fBvidputs\fP(3X). -.PP .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. -It is recommended that any code depending on ncurses extensions +It is recommended that any code depending on \fI\%ncurses\fP extensions be conditioned using \fINCURSES_SP_FUNCS\fP. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_opaque\fP(3X), -\fBcurs_threads\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_opaque\fP(3X), +\fB\%curs_threads\fP(3X) diff --git a/man/curs_termattrs.3x b/man/curs_termattrs.3x index 4e482f14..dacd3b0f 100644 --- a/man/curs_termattrs.3x +++ b/man/curs_termattrs.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,61 +27,51 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termattrs.3x,v 1.18 2021/12/25 21:41:58 tom Exp $ -.TH curs_termattrs 3X "" +.\" $Id: curs_termattrs.3x,v 1.41 2024/04/20 21:20:07 tom Exp $ +.TH curs_termattrs 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBbaudrate\fP, -\fBerasechar\fP, -\fBerasewchar\fP, -\fBhas_ic\fP, -\fBhas_il\fP, -\fBkillchar\fP, -\fBkillwchar\fP, -\fBlongname\fP, -\fBterm_attrs\fP, -\fBtermattrs\fP, -\fBtermname\fP \- \fBcurses\fP environment query routines +\fB\%baudrate\fP, +\fB\%erasechar\fP, +\fB\%erasewchar\fP, +\fB\%has_ic\fP, +\fB\%has_il\fP, +\fB\%killchar\fP, +\fB\%killwchar\fP, +\fB\%longname\fP, +\fB\%term_attrs\fP, +\fB\%termattrs\fP, +\fB\%termname\fP \- +\fIcurses\fR environment query routines .SH SYNOPSIS -\fB#include \fP +.nf +\fB#include .PP -\fBint baudrate(void);\fP -.br -\fBchar erasechar(void);\fP -.br -\fBint erasewchar(wchar_t *\fP\fIch\fP\fB);\fP -.br -\fBbool has_ic(void);\fP -.br -\fBbool has_il(void);\fP -.br -\fBchar killchar(void);\fP -.br -\fBint killwchar(wchar_t *\fP\fIch\fP\fB);\fP -.br -\fBchar *longname(void);\fP -.br -\fBattr_t term_attrs(void);\fP -.br -\fBchtype termattrs(void);\fP -.br -\fBchar *termname(void);\fP -.br +\fBint baudrate(void); +\fBchar erasechar(void); +\fBint erasewchar(wchar_t *\fIwc\fP); +\fBbool has_ic(void); +\fBbool has_il(void); +\fBchar killchar(void); +\fBint killwchar(wchar_t *\fIwc\fP); +\fBchar *longname(void); +\fBattr_t term_attrs(void); +\fBchtype termattrs(void); +\fBchar *termname(void); +.fi .SH DESCRIPTION .SS baudrate The \fBbaudrate\fP routine returns the output speed of the terminal. The number returned is in bits per second, for example \fB9600\fP, and is an integer. -.SS erasechar, erasewchar -.PP +.SS "erasechar, erasewchar" The \fBerasechar\fP routine returns the user's current erase character. .PP The \fBerasewchar\fP routine stores the current erase character -in the location referenced by \fIch\fP. +in the location referenced by \fIwc\fP. If no erase character has been defined, the routine fails -and the location referenced by \fIch\fP is not changed. -.SS has_is, has_il -.PP +and the location referenced by \fIwc\fP is not changed. +.SS "has_ic, has_il" The \fBhas_ic\fP routine is true if the terminal has insert- and delete- character capabilities. .PP @@ -89,17 +79,15 @@ The \fBhas_il\fP routine is true if the terminal has insert- and delete-line capabilities, or can simulate them using scrolling regions. This might be used to determine if it would be appropriate to turn on physical -scrolling using \fBscrollok\fP. -.SS killchar, killwchar -.PP +scrolling using \fBscrollok\fP(3X). +.SS "killchar, killwchar" The \fBkillchar\fP routine returns the user's current line kill character. .PP The \fBkillwchar\fP routine stores the current line-kill character -in the location referenced by \fIch\fP. +in the location referenced by \fIwc\fP. If no line-kill character has been defined, -the routine fails and the location referenced by \fIch\fP is not changed. +the routine fails and the location referenced by \fIwc\fP is not changed. .SS longname -.PP The \fBlongname\fP routine returns a pointer to a static area containing a verbose description of the current terminal. The maximum @@ -110,8 +98,7 @@ overwritten by each call to \fBnewterm\fP and is not restored by \fBset_term\fP, so the value should be saved between calls to \fBnewterm\fP if \fBlongname\fP is going to be used with multiple terminals. -.SS termattrs, term_attrs -.PP +.SS "termattrs, term_attrs" If a given terminal does not support a video attribute that an application program is trying to use, \fBcurses\fP may substitute a different video attribute for it. @@ -121,7 +108,6 @@ terminal using \fBA_\fP and \fBWA_\fP constants respectively. This information is useful when a \fBcurses\fP program needs complete control over the appearance of the screen. .SS termname -.PP The \fBtermname\fP routine returns the terminal name used by \fBsetupterm\fP. .SH RETURN VALUE \fBlongname\fP and \fBtermname\fP return \fBNULL\fP on error. @@ -132,10 +118,12 @@ completion. .SH NOTES Note that \fBtermattrs\fP may be a macro. .SH PORTABILITY -The XSI Curses standard, Issue 4 describes these functions. +X/Open Curses, Issue 4 describes these functions. It changes the return type of \fBtermattrs\fP to the new type \fBattr_t\fP. Most versions of curses truncate the result returned by \fBtermname\fP to 14 characters. .SH SEE ALSO -\fBcurses\fP(3X), \fBcurs_initscr\fP(3X), \fBcurs_outopts\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_outopts\fP(3X) diff --git a/man/curs_termcap.3x b/man/curs_termcap.3x index 83d7f1c8..6bd2a66a 100644 --- a/man/curs_termcap.3x +++ b/man/curs_termcap.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2021,2022 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2017,2018 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,347 +27,521 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termcap.3x,v 1.55 2022/01/01 23:49:07 tom Exp $ -.TH curs_termcap 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_termcap.3x,v 1.85 2024/04/20 19:13:12 tom Exp $ +.TH curs_termcap 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 -.ds n 5 +. .SH NAME -\fBPC\fP, -\fBUP\fP, -\fBBC\fP, -\fBospeed\fP, -\fBtgetent\fP, -\fBtgetflag\fP, -\fBtgetnum\fP, -\fBtgetstr\fP, -\fBtgoto\fP, -\fBtputs\fP \- \fBcurses\fP emulation of termcap -.ad -.hy +\fB\%PC\fP, +\fB\%UP\fP, +\fB\%BC\fP, +\fB\%ospeed\fP, +\fB\%tgetent\fP, +\fB\%tgetflag\fP, +\fB\%tgetnum\fP, +\fB\%tgetstr\fP, +\fB\%tgoto\fP, +\fB\%tputs\fP \- +\fIcurses\fR emulation of \fItermcap\fR .SH SYNOPSIS -\fB#include \fP -.br -\fB#include \fP -.sp -\fBextern char PC;\fP -.br -\fBextern char * UP;\fP -.br -\fBextern char * BC;\fP -.br -\fBextern @NCURSES_OSPEED@ ospeed;\fP -.sp -\fBint tgetent(char *\fP\fIbp\fP\fB, const char *\fP\fIname\fP\fB);\fP -.br -\fBint tgetflag(const char *\fP\fIid\fP\fB);\fP -.br -\fBint tgetnum(const char *\fP\fIid\fP\fB);\fP -.br -\fBchar *tgetstr(const char *\fP\fIid\fP\fB, char **\fP\fIarea\fP\fB);\fP -.br -\fBchar *tgoto(const char *\fP\fIcap\fP\fB, int \fP\fIcol\fP\fB, int \fP\fIrow\fP\fB);\fP -.br -\fBint tputs(const char *\fP\fIstr\fP\fB, int \fP\fIaffcnt\fP\fB, int (*\fP\fIputc\fP\fB)(int));\fP -.br +.nf +\fB#include +\fB#include +.PP +\fBchar PC; +\fBchar * UP; +\fBchar * BC; +\fB@NCURSES_OSPEED@ ospeed; +.PP +\fBint tgetent(char *\fIbp\fP, const char *\fIname\fP); +\fBint tgetflag(const char *\fIid\fP); +\fBint tgetnum(const char *\fIid\fP); +\fBchar *tgetstr(const char *\fIid\fP, char **\fIarea\fP); +\fBchar *tgoto(const char *\fIcap\fP, int \fIcol\fP, int \fIrow\fP); +\fBint tputs(const char *\fIstr\fP, int \fIaffcnt\fP, int (*\fIputc\fP)(int)); +.fi .SH DESCRIPTION -These routines are included as a conversion aid for programs that use -the \fItermcap\fP library. -Their parameters are the same, but the -routines are emulated using the \fIterminfo\fP database. -Thus, they -can only be used to query the capabilities of entries for which a -terminfo entry has been compiled. +.I \%ncurses +provides the foregoing variables and functions as a compatibility layer +for programs that use the \fItermcap\fP library. +The API is the same, +but behavior is emulated using the \fI\%term\%info\fP database. +Thus, +it can be used only to query the capabilities of terminal database +entries for which a \fI\%term\%info\fP entry has been compiled. .SS Initialization -.PP -The \fBtgetent\fP routine loads the entry for \fIname\fP. -It returns: +\fB\%tgetent\fP loads the terminal database entry for \fIname\fP; +see \fBterm\fP(7). +This must be done before calling any of the other functions. +It returns .RS 3 -.TP 3 +.TP 5 \" "-1" + 2n + adjust for PDF 1 on success, -.TP 3 +.TP 0 if there is no such entry -(or that it is a generic type, having too little information for curses -applications to run), and -.TP 3 +(or if the matching entry describes a generic terminal, +having too little information for +.I curses +applications to run), +and +.TP \-1 -if the terminfo database could not be found. +if the \fI\%term\%info\fP database could not be found. .RE .PP -This differs from the \fItermcap\fP library in two ways: +This implementation differs from those of historical \fItermcap\fP +libraries. .RS 3 .bP -The emulation ignores the buffer pointer \fIbp\fP. -The \fItermcap\fP library would store a copy of the terminal +.I \%ncurses +ignores the buffer pointer \fIbp\fP, +as do other \fItermcap\fP implementations conforming to portions of +X/Open Curses now withdrawn. +The BSD \fItermcap\fP library would store a copy of the terminal type description in the area referenced by this pointer. -However, ncurses stores its terminal descriptions in compiled -binary form, which is not the same thing. +\fI\%term\%info\fP stores terminal type descriptions in compiled form, +which is not the same thing. .bP -There is a difference in return codes. -The \fItermcap\fP library does not check if the terminal -description is marked with the \fIgeneric\fP capability, -or if the terminal description has cursor-addressing. +The meanings of the return values differ. +The BSD \fItermcap\fP library does not check whether the terminal type +description includes the +.B \%generic +.RB ( gn ) +capability, +nor whether the terminal type description supports an addressable +cursor, +a property essential for any \fIcurses\fP implementation to operate. .RE -.SS Capability Values -.PP -The \fBtgetflag\fP routine gets the boolean entry for \fIid\fP, +.SS "Retrieving Capability Values" +\fB\%tgetflag\fP reports the Boolean entry for \fIid\fP, or zero if it is not available. .PP -The \fBtgetnum\fP routine gets the numeric entry for \fIid\fP, +\fB\%tgetnum\fP obtains the numeric entry for \fIid\fP, or \-1 if it is not available. .PP -The \fBtgetstr\fP routine returns the string entry for \fIid\fP, -or zero if it is not available. -Use \fBtputs\fP to output the returned string. -The \fIarea\fP parameter is used as follows: +\fB\%tgetstr\fP returns the string entry for \fIid\fP, +or +.B NULL +if it is not available. +Use \fB\%tputs\fP to output the string returned. +The +.I area +parameter is used as follows. .RS 3 .bP It is assumed to be the address of a pointer to a buffer managed by the calling application. .bP -However, ncurses checks to ensure that \fBarea\fP is not NULL, -and also that the resulting buffer pointer is not NULL. -If either check fails, the \fIarea\fP parameter is ignored. +However, +\fI\%ncurses\fP checks to ensure that +.I area +is not +.BR NULL , +and also that the resulting buffer pointer is not +.BR NULL . +If either check fails, +.I area +is ignored. .bP -If the checks succeed, ncurses also copies the return value to -the buffer pointed to by \fIarea\fP, -and the \fIarea\fP value will be updated to point past the null ending -this value. +If the checks succeed, +\fI\%ncurses\fP also copies the return value to the buffer pointed to by +\fIarea\fP, +and the library updates +.I area +to point past the null character terminating this value. .bP -The return value itself is an address in the terminal description which -is loaded into memory. +The return value itself is an address in the terminal type description +loaded into memory. .RE -.PP -Only the first two characters of the \fBid\fP parameter of -\fBtgetflag\fP, -\fBtgetnum\fP and -\fBtgetstr\fP are compared in lookups. -.SS Formatting Capabilities -.PP -The \fBtgoto\fP routine expands the given capability using the parameters. +.SS "Applying String Capabilities" +String capabilities can be parameterized; +see subsection \*(``Parameterized Strings\*('' in \fB\%terminfo\fP(5). +\fB\%tgoto\fP applies its second and third arguments to the parametric +placeholders in the capability stored in the first argument. .bP -Because the capability may have padding characters, -the output of \fBtgoto\fP should be passed to \fBtputs\fP -rather than some other output function such as \fBprintf\fP(3). +The capability may contain padding specifications; +see subsection \*(``Delays and Padding\*('' of \fB\%terminfo\fP(5). +The output of \fB\%tgoto\fP should thus be passed to \fB\%tputs\fP +rather than some other output function such as \fI\%printf\fP(3). .bP -While \fBtgoto\fP is assumed to be used for the two-parameter +While \fB\%tgoto\fP is assumed to be used for the two-parameter cursor positioning capability, -termcap applications also use it for single-parameter capabilities. +\fItermcap\fP applications also use it for single-parameter +capabilities. .IP -Doing this shows a quirk in \fBtgoto\fP: most hardware -terminals use cursor addressing with \fIrow\fP first, -but the original developers of the termcap interface chose to -put the \fIcolumn\fP parameter first. -The \fBtgoto\fP function swaps the order of parameters. -It does this also for calls requiring only a single parameter. -In that case, the first parameter is merely a placeholder. +Doing so reveals a quirk in \fB\%tgoto\fP: +most hardware terminals use cursor addressing with \fIrow\fP first, +but the original developers of the \fItermcap\fP interface chose to +put the \fIcol\fP (column) parameter first. +The \fB\%tgoto\fP function swaps the order of its parameters. +It does this even for calls requiring only a single parameter. +In that case, +the first parameter is merely a placeholder. .bP -Normally the ncurses library is compiled with terminfo support. -In that case, \fBtgoto\fP uses \fBtparm\fP(3X) (a more capable formatter). +Normally the \fI\%ncurses\fP library is compiled without +full \fI\%termcap\fP support. +In that case, +\fB\%tgoto\fP uses an internal version of \fB\%tparm\fP(3X) +(a more capable function). .IP -However, \fBtparm\fP is not a \fItermcap\fP feature, -and portable \fItermcap\fP applications should not rely upon its availability. -.PP -The \fBtputs\fP routine is described on the \fBcurs_terminfo\fP(3X) manual -page. -It can retrieve capabilities by either termcap or terminfo name. -.SS Global Variables +Because it uses \fB\%tparm\fP internally, +\fB\%tgoto\fP is able to use some \fI\%term\%info\fP features, +but not all. +In particular, +it allows only numeric parameters; +\fB\%tparm\fP supports string parameters. +.IP +However, +\fB\%tparm\fP is not a \fItermcap\fP feature, +and portable \fItermcap\fP applications should not rely upon its +availability. .PP +\fB\%tputs\fP is described in \fB\%curs_terminfo\fP(3X). +It can retrieve capabilities by either \fItermcap\fP or +\fI\%term\%info\fP code. +.SS "Global Variables" The variables \fBPC\fP, \fBUP\fP and \fBBC\fP -are set by \fBtgetent\fP to the terminfo entry's data for -\fBpad_char\fP, -\fBcursor_up\fP and -\fBbackspace_if_not_bs\fP, +are set by \fB\%tgetent\fP to the \fI\%term\%info\fP entry's data for +\fB\%pad_char\fP, +\fB\%cursor_up\fP and +\fB\%backspace_if_not_bs\fP, respectively. -\fBUP\fP is not used by ncurses. -\fBPC\fP is used in the \fBtdelay_output\fP function. -\fBBC\fP is used in the \fBtgoto\fP emulation. -The variable \fBospeed\fP is set by ncurses in a system-specific coding -to reflect the terminal speed. -.SS Releasing Memory -The termcap functions provide no means for freeing memory, -because legacy termcap implementations used only the buffer -areas provided by the caller via \fBtgetent\fP and \fBtgetstr\fP. -Those buffers are unused in terminfo. +\fBUP\fP is not used by \fI\%ncurses\fP. +\fBPC\fP is used by \fB\%delay_output\fP(3X). +\fBBC\fP is used by \fB\%tgoto\fP emulation. +The variable \fB\%ospeed\fP is set by \fI\%ncurses\fP using a +system-specific encoding to indicate the terminal's data rate. +.SS "Releasing Memory" +The \fItermcap\fP functions provide no means of freeing memory, +because legacy \fItermcap\fP implementations used only the buffer +areas provided by the caller via \fB\%tgetent\fP and \fB\%tgetstr\fP. +Those buffers are unused in \fI\%term\%info\fP. .PP -On the other hand, terminfo allocates memory. -It uses \fBsetupterm\fP to retrieve the data used by \fBtgetent\fP -and the functions which return capability values such as \fBtgetstr\fP. +By contrast, +\fI\%term\%info\fP allocates memory. +It uses \fB\%setupterm\fP(3X) to obtain the data used by \fB\%tgetent\fP +and the functions that retrieve capability values. One could use -.sp - \fBdel_curterm(cur_term);\fP -.sp -.PP -to free this memory, but there is an additional complication with ncurses. -It uses a fixed-size \fIpool\fP of storage locations, -one per setting of the \fBTERM\fP variable when \fBtgetent\fP is called. -The \fBscreen\fP(1) program relies upon this arrangement, -to improve its performance. -.PP -An application which uses only the low-level termcap functions could -free the memory using \fBdel_curterm\fP, -because the pool is freed using other functions -(see \fBcurs_memleaks\fP(3X)). -. -.SH RETURN VALUE -Except where explicitly noted, -routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 only specifies "an integer value other than \fBERR\fP") upon successful -completion. +.RS +.EX +del_curterm(cur_term); +.EE +.RE +to free this memory, +but there is an additional complication with \fI\%ncurses\fP. +It uses a fixed-size pool of storage locations, +one per value of the terminal name parameter given to \fB\%tgetent\fP. +The \fIscreen\fP(1) program relies upon this arrangement to improve its +performance. .PP -Routines that return pointers return \fBNULL\fP on error. -.SH BUGS -If you call \fBtgetstr\fP to fetch \fBca\fP or any other parameterized string, -be aware that it will be returned in terminfo notation, not the older and -not-quite-compatible termcap notation. -This will not cause problems if all -you do with it is call \fBtgoto\fP or \fBtparm\fP, which both expand -terminfo-style strings as terminfo. -(The \fBtgoto\fP function, if configured to support termcap, will check -if the string is indeed terminfo-style by looking for "%p" parameters or -"$<..>" delays, and invoke a termcap-style parser if the string does not -appear to be terminfo). +An application that uses only the \fItermcap\fP functions, +not the higher level +.I \%curses +API, +could release the memory using \fB\%del_curterm\fP(3X), +because the pool is freed using other functions; +see \fB\%curs_memleaks\fP(3X). +.SH "RETURN VALUE" +The return values of +\fB\%tgetent\fP, +\fB\%tgetflag\fP, +\fB\%tgetname\fP, +and +\fB\%tgetstr\fP +are documented above. .PP -Because terminfo conventions for representing padding in string capabilities -differ from termcap's, -users can be surprised: +\fB\%tgoto\fP returns +.B NULL +on error. +Error conditions include: .bP -\fBtputs("50")\fP in a terminfo system will put out a literal \*(``50\*('' -rather than busy-waiting for 50 milliseconds. +uninitialized state +(\fB\%tgetent\fP was not called successfully), .bP -However, if ncurses is configured to support termcap, -it may also have been configured to support the BSD-style padding. -.IP -In that case, \fBtputs\fP inspects strings passed to it, -looking for digits at the beginning of the string. -.IP -\fBtputs("50")\fP in a termcap system may wait for 50 milliseconds -rather than put out a literal \*(``50\*('' +.I cap +being a null pointer, +.bP +.I cap +referring to a canceled capability, +.bP +.I cap +being a capability with string-valued parameters +(a \fI\%term\%info\fP-only feature), +and +.bP +.I cap +being a capability with more than two parameters. .PP -Note that termcap has nothing analogous to terminfo's \fBsgr\fP string. -One consequence of this is that termcap applications assume \fBme\fP -(terminfo \fBsgr0\fP) does not reset the alternate character set. -This implementation checks for, and modifies the data shown to the -termcap interface to accommodate termcap's limitation in this respect. +See \fB\%curs_terminfo\fP(3X) regarding \fB\%tputs\fP. +.SH NOTES +\fI\%ncurses\fP compares only the first two characters of the \fIid\fP +parameter of +\fB\%tgetflag\fP, +\fB\%tgetnum\fP, +and +\fB\%tgetstr\fP to the capability names in the database. .SH PORTABILITY +These functions are no longer standardized +(and the variables never were); +\fI\%ncurses\fP provides them to support legacy applications. +They should not be used in new programs. .SS Standards -These functions are provided for supporting legacy applications, -and should not be used in new programs: .bP -The XSI Curses standard, Issue 4 describes these functions. -However, they -are marked TO BE WITHDRAWN and may be removed in future versions. +X/Open Curses, Issue 4, Version 2 (1996), +describes these functions, +marking them as +\*(``TO BE WITHDRAWN\*(''. .bP -X/Open Curses, Issue 5 (December 2007) marked the termcap interface -(along with \fBvwprintw\fP and \fBvwscanw\fP) as withdrawn. +X/Open Curses, Issue 7 (2009) marks the \fItermcap\fP interface +(along with \fB\%vwprintw\fP and \fB\%vwscanw\fP) as withdrawn. .PP -Neither the XSI Curses standard nor the SVr4 man pages documented the return -values of \fBtgetent\fP correctly, though all three were in fact returned ever -since SVr1. -In particular, an omission in the XSI Curses documentation has been -misinterpreted to mean that \fBtgetent\fP returns \fBOK\fP or \fBERR\fP. +Neither X/Open Curses nor the SVr4 man pages documented the return +values of \fB\%tgetent\fP correctly, +though all three shown here were in fact returned ever since SVr1. +In particular, +an omission in the X/Open Curses specification has been misinterpreted +to mean that \fB\%tgetent\fP returns \fBOK\fP or \fBERR\fP. Because the purpose of these functions is to provide compatibility with -the \fItermcap\fP library, that is a defect in XCurses, Issue 4, Version 2 -rather than in ncurses. -.SS Compatibility with BSD Termcap -.PP -External variables are provided for support of certain termcap applications. -However, termcap applications' use of those variables is poorly documented, -e.g., not distinguishing between input and output. -In particular, some applications are reported to declare and/or -modify \fBospeed\fP. +the \fItermcap\fP library, +that is a defect in X/Open Curses, Issue 4, Version 2 +rather than in \fI\%ncurses\fP. +.SS "Compatibility with BSD \fItermcap\fP" +Externally visible variables are provided for support of certain +\fItermcap\fP applications. +However, +their correct usage is poorly documented; +for example, +it is unclear when reading and writing them is meaningful. +In particular, +some applications are reported to declare and/or modify \fB\%ospeed\fP. .PP -The comment that only the first two characters of the \fBid\fP 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 \fBtgetstr\fP, \fBtgetnum\fP and \fBtgetflag\fP. -Some applications assume that the termcap interface does not require -the trailing NUL for the parameter name. -Taking into account these issues: +The constraint that only the first two characters of the \fIid\fP +parameter are used escapes many application developers. +The BSD \fItermcap\fP library did not require a trailing null character +on the capability identifier passed to \fB\%tgetstr\fP, +\fB\%tgetnum\fP, +and +\fB\%tgetflag\fP. +.\" See . +Some applications thus assume that the \fItermcap\fP interface does not +require the trailing null character for the capability identifier. .bP -As a special case, -\fBtgetflag\fP matched against a single-character identifier -provided that was at the end of the terminal description. -You should not rely upon this behavior in portable programs. -This implementation disallows matches against single-character capability names. -.bP -This implementation disallows matches by the termcap interface against -extended capability names which are longer than two characters. +.I \%ncurses +disallows matches by the \fItermcap\fP interface against extended +capability names that are longer than two characters; +see \fB\%user_caps\fP(5). .PP -The BSD termcap function \fBtgetent\fP 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. +The BSD \fItermcap\fP function \fB\%tgetent\fP returns the text of a +\fItermcap\fP entry in the buffer passed as an argument. +This library, +like other \fI\%term\%info\fP implementations, +does not store terminal type descriptions as text. It sets the buffer contents to a null-terminated string. -.SS Other Compatibility -This library includes a termcap.h header, -for compatibility with other implementations. -But the header is rarely used because the other implementations -are not strictly compatible. +.SS "Header File" +This library includes a \fI\%termcap.h\fP header for compatibility with +other implementations, +but the header is rarely used because the other implementations are not +strictly compatible. +.SH HISTORY +.\" See https://www.oreilly.com/openbook/opensources/book/kirkmck.html +.\" for much BSD release history. +Bill Joy originated a forerunner of \fItermcap\fP called +\*(``ttycap\*('', +dated September 1977, +and released in 1BSD +(March 1978). +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s7/ttycap.c +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/man7/ttycap.7 +It used many of the same function names as the later \fItermcap\fP, +such as +\fB\%tgetent\fP, +\fB\%tgetflag\fP, +\fB\%tgetnum\fP, +and +\fB\%tgetstr\fP. +.PP +A clear descendant, +the \fItermlib\fP library, +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/termlib/ +followed in 2BSD +(May 1979), +adding \fB\%tgoto\fP and \fB\%tputs\fP. +The former applied at that time only to cursor positioning capabilities, +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/bin/etc/termcap +thus the overly specific name. +Little changed in 3BSD +(late 1979) +except the addition of test programs and a \fI\%termlib\fP man page, +which documented the API shown in section \*(``SYNOPSIS\*('' above. +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/lib/\ +.\" libtermlib/ +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man3/\ +.\" termlib.3 .PP -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: +4BSD +(November 1980) +renamed \fItermlib\fP to \fItermcap\fP +.\" ...except in the source tree... +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/lib/\ +.\" libtermlib/makefile +and added another test program. +The library remained much the same though 4.3BSD +(June 1986). +4.4BSD-Lite +(June 1994) +refactored it, +.\" Observe the `tncktc()`, `tnamatch()`, `tskip()`, and `tdecode()` +.\" entry points disappearing from termcap.c. +leaving the API unchanged. +.PP +Function prototypes were a feature of ANSI C (1989). +The library long antedated the standard and thus provided no header file +declaring them. +Nevertheless, +the BSD sources included two different \fI\%termcap.h\fP header files +over time. .bP -One was used internally by the \fBjove\fP editor in 2BSD through 4.4BSD. -It defined global symbols for the termcap variables which it used. +One was used internally by \fBjove\fP(1) from 4.3BSD onward. +.\" 2BSD became a branch retaining support for non-virtual memory +.\" systems (such as the PDP-11) whereas most BSD development focused on +.\" the VAX and other VM-enabled systems starting with 3BSD. +.\" +.\" This man page previously located a termcap.h in 2BSD, but that may +.\" be confusion arising from its backport to 2.9BSD (and still present +.\" in surviving sources for 2.11BSD, the "end of the line" for that +.\" branch's development). +.\" +.\" Observe the copyright notice in +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD/usr/contrib/\ +.\" jove/Makefile +.\" --much too late for 2BSD (1979). +It declared global symbols for the \fItermcap\fP variables that it used. .bP -The other appeared in 4.4BSD Lite Release 2 (mid-1993) -as part of \fIlibedit\fP (also known as the \fIeditline\fP library). -The CSRG source history shows that this was added in mid-1992. -The \fIlibedit\fP header file was used internally, -as a convenience for compiling the \fIeditline\fP library. -It declared function prototypes, but no global variables. -.PP -The header file from \fIlibedit\fP was added to NetBSD's termcap -library in mid-1994. +The other appeared in 4.4BSD-Lite Release 2 +(June 1995) +as part of \fIlibedit\fP +(also known as the \fI\%edit\%line\fP library). +CSRG source history shows that this was added in mid-1992. +The \fIlibedit\fP header file was used internally as a convenience for +compiling the \fI\%edit\%line\fP library. +It declared function prototypes, +but no global variables. +This header file was added to NetBSD's \fItermcap\fP library in +mid-1994. .PP -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 \fBconst\fP for the function prototypes in the header -where one would expect the parameters to be read-only. -This was a difference versus the original BSD termcap. -The prototype for \fBtputs\fP also differed, -but in that instance, it was \fIlibedit\fP which differed from BSD termcap. +Meanwhile, +GNU \fItermcap\fP began development in 1990. +Its first release (1.0) in 1991 included a \fI\%termcap.h\fP header. +Its second (1.1) in September 1992 modified the header to use +\fIconst\fP for the function prototypes in the header where one would +expect the parameters to be read-only. +BSD \fItermcap\fP did not. +The prototype for \fB\%tputs\fP also differed, +but in that instance, +it was \fIlibedit\fP that differed from BSD \fItermcap\fP. .PP -A copy of GNU termcap 1.3 was bundled with \fIbash\fP in mid-1993, -to support the \fBreadline\fP(3) library. +GNU \fItermcap\fP 1.3 was bundled with \fIbash\fP(1) in mid-1993 to +support the \fI\%readline\fP(3) library. .PP -A termcap.h file was provided in ncurses 1.8.1 (November 1993). -That reflected influence by \fBemacs\fP(1) (rather than \fBjove\fP(1)) -and GNU termcap: +\fI\%ncurses\fP 1.8.1 +(November 1993) +provided a \fI\%termcap.h\fP file. +It reflected influence from GNU \fItermcap\fP and \fBemacs\fP(1) +(rather than \fBjove\fP(1)), +providing the following interface: .bP -it provided declarations for a few global symbols used by \fBemacs\fP +global symbols used by \fIemacs\fP, .bP -it provided function prototypes (using \fBconst\fP). +\fIconst\fP-qualified function prototypes, +and .bP -a prototype for \fBtparam\fP (a GNU termcap feature) was provided. +a prototype for \fBtparam\fP, +a GNU \fItermcap\fP feature. +.PP +Later +(in mid-1996) +the \fB\%tparam\fP function was removed from \fI\%ncurses\fP. +Any two of the four implementations thus differ, +and programs that intend to work with all \fItermcap\fP library +interfaces must account for that fact. +.SH BUGS +If you call \fB\%tgetstr\fP to fetch +.B \%column_address +.RB ( ch ) +or any other parameterized string capability, +be aware that it is returned in \fI\%term\%info\fP notation, +not the older and not-quite-compatible \fItermcap\fP notation. +This does not cause problems if all you do with it is call \fB\%tgoto\fP +or \fB\%tparm\fP, +which both parametrically expand \fI\%term\%info\fP-style string +capabilities as \fI\%term\%info\fP does. +(If +.I \%ncurses +is configured to support \fItermcap,\fP +\fB\%tgoto\fP checks whether the string is \fI\%term\%info\fP-style by +looking for \*(``\fB%p\fP\*('' parameters or +\*(``\fB<\fP.\|.\|.\fB>\fP\*('' delays, +and invokes a \fItermcap\fP-style parser if the string appears not to +use \fI\%term\%info\fP syntax.) +.PP +Because \fI\%term\%info\fP's syntax for padding in string capabilities +differs from \fItermcap\fP's, +users can be surprised. +.IP \(bu 4 +\fB\%tputs("50")\fP in a \fI\%term\%info\fP system transmits +\*(``50\*('' rather than busy-waiting for 50 milliseconds. +.IP \(bu 4 +However, +if \fI\%ncurses\fP is configured to support \fItermcap\fP, +it may also have been configured to support BSD-style padding. +.IP +In that case, +\fB\%tputs\fP inspects strings passed to it, +looking for digits at the beginning of the string. +.IP +\fB\%tputs("50")\fP in a \fItermcap\fP system may busy-wait for 50 +milliseconds rather than transmitting \*(``50\*(''. +.PP +\fItermcap\fP has nothing analogous to \fI\%term\%info\fP's +.B \%set_attributes +.RB ( sgr ) +capability. +One consequence is that \fItermcap\fP applications assume that +.RB \*(`` me \*('' +(equivalent to \fI\%term\%info\fP's +.B \%exit_attribute_mode +.RB ( sgr0 ) +capability) +does not reset the alternate character set. +\fI\%ncurses\fP checks for, +and modifies the data shared with, +the \fItermcap\fP interface to accommodate the latter's limitation in +this respect. +.SH "SEE ALSO" +\fB\%curses\fP(3X), +\fB\%curs_terminfo\fP(3X), +\fB\%putc\fP(3), +\fB\%term_variables\fP(3X), +\fB\%terminfo\fP(5) .PP -Later (in mid-1996) the \fBtparam\fP 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. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBputc\fP(3), -\fBterm_variables\fP(3X), -\fBterminfo\fP(\*n). -.sp -https://invisible-island.net/ncurses/tctest.html +https://invisible\-island.net/ncurses/tctest.html diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x index 52e94d8d..10d1fa78 100644 --- a/man/curs_terminfo.3x +++ b/man/curs_terminfo.3x @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2018-2021,2022 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,683 +28,1115 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_terminfo.3x,v 1.80 2022/01/01 21:50:06 tom Exp $ -.TH curs_terminfo 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_terminfo.3x,v 1.136 2024/04/14 00:14:40 tom Exp $ +.TH curs_terminfo 3X 2024-04-13 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ds n 5 -.na -.hy 0 +. .SH NAME -\fBdel_curterm\fP, -\fBmvcur\fP, -\fBputp\fP, -\fBrestartterm\fP, -\fBset_curterm\fP, -\fBsetupterm\fP, -\fBtigetflag\fP, -\fBtigetnum\fP, -\fBtigetstr\fP, -\fBtiparm\fP, -\fBtparm\fP, -\fBtputs\fP, -\fBvid_attr\fP, -\fBvid_puts\fP, -\fBvidattr\fP, -\fBvidputs\fP \- \fBcurses\fP interfaces to terminfo database -.ad -.hy +\fB\%del_curterm\fP, +\fB\%mvcur\fP, +\fB\%putp\fP, +\fB\%restartterm\fP, +\fB\%set_curterm\fP, +\fB\%setupterm\fP, +\fB\%tigetflag\fP, +\fB\%tigetnum\fP, +\fB\%tigetstr\fP, +\fB\%tiparm\fP, +\fB\%tiparm_s\fP, +\fB\%tiscan_s\fP, +\fB\%tparm\fP, +\fB\%tputs\fP, +\fB\%vid_attr\fP, +\fB\%vid_puts\fP, +\fB\%vidattr\fP, +\fB\%vidputs\fP \- +\fIcurses\fR interfaces to \fI\%term\%info\fR database .SH SYNOPSIS .nf -\fB#include \fP -\fB#include \fP -.sp -\fBTERMINAL *cur_term;\fP -.sp -\fBconst char * const boolnames[];\fP -\fBconst char * const boolcodes[];\fP -\fBconst char * const boolfnames[];\fP -\fBconst char * const numnames[];\fP -\fBconst char * const numcodes[];\fP -\fBconst char * const numfnames[];\fP -\fBconst char * const strnames[];\fP -\fBconst char * const strcodes[];\fP -\fBconst char * const strfnames[];\fP -.sp -\fBint setupterm(const char *\fP\fIterm\fP\fB, int \fP\fIfiledes\fP\fB, int *\fP\fIerrret\fP\fB);\fP -.br -\fBTERMINAL *set_curterm(TERMINAL *\fP\fInterm\fP\fB);\fP -.br -\fBint del_curterm(TERMINAL *\fP\fIoterm\fP\fB);\fP -.br -\fBint restartterm(const char *\fP\fIterm\fP\fB, int \fP\fIfiledes\fP\fB, int *\fP\fIerrret\fP\fB);\fP -.sp -\fBchar *tparm(const char *\fP\fIstr\fP\fB, ...);\fP -.br -\fBint tputs(const char *\fP\fIstr\fP\fB, int \fP\fIaffcnt\fP\fB, int (*\fP\fIputc\fP\fB)(int));\fP -.br -\fBint putp(const char *\fP\fIstr\fP\fB);\fP -.sp -\fBint vidputs(chtype \fP\fIattrs\fP\fB, int (*\fP\fIputc\fP\fB)(int));\fP -.br -\fBint vidattr(chtype \fP\fIattrs\fP\fB);\fP -.br -\fBint vid_puts(attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB, int (*\fP\fIputc\fP\fB)(int));\fP -.br -\fBint vid_attr(attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fP -.sp -\fBint mvcur(int \fP\fIoldrow\fP\fB, int \fP\fIoldcol\fP\fB, int \fP\fInewrow\fP, int \fP\fInewcol\fP\fB);\fP -.sp -\fBint tigetflag(const char *\fP\fIcapname\fP\fB);\fP -.br -\fBint tigetnum(const char *\fP\fIcapname\fP\fB);\fP -.br -\fBchar *tigetstr(const char *\fP\fIcapname\fP\fB);\fP -.sp -\fBchar *tiparm(const char *\fP\fIstr\fP\fB, ...);\fP -.br +\fB#include +\fB#include +.PP +\fBTERMINAL *cur_term; +.PP +\fBconst char * const boolnames[]; +\fBconst char * const boolcodes[]; +\fBconst char * const boolfnames[]; +\fBconst char * const numnames[]; +\fBconst char * const numcodes[]; +\fBconst char * const numfnames[]; +\fBconst char * const strnames[]; +\fBconst char * const strcodes[]; +\fBconst char * const strfnames[]; +.PP +\fBint setupterm(const char *\fIterm\fP, int \fIfiledes\fP, int *\fIerrret\fP); +\fBTERMINAL *set_curterm(TERMINAL *\fInterm\fP); +\fBint del_curterm(TERMINAL *\fIoterm\fP); +\fBint restartterm(const char *\fIterm\fP, int \fIfiledes\fP, int *\fIerrret\fP); +.PP +\fBchar *tparm(const char *\fIstr\fP, \fR.\|.\|.\fP); + \fI/* or */ +\fBchar *tparm(const char *\fIstr\fP, long \fIp1\fP \fR.\|.\|.\fP \fBlong\fP \fIp9\fP); +.PP +\fBint tputs(const char *\fIstr\fP, int \fIaffcnt\fP, int (*\fIputc\fP)(int)); +\fBint putp(const char *\fIstr\fP); +.PP +\fBint vidputs(chtype \fIattrs\fP, int (*\fIputc\fP)(int)); +\fBint vidattr(chtype \fIattrs\fP); +\fBint vid_puts(attr_t \fIattrs\fP, short \fIpair\fP, void *\fIopts\fP, int (*\fIputc\fP)(int)); +\fBint vid_attr(attr_t \fIattrs\fP, short \fIpair\fP, void *\fIopts\fP); +.PP +\fBint mvcur(int \fIoldrow\fP, int \fIoldcol\fP, int \fInewrow\fP, int \fInewcol\fP); +.PP +\fBint tigetflag(const char *\fIcap-code\fP); +\fBint tigetnum(const char *\fIcap-code\fP); +\fBchar *tigetstr(const char *\fIcap-code\fP); +.PP +\fBchar *tiparm(const char *\fIstr\fP, \fR.\|.\|.\fP); +.PP +\fI/* extensions */ +\fBchar *tiparm_s(int \fIexpected\fP, int \fImask\fP, const char *\fIstr\fP, ...); +\fBint tiscan_s(int *\fIexpected\fP, int *\fImask\fP, const char *\fIstr\fP); +.PP +\fI/* deprecated */ +\fBint setterm(const char *\fIterm\fP); .fi .SH DESCRIPTION -These low-level routines must be called by programs that have to deal -directly with the \fBterminfo\fP database to handle certain terminal -capabilities, such as programming function keys. -For all other -functionality, \fBcurses\fP routines are more suitable and their use is -recommended. +These low-level functions must be called by programs that deal directly +with the +.I \%term\%info +database to handle certain terminal capabilities, +such as programming function keys. +For all other functionality, +.I curses +functions are more suitable and their use is recommended. .PP -None of these functions use (or are aware of) multibyte character strings -such as UTF-8: +None of these functions use +(or are aware of) +multibyte character strings such as UTF-8. .bP -capability names use the POSIX portable character set +Capability names and codes use the POSIX portable character set. .bP -capability string values have no associated encoding; +Capability string values have no associated encoding; they are strings of 8-bit characters. .SS Initialization +Initially, +\fB\%setupterm\fP should be called. +The high-level +.I curses +functions \fB\%initscr\fP and \fB\%newterm\fP call \fB\%setupterm\fP to +initialize the low-level set of terminal-dependent variables listed in +\fB\%term_variables\fP(3X). .PP -Initially, \fBsetupterm\fP should be called. -The high-level curses functions \fBinitscr\fP and -\fBnewterm\fP call \fBsetupterm\fP to initialize the -low-level set of terminal-dependent variables -[listed in \fBterminfo\fP(\*n)]. -.PP -Applications can use the -terminal capabilities either directly (via header definitions), +Applications can use the terminal capabilities either directly +(via header definitions), or by special functions. -The header files \fBcurses.h\fP and \fBterm.h\fP should be included (in this -order) to get the definitions for these strings, numbers, and flags. +The header files +.I \%curses.h +and +.I \%term.h +should be included +(in that order) +to get the definitions for these strings, +numbers, +and flags. .PP -The \fBterminfo\fP variables -\fBlines\fP and \fBcolumns\fP are initialized by \fBsetupterm\fP as -follows: +The +.I \%term\%info +variables +.B \%lines +and +.B \%columns +are initialized by \fB\%setupterm\fP as follows. .bP -If \fBuse_env(FALSE)\fP has been called, values for -\fBlines\fP and \fBcolumns\fP specified in \fBterminfo\fP are used. +If \fB\%use_env(FALSE)\fP has been called, +values for +.B \%lines +and +.B \%columns +specified in +.I \%term\%info +are used. .bP -Otherwise, if the environment variables \fBLINES\fP and \fBCOLUMNS\fP -exist, their values are used. -If these environment variables do not -exist and the program is running in a window, the current window size +Otherwise, +if the environment variables +.I LINES +and +.I \%COLUMNS +exist, +their values are used. +If these environment variables do not exist and the program is running +in a window, +the current window size is used. -Otherwise, if the environment variables do not exist, the -values for \fBlines\fP and \fBcolumns\fP specified in the -\fBterminfo\fP database are used. -.PP -Parameterized strings should be passed through \fBtparm\fP to instantiate them. -All \fBterminfo\fP strings -(including the output of \fBtparm\fP) -should be printed -with \fBtputs\fP or \fBputp\fP. -Call \fBreset_shell_mode\fP to restore the -tty modes before exiting [see \fBcurs_kernel\fP(3X)]. -.PP -Programs which use +Otherwise, +if the environment variables do not exist, +the values for +.B \%lines +and +.B \%columns +specified in the +.I \%term\%info +database are used. +.PP +Parameterized strings should be passed through \fB\%tparm\fP to +instantiate them. +All +.I \%term\%info +strings +(including the output of \fB\%tparm\fP) +should be sent to the terminal device with \fB\%tputs\fP or +\fB\%putp\fP. +Call \fB\%reset_shell_mode\fP to restore the terminal modes before +exiting; +see \fB\%curs_kernel\fP(3X). +.PP +Programs that use cursor addressing should .bP -output \fBenter_ca_mode\fP upon startup and +output \fB\%enter_ca_mode\fP upon startup and .bP -output \fBexit_ca_mode\fP before exiting. +output \fB\%exit_ca_mode\fP before exiting. .PP -Programs which execute shell subprocesses should +Programs that execute shell subprocesses should .bP -call \fBreset_shell_mode\fP and -output \fBexit_ca_mode\fP before the shell +call \fB\%reset_shell_mode\fP and +output \fB\%exit_ca_mode\fP before the shell is called and .bP -output \fBenter_ca_mode\fP and -call \fBreset_prog_mode\fP after returning from the shell. +output \fB\%enter_ca_mode\fP and +call \fB\%reset_prog_mode\fP after returning from the shell. .PP -The \fBsetupterm\fP routine reads in the \fBterminfo\fP database, -initializing the \fBterminfo\fP structures, but does not set up the -output virtualization structures used by \fBcurses\fP. -These are its parameters: +\fB\%setupterm\fP reads in the +.I \%term\%info +database, +initializing the +.I \%term\%info +structures, +but does not set up the output virtualization structures used by +.IR curses . +Its parameters follow. .RS 3 .TP 5 -\fIterm\fP -is the terminal type, a character string. -If \fIterm\fP is null, the environment variable \fBTERM\fP is used. +.I term +is the terminal type, +a character string. +If +.I term +is null, +the environment variable +.I TERM +is read. .TP 5 -\fIfiledes\fP -is the file descriptor used for all output. +.I filedes +is the file descriptor used for getting and setting terminal I/O modes. +.IP +Higher-level applications use \fB\%newterm\fP(3X) to initialize the +terminal, +passing an output +.I stream +rather than a +.IR descriptor . +In +.IR curses , +the two are the same because \fB\%newterm\fP calls \fB\%setupterm\fP, +passing the file descriptor derived from its output stream parameter. .TP 5 -\fIerrret\fP +.I errret points to an optional location where an error status can be returned to the caller. -If \fIerrret\fP is not null, -then \fBsetupterm\fP returns \fBOK\fP or -\fBERR\fP and stores a status value in the integer pointed to by -\fIerrret\fP. -A return value of \fBOK\fP combined with status of \fB1\fP in \fIerrret\fP +If +.I errret +is not null, +then \fB\%setupterm\fP returns +.B OK +or +.B ERR +and stores a status value in the integer pointed to by +.IR errret . +A return value of +.B OK +combined with status of +.B 1 +in +.I errret is normal. .IP -If \fBERR\fP is returned, examine \fIerrret\fP: +If +.B ERR +is returned, +examine +.I errret: .RS .TP 5 .B 1 -means that the terminal is hardcopy, cannot be used for curses applications. +means that the terminal is hardcopy, +and cannot be used for +.I curses +applications. .IP -\fBsetupterm\fP determines if the entry is a hardcopy type by -checking the \fBhc\fP (\fBhardcopy\fP) capability. +\fB\%setupterm\fP determines if the entry is a hardcopy type by +checking the +.B \%hardcopy +.RB ( hc ) +capability. .TP 5 .B 0 means that the terminal could not be found, or that it is a generic type, -having too little information for curses applications to run. +having too little information for +.I curses +applications to run. .IP -\fBsetupterm\fP determines if the entry is a generic type by -checking the \fBgn\fP (\fBgeneric\fP) capability. +\fB\%setupterm\fP determines if the entry is a generic type by +checking the +.B \%generic_type +.RB ( gn ) +capability. .TP 5 .B \-1 -means that the \fBterminfo\fP database could not be found. +means that the +.I \%term\%info +database could not be found. .RE .IP -If \fIerrret\fP is -null, \fBsetupterm\fP prints an error message upon finding an error -and exits. -Thus, the simplest call is: -.sp - \fBsetupterm((char *)0, 1, (int *)0);\fP, -.sp -which uses all the defaults and sends the output to \fBstdout\fP. +If +.I errret +is null, +\fB\%setupterm\fP reports an error message upon finding an error and +exits. +Thus, +the simplest call is: +.RS +.IP +.EX +setupterm((char *)0, 1, (int *)0); +.EE .RE -.\" *************************************************************************** -.SS The Terminal State -.PP -The \fBsetupterm\fP routine stores its information about the terminal -in a \fBTERMINAL\fP structure pointed to by the global variable \fBcur_term\fP. +.IP +which uses all the defaults and sends the output to +.BR stdout . +.RE +.\" ******************************************************************** +.SS "The Terminal State" +\fB\%setupterm\fP stores its information about the terminal in a +.I \%TERMINAL +structure pointed to by the global variable \fB\%cur_term\fP. If it detects an error, -or decides that the terminal is unsuitable (hardcopy or generic), +or decides that the terminal is unsuitable +(hardcopy or generic), it discards this information, making it not available to applications. .PP -If \fBsetupterm\fP is called repeatedly for the same terminal type, +If \fB\%setupterm\fP is called repeatedly for the same terminal type, it will reuse the information. It maintains only one copy of a given terminal's capabilities in memory. If it is called for different terminal types, -\fBsetupterm\fP allocates new storage for each set of terminal capabilities. -.PP -The \fBset_curterm\fP routine sets \fBcur_term\fP to -\fInterm\fP, and makes all of the \fBterminfo\fP boolean, numeric, and -string variables use the values from \fInterm\fP. -It returns the old value of \fBcur_term\fP. -.PP -The \fBdel_curterm\fP routine frees the space pointed to by -\fIoterm\fP and makes it available for further use. -If \fIoterm\fP is -the same as \fBcur_term\fP, references to any of the \fBterminfo\fP -boolean, numeric, and string variables thereafter may refer to invalid -memory locations until another \fBsetupterm\fP has been called. -.PP -The \fBrestartterm\fP routine is similar to \fBsetupterm\fP and \fBinitscr\fP, -except that it is called after restoring memory to a previous state (for -example, when reloading a game saved as a core image dump). -\fBrestartterm\fP assumes that the windows and the input and output options -are the same as when memory was saved, -but the terminal type and baud rate may be different. -Accordingly, \fBrestartterm\fP saves various tty state bits, -calls \fBsetupterm\fP, and then restores the bits. -.\" *************************************************************************** -.SS Formatting Output +\fB\%setupterm\fP allocates new storage for each set of terminal +capabilities. .PP -The \fBtparm\fP routine instantiates the string \fIstr\fP with -parameters \fIpi\fP. A pointer is returned to the result of \fIstr\fP +\fB\%set_curterm\fP sets \fB\%cur_term\fP to +.IR \%nterm , +and makes all of the +.I \%term\%info +Boolean, +numeric, +and string variables use the values from +.IR \%nterm . +It returns the old value of \fB\%cur_term\fP. +.PP +\fB\%del_curterm\fP frees the space pointed to by +.I \%oterm +and makes it available for further use. +If +.I \%oterm +is +the same as \fB\%cur_term\fP, +references to any of the +.I \%term\%info +Boolean, +numeric, +and string variables thereafter may refer to invalid memory locations +until another \fB\%setupterm\fP has been called. +.PP +\fB\%restartterm\fP is similar to \fB\%setupterm\fP and \fB\%initscr\fP, +except that it is called after restoring memory to a previous state +(for example, +when reloading a game saved as a core image dump). +\fB\%restartterm\fP assumes that the windows and the input and output +options are the same as when memory was saved, +but the terminal type and baud rate may be different. +Accordingly, +\fB\%restartterm\fP saves various terminal state bits, +calls \fB\%setupterm\fP, +and then restores the bits. +.\" ******************************************************************** +.SS "Formatting Output" +\fB\%tparm\fP instantiates the string +.I str +with parameters +.IR pi . +A pointer is returned to the result of +.I str with the parameters applied. -Application developers should keep in mind these quirks of the interface: +Application developers should keep in mind these quirks of the +interface: .bP -Although \fBtparm\fP's actual parameters may be integers or strings, -the prototype expects \fBlong\fP (integer) values. +Although \fB\%tparm\fP's actual parameters may be integers or strings, +the prototype expects +.I long +(integer) values. .bP -Aside from the \fBset_attributes\fP (\fBsgr\fP) capability, +Aside from the +.B \%set_attributes\fP +.RB ( sgr ) +capability, most terminal capabilities require no more than one or two parameters. .bP -Padding information is ignored by \fBtparm\fP; -it is interpreted by \fBtputs\fP. +Padding information is ignored by \fB\%tparm\fP; +it is interpreted by \fB\%tputs\fP. .bP The capability string is null-terminated. -Use \*(``\\200\*('' where an ASCII NUL is needed in the output. +Use \*(``\e200\*('' where an ASCII NUL is needed in the output. .PP -\fBtiparm\fP is a newer form of \fBtparm\fP which uses \fI\fP +\fB\%tiparm\fP is a newer form of \fB\%tparm\fP which uses +.I \%stdarg.h rather than a fixed-parameter list. -Its numeric parameters are integers (int) rather than longs. -.\" *************************************************************************** -.SS Output Functions -.PP -The \fBtputs\fP routine applies padding information -(i.e., by interpreting marker embedded in the terminfo capability -such as \*(``$<5>\*('' as 5 milliseconds) -to the string -\fIstr\fP and outputs it: -.bP -The \fIstr\fP parameter must be a terminfo string -variable or the return value from -\fBtparm\fP, \fBtiparm\fP, \fBtgetstr\fP, or \fBtgoto\fP. +Its numeric parameters are +.IR int s +rather than +.IR long "s." +.PP +Both \fB\%tparm\fP and \fB\%tiparm\fP assume that the application passes +parameters consistent with the terminal description. +Two extensions are provided as alternatives to deal with untrusted data. +.bP +\fB\%tiparm_s\fP is an extension which is a safer formatting function +than \fB\%tparm\fR or \fB\%tiparm\fR, +because it allows the developer to tell the +.I curses +library how many parameters to expect in the parameter list, +and which may be string parameters. +.IP +The \fImask\fP parameter has one bit set for each of the parameters +(up to 9) +passed as +.I char +pointers rather than numbers. +.bP +The extension \fB\%tiscan_s\fP allows the application to inspect a +formatting capability to see what the +.I curses +library would assume. +.\" ******************************************************************** +.SS "Output Functions" +String capabilities can contain padding information, +a time delay +(accommodating performance limitations of hardware terminals) +expressed as \fB$<\fIn\fB>\fR, +where \fIn\fP is a nonnegative integral count of milliseconds. +If \fIn\fP exceeds 30,000 +(thirty seconds), +it is capped at that value. +.PP +\fB\%tputs\fP interprets time-delay information in the string +.I str +and outputs it, +executing the delays: +.bP +The +.I str +parameter must be a +.I \%term\%info +string variable or the return value of +\fB\%tparm\fP, +\fB\%tiparm\fP, +\fB\%tgetstr\fP, +or \fB\%tgoto\fP. .IP -The \fBtgetstr\fP and \fBtgoto\fP functions are part of the \fItermcap\fP +The \fB\%tgetstr\fP and \fB\%tgoto\fP functions are part of the +.I termcap interface, -which happens to share this function name with the \fIterminfo\fP interface. +which happens to share these function names with the +.I \%term\%info +API. .bP -\fIaffcnt\fP is the number of lines affected, or 1 if -not applicable. +.I affcnt +is the number of lines affected, +or +.B 1 +if not applicable. .bP -\fIputc\fP is a \fBputchar\fP-like routine to which -the characters are passed, one at a time. +.I putc +is a +.IR \%putchar -like +function to which the characters are passed, +one at a time. +.IP +If \fB\%tputs\fP processes a time-delay, +it uses the \fB\%delay_output\fP(3X) function, +routing any resulting padding characters through this function. .PP -The \fBputp\fP routine calls \fBtputs(\fP\fIstr\fP\fB, 1, putchar)\fP. -The output of \fBputp\fP always goes to \fBstdout\fP, rather than -the \fIfiledes\fP specified in \fBsetupterm\fP. +\fB\%putp\fR calls +.RB \%\*(`` tputs(\c +.IB str ", 1, putchar)\c" +\*(''. +The output of \fB\%putp\fP always goes to +.BR stdout , +rather than the +.I \%file\%des +specified in \fB\%setupterm\fP. .PP -The \fBvidputs\fP routine displays the string on the terminal in the -video attribute mode \fIattrs\fP, which is any combination of the -attributes listed in \fBcurses\fP(3X). -The characters are passed to -the \fBputchar\fP-like routine \fIputc\fP. +\fB\%vidputs\fP displays the string on the terminal in the video +attribute mode +.IR attrs , +which is any combination of the attributes listed in \fB\%curses\fP(3X). +The characters are passed to the +.IR \%putchar -like +function +.IR putc . .PP -The \fBvidattr\fP routine is like the \fBvidputs\fP routine, except -that it outputs through \fBputchar\fP. +\fB\%vidattr\fP is like \fB\%vidputs\fP, +except that it outputs through \fI\%putchar\fP(3). .PP -The \fBvid_attr\fP and \fBvid_puts\fP routines correspond -to vidattr and vidputs, respectively. -They use a set of arguments for representing the video attributes plus color, -i.e., +.B \%vid_attr +and +.B \%vid_puts +correspond to +.B \%vidattr +and +.BR \%vidputs , +respectively. +They use multiple parameters to represent the character attributes and +color; +namely, .bP -\fIattrs\fP of type \fBattr_t\fP for the attributes and +.IR \%attrs , +of type +.IR \%attr_t , +for the attributes and .bP -\fIpair\fP of type \fBshort\fP for the color-pair number. +.IR pair , +of type +.IR short , +for the color pair number. .PP -The \fBvid_attr\fP and \fBvid_puts\fP routines -are designed to use the attribute constants with the \fBWA_\fP prefix. +Use the attribute constants prefixed with +.RB \*(`` WA_ \*('' +with +.B \%vid_attr +and +.BR \%vid_puts . .PP -X/Open Curses reserves the \fIopts\fP argument for future use, -saying that applications must provide a null pointer for that argument. -As an extension, -this implementation allows \fIopts\fP to be used as a pointer to \fBint\fP, -which overrides the \fIpair\fP (\fBshort\fP) argument. -.PP -The \fBmvcur\fP routine provides low-level cursor motion. -It takes effect immediately (rather than at the next refresh). +X/Open Curses reserves the +.I opts +argument for future use, +saying that applications must provide a null pointer for that argument; +but see section \*(``EXTENSIONS\*('' below. .PP -While \fBputp\fP and \fBmvcur\fP are low-level functions which -do not use the high-level curses state, -they are declared in \fB\fP because SystemV did this -(see \fIHISTORY\fP). -.\" *************************************************************************** -.SS Terminal Capability Functions +\fB\%mvcur\fP provides low-level cursor motion. +It takes effect immediately +(rather than at the next refresh). +Unlike the other low-level output functions, +which either write to the standard output or pass an output function +parameter, +\fB\%mvcur\fP uses an output file descriptor derived from +the output stream parameter of \fB\%newterm\fP(3X). .PP -The \fBtigetflag\fP, \fBtigetnum\fP and \fBtigetstr\fP routines return -the value of the capability corresponding to the \fBterminfo\fP -\fIcapname\fP passed to them, such as \fBxenl\fP. -The \fIcapname\fP for each capability is given in the table column entitled -\fIcapname\fP code in the capabilities section of \fBterminfo\fP(\*n). +While \fB\%putp\fP and \fB\%mvcur\fP are low-level functions that do not +use high-level +.I curses +state, +.I \%ncurses +declares them in +.I \%curses.h +because System\ V did this +(see section \*(``HISTORY\*('' below). +.\" ******************************************************************** +.SS "Terminal Capability Functions" +\fB\%tigetflag\fP, +\fB\%tigetnum\fP, +and \fB\%tigetstr\fP return the value of the capability corresponding to +the +.I \%term\%info +.IR cap-code , +such as +.BR xenl , +passed to them. +The +.I cap-code +for each capability is given in the table column entitled +.I cap-code +code in the capabilities section of \fB\%terminfo\fP(5). .PP -These routines return special values to denote errors. +These functions return special values to denote errors. .PP -The \fBtigetflag\fP routine returns +\fB\%tigetflag\fP returns .TP -\fB\-1\fP -if \fIcapname\fP is not a boolean capability, +.B \-1 +if +.I cap-code +is not a Boolean capability, or .TP -\fB0\fP +.B 0 if it is canceled or absent from the terminal description. .PP -The \fBtigetnum\fP routine returns +\fB\%tigetnum\fP returns .TP -\fB\-2\fP -if \fIcapname\fP is not a numeric capability, or +.B \-2 +if +.I cap-code +is not a numeric capability, +or .TP -\fB\-1\fP +.B \-1 if it is canceled or absent from the terminal description. .PP -The \fBtigetstr\fP routine returns +\fB\%tigetstr\fP returns .TP -\fB(char *)\-1\fP -if \fIcapname\fP is not a string capability, +.B "(char *)\-1" +if +.I cap-code +is not a string capability, or .TP -\fB0\fP +.B 0 if it is canceled or absent from the terminal description. -.\" *************************************************************************** -.SS Terminal Capability Names -.PP +.\" ******************************************************************** +.SS "Terminal Capability Names" These null-terminated arrays contain .bP -the short terminfo names (\*(``codes\*(''), +the short \fI\%term\%info\fP names (\*(``codes\*(''), .bP -the \fBtermcap\fP names (\*(``names\*(''), and +the \fItermcap\fP names (\*(``names\*(''), +and .bP -the long terminfo names (\*(``fnames\*('') +the long \fI\%term\%info\fP names (\*(``fnames\*('') +.PP +for each of the predefined +.I \%term\%info +variables: .PP -for each of the predefined \fBterminfo\fP variables: -.sp .RS +.nf \fBconst char *boolnames[]\fP, \fB*boolcodes[]\fP, \fB*boolfnames[]\fP -.br \fBconst char *numnames[]\fP, \fB*numcodes[]\fP, \fB*numfnames[]\fP -.br \fBconst char *strnames[]\fP, \fB*strcodes[]\fP, \fB*strfnames[]\fP +.fi .RE -.\" *************************************************************************** -.SS Releasing Memory -Each successful call to \fBsetupterm\fP allocates memory to hold the terminal -description. As a side-effect, it sets \fBcur_term\fP to point to this memory. +.\" ******************************************************************** +.SS "Releasing Memory" +Each successful call to \fB\%setupterm\fP allocates memory to hold the +terminal description. +As a side effect, +it sets \fB\%cur_term\fP to point to this memory. If an application calls -.sp - \fBdel_curterm(cur_term);\fP -.sp +.IP +.EX +del_curterm(cur_term); +.EE +.PP the memory will be freed. .PP -The formatting functions \fBtparm\fP and \fBtiparm\fP extend the storage -allocated by \fBsetupterm\fP: +The formatting functions \fB\%tparm\fP and \fB\%tiparm\fP extend the +storage allocated by \fB\%setupterm\fP as follows. .bP -the \*(``static\*('' terminfo variables [a-z]. -Before ncurses 6.3, those were shared by all screens. -With ncurses 6.3, those are allocated per screen. -See \fBterminfo\fP(\*n) for details. +They add the \*(``static\*('' +.I \%term\%info +variables [a-z]. +Before +.I \%ncurses +6.3, +those were shared by all screens. +With +.I \%ncurses +6.3, +those are allocated per screen. +See \fB\%terminfo\fP(5). .bP -to improve performance, ncurses 6.3 caches the result of analyzing terminfo +To improve performance, +.I \%ncurses +6.3 caches the result of analyzing +.I \%term\%info strings for their parameter types. -That is stored as a binary tree referenced from the \fBTERMINAL\fP structure. +That is stored as a binary tree referenced from the +.I \%TERMINAL +structure. .PP -The higher-level \fBinitscr\fP and \fBnewterm\fP functions use \fBsetupterm\fP. -Normally they do not free this memory, but it is possible to do that using -the \fBdelscreen\fP(3X) function. -.\" *************************************************************************** +The higher-level \fB\%initscr\fP and \fB\%newterm\fP functions use +\fB\%setupterm\fP. +Normally they do not free this memory, +but it is possible to do that using the \fB\%delscreen\fP(3X) function. +.\" ******************************************************************** .SH RETURN VALUE -Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP -(SVr4 only specifies \*(``an integer value other than \fBERR\fP\*('') -upon successful completion, -unless otherwise noted in the preceding routine descriptions. -.PP -Routines that return pointers always return \fBNULL\fP on error. -.PP -X/Open defines no error conditions. -In this implementation -.RS 3 +X/Open Curses defines no failure conditions. +In +.IR \%ncurses , .TP 5 -\fBdel_curterm\fP -returns an error -if its terminal parameter is null. +.B del_curtem +fails if its terminal parameter is null. .TP 5 -\fBputp\fP -calls \fBtputs\fP, returning the same error-codes. +.B putp +calls \fB\%tputs\fP, +returning the same error codes. .TP 5 -\fBrestartterm\fP -returns an error -if the associated call to \fBsetupterm\fP returns an error. +.B restartterm +fails if the associated call to \fB\%setupterm\fP returns an error. .TP 5 -\fBsetupterm\fP -returns an error -if it cannot allocate enough memory, or -create the initial windows (stdscr, curscr, newscr). +.B setupterm +fails if it cannot allocate enough memory, +or create the initial windows +.RB ( \%stdscr , +.BR \%curscr , +and +.BR \%newscr ) Other error conditions are documented above. .TP 5 -\fBtputs\fP -returns an error if the string parameter is null. +.B tparm +returns a null pointer if the capability would require unexpected +parameters; +that is, +too many, +too few, +or incorrect types +(strings where integers are expected, +or vice versa). +.TP 5 +.B tputs +fails if the string parameter is null. It does not detect I/O errors: -X/Open states that \fBtputs\fP ignores the return value -of the output function \fIputc\fP. -.RE -.\" *************************************************************************** -.SS Compatibility macros +X/Open Curses states that \fB\%tputs\fP ignores the return value +of the output function \fI\%putc\fP. +.\" ******************************************************************** +.SH NOTES +The +.B \%vid_attr +function in +.I \%ncurses +is a special case. +It was originally implemented based on a draft of X/Open Curses, +as a macro, +before other parts of the +.I \%ncurses +wide-character API were developed, +and unlike the other wide-character functions, +is also provided in the non-wide-character configuration. +.\" ******************************************************************** +.SH EXTENSIONS +The functions marked as extensions were designed for +.IR \%ncurses , +and are not found in SVr4 +.IR curses , +4.4BSD +.IR curses , +or any other previous +.I curses +implementation. +.PP +.I \%ncurses +allows +.I opts +to be a pointer to +.IR int , +which overrides the +.I pair +.RI ( short ) +argument. +.\" ******************************************************************** +.SH PORTABILITY +\fB\%setterm\fP is not described by X/Open and must be considered +non-portable. +All other functions are as described by X/Open. +.SS "Compatibility Macros" This implementation provides a few macros for compatibility with systems -before SVr4 (see \fIHISTORY\fP). -Those include -\fBcrmode\fP, -\fBfixterm\fP, -\fBgettmode\fP, -\fBnocrmode\fP, -\fBresetterm\fP, -\fBsaveterm\fP, and -\fBsetterm\fP. -.PP -In SVr4, those are found in \fB\fP, -but except for \fBsetterm\fP, are likewise macros. -The one function, \fBsetterm\fP, is mentioned in the manual page. -The manual page notes that the \fBsetterm\fP routine -was replaced by \fBsetupterm\fP, stating that the call: -.sp - \fBsetupterm(\fP\fIterm\fP\fB, 1, (int *)0)\fP -.sp -provides the same functionality as \fBsetterm(\fP\fIterm\fP\fB)\fP, -and is not recommended for new programs. -This implementation provides each of those symbols -as macros for BSD compatibility, -.\" *************************************************************************** +before SVr4 +(see section \*(``HISTORY\*('' below). +They include +\fB\%Bcrmode\fP, +\fB\%Bfixterm\fP, +\fB\%Bgettmode\fP, +\fB\%Bnocrmode\fP, +\fB\%Bresetterm\fP, +\fB\%Bsaveterm\fP, +and +\fB\%Bsetterm\fP. +.PP +In SVr4, +these are found in +.IR \%curses.h , +but except for \fB\%setterm\fP, +are likewise macros. +The one function, +\fB\%setterm\fP, +is mentioned in the manual page. +It further notes that \fB\%setterm\fP was replaced by \fB\%setupterm\fP, +stating that the call +.RS +.EX +setupterm(\fIterm\fP, 1, (int *)0) +.EE +.RE +provides the same functionality as \fB\%setterm(\fIterm\fB)\fR, +discouraging the latter for new programs. +.I \%ncurses +implements each of these symbols as macros for BSD +.I curses +compatibility. +.SS "Legacy Data" +\fB\%setupterm\fP copies the terminal name to the array \fB\%ttytype\fP. +This is not part of X/Open Curses, +but is assumed by some applications. +.PP +Other implementions may not declare the capability name arrays. +Some provide them without declaring them. +X/Open Curses does not specify them. +.PP +Extended terminal capability names, +as defined by +.RB \%\*(`` "@TIC@ \-x" \*('', +are not stored in the arrays described here. +.SS "Output Buffering" +Older versions of \fI\%ncurses\fP assumed that the file descriptor +passed to \fB\%setupterm\fP from \fB\%initscr\fP or \fB\%newterm\fP uses +buffered I/O, +and would write to the corresponding stream. +In addition to the limitation that the terminal was left in +block-buffered mode on exit +(like System\ V +.IR curses ), +it was problematic because +.I \%ncurses +did not allow a reliable way to clean up on receiving +.BR SIGTSTP . +.PP +The current version (ncurses6) +uses output buffers managed directly by +.IR \%ncurses . +Some of the low-level functions described in this manual page write +to the standard output. +They are not signal-safe. +The high-level functions in +.I \%ncurses +employ alternate versions of these functions using the more reliable +buffering scheme. +.SS "Function Prototypes" +The X/Open Curses prototypes are based on the SVr4 +.I curses +header declarations, +which were defined at the same time the C language was first +standardized in the late 1980s. +.bP +X/Open Curses uses +.I \%const +less effectively than a later design might, +sometimes applying it needlessly to values that are already constant, +and in most cases overlooking parameters that normally would use +.IR \%const . +Passing +.IR \%const -qualified +parameters to functions that do not declare them +.I \%const +may prevent the program from compiling. +On the other hand, +\*(``writable strings\*('' are an obsolescent feature. +.IP +As an extension, +this implementation can be configured to change the function prototypes +to use the +.I \%const +keyword. +The +.I \%ncurses +ABI 6 enables this feature by default. +.bP +X/Open Curses prototypes \fB\%tparm\fP with a fixed number of +parameters, +rather than a variable argument list. +.IP +This implementation uses a variable argument list, +but can be configured to use the fixed-parameter list. +Portable applications should provide nine parameters after the format; +zeroes are fine for this purpose. +.IP +In response to review comments by Thomas E. Dickey, +X/Open Curses Issue 7 proposed the \fB\%tiparm\fP function in mid-2009. +.IP +While \fB\%tiparm\fP is always provided in \fI\%ncurses\fP, +the older form is only available as a build-time configuration option. +If not specially configured, +\fB\%tparm\fP is the same as \fB\%tiparm\fP. +.PP +Both forms of \fB\%tparm\fP have drawbacks: +.bP +Most of the calls to \fB\%tparm\fP use only one or two parameters. +Passing nine on each call is awkward. +.IP +Using +.I long +for the numeric parameter type is a workaround to make the parameter use +the same amount of stack as a pointer. +That approach dates back to the mid-1980s, +before C was standardized. +Since then, +there is a standard +(and pointers are not required to fit in a +.IR long ). +.bP +Providing the right number of parameters for a variadic function +such as \fB\%tiparm\fP can be a problem, +in particular for string parameters. +However, +only a few +.I \%term\%info +capabilities use string parameters +(for instance, +the ones used for programmable function keys). +.IP +The \fI\%ncurses\fP library checks usage of these capabilities, +and returns an error if the capability mishandles string parameters. +But it cannot check if a calling program provides strings in the right +places for the \fB\%tparm\fP calls. +.IP +The \fB\%@TPUT@\fR(1) program checks its use of these capabilities with +a table, +so that it calls \fB\%tparm\fP correctly. +.SS "Special \fITERM\fP treatment" +If configured to use the terminal driver, +.\" XXX: as opposed to the Unix terminal driver, termio(s)? +as with the MinGW port, +.bP +\fB\%setupterm\fP interprets a missing/empty \fITERM\fP variable as the +special value \*(``unknown\*(''. +.IP +SVr4 +.I curses +uses the special value \*(``dumb\*(''. +.IP +The difference between the two is that the former uses the +.B \%generic_type +.RB ( gn ) +.I \%term\%info +capability, +while the latter does not. +A generic terminal is unsuitable for full-screen applications. +.bP +\fB\%setupterm\fP allows explicit use of the +the windows console driver by checking if \fB$TERM\fP is set to +\*(``#win32con\*('' or an abbreviation of that string. +.SS "Other Portability Issues" +In SVr4, +\fB\%set_curterm\fP returns an +.IR int , +.B OK +or +.BR ERR . +We have chosen to implement the X/Open Curses semantics. +.PP +In SVr4, +the third argument of \fB\%tputs\fP has the type +.RB \*(`` "int (*putc)(char)" \*(''. +.PP +At least one implementation of X/Open Curses (Solaris) returns a value +other than +.B OK +or +.B ERR +from \fB\%tputs\fP. +It instead returns the length of the string, +and does no error checking. +.PP +X/Open Curses notes that after calling \fB\%mvcur\fP, +the +.I curses +state may not match the actual terminal state, +and that an application should touch and refresh the window before +resuming normal +.I curses +calls. +Both +.I \%ncurses +and SVr4 +.I curses +implement \fB\%mvcur\fP using the +.I SCREEN +data allocated in either \fB\%initscr\fP or \fB\%newterm\fP. +So though it is documented as a +.I \%term\%info +function, +\fB\%mvcur\fP is really a +.I curses +function that is not well specified. +.PP +X/Open Curses states that the old location must be given for +\fB\%mvcur\fP to accommodate terminals that lack absolute cursor +positioning. +.\" X/Open Curses Issue 7, p. 161 +.I \%ncurses +allows the caller to use \-1 for either or both old coordinates. +The \-1 tells +.I \%ncurses +that the old location is unknown, +and that it must use only absolute motion, +as with the +.B \%cursor_address +.RB ( cup ) +capability, +rather than the least costly combination of absolute and relative +motion. +.\" ******************************************************************** .SH HISTORY +SVr2 (1984) introduced the +.I \%term\%info +feature. +Its programming manual mentioned the following low-level functions. .PP -SVr2 introduced the terminfo feature. -Its programming manual mentioned these low-level functions: .TS -l l -_ _ -l l. -\fBFunction\fP \fBDescription\fP -fixterm restore tty to \*(``in curses\*('' state -gettmode establish current tty modes +lB lB +lB lx. +Function Description +_ +fixterm restore terminal to \*(``in \fIcurses\fP\*('' state +gettmode establish current terminal modes mvcur low level cursor motion -putp T{ -utility function that uses \fBtputs\fP to send characters via \fBputchar\fP. -T} -resetterm set tty modes to \*(``out of curses\*('' state -resetty reset tty flags to stored value -saveterm save current modes as \*(``in curses\*('' state -savetty store current tty flags +putp use \fBtputs\fP to send characters via \fIputchar\fP +resetterm set terminal modes to \*(``out of \fIcurses\fP\*(''\ + state +resetty reset terminal flags to stored value +saveterm save current modes as \*(``in \fIcurses\fP\*('' state +savetty store current terminal flags setterm establish terminal with given type setupterm establish terminal with given type -tparm instantiate a string expression with parameters +tparm interpolate parameters into string capability tputs apply padding information to a string -vidattr like \fBvidputs\fP, but outputs through \fBputchar\fP +vidattr like \fBvidputs\fP, but output through \fIputchar\fP vidputs T{ -output a string to put terminal in a specified video attribute mode +write string to terminal, applying specified attributes T} .TE .PP The programming manual also mentioned -functions provided for termcap compatibility -(commenting that they \*(``may go away at a later date\*(''): +functions provided for +.I termcap +compatibility +(commenting that they \*(``may go away at a later date\*(''). +.PP .TS -l l -_ _ -l l. -\fBFunction\fP \fBDescription\fP -tgetent look up termcap entry for given \fIname\fP -tgetflag get boolean entry for given \fIid\fP +lB lB +lB lx. +Function Description +_ +tgetent look up \fItermcap\fP entry for given \fIname\fP +tgetflag get Boolean entry for given \fIid\fP tgetnum get numeric entry for given \fIid\fP tgetstr get string entry for given \fIid\fP tgoto apply parameters to given capability tputs T{ -apply padding to capability, calling a function to put characters +write characters via a function parameter, applying padding T} .TE .PP -Early terminfo programs obtained capability values from the -\fBTERMINAL\fP structure initialized by \fBsetupterm\fP. +Early +.I \%term\%info +programs obtained capability values from the +.I \%TERMINAL +structure initialized by \fB\%setupterm\fP. +.PP +SVr3 (1987) extended +.I \%term\%info +by adding functions to retrieve capability values +(like the +.I termcap +interface), +and reusing \fB\%tgoto\fP and \fB\%tputs\fP. .PP -SVr3 extended terminfo by adding functions to retrieve capability values -(like the termcap interface), -and reusing tgoto and tputs: .TS -l l -_ _ -l l. -\fBFunction\fP \fBDescription\fP -tigetflag get boolean entry for given \fIid\fP +lB lB +lB lx. +Function Description +_ +tigetflag get Boolean entry for given \fIid\fP tigetnum get numeric entry for given \fIid\fP tigetstr get string entry for given \fIid\fP .TE .PP -SVr3 also replaced several of the SVr2 terminfo functions -which had no counterpart in the termcap interface, -documenting them as obsolete: +SVr3 also replaced several of the SVr2 +.I \%term\%info +functions that had no counterpart in the +.I termcap +interface, +documenting them as obsolete. +.PP .TS -l l -_ _ -l l. -\fBFunction\fP \fBReplaced by\fP +lB lB +l lx. +Function Replaced by +_ crmode cbreak fixterm reset_prog_mode -gettmode N/A +gettmode \fIn/a\fP nocrmode nocbreak resetterm reset_shell_mode saveterm def_prog_mode setterm setupterm .TE .PP -SVr3 kept the \fBmvcur\fP, \fBvidattr\fP and \fBvidputs\fP functions, -along with \fBputp\fP, \fBtparm\fP and \fBtputs\fP. +SVr3 kept the \fB\%mvcur\fP, +\fB\%vidattr\fP, +and \fB\%vidputs\fP functions, +along with \fB\%putp\fP, +\fB\%tparm\fP, +and \fB\%tputs\fP. The latter were needed to support padding, -and handling functions such as \fBvidattr\fP -(which used more than the two parameters supported by \fBtgoto\fP). +and to handle capabilities accessed by functions such as \fB\%vidattr\fP +(which used more than the two parameters supported by \fB\%tgoto\fP). .PP SVr3 introduced the functions for switching between terminal -descriptions, e.g., \fBset_curterm\fP. -Some of that was incremental improvements to the SVr2 library: +descriptions; +for example, +\fB\%set_curterm\fP. +Some changes reflected incremental improvements to the SVr2 library. .bP -The \fBTERMINAL\fP type definition was introduced in SVr3.01, -for the \fBterm\fP structure provided in SVr2. +The +.I \%TERMINAL +type definition was introduced in SVr3.01, +for the +.I term +structure provided in SVr2. .bP -The various global variables such as \fBboolnames\fP were mentioned +Various global variables such as \fB\%boolnames\fP were mentioned in the programming manual at this point, -though the variables were provided in SVr2. +though the variables had been provided in SVr2. .PP -SVr4 added the \fBvid_attr\fP and \fBvid_puts\fP functions. +SVr4 (1989) added the \fB\%vid_attr\fP and \fB\%vid_puts\fP functions. .PP -There are other low-level functions declared in the curses header files -on Unix systems, -but none were documented. -The functions marked \*(``obsolete\*('' remained in use -by the Unix \fBvi\fP(1) editor. -.SH PORTABILITY -.SS Legacy functions -.PP -X/Open notes that \fBvidattr\fP and \fBvidputs\fP may be macros. -.PP -The function \fBsetterm\fP is not described by X/Open and must -be considered non-portable. -All other functions are as described by X/Open. -.SS Legacy data -.PP -\fBsetupterm\fP copies the terminal name to the array \fBttytype\fP. -This is not part of X/Open Curses, but is assumed by some applications. -.PP -Other implementions may not declare the capability name arrays. -Some provide them without declaring them. -X/Open does not specify them. -.PP -Extended terminal capability names, e.g., as defined by \fB@TIC@\ \-x\fP, -are not stored in the arrays described here. -.SS Output buffering -.PP -Older versions of \fBncurses\fP assumed that the file descriptor passed to -\fBsetupterm\fP from \fBinitscr\fP or \fBnewterm\fP uses buffered I/O, -and would write to the corresponding stream. -In addition to the limitation that the terminal was left in block-buffered -mode on exit (like System V curses), -it was problematic because \fBncurses\fP -did not allow a reliable way to cleanup on receiving SIGTSTP. -.PP -The current version (ncurses6) -uses output buffers managed directly by \fBncurses\fP. -Some of the low-level functions described in this manual page write -to the standard output. -They are not signal-safe. -The high-level functions in \fBncurses\fP use -alternate versions of these functions -using the more reliable buffering scheme. -.SS Function prototypes -.PP -The X/Open Curses prototypes are based on the SVr4 curses header declarations, -which were defined at the same time the C language was first standardized in -the late 1980s. -.bP -X/Open Curses uses \fBconst\fP less effectively than a later design might, -in some cases applying it needlessly to values are already constant, -and in most cases overlooking parameters which normally would use \fBconst\fP. -Using constant parameters for functions which do not use \fBconst\fP -may prevent the program from compiling. -On the other hand, \fIwritable strings\fP are an obsolescent feature. -.IP -As an extension, this implementation can be configured to change the -function prototypes to use the \fBconst\fP keyword. -The ncurses ABI 6 enables this feature by default. -.bP -X/Open Curses prototypes \fBtparm\fP with a fixed number of parameters, -rather than a variable argument list. -.IP -This implementation uses a variable argument list, but can be -configured to use the fixed-parameter list. -Portable applications should provide 9 parameters after the format; -zeroes are fine for this purpose. -.IP -In response to review comments by Thomas E. Dickey, -X/Open Curses Issue 7 proposed the \fBtiparm\fP function in mid-2009. -.SS Special TERM treatment -.PP -If configured to use the terminal-driver, -e.g., for the MinGW port, -.bP -\fBsetupterm\fP interprets a missing/empty TERM variable as the -special value \*(``unknown\*(''. -.bP -\fBsetupterm\fP allows explicit use of the -the windows console driver by checking if $TERM is set to -\*(``#win32con\*('' or an abbreviation of that string. -.SS Other portability issues -.PP -In System V Release 4, \fBset_curterm\fP has an \fBint\fP return type and -returns \fBOK\fP or \fBERR\fP. We have chosen to implement the X/Open Curses -semantics. -.PP -In System V Release 4, the third argument of \fBtputs\fP has the type -\fBint (*putc)(char)\fP. -.PP -At least one implementation of X/Open Curses (Solaris) returns a value -other than \fBOK\fP/\fBERR\fP from \fBtputs\fP. -That returns the length of the string, and does no error-checking. -.PP -X/Open notes that after calling \fBmvcur\fP, the curses state may not match the -actual terminal state, and that an application should touch and refresh -the window before resuming normal curses calls. -Both \fBncurses\fP and System V Release 4 curses implement \fBmvcur\fP using -the SCREEN data allocated in either \fBinitscr\fP or \fBnewterm\fP. -So though it is documented as a terminfo function, -\fBmvcur\fP is really a curses function which is not well specified. -.PP -X/Open states that the old location must be given for \fBmvcur\fP. -This implementation allows the caller to use \-1's for the old ordinates. -In that case, the old location is unknown. +Other low-level functions are declared in the +.I curses +header files of Unix systems, +but none are documented. +Those noted as \*(``obsolete\*('' by SVr3 remained in use by System\ V's +\fIvi\fP(1) editor. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_kernel\fP(3X), -\fBcurs_memleaks\fP(3X), -\fBcurs_termcap\fP(3X), -\fBcurs_variables\fP(3X), -\fBterm_variables\fP(3X), -\fBputc\fP(3), -\fBterminfo\fP(\*n) +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_kernel\fP(3X), +\fB\%curs_memleaks\fP(3X), +\fB\%curs_termcap\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%putc\fP(3), +\fB\%term_variables\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/curs_threads.3x b/man/curs_threads.3x index 1b001601..d49c16e7 100644 --- a/man/curs_threads.3x +++ b/man/curs_threads.3x @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2021-2023,2024 Thomas E. Dickey * .\" Copyright 2008-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,577 +28,611 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_threads.3x,v 1.30 2021/12/25 21:50:36 tom Exp $ -.TH curs_threads 3X "" +.\" $Id: curs_threads.3x,v 1.56 2024/03/16 15:35:01 tom Exp $ +.TH curs_threads 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBcurs_threads\fP \- \fBcurses\fP thread support -.ad -.hy +\fI\%NCURSES_WINDOW_CB\fP, +\fI\%NCURSES_SCREEN_CB\fP, +\fB\%get_escdelay\fP, +\fB\%set_escdelay\fP, +\fB\%set_tabsize\fP, +\fB\%use_screen\fP, +\fB\%use_window\fP \- +\fIcurses\fR support for multi-threaded applications .SH SYNOPSIS -\fB#include \fP -.sp -\fBtypedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);\fP -.br -\fBtypedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);\fP -.sp -\fBint get_escdelay(void);\fP -.br -\fBint set_escdelay(int \fP\fIms\fP\fB);\fP -.br -\fBint set_tabsize(int \fP\fIcols\fP\fB);\fP -.sp -\fBint use_screen(SCREEN *\fP\fIscr\fP\fB, NCURSES_SCREEN_CB \fP\fIfunc\fP\fB, void *\fP\fIdata\fP\fB);\fP -.br -\fBint use_window(WINDOW *\fP\fIwin\fP\fB, NCURSES_WINDOW_CB \fP\fIfunc\fP\fB, void *\fP\fIdata\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fI/* data types */ +\fBtypedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); +\fBtypedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); +.PP +\fBint get_escdelay(void); +\fBint set_escdelay(int \fIms\fP); +\fBint set_tabsize(int \fIcols\fP); +.PP +\fBint use_screen(SCREEN *\fIscr\fP, NCURSES_SCREEN_CB \fIfunc\fP, void *\fIdata\fP); +\fBint use_window(WINDOW *\fIwin\fP, NCURSES_WINDOW_CB \fIfunc\fP, void *\fIdata\fP); +.fi .SH DESCRIPTION -This implementation can be configured to provide rudimentary support -for multi-threaded applications. -This makes a different set of libraries, e.g., \fBlibncursest\fP since -the binary interfaces are different. +The \fI\%ncurses\fP library can be configured to support multi-threaded +applications in a rudimentary way. +Such configuration produces a different set of libraries, +named \fIlibncursest\fP, +for example, +since doing so alters \fI\%ncurses\fP's application binary interface +(ABI). .PP -Rather than modify the interfaces to pass a thread specifier to -each function, it adds a few functions which can be used in any -configuration which hide the mutex's needed to prevent concurrent -use of the global variables when configured for threading. +Instead of modifying the programming interface (API) to make +\fI\%ncurses\fP functions expect an additional argument specifying a +thread, +the library adds functions, +usable in any configuration, +that hide the \fImutexes\fP +(mutual exclusion locks) +needed to prevent concurrent access to variables shared by multiple +threads of execution. .PP -In addition to forcing access to members of the \fBWINDOW\fP structure -to be via functions (see \fBcurs_opaque\fP(3X)), -it makes functions of the common global variables, -e.g., -COLORS, -COLOR_PAIRS, -COLS, -ESCDELAY, -LINES, -TABSIZE -curscr, -newscr and -ttytype. -Those variables are maintained as read-only values, stored in the \fBSCREEN\fP -structure. +\fI\%ncurses\fP threading support requires the use of functions to +access members of the \fI\%WINDOW\fP structure (see +\fBcurs_opaque\fP(3X)). +It further makes functions of the common global variables +\fB\%COLORS\fP, +\fB\%COLOR_PAIRS\fP, +\fB\%COLS\fP, +\fB\%ESCDELAY\fP, +\fB\%LINES\fP, +\fB\%TABSIZE\fP, +\fB\%curscr\fP, +\fB\%newscr\fP, +and +\fB\%ttytype\fP, +maintaining them as as read-only values in the \fISCREEN\fP structure. .PP -Even this is not enough to make a thread-safe application using curses. -A multi-threaded application would be expected to have threads updating -separate windows (within the same device), -or updating on separate screens (on different devices). -Also, a few of the global variables are considered writable by some -applications. +Even this is not enough to make an application using \fIcurses\fP +thread-safe. +We would expect a multi-threaded application to have threads updating +separate windows (on the same device), +and separate screens (on different devices). +Further, +applications expect a few of the global variables to be writable. The functions described here address these special situations. .PP -The ESCDELAY and TABSIZE global variables are modified by some applications. +The \fB\%ESCDELAY\fP and \fB\%TABSIZE\fP global variables are modified +by some applications. To modify them in any configuration, -use the \fBset_escdelay\fP or \fBset_tabsize\fP functions. +use the \fB\%set_escdelay\fP or \fB\%set_tabsize\fP functions. Other global variables are not modifiable. +\fBget_escdelay\fP retrieves \fB\%ESCDELAY\fP's value. .PP -The \fBget_escdelay\fP function returns the value for ESCDELAY. -.PP -The \fBuse_window\fP and \fBuse_screen\fP functions provide coarse -granularity mutexes for their respective \fBWINDOW\fP and \fBSCREEN\fP -parameters, and call a user-supplied function, -passing it a \fIdata\fP parameter, -and returning the value from the user-supplied function to the application. +The \fBuse_window\fP and \fBuse_screen\fP functions provide +coarse-grained mutexes for their respective \fI\%WINDOW\fP and +\fISCREEN\fP parameters; +they call a user-supplied function, +pass it a \fIdata\fP parameter, +and return the value from the user-supplied function to the application. .\" *************************************************************************** -.SS USAGE -All of the ncurses library functions assume that the locale is not +.SS Usage +All \fI\%ncurses\fP library functions assume that the locale is not altered during operation. In addition, -they use data which is maintained within a hierarchy of scopes. -.RS 3 +they use data that is maintained within a hierarchy of scopes. .bP -global data, e.g., used in the low-level terminfo or termcap interfaces. +global data used in the low-level \fIterminfo\fP or \fItermcap\fP +interfaces .bP -terminal data, e.g., associated with a call to \fBset_curterm\fP. -The terminal data are initialized when screens are created. +terminal data associated with a call to \fBset_curterm\fP(3X) +.IP +Terminal data are initialized when screens are created. .bP -screen data, e.g., associated with a call to \fBnewterm\fP or \fBinitscr\fP. +screen data associated with a call to \fBnewterm\fP(3X) or +\fBinitscr\fP(3X) .bP -window data, e.g., associated with a call to \fBnewwin\fP or \fBsubwin\fP. +window data associated with a call to \fBnewwin\fP(3X) or +\fBsubwin\fP(3X) +.IP Windows are associated with screens. -Pads are not necessarily associated with a particular screen. +Pads are not necessarily associated with any particular screen. .IP -Most curses applications operate on one or more windows within a single screen. +Most \fIcurses\fP applications operate on one or more windows within a +single screen. .bP -reentrant, i.e., it uses only the data passed as parameters. -.RE +reentrant data associated with \*(``pure\*('' functions that alter no +shared variables +.PP +The following table lists the scope of each symbol in the +\fI\%ncurses\fP library when configured to support multi-threaded +applications. .PP -This table lists the scope of data used for each symbol in the -ncurses library when it is configured to support threading: .TS -center tab(/); -l l -l l . -Symbol/Scope -= -BC/global -COLORS/screen (readonly) -COLOR_PAIR/reentrant -COLOR_PAIRS/screen (readonly) -COLS/screen (readonly) -ESCDELAY/screen (readonly, see \fBset_escdelay\fP) -LINES/screen (readonly) -PAIR_NUMBER/reentrant -PC/global -SP/global -TABSIZE/screen (readonly) -UP/global -acs_map/screen (readonly) -add_wch/window (stdscr) -add_wchnstr/window (stdscr) -add_wchstr/window (stdscr) -addch/window (stdscr) -addchnstr/window (stdscr) -addchstr/window (stdscr) -addnstr/window (stdscr) -addnwstr/window (stdscr) -addstr/window (stdscr) -addwstr/window (stdscr) -assume_default_colors/screen -attr_get/window (stdscr) -attr_off/window (stdscr) -attr_on/window (stdscr) -attr_set/window (stdscr) -attroff/window (stdscr) -attron/window (stdscr) -attrset/window (stdscr) -baudrate/screen -beep/screen -bkgd/window (stdscr) -bkgdset/window (stdscr) -bkgrnd/window (stdscr) -bkgrndset/window (stdscr) -boolcodes/global (readonly) -boolfnames/global (readonly) -boolnames/global (readonly) -border/window (stdscr) -border_set/window (stdscr) -box/window (stdscr) -box_set/window (stdscr) -can_change_color/terminal -cbreak/screen -chgat/window (stdscr) -clear/window (stdscr) -clearok/window -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) -curses_version/global (readonly) -def_prog_mode/terminal -def_shell_mode/terminal -define_key/screen -del_curterm/screen -delay_output/screen -delch/window (stdscr) -deleteln/window (stdscr) -delscreen/global locks(screenlist, screen) -delwin/global locks(windowlist) -derwin/screen -doupdate/screen -dupwin/screen locks(window) -echo/screen -echo_wchar/window (stdscr) -echochar/window (stdscr) -endwin/screen -erase/window (stdscr) -erasechar/window (stdscr) -erasewchar/window (stdscr) -filter/global -flash/terminal -flushinp/screen -get_wch/screen (input-operation) -get_wstr/screen (input-operation) -getattrs/window -getbegx/window -getbegy/window -getbkgd/window -getbkgrnd/window -getcchar/reentrant -getch/screen (input-operation) -getcurx/window -getcury/window -getmaxx/window -getmaxy/window -getmouse/screen (input-operation) -getn_wstr/screen (input-operation) -getnstr/screen (input-operation) -getparx/window -getpary/window -getstr/screen (input-operation) -getwin/screen (input-operation) -halfdelay/screen -has_colors/terminal -has_ic/terminal -has_il/terminal -has_key/screen -hline/window (stdscr) -hline_set/window (stdscr) -idcok/window -idlok/window -immedok/window -in_wch/window (stdscr) -in_wchnstr/window (stdscr) -in_wchstr/window (stdscr) -inch/window (stdscr) -inchnstr/window (stdscr) -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) -ins_wstr/window (stdscr) -insch/window (stdscr) -insdelln/window (stdscr) -insertln/window (stdscr) -insnstr/window (stdscr) -insstr/window (stdscr) -instr/window (stdscr) -intrflush/terminal -inwstr/window (stdscr) -is_cleared/window -is_idcok/window -is_idlok/window -is_immedok/window -is_keypad/window -is_leaveok/window -is_linetouched/window -is_nodelay/window -is_notimeout/window -is_scrollok/window -is_syncok/window -is_term_resized/terminal -is_wintouched/window -isendwin/screen -key_defined/screen -key_name/global (static data) -keybound/screen -keyname/global (static data) -keyok/screen -keypad/window -killchar/terminal -killwchar/terminal -leaveok/window -longname/screen -mcprint/terminal -meta/screen -mouse_trafo/window (stdscr) -mouseinterval/screen -mousemask/screen -move/window (stdscr) -mvadd_wch/window (stdscr) -mvadd_wchnstr/window (stdscr) -mvadd_wchstr/window (stdscr) -mvaddch/window (stdscr) -mvaddchnstr/window (stdscr) -mvaddchstr/window (stdscr) -mvaddnstr/window (stdscr) -mvaddnwstr/window (stdscr) -mvaddstr/window (stdscr) -mvaddwstr/window (stdscr) -mvchgat/window (stdscr) -mvcur/screen -mvdelch/window (stdscr) -mvderwin/window (stdscr) -mvget_wch/screen (input-operation) -mvget_wstr/screen (input-operation) -mvgetch/screen (input-operation) -mvgetn_wstr/screen (input-operation) -mvgetnstr/screen (input-operation) -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) -mvinchstr/window (stdscr) -mvinnstr/window (stdscr) -mvinnwstr/window (stdscr) -mvins_nwstr/window (stdscr) -mvins_wch/window (stdscr) -mvins_wstr/window (stdscr) -mvinsch/window (stdscr) -mvinsnstr/window (stdscr) -mvinsstr/window (stdscr) -mvinstr/window (stdscr) -mvinwstr/window (stdscr) -mvprintw/window (stdscr) -mvscanw/screen -mvvline/window (stdscr) -mvvline_set/window (stdscr) -mvwadd_wch/window -mvwadd_wchnstr/window -mvwadd_wchstr/window -mvwaddch/window -mvwaddchnstr/window -mvwaddchstr/window -mvwaddnstr/window -mvwaddnwstr/window -mvwaddstr/window -mvwaddwstr/window -mvwchgat/window -mvwdelch/window -mvwget_wch/screen (input-operation) -mvwget_wstr/screen (input-operation) -mvwgetch/screen (input-operation) -mvwgetn_wstr/screen (input-operation) -mvwgetnstr/screen (input-operation) -mvwgetstr/screen (input-operation) -mvwhline/window -mvwhline_set/window -mvwin/window -mvwin_wch/window -mvwin_wchnstr/window -mvwin_wchstr/window -mvwinch/window -mvwinchnstr/window -mvwinchstr/window -mvwinnstr/window -mvwinnwstr/window -mvwins_nwstr/window -mvwins_wch/window -mvwins_wstr/window -mvwinsch/window -mvwinsnstr/window -mvwinsstr/window -mvwinstr/window -mvwinwstr/window -mvwprintw/window -mvwscanw/screen -mvwvline/window -mvwvline_set/window -napms/reentrant -newpad/global locks(windowlist) -newscr/screen (readonly) -newterm/global locks(screenlist) -newwin/global locks(windowlist) -nl/screen -nocbreak/screen -nodelay/window -noecho/screen -nofilter/global -nonl/screen -noqiflush/terminal -noraw/screen -notimeout/window -numcodes/global (readonly) -numfnames/global (readonly) -numnames/global (readonly) -ospeed/global -overlay/window locks(source, target) -overwrite/window locks(source, target) -pair_content/screen -pecho_wchar/screen -pechochar/screen -pnoutrefresh/screen -prefresh/screen -printw/window -putp/global -putwin/window -qiflush/terminal -raw/screen -redrawwin/window -refresh/screen -reset_prog_mode/screen -reset_shell_mode/screen -resetty/terminal -resize_term/screen locks(windowlist) -resizeterm/screen -restartterm/screen -ripoffline/global (static data) -savetty/terminal -scanw/screen -scr_dump/screen -scr_init/screen -scr_restore/screen -scr_set/screen -scrl/window (stdscr) -scroll/window -scrollok/window -set_curterm/screen -set_escdelay/screen -set_tabsize/screen -set_term/global locks(screenlist, screen) -setcchar/reentrant -setscrreg/window (stdscr) -setupterm/global -slk_attr/screen -slk_attr_off/screen -slk_attr_on/screen -slk_attr_set/screen -slk_attroff/screen -slk_attron/screen -slk_attrset/screen -slk_clear/screen -slk_color/screen -slk_init/screen -slk_label/screen -slk_noutrefresh/screen -slk_refresh/screen -slk_restore/screen -slk_set/screen -slk_touch/screen -slk_wset/screen -standend/window -standout/window -start_color/screen -stdscr/screen (readonly) -strcodes/global (readonly) -strfnames/global (readonly) -strnames/global (readonly) -subpad/window -subwin/window -syncok/window -term_attrs/screen -termattrs/screen -termname/terminal -tgetent/global -tgetflag/global -tgetnum/global -tgetstr/global -tgoto/global -tigetflag/terminal -tigetnum/terminal -tigetstr/terminal -timeout/window (stdscr) -touchline/window -touchwin/window -tparm/global (static data) -tputs/screen -trace/global (static data) -ttytype/screen (readonly) -typeahead/screen -unctrl/screen -unget_wch/screen (input-operation) -ungetch/screen (input-operation) -ungetmouse/screen (input-operation) -untouchwin/window -use_default_colors/screen -use_env/global (static data) -use_extended_names/global (static data) -use_legacy_coding/screen -use_screen/global locks(screenlist, screen) -use_window/global locks(windowlist, window) -vid_attr/screen -vid_puts/screen -vidattr/screen -vidputs/screen -vline/window (stdscr) -vline_set/window (stdscr) -vw_printw/window -vw_scanw/screen -vwprintw/window -vwscanw/screen -wadd_wch/window -wadd_wchnstr/window -wadd_wchstr/window -waddch/window -waddchnstr/window -waddchstr/window -waddnstr/window -waddnwstr/window -waddstr/window -waddwstr/window -wattr_get/window -wattr_off/window -wattr_on/window -wattr_set/window -wattroff/window -wattron/window -wattrset/window -wbkgd/window -wbkgdset/window -wbkgrnd/window -wbkgrndset/window -wborder/window -wborder_set/window -wchgat/window -wclear/window -wclrtobot/window -wclrtoeol/window -wcolor_set/window -wcursyncup/screen (affects window plus parents) -wdelch/window -wdeleteln/window -wecho_wchar/window -wechochar/window -wenclose/window -werase/window -wget_wch/screen (input-operation) -wget_wstr/screen (input-operation) -wgetbkgrnd/window -wgetch/screen (input-operation) -wgetdelay/window -wgetn_wstr/screen (input-operation) -wgetnstr/screen (input-operation) -wgetparent/window -wgetscrreg/window -wgetstr/screen (input-operation) -whline/window -whline_set/window -win_wch/window -win_wchnstr/window -win_wchstr/window -winch/window -winchnstr/window -winchstr/window -winnstr/window -winnwstr/window -wins_nwstr/window -wins_wch/window -wins_wstr/window -winsch/window -winsdelln/window -winsertln/window -winsnstr/window -winsstr/window -winstr/window -winwstr/window -wmouse_trafo/window -wmove/window -wnoutrefresh/screen -wprintw/window -wredrawln/window -wrefresh/screen -wresize/window locks(windowlist) -wscanw/screen -wscrl/window -wsetscrreg/window -wstandend/window -wstandout/window -wsyncdown/screen (affects window plus parents) -wsyncup/screen (affects window plus parents) -wtimeout/window -wtouchln/window -wunctrl/global (static data) -wvline/window -wvline_set/window +center; +Lb2 Lb +Lb2 Lx. +Symbol Scope +_ +BC global +COLORS screen (read-only) +COLOR_PAIR reentrant +COLOR_PAIRS screen (read-only) +COLS screen (read-only) +ESCDELAY screen (read-only; see \fBset_escdelay\fP) +LINES screen (read-only) +PAIR_NUMBER reentrant +PC global +SP global +TABSIZE screen (read-only; see \fBset_tabsize\fP) +UP global +acs_map screen (read-only) +add_wch window (\fBstdscr\fP) +add_wchnstr window (\fBstdscr\fP) +add_wchstr window (\fBstdscr\fP) +addch window (\fBstdscr\fP) +addchnstr window (\fBstdscr\fP) +addchstr window (\fBstdscr\fP) +addnstr window (\fBstdscr\fP) +addnwstr window (\fBstdscr\fP) +addstr window (\fBstdscr\fP) +addwstr window (\fBstdscr\fP) +assume_default_colors screen +attr_get window (\fBstdscr\fP) +attr_off window (\fBstdscr\fP) +attr_on window (\fBstdscr\fP) +attr_set window (\fBstdscr\fP) +attroff window (\fBstdscr\fP) +attron window (\fBstdscr\fP) +attrset window (\fBstdscr\fP) +baudrate screen +beep screen +bkgd window (\fBstdscr\fP) +bkgdset window (\fBstdscr\fP) +bkgrnd window (\fBstdscr\fP) +bkgrndset window (\fBstdscr\fP) +boolcodes global (read-only) +boolfnames global (read-only) +boolnames global (read-only) +border window (\fBstdscr\fP) +border_set window (\fBstdscr\fP) +box window (\fBstdscr\fP) +box_set window (\fBstdscr\fP) +can_change_color terminal +cbreak screen +chgat window (\fBstdscr\fP) +clear window (\fBstdscr\fP) +clearok window +clrtobot window (\fBstdscr\fP) +clrtoeol window (\fBstdscr\fP) +color_content screen +color_set window (\fBstdscr\fP) +copywin window (locks source, target) +cur_term terminal +curs_set screen +curscr screen (read-only) +curses_version global (read-only) +def_prog_mode terminal +def_shell_mode terminal +define_key screen +del_curterm screen +delay_output screen +delch window (\fBstdscr\fP) +deleteln window (\fBstdscr\fP) +delscreen global (locks screen list, screen) +delwin global (locks window list) +derwin screen +doupdate screen +dupwin screen (locks window) +echo screen +echo_wchar window (\fBstdscr\fP) +echochar window (\fBstdscr\fP) +endwin screen +erase window (\fBstdscr\fP) +erasechar window (\fBstdscr\fP) +erasewchar window (\fBstdscr\fP) +filter global +flash terminal +flushinp screen +get_wch screen (input operation) +get_wstr screen (input operation) +getattrs window +getbegx window +getbegy window +getbkgd window +getbkgrnd window +getcchar reentrant +getch screen (input operation) +getcurx window +getcury window +getmaxx window +getmaxy window +getmouse screen (input operation) +getn_wstr screen (input operation) +getnstr screen (input operation) +getparx window +getpary window +getstr screen (input operation) +getwin screen (input operation) +halfdelay screen +has_colors terminal +has_ic terminal +has_il terminal +has_key screen +hline window (\fBstdscr\fP) +hline_set window (\fBstdscr\fP) +idcok window +idlok window +immedok window +in_wch window (\fBstdscr\fP) +in_wchnstr window (\fBstdscr\fP) +in_wchstr window (\fBstdscr\fP) +inch window (\fBstdscr\fP) +inchnstr window (\fBstdscr\fP) +inchstr window (\fBstdscr\fP) +init_color screen +init_pair screen +initscr global (locks screen list) +innstr window (\fBstdscr\fP) +innwstr window (\fBstdscr\fP) +ins_nwstr window (\fBstdscr\fP) +ins_wch window (\fBstdscr\fP) +ins_wstr window (\fBstdscr\fP) +insch window (\fBstdscr\fP) +insdelln window (\fBstdscr\fP) +insertln window (\fBstdscr\fP) +insnstr window (\fBstdscr\fP) +insstr window (\fBstdscr\fP) +instr window (\fBstdscr\fP) +intrflush terminal +inwstr window (\fBstdscr\fP) +is_cleared window +is_idcok window +is_idlok window +is_immedok window +is_keypad window +is_leaveok window +is_linetouched window +is_nodelay window +is_notimeout window +is_scrollok window +is_syncok window +is_term_resized terminal +is_wintouched window +isendwin screen +key_defined screen +key_name global (static data) +keybound screen +keyname global (static data) +keyok screen +keypad window +killchar terminal +killwchar terminal +leaveok window +longname screen +mcprint terminal +meta screen +mouse_trafo window (\fBstdscr\fP) +mouseinterval screen +mousemask screen +move window (\fBstdscr\fP) +mvadd_wch window (\fBstdscr\fP) +mvadd_wchnstr window (\fBstdscr\fP) +mvadd_wchstr window (\fBstdscr\fP) +mvaddch window (\fBstdscr\fP) +mvaddchnstr window (\fBstdscr\fP) +mvaddchstr window (\fBstdscr\fP) +mvaddnstr window (\fBstdscr\fP) +mvaddnwstr window (\fBstdscr\fP) +mvaddstr window (\fBstdscr\fP) +mvaddwstr window (\fBstdscr\fP) +mvchgat window (\fBstdscr\fP) +mvcur screen +mvdelch window (\fBstdscr\fP) +mvderwin window (\fBstdscr\fP) +mvget_wch screen (input operation) +mvget_wstr screen (input operation) +mvgetch screen (input operation) +mvgetn_wstr screen (input operation) +mvgetnstr screen (input operation) +mvgetstr screen (input operation) +mvhline window (\fBstdscr\fP) +mvhline_set window (\fBstdscr\fP) +mvin_wch window (\fBstdscr\fP) +mvin_wchnstr window (\fBstdscr\fP) +mvin_wchstr window (\fBstdscr\fP) +mvinch window (\fBstdscr\fP) +mvinchnstr window (\fBstdscr\fP) +mvinchstr window (\fBstdscr\fP) +mvinnstr window (\fBstdscr\fP) +mvinnwstr window (\fBstdscr\fP) +mvins_nwstr window (\fBstdscr\fP) +mvins_wch window (\fBstdscr\fP) +mvins_wstr window (\fBstdscr\fP) +mvinsch window (\fBstdscr\fP) +mvinsnstr window (\fBstdscr\fP) +mvinsstr window (\fBstdscr\fP) +mvinstr window (\fBstdscr\fP) +mvinwstr window (\fBstdscr\fP) +mvprintw window (\fBstdscr\fP) +mvscanw screen +mvvline window (\fBstdscr\fP) +mvvline_set window (\fBstdscr\fP) +mvwadd_wch window +mvwadd_wchnstr window +mvwadd_wchstr window +mvwaddch window +mvwaddchnstr window +mvwaddchstr window +mvwaddnstr window +mvwaddnwstr window +mvwaddstr window +mvwaddwstr window +mvwchgat window +mvwdelch window +mvwget_wch screen (input operation) +mvwget_wstr screen (input operation) +mvwgetch screen (input operation) +mvwgetn_wstr screen (input operation) +mvwgetnstr screen (input operation) +mvwgetstr screen (input operation) +mvwhline window +mvwhline_set window +mvwin window +mvwin_wch window +mvwin_wchnstr window +mvwin_wchstr window +mvwinch window +mvwinchnstr window +mvwinchstr window +mvwinnstr window +mvwinnwstr window +mvwins_nwstr window +mvwins_wch window +mvwins_wstr window +mvwinsch window +mvwinsnstr window +mvwinsstr window +mvwinstr window +mvwinwstr window +mvwprintw window +mvwscanw screen +mvwvline window +mvwvline_set window +napms reentrant +newpad global (locks window list) +newscr screen (read-only) +newterm global (locks screen list) +newwin global (locks window list) +nl screen +nocbreak screen +nodelay window +noecho screen +nofilter global +nonl screen +noqiflush terminal +noraw screen +notimeout window +numcodes global (read-only) +numfnames global (read-only) +numnames global (read-only) +ospeed global +overlay window (locks source, target) +overwrite window (locks source, target) +pair_content screen +pecho_wchar screen +pechochar screen +pnoutrefresh screen +prefresh screen +printw window +putp global +putwin window +qiflush terminal +raw screen +redrawwin window +refresh screen +reset_prog_mode screen +reset_shell_mode screen +resetty terminal +resize_term screen (locks window list) +resizeterm screen +restartterm screen +ripoffline global (static data) +savetty terminal +scanw screen +scr_dump screen +scr_init screen +scr_restore screen +scr_set screen +scrl window (\fBstdscr\fP) +scroll window +scrollok window +set_curterm screen +set_escdelay screen +set_tabsize screen +set_term global (locks screen list, screen) +setcchar reentrant +setscrreg window (\fBstdscr\fP) +setupterm global +slk_attr screen +slk_attr_off screen +slk_attr_on screen +slk_attr_set screen +slk_attroff screen +slk_attron screen +slk_attrset screen +slk_clear screen +slk_color screen +slk_init screen +slk_label screen +slk_noutrefresh screen +slk_refresh screen +slk_restore screen +slk_set screen +slk_touch screen +slk_wset screen +standend window +standout window +start_color screen +\fBstdscr\fP screen (read-only) +strcodes global (read-only) +strfnames global (read-only) +strnames global (read-only) +subpad window +subwin window +syncok window +term_attrs screen +termattrs screen +termname terminal +tgetent global +tgetflag global +tgetnum global +tgetstr global +tgoto global +tigetflag terminal +tigetnum terminal +tigetstr terminal +timeout window (\fBstdscr\fP) +touchline window +touchwin window +tparm global (static data) +tputs screen +trace global (static data) +ttytype screen (read-only) +typeahead screen +unctrl screen +unget_wch screen (input operation) +ungetch screen (input operation) +ungetmouse screen (input operation) +untouchwin window +use_default_colors screen +use_env global (static data) +use_extended_names global (static data) +use_legacy_coding screen +use_screen global (locks screen list, screen) +use_window global (locks window list, window) +vid_attr screen +vid_puts screen +vidattr screen +vidputs screen +vline window (\fBstdscr\fP) +vline_set window (\fBstdscr\fP) +vw_printw window +vw_scanw screen +vwprintw window +vwscanw screen +wadd_wch window +wadd_wchnstr window +wadd_wchstr window +waddch window +waddchnstr window +waddchstr window +waddnstr window +waddnwstr window +waddstr window +waddwstr window +wattr_get window +wattr_off window +wattr_on window +wattr_set window +wattroff window +wattron window +wattrset window +wbkgd window +wbkgdset window +wbkgrnd window +wbkgrndset window +wborder window +wborder_set window +wchgat window +wclear window +wclrtobot window +wclrtoeol window +wcolor_set window +wcursyncup screen (affects window plus parents) +wdelch window +wdeleteln window +wecho_wchar window +wechochar window +wenclose window +werase window +wget_wch screen (input operation) +wget_wstr screen (input operation) +wgetbkgrnd window +wgetch screen (input operation) +wgetdelay window +wgetn_wstr screen (input operation) +wgetnstr screen (input operation) +wgetparent window +wgetscrreg window +wgetstr screen (input operation) +whline window +whline_set window +win_wch window +win_wchnstr window +win_wchstr window +winch window +winchnstr window +winchstr window +winnstr window +winnwstr window +wins_nwstr window +wins_wch window +wins_wstr window +winsch window +winsdelln window +winsertln window +winsnstr window +winsstr window +winstr window +winwstr window +wmouse_trafo window +wmove window +wnoutrefresh screen +wprintw window +wredrawln window +wrefresh screen +wresize window (locks window list) +wscanw screen +wscrl window +wsetscrreg window +wstandend window +wstandout window +wsyncdown screen (affects window plus parents) +wsyncup screen (affects window plus parents) +wtimeout window +wtouchln window +wunctrl global (static data) +wvline window +wvline_set window .TE .\" *************************************************************************** .SH RETURN VALUE -These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted. +\fB\%get_escdelay\fP returns the value of \fB\%ESCDELAY\fP. +\fB\%set_escdelay\fP and \fB\%set_tabsize\fP return \fBERR\fP upon +failure and \fBOK\fP upon successful completion. +\fB\%use_screen\fP and \fB\%use_window\fP return the \fIint\fP returned +by the user-supplied function they are called with. .SH NOTES -Both a macro and a function are provided for each name. +\fI\%ncurses\fP provides both a C function and a preprocessor macro for +each function documented in this page. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. -It is recommended that any code depending on ncurses extensions -be conditioned using NCURSES_VERSION. +It is recommended that any code depending on \fI\%ncurses\fP extensions +be conditioned using \fB\%NCURSES_VERSION\fP. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_opaque\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_opaque\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_touch.3x b/man/curs_touch.3x index 2a7f5200..613b6958 100644 --- a/man/curs_touch.3x +++ b/man/curs_touch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,36 +27,32 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_touch.3x,v 1.25 2021/12/25 17:39:16 tom Exp $ -.TH curs_touch 3X "" -.na -.hy 0 +.\" $Id: curs_touch.3x,v 1.47 2024/04/20 21:20:07 tom Exp $ +.TH curs_touch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBtouchwin\fP, -\fBtouchline\fP, -\fBuntouchwin\fP, -\fBwtouchln\fP, -\fBis_linetouched\fP, -\fBis_wintouched\fP \- \fBcurses\fP refresh control routines -.ad -.hy +\fB\%touchwin\fP, +\fB\%touchline\fP, +\fB\%untouchwin\fP, +\fB\%wtouchln\fP, +\fB\%is_linetouched\fP, +\fB\%is_wintouched\fP \- +control terminal output refresh in a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint touchline(WINDOW *\fP\fIwin\fP\fB, int \fP\fIstart\fP\fB, int \fP\fIcount\fP\fB);\fP -.sp -\fBint touchwin(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint wtouchln(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIn\fP\fB, int \fP\fIchanged\fP\fB);\fP -.sp -\fBint untouchwin(WINDOW *\fP\fIwin\fP\fB);\fP -.sp -\fBbool is_linetouched(WINDOW *\fP\fIwin\fP\fB, int \fP\fIline\fP\fB);\fP -.br -\fBbool is_wintouched(WINDOW *\fP\fIwin\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint touchline(WINDOW *\fIwin\fP, int \fIstart\fP, int \fIcount\fP); +.PP +\fBint touchwin(WINDOW *\fIwin\fP); +\fBint wtouchln(WINDOW *\fIwin\fP, int \fIy\fP, int \fIn\fP, int \fIchanged\fP); +.PP +\fBint untouchwin(WINDOW *\fIwin\fP); +.PP +\fBbool is_linetouched(WINDOW *\fIwin\fP, int \fIline\fP); +\fBbool is_wintouched(WINDOW *\fIwin\fP); +.fi .SH DESCRIPTION -The \fBtouchwin\fP and \fBtouchline\fP routines throw away all +The \fB\%touchwin\fP and \fB\%touchline\fP routines throw away all optimization information about which parts of the window have been touched, by pretending that the entire window has been drawn on. This @@ -64,35 +60,35 @@ is sometimes necessary when using overlapping windows, since a change to one window affects the other window, but the records of which lines have been changed in the other window do not reflect the change. The -routine \fBtouchline\fP only pretends that \fIcount\fP lines have been +routine \fB\%touchline\fP only pretends that \fIcount\fP lines have been changed, beginning with line \fIstart\fP. .PP -The \fBuntouchwin\fP routine marks all lines in the window as unchanged since -the last call to \fBwrefresh\fP. +The \fB\%untouchwin\fP routine marks all lines in the window as unchanged since +the last call to \fB\%wrefresh\fP. .PP -The \fBwtouchln\fP routine makes \fIn\fP lines in the window, starting -at line \fIy\fP, look as if they have (\fIchanged\fP\fB=1\fP) or have -not (\fIchanged\fP\fB=0\fP) been changed since the last call to -\fBwrefresh\fP. +The \fB\%wtouchln\fP routine makes \fIn\fP lines in the window, starting +at line \fIy\fR, look as if they have (\fIchanged\fB=1\fR) or have +not (\fIchanged\fB=0\fR) been changed since the last call to +\fB\%wrefresh\fP. .PP -The \fBis_linetouched\fP and \fBis_wintouched\fP routines return +The \fB\%is_linetouched\fP and \fB\%is_wintouched\fP routines return \fBTRUE\fP if the specified line/window was modified since the last -call to \fBwrefresh\fP; otherwise they return \fBFALSE\fP. In -addition, \fBis_linetouched\fP returns \fBERR\fP if \fIline\fP is not +call to \fB\%wrefresh\fP; otherwise they return \fBFALSE\fP. In +addition, \fB\%is_linetouched\fP returns \fBERR\fP if \fIline\fP is not valid for the given window. .SH RETURN VALUE All routines return the integer \fBERR\fP upon failure and an integer value other than \fBERR\fP upon successful completion, unless otherwise noted in the preceding routine descriptions. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. In this implementation .RS 3 .TP 5 \fBis_linetouched\fP returns an error if the window pointer is null, or -if the line number is outside the window. +if the line number is outside the window boundaries. .IP The constant \fBERR\fP is distinct from \fBTRUE\fP and \fBFALSE\fP, which are the normal return values of this function. @@ -101,29 +97,28 @@ returning \fBERR\fP (which is neither \fBTRUE\fP nor \fBFALSE\fP) may not be supported by the compiler. .IP To provide error-checking and also match the X/Open function prototype, -the \fBERR\fP is provided by a macro named \fBis_linetouched\fP. +the \fBERR\fP is provided by a macro named \fB\%is_linetouched\fP. The actual function returns \fBFALSE\fP when it detects an error. .TP 5 \fBwtouchln\fP returns an error if the window pointer is null, or -if the line number is outside the window. +if the line number is outside the window boundaries. .RE +.SH NOTES +All of these routines except \fB\%wtouchln\fP may be macros. .SH PORTABILITY -.PP These functions were introduced by SVr4. -The Solaris curses header file, +The Solaris \fIcurses\fP header file, for instance, defines both an actual function and macro for each. The macros give the same result as the actual functions. -SVr4 curses does not check the window parameter \fIwin\fP to ensure +SVr4 \fIcurses\fP does not check the window parameter \fIwin\fP to ensure that it is not \fBNULL\fP; otherwise this implementation behaves the same as SVr4. .PP -The XSI Curses standard, Issue 4 describes these functions, +X/Open Curses, Issue 4 describes these functions, but defines no error conditions. -.SH NOTES -All of these routines except \fBwtouchln\fP may be macros. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_variables\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/curs_trace.3x b/man/curs_trace.3x index ee9f1947..ddae7911 100644 --- a/man/curs_trace.3x +++ b/man/curs_trace.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2000-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,67 +27,76 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_trace.3x,v 1.24 2021/12/25 21:41:58 tom Exp $ -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_trace.3x,v 1.50 2024/04/20 21:24:19 tom Exp $ +.TH curs_trace 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH curs_trace 3X "" +. +.de dS \" Start unfilled display. +.nr aD \n(.j .na -.hy 0 +.. +. +.de dE \" End unfilled display. +.ad \n(.j +.rr aD +.. +. .SH NAME -\fBcurses_trace\fP, -\fBtrace\fP, -\fB_tracef\fP, -\fB_traceattr\fP, -\fB_traceattr2\fP, -\fB_tracecchar_t\fP, -\fB_tracecchar_t2\fP, -\fB_tracechar\fP, -\fB_tracechtype\fP, -\fB_tracechtype2\fP, -\fB_nc_tracebits\fP, -\fB_tracedump\fP, -\fB_tracemouse\fP \- \fBcurses\fP debugging routines -.ad -.hy +\fB\%curses_trace\fP, +\fB\%trace\fP, +\fB\%_tracef\fP, +\fB\%_traceattr\fP, +\fB\%_traceattr2\fP, +\fB\%_tracecchar_t\fP, +\fB\%_tracecchar_t2\fP, +\fB\%_tracechar\fP, +\fB\%_tracechtype\fP, +\fB\%_tracechtype2\fP, +\fB\%_nc_tracebits\fP, +\fB\%_tracedump\fP, +\fB\%_tracemouse\fP \- +\fIcurses\fR debugging routines .SH SYNOPSIS -\fB#include \fP -.sp -\fBunsigned curses_trace(const unsigned \fP\fIparam\fP\fB);\fP -.sp -\fBvoid _tracef(const char *\fP\fIformat\fP\fB, ...);\fP -.sp -\fBchar *_traceattr(attr_t \fP\fIattr\fP\fB);\fP -.br -\fBchar *_traceattr2(int \fP\fIbuffer\fP\fB, chtype \fP\fIch\fP\fB);\fP -.br -\fBchar *_tracecchar_t(const cchar_t *\fP\fIstring\fP\fB);\fP -.br -\fBchar *_tracecchar_t2(int \fP\fIbuffer\fP\fB, const cchar_t *\fP\fIstring\fP\fB);\fP -.br -\fBchar *_tracechar(int \fP\fIch\fP\fB);\fP -.br -\fBchar *_tracechtype(chtype \fP\fIch\fP\fB);\fP -.br -\fBchar *_tracechtype2(int \fP\fIbuffer\fP\fB, chtype \fP\fIch\fP\fB);\fP -.sp -\fBvoid _tracedump(const char *\fP\fIlabel\fP\fB, WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBchar *_nc_tracebits(void);\fP -.br -\fBchar *_tracemouse(const MEVENT *\fP\fIevent\fP\fB);\fP -.sp -/* deprecated */ -.br -\fBvoid trace(const unsigned int \fP\fIparam\fP\fB);\fP +.nf +\fB#include +.PP +\fBunsigned curses_trace(const unsigned \fItrace-mask\fP); +.PP +\fBvoid _tracef(const char *\fIformat\fP, ...); +.PP +\fBchar *_traceattr(attr_t \fIattr\fP); +\fBchar *_traceattr2(int \fIbuffer\fP, chtype \fIch\fP); +\fBchar *_tracecchar_t(const cchar_t *\fIstring\fP); +\fBchar *_tracecchar_t2(int \fIbuffer\fP, const cchar_t *\fIstring\fP); +\fBchar *_tracechar(int \fIc\fP); +\fBchar *_tracechtype(chtype \fIch\fP); +\fBchar *_tracechtype2(int \fIbuffer\fP, chtype \fIch\fP); +.PP +\fBvoid _tracedump(const char *\fIlabel\fP, WINDOW *\fIwin\fP); +\fBchar *_nc_tracebits(void); +\fBchar *_tracemouse(const MEVENT *\fIevent\fP); +.PP +\fI/* deprecated */\fP +\fBvoid trace(const unsigned int \fItrace-mask\fP); +.fi .SH DESCRIPTION -The \fIcurses trace\fP routines are used for debugging the ncurses libraries, -as well as applications which use the ncurses libraries. +The \fIcurses trace\fP routines are used for debugging the +\fI\%ncurses\fP libraries, +as well as applications which use the \fI\%ncurses\fP libraries. Some limitations apply: .bP Aside from \fBcurses_trace\fP, @@ -125,13 +134,13 @@ updates the trace mask, and returns the previous trace mask. .IP When the trace mask is nonzero, -ncurses creates the file \*(``trace\*('' in the current directory for output. +\fI\%ncurses\fP creates the file \*(``trace\*('' in the current directory for output. If the file already exists, no tracing is done. .bP If tracing is not available, \fBcurses_trace\fP returns zero (0). -.SS Trace Parameter +.SS "Trace Parameter" The trace parameter is formed by OR'ing -values from the list of \fBTRACE_\fP\fIxxx\fP definitions in \fB\fP. +values from the list of \fBTRACE_\fIxxx\fR definitions in \fB\fR. These include: .TP 5 .B TRACE_DISABLE @@ -194,31 +203,7 @@ Some tracing features are enabled whenever the \fBcurses_trace\fP parameter is nonzero. Some features overlap. The specific names are used as a guideline. -.SS Initialization -These functions check the \fBNCURSES_TRACE\fP environment variable, -to set the tracing feature as if \fBcurses_trace\fP was called: -.RS 4 -.PP -.na -.hy 0 -filter, -initscr, -new_prescr, -newterm, -nofilter, -restartterm, -ripoffline, -setupterm, -slk_init, -tgetent, -use_env, -use_extended_names, -use_tioctl -.hy -.ad -.RE -.SS Command-line Utilities -.PP +.SS "Command-line Utilities" The command-line utilities such as \fBtic\fP(1) provide a verbose option which extends the set of messages written using the \fBcurses_trace\fP function. Both of these (\fB\-v\fP and \fBcurses_trace\fP) @@ -228,22 +213,47 @@ which determines the messages which are written. Because the command-line utilities may call initialization functions such as \fBsetupterm\fP, \fBtgetent\fP or \fBuse_extended_names\fP, some of their debugging output may be directed to the \fItrace\fP file -if the \fBNCURSES_TRACE\fP environment variable is set: +if the \fI\%NCURSES_TRACE\fP environment variable is set: .bP messages produced in the utility are written to the standard error. .bP messages produced by the underlying library are written to \fItrace\fP. .PP -If ncurses is built without tracing, none of the latter are produced, +If \fI\%ncurses\fP is built without tracing, +none of the latter are produced, and fewer diagnostics are provided by the command-line utilities. .SH RETURN VALUE Routines which return a value are designed to be used as parameters to the \fB_tracef\fP routine. +.SH ENVIRONMENT +.SS NCURSES_TRACE +A positive integral value stored in this variable causes the following +functions to enable the tracing feature as if +.B \%curses_trace +were called. +.PP +.dS +.RS 4 +\fB\%filter\fP, +\fB\%initscr\fP, +\fB\%new_prescr\fP, +\fB\%newterm\fP, +\fB\%nofilter\fP, +\fB\%restartterm\fP, +\fB\%ripoffline\fP, +\fB\%setupterm\fP, +\fB\%slk_init\fP, +\fB\%tgetent\fP, +\fB\%use_env\fP, +\fB\%use_extended_names\fP, +\fB\%use_tioctl\fP +.RE +.dE .SH PORTABILITY -These functions are not part of the XSI interface. +These functions are not part of the X/Open Curses interface. Some other curses implementations are known to have similar features, -but they are not compatible with ncurses: +but they are not compatible with \fI\%ncurses\fP: .bP SVr4 provided \fBtraceon\fP and \fBtraceoff\fP, to control whether debugging information was written @@ -262,21 +272,22 @@ only when a debug-library is built. .IP PDCurses has a short description of these functions, with a note that they are not present in X/Open Curses, -ncurses or NetBSD. +\fI\%ncurses\fP or NetBSD. It does not mention SVr4, but the functions' inclusion in a header file section labeled \*(``Quasi-standard\*('' hints at the origin. .bP NetBSD does not provide functions for enabling/disabling traces. It uses environment variables -\fBCURSES_TRACE_MASK\fP and -\fBCURSES_TRACE_FILE\fP to determine what is traced, +\fI\%CURSES_TRACE_MASK\fP and +\fI\%CURSES_TRACE_FILE\fP to determine what is traced, and where the results are written. This is available only when a debug-library is built. .IP The NetBSD tracing feature is undocumented. .PP -A few ncurses functions are not provided when symbol versioning is used: +A few \fI\%ncurses\fP functions are not provided when symbol versioning +is used: .RS 4 .PP _nc_tracebits, @@ -287,4 +298,4 @@ _tracemouse The original \fBtrace\fP routine was deprecated because it often conflicted with application names. .SH SEE ALSO -\fBcurses\fP(3X). +\fB\%curses\fP(3X) diff --git a/man/curs_util.3x b/man/curs_util.3x index 931a2766..1df0a1d3 100644 --- a/man/curs_util.3x +++ b/man/curs_util.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,102 +28,114 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_util.3x,v 1.64 2021/12/25 22:05:53 tom Exp $ -.TH curs_util 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_util.3x,v 1.101 2024/04/20 21:20:07 tom Exp $ +.TH curs_util 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBdelay_output\fP, -\fBfilter\fP, -\fBflushinp\fP, -\fBgetwin\fP, -\fBkey_name\fP, -\fBkeyname\fP, -\fBnofilter\fP, -\fBputwin\fP, -\fBunctrl\fP, -\fBuse_env\fP, -\fBuse_tioctl\fP, -\fBwunctrl\fP \- miscellaneous \fBcurses\fP utility routines -.ad -.hy +\fB\%delay_output\fP, +\fB\%filter\fP, +\fB\%flushinp\fP, +\fB\%getwin\fP, +\fB\%key_name\fP, +\fB\%keyname\fP, +\fB\%nofilter\fP, +\fB\%putwin\fP, +\fB\%unctrl\fP, +\fB\%use_env\fP, +\fB\%use_tioctl\fP, +\fB\%wunctrl\fP \- +miscellaneous \fIcurses\fR utility routines .SH SYNOPSIS -\fB#include \fP -.sp -\fBconst char *unctrl(chtype \fP\fIc\fP\fB);\fP -.br -\fBwchar_t *wunctrl(cchar_t *\fP\fIc\fP\fB);\fP -.sp -\fBconst char *keyname(int \fP\fIc\fP\fB);\fP -.br -\fBconst char *key_name(wchar_t \fP\fIw\fP\fB);\fP -.sp -\fBvoid filter(void);\fP -.br -\fBvoid nofilter(void);\fP -.sp -\fBvoid use_env(bool \fP\fIf\fP\fB);\fP -.br -\fBvoid use_tioctl(bool \fP\fIf\fP\fB);\fP -.sp -\fBint putwin(WINDOW *\fP\fIwin\fP\fB, FILE *\fP\fIfilep\fP\fB);\fP -.br -\fBWINDOW *getwin(FILE *\fP\fIfilep\fP\fB);\fP -.sp -\fBint delay_output(int \fP\fIms\fP\fB);\fP -.br -\fBint flushinp(void);\fP -.br +.nf +\fB#include +.PP +\fBconst char *unctrl(chtype \fIch\fP); +\fBwchar_t *wunctrl(cchar_t *\fIwch\fP); +.PP +\fBconst char *keyname(int \fIc\fP); +\fBconst char *key_name(wchar_t \fIwc\fP); +.PP +\fBvoid filter(void); +.PP +\fBvoid use_env(bool \fIf\fP); +.PP +\fBint putwin(WINDOW *\fIwin\fP, FILE *\fIfilep\fP); +\fBWINDOW *getwin(FILE *\fIfilep\fP); +.PP +\fBint delay_output(int \fIms\fP); +\fBint flushinp(void); +.PP +\fI/* extensions */ +\fBvoid nofilter(void); +\fBvoid use_tioctl(bool \fIf\fP); +.fi .SH DESCRIPTION .SS unctrl -.PP The \fBunctrl\fP routine returns a character string which is a printable -representation of the character \fIc\fP, ignoring attributes. -Control characters are displayed in the \fB^\fP\fIX\fP notation. -Printing characters are displayed as is. -The corresponding \fBwunctrl\fP returns a printable representation of -a wide character. -.SS keyname/key_name -.PP -The \fBkeyname\fP routine returns a character string -corresponding to the key \fIc\fP: +representation of the character \fIch\fP: .bP Printable characters are displayed as themselves, e.g., a one-character string containing the key. .bP -Control characters are displayed in the \fB^\fP\fIX\fP notation. +Control characters are displayed in the \fB^\fIX\fR notation. +.bP +Printing characters are displayed as is. .bP DEL (character 127) is displayed as \fB^?\fP. .bP Values above 128 are either meta characters (if the screen has not been initialized, or if \fBmeta\fP(3X) has been called with a \fBTRUE\fP parameter), -shown in the \fBM\-\fP\fIX\fP notation, +shown in the \fBM\-\fIX\fR notation, or are displayed as themselves. In the latter case, the values may not be printable; this follows the X/Open specification. +.PP +The corresponding \fBwunctrl\fP returns a printable representation of +a complex character \fIwch\fP. +.PP +In both \fBunctrl\fP and \fBwunctrl\fP the attributes and color associated +with the character parameter are ignored. +.SS "keyname, key_name" +The \fBkeyname\fP routine returns a character string +corresponding to the key \fIc\fP. +Key codes are different from character codes. +.bP +Key codes below 256 are characters. +They are displayed using \fBunctrl\fP. .bP -Values above 256 may be the names of the names of function keys. +Values above 256 may be the codes for function keys. +The function key name is displayed. .bP -Otherwise (if there is no corresponding name) the function returns null, -to denote an error. +Otherwise (if there is no corresponding name and the key is not a character) +the function returns null, to denote an error. X/Open also lists an \*(``UNKNOWN KEY\*('' return value, which some implementations return rather than null. .LP -The corresponding \fBkey_name\fP returns a character string corresponding +The corresponding \fBkey_name\fP returns +a multibyte character string corresponding to the wide-character value \fIw\fP. -The two functions do not return the same set of strings; -the latter returns null where the former would display a meta character. -.SS filter/nofilter -.PP +The two functions (\fBkeyname\fP and \fBkey_name\fP) +do not return the same set of strings: +.bP +\fBkeyname\fP returns null where \fBkey_name\fP would display a meta character. +.bP +\fBkey_name\fP does not return the name of a function key. +.SS "filter, nofilter" The \fBfilter\fP routine, if used, must be called before \fBinitscr\fP or \fBnewterm\fP are called. Calling \fBfilter\fP causes these changes in initialization: @@ -151,15 +163,15 @@ using a different value of \fB$TERM\fP. The limitation arises because the \fBfilter\fP routine modifies the in-memory copy of the terminal information. .SS use_env -.PP The \fBuse_env\fP routine, if used, should be called before \fBinitscr\fP or \fBnewterm\fP are called (because those compute the screen size). -It modifies the way \fBncurses\fP treats environment variables +It modifies the way \fI\%ncurses\fP treats environment variables when determining the screen size. .bP -Normally \fBncurses\fP looks first at the terminal database for the screen size. +Normally \fI\%ncurses\fP looks first at the terminal database for the +screen size. .IP If \fBuse_env\fP was called with \fBFALSE\fP for parameter, it stops here unless @@ -170,57 +182,57 @@ If successful, it overrides the values from the terminal database. .bP Finally (unless \fBuse_env\fP was called with \fBFALSE\fP parameter), -\fBncurses\fP examines the \fBLINES\fP or \fBCOLUMNS\fP environment variables, +\fI\%ncurses\fP examines the \fILINES\fP or \fI\%COLUMNS\fP environment +variables, using a value in those to override the results from the operating system or terminal database. .IP -\fBNcurses\fP also updates the screen size in response to \fBSIGWINCH\fP, -unless overridden by the \fBLINES\fP or \fBCOLUMNS\fP environment variables, +\fI\%curses\fP also updates the screen size in response to +\fBSIGWINCH\fP, +unless overridden by the \fILINES\fP or \fI\%COLUMNS\fP environment +variables, .SS use_tioctl -.PP The \fBuse_tioctl\fP routine, if used, should be called before \fBinitscr\fP or \fBnewterm\fP are called (because those compute the screen size). After \fBuse_tioctl\fP is called with \fBTRUE\fP as an argument, -\fBncurses\fP modifies the last step in its computation +\fI\%ncurses\fP modifies the last step in its computation of screen size as follows: .bP -checks if the \fBLINES\fP and \fBCOLUMNS\fP environment variables +checks if the \fILINES\fP and \fI\%COLUMNS\fP environment variables are set to a number greater than zero. .bP -for each, \fBncurses\fP updates the corresponding environment variable +for each, \fI\%ncurses\fP updates the corresponding environment variable with the value that it has obtained via operating system call or from the terminal database. .bP -\fBncurses\fP re-fetches the value of the environment variables so that -it is still the environment variables which set the screen size. +\fI\%ncurses\fP re-fetches the value of the environment variables so +that it is still the environment variables which set the screen size. .PP -The \fBuse_env\fP and \fBuse_tioctl\fP routines combine as -summarized here: +The \fB\%use_env\fP and \fB\%use_tioctl\fP routines combine as follows. +.IP .TS -center tab(/); -l l l -_ _ _ -lw7 lw7 lw40. -\fBuse_env\fP/\fBuse_tioctl\fP/\fBSummary\fP -TRUE/FALSE/T{ +lB lB lB +lB lB lx. +use_env use_tioctl Summary +_ +TRUE FALSE T{ This is the default behavior. -\fBncurses\fP uses operating system calls -unless overridden by $LINES or $COLUMNS environment variables. -T} -TRUE/TRUE/T{ -\fBncurses\fP updates $LINES and $COLUMNS based on operating system calls. +\fI\%ncurses\fP uses operating system calls +unless overridden by \fILINES\fP or \fI\%COLUMNS\fP environment +variables; +default. T} -FALSE/TRUE/T{ -\fBncurses\fP ignores $LINES and $COLUMNS, -uses operating system calls to obtain size. +TRUE TRUE T{ +\fI\%ncurses\fP updates \fILINES\fP and \fI\%COLUMNS\fP based on +operating system calls. T} -FALSE/FALSE/T{ -\fBncurses\fP relies on the terminal database to determine size. +FALSE TRUE T{ +\fI\%ncurses\fP ignores \fILINES\fP and \fI\%COLUMNS\fP, +using operating system calls to obtain size. T} .TE -.SS putwin/getwin -.PP +.SS "putwin, getwin" The \fBputwin\fP routine writes all data associated with window (or pad) \fIwin\fP into the file to which \fIfilep\fP points. @@ -234,10 +246,10 @@ data. It returns a pointer to the new window. There are a few caveats: .bP -the data written is a copy of the \fBWINDOW\fP structure, +the data written is a copy of the \fI\%WINDOW\fP structure, and its associated character cells. -The format differs between the wide-character (\fBncursesw\fP) and -non-wide (\fBncurses\fP) libraries. +The format differs between the wide-character (\fI\%ncursesw\fP) and +non-wide (\fI\%ncurses\fP) libraries. You can transfer data between the two, however. .bP the retrieved window is always created as a top-level window (or pad), @@ -249,15 +261,24 @@ If cells in the retrieved window use color pairs which have not been created in the application using \fBinit_pair\fP, they will not be colored when the window is refreshed. .SS delay_output -.PP The \fBdelay_output\fP routine inserts an \fIms\fP millisecond pause in output. -This routine should not be used extensively because -padding characters are used rather than a CPU pause. -If no padding character is specified, -this uses \fBnapms\fP to perform the delay. -.SS flushinp +Employ this function judiciously when terminal output uses padding, +because \fI\%ncurses\fP transmits null characters +(consuming CPU and I/O resources) +instead of sleeping and requesting resumption from the operating system. +Padding is used unless: +.bP +the terminal description has \fBnpc\fP (\fBno_pad_char\fP) capability, or +.bP +the environment variable \fB\%NCURSES_NO_PADDING\fP is set. .PP +If padding is not in use, +\fI\%ncurses\fP uses \fBnapms\fP to perform the delay. +If the value of \fIms\fP exceeds 30,000 +(thirty seconds), +it is capped at that value. +.SS flushinp The \fBflushinp\fP routine throws away any typeahead that has been typed by the user and has not yet been read by the program. .SH RETURN VALUE @@ -267,7 +288,7 @@ upon failure and \fBOK\fP (SVr4 specifies only "an integer value other than .PP Routines that return pointers return \fBNULL\fP on error. .PP -X/Open does not define any error conditions. +X/Open Curses does not specify any error conditions. In this implementation .RS 3 .TP 5 @@ -279,13 +300,22 @@ returns an error if the associated \fBfwrite\fP calls return an error. .RE .SH PORTABILITY .SS filter -.PP The SVr4 documentation describes the action of \fBfilter\fP only in the vaguest terms. -The description here is adapted from the XSI Curses standard (which +The description here is adapted from X/Open Curses (which erroneously fails to describe the disabling of \fBcuu\fP). -.SS keyname +.SS "delay_output padding" +The limitation to 30 seconds +and the use of \fBnapms\fP +differ from other implementations. +.bP +SVr4 curses does not delay if no padding character is available. +.bP +NetBSD curses uses \fBnapms\fP when no padding character is available, +but does not take timing into account when using the padding character. .PP +Neither limits the delay. +.SS keyname The \fBkeyname\fP function may return the names of user-defined string capabilities which are defined in the terminfo entry via the \fB\-x\fP option of \fB@TIC@\fP. @@ -296,14 +326,13 @@ the same value for different runs because user-defined codes are merged from all terminal descriptions which have been loaded. The \fBuse_extended_names\fP(3X) function controls whether this data is loaded when the terminal description is read by the library. -.SS nofilter/use_tioctl -.PP -The \fBnofilter\fP and \fBuse_tioctl\fP routines are specific to \fBncurses\fP. +.SS "nofilter, use_tioctl" +The \fBnofilter\fP and \fBuse_tioctl\fP routines are specific to +\fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. -It is recommended that any code depending on \fBncurses\fP extensions -be conditioned using NCURSES_VERSION. -.SS putwin/getwin file-format -.PP +It is recommended that any code depending on \fI\%ncurses\fP extensions +be conditioned using \fBNCURSES_VERSION\fP. +.SS "putwin/getwin file-format" The \fBputwin\fP and \fBgetwin\fP functions have several issues with portability: .bP @@ -318,9 +347,10 @@ the University of California, Berkeley (in 1982) and were later (in 1988) incorporated into SVr4. Oddly, there are no such functions in the 4.3BSD curses sources. .bP -Most implementations simply dump the binary \fBWINDOW\fP structure to the file. +Most implementations simply dump the binary \fI\%WINDOW\fP structure +to the file. These include SVr4 curses, NetBSD and PDCurses, -as well as older \fBncurses\fP versions. +as well as older \fI\%ncurses\fP versions. This implementation (as well as the X/Open variant of Solaris curses, dated 1995) uses textual dumps. @@ -333,9 +363,8 @@ these functions. Doing that can run into problems mixing block- and buffered-I/O. This implementation reduces the problem on writes by flushing the output. However, reading from a file written using mixed schemes may not be successful. -.SS unctrl/wunctrl -.PP -The XSI Curses standard, Issue 4 describes these functions. +.SS "unctrl, wunctrl" +X/Open Curses, Issue 4 describes these functions. It states that \fBunctrl\fP and \fBwunctrl\fP will return a null pointer if unsuccessful, but does not define any error conditions. This implementation checks for three cases: @@ -384,24 +413,23 @@ When treating them as \*(``meta\*('' keys this implementation returns strings \*(``M\-^@\*('', \*(``M\-^A\*('', etc. .PP X/Open Curses documents \fBunctrl\fP as declared in \fB\fP, -which \fBncurses\fP does. -However, \fBncurses\fP' \fB\fP includes \fB\fP, +which \fI\%ncurses\fP does. +However, \fI\%ncurses\fP' \fB\fP includes \fB\fP, matching the behavior of SVr4 curses. Other implementations may not do that. -.SS use_env/use_tioctl -.PP -If \fBncurses\fP is configured to provide the sp-functions extension, +.SS "use_env, use_tioctl" +If \fI\%ncurses\fP is configured to provide the sp-functions extension, the state of \fBuse_env\fP and \fBuse_tioctl\fP may be updated before creating each \fIscreen\fP rather than once only (\fBcurs_sp_funcs\fP(3X)). This feature of \fBuse_env\fP -is not provided by other implementation of curses. +is not provided by other implementations of curses. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_initscr\fP(3X), -\fBcurs_inopts\fP(3X), -\fBcurs_kernel\fP(3X), -\fBcurs_scr_dump\fP(3X), -\fBcurs_sp_funcs\fP(3X), -\fBcurs_variables\fP(3X), -\fBlegacy_coding\fP(3X). +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_inopts\fP(3X), +\fB\%curs_kernel\fP(3X), +\fB\%curs_scr_dump\fP(3X), +\fB\%curs_sp_funcs\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%legacy_coding\fP(3X) diff --git a/man/curs_variables.3x b/man/curs_variables.3x index ad6a5b80..467b6944 100644 --- a/man/curs_variables.3x +++ b/man/curs_variables.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2010-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,162 +27,303 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_variables.3x,v 1.17 2021/12/25 21:49:32 tom Exp $ -.TH curs_variables 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_variables.3x,v 1.47 2024/04/13 22:37:35 tom Exp $ +.TH curs_variables 3X 2024-04-13 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. +.ie \n(.g .ds : \: +.el .ds : \" empty +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ds n 5 -.na -.hy 0 +. .SH NAME -\fBCOLORS\fP, -\fBCOLOR_PAIRS\fP, -\fBCOLS\fP, -\fBESCDELAY\fP, -\fBLINES\fP, -\fBTABSIZE\fP, -\fBcurscr\fP, -\fBnewscr\fP, -\fBstdscr\fP -\- \fBcurses\fP global variables -.ad -.hy +\fI\%bool\fP, +\fI\%chtype\fP, +\fI\%cchar_t\fP, +\fI\%attr_t\fP, +\fI\%SCREEN\fP, +\fI\%WINDOW\fP, +\fB\%TRUE\fP, +\fB\%FALSE\fP, +\fB\%ERR\fP, +\fB\%OK\fP, +\fB\%curscr\fP, +\fB\%newscr\fP, +\fB\%stdscr\fP, +\fB\%COLORS\fP, +\fB\%COLOR_PAIRS\fP, +\fB\%COLS\fP, +\fB\%LINES\fP, +\fB\%ESCDELAY\fP, +\fB\%TABSIZE\fP \- +\fIcurses\fR data types, constants, and global variables .SH SYNOPSIS .nf -\fB#include \fP -.PP -\fBint COLOR_PAIRS;\fP -.br -\fBint COLORS;\fP -.br -\fBint COLS;\fP -.br -\fBint ESCDELAY;\fP -.br -\fBint LINES;\fP -.br -\fBint TABSIZE;\fP -.br -\fBWINDOW * curscr;\fP -.br -\fBWINDOW * newscr;\fP -.br -\fBWINDOW * stdscr;\fP +\fB#include +.PP +\fI/* data types */ +\fBtypedef \fI/*\fP .\|.\|. \fI*/\fP bool; +\fBtypedef \fI/*\fP .\|.\|. \fI*/\fP chtype; +\fBtypedef \fI/*\fP .\|.\|. \fI*/\fP cchar_t; +\fBtypedef \fI/*\fP .\|.\|. \fI*/\fP attr_t; +\fBtypedef \fI/*\fP .\|.\|. \fI*/\fP SCREEN; +\fBtypedef \fI/*\fP .\|.\|. \fI*/\fP WINDOW; +.PP +\fI/* constants */ +\fBconst bool TRUE; +\fBconst bool FALSE; +.PP +\fBconst \fI/*\fP .\|.\|. \fI*/\fP ERR; +\fBconst \fI/*\fP .\|.\|. \fI*/\fP OK; +.PP +\fI/* variables */ +\fBint COLORS; +\fBint COLOR_PAIRS; +\fBint COLS; +\fBint LINES; +\fBWINDOW * curscr; +\fBWINDOW * stdscr; +.PP +\fI/* extensions */ +\fBint ESCDELAY; +\fBint TABSIZE; +\fBWINDOW * newscr; .fi .SH DESCRIPTION -This page summarizes variables provided by the \fBcurses\fP library. -A more complete description is given in the \fBcurses\fP(3X) manual page. +This page summarizes data types, +constants, +and variables provided by the \fIcurses\fP library. +Locate further discussion in \fB\%curses\fP(3X). .PP -Depending on the configuration, these may be actual variables, -or macros (see \fBcurs_threads\fP(3X) and \fBcurs_opaque\fP(3X)) -which provide read-only access to \fIcurses\fP's state. -In either case, applications should treat them as read-only to avoid +Depending on \fI\%ncurses\fP's build-time configuration, +the variables may instead be +macros (see \fB\%curs_threads\fP(3X) and \fB\%curs_opaque\fP(3X)) +that provide read-only access to the library's state. +In either case, +applications should treat them as read-only to avoid confusing the library. -.SS COLOR_PAIRS -After initializing curses, this variable contains the number of color pairs -which the terminal can support. -Usually the number of color pairs will be the product \fBCOLORS\fP*\fBCOLORS\fP, -however this is not always true: -.bP -a few terminals use HLS colors, which do not follow this rule -.bP -terminals supporting a large number of colors are limited by the number -of color pairs that can be represented in a \fIsigned short\fP value. +.SH "CONSTANTS" +.SS "TRUE, FALSE" +The \fIcurses\fP library defines \fBTRUE\fP and \fBFALSE\fP +to represent the values of the Boolean data type. +.SS "ERR, OK" +\fIcurses\fP and \fIterminfo\fP routines frequently return these +constant integral values indicating failure and success, +respectively. +.SH "PREDEFINED TYPES" +.SS "\fIbool\fP" +X/Open Issue 4 \fIcurses\fP (1996) preceded the ISO C99 and ISO C++98 +standards, +each of which also defined a Boolean data type. +The \fIcurses\fP library requires an integral type \fIbool\fP. +.PP +\fB\%ncurses\fP' configure script attempts to discover the +data type used by the system's C and C++ compilers, +to reuse for the \fIcurses\fP \fIbool\fP. +.SS "\fIchtype\fP" +The \fI\%chtype\fP integral type combines a +(\*(``narrow\*('', +8-bit) +character with attributes encoding the character's \fIrendition\fP, +such as the styling of its typeface and/or foreground and background +colors. +See, +for example, +\fB\%addch\fP(3X), +\fB\%attron\fP(3X), +and +\fB\%inch\fP(3X). +.SS "\fIcchar_t\fP, \fIattr_t\fP" +\fI\%chtype\fP is too small for the standard C library's wide-character +type, +\fIwchar_t\fP. +\fI\%cchar_t\fP is a type that can accommodate an \fI\%attr_t\fP and +enough wide characters to store what Unicode terms a \fIgrapheme cluster\fP +(a \*(``user-perceived character\*('' [UAX #29], +which may nevertheless require several character encoding units to +represent). +\fI\%attr_t\fP is an integral type storing \*(``wide\*('' attributes that +apply to \fI\%cchar_t\fPs. +See, +for example, +\fB\%add_wch\fP(3X), +\fB\%attr_on\fP(3X), +and +\fB\%in_wch\fP(3X). +.SS "\fISCREEN\fP" +.I curses +manages a terminal device with this structure type; +see \fB\%initscr\fP(3X). +.SS "\fIWINDOW\fP" +.I curses +represents rectangular portions of the terminal screen with the +.I \%WINDOW +structure type; +see subsection \*(``Overview\*('' of \fB\%ncurses\fP(3X). +.SH "VARIABLES" +.SS "curscr, stdscr, newscr" +The library records updates to the terminal screen in a window named +\fB\%curscr\fP. +This object is referred to as the \*(``physical screen\*('' in +\fB\%curs_refresh\fP(3X) and +\fB\%curs_outopts\fP(3X). +.PP +\fI\%ncurses\fP collects pending updates to the terminal screen in a +window named \fB\%newscr\fP. +This object is referred to as the \*(``virtual screen\*('' in the +\fB\%curs_kernel\fP(3X), +\fB\%curs_refresh\fP(3X), +and +\fB\%curs_outopts\fP(3X). +When the screen is refreshed, +\fIcurses\fP determines a minimal set of updates using the terminal's +capabilities to make \fB\%curscr\fP look like \fB\%newscr\fP. +.PP +Once \fIcurses\fP is initialized, +it creates a window named \fB\%stdscr\fP. +It is the same size as the terminal screen and is the default window +used by routines that do not take a parameter identifying one. +Many \fIcurses\fP functions use this window. .SS COLORS -After initializing curses, this variable contains the number of colors -which the terminal can support. -.SS COLS -After initializing curses, this variable contains the width of the screen, -i.e., the number of columns. +Once \fIcurses\fP is initialized, +\fB\%COLORS\fP +contains the number of colors supported by the terminal; +see \fB\%curs_color\fP(3X). +.SS COLOR_PAIRS +Once \fIcurses\fP is initialized, +\fB\%COLOR_PAIRS\fP +contains the number of color pairs supported by the terminal; +see \fB\%curs_color\fP(3X). +.SS "COLS, LINES" +Once \fIcurses\fP is initialized, +.B \%COLS +and +.B LINES +contain the screen's width and height in character cells, +respectively; +that is, +the number of columns and lines. .SS ESCDELAY -This variable holds the number of milliseconds to wait after reading an -escape character, -to distinguish between an individual escape character entered on the -keyboard from escape sequences sent by cursor- and function-keys -(see curses(3X)). -.SS LINES -After initializing curses, this variable contains the height of the screen, -i.e., the number of lines. +For +.I curses +to distinguish the ESC character resulting from a user's press of the +\*(``Escape\*('' key on the input device from one beginning an +.I "escape sequence" +(as commonly produced by function keys), +it waits after the escape character to see if further characters are +available on the input stream within a short interval. +.B \%ESCDELAY +stores this interval in milliseconds. +.PP +If \fB\%keypad\fP(3X) is disabled for the +.I curses +window receiving input, +a program must disambiguate escape sequences itself. .SS TABSIZE -This variable holds the number of columns used by the \fIcurses\fP library -when converting a tab character to spaces as it adds the tab to a window -(see \fBcurs_addch\fP(3X). -.SS The Current Screen -This implementation of curses uses a special window \fBcurscr\fP to -record its updates to the terminal screen. -.PP -This is referred to as the \*(``physical screen\*('' in the -\fBcurs_refresh\fP(3X) and -\fBcurs_outopts\fP(3X) manual pages. -.SS The New Screen -This implementation of curses uses a special window \fBnewscr\fP to -hold updates to the terminal screen before applying them to \fBcurscr\fP. -.PP -This is referred to as the \*(``virtual screen\*('' in the -\fBcurs_kernel\fP(3X), -\fBcurs_refresh\fP(3X) and -\fBcurs_outopts\fP(3X) manual pages. -.SS The Standard Screen -Upon initializing curses, -a default window called \fBstdscr\fP, -which is the size of the terminal screen, is created. -Many curses functions use this window. +The \fIcurses\fP library converts a tab character to this number of +spaces as it adds a tab to a window; +see \fB\%curs_addch\fP(3X). .SH NOTES -The curses library is initialized using either \fBinitscr\fP(3X), -or \fBnewterm\fP(3X). +Either \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X) initializes +\fIcurses\fP. .PP -If \fBcurses\fP is configured to use separate curses/terminfo libraries, -most of these variables reside in the curses library. +If +.I \%ncurses +is configured to provide separate +.I curses +and +.I \%tinfo +libraries, +most of these variables reside in the former. .SH PORTABILITY -\fBTABSIZE\fP is a feature of SVr4 curses -which is not documented by X/Open curses. +The X/Open Curses standard documents all of the foregoing types and +symbols except for \fB\%newscr\fP, +\fB\%TABSIZE\fP, +and \fB\%ESCDELAY\fP. +.PP +X/Open Curses describes \fB\%curscr\fP only as \*(``an internal data +structure\*(''; +SVr4 gave more details, +noting its use \*(``for certain low-level operations like clearing and +redrawing a screen containing garbage\*(''. +.\" SVID 4, Volume 3, p. 408 +Neither specified its interaction with the rest of the interface beyond +use as an argument to \fB\%clearok\fP(3X) and \fB\%wrefresh\fP(3X). +.PP +\fB\%newscr\fP is a feature of SVr4 \fIcurses\fP. +When refreshing the screen, +it is used as a working area for combining the standard window +\fB\%stdscr\fP with any others the application may have created with +\fB\%newwin\fP(3X). +When the update of \fB\%newscr\fP is complete, +\fIcurses\fP modifies \fB\%curscr\fP to match \fB\%newscr\fP. +.PP +\fB\%TABSIZE\fP is a feature of SVr4 \fIcurses\fP. .bP -In SVr4 curses, \fBTABSIZE\fP is initially set from the terminal description's -\fBinit_tabs\fP capability. -After that, it can be altered by the applications using SVr4 curses. -.IP -SVr4 curses uses the current value of \fBTABSIZE\fP to -compute the position of tabstops for updating both -the virtual screen with \fBaddch\fP(3X) as well as -the physical screen with \fBmvcur\fP(3X). +SVr4 initially sets \fB\%TABSIZE\fP from the terminal description's +\fB\%init_tabs\fP capability. +After that, +it can be altered by applications using SVr4 \fIcurses\fP. .bP -This implementation uses the current value of \fBTABSIZE\fP only for -updating the virtual screen. -It uses the terminal description's \fBit\fP (\fBinit_tabs\fP) capability for -computing hardware tabs (i.e., tab stops on the physical screen). +SVr4 \fIcurses\fP uses the value of \fB\%TABSIZE\fP to compute the +position of tab stops when updating both +the virtual screen with \fB\%addch\fP(3X) and +the physical screen with \fB\%mvcur\fP(3X). +.bP +\fI\%ncurses\fP uses the value of \fB\%TABSIZE\fP only to update the +virtual screen. +It uses the terminal description's \*(``\fBit\fP\*('' +(\fB\%init_tabs\fP) capability for computing hardware tabs +(that is, +tab stops on the physical screen). .bP Other implementations differ. -For instance, NetBSD curses allows \fBTABSIZE\fP to be set through -an environment variable. -This implementation does not. +For instance, +NetBSD \fIcurses\fP allows \fB\%TABSIZE\fP to be set through an +environment variable. +\fI\%ncurses\fP does not. .IP -NetBSD curses does not support hardware tabs; -it uses the \fBinit_tabs\fP capability and the \fBTABSIZE\fP variable -only for updating the virtual screen. +NetBSD \fIcurses\fP does not support hardware tabs; +it uses the \fB\%init_tabs\fP capability and the \fB\%TABSIZE\fP +variable only for updating the virtual screen. .PP -\fBESCDELAY\fP is an extension in AIX curses: +\fB\%ESCDELAY\fP is a feature of AIX \fIcurses\fP. .bP -In AIX, the units for \fBESCDELAY\fP are \fIfifths\fP of a millisecond. +In AIX, +the units for \fB\%ESCDELAY\fP are \fIfifths\fP of milliseconds. .bP -The default value for AIX's \fBESCDELAY\fP is 0.1 seconds. +The default value for AIX's \fB\%ESCDELAY\fP equals 0.1 seconds. .bP -AIX also enforces a limit of 10,000 seconds for \fBESCDELAY\fP; -this implementation currently has no upper limit. +AIX also enforces a limit of 10,000 seconds for \fB\%ESCDELAY\fP; +\fI\%ncurses\fP does not enforce any upper limit. .PP -This implementation has long used \fBESCDELAY\fP with units of milliseconds, +\fI\%ncurses\fP has long used \fB\%ESCDELAY\fP with units of +milliseconds, making it impossible to be completely compatible with AIX. -Likewise, most users have either decided to override the value, -or rely upon its default value. +Consequently, +most users have decided either to override the value, +or to rely upon its default. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_opaque\fP(3X), -\fBcurs_terminfo\fP(3X), -\fBcurs_threads\fP(3X), -\fBterm_variables\fP(3X), -\fBterminfo\fP(\*n). +\fB\%curses\fP(3X), +\fB\%curs_color\fP(3X), +\fB\%curs_opaque\fP(3X), +\fB\%curs_terminfo\fP(3X), +\fB\%curs_threads\fP(3X), +\fB\%term_variables\fP(3X), +\fB\%terminfo\fP(5) +.PP +[UAX #29] \*(``Unicode Standard Annex #29: Unicode Text +Segmentation\*(''; +\% diff --git a/man/curs_window.3x b/man/curs_window.3x index a6090ffc..d3d55c75 100644 --- a/man/curs_window.3x +++ b/man/curs_window.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,59 +27,47 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_window.3x,v 1.24 2021/12/25 17:39:16 tom Exp $ -.TH curs_window 3X "" +.\" $Id: curs_window.3x,v 1.48 2024/04/20 21:20:07 tom Exp $ +.TH curs_window 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.na -.hy 0 .SH NAME -\fBnewwin\fP, -\fBdelwin\fP, -\fBmvwin\fP, -\fBsubwin\fP, -\fBderwin\fP, -\fBmvderwin\fP, -\fBdupwin\fP, -\fBwsyncup\fP, -\fBsyncok\fP, -\fBwcursyncup\fP, -\fBwsyncdown\fP \- create \fBcurses\fP windows -.ad -.hy +\fB\%newwin\fP, +\fB\%delwin\fP, +\fB\%mvwin\fP, +\fB\%subwin\fP, +\fB\%derwin\fP, +\fB\%mvderwin\fP, +\fB\%dupwin\fP, +\fB\%wsyncup\fP, +\fB\%syncok\fP, +\fB\%wcursyncup\fP, +\fB\%wsyncdown\fP \- +create and manipulate \fIcurses\fR windows .SH SYNOPSIS -\fB#include \fP -.sp -\fBWINDOW *newwin(\fP - \fBint \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fP - \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fP -.br -\fBint delwin(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint mvwin(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP -.br -\fBWINDOW *subwin(WINDOW *\fP\fIorig\fP\fB,\fP - \fBint \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fP - \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fP -.br -\fBWINDOW *derwin(WINDOW *\fP\fIorig\fP\fB,\fP - \fBint \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fP - \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fP -.br -\fBint mvderwin(WINDOW *\fP\fIwin\fP\fB, int \fP\fIpar_y\fP\fB, int \fP\fIpar_x\fP\fB);\fP -.br -\fBWINDOW *dupwin(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBvoid wsyncup(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBint syncok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fP -.br -\fBvoid wcursyncup(WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBvoid wsyncdown(WINDOW *\fP\fIwin\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBWINDOW *newwin( + \fBint \fInlines\fB, int \fIncols\fB,\fR + \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR +\fBint delwin(WINDOW *\fIwin\fB);\fR +\fBint mvwin(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR +\fBWINDOW *subwin(WINDOW *\fIorig\fB,\fR + \fBint \fInlines\fB, int \fIncols\fB,\fR + \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR +\fBWINDOW *derwin(WINDOW *\fIorig\fB,\fR + \fBint \fInlines\fB, int \fIncols\fB,\fR + \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR +\fBint mvderwin(WINDOW *\fIwin\fB, int \fIpar_y\fB, int \fIpar_x\fB);\fR +\fBWINDOW *dupwin(WINDOW *\fIwin\fB);\fR +\fBvoid wsyncup(WINDOW *\fIwin\fB);\fR +\fBint syncok(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR +\fBvoid wcursyncup(WINDOW *\fIwin\fB);\fR +\fBvoid wsyncdown(WINDOW *\fIwin\fB);\fR +.fi .SH DESCRIPTION .SS newwin Calling \fBnewwin\fP creates and returns a pointer to a new window with the @@ -108,54 +96,49 @@ rather than a duplicate (with \fBdupwin\fP), all of the window modes are initialized to the default values. These functions set window modes after a window is created: .RS -.na .PP -idcok, -idlok, -immedok, -keypad, -leaveok, -nodelay, -scrollok, -setscrreg, -syncok, -wbkgdset, -wbkgrndset, and -wtimeout +\fB\%idcok\fP +\fB\%idlok\fP +\fB\%immedok\fP +\fB\%keypad\fP +\fB\%leaveok\fP +\fB\%nodelay\fP +\fB\%scrollok\fP +\fB\%setscrreg\fP +\fB\%syncok\fP +\fB\%wbkgdset\fP +\fB\%wbkgrndset\fP and +\fB\%wtimeout\fP. .RE -.ad .SS delwin -.PP Calling \fBdelwin\fP deletes the named window, freeing all memory associated with it (it does not actually erase the window's screen image). Subwindows must be deleted before the main window can be deleted. .SS mvwin -.PP Calling \fBmvwin\fP moves the window so that the upper left-hand corner is at position (\fIx\fP, \fIy\fP). If the move would cause the window to be off the screen, it is an error and the window is not moved. Moving subwindows is allowed, but should be avoided. .SS subwin -.PP Calling \fBsubwin\fP creates and returns a pointer to a new window with the given number of lines, \fInlines\fP, and columns, \fIncols\fP. The window is at position (\fIbegin\fR_\fIy\fP, \fIbegin\fR_\fIx\fP) on the screen. The subwindow shares memory with the window \fIorig\fP, +its \fIancestor\fP, so that changes made to one window will affect both windows. When using this routine, it is necessary to call \fBtouchwin\fP or \fBtouchline\fP on \fIorig\fP before calling \fBwrefresh\fP on the subwindow. .SS derwin -.PP Calling \fBderwin\fP is the same as calling \fBsubwin,\fP except that \fIbegin\fR_\fIy\fP and \fIbegin\fR_\fIx\fP are relative to the origin of the window \fIorig\fP rather than the screen. There is no difference between the subwindows and the derived windows. -.PP +.SS mvderwin Calling \fBmvderwin\fP moves a derived window (or subwindow) inside its parent window. The screen-relative parameters of the window are not changed. @@ -163,23 +146,19 @@ This routine is used to display different parts of the parent window at the same physical position on the screen. .SS dupwin -.PP Calling \fBdupwin\fP creates an exact duplicate of the window \fIwin\fP. .SS wsyncup -.PP Calling \fBwsyncup\fP touches all locations in ancestors of \fIwin\fP that are changed in \fIwin\fP. If \fBsyncok\fP is called with second argument \fBTRUE\fP then \fBwsyncup\fP is called automatically whenever there is a change in the window. .SS wsyncdown -.PP The \fBwsyncdown\fP routine touches each location in \fIwin\fP that has been touched in any of its ancestor windows. This routine is called by \fBwrefresh\fP, so it should almost never be necessary to call it manually. .SS wcursyncup -.PP The routine \fBwcursyncup\fP updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. @@ -242,22 +221,52 @@ If many small changes are made to the window, the \fBwsyncup\fP option could degrade performance. .PP Note that \fBsyncok\fP may be a macro. +.SH PORTABILITY +X/Open Curses, Issue 4 describes these functions. +.PP +X/Open Curses states regarding \fBdelwin\fP: +.bP +It must delete subwindows before deleting their parent. +.bP +If \fBdelwin\fP is asked to delete a parent window, +it can only succeed if the curses library keeps a list of the subwindows. +SVr4 curses kept a count of the number of subwindows rather than a list. +It simply returned \fBERR\fP when asked to delete a subwindow. +Solaris X/Open curses does not even make that check, +and will delete a parent window which still has subwindows. +.bP +Since release 4.0 (1996), +\fI\%ncurses\fP maintains a list of windows for each screen, +to ensure that a window has no subwindows before allowing deletion. +.bP +NetBSD copied this feature of \fI\%ncurses\fP in 2003. +.br +PDCurses follows the scheme used in Solaris X/Open curses. .SH BUGS -The subwindow functions (\fBsubwin\fP, \fBderwin\fP, \fBmvderwin\fP, -\fBwsyncup\fP, \fBwsyncdown\fP, \fBwcursyncup\fP, \fBsyncok\fP) are flaky, -incompletely implemented, and not well tested. +The subwindow functions +\fB\%subwin\fP, +\fB\%derwin\fP, +\fB\%mvderwin\fP, +\fB\%wsyncup\fP, +\fB\%wsyncdown\fP, +\fB\%wcursyncup\fP, +and +\fB\%syncok\fP +are flaky, +incompletely implemented, +and not well tested. .PP -The System V curses documentation is very unclear about what \fBwsyncup\fP -and \fBwsyncdown\fP actually do. -It seems to imply that they are only -supposed to touch exactly those lines that are affected by ancestor changes. -The language here, and the behavior of the \fBcurses\fP implementation, -is patterned on the XPG4 curses standard. -The weaker XPG4 spec may result in slower updates. -.SH PORTABILITY -The XSI Curses standard, Issue 4 describes these functions. +System\ V's \fIcurses\fP documentation is unclear about what +\fB\%wsyncup\fP and \fB\%wsyncdown\fP actually do. +It seems to imply that they are supposed to touch only those lines that +are affected by changes to a window's ancestors. +The language here, +and behavior of \fI\%ncurses\fP, +is patterned on the X/Open Curses standard; +this approach may result in slower updates. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_refresh\fP(3X), -\fBcurs_touch\fP(3X), -\fBcurs_variables\fP(3X) +\fB\%curses\fP(3X), +\fB\%curs_initscr\fP(3X), +\fB\%curs_refresh\fP(3X), +\fB\%curs_touch\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/default_colors.3x b/man/default_colors.3x index fa499eed..96124147 100644 --- a/man/default_colors.3x +++ b/man/default_colors.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2000-2011,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,21 +29,29 @@ .\" .\" Author: Thomas E. Dickey 1997,1999,2000,2005 .\" -.\" $Id: default_colors.3x,v 1.34 2021/12/25 21:49:32 tom Exp $ -.TH default_colors 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: default_colors.3x,v 1.52 2024/04/13 22:17:22 tom Exp $ +.TH default_colors 3X 2024-04-13 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBuse_default_colors\fP, -\fBassume_default_colors\fP \- use terminal's default colors +\fB\%use_default_colors\fP, +\fB\%assume_default_colors\fP \- +use terminal's default colors in \fIcurses\fP .SH SYNOPSIS -\fB#include \fP -.sp -\fBint use_default_colors(void);\fP -.br -\fBint assume_default_colors(int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP +.nf +\fB#include +.PP +\fBint use_default_colors(void); +\fBint assume_default_colors(int \fIfg\fP, int \fIbg\fP); +.fi .SH DESCRIPTION The \fBuse_default_colors\fP and \fBassume_default_colors\fP functions are extensions to the curses library. @@ -57,7 +65,8 @@ Some applications are designed to work with the default background, using colors only for text. For example, there are several implementations of the \fBls\fP program which use colors to denote different file types or permissions. -These \*(``color ls\*('' programs do not necessarily modify the background color, +These \*(``color ls\*('' programs do not necessarily +modify the background color, typically using only the \fBsetaf\fP terminfo capability to set the foreground color. Full-screen applications that use default colors can achieve similar @@ -84,9 +93,9 @@ The following are equivalent: .I assume_default_colors(\-1,\-1); .RE .PP -These are ncurses extensions. +These are \fI\%ncurses\fP extensions. For other curses implementations, color -number \-1 does not mean anything, just as for ncurses before a +number \-1 does not mean anything, just as for \fI\%ncurses\fP before a successful call of \fBuse_default_colors\fP or \fBassume_default_colors\fP. .PP Other curses implementations do not allow an application to modify color pair 0. @@ -97,7 +106,7 @@ If your application does not use either .B use_default_colors or .B assume_default_colors -ncurses will paint a white foreground (text) with black background +\fI\%ncurses\fP will paint a white foreground (text) with black background for color pair 0. .SH RETURN VALUE These functions return the integer \fBERR\fP upon failure @@ -131,14 +140,14 @@ 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. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. It is recommended that any code depending on them be conditioned using NCURSES_VERSION. -.SH SEE ALSO -\fBded\fP(1), -\fBcurs_color\fP(3X). -.SH AUTHOR +.SH AUTHORS Thomas Dickey (from an analysis of the requirements for color xterm for XFree86 3.1.2C, February 1996). +.SH SEE ALSO +\fB\%ded\fP(1), +\fB\%curs_color\fP(3X) diff --git a/man/define_key.3x b/man/define_key.3x index 5e6d2bbe..667d8cd3 100644 --- a/man/define_key.3x +++ b/man/define_key.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,38 +29,43 @@ .\" .\" Author: Thomas E. Dickey 1997 .\" -.\" $Id: define_key.3x,v 1.20 2021/12/25 21:41:58 tom Exp $ -.TH define_key 3X "" +.\" $Id: define_key.3x,v 1.42 2024/03/16 15:35:01 tom Exp $ +.TH define_key 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBdefine_key\fP \- define a keycode +\fB\%define_key\fP \- +define a \fIcurses\fR keycode .SH SYNOPSIS -\fB#include \fP -.sp -\fBint define_key(const char *\fP\fIdefinition\fP\fB, int \fP\fIkeycode\fP\fB);\fP +.nf +\fB#include +.PP +\fBint define_key(const char *\fIdefinition\fP, int \fIkeycode\fP); +.fi .SH DESCRIPTION -This is an extension to the curses library. +This is an extension to the \fIcurses\fP library. It permits an application to define keycodes with their corresponding control -strings, so that the ncurses library will interpret them just as it would +strings, +so that the \fI\%ncurses\fP library will interpret them just as it would the predefined codes in the terminfo database. .PP -If the given string is null, any existing definition for the keycode is -removed. +If \fIdefinition\fP is \fBNULL\fP, +any existing one for the keycode is removed. Similarly, if the given keycode is negative or zero, any existing string for the given definition is removed. .SH RETURN VALUE -The keycode must be greater than zero, and the string non-null, +Either \fIkeycode\fP must be greater than zero, +or \fIdefinition\fP must be non-\fBNULL\fP, otherwise \fBERR\fP is returned. \fBERR\fP may also be returned if there is insufficient memory to allocate the data to store the definition. If no error is detected, \fBOK\fP is returned. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. It is recommended that -any code depending on them be conditioned using NCURSES_VERSION. +any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP. +.SH AUTHORS +Thomas Dickey .SH SEE ALSO -\fBkeyok\fP(3X), -\fBkey_defined\fP(3X). -.SH AUTHOR -Thomas Dickey. +\fB\%keyok\fP(3X), +\fB\%key_defined\fP(3X) diff --git a/man/form.3x b/man/form.3x index 5808d1e9..2f8f8848 100644 --- a/man/form.3x +++ b/man/form.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,21 +28,30 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form.3x,v 1.38 2021/12/25 21:49:32 tom Exp $ -.TH form 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form.3x,v 1.54 2024/03/16 15:35:01 tom Exp $ +.TH form 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBform\fP \- curses extension for programming forms +\fBform\fP \- +curses extension for programming forms .SH SYNOPSIS -\fB#include \fP -.br +.nf +\fB#include +.fi .SH DESCRIPTION The \fBform\fP library provides terminal-independent facilities for composing form screens on character-cell terminals. @@ -64,7 +73,7 @@ so that input/output processing will work. A curses initialization routine such as \fBinitscr\fP must be called before using any of these functions. . -.SS Current Default Values for Field Attributes +.SS "Current Default Values for Field Attributes" . The \fBform\fP library maintains a default value for field attributes. You @@ -75,13 +84,13 @@ Changing this default with a \fBset_\fP function affects future field creations, but does not change the rendering of fields already created. . -.SS Routine Name Index +.SS "Routine Name Index" . The following table lists each \fBform\fP routine and the name of the manual page on which it is described. Routines flagged with \*(``*\*('' -are ncurses-specific, not present in SVr4. -. +are \fI\%ncurses\fP-specific, not present in SVr4. +.PP .TS l l l l . @@ -206,39 +215,32 @@ System error occurred (see \fBerrno\fP(3)). .B E_UNKNOWN_COMMAND The form driver code saw an unknown request code. .SH NOTES -The header file \fB\fP automatically includes the header files -\fB\fP and \fB\fP. -.PP -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 would give you a link error when using static libraries). +The header file \fI\%form.h\fP itself includes \fI\%curses.h\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. .PP -The menu facility was documented in SVr4.2 in -\fICharacter User Interface Programming (UNIX SVR4.2)\fP. +A form facility was documented in SVr4.2's +\fICharacter User Interface Programming\fP document. .PP It is not part of X/Open Curses. .PP -Aside from ncurses, there are few implementations: +Aside from \fI\%ncurses\fP, there are few implementations: .bP systems based on SVr4 source code, e.g., Solaris. .bP NetBSD curses. .PP -A few functions in this implementation are extensions added for ncurses, +A few functions in this implementation are extensions added for +\fI\%ncurses\fP, but not provided by other implementations, e.g., \fBform_driver_w\fP, \fBunfocus_current_field\fP. .SH AUTHORS Juergen Pfeifer. -Manual pages and adaptation for ncurses by Eric +Manual pages and adaptation for \fI\%ncurses\fP by Eric S. Raymond. .SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed -descriptions of the entry points. -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for +detailed descriptions of the entry points. diff --git a/man/form_cursor.3x b/man/form_cursor.3x index 4b6b0a36..ed8bab15 100644 --- a/man/form_cursor.3x +++ b/man/form_cursor.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,15 +28,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_cursor.3x,v 1.16 2021/12/25 21:49:32 tom Exp $ -.TH form_cursor 3X "" +.\" $Id: form_cursor.3x,v 1.31 2024/03/16 15:35:01 tom Exp $ +.TH form_cursor 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBpos_form_cursor\fP \- position a form window cursor +\fBpos_form_cursor\fP \- +position a form window cursor .SH SYNOPSIS -\fB#include \fP -.sp -\fBint pos_form_cursor(FORM *\fP\fIform\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint pos_form_cursor(FORM *\fIform\fP); +.fi .SH DESCRIPTION The function \fBpos_form_cursor\fP restores the cursor to the position required for the forms driver to continue processing requests. @@ -57,12 +59,6 @@ The form has not been posted. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -. -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -70,3 +66,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_data.3x b/man/form_data.3x index 8d922cde..ded82eba 100644 --- a/man/form_data.3x +++ b/man/form_data.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +28,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_data.3x,v 1.17 2021/12/25 21:41:58 tom Exp $ -.TH form_data 3X "" +.\" $Id: form_data.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH form_data 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBdata_ahead\fP, -\fBdata_behind\fP \- test for off-screen data in given forms +\fBdata_behind\fP \- +test for off-screen data in given forms .SH SYNOPSIS -\fB#include \fP -.sp -\fBbool data_ahead(const FORM *\fP\fIform\fP\fB);\fP -.br -\fBbool data_behind(const FORM *\fP\fIform\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBbool data_ahead(const FORM *\fIform\fP); +\fBbool data_behind(const FORM *\fIform\fP); +.fi .SH DESCRIPTION The function \fBdata_ahead\fP tests whether there is off-screen data ahead in the given form. @@ -48,11 +49,6 @@ It returns TRUE (1) or FALSE (0). The function \fBdata_behind\fP tests whether there is off-screen data behind in the given form. It returns TRUE (1) or FALSE (0). -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -60,3 +56,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_driver.3x b/man/form_driver.3x index 9b9d9382..882a49dd 100644 --- a/man/form_driver.3x +++ b/man/form_driver.3x @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,22 +28,23 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_driver.3x,v 1.38 2021/12/25 21:49:32 tom Exp $ -.TH form_driver 3X "" +.\" $Id: form_driver.3x,v 1.61 2024/04/20 18:55:09 tom Exp $ +.TH form_driver 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME \fBform_driver\fP, -\fBform_driver_w\fP \- command-processing loop of the form system +\fBform_driver_w\fP \- +command-processing loop of the form system .SH SYNOPSIS -\fB#include \fP -.sp -\fBint form_driver(FORM *\fP\fIform\fP\fB, int \fP\fIc\fP\fB);\fP -.br -\fBint form_driver_w(FORM *\fP\fIform\fP\fB, int \fP\fIc\fP\fB, wchar_t \fP\fIwch\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint form_driver(FORM *\fIform\fP, int \fIc\fP); +\fBint form_driver_w(FORM *\fIform\fP, int \fIc\fP, wchar_t \fIwc\fP); +.fi .SH DESCRIPTION .SS form_driver Once a form has been posted (displayed), you should funnel input events to it @@ -59,33 +61,32 @@ checked according to the program's locale settings. .bP The input is the KEY_MOUSE special key associated with an mouse event. .SS form_driver_w -.PP 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 \fBget_wch\fP(3X). The type must be passed as well, to enable the library to determine whether the parameter is a wide character or a request. -.SS Form-driver requests -.PP +.SS "Form Driver Requests" The form driver requests are as follows: +.PP .TS -l l -_ _ -l l. -\fBName\fP \fBDescription\fP -REQ_BEG_FIELD Move to the beginning of the field. -REQ_BEG_LINE Move to the beginning of the line. +Lb Lb +Lb Lx. +Name Description +_ +REQ_BEG_FIELD Move to beginning of field. +REQ_BEG_LINE Move to beginning of the line. REQ_CLR_EOF Clear to end of field from cursor. REQ_CLR_EOL Clear to end of line from cursor. REQ_CLR_FIELD Clear the entire field. REQ_DEL_CHAR Delete character at the cursor. REQ_DEL_LINE Delete line at the cursor. REQ_DEL_PREV Delete character before the cursor. -REQ_DEL_WORD Delete blank-delimited word at the cursor. -REQ_DOWN_CHAR Move down in the field. +REQ_DEL_WORD Delete blank-delimited word at cursor. +REQ_DOWN_CHAR Move down in field. REQ_DOWN_FIELD Move down to a field. -REQ_END_FIELD Move to the end of the field. +REQ_END_FIELD Move to the end of field. REQ_END_LINE Move to the end of the line. REQ_FIRST_FIELD Move to the first field. REQ_FIRST_PAGE Move to the first page. @@ -94,7 +95,7 @@ REQ_INS_LINE Insert a blank line at the cursor. REQ_INS_MODE Enter insert mode. REQ_LAST_FIELD Move to the last field. REQ_LAST_PAGE Move to the last field. -REQ_LEFT_CHAR Move left in the field. +REQ_LEFT_CHAR Move left in field. 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. @@ -111,25 +112,25 @@ REQ_PREV_FIELD Move to the previous field. REQ_PREV_LINE Move to the previous line. REQ_PREV_PAGE Move to the previous page. REQ_PREV_WORD Move to the previous word. -REQ_RIGHT_CHAR Move right in the field. +REQ_RIGHT_CHAR Move right in field. REQ_RIGHT_FIELD Move right to a field. -REQ_SCR_BCHAR Scroll the field backward a character. -REQ_SCR_BHPAGE Scroll the field backward half a page. -REQ_SCR_BLINE Scroll the field backward a line. -REQ_SCR_BPAGE Scroll the field backward a page. -REQ_SCR_FCHAR Scroll the field forward a character. -REQ_SCR_FHPAGE Scroll the field forward half a page. -REQ_SCR_FLINE Scroll the field forward a line. -REQ_SCR_FPAGE Scroll the field forward a page. -REQ_SCR_HBHALF Horizontal scroll the field backward half a line. -REQ_SCR_HBLINE Horizontal scroll the field backward a line. -REQ_SCR_HFHALF Horizontal scroll the field forward half a line. -REQ_SCR_HFLINE Horizontal scroll the field forward a line. +REQ_SCR_BCHAR Scroll field backward 1 character. +REQ_SCR_BHPAGE Scroll field backward \(12 page. +REQ_SCR_BLINE Scroll field backward 1 line. +REQ_SCR_BPAGE Scroll field backward 1 page. +REQ_SCR_FCHAR Scroll field forward 1 character. +REQ_SCR_FHPAGE Scroll field forward \(12 page. +REQ_SCR_FLINE Scroll field forward 1 line. +REQ_SCR_FPAGE Scroll field forward 1 page. +REQ_SCR_HBHALF Horizontal scroll field backward \(12 line. +REQ_SCR_HBLINE Horizontal scroll field backward 1 line. +REQ_SCR_HFHALF Horizontal scroll field forward \(12 line. +REQ_SCR_HFLINE Horizontal scroll field forward 1 line. REQ_SFIRST_FIELD Move to the sorted first field. REQ_SLAST_FIELD Move to the sorted last field. REQ_SNEXT_FIELD Move to the sorted next field. REQ_SPREV_FIELD Move to the sorted previous field. -REQ_UP_CHAR Move up in the field. +REQ_UP_CHAR Move up in field. REQ_UP_FIELD Move up to a field. REQ_VALIDATION Validate field. .TE @@ -138,7 +139,7 @@ If the second argument is a printable character, the driver places it in the current position in the current field. If it is one of the forms requests listed above, that request is executed. -.SS Field validation +.SS "Field Validation" The form library makes updates to the window associated with form fields rather than directly to the field buffers. .PP @@ -147,7 +148,6 @@ The form driver also provides for validating modified fields to ensure that the contents meet whatever constraints an application may attach using \fBset_field_type\fP. .PP -.PP You can validate a field without making any changes to it using \fBREQ_VALIDATION\fP. The form driver also validates a field in these cases: @@ -166,8 +166,7 @@ In each case, the move fails if the field is invalid. If the modified field is valid, the form driver copies the modified data from the window associated with the field to the field buffer. -.SS Mouse handling -.PP +.SS "Mouse Handling" If the second argument is the KEY_MOUSE special key, the associated mouse event is translated into one of the above pre-defined requests. Currently only clicks in the user window (e.g., inside the form display @@ -214,8 +213,7 @@ into a request was done, \fBform_driver\fP returns the result of this request. If you clicked outside the user window or the mouse event could not be translated into a form request an \fBE_REQUEST_DENIED\fP is returned. -.SS Application-defined commands -.PP +.SS "Application-defined Commands" If the second argument is neither printable nor one of the above pre-defined form requests, the driver assumes it is an application-specific command and returns \fBE_UNKNOWN_COMMAND\fP. Application-defined commands @@ -250,18 +248,6 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_UNKNOWN_COMMAND The form driver code saw an unknown request code. -. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBform\fP(3X), -\fBform_fieldtype\fP(3X), -\fBform_field_buffer\fP(3X), -\fBform_field_validation\fP(3X), -\fBform_variables\fP(3X), -\fBgetch\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header files -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -269,3 +255,11 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X), +\fB\%form_fieldtype\fP(3X), +\fB\%form_field_buffer\fP(3X), +\fB\%form_field_validation\fP(3X), +\fB\%form_variables\fP(3X), +\fB\%getch\fP(3X) diff --git a/man/form_field.3x b/man/form_field.3x index 106997c9..9799d0c0 100644 --- a/man/form_field.3x +++ b/man/form_field.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2012 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,21 +28,20 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field.3x,v 1.19 2021/12/25 21:49:32 tom Exp $ -.TH form_field 3X "" +.\" $Id: form_field.3x,v 1.34 2024/03/16 15:35:01 tom Exp $ +.TH form_field 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBform_field\fP \- make and break connections between fields and forms +\fBform_field\fP \- +make and break connections between fields and forms .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_form_fields(FORM *\fP\fIform\fP\fB, FIELD **\fP\fIfields\fP\fB);\fP -.br -\fBFIELD **form_fields(const FORM *\fP\fIform\fP\fB);\fP -.br -\fBint field_count(const FORM *\fP\fIform\fP\fB);\fP -.br -\fBint move_field(FIELD *\fP\fIfield\fP\fB, int \fP\fIfrow\fP\fB, int \fP\fIfcol\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_form_fields(FORM *\fIform\fP, FIELD **\fIfields\fP); +\fBFIELD **form_fields(const FORM *\fIform\fP); +\fBint field_count(const FORM *\fIform\fP); +\fBint move_field(FIELD *\fIfield\fP, int \fIfrow\fP, int \fIfcol\fP); +.fi .SH DESCRIPTION The function \fBset_form_fields\fP changes the field pointer array of the given \fIform\fP. The array must be terminated by a \fBNULL\fP. @@ -77,11 +76,6 @@ The form is already posted. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -92,3 +86,6 @@ as \-1 (which is the value of \fBERR\fP). .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_field_attributes.3x b/man/form_field_attributes.3x index d700581b..687e909e 100644 --- a/man/form_field_attributes.3x +++ b/man/form_field_attributes.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,29 +28,34 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_attributes.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH form_field_attributes 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form_field_attributes.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH form_field_attributes 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME -\fBform_field_attributes\fP \- color and attribute control for form fields +\fBform_field_attributes\fP \- +color and attribute control for form fields .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_field_fore(FIELD *\fP\fIfield\fP\fB, chtype \fP\fIattr\fP\fB);\fP -.br -\fBchtype field_fore(const FIELD *\fP\fIfield\fP\fB);\fP -.sp -\fBint set_field_back(FIELD *\fP\fIfield\fP\fB, chtype \fP\fIattr\fP\fB);\fP -.br -\fBchtype field_back(const FIELD *\fP\fIfield\fP\fB);\fP -.sp -\fBint set_field_pad(FIELD *\fP\fIfield\fP\fB, int \fP\fIpad\fP\fB);\fP -.br -\fBint field_pad(const FIELD *\fP\fIfield\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_field_fore(FIELD *\fIfield\fP, chtype \fIattr\fP); +\fBchtype field_fore(const FIELD *\fIfield\fP); +.PP +\fBint set_field_back(FIELD *\fIfield\fP, chtype \fIattr\fP); +\fBchtype field_back(const FIELD *\fIfield\fP); +.PP +\fBint set_field_pad(FIELD *\fIfield\fP, int \fIpad\fP); +\fBint field_pad(const FIELD *\fIfield\fP); +.fi .SH DESCRIPTION The function \fBset_field_fore\fP sets the foreground attribute of \fIfield\fP. This is the highlight used to display the field contents. The @@ -80,13 +85,6 @@ Routine detected an incorrect or out-of-range argument. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -. -.SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed -descriptions of the entry points. -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -94,3 +92,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*('' +for detailed descriptions of the entry points. diff --git a/man/form_field_buffer.3x b/man/form_field_buffer.3x index a3f2cd3f..ba176d3e 100644 --- a/man/form_field_buffer.3x +++ b/man/form_field_buffer.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,31 +27,38 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_buffer.3x,v 1.29 2021/12/25 21:49:32 tom Exp $ -.TH form_field_buffer 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form_field_buffer.3x,v 1.45 2024/03/16 15:35:01 tom Exp $ +.TH form_field_buffer 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBform_field_buffer\fP \- field buffer control +\fBform_field_buffer\fP \- +field buffer control .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_field_buffer(FIELD *\fP\fIfield\fP\fB, int \fP\fIbuf\fP\fB, const char *\fP\fIvalue\fP\fB);\fP -.br -\fBchar *field_buffer(const FIELD *\fP\fIfield\fP\fB, int \fP\fIbuffer\fP\fB);\fP -.sp -\fBint set_field_status(FIELD *\fP\fIfield\fP\fB, bool \fP\fIstatus\fP\fB);\fP -.br -\fBbool field_status(const FIELD *\fP\fIfield\fP\fB);\fP -.sp -\fBint set_max_field(FIELD *\fP\fIfield\fP\fB, int \fP\fImax\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_field_buffer(FIELD *\fIfield\fP, int \fIbuf\fP, const char *\fIvalue\fP); +\fBchar *field_buffer(const FIELD *\fIfield\fP, int \fIbuffer\fP); +.PP +\fBint set_field_status(FIELD *\fIfield\fP, bool \fIstatus\fP); +\fBbool field_status(const FIELD *\fIfield\fP); +.PP +\fBint set_max_field(FIELD *\fIfield\fP, int \fImax\fP); +.fi .SH DESCRIPTION The function \fBset_field_buffer\fP sets the numbered buffer of the given field to contain a given string: @@ -119,26 +125,23 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. -.SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed -descriptions of the entry points. .SH NOTES -The header file \fB\fP automatically includes the header file -.PP When configured for wide characters, \fBfield_buffer\fP returns a pointer to 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 \fBfield_buffer\fP to return the same buffer. -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. .PP -The \fBset_max_field\fP function checks for an ncurses extension +The \fBset_max_field\fP function checks for an \fI\%ncurses\fP extension \fBO_INPUT_FIELD\fP which allows a dynamic field to shrink if the new limit is smaller than the current field size. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*('' +for detailed descriptions of the entry points. diff --git a/man/form_field_info.3x b/man/form_field_info.3x index 8e098323..84b10d96 100644 --- a/man/form_field_info.3x +++ b/man/form_field_info.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,26 +27,33 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_info.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH form_field_info 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form_field_info.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH form_field_info 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME \fBdynamic_field_info\fP, -\fBfield_info\fP \- retrieve field characteristics +\fBfield_info\fP \- +retrieve field characteristics .SH SYNOPSIS .nf -\fB#include \fP -.sp -\fBint field_info(const FIELD *\fP\fIfield\fP\fB,\fP - \fBint *\fP\fIrows\fP\fB, int *\fP\fIcols\fP\fB,\fP - \fBint *\fP\fIfrow\fP\fB, int *\fP\fIfcol\fP\fB,\fP - \fBint *\fP\fInrow\fP\fB, int *\fP\fInbuf\fB);\fP -.sp -\fBint dynamic_field_info(const FIELD *\fP\fIfield\fP\fB,\fP - \fBint *\fP\fIrows\fP\fB, int *\fP\fIcols\fP\fB, int *\fImax\fB);\fP +\fB#include +.PP +\fBint field_info(const FIELD *\fIfield\fP, + \fBint *\fIrows\fB, int *\fIcols\fB,\fR + \fBint *\fIfrow\fB, int *\fIfcol\fB,\fR + \fBint *\fInrow\fB, int *\fInbuf\fB);\fR +.PP +\fBint dynamic_field_info(const FIELD *\fIfield\fB,\fR + \fBint *\fIrows\fB, int *\fIcols\fB, int *\fImax\fB);\fR .fi .SH DESCRIPTION The function \fBfield_info\fP returns the sizes and other attributes passed in @@ -73,12 +79,6 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. -.SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed -descriptions of the entry points. -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -90,3 +90,6 @@ Not all implementations allow this, e.g., Solaris 2.7 does not. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*('' +for detailed descriptions of the entry points. diff --git a/man/form_field_just.3x b/man/form_field_just.3x index c52de365..c1fd5545 100644 --- a/man/form_field_just.3x +++ b/man/form_field_just.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,22 +27,29 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_just.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH form_field_just 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form_field_just.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH form_field_just 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME \fBset_field_just\fP, -\fBfield_just\fP \- retrieve field characteristics +\fBfield_just\fP \- +retrieve field characteristics .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_field_just(FIELD *\fP\fIfield\fP\fB, int \fP\fIjustification\fP\fB);\fP -.br -\fBint field_just(const FIELD *\fP\fIfield\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_field_just(FIELD *\fIfield\fP, int \fIjustification\fP); +\fBint field_just(const FIELD *\fIfield\fP); +.fi .SH DESCRIPTION The function \fBset_field_just\fP sets the justification attribute of a field; \fBfield_just\fP returns a field's justification attribute. @@ -64,12 +70,6 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. -.SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed -descriptions of the entry points. -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -77,3 +77,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*('' +for detailed descriptions of the entry points. diff --git a/man/form_field_new.3x b/man/form_field_new.3x index 0dcf48b3..9cf08adb 100644 --- a/man/form_field_new.3x +++ b/man/form_field_new.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,26 +27,25 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_new.3x,v 1.26 2021/12/25 21:41:58 tom Exp $ -.TH form_field_new 3X "" +.\" $Id: form_field_new.3x,v 1.41 2024/03/16 15:35:01 tom Exp $ +.TH form_field_new 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBnew_field\fP, \fBdup_field\fP, \fBlink_field\fP, -\fBfree_field\fP \- create and destroy form fields +\fBfree_field\fP \- +create and destroy form fields .SH SYNOPSIS -\fB#include \fP -.sp -\fBFIELD *new_field(int \fP\fIheight\fP\fB, int \fP\fIwidth\fP\fB,\fP - \fBint \fP\fItoprow\fP\fB, int \fP\fIleftcol\fP\fB,\fP - \fBint \fP\fIoffscreen\fP\fB, int \fP\fInbuffers\fP\fB);\fP -.br -\fBFIELD *dup_field(FIELD *\fP\fIfield\fP\fB, int \fP\fItoprow\fP\fB, int \fP\fIleftcol\fP\fB);\fP -.br -\fBFIELD *link_field(FIELD *\fP\fIfield\fP\fB, int \fP\fItoprow\fP\fB, int \fP\fIleftcol\fP\fB);\fP -.br -\fBint free_field(FIELD *\fP\fIfield\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBFIELD *new_field(int \fIheight\fP, int \fIwidth\fP, + \fBint \fItoprow\fB, int \fIleftcol\fB,\fR + \fBint \fIoffscreen\fB, int \fInbuffers\fB);\fR +\fBFIELD *dup_field(FIELD *\fIfield\fB, int \fItoprow\fB, int \fIleftcol\fB);\fR +\fBFIELD *link_field(FIELD *\fIfield\fB, int \fItoprow\fB, int \fIleftcol\fB);\fR +\fBint free_field(FIELD *\fIfield\fB);\fR +.fi .SH DESCRIPTION The function \fBnew_field\fP allocates a new field and initializes it from the parameters given: height, width, row of upper-left corner, column of upper-left @@ -90,11 +88,6 @@ Routine detected an incorrect or out-of-range argument. .TP 5 .B E_CONNECTED field is connected. -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -106,3 +99,6 @@ not very explicit about what gets copied and what does not. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_field_opts.3x b/man/form_field_opts.3x index 56ffc2ed..9ab3ad0c 100644 --- a/man/form_field_opts.3x +++ b/man/form_field_opts.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2014,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,24 +27,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_opts.3x,v 1.29 2021/12/25 21:49:32 tom Exp $ -.TH form_field_opts 3X "" +.\" $Id: form_field_opts.3x,v 1.44 2024/03/16 15:35:01 tom Exp $ +.TH form_field_opts 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_field_opts\fP, \fBfield_opts_on\fP, \fBfield_opts_off\fP, -\fBfield_opts\fP \- set and get field options +\fBfield_opts\fP \- +set and get field options .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_field_opts(FIELD *\fP\fIfield\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP -.br -\fBField_Options field_opts(const FIELD *\fP\fIfield\fP\fB);\fP -.sp -\fBint field_opts_on(FIELD *\fP\fIfield\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP -.br -\fBint field_opts_off(FIELD *\fP\fIfield\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_field_opts(FIELD *\fIfield\fP, Field_Options \fIopts\fP); +\fBField_Options field_opts(const FIELD *\fIfield\fP); +.PP +\fBint field_opts_on(FIELD *\fIfield\fP, Field_Options \fIopts\fP); +\fBint field_opts_off(FIELD *\fIfield\fP, Field_Options \fIopts\fP); +.fi .SH DESCRIPTION The function \fBset_field_opts\fP sets all the given field's option bits (field option bits may be logically-OR'ed together). @@ -134,13 +133,6 @@ The field is the current field. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), -\fBform\fP(3X). -\fBform_field_just\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -148,3 +140,7 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X), +\fB\%form_field_just\fP(3X) diff --git a/man/form_field_userptr.3x b/man/form_field_userptr.3x index 8777b97b..6eea0920 100644 --- a/man/form_field_userptr.3x +++ b/man/form_field_userptr.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,17 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_userptr.3x,v 1.18 2021/12/25 21:41:58 tom Exp $ -.TH form_field_userptr 3X "" +.\" $Id: form_field_userptr.3x,v 1.30 2024/03/16 15:35:01 tom Exp $ +.TH form_field_userptr 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_field_userptr\fP, -\fBfield_userptr\fP \- associate application data with a form field +\fBfield_userptr\fP \- +associate application data with a form field .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_field_userptr(FIELD *\fP\fIfield\fP\fB, void *\fP\fIuserptr\fP\fB);\fP -.br -\fBvoid *field_userptr(const FIELD *\fP\fIfield\fP\fB);\fP +.nf +\fB#include +.PP +\fBint set_field_userptr(FIELD *\fIfield\fP, void *\fIuserptr\fP); +\fBvoid *field_userptr(const FIELD *\fIfield\fP); +.fi .SH DESCRIPTION Every form field has a field that can be used to hold application-specific data (that is, the form-driver code leaves it alone). @@ -49,11 +50,6 @@ The function \fBfield_userptr\fP returns a pointer (which may be \fBNULL\fP). It does not set \fBerrno\fP. .PP The function \fBset_field_userptr\fP returns \fBE_OK\fP (success). -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -64,3 +60,6 @@ We chose not to leave it as a char pointer for SVr4 compatibility. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_field_validation.3x b/man/form_field_validation.3x index b7a235c6..54fa2a72 100644 --- a/man/form_field_validation.3x +++ b/man/form_field_validation.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,43 +27,43 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_validation.3x,v 1.35 2021/12/25 21:49:32 tom Exp $ -.TH form_field_validation 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form_field_validation.3x,v 1.53 2024/03/16 15:35:01 tom Exp $ +.TH form_field_validation 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBform_field_validation\fP \- data type validation for fields +\fBform_field_validation\fP \- +data type validation for fields .SH SYNOPSIS -\fB#include \fP -.sp -\fBvoid *field_arg(const FIELD *\fP\fIfield\fP\fB);\fP -.br -\fBFIELDTYPE *field_type(const FIELD *\fP\fIfield\fP\fB);\fP -.br -\fBint set_field_type(FIELD *\fP\fIfield\fP\fB, FIELDTYPE *\fP\fItype\fP\fB, ...);\fP -.sp -/* predefined field types */ -.br -\fBFIELDTYPE *TYPE_ALNUM;\fP -.br -\fBFIELDTYPE *TYPE_ALPHA;\fP -.br -\fBFIELDTYPE *TYPE_ENUM;\fP -.br -\fBFIELDTYPE *TYPE_INTEGER;\fP -.br -\fBFIELDTYPE *TYPE_NUMERIC;\fP -.br -\fBFIELDTYPE *TYPE_REGEXP;\fP -.br -\fBFIELDTYPE *TYPE_IPV4;\fP -.br +.nf +\fB#include +.PP +\fBvoid *field_arg(const FIELD *\fIfield\fP); +\fBFIELDTYPE *field_type(const FIELD *\fIfield\fP); +\fBint set_field_type(FIELD *\fIfield\fP, FIELDTYPE *\fItype\fP, ...); +.PP +\fI/* predefined field types */\fP +\fBFIELDTYPE *TYPE_ALNUM; +\fBFIELDTYPE *TYPE_ALPHA; +\fBFIELDTYPE *TYPE_ENUM; +\fBFIELDTYPE *TYPE_INTEGER; +\fBFIELDTYPE *TYPE_NUMERIC; +\fBFIELDTYPE *TYPE_REGEXP; +\fBFIELDTYPE *TYPE_IPV4; +.fi .SH DESCRIPTION By default, no validation is done on form fields. You can associate a form with with a \fIfield type\fP, @@ -83,8 +83,7 @@ Most field types are configurable, via arguments which the caller provides when calling \fBset_field_type\fP. .PP Several field types are predefined by the form library. -.SS Predefined types -.PP +.SH PREDEFINED TYPES It is possible to set up new programmer-defined field types. Field types are implemented via the \fBFIELDTYPE\fP data structure, which contains several pointers to functions. @@ -94,27 +93,19 @@ which describes functions which can be used to construct a field-type dynamically. .PP The predefined types are as follows: -.TP 5 -TYPE_ALNUM +.SS TYPE_ALNUM Alphanumeric data. Required parameter: -.RS .bP a third \fBint\fP argument, a minimum field width. -.RE -.TP 5 -TYPE_ALPHA +.SS TYPE_ALPHA Character data. Required parameter: -.RS .bP a third \fBint\fP argument, a minimum field width. -.RE -.TP 5 -TYPE_ENUM +.SS TYPE_ENUM Accept one of a specified set of strings. Required parameters: -.RS .bP a third \fB(char **)\fP argument pointing to a string list; .bP @@ -124,15 +115,12 @@ a fifth \fBint\fP 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. -.RE -.IP +.PP The library copies the string list, so you may use a list that lives in automatic variables on the stack. -.TP 5 -TYPE_INTEGER +.SS TYPE_INTEGER Integer data, parsable to an integer by \fBatoi\fP(3). Required parameters: -.RS .bP a third \fBint\fP argument controlling the precision, .bP @@ -141,18 +129,15 @@ a fourth \fBlong\fP argument constraining minimum value, a fifth \fBlong\fP constraining maximum value. If the maximum value is less than or equal to the minimum value, the range is simply ignored. -.RE -.IP +.PP On return, the field buffer is formatted according to the \fBprintf\fP format specification \*(``.*ld\*('', where the \*(``*\*('' is replaced by the precision argument. -.IP +.PP For details of the precision handling see \fBprintf\fP(3). -.TP 5 -TYPE_NUMERIC +.SS TYPE_NUMERIC Numeric data (may have a decimal-point part). Required parameters: -.RS .bP a third \fBint\fP argument controlling the precision, .bP @@ -163,26 +148,22 @@ If your system 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. -.RE -.IP +.PP On return, the field buffer is formatted according to the \fBprintf\fP format specification \*(``.*f\*('', where the \*(``*\*('' is replaced by the precision argument. -.IP +.PP For details of the precision handling see \fBprintf\fP(3). -.TP 5 -TYPE_REGEXP +.SS TYPE_REGEXP Regular expression data. Required parameter: -.RS .bP a third argument, a regular expression \fB(char *)\fP string. The data is valid if the regular expression matches it. -.RE -.IP +.PP Regular expressions are in the format of \fBregcomp\fP and \fBregexec\fP. -.IP +.PP The regular expression must match the whole field. If you have for example, an eight character wide field, a regular expression "^[0\-9]*$" always @@ -192,21 +173,18 @@ you may use for example "^[0\-9]* *$" which is good for trailing spaces (up to an empty field), or "^ *[0\-9]* *$" which is good for leading and trailing spaces around the digits. -.TP 5 -TYPE_IPV4 +.SS TYPE_IPV4 An Internet Protocol Version 4 address. Required parameter: -.RS .bP none -.RE -.IP +.PP The form library checks whether or not the buffer has the form \fIa.b.c.d\fP, where \fIa\fP, \fIb\fP, \fIc\fP, and \fId\fP are numbers in the range 0 to 255. Trailing blanks in the buffer are ignored. The address itself is not validated. -.IP -This is an ncurses extension; +.PP +This is an \fI\%ncurses\fP extension; this field type may not be available in other curses implementations. .SH RETURN VALUE The functions \fBfield_type\fP and \fBfield_arg\fP return \fBNULL\fP on error. @@ -217,14 +195,6 @@ The routine succeeded. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), -\fBform\fP(3X), -\fBform_fieldtype\fP(3X), -\fBform_variables\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -232,3 +202,8 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X), +\fB\%form_fieldtype\fP(3X), +\fB\%form_variables\fP(3X) diff --git a/man/form_fieldtype.3x b/man/form_fieldtype.3x index ee5f909d..81a58b1d 100644 --- a/man/form_fieldtype.3x +++ b/man/form_fieldtype.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,36 +27,37 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_fieldtype.3x,v 1.30 2021/12/25 21:49:32 tom Exp $ +.\" $Id: form_fieldtype.3x,v 1.46 2024/03/16 15:35:01 tom Exp $ +.TH form_fieldtype 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.TH form_fieldtype 3X "" .SH NAME -\fBform_fieldtype\fP \- define validation-field types +\fBform_fieldtype\fP \- +define validation-field types .SH SYNOPSIS -\fB#include \fP -.sp -\fBFIELDTYPE *new_fieldtype(\fP - \fBbool (* const \fP\fIfield_check\fP\fB)(FIELD *, const void *),\fP - \fBbool (* const \fP\fIchar_check\fP\fB)(int, const void *));\fP -.br -\fBint free_fieldtype(FIELDTYPE *\fP\fIfieldtype\fP\fB);\fP -.sp +.nf +\fB#include +.PP +\fBFIELDTYPE *new_fieldtype( + \fBbool (* const \fIfield_check\fB)(FIELD *, const void *),\fR + \fBbool (* const \fIchar_check\fB)(int, const void *));\fR +\fBint free_fieldtype(FIELDTYPE *\fIfieldtype\fB);\fR +.PP \fBint set_fieldtype_arg(\fP - \fBFIELDTYPE *\fP\fIfieldtype\fP\fB,\fP - \fBvoid *(* const \fP\fImake_arg\fP\fB)(va_list *),\fP - \fBvoid *(* const \fP\fIcopy_arg\fP\fB)(const void *),\fP - \fBvoid (* const \fP\fIfree_arg\fP\fB)(void *));\fP -.br + \fBFIELDTYPE *\fIfieldtype\fB,\fR + \fBvoid *(* const \fImake_arg\fB)(va_list *),\fR + \fBvoid *(* const \fIcopy_arg\fB)(const void *),\fR + \fBvoid (* const \fIfree_arg\fB)(void *));\fR \fBint set_fieldtype_choice(\fP - \fBFIELDTYPE *\fP\fIfieldtype\fP\fB,\fP - \fBbool (* const \fP\fInext_choice\fP\fB)(FIELD *, const void *),\fP - \fBbool (* const \fP\fIprev_choice\fP\fB)(FIELD *, const void *));\fP -.sp -\fBFIELDTYPE *link_fieldtype(FIELDTYPE *\fP\fItype1\fP\fB,\fP - \fBFIELDTYPE *\fP\fItype2\fP\fB);\fP + \fBFIELDTYPE *\fIfieldtype\fB,\fR + \fBbool (* const \fInext_choice\fB)(FIELD *, const void *),\fR + \fBbool (* const \fIprev_choice\fB)(FIELD *, const void *));\fR +.PP +\fBFIELDTYPE *link_fieldtype(FIELDTYPE *\fItype1\fB,\fR + \fBFIELDTYPE *\fItype2\fB);\fR +.fi .SH DESCRIPTION .SS new_fieldtype The function \fBnew_fieldtype\fP creates a new field type usable for data @@ -82,11 +82,9 @@ 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. .SS free_fieldtype -.PP The \fBfree_fieldtype\fP function frees the space allocated for a given validation type by \fBnew_fieldtype\fP. .SS set_fieldtype_arg -.PP The function \fBset_fieldtype_arg\fP associates three storage-management functions with a field type: .TP 5 @@ -109,7 +107,6 @@ In this case, the form library assumes that \fImake_arg\fP does not allocate memory but simply loads the argument into a single scalar value. .SS set_fieldtype_choice -.PP The form driver requests \fBREQ_NEXT_CHOICE\fP and \fBREQ_PREV_CHOICE\fP 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. @@ -120,7 +117,6 @@ for the field type. These functions take the field pointer and an argument-block structure as arguments. .SS link_fieldtype -.PP The function \fBlink_fieldtype\fP creates a new field type from the two given types. They are connected by an logical 'OR'. @@ -154,13 +150,6 @@ The field is the current field. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), -\fBform\fP(3X), -\fBform_field_validation\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -168,3 +157,7 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X), +\fB\%form_field_validation\fP(3X) diff --git a/man/form_hook.3x b/man/form_hook.3x index 94396eee..d93d8d87 100644 --- a/man/form_hook.3x +++ b/man/form_hook.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,53 +27,52 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_hook.3x,v 1.18 2021/12/25 21:49:32 tom Exp $ -.TH form_hook 3X "" +.\" $Id: form_hook.3x,v 1.37 2024/03/16 15:35:01 tom Exp $ +.TH form_hook 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBform_hook\fP \- set hooks for automatic invocation by applications +\fBform_hook\fP \- +set hooks for automatic invocation by applications .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_field_init(FORM *\fP\fIform\fP\fB, Form_Hook \fP\fIfunc\fP\fB);\fP -.br -\fBForm_Hook field_init(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint set_field_term(FORM *\fP\fIform\fP\fB, Form_Hook \fP\fIfunc\fP\fB);\fP -.br -\fBForm_Hook field_term(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint set_form_init(FORM *\fP\fIform\fP\fB, Form_Hook \fP\fIfunc\fP\fB);\fP -.br -\fBForm_Hook form_init(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint set_form_term(FORM *\fP\fIform\fP\fB, Form_Hook \fP\fIfunc\fP\fB);\fP -.br -\fBForm_Hook form_term(const FORM *\fP\fIform\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_field_init(FORM *\fIform\fP, Form_Hook \fIfunc\fP); +\fBForm_Hook field_init(const FORM *\fIform\fP); +.PP +\fBint set_field_term(FORM *\fIform\fP, Form_Hook \fIfunc\fP); +\fBForm_Hook field_term(const FORM *\fIform\fP); +.PP +\fBint set_form_init(FORM *\fIform\fP, Form_Hook \fIfunc\fP); +\fBForm_Hook form_init(const FORM *\fIform\fP); +.PP +\fBint set_form_term(FORM *\fIform\fP, Form_Hook \fIfunc\fP); +\fBForm_Hook form_term(const FORM *\fIform\fP); +.fi .SH DESCRIPTION These functions make it possible to set hook functions to be called at various points in the automatic processing of input event codes by \fBform_driver\fP. -.PP -The function \fBset_field_init\fP sets a hook to be called at form-post time +.SS set_field_init +sets a hook to be called at form-post time and each time the selected field changes (after the change). -\fBfield_init\fP +.SS field_init returns the current field init hook, if any (\fBNULL\fP if there is no such hook). -.PP -The function \fBset_field_term\fP sets a hook to be called at form-unpost time +.SS set_field_term +sets a hook to be called at form-unpost time and each time the selected field changes (before the change). -\fBfield_term\fP +.SS field_term returns the current field term hook, if any (\fBNULL\fP if there is no such hook). -.PP -The function \fBset_form_init\fP sets a hook to be called at form-post time and +.SS set_form_init +sets a hook to be called at form-post time and just after a page change once it is posted. -\fBform_init\fP returns the -current form init hook, if any (\fBNULL\fP if there is no such hook). -.PP -The function \fBset_form_term\fP sets a hook to be called at form-unpost time +.SS form_init +returns the current form init hook, +if any (\fBNULL\fP if there is no such hook). +.SS set_form_term +sets a hook to be called at form-unpost time and just before a page change once it is posted. -\fBform_init\fP +.SS form_term returns the current form term hook, if any (\fBNULL\fP if there is no such hook). .SH RETURN VALUE @@ -87,11 +85,6 @@ The routine succeeded. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -99,3 +92,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_new.3x b/man/form_new.3x index 3cefa851..dc45e183 100644 --- a/man/form_new.3x +++ b/man/form_new.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_new.3x,v 1.17 2021/12/25 21:41:58 tom Exp $ -.TH form_new 3X "" +.\" $Id: form_new.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH form_new 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBnew_form\fP, -\fBfree_form\fP \- create and destroy forms +\fBfree_form\fP \- +create and destroy forms .SH SYNOPSIS -\fB#include \fP -.sp -\fBFORM *new_form(FIELD **\fP\fIfields\fP\fB);\fP -.br -\fBint free_form(FORM *\fP\fIform\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBFORM *new_form(FIELD **\fIfields\fP); +\fBint free_form(FORM *\fIform\fP); +.fi .SH DESCRIPTION The function \fBnew_form\fP creates a new form connected to a specified field pointer array (which must be \fBNULL\fP-terminated). @@ -72,11 +72,6 @@ Routine detected an incorrect or out-of-range argument. .TP 5 .B E_POSTED The form has already been posted. -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -84,3 +79,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_new_page.3x b/man/form_new_page.3x index 633ecbfe..c47a959d 100644 --- a/man/form_new_page.3x +++ b/man/form_new_page.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,22 +27,29 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_new_page.3x,v 1.19 2021/12/25 21:49:32 tom Exp $ -.TH form_new_page 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: form_new_page.3x,v 1.34 2024/03/16 15:35:01 tom Exp $ +.TH form_new_page 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME \fBset_new_page\fP, -\fBnew_page\fP \- form pagination functions +\fBnew_page\fP \- +form pagination functions .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_new_page(FIELD *\fP\fIfield\fP\fB, bool \fP\fInew_page_flag\fP\fB);\fP -.br -\fBbool new_page(const FIELD *\fP\fIfield\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_new_page(FIELD *\fIfield\fP, bool \fInew_page_flag\fP); +\fBbool new_page(const FIELD *\fIfield\fP); +.fi .SH DESCRIPTION The function \fBset_new_page\fP sets or resets a flag marking the given field as the beginning of a new page on its form. @@ -60,12 +66,6 @@ The routine succeeded. .TP 5 .B E_CONNECTED The given field is already connected to a form. -.SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed -descriptions of the entry points. -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -73,3 +73,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*('' +for detailed descriptions of the entry points. diff --git a/man/form_opts.3x b/man/form_opts.3x index 328637f5..74a36d2b 100644 --- a/man/form_opts.3x +++ b/man/form_opts.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,24 +27,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_opts.3x,v 1.19 2021/12/25 21:49:32 tom Exp $ -.TH form_opts 3X "" +.\" $Id: form_opts.3x,v 1.34 2024/03/16 15:35:01 tom Exp $ +.TH form_opts 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_form_opts\fP, \fBform_opts_on\fP, \fBform_opts_off\fP, -\fBform_opts\fP \- set and get form options +\fBform_opts\fP \- +set and get form options .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_form_opts(FORM *\fP\fIform\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP -.br -\fBField_Options form_opts(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint form_opts_on(FORM *\fP\fIform\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP -.br -\fBint form_opts_off(FORM *\fP\fIform\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_form_opts(FORM *\fIform\fP, Field_Options \fIopts\fP); +\fBField_Options form_opts(const FORM *\fIform\fP); +.PP +\fBint form_opts_on(FORM *\fIform\fP, Field_Options \fIopts\fP); +\fBint form_opts_off(FORM *\fIform\fP, Field_Options \fIopts\fP); +.fi .SH DESCRIPTION The function \fBset_form_opts\fP sets all the given form's option bits (form option bits may be logically-OR'ed together). @@ -75,11 +74,6 @@ The routine succeeded. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -87,3 +81,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_page.3x b/man/form_page.3x index a4f14d8e..fa538c62 100644 --- a/man/form_page.3x +++ b/man/form_page.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,25 +27,25 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_page.3x,v 1.21 2021/12/25 21:49:32 tom Exp $ -.TH form_page 3X "" +.\" $Id: form_page.3x,v 1.37 2024/03/16 15:35:01 tom Exp $ +.TH form_page 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBform_page\fP \- set and get form page number +\fBform_page\fP \- +set and get form page number .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_current_field(FORM *\fP\fIform\fP\fB, FIELD *\fP\fIfield\fP\fB);\fP -.br -\fBFIELD *current_field(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint unfocus_current_field(FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint set_form_page(FORM *\fP\fIform\fP\fB, int \fP\fIn\fP\fB);\fP -.br -\fBint form_page(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint field_index(const FIELD *\fP\fIfield\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_current_field(FORM *\fIform\fP, FIELD *\fIfield\fP); +\fBFIELD *current_field(const FORM *\fIform\fP); +.PP +\fBint unfocus_current_field(FORM *\fIform\fP); +.PP +\fBint set_form_page(FORM *\fIform\fP, int \fIn\fP); +\fBint form_page(const FORM *\fIform\fP); +.PP +\fBint field_index(const FIELD *\fIfield\fP); +.fi .SH DESCRIPTION The function \fBset_current_field\fP sets the current field of the given form; \fBcurrent_field\fP returns the current field of the given form. @@ -84,18 +83,16 @@ The form driver could not process the request. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -. -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. .PP -The \fBunfocus_current_field\fP function is an ncurses extension. +The \fBunfocus_current_field\fP function is an \fI\%ncurses\fP +extension. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_post.3x b/man/form_post.3x index 9fdb36c0..77e086e4 100644 --- a/man/form_post.3x +++ b/man/form_post.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_post.3x,v 1.18 2021/12/25 21:49:32 tom Exp $ -.TH form_post 3X "" +.\" $Id: form_post.3x,v 1.33 2024/03/16 15:35:01 tom Exp $ +.TH form_post 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBpost_form\fP, -\fBunpost_form\fP \- write or erase forms from associated subwindows +\fBunpost_form\fP \- +write or erase forms from associated subwindows .SH SYNOPSIS -\fB#include \fP -.sp -\fBint post_form(FORM *\fP\fIform\fP\fB);\fP -.br -\fBint unpost_form(FORM *\fP\fIform\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint post_form(FORM *\fIform\fP); +\fBint unpost_form(FORM *\fIform\fP); +.fi .SH DESCRIPTION The function \fBpost_form\fP displays a form to its associated subwindow. To trigger physical display of the subwindow, @@ -74,12 +74,6 @@ The form has already been posted. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -. -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -87,3 +81,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_requestname.3x b/man/form_requestname.3x index 423ef7e9..4075ea73 100644 --- a/man/form_requestname.3x +++ b/man/form_requestname.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,23 +27,22 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_requestname.3x,v 1.18 2021/12/25 21:41:58 tom Exp $ -.TH form_requestname 3X "" +.\" $Id: form_requestname.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH form_requestname 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBform_request_by_name\fP, -\fBform_request_name\fP \- handle printable form request names +\fBform_request_name\fP \- +handle printable form request names .SH SYNOPSIS -\fB#include \fP -.sp -\fBconst char *form_request_name(int \fP\fIrequest\fP\fB);\fP -.br -\fBint form_request_by_name(const char *\fP\fIname\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBconst char *form_request_name(int \fIrequest\fP); +\fBint form_request_by_name(const char *\fIname\fP); +.fi .SH DESCRIPTION -.SS form_request_name The function \fBform_request_name\fP returns the printable name of a form request code. -.SS form_request_name_by_name The function \fBform_request_by_name\fP searches in the name-table for a request with the given name and returns its request code. Otherwise E_NO_MATCH is returned. @@ -54,13 +52,8 @@ to \fBE_BAD_ARGUMENT\fP. .PP \fBform_request_by_name\fP returns \fBE_NO_MATCH\fP on error. It does not set \fBerrno\fP. -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. It is recommended that @@ -68,3 +61,6 @@ any code depending on them be conditioned using NCURSES_VERSION. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_userptr.3x b/man/form_userptr.3x index cdd36d8b..11c990c0 100644 --- a/man/form_userptr.3x +++ b/man/form_userptr.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_userptr.3x,v 1.21 2021/12/25 21:41:58 tom Exp $ -.TH form_userptr 3X "" +.\" $Id: form_userptr.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH form_userptr 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_form_userptr\fP, -\fBform_userptr\fP \- associate application data with a form item +\fBform_userptr\fP \- +associate application data with a form item .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_form_userptr(FORM *\fP\fIform\fP\fB, void *\fP\fIuserptr\fP\fB);\fP -.br -\fBvoid* form_userptr(const FORM *\fP\fIform\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_form_userptr(FORM *\fIform\fP, void *\fIuserptr\fP); +\fBvoid* form_userptr(const FORM *\fIform\fP); +.fi .SH DESCRIPTION Every form and every form item has a field that can be used to hold application-specific data (that is, the form-driver code leaves it alone). @@ -49,11 +49,6 @@ The function \fBform_userptr\fP returns a pointer (which may be \fBNULL\fP). It does not set \fBerrno\fP. .PP The function \fBset_form_userptr\fP returns \fBE_OK\fP (success). -.SH SEE ALSO -\fBcurses\fP(3X), \fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -64,3 +59,6 @@ We chose not to leave it as a char pointer for SVr4 compatibility. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%form\fP(3X) diff --git a/man/form_variables.3x b/man/form_variables.3x index 5a1712d5..7b11a1ab 100644 --- a/man/form_variables.3x +++ b/man/form_variables.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2023,2024 Thomas E. Dickey * .\" Copyright 2010-2013,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,32 +27,28 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_variables.3x,v 1.9 2021/12/25 21:50:36 tom Exp $ -.TH form_variables 3X "" -.na -.hy 0 +.\" $Id: form_variables.3x,v 1.18 2024/03/16 15:35:01 tom Exp $ +.TH form_variables 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBTYPE_ALNUM\fP, -\fBTYPE_ALPHA\fP, -\fBTYPE_ENUM\fP, -\fBTYPE_INTEGER\fP, -\fBTYPE_IPV4\fP, -\fBTYPE_NUMERIC\fP, -\fBTYPE_REGEXP\fP -\- form system global variables -.ad -.hy +\fB\%TYPE_ALNUM\fP, +\fB\%TYPE_ALPHA\fP, +\fB\%TYPE_ENUM\fP, +\fB\%TYPE_INTEGER\fP, +\fB\%TYPE_IPV4\fP, +\fB\%TYPE_NUMERIC\fP, +\fB\%TYPE_REGEXP\fP \- +form system global variables .SH SYNOPSIS .nf -\fB#include \fP +\fB#include .PP -\fBFIELDTYPE * TYPE_ALNUM;\fP -\fBFIELDTYPE * TYPE_ALPHA;\fP -\fBFIELDTYPE * TYPE_ENUM;\fP -\fBFIELDTYPE * TYPE_INTEGER;\fP -\fBFIELDTYPE * TYPE_IPV4;\fP -\fBFIELDTYPE * TYPE_NUMERIC;\fP -\fBFIELDTYPE * TYPE_REGEXP;\fP +\fBFIELDTYPE * TYPE_ALNUM; +\fBFIELDTYPE * TYPE_ALPHA; +\fBFIELDTYPE * TYPE_ENUM; +\fBFIELDTYPE * TYPE_INTEGER; +\fBFIELDTYPE * TYPE_IPV4; +\fBFIELDTYPE * TYPE_NUMERIC; +\fBFIELDTYPE * TYPE_REGEXP; .fi .SH DESCRIPTION These are building blocks for the form library, @@ -78,4 +74,4 @@ This holds a regular expression. The \fBTYPE_IPV4\fP variable is an extension not provided by older implementations of the form library. .SH SEE ALSO -\fBform\fP(3X). +\fB\%form\fP(3X) diff --git a/man/form_win.3x b/man/form_win.3x index 20c3b373..4a75b294 100644 --- a/man/form_win.3x +++ b/man/form_win.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,23 +27,23 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_win.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH form_win 3X "" +.\" $Id: form_win.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH form_win 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBform_win\fP \- make and break form window and subwindow associations +\fBform_win\fP \- +make and break form window and subwindow associations .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_form_win(FORM *\fP\fIform\fP\fB, WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBWINDOW *form_win(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint set_form_sub(FORM *\fP\fIform\fP\fB, WINDOW *\fP\fIsub\fP\fB);\fP -.br -\fBWINDOW *form_sub(const FORM *\fP\fIform\fP\fB);\fP -.sp -\fBint scale_form(const FORM *\fP\fIform\fP\fB, int *\fP\fIrows\fP\fB, int *\fP\fIcolumns\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_form_win(FORM *\fIform\fP, WINDOW *\fIwin\fP); +\fBWINDOW *form_win(const FORM *\fIform\fP); +.PP +\fBint set_form_sub(FORM *\fIform\fP, WINDOW *\fIsub\fP); +\fBWINDOW *form_sub(const FORM *\fIform\fP); +.PP +\fBint scale_form(const FORM *\fIform\fP, int *\fIrows\fP, int *\fIcolumns\fP); +.fi .SH DESCRIPTION Every form has an associated pair of \fBcurses\fP windows. The form window @@ -80,13 +79,6 @@ The form has already been posted. .TP 5 .B E_NOT_CONNECTED No items are connected to the form. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_variables\fP(3X), -\fBform\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V forms library. They were not supported on @@ -94,3 +86,7 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%form\fP(3X) diff --git a/man/infocmp.1m b/man/infocmp.1m index b0ff28ed..5f92c96d 100644 --- a/man/infocmp.1m +++ b/man/infocmp.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2017,2018 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,90 +28,86 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: infocmp.1m,v 1.80 2021/12/25 18:55:27 tom Exp $ -.TH @INFOCMP@ 1M "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.ds n 5 +.\" $Id: infocmp.1m,v 1.109 2024/03/16 15:35:01 tom Exp $ +.TH @INFOCMP@ 1M 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ' \(aq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ie t .ds ' \(aq +.el .ds ' ' +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +. .ds d @TERMINFO@ .SH NAME -\fB@INFOCMP@\fP \- compare or print out \fIterminfo\fP descriptions +\fB@INFOCMP@\fP \- +compare or print out \fIterminfo\fP descriptions .SH SYNOPSIS \fB@INFOCMP@\fP [\fB\-\ 1\ +c\ C\ +d\ D\ +e\ E\ F\ +g\ G\ +i\ I\ K\ -L\ -T\ -U\ -V\ -W\ -c\ -d\ -e\ -g\ -i\ l\ +L\ n\ p\ q\ r\ t\ +T\ u\ +U\ +V\ +W\ x\ \fP] -.br - [\fB\-v\fP \fIn\fP] [\fB\-s d\fP| \fBi\fP| \fBl\fP| \fBc\fP] [\fB\-Q\fP \fIn\fP] [\fB\-R \fP\fBsubset\fP] -.br + [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-Q\fR \fIn\fR] [\fB\-R \fBsubset\fR] [\fB\-w\fP\ \fIwidth\fP] [\fB\-A\fP\ \fIdirectory\fP] [\fB\-B\fP\ \fIdirectory\fP] -.br - [\fItermname\fP...] + [\fIterminal-type\fP ...] .SH DESCRIPTION \fB@INFOCMP@\fP can be used to compare a binary \fBterminfo\fP entry with other terminfo entries, rewrite a \fBterminfo\fP description to take advantage of the \fBuse=\fP terminfo field, or print out a \fBterminfo\fP description from the binary file (\fBterm\fP) in a variety of formats. -In all cases, the boolean +In all cases, the Boolean fields will be printed first, followed by the numeric fields, followed by the string fields. -.SS Default Options -If no options are specified and zero or one \fItermnames\fP are specified, the +.SS "Default Options" +If no options are specified and zero or one \fIterminal-types\fP are +specified, +the \fB\-I\fP option will be assumed. -If more than one \fItermname\fP is specified, +If more than one \fIterminal-type\fP is specified, the \fB\-d\fP option will be assumed. -.SS Comparison Options [\-d] [\-c] [\-n] +.SS "Comparison Options [\-d] [\-c] [\-n]" \fB@INFOCMP@\fP compares the \fBterminfo\fP description of the first terminal -\fItermname\fP with each of the descriptions given by the entries for the other -terminal's \fItermnames\fP. +\fIterminal-type\fP with each of the descriptions given by the entries +for the other terminal's \fIterminal-types\fP. If a capability is defined for only one of the terminals, the value returned depends on the type of the capability: .bP -\fBF\fP for missing boolean variables +\fBF\fP for missing Boolean variables .bP \fBNULL\fP for missing integer or string variables .PP @@ -146,25 +142,25 @@ Normally only the conventional capabilities are shown. Use the \fB\-x\fP option to add the BSD-compatibility capabilities (names prefixed with \*(``OT\*(''). .IP -If no \fItermnames\fP are given, -\fB@INFOCMP@\fP uses the environment variable \fBTERM\fP -for each of the \fItermnames\fP. -.SS Source Listing Options [\-I] [\-L] [\-C] [\-r] +If no \fIterminal-types\fP are given, +\fB@INFOCMP@\fP uses the environment variable \fITERM\fP +for each of the \fIterminal-types\fP. +.SS "Source Listing Options [\-I] [\-L] [\-C] [\-r]" The \fB\-I\fP, \fB\-L\fP, and \fB\-C\fP options will produce a source listing for each terminal named. -. +.PP .TS -center tab(/) ; -l l . -\fB\-I\fP/use the \fBterminfo\fP names -\fB\-L\fP/use the long C variable name listed in <\fBterm.h\fP> -\fB\-C\fP/use the \fBtermcap\fP names -\fB\-r\fP/when using \fB\-C\fP, put out all capabilities in \fBtermcap\fP form -\fB\-K\fP/modifies the \fB\-C\fP option, improving BSD-compatibility. +center; +Lb L. +\-I use \fIterminfo\fP capability codes +\-L use \*(``long\*('' capability names +\-C use \fItermcap\fP capability codes +\-r with \fB\-C\fP, include nonstandard capabilities +\-K with \fB\-C\fP, improve BSD compatibility .TE .PP -If no \fItermnames\fP are given, the environment variable \fBTERM\fP will be -used for the terminal name. +If no \fIterminal-types\fP are given, +the environment variable \fITERM\fP will be used for the terminal name. .PP The source produced by the \fB\-C\fP option may be used directly as a \fBtermcap\fP entry, but not all parameterized strings can be changed to @@ -215,28 +211,34 @@ will not necessarily reproduce the original \fBterminfo\fP source. .PP Some common \fBterminfo\fP parameter sequences, their \fBtermcap\fP equivalents, and some terminal types which commonly have such sequences, are: -. +.PP .TS -center tab(/) ; -l c l -l l l. -\fBterminfo/termcap\fP/Representative Terminals -= -\fB%p1%c/%.\fP/adm -\fB%p1%d/%d\fP/hp, ANSI standard, vt100 -\fB%p1%'x'%+%c/%+x\fP/concept -\fB%i/%i\fPq/ANSI standard, vt100 -\fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fP/concept -\fB%p2\fP is printed before \fB%p1/%r\fP/hp +center; +Lf(BI) Lf(BI) L +Lb Lb L. +terminfo termcap Terminal Types +_ +.\" ansi-m cup (adm3a has other stuff in between, more like concept) +%p1%c %. ansi\-m +.\" ansi cub, vt100 cub +%p1%d %d ansi, vt100 +.\" vt52 cup (via vt52-basic) +%p1%\*' \*'%+%c %+x vt52 +.\" ansi cup, vt100 cup +%i %iq ansi, vt100 +.\" annarbor4080 cup +%p1%?%\*'x\*'%>%t%p1%\*'y\*'%+%; %>xy annarbor4080 +.\" hpgeneric cup +%p2\fR\|.\|.\|.\|\fP%p1 %r hpgeneric .TE -.SS Use= Option [\-u] +.SS "Use= Option [\-u]" The \fB\-u\fP option produces a \fBterminfo\fP source description of the first -terminal \fItermname\fP which is relative to the sum of the descriptions given -by the entries for the other terminals \fItermnames\fP. +terminal \fIterminal-type\fP which is relative to the sum of the +descriptions given by the entries for the other \fIterminal-types\fP. It does this by -analyzing the differences between the first \fItermname\fP and the other -\fItermnames\fP and producing a description with \fBuse=\fP fields for the -other terminals. +analyzing the differences between the first \fIterminal-types\fP and the +other \fIterminal-types\fP and producing a description with \fBuse=\fP +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 exist, but @@ -246,21 +248,24 @@ will show what can be done to change one description to be relative to the other. .PP A capability will be printed with an at-sign (@) if it no longer exists in the -first \fItermname\fP, but one of the other \fItermname\fP entries contains a -value for it. +first \fIterminal-type\fP, +but one of the other \fIterminal-type\fP entries contains a value for +it. A capability's value will be printed if the value in the first -\fItermname\fP is not found in any of the other \fItermname\fP entries, or if -the first of the other \fItermname\fP entries that has this capability gives a -different value for the capability than that in the first \fItermname\fP. +\fIterminal-type\fP is not found in any of the other \fIterminal-type\fP +entries, +or if the first of the other \fIterminal-type\fP entries that has this +capability gives a different value for the capability than that in the +first \fIterminal-type\fP. .PP -The order of the other \fItermname\fP entries is significant. +The order of the other \fIterminal-type\fP entries is significant. Since the terminfo compiler \fB@TIC@\fP does a left-to-right scan of the capabilities, specifying two \fBuse=\fP entries that contain differing entries for the same capabilities will produce different results depending on the order that the entries are given in. \fB@INFOCMP@\fP will flag any such inconsistencies between -the other \fItermname\fP entries as they are found. +the other \fIterminal-type\fP entries as they are found. .PP Alternatively, specifying a capability \fIafter\fP a \fBuse=\fP entry that contains that capability will cause the second specification to be ignored. @@ -271,22 +276,24 @@ description. Another error that does not cause incorrect compiled files, but will slow down the compilation time, is specifying extra \fBuse=\fP fields that are superfluous. -\fB@INFOCMP@\fP will flag any other \fItermname use=\fP fields that +\fB@INFOCMP@\fP will flag any other \fIterminal-type use=\fP fields that were not needed. -.SS Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR] -Like other \fBncurses\fP utilities, +.SS "Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR]" +Like other \fI\%ncurses\fP utilities, \fB@INFOCMP@\fP looks for the terminal descriptions in several places. -You can use the \fBTERMINFO\fP and \fBTERMINFO_DIRS\fP environment variables -to override the compiled-in default list of places to search -(see \fBcurses\fP(3X) for details). +You can use the \fI\%TERMINFO\fP and \fI\%TERMINFO_DIRS\fP environment +variables to override the compiled-in default list of places to search. +See \fBcurses\fP(3X), as well as +the \fIFetching Compiled Descriptions\fP section in \fBterminfo\fR(5). .PP You can also use the options \fB\-A\fP and \fB\-B\fP to override the list of places to search when comparing terminal descriptions: .bP -The \fB\-A\fP option sets the location for the first \fItermname\fP +The \fB\-A\fP option sets the location for the first \fIterminal-type\fP .bP -The \fB\-B\fP option sets the location for the other \fItermnames\fP. +The \fB\-B\fP option sets the location for the other +\fIterminal-types\fP. .PP Using these options, it is possible to compare descriptions for a terminal with the same name located in two different @@ -294,7 +301,7 @@ databases. For instance, you can use this feature for comparing descriptions for the same terminal created by different people. -.SS Other Options +.SS "Other Options" .TP 5 \fB\-0\fP causes the fields to be printed on one line, without wrapping. @@ -323,9 +330,10 @@ 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. .sp -Before ncurses 5.0, the split between the \fB\-e\fP and \fB\-E\fP -options was not needed; but support for extended names required making -the arrays of terminal capabilities separate from the TERMTYPE structure. +Before \fI\%ncurses\fP 5.0, +the split between the \fB\-e\fP and \fB\-E\fP options was not needed; +but support for extended names required making the arrays of terminal +capabilities separate from the TERMTYPE structure. .TP 5 \fB\-e\fP Dump the capabilities of the given terminal as a C initializer for a @@ -378,45 +386,45 @@ translated into {}-bracketed descriptions. .IP Here is a list of the DEC/ANSI special sequences recognized: +.PP .TS -center tab(/) ; -l l -l l. -Action/Meaning -= -RIS/full reset -SC/save cursor -RC/restore cursor -LL/home-down -RSR/reset scroll region -= -DECSTR/soft reset (VT320) -S7C1T/7-bit controls (VT220) -= -ISO DEC G0/enable DEC graphics for G0 -ISO UK G0/enable UK chars for G0 -ISO US G0/enable US chars for G0 -ISO DEC G1/enable DEC graphics for G1 -ISO UK G1/enable UK chars for G1 -ISO US G1/enable US chars for G1 -= -DECPAM/application keypad mode -DECPNM/normal keypad mode -DECANSI/enter ANSI mode -= -ECMA[+\-]AM/keyboard action mode -ECMA[+\-]IRM/insert replace mode -ECMA[+\-]SRM/send receive mode -ECMA[+\-]LNM/linefeed mode -= -DEC[+\-]CKM/application cursor keys -DEC[+\-]ANM/set VT52 mode -DEC[+\-]COLM/132-column mode -DEC[+\-]SCLM/smooth scroll -DEC[+\-]SCNM/reverse video mode -DEC[+\-]OM/origin mode -DEC[+\-]AWM/wraparound mode -DEC[+\-]ARM/auto-repeat mode +center; +L L. +Action Meaning +_ +RIS full reset +SC save cursor +RC restore cursor +LL home-down +RSR reset scroll region +_ +DECSTR soft reset (VT320) +S7C1T 7-bit controls (VT220) +_ +ISO DEC G0 enable DEC graphics for G0 +ISO UK G0 enable UK chars for G0 +ISO US G0 enable US chars for G0 +ISO DEC G1 enable DEC graphics for G1 +ISO UK G1 enable UK chars for G1 +ISO US G1 enable US chars for G1 +_ +DECPAM application keypad mode +DECPNM normal keypad mode +DECANSI enter ANSI mode +_ +ECMA[+\-]AM keyboard action mode +ECMA[+\-]IRM insert replace mode +ECMA[+\-]SRM send receive mode +ECMA[+\-]LNM linefeed mode +_ +DEC[+\-]CKM application cursor keys +DEC[+\-]ANM set VT52 mode +DEC[+\-]COLM 132-column mode +DEC[+\-]SCLM smooth scroll +DEC[+\-]SCNM reverse video mode +DEC[+\-]OM origin mode +DEC[+\-]AWM wraparound mode +DEC[+\-]ARM auto-repeat mode .TE .sp It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set @@ -455,10 +463,13 @@ hexadecimal and base64 .RE .IP For example, this prints the compiled terminfo value as a string -which could be assigned to the \fBTERMINFO\fP environment variable: -.NS -@INFOCMP@ -0 -q -Q2 -.NE +which could be assigned to the \fI\%TERMINFO\fP environment variable: +.PP +.RS 9 +.EX +@INFOCMP@ \-0 \-q \-Q2 +.EE +.RE .TP 5 \fB\-q\fP This makes the output a little shorter: @@ -473,7 +484,7 @@ However, show differences between absent and cancelled capabilities. Omit the \*(``Reconstructed from\*('' comment for source listings. .RE .TP 5 -\fB\-R\fP\fIsubset\fP +\fB\-R\fIsubset\fR 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 @@ -483,18 +494,30 @@ that have their own extensions incompatible with SVr4/XSI. .bP Available terminfo subsets are \*(``SVr1\*('', \*(``Ultrix\*('', \*(``HP\*('', and \*(``AIX\*(''; -see \fBterminfo\fP(\*n) for details. +see \fBterminfo\fP(5) for details. .bP You can also choose the subset \*(``BSD\*('' which selects only capabilities with termcap equivalents recognized by 4.4BSD. -The \fB\-C\fP option sets the \*(``BSD\*('' subset as a side-effect. .bP If you select any other value for \fB\-R\fP, it is the same as no subset, i.e., all capabilities are used. -The \fB\-I\fP option likewise selects no subset as a side-effect. +.RE +.IP +A few options override the subset selected with \fB\-R\fP, +if they are processed later in the command parameters: +.RS +.TP 5 +\fB\-C\fP +sets the \*(``BSD\*('' subset as a side-effect. +.TP 5 +\fB\-I\fP +sets the subset to all capabilities. +.TP 5 +\fB\-r\fP +sets the subset to all capabilities. .RE .TP -\fB\-s \fP\fI[d|i|l|c]\fP +\fB\-s \fI[d|i|l|c]\fR The \fB\-s\fP option sorts the fields within each type according to the argument below: .br @@ -537,14 +560,16 @@ since it excludes the inferences that \fB@INFOCMP@\fP makes to fill in missing data. .TP 5 \fB\-V\fP -reports the version of ncurses which was used in this program, and exits. +reports the version of \fI\%ncurses\fP which was used in this program, +and exits. .TP 5 \fB\-v\fP \fIn\fP prints out tracing information on standard error as the program runs. .IP The optional parameter \fIn\fP 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 \fI\%ncurses\fP is built without tracing support, +the optional parameter is ignored. .TP \fB\-W\fP By itself, the \fB\-w\fP option will not force long strings to be wrapped. @@ -554,41 +579,13 @@ Use the \fB\-W\fP option to do this. changes the output to \fIwidth\fP characters. .TP \fB\-x\fP -print information for user-defined capabilities (see \fBuser_caps(\*n)\fP. +print information for user-defined capabilities (see \fBuser_caps\fP(5). These are extensions to the terminfo repertoire which can be loaded using the \fB\-x\fP option of \fB@TIC@\fP. .SH FILES -.TP 20 -\*d -Compiled terminal description database. -.SH HISTORY -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 \fBinfocmp\fP in early 1984, -for System V Release 3. -.PP -Eric Raymond used the AT&T documentation in 1995 to provide an equivalent -\fB@INFOCMP@\fP for ncurses. -In addition, he added a few new features such as: -.bP -the \fB\-e\fP option, to support \fIfallback\fP -(compiled-in) terminal descriptions -.bP -the \fB\-i\fP option, to help with analysis -.PP -Later, Thomas Dickey added the \fB\-x\fP (user-defined capabilities) -option, and the \fB\-E\fP option to support fallback entries with -user-defined capabilities. -.PP -For a complete list, see the \fIEXTENSIONS\fP section. -.PP -In 2010, Roy Marples provided an \fBinfocmp\fP program for NetBSD. -It is less capable than the SVr4 or ncurses versions -(e.g., it lacks the sorting options documented in X/Open), -but does include the \fB\-x\fP option adapted from ncurses. -.SH PORTABILITY -X/Open Curses, Issue 7 (2009) provides a description of \fBinfocmp\fP. -It does not mention the options used for converting to termcap format. +.TP +.I \*d +compiled terminal description database .SH EXTENSIONS The \fB\-0\fP, @@ -622,23 +619,49 @@ is System V Release 4's. Actual BSD curses versions will have a more restricted set. To see only the 4.4BSD set, use \fB\-r\fP \fB\-RBSD\fP. -.SH BUGS -The \fB\-F\fP option of \fB@INFOCMP@\fP(1M) should be a \fB@TOE@\fP(1M) mode. -.SH SEE ALSO -\fB@CAPTOINFO@\fP(1M), -\fB@INFOTOCAP@\fP(1M), -\fB@TIC@\fP(1M), -\fB@TOE@\fP(1M), -\fBcurses\fP(3X), -\fBterminfo\fP(\*n). -\fBuser_caps\fP(\*n). -.sp -https://invisible-island.net/ncurses/tctest.html +.SH PORTABILITY +X/Open Curses, Issue 7 (2009) provides a description of \fBinfocmp\fP. +It does not mention the options used for converting to termcap format. +.SH HISTORY +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 \fBinfocmp\fP in early 1984, +for System V Release 3. +.PP +Eric Raymond used the AT&T documentation in 1995 to provide an equivalent +\fB@INFOCMP@\fP for \fI\%ncurses\fP. +In addition, he added a few new features such as: +.bP +the \fB\-e\fP option, to support \fIfallback\fP +(compiled-in) terminal descriptions +.bP +the \fB\-i\fP option, to help with analysis +.PP +Later, Thomas Dickey added the \fB\-x\fP (user-defined capabilities) +option, and the \fB\-E\fP option to support fallback entries with +user-defined capabilities. +.PP +For a complete list, see the \fIEXTENSIONS\fP section. .PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.SH AUTHOR +In 2010, Roy Marples provided an \fBinfocmp\fP program for NetBSD. +It is less capable than the SVr4 or \fI\%ncurses\fP versions +(e.g., it lacks the sorting options documented in X/Open), +but does include the \fB\-x\fP option adapted from \fI\%ncurses\fP. +.SH BUGS +The \fB\-F\fP option of \fB\%@INFOCMP@\fP(1M) should be a +\fB\%@TOE@\fP(1M) mode. +.SH AUTHORS Eric S. Raymond and .br -Thomas E. Dickey +Thomas E. Dickey +.SH SEE ALSO +\fB\%@CAPTOINFO@\fP(1M), +\fB\%@INFOTOCAP@\fP(1M), +\fB\%@TIC@\fP(1M), +\fB\%@TOE@\fP(1M), +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5), +\fB\%user_caps\fP(5) +.PP +https://invisible\-island.net/ncurses/tctest.html diff --git a/man/infotocap.1m b/man/infotocap.1m index ef57bfbf..0f0335d4 100644 --- a/man/infotocap.1m +++ b/man/infotocap.1m @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1999-2010,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,54 +27,71 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: infotocap.1m,v 1.19 2021/12/25 21:49:32 tom Exp $ -.TH @INFOTOCAP@ 1M "" -.ds n 5 +.\" $Id: infotocap.1m,v 1.41 2024/03/16 15:35:01 tom Exp $ +.TH @INFOTOCAP@ 1M 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .ds d @TERMINFO@ .SH NAME -\fB@INFOTOCAP@\fP \- convert a \fIterminfo\fP description into a \fItermcap\fP description +\fB\%@INFOTOCAP@\fP \- +convert a \fI\%terminfo\fR description into a \fI\%termcap\fR description .SH SYNOPSIS -\fB@INFOTOCAP@\fP [\fB\-v\fP\fIn\fP \fIwidth\fP] [\fB\-V\fP] [\fB\-1\fP] [\fB\-w\fP \fIwidth\fP] \fIfile\fP ... +.B @INFOTOCAP@ +.RI [ tic-option ] +.I file +\&.\|.\|. +.P +.B "@INFOTOCAP@ \-V" .SH DESCRIPTION -\fB@INFOTOCAP@\fP looks in each given text -\fIfile\fP for \fBterminfo\fP descriptions. -For each terminfo description found, -an equivalent \fBtermcap\fP description is written to standard output. -Terminfo \fBuse\fP capabilities are translated directly to termcap -\fBtc\fP capabilities. -.TP 5 -\fB\-v\fP -print out tracing information on standard error as the program runs. -.TP 5 -\fB\-V\fP -print out the version of the program in use on standard error and exit. -.TP 5 -\fB\-1\fP -cause the fields to print out one to a line. -Otherwise, the fields -will be printed several to a line to a maximum width of 60 characters. -.TP 5 -\fB\-w\fP -change the output to \fIwidth\fP characters. +\fB\%@INFOTOCAP@\fP translates terminal descriptions. +It looks in each given text \fIfile\fP for \fI\%terminfo\fP entries and, +For each one found, +it writes an analogous \fI\%termcap\fP description to the standard +output stream. +\fI\%terminfo\fP \*(``\fBuse\fP\*('' capabilities translate to +\fI\%termcap\fP \fBtc\fP capabilities. +Because \fI\%termcap\fP is a less expressive format than +\fI\%terminfo\fP, +some capabilities cannot be translated. +.PP +This utility is implemented as a link to \fB\%@TIC@\fP(1M), +with the latter's +.B \-C +option implied. +You can use other \fB\%@TIC@\fP options such as +.BR \-1 , +.BR \-f , +.BR \-v , +.BR \-w , +and +.BR \-x . +The \fB\-V\fP option reports the version of \fI\%ncurses\fP associated +with this program and exits with a successful status. .SH FILES -.TP 20 -\*d -Compiled terminal description database. -.SH NOTES -This utility is actually a link to \fB@TIC@\fP, running in \fI\-C\fP mode. -You can use other \fB@TIC@\fP options such as \fB\-f\fP and \fB\-x\fP. +.TP +.I \*d +compiled terminal description database .SH PORTABILITY -None of X/Open Curses, Issue 7 (2009), SVr4 or NetBSD document this application. -.SH SEE ALSO -\fB@INFOCMP@\fP(1M), -\fB@TIC@\fP(1M), -\fBcurses\fP(3X), -\fBterminfo\fP(\*n) -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.SH AUTHOR +None of X/Open Curses, +Issue 7 (2009), +SVr4, +or NetBSD document this application. +.SH AUTHORS Eric S. Raymond and .br -Thomas E. Dickey +Thomas E. Dickey +.SH SEE ALSO +\fB\%@INFOCMP@\fP(1M), +\fB\%@TIC@\fP(1M), +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/key_defined.3x b/man/key_defined.3x index f510b4b5..f0184aa7 100644 --- a/man/key_defined.3x +++ b/man/key_defined.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2003-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,16 +29,19 @@ .\" .\" Author: Thomas E. Dickey 2003 .\" -.\" $Id: key_defined.3x,v 1.12 2021/12/25 21:41:58 tom Exp $ -.TH key_defined 3X "" +.\" $Id: key_defined.3x,v 1.34 2024/03/16 15:35:01 tom Exp $ +.TH key_defined 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBkey_defined\fP \- check if a keycode is defined +\fB\%key_defined\fP \- +test whether a \fIcurses\fR keycode is defined .SH SYNOPSIS -\fB#include \fP -.sp -\fBint key_defined(const char *\fP\fIdefinition\fP\fB);\fP +.nf +\fB#include +.PP +\fBint key_defined(const char *\fIdefinition\fP); +.fi .SH DESCRIPTION -This is an extension to the curses library. +This is an extension to the \fIcurses\fP library. It permits an application to determine if a string is currently bound to any keycode. .SH RETURN VALUE @@ -47,12 +50,12 @@ If no keycode is bound, zero is returned. If the string conflicts with longer strings which are bound to keys, \-1 is returned. .SH PORTABILITY -These routines are specific to ncurses. -They were not supported on +This routine is specific to \fI\%ncurses\fP. +It was not supported on Version 7, BSD or System V implementations. It is recommended that -any code depending on them be conditioned using NCURSES_VERSION. +any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP. +.SH AUTHORS +Thomas Dickey .SH SEE ALSO -\fBdefine_key\fP(3X). -.SH AUTHOR -Thomas Dickey. +\fB\%define_key\fP(3X) diff --git a/man/keybound.3x b/man/keybound.3x index f2559486..bd8bb80f 100644 --- a/man/keybound.3x +++ b/man/keybound.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1999-2008,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,33 +29,37 @@ .\" .\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: keybound.3x,v 1.13 2021/12/25 21:41:58 tom Exp $ -.TH keybound 3X "" +.\" $Id: keybound.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH keybound 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBkeybound\fP \- return definition of keycode +\fB\%keybound\fP \- +get definition of \fIcurses\fR keycode .SH SYNOPSIS -\fB#include \fP -.sp -\fBchar * keybound(int \fP\fIkeycode\fP\fB, int \fP\fIcount);\fP +.nf +\fB#include +.PP +\fBchar * keybound(int \fIkeycode\fP, int \fIcount\fP); +.fi .SH DESCRIPTION -This is an extension to the curses library. +This is an extension to the \fIcurses\fP library. It permits an application to determine the string which is defined in the terminfo for specific keycodes. .SH RETURN VALUE -The \fIkeycode\fP parameter must be greater than zero, else NULL is returned. -If it does not correspond to a defined key, then NULL is returned. +The \fIkeycode\fP parameter must be greater than zero, +else \fBNULL\fP is returned. +If it does not correspond to a defined key, then \fBNULL\fP is returned. The \fIcount\fP parameter is used to allow the application to iterate through multiple definitions, counting from zero. When successful, the function returns a string which must be freed by the caller. .SH PORTABILITY -These routines are specific to ncurses. -They were not supported on +This routine is specific to \fI\%ncurses\fP. +It was not supported on Version 7, BSD or System V implementations. It is recommended that -any code depending on them be conditioned using NCURSES_VERSION. +any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP. +.SH AUTHORS +Thomas Dickey .SH SEE ALSO -\fBdefine_key\fP(3X), -\fBkeyok\fP(3X). -.SH AUTHOR -Thomas Dickey. +\fB\%define_key\fP(3X), +\fB\%keyok\fP(3X) diff --git a/man/keyok.3x b/man/keyok.3x index 8d8a8a82..b4c7de2b 100644 --- a/man/keyok.3x +++ b/man/keyok.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,18 +29,21 @@ .\" .\" Author: Thomas E. Dickey 1997 .\" -.\" $Id: keyok.3x,v 1.18 2021/12/25 21:41:58 tom Exp $ -.TH keyok 3X "" +.\" $Id: keyok.3x,v 1.40 2024/03/16 15:35:01 tom Exp $ +.TH keyok 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBkeyok\fP \- enable or disable a keycode +\fB\%keyok\fP \- +enable or disable a \fIcurses\fR keycode .SH SYNOPSIS -\fB#include \fP -.sp -\fBint keyok(int \fP\fIkeycode\fP\fB, bool \fP\fIenable\fP\fB);\fP +.nf +\fB#include +.PP +\fBint keyok(int \fIkeycode\fP, bool \fIenable\fP); +.fi .SH DESCRIPTION -This is an extension to the curses library. +This is an extension to the \fIcurses\fP library. It permits an application to disable specific keycodes, rather than -use the \fBkeypad\fP function to disable all keycodes. +use the \fB\%keypad\fP function to disable all keycodes. Keys that have been disabled can be re-enabled. .SH RETURN VALUE The keycode must be greater than zero, else \fBERR\fP is returned. @@ -49,12 +52,12 @@ If the \fIenable\fP parameter is true, then the key must have been disabled, and vice versa. Otherwise, the function returns \fBOK\fP. .SH PORTABILITY -These routines are specific to ncurses. -They were not supported on +This routine is specific to \fI\%ncurses\fP. +It was not supported on Version 7, BSD or System V implementations. It is recommended that -any code depending on them be conditioned using NCURSES_VERSION. +any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP. +.SH AUTHORS +Thomas Dickey .SH SEE ALSO -\fBdefine_key\fP(3X). -.SH AUTHOR -Thomas Dickey. +\fB\%define_key\fP(3X) diff --git a/man/legacy_coding.3x b/man/legacy_coding.3x index 48edbbe3..ccfdd556 100644 --- a/man/legacy_coding.3x +++ b/man/legacy_coding.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2020,2021 Thomas E. Dickey * +.\" Copyright 2020-2023,2024 Thomas E. Dickey * .\" Copyright 2005-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,47 +29,75 @@ .\" .\" Author: Thomas E. Dickey .\" -.\" $Id: legacy_coding.3x,v 1.10 2021/12/25 17:39:16 tom Exp $ -.TH legacy_coding 3X "" +.\" $Id: legacy_coding.3x,v 1.28 2024/04/20 19:13:50 tom Exp $ +.TH legacy_coding 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBuse_legacy_coding\fP \- override locale-encoding checks +\fB\%use_legacy_coding\fP \- +override \fIcurses\fR locale encoding checks .SH SYNOPSIS -\fB#include \fP -.sp -\fBint use_legacy_coding(int \fP\fIlevel\fP\fB);\fP +.nf +\fB#include +.PP +\fBint use_legacy_coding(int \fIlevel\fP); +.fi .SH DESCRIPTION -The \fBuse_legacy_coding\fP function is an extension to the curses library. -It allows the caller to change the result of \fBunctrl\fP, -and suppress related checks within the library that would normally -cause nonprinting characters to be rendered in visible form. -This affects only 8-bit characters. +.B \%use_legacy_coding +is an extension to the +.I curses +library. +It allows the caller to change the result of \fB\%unctrl\fP(3X), +suppressing \fI\%isprint\fP(3)-based checks within the library that +would normally cause nonprinting characters to be rendered in visible +form. +The alteration affects only eight-bit characters. .PP -The \fIlevel\fP parameter controls the result: +The +.I level +parameter controls the result. .RS .TP 5 -0 -the library functions normally, -rendering nonprinting characters as described in \fBunctrl\fP. +.B 0 +The library functions normally, +rendering nonprinting characters as described in \fB\%unctrl\fP(3X), .TP -1 -the library ignores \fBisprintf\fP for codes in the range 160-255. +.B 1 +the library ignores +.I \%isprint +for codes in the range 160-255. .TP -2 -the library ignores \fBisprintf\fP for codes in the range 128-255. -It also modifies the output of \fBunctrl\fP, showing codes in the -range 128-159 as is. +.B 2 +the library ignores +.I \%isprint +for codes in the range 128-255. +It also modifies the output of \fB\%unctrl\fP(3X), +showing codes in the range 128-159 as is. .RE .SH RETURN VALUE If the screen has not been initialized, -or the \fIlevel\fP parameter is out of range, -the function returns \fBERR\fP. -Otherwise, it returns the previous level: \fB0\fP, \fB1\fP or \fB2\fP. +or the +.I level +parameter is out of range, +.B \%use_legacy_coding +returns +.BR ERR . +Otherwise, +it returns the previous level: +.BR 0 , +.BR 1 , +or +.BR 2 . .SH PORTABILITY -This routine is specific to ncurses. +.B \%use_legacy_coding +is specific to +.IR \%ncurses . It was not supported on Version 7, BSD or System V implementations. -It is recommended that any code depending on ncurses extensions -be conditioned using NCURSES_VERSION. +Applications employing +.I \%ncurses +extensions should condition their use on the visibility of the +.B \%NCURSES_VERSION +preprocessor macro. +.SH AUTHORS +Thomas Dickey +(to support \fI\%lynx\fP(1)'s font-switching feature). .SH SEE ALSO -\fBunctrl\fP(3X). -.SH AUTHOR -Thomas Dickey (to support lynx's font-switching feature). +\fB\%unctrl\fP(3X) diff --git a/man/make_sed.sh b/man/make_sed.sh index 2a60cbdd..ee7df417 100755 --- a/man/make_sed.sh +++ b/man/make_sed.sh @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: make_sed.sh,v 1.13 2021/12/25 17:39:16 tom Exp $ +# $Id: make_sed.sh,v 1.19 2023/12/07 01:16:43 tom Exp $ ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2022,2023 Thomas E. Dickey # # Copyright 1998-2005,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -29,7 +29,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997-2005 +# Author: Thomas E. Dickey 1997 # # Construct a sed-script to perform renaming within man-pages. Originally # written in much simpler form, this one accounts for the common cases of @@ -46,8 +46,9 @@ UPPER=upper$$ SCRIPT=script$$ RESULT=result$$ rm -f $UPPER $SCRIPT $RESULT -trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT" 0 1 2 3 15 -fgrep -v \# $1 | \ +trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT; exit 1" 1 2 3 15 +trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT" 0 +${FGREP-grep -F} -v \# "$1" | \ sed -e 's/[ ][ ]*/ /g' >$INPUT for F in 1 2 3 4 @@ -64,27 +65,31 @@ paste $COL.* | \ sed -e 's/^/s\/\\$UPPER -echo "# Do the TH lines" >>$RESULT +{ +echo "# This script was generated from '$1' by man/make_sed.sh." +echo "# Do the TH lines" sed -e 's/\//\/TH /' \ -e 's/ / /' \ - -e 's/ / ""\/TH /' \ + -e 's/ / \/TH /' \ -e 's/ / /' \ - -e 's/\/$/ ""\//' \ - $UPPER >>$RESULT + -e 's/\/$/ \//' \ + $UPPER -echo "# Do the embedded references" >>$RESULT -sed -e 's/>$RESULT + $UPPER -echo "# Do the \fBxxx\fP references in the .NAME section" >>$RESULT +echo '# Do the \\fBxxx\\fP references in the .NAME section' sed -e 's/\\>$RESULT + $UPPER +} >>$RESULT # Finally, send the result to standard output cat $RESULT diff --git a/man/man_db.renames b/man/man_db.renames.in similarity index 62% rename from man/man_db.renames rename to man/man_db.renames.in index fd446831..2b18a016 100644 --- a/man/man_db.renames +++ b/man/man_db.renames.in @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2019,2020 Thomas E. Dickey # +# Copyright 2019-2023,2024 Thomas E. Dickey # # Copyright 1998-2015,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: man_db.renames,v 1.56 2020/02/02 23:34:34 tom Exp $ +# $Id: man_db.renames.in,v 1.73 2024/04/13 23:39:11 tom Exp $ # Manual-page renamings for the man_db program # # Files: @@ -151,7 +151,7 @@ mitem_value.3x menu_value.3menu mitem_visible.3x menu_visible.3menu ncurses.3x ncurses.3ncurses new_pair.3x new_pair.3ncurses -panel.3x panel.3curses +panel.3x panel.3ncurses printf.3s printf.3 putc.3s putc.3 resizeterm.3x resizeterm.3ncurses @@ -163,7 +163,6 @@ term.5 term.5 term.7 term.7 term_variables.3x terminfo_variables.3ncurses terminfo.5 terminfo.5 -terminfo.\\\*n terminfo.5 tic.1m tic.1 toe.1m toe.1 tput.1 tput.1 @@ -171,10 +170,125 @@ tset.1 tset.1 user_caps.5 user_caps.5 wresize.3x wresize.3ncurses # -# Other: -tack.1m tack.1 +# Supplementary topics in the foregoing pages: +add_wch.3x add_wch.3ncurses +addch.3x addch.3ncurses +assume_default_colors.3x assume_default_colors.3ncurses +attr_get.3x attr_get.3ncurses +attr_on.3x attr_on.3ncurses +attron.3x attron.3ncurses +baudrate.3x baudrate.3ncurses +bkgd.3x bkgd.3ncurses +bkgrnd.3x bkgrnd.3ncurses +cbreak.3x cbreak.3ncurses +clearok.3x clearok.3ncurses +clrtoeol.3x clrtoeol.3ncurses +curs_set.3x curs_set.3ncurses +curscr.3x curscr.3ncurses +curses_trace.3x curses_trace.3ncurses +def_prog_mode.3x def_prog_mode.3ncurses +def_shell_mode.3x def_shell_mode.3ncurses +del_curterm.3x del_curterm.3ncurses +delay_output.3x delay_output.3ncurses +delscreen.3x delscreen.3ncurses +derwin.3x derwin.3ncurses +doupdate.3x doupdate.3ncurses +echo.3x echo.3ncurses +endwin.3x endwin.3ncurses +extended_slk_color.3x extended_slk_color.3ncurses +filter.3x filter.3ncurses +flushinp.3x flushinp.3ncurses +get_wch.3x get_wch.3ncurses +getattr.3x getattr.3ncurses +getcchar.3x getcchar.3ncurses +getch.3x getch.3ncurses +getwin.3x getwin.3ncurses +halfdelay.3x halfdelay.3ncurses +has_key.3x has_key.3ncurses +idcok.3x idcok.3ncurses +idlok.3x idlok.3ncurses +immedok.3x immedok.3ncurses +in_wch.3x in_wch.3ncurses +inch.3x inch.3ncurses +initscr.3x initscr.3ncurses +is_scrollok.3x is_scrollok.3ncurses +keyname.3x keyname.3ncurses +keypad.3x keypad.3ncurses +leaveok.3x leaveok.3ncurses +longname.3x longname.3ncurses +meta.3x meta.3ncurses +move.3x move.3ncurses +mvcur.3x mvcur.3ncurses +mvwin.3x mvwin.3ncurses +newpad.3x newpad.3ncurses +newterm.3x newterm.3ncurses +newwin.3x newwin.3ncurses +nl.3x nl.3ncurses +nocbreak.3x nocbreak.3ncurses +nodelay.3x nodelay.3ncurses +nonl.3x nonl.3ncurses +notimeout.3x notimeout.3ncurses +pnoutrefresh.3x pnoutrefresh.3ncurses +prefresh.3x prefresh.3ncurses +printw.3x printw.3ncurses +putp.3x putp.3ncurses +putwin.3x putwin.3ncurses +raw.3x raw.3ncurses +refresh.3x refresh.3ncurses +reset_shell_mode.3x reset_shell_mode.3ncurses +restartterm.3x restartterm.3ncurses +ripoffline.3x ripoffline.3ncurses +scrollok.3x scrollok.3ncurses +set_curterm.3x set_curterm.3ncurses +set_term.3x set_term.3nses +setcchar.3x setcchar.3ncurses +setupterm.3x setupterm.3ncurses +slk_attr.3x slk_attr.3ncurses +slk_color.3x slk_color.3ncurses +slk_init.3x slk_init.3ncurses +slk_touch.3x slk_touch.3ncurses +start_color.3x start_color.3ncurses +subwin.3x subwin.3ncurses +syncok.3x syncok.3ncurses +terminfo.3x terminfo.3ncurses +tigetstr.3x tigetstr.3ncurses +touchline.3x touchline.3ncurses +touchwin.3x touchwin.3ncurses +tparm.3x tparm.3ncurses +tputs.3x tputs.3ncurses +trace.3x trace.3ncurses +unctrl.3x unctrl.3ncurses +use_default_colors.3x use_default_colors.3ncurses +use_env.3x use_env.3ncurses +use_extended_names.3x use_extended_names.3ncurses +use_legacy_coding.3x use_legacy_coding.3ncurses +use_tioctl.3x use_tioctl.3ncurses +vidputs.3x vidputs.3ncurses +wadd_wch.3x wadd_wch.3ncurses +waddch.3x waddch.3ncurses +waddstr.3x waddstr.3ncurses +waddwstr.3x waddwstr.3ncurses +wattr_set.3x wattr_set.3ncurses +wattrset.3x wattrset.3ncurses +wbkgdset.3x wbkgdset.3ncurses +wbkgrndset.3x wbkgrndset.3ncurses +wdelch.3x wdelch.3ncurses +wecho_wchar.3x wecho_wchar.3ncurses +wechochar.3x wechochar.3ncurses +wget_wch.3x wget_wch.3ncurses +wgetch.3x wgetch.3ncurses +wgetstr.3x wgetstr.3ncurses +winch.3x winch.3ncurses +wins_wch.3x wins_wch.3ncurses +winsch.3x winsch.3ncurses +wmove.3x wmove.3ncurses +wnoutrefresh.3x wnoutrefresh.3ncurses +wrefresh.3x wrefresh.3ncurses +wsetscrreg.3x wsetscrreg.3ncurses +wtimeout.3x wtimeout.3ncurses # -getty.1 getty.8 +# Other: +getty.8 getty.8 scanf.3 scanf.3 ttys.5 ttys.4 system.3 system.3 @@ -183,18 +297,7 @@ regexec.3x regexec.3 vprintf.3 vprintf.3 # # The following are pages which may be generated depending on configuration: -adacurses-config.1 adacurses-config.1 -adacurses5-config.1 adacurses5-config.1 -adacurses6-config.1 adacurses6-config.1 -# -ncurses5-config.1 ncurses5-config.1 -ncursesw5-config.1 ncursesw5-config.1 -ncursest5-config.1 ncursest5-config.1 -ncursestw5-config.1 ncursestw5-config.1 -# -ncurses6-config.1 ncurses6-config.1 -ncursesw6-config.1 ncursesw6-config.1 -ncursest6-config.1 ncursest6-config.1 -ncursestw6-config.1 ncursestw6-config.1 +adacurses@USE_CFG_SUFFIX@-config.1 adacurses@USE_CFG_SUFFIX@-config.1 +ncurses@USE_CFG_SUFFIX@-config.1 ncurses@USE_CFG_SUFFIX@-config.1 # # vile:cfgmode diff --git a/man/manhtml.aliases b/man/manhtml.aliases index a9f18ca7..7599c74a 100644 --- a/man/manhtml.aliases +++ b/man/manhtml.aliases @@ -1,6 +1,6 @@ -# $Id: manhtml.aliases,v 1.19 2020/12/12 14:45:55 tom Exp $ +# $Id: manhtml.aliases,v 1.35 2024/04/14 00:36:21 tom Exp $ #*************************************************************************** -# Copyright 2019,2020 Thomas E. Dickey * +# Copyright 2019-2023,2024 Thomas E. Dickey * # Copyright 2013,2017 Free Software Foundation, Inc. * # * # Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,42 +28,106 @@ # authorization. * #*************************************************************************** # Items in this list will be linked to the corresponding manpages by man2html +add_wch(3X) curs_add_wch(3X) addch(3X) curs_addch(3X) assume_default_colors(3X) default_colors(3X) +attr_get(3X) curs_attr(3X) +attr_on(3X) curs_attr(3X) +attron(3X) curs_attr(3X) +baudrate(3X) curs_termattrs(3X) +bkgd(3X) curs_bkgd(3X) +bkgrnd(3X) curs_bkgrnd(3X) +cbreak(3X) curs_inopts(3X) +clearok(3X) curs_outopts(3X) +clrtoeol(3X) curs_clear(3X) curs_set(3X) curs_kernel(3X) +curscr(3X) curs_variables(3X) +curses_trace(3X) curs_trace(3X) +def_prog_mode(3X) curs_kernel(3X) +def_shell_mode(3X) curs_kernel(3X) +del_curterm(3X) curs_terminfo(3X) +delay_output(3X) curs_util(3X) delscreen(3X) curs_initscr(3X) doupdate(3X) curs_refresh(3X) +echo(3X) curs_inopts(3X) endwin(3X) curs_initscr(3X) +extended_slk_color(3X) curs_slk(3X) filter(3X) curs_util(3X) +flushinp(3X) curs_util(3X) get_wch(3X) curs_get_wch(3X) getcchar(3X) curs_getcchar(3X) getch(3X) curs_getch(3X) +getwin(3X) curs_util(3X) +halfdelay(3X) curs_inopts(3X) +has_key(3X) curs_getch(3X) +immedok(3X) curs_outopts(3X) +in_wch(3X) curs_in_wch(3X) inch(3X) curs_inch(3X) infocmp(1) infocmp(1M) initscr(3X) curs_initscr(3X) is_scrollok(3X) curs_opaque(3X) +keyname(3X) curs_util(3X) keypad(3X) curs_inopts(3X) longname(3X) curs_termattrs(3X) meta(3X) curs_inopts(3X) +move(3X) curs_move(3X) mvcur(3X) curs_terminfo(3X) mvwin(3X) curs_window(3X) newterm(3X) curs_initscr(3X) +newwin(3X) curs_window(3X) +nl(3X) curs_inopts(3X) +nocbreak(3X) curs_inopts(3X) +nonl(3X) curs_inopts(3X) +pnoutrefresh(3X) curs_pad(3X) +prefresh(3X) curs_pad(3X) +printw(3X) curs_printw(3X) +putp(3X) curs_terminfo(3X) +putwin(3X) curs_util(3X) +raw(3X) curs_inopts(3X) refresh(3X) curs_refresh(3X) reset_shell_mode(3X) curs_kernel(3X) +restartterm(3X) curs_terminfo(3X) +ripoffline(3X) curs_kernel(3X) +set_curterm(3X) curs_terminfo(3X) set_term(3X) curs_initscr(3X) setcchar(3X) curs_getcchar(3X) setupterm(3X) curs_terminfo(3X) +slk_attr(3X) curs_slk(3X) +slk_color(3X) curs_slk(3X) slk_init(3X) curs_slk(3X) slk_touch(3X) curs_slk(3X) +start_color(3X) curs_color(3X) +terminfo(3X) curs_terminfo(3X) tic(1) tic(1M) tigetstr(3X) curs_terminfo(3X) +touchline(3X) curs_touch(3X) +touchwin(3X) curs_touch(3X) tparm(3X) curs_terminfo(3X) tputs(3X) curs_terminfo(3X) use_default_colors(3X) default_colors(3X) use_env(3X) curs_util(3X) use_extended_names(3X) curs_extend(3X) use_legacy_coding(3X) legacy_coding(3X) +use_tioctl(3X) curs_util(3X) vidputs(3X) curs_terminfo(3X) +wadd_wch(3X) curs_add_wch(3X) +waddch(3X) curs_addch(3X) +waddstr(3X) curs_addstr(3X) +waddwstr(3X) curs_addwstr(3X) +wattr_set(3X) curs_attr(3X) +wattrset(3X) curs_attr(3X) +wbkgdset(3X) curs_bkgd(3X) +wbkgrndset(3X) curs_bkgrnd(3X) +wdelch(3X) curs_delch(3X) +wecho_wchar(3X) curs_add_wch(3X) +wechochar(3X) curs_addch(3X) +wget_wch(3X) curs_get_wch(3X) wgetch(3X) curs_getch(3X) +wgetstr(3X) curs_getstr(3X) +winch(3X) curs_inch(3X) +wins_wch(3X) curs_ins_wch(3X) +winsch(3X) curs_insch(3X) +wmove(3X) curs_move(3X) wnoutrefresh(3X) curs_refresh(3X) wrefresh(3X) curs_refresh(3X) +wsetscrreg(3X) curs_outopts(3X) diff --git a/man/manhtml.externs b/man/manhtml.externs index 5874b27a..41aa6359 100644 --- a/man/manhtml.externs +++ b/man/manhtml.externs @@ -1,7 +1,7 @@ -# $Id: manhtml.externs,v 1.15 2021/12/26 00:02:52 tom Exp $ +# $Id: manhtml.externs,v 1.25 2024/04/20 19:26:05 tom Exp $ # Items in this list will not be linked by man2html #*************************************************************************** -# Copyright 2019-2020,2021 Thomas E. Dickey * +# Copyright 2019-2023,2024 Thomas E. Dickey * # Copyright 2013,2017 Free Software Foundation, Inc. * # * # Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,11 +28,11 @@ # sale, use or other dealings in this Software without prior written * # authorization. * #*************************************************************************** -ADACURSES(1) COLOR_PAIR(1) COLOR_PAIR(2) -COLOR_PAIR(3) +ascii(7) atoi(3) +bash(1) conflict(1) cron(1) csh(1) @@ -41,12 +41,14 @@ emacs(1) environ(7) errno(3) file(1) -getty(1) +getty(8) jove(1) lynx(1) -nvi(1) mutt(1) +nvi(1) od(1) +ioctl(2) +isprint(3) printf(3) profile(5) putc(3) @@ -56,12 +58,17 @@ read(2) readline(3) resize(1) scanf(3) +scanf(3S) screen(1) +setbuf(3) +setgid(2) setlocale(3) +setuid(2) sh(1) sscanf(3) stdio(3) stty(1) +swprintf(3) system(3) termios(3) tmux(1) @@ -70,6 +77,7 @@ ttys(5) vi(1) vprintf(3) vscanf(3) +vsscanf(3) wcwidth(3) write(2) xterm(1) diff --git a/man/manlinks.sed b/man/manlinks.sed index 09b055f2..18f67c24 100644 --- a/man/manlinks.sed +++ b/man/manlinks.sed @@ -1,6 +1,6 @@ -# $Id: manlinks.sed,v 1.15 2021/01/05 20:30:00 tom Exp $ +# $Id: manlinks.sed,v 1.20 2024/04/20 22:25:36 tom Exp $ ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2021,2023 Thomas E. Dickey # # Copyright 2000-2003,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -31,6 +31,9 @@ # listed in the "NAME" section, i.e., the names that we would like to use # as aliases for the manpage -T.Dickey # +# workaround for manpages without a SYNOPSIS +s/^\.\\"SH/.SH/ +# # eliminate formatting controls that get in the way /^'\\"/d /\.\\"/d @@ -39,12 +42,13 @@ /typedef/d s/^\.IX// s/\\f.//g +s/\\%//g s/[:,]/ /g # # ignore C-style comments s%/\*.*\*/%% # -# eliminate unnecessary whitespace, convert multiple blanks to single space +# Eliminate unnecessary whitespace, convert multiple blanks to single space. s/^[ ][ ]*// s/[ ][ ]*$// s/[ ][ ]*/ /g @@ -54,16 +58,16 @@ s/[ ][ ]*/ /g s/\.SH[ ][ ]*/.SH_(/ # # in ".SH NAME" -# change "\-" to "-", eliminate text after "-", and split the remaining lines -# at each space, making a list of names: -/^\.SH_(NAME/,/^\.SH_(SYNOPSIS/{ -s/\\-.*/ -/ -/ -/{ -s/ -.*// -s/ /\ -/g -} -/^-/{ +# Convert a list of names separated from their description by " \-" to a list +# of names on separate lines. Normally the list is also comma-separated, but +# we ignore that detail here. The description is on a separate line to make +# the nroff source more pleasing to some eyes. +/^\.SH_(NAME/,/ \\-$/{ +s/\\-/-/g +s/ / /g +/ -$/{ +s/ -$// +n d } s/ /\ @@ -71,10 +75,16 @@ s/ /\ } # # in ".SH SYNOPSIS" -# remove any line that does not contain a '(', since we only want functions. +# For readability, the NAME section may not contain all function names, but we +# still want to make aliases for those. Do this by extracting names from the +# list of function prototypes in the synopsis. +# +# Remove any line that does not contain a '(', since we only want functions. # then strip off return-type of each function. -# finally, remove the parameter list, which begins with a '('. +# +# Finally, remove the parameter list, which begins with a '('. /^\.SH_(SYNOPSIS/,/^\.SH_(DESCRIPTION/{ +/^\.ti/d /^[^(]*$/d # reduce # .B "int add_wch( const cchar_t *\fIwch\fB );" diff --git a/man/menu.3x b/man/menu.3x index ea16bf6f..a833c3b5 100644 --- a/man/menu.3x +++ b/man/menu.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2014,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,21 +28,30 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu.3x,v 1.29 2021/12/25 21:49:32 tom Exp $ -.TH menu 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: menu.3x,v 1.45 2024/03/16 15:35:01 tom Exp $ +.TH menu 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBmenu\fP \- curses extension for programming menus +\fBmenu\fP \- +curses extension for programming menus .SH SYNOPSIS -\fB#include \fP -.br +.nf +\fB#include +.fi .SH DESCRIPTION The \fBmenu\fP library provides terminal-independent facilities for composing menu systems on character-cell terminals. @@ -56,7 +65,7 @@ these functions. To use the \fBmenu\fP library, link with the options \fB\-lmenu \-lcurses\fP. . -.SS Current Default Values for Item Attributes +.SS "Current Default Values for Item Attributes" . The \fBmenu\fP library maintains a default value for item attributes. You can @@ -66,11 +75,11 @@ Changing this default with a \fBset_\fP function affects future item creations, but does not change the rendering of items already created. . -.SS Routine Name Index +.SS "Routine Name Index" . The following table lists each \fBmenu\fP routine and the name of the manual page on which it is described. -. +.PP .TS l l . \fBcurses\fP Routine Name Manual Page Name @@ -181,33 +190,26 @@ System error occurred (see \fBerrno\fP(3)). .B E_UNKNOWN_COMMAND The menu driver code saw an unknown request code. .SH NOTES -The header file \fB\fP automatically includes the header files -\fB\fP and \fB\fP. -.PP -In your library list, libmenu.a should be before libncurses.a; that is, -you should say \*(``\-lmenu \-lncurses\*('', not the other way around -(which would give a link-error when using static libraries). +The header file \fI\%menu.h\fP itself includes the header file +\fI\%curses.h\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. .PP -The menu facility was documented in SVr4.2 in -\fICharacter User Interface Programming (UNIX SVR4.2)\fP. +A menu facility was documented in SVr4.2's +\fICharacter User Interface Programming\fP document. .PP It is not part of X/Open Curses. .PP -Aside from ncurses, there are few implementations: +Aside from \fI\%ncurses\fP, there are few implementations: .bP systems based on SVr4 source code, e.g., Solaris. .bP NetBSD curses. .SH AUTHORS Juergen Pfeifer. -Manual pages and adaptation for ncurses by Eric S. Raymond. +Manual pages and adaptation for \fI\%ncurses\fP by Eric S. Raymond. .SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``menu_\*('' +\fB\%curses\fP(3X) and related pages whose names begin \*(``menu_\*('' for detailed descriptions of the entry points. -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). diff --git a/man/menu_attributes.3x b/man/menu_attributes.3x index 69309696..7bce42d2 100644 --- a/man/menu_attributes.3x +++ b/man/menu_attributes.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,12 +27,18 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_attributes.3x,v 1.21 2021/12/25 21:49:32 tom Exp $ -.TH menu_attributes 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: menu_attributes.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH menu_attributes 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} .SH NAME \fBmenu_back\fP, \fBmenu_fore\fP, @@ -42,26 +47,24 @@ \fBset_menu_back\fP, \fBset_menu_fore\fP, \fBset_menu_grey\fP, -\fBset_menu_pad\fP \- color and attribute control for menus +\fBset_menu_pad\fP \- +color and attribute control for menus .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_fore(MENU *\fP\fImenu\fP\fB, chtype \fP\fIattr\fP\fB);\fP -.br -\fBchtype menu_fore(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint set_menu_back(MENU *\fP\fImenu\fP\fB, chtype \fP\fIattr\fP\fB);\fP -.br -\fBchtype menu_back(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint set_menu_grey(MENU *\fP\fImenu\fP\fB, chtype \fP\fIattr\fP\fB);\fP -.br -\fBchtype menu_grey(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint set_menu_pad(MENU *\fP\fImenu\fP\fB, int \fP\fIpad\fP\fB);\fP -.br -\fBint menu_pad(const MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_fore(MENU *\fImenu\fP, chtype \fIattr\fP); +\fBchtype menu_fore(const MENU *\fImenu\fP); +.PP +\fBint set_menu_back(MENU *\fImenu\fP, chtype \fIattr\fP); +\fBchtype menu_back(const MENU *\fImenu\fP); +.PP +\fBint set_menu_grey(MENU *\fImenu\fP, chtype \fIattr\fP); +\fBchtype menu_grey(const MENU *\fImenu\fP); +.PP +\fBint set_menu_pad(MENU *\fImenu\fP, int \fIpad\fP); +\fBint menu_pad(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION The function \fBset_menu_fore\fP sets the foreground attribute of \fImenu\fP. This is the highlight used for selected menu items. @@ -98,12 +101,6 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. -.SH SEE ALSO -\fBcurses\fP(3X) and related pages whose names begin \*(``menu_\*('' for detailed -descriptions of the entry points. -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -111,3 +108,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X) and related pages whose names begin \*(``menu_\*('' +for detailed descriptions of the entry points. diff --git a/man/menu_cursor.3x b/man/menu_cursor.3x index 7246e2fe..d92d8c3a 100644 --- a/man/menu_cursor.3x +++ b/man/menu_cursor.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,15 +27,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_cursor.3x,v 1.15 2021/12/25 21:49:32 tom Exp $ -.TH menu_cursor 3X "" +.\" $Id: menu_cursor.3x,v 1.30 2024/03/16 15:35:01 tom Exp $ +.TH menu_cursor 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBpos_menu_cursor\fP \- position a menu's cursor +\fBpos_menu_cursor\fP \- +position a menu's cursor .SH SYNOPSIS -\fB#include \fP -.sp -\fBint pos_menu_cursor(const MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint pos_menu_cursor(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION The function \fBpos_menu_cursor\fP restores the cursor to the current position associated with the menu's selected item. @@ -56,11 +57,6 @@ Routine detected an incorrect or out-of-range argument. .TP 5 .B E_NOT_POSTED The menu has not been posted. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -68,3 +64,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_driver.3x b/man/menu_driver.3x index 0a480996..6a117283 100644 --- a/man/menu_driver.3x +++ b/man/menu_driver.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,19 +27,21 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_driver.3x,v 1.30 2021/12/25 21:49:32 tom Exp $ -.TH menu_driver 3X "" +.\" $Id: menu_driver.3x,v 1.47 2024/03/16 15:35:01 tom Exp $ +.TH menu_driver 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBmenu_driver\fP \- command-processing loop of the menu system +\fBmenu_driver\fP \- +command-processing loop of the menu system .SH SYNOPSIS -\fB#include \fP -.sp -\fBint menu_driver(MENU *\fP\fImenu\fP\fB, int \fP\fIc\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint menu_driver(MENU *\fImenu\fP, int \fIc\fP); +.fi .SH DESCRIPTION Once a menu has been posted (displayed), you should funnel input events to it through \fBmenu_driver\fP. This routine has three major input cases: @@ -116,8 +118,7 @@ If there is no such match, \fBmenu_driver\fP returns .PP If the second argument is one of the above pre-defined requests, the corresponding action is performed. -.SS MOUSE HANDLING -.PP +.SS "Mouse Handling" If the second argument is the KEY_MOUSE special key, the associated mouse event is translated into one of the above pre-defined requests. Currently only clicks in the user window (e.g., inside the menu display @@ -157,8 +158,7 @@ into a request was done, \fBmenu_driver\fP returns the result of this request. If you clicked outside the user window or the mouse event could not be translated into a menu request an \fBE_REQUEST_DENIED\fP is returned. -.SS APPLICATION-DEFINED COMMANDS -.PP +.SS "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 application-specific @@ -191,18 +191,15 @@ Character failed to match. .TP 5 .B E_REQUEST_DENIED The menu driver could not process the request. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBgetch\fP(3X), -\fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header files -\fB\fP. .SH PORTABILITY 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. +The support for mouse events is \fI\%ncurses\fP specific. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%getch\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_format.3x b/man/menu_format.3x index 2d0e7829..9781878f 100644 --- a/man/menu_format.3x +++ b/man/menu_format.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_format.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH menu_format 3X "" +.\" $Id: menu_format.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH menu_format 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_format\fP, -\fBmenu_format\fP \- set and get menu sizes +\fBmenu_format\fP \- +set and get menu sizes .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_format(MENU *\fP\fImenu\fP\fB, int \fP\fIrows\fP\fB, int \fP\fIcols\fP\fB);\fP -.br -\fBvoid menu_format(const MENU *\fP\fImenu\fP\fB, int *\fP\fIrows\fP\fB, int *\fP\fIcols\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_format(MENU *\fImenu\fP, int \fIrows\fP, int \fIcols\fP); +\fBvoid menu_format(const MENU *\fImenu\fP, int *\fIrows\fP, int *\fIcols\fP); +.fi .SH DESCRIPTION The function \fBset_menu_format\fP sets the maximum display size of the given menu. @@ -74,11 +74,6 @@ The menu is already posted. .TP 5 .B E_NOT_CONNECTED No items are connected to the menu. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -86,3 +81,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_hook.3x b/man/menu_hook.3x index 4ff7421a..839e199b 100644 --- a/man/menu_hook.3x +++ b/man/menu_hook.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,29 +27,27 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_hook.3x,v 1.17 2021/12/25 21:49:32 tom Exp $ -.TH menu_hook 3X "" +.\" $Id: menu_hook.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH menu_hook 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBmenu_hook\fP \- set hooks for automatic invocation by applications +\fBmenu_hook\fP \- +set hooks for automatic invocation by applications .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_item_init(MENU *\fP\fImenu\fP\fB, Menu_Hook \fP\fIfunc);\fP -.br -\fBMenu_Hook item_init(const MENU *\fP\fImenu);\fP -.sp -\fBint set_item_term(MENU *\fP\fImenu\fP\fB, Menu_Hook \fP\fIfunc);\fP -.br -\fBMenu_Hook item_term(const MENU *\fP\fImenu);\fP -.sp -\fBint set_menu_init(MENU *\fP\fImenu\fP\fB, Menu_Hook \fP\fIfunc);\fP -.br -\fBMenu_Hook menu_init(const MENU *\fP\fImenu);\fP -.sp -\fBint set_menu_term(MENU *\fP\fImenu\fP\fB, Menu_Hook \fP\fIfunc);\fP -.br -\fBMenu_Hook menu_term(const MENU *\fP\fImenu);\fP -.br +.nf +\fB#include +.PP +\fBint set_item_init(MENU *\fImenu\fP, Menu_Hook \fIfunc\fP); +\fBMenu_Hook item_init(const MENU *\fImenu\fP); +.PP +\fBint set_item_term(MENU *\fImenu\fP, Menu_Hook \fIfunc\fP); +\fBMenu_Hook item_term(const MENU *\fImenu\fP); +.PP +\fBint set_menu_init(MENU *\fImenu\fP, Menu_Hook \fIfunc\fP); +\fBMenu_Hook menu_init(const MENU *\fImenu\fP); +.PP +\fBint set_menu_term(MENU *\fImenu\fP, Menu_Hook \fIfunc\fP); +\fBMenu_Hook menu_term(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION These functions make it possible to set hook functions to be called at various points in the automatic processing of input event codes by \fBmenu_driver\fP. @@ -87,11 +84,6 @@ The routine succeeded. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -100,3 +92,6 @@ Version 7 or BSD versions. Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_items.3x b/man/menu_items.3x index 1fcaa58b..43409fef 100644 --- a/man/menu_items.3x +++ b/man/menu_items.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2012,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,21 +27,21 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_items.3x,v 1.19 2021/12/25 21:49:32 tom Exp $ -.TH menu_items 3X "" +.\" $Id: menu_items.3x,v 1.34 2024/03/16 15:35:01 tom Exp $ +.TH menu_items 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_items\fP, \fBmenu_items\fP, -\fBitem_count\fP \- make and break connections between items and menus +\fBitem_count\fP \- +make and break connections between items and menus .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_items(MENU *\fP\fImenu\fP\fB, ITEM **\fP\fIitems\fP\fB);\fP -.br -\fBITEM **menu_items(const MENU *\fP\fImenu\fP\fB);\fP -.br -\fBint item_count(const MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_items(MENU *\fImenu\fP, ITEM **\fIitems\fP); +\fBITEM **menu_items(const MENU *\fImenu\fP); +\fBint item_count(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION The function \fBset_menu_items\fP changes the item pointer array of the given \fImenu\fP. The array must be terminated by a \fBNULL\fP. @@ -73,12 +72,6 @@ The menu is already posted. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -89,3 +82,6 @@ as \-1 (which is the value of \fBERR\fP). .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_mark.3x b/man/menu_mark.3x index 36dc90c3..e3f3a928 100644 --- a/man/menu_mark.3x +++ b/man/menu_mark.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_mark.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH menu_mark 3X "" +.\" $Id: menu_mark.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH menu_mark 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_mark\fP, -\fBmenu_mark\fP \- get and set the menu mark string +\fBmenu_mark\fP \- +get and set the menu mark string .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_mark(MENU *\fP\fImenu\fP\fB, const char *\fP\fImark\fP\fB);\fP -.br -\fBconst char *menu_mark(const MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_mark(MENU *\fImenu\fP, const char *\fImark\fP); +\fBconst char *menu_mark(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION In order to make menu selections visible on older terminals without highlighting or color capability, the menu library marks selected items @@ -70,11 +70,6 @@ Routine detected an incorrect or out-of-range argument. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -82,3 +77,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_new.3x b/man/menu_new.3x index bdce4fd9..1a133745 100644 --- a/man/menu_new.3x +++ b/man/menu_new.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_new.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH menu_new 3X "" +.\" $Id: menu_new.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH menu_new 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBnew_menu\fP, -\fBfree_menu\fP \- create and destroy menus +\fBfree_menu\fP \- +create and destroy menus .SH SYNOPSIS -\fB#include \fP -.sp -\fBMENU *new_menu(ITEM **\fP\fIitems\fP\fB);\fP -.br -\fBint free_menu(MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBMENU *new_menu(ITEM **\fIitems\fP); +\fBint free_menu(MENU *\fImenu\fP); +.fi .SH DESCRIPTION The function \fBnew_menu\fP creates a new menu connected to a specified item pointer array (which must be \fBNULL\fP-terminated). @@ -69,11 +69,6 @@ Routine detected an incorrect or out-of-range argument. .TP 5 .B E_POSTED The menu has already been posted. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -81,3 +76,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_opts.3x b/man/menu_opts.3x index e900f750..ad7fe97f 100644 --- a/man/menu_opts.3x +++ b/man/menu_opts.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,24 +27,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_opts.3x,v 1.20 2021/12/25 21:49:32 tom Exp $ -.TH menu_opts 3X "" +.\" $Id: menu_opts.3x,v 1.35 2024/03/16 15:35:01 tom Exp $ +.TH menu_opts 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_opts\fP, \fBmenu_opts_on\fP, \fBmenu_opts_off\fP, -\fBmenu_opts\fP \- set and get menu options +\fBmenu_opts\fP \- +set and get menu options .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_opts(MENU *\fP\fImenu\fP\fB, Menu_Options \fP\fIopts\fP\fB);\fP -.br -\fBMenu_Options menu_opts(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint menu_opts_on(MENU *\fP\fImenu\fP\fB, Menu_Options \fP\fIopts\fP\fB);\fP -.br -\fBint menu_opts_off(MENU *\fP\fImenu\fP\fB, Menu_Options \fP\fIopts\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_opts(MENU *\fImenu\fP, Menu_Options \fIopts\fP); +\fBMenu_Options menu_opts(const MENU *\fImenu\fP); +.PP +\fBint menu_opts_on(MENU *\fImenu\fP, Menu_Options \fIopts\fP); +\fBint menu_opts_off(MENU *\fImenu\fP, Menu_Options \fIopts\fP); +.fi .SH DESCRIPTION The function \fBset_menu_opts\fP sets all the given menu's option bits (menu option bits may be logically-OR'ed together). @@ -95,11 +94,6 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_POSTED The menu is already posted. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -107,3 +101,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_pattern.3x b/man/menu_pattern.3x index 03441518..a66a368d 100644 --- a/man/menu_pattern.3x +++ b/man/menu_pattern.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_pattern.3x,v 1.23 2021/12/25 21:49:32 tom Exp $ -.TH menu_pattern 3X "" +.\" $Id: menu_pattern.3x,v 1.38 2024/03/16 15:35:01 tom Exp $ +.TH menu_pattern 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_pattern\fP, -\fBmenu_pattern\fP \- set and get a menu's pattern buffer +\fBmenu_pattern\fP \- +set and get a menu's pattern buffer .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_pattern(MENU *\fP\fImenu\fP\fB, const char *\fP\fIpattern\fP\fB);\fP -.br -\fBchar *menu_pattern(const MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_pattern(MENU *\fImenu\fP, const char *\fIpattern\fP); +\fBchar *menu_pattern(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION Every menu has an associated pattern match buffer. As input events that are @@ -78,11 +79,6 @@ Character failed to match. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -90,3 +86,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_post.3x b/man/menu_post.3x index eec5564d..4a0827a1 100644 --- a/man/menu_post.3x +++ b/man/menu_post.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_post.3x,v 1.21 2021/12/25 21:49:32 tom Exp $ -.TH menu_post 3X "" +.\" $Id: menu_post.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH menu_post 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBpost_menu\fP, -\fBunpost_menu\fP \- write or erase menus from associated subwindows +\fBunpost_menu\fP \- +write or erase menus from associated subwindows .SH SYNOPSIS -\fB#include \fP -.sp -\fBint post_menu(MENU *\fP\fImenu\fP\fB);\fP -.br -\fBint unpost_menu(MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint post_menu(MENU *\fImenu\fP); +\fBint unpost_menu(MENU *\fImenu\fP); +.fi .SH DESCRIPTION The function \fBpost_menu\fP displays a menu to its associated subwindow. To @@ -77,11 +77,6 @@ The menu has not been posted. .TP 5 .B E_NOT_CONNECTED No items are connected to the menu. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -89,3 +84,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_requestname.3x b/man/menu_requestname.3x index f5d92b86..a0363fb2 100644 --- a/man/menu_requestname.3x +++ b/man/menu_requestname.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_requestname.3x,v 1.17 2021/12/25 21:42:57 tom Exp $ -.TH menu_requestname 3X "" +.\" $Id: menu_requestname.3x,v 1.33 2024/03/16 15:35:01 tom Exp $ +.TH menu_requestname 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBmenu_request_by_name\fP, -\fBmenu_request_name\fP \- handle printable menu request names +\fBmenu_request_name\fP \- +handle printable menu request names .SH SYNOPSIS -\fB#include \fP -.sp -\fBconst char *menu_request_name(int \fP\fIrequest\fP\fB);\fP -.br -\fBint menu_request_by_name(const char *\fP\fIname\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBconst char *menu_request_name(int \fIrequest\fP); +\fBint menu_request_by_name(const char *\fIname\fP); +.fi .SH DESCRIPTION The function \fBmenu_request_name\fP returns the printable name of a menu request code. @@ -53,13 +53,8 @@ and sets \fBerrno\fP to \fBE_BAD_ARGUMENT\fP. .br \fBmenu_request_by_name\fP returns \fBE_NO_MATCH\fP on error. It does not set \fBerrno\fP. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. It is recommended that @@ -67,3 +62,6 @@ any code depending on them be conditioned using NCURSES_VERSION. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_spacing.3x b/man/menu_spacing.3x index 54397bb3..d15e77d5 100644 --- a/man/menu_spacing.3x +++ b/man/menu_spacing.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,61 +27,60 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_spacing.3x,v 1.19 2021/12/25 21:49:32 tom Exp $ -.TH menu_spacing 3X "" +.\" $Id: menu_spacing.3x,v 1.37 2024/03/16 15:35:01 tom Exp $ +.TH menu_spacing 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_spacing\fP, -\fBmenu_spacing\fP \- set and get spacing between menu items. +\fBmenu_spacing\fP \- +set and get spacing between menu items. .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_spacing(MENU *\fP\fImenu\fP\fB,\fP - \fBint \fP\fIspc_description\fP\fB,\fP - \fBint \fP\fIspc_rows\fP\fB,\fP - \fBint \fP\fIspc_columns\fP\fB);\fP -.br -\fBint menu_spacing(const MENU *\fP\fImenu\fP\fB,\fP - \fBint* \fP\fIspc_description\fP\fB,\fP - \fBint* \fP\fIspc_rows\fP\fB,\fP - \fBint* \fP\fIspc_columns\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_spacing(MENU *\fImenu\fP, + \fBint \fIspc_description\fB,\fR + \fBint \fIspc_rows\fB,\fR + \fBint \fIspc_columns\fB);\fR +\fBint menu_spacing(const MENU *\fImenu\fB,\fR + \fBint* \fIspc_description\fB,\fR + \fBint* \fIspc_rows\fB,\fR + \fBint* \fIspc_columns\fB);\fR +.fi .SH DESCRIPTION The function \fBset_menu_spacing\fP sets the spacing information for the menu. -Its parameter \fBspc_description\fP controls the number of spaces +Its parameters provide the description and the size (in rows and columns). +.TP +\fIspc_description\fP +controls the number of spaces between an item name and an item description. It must not be larger than \fBTABSIZE\fP. The menu system puts in the middle of this spacing area the pad character. The remaining parts are filled with spaces. -The \fBspc_rows\fP parameter controls the number of rows +.TP +\fIspc_rows\fP +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 \fBspc_columns\fP parameter controls -the number of blanks between columns of items. +.TP +\fIspc_columns\fP +controls the number of blanks between columns of items. It must not be larger than \fBTABSIZE\fP. A value of 0 for all the spacing values resets them to the default, which is 1 for all of them. -.br -The function \fBmenu_spacing\fP passes back the spacing info for the menu. -If a -pointer is NULL, this specific info is simply not returned. +.PP +The function \fBmenu_spacing\fP returns the spacing information for the menu. +If a pointer is NULL, the corresponding information is simply not returned. .SH RETURN VALUE Both routines return \fBE_OK\fP on success. \fBset_menu_spacing\fP may return \fBE_POSTED\fP if the menu is posted, or \fBE_BAD_ARGUMENT\fP if one of the spacing values is out of range. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_variables\fP(3X), -\fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. It is recommended that @@ -90,3 +88,7 @@ any code depending on them be conditioned using NCURSES_VERSION. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_userptr.3x b/man/menu_userptr.3x index 6f471297..292bbd6b 100644 --- a/man/menu_userptr.3x +++ b/man/menu_userptr.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_userptr.3x,v 1.18 2021/12/25 21:42:57 tom Exp $ -.TH menu_userptr 3X "" +.\" $Id: menu_userptr.3x,v 1.33 2024/03/16 15:35:01 tom Exp $ +.TH menu_userptr 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_menu_userptr\fP, -\fBmenu_userptr\fP \- associate application data with a menu item +\fBmenu_userptr\fP \- +associate application data with a menu item .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_userptr(MENU *\fP\fImenu\fP\fB, void *\fP\fIuserptr\fP\fB);\fP -.br -\fBvoid *menu_userptr(const MENU *\fP\fImenu\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_userptr(MENU *\fImenu\fP, void *\fIuserptr\fP); +\fBvoid *menu_userptr(const MENU *\fImenu\fP); +.fi .SH DESCRIPTION Every menu and every menu item has a field that can be used to hold application-specific data (that is, the menu-driver code leaves it alone). @@ -49,11 +49,6 @@ These functions get and set the menu user pointer field. It does not set \fBerrno\fP. .PP \fBset_menu_userptr\fP returns \fBE_OK\fP (success). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -64,3 +59,6 @@ We chose not to leave it as a char pointer for SVr4 compatibility. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/menu_win.3x b/man/menu_win.3x index baa891a4..36f6129d 100644 --- a/man/menu_win.3x +++ b/man/menu_win.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,23 +27,23 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_win.3x,v 1.17 2021/12/25 21:49:32 tom Exp $ -.TH menu_win 3X "" +.\" $Id: menu_win.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH menu_win 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBmenu_win\fP \- make and break menu window and subwindow associations +\fBmenu_win\fP \- +make and break menu window and subwindow associations .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_menu_win(MENU *\fP\fImenu\fP\fB, WINDOW *\fP\fIwin\fP\fB);\fP -.br -\fBWINDOW *menu_win(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint set_menu_sub(MENU *\fP\fImenu\fP\fB, WINDOW *\fP\fIsub\fP\fB);\fP -.br -\fBWINDOW *menu_sub(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint scale_menu(const MENU *\fP\fImenu, int *\fP\fIrows\fP\fB, int *\fP\fIcolumns);\fP -.br +.nf +\fB#include +.PP +\fBint set_menu_win(MENU *\fImenu\fP, WINDOW *\fIwin\fP); +\fBWINDOW *menu_win(const MENU *\fImenu\fP); +.PP +\fBint set_menu_sub(MENU *\fImenu\fP, WINDOW *\fIsub\fP); +\fBWINDOW *menu_sub(const MENU *\fImenu\fP); +.PP +\fBint scale_menu(const MENU *\fImenu\fP, int *\fIrows\fP, int *\fIcolumns\fP); +.fi .SH DESCRIPTION Every menu has an associated pair of \fBcurses\fP windows. The menu window @@ -80,13 +79,6 @@ The menu has already been posted. .TP 5 .B E_NOT_CONNECTED No items are connected to the menu. -.SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_variables\fP(3X), -\fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -94,3 +86,7 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_current.3x b/man/mitem_current.3x index b7cfa25e..42d36c39 100644 --- a/man/mitem_current.3x +++ b/man/mitem_current.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,23 +27,23 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_current.3x,v 1.22 2021/12/25 21:49:32 tom Exp $ -.TH mitem_current 3X "" +.\" $Id: mitem_current.3x,v 1.37 2024/03/16 15:35:01 tom Exp $ +.TH mitem_current 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBmitem_current\fP \- set and get current_menu_item +\fBmitem_current\fP \- +set and get current_menu_item .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_current_item(MENU *\fP\fImenu\fP\fB, ITEM *\fP\fIitem\fP\fB);\fP -.br -\fBITEM *current_item(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint set_top_row(MENU *\fP\fImenu\fP\fB, int \fP\fIrow\fP\fB);\fP -.br -\fBint top_row(const MENU *\fP\fImenu\fP\fB);\fP -.sp -\fBint item_index(const ITEM *\fP\fIitem\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_current_item(MENU *\fImenu\fP, ITEM *\fIitem\fP); +\fBITEM *current_item(const MENU *\fImenu\fP); +.PP +\fBint set_top_row(MENU *\fImenu\fP, int \fIrow\fP); +\fBint top_row(const MENU *\fImenu\fP); +.PP +\fBint item_index(const ITEM *\fIitem\fP); +.fi .SH DESCRIPTION The function \fBset_current_item\fP sets the current item (the item on which the menu cursor is positioned). @@ -84,11 +83,6 @@ No items are connected to the menu. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -99,3 +93,6 @@ The SVr4 menu library documentation specifies the \fBtop_row\fP and .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_name.3x b/man/mitem_name.3x index f6de5832..3606bb5d 100644 --- a/man/mitem_name.3x +++ b/man/mitem_name.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_name.3x,v 1.16 2021/12/25 21:42:57 tom Exp $ -.TH mitem_name 3X "" +.\" $Id: mitem_name.3x,v 1.31 2024/03/16 15:35:01 tom Exp $ +.TH mitem_name 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBitem_name\fP, -\fBitem_description\fP \- get menu item name and description fields +\fBitem_description\fP \- +get menu item name and description fields .SH SYNOPSIS -\fB#include \fP -.sp -\fBconst char *item_name(const ITEM *\fP\fIitem\fP\fB);\fP -.br -\fBconst char *item_description(const ITEM *\fP\fIitem\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBconst char *item_name(const ITEM *\fIitem\fP); +\fBconst char *item_description(const ITEM *\fIitem\fP); +.fi .SH DESCRIPTION The function \fBitem_name\fP returns the name part of the given item. .br @@ -48,14 +48,12 @@ item. .SH RETURN VALUE These routines return a pointer (which may be \fBNULL\fP). They do not set \fBerrno\fP. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_new.3x b/man/mitem_new.3x index 616e23c8..66bd29bc 100644 --- a/man/mitem_new.3x +++ b/man/mitem_new.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_new.3x,v 1.21 2021/12/25 21:49:32 tom Exp $ -.TH mitem_new 3X "" +.\" $Id: mitem_new.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH mitem_new 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBnew_item\fP, -\fBfree_item\fP \- create and destroy menu items +\fBfree_item\fP \- +create and destroy menu items .SH SYNOPSIS -\fB#include \fP -.sp -\fBITEM *new_item(const char *\fP\fIname\fP\fB, const char *\fP\fIdescription\fP\fB);\fP -.br -\fBint free_item(ITEM *\fP\fIitem\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBITEM *new_item(const char *\fIname\fP, const char *\fIdescription\fP); +\fBint free_item(ITEM *\fIitem\fP); +.fi .SH DESCRIPTION The function \fBnew_item\fP allocates a new item and initializes it from the \fBname\fP and \fBdescription\fP pointers. @@ -77,11 +77,6 @@ Item is connected to a menu. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -89,3 +84,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_opts.3x b/man/mitem_opts.3x index 581c2d06..5a86516f 100644 --- a/man/mitem_opts.3x +++ b/man/mitem_opts.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,24 +27,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_opts.3x,v 1.18 2021/12/25 21:49:32 tom Exp $ -.TH mitem_opts 3X "" +.\" $Id: mitem_opts.3x,v 1.33 2024/03/16 15:35:01 tom Exp $ +.TH mitem_opts 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_item_opts\fP, \fBitem_opts_on\fP, \fBitem_opts_off\fP, -\fBitem_opts\fP \- set and get menu item options +\fBitem_opts\fP \- +set and get menu item options .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_item_opts(ITEM *\fP\fIitem\fP\fB, Item_Options \fP\fIopts\fP\fB);\fP -.br -\fBItem_Options item_opts(const ITEM *\fP\fIitem\fP\fB);\fP -.sp -\fBint item_opts_on(ITEM *\fP\fIitem\fP\fB, Item_Options \fP\fIopts\fP\fB);\fP -.br -\fBint item_opts_off(ITEM *\fP\fIitem\fP\fB, Item_Options \fP\fIopts\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_item_opts(ITEM *\fIitem\fP, Item_Options \fIopts\fP); +\fBItem_Options item_opts(const ITEM *\fIitem\fP); +.PP +\fBint item_opts_on(ITEM *\fIitem\fP, Item_Options \fIopts\fP); +\fBint item_opts_off(ITEM *\fIitem\fP, Item_Options \fIopts\fP); +.fi .SH DESCRIPTION The function \fBset_item_opts\fP sets all the given item's option bits (menu option bits may be logically-OR'ed together). @@ -70,11 +69,6 @@ The routine succeeded. .TP 5 .B E_SYSTEM_ERROR System error occurred (see \fBerrno\fP(3)). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -82,3 +76,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_userptr.3x b/man/mitem_userptr.3x index f36a246c..f0eab8bd 100644 --- a/man/mitem_userptr.3x +++ b/man/mitem_userptr.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_userptr.3x,v 1.19 2021/12/25 21:42:57 tom Exp $ -.TH mitem_userptr 3X "" +.\" $Id: mitem_userptr.3x,v 1.34 2024/03/16 15:35:01 tom Exp $ +.TH mitem_userptr 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_item_userptr\fP, -\fBitem_userptr\fP \- associate application data with a menu item +\fBitem_userptr\fP \- +associate application data with a menu item .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_item_userptr(ITEM *\fP\fIitem\fP\fB, void *\fP\fIuserptr\fP\fB);\fP -.br -\fBvoid *item_userptr(const ITEM *\fP\fIitem\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_item_userptr(ITEM *\fIitem\fP, void *\fIuserptr\fP); +\fBvoid *item_userptr(const ITEM *\fIitem\fP); +.fi .SH DESCRIPTION Every menu item has a field that can be used to hold application-specific data (that is, the menu-driver code leaves it alone). @@ -50,12 +50,6 @@ The function \fBitem_userptr\fP returns a pointer (possibly \fBNULL\fP). It does not set \fBerrno\fP. .PP The \fBset_item_userptr\fP always returns \fBE_OK\fP (success). -. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -66,3 +60,6 @@ We chose not to leave it as a char pointer for SVr4 compatibility. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_value.3x b/man/mitem_value.3x index 5d308758..daa383da 100644 --- a/man/mitem_value.3x +++ b/man/mitem_value.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,18 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_value.3x,v 1.17 2021/12/25 21:49:32 tom Exp $ -.TH mitem_value 3X "" +.\" $Id: mitem_value.3x,v 1.32 2024/03/16 15:35:01 tom Exp $ +.TH mitem_value 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME \fBset_item_value\fP, -\fBitem_value\fP \- set and get menu item values +\fBitem_value\fP \- +set and get menu item values .SH SYNOPSIS -\fB#include \fP -.sp -\fBint set_item_value(ITEM *\fP\fIitem\fP\fB, bool \fP\fIvalue\fP\fB);\fP -.br -\fBbool item_value(const ITEM *\fP\fIitem\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBint set_item_value(ITEM *\fIitem\fP, bool \fIvalue\fP); +\fBbool item_value(const ITEM *\fIitem\fP); +.fi .SH DESCRIPTION If you turn off the menu option \fBO_ONEVALUE\fP (e.g., with \fBset_menu_opts\fP or \fBmenu_opts_off\fP; see \fBmenu_opts\fP(3X)), the menu @@ -59,11 +60,6 @@ System error occurred (see \fBerrno\fP(3)). .TP 5 .B E_REQUEST_DENIED The menu driver could not process the request. -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -71,3 +67,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/mitem_visible.3x b/man/mitem_visible.3x index 90d223d8..c28c603f 100644 --- a/man/mitem_visible.3x +++ b/man/mitem_visible.3x @@ -1,6 +1,5 @@ -'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998,2010 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,24 +27,21 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_visible.3x,v 1.12 2021/12/25 21:42:57 tom Exp $ -.TH mitem_visible 3X "" +.\" $Id: mitem_visible.3x,v 1.27 2024/03/16 15:35:01 tom Exp $ +.TH mitem_visible 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBmitem_visible\fP \- check visibility of a menu item +\fBitem_visible\fP \- +check visibility of a menu item .SH SYNOPSIS -\fB#include \fP -.sp -\fBbool item_visible(const ITEM *\fP\fIitem\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBbool item_visible(const ITEM *\fIitem\fP); +.fi .SH DESCRIPTION A menu item is visible when it is in the portion of a posted menu that is mapped onto the screen (if the menu is scrollable, in particular, this portion will be smaller than the whole menu). -.SH SEE ALSO -\fBcurses\fP(3X), \fBmenu\fP(3X). -.SH NOTES -The header file \fB\fP automatically includes the header file -\fB\fP. .SH PORTABILITY These routines emulate the System V menu library. They were not supported on @@ -53,3 +49,6 @@ Version 7 or BSD versions. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%menu\fP(3X) diff --git a/man/ncurses.3x b/man/ncurses.3x index 5fc85a90..b8594626 100644 --- a/man/ncurses.3x +++ b/man/ncurses.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,310 +28,542 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: ncurses.3x,v 1.156 2021/12/25 21:19:26 tom Exp $ -.hy 0 -.TH ncurses 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: ncurses.3x,v 1.210 2024/04/20 21:24:19 tom Exp $ +.TH ncurses 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 +. +.\" Add supplementary paragraph tag on its own line after TP. +.\" Adapted from TQ (which would produce mandoc warnings). +.de tQ +. br +. ns +. TP .. -.ds n 5 +. .ds d @TERMINFO@ .SH NAME -\fBncurses\fP \- CRT screen handling and optimization package +\fB\%ncurses\fP \- +character-cell terminal interface with optimized output .SH SYNOPSIS -\fB#include \fP -.br +.nf +\fB#include +.fi .SH DESCRIPTION -The \fBncurses\fP library routines give the user a terminal-independent 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 \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.PP -The \fBncurses\fP 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 \fBncurses\fP library is freely redistributable in source form. -Differences from the SVr4 -curses are summarized under the -\fIEXTENSIONS\fP and \fIPORTABILITY\fP sections below and -described in detail in the respective -\fIEXTENSIONS\fP, \fIPORTABILITY\fP and \fIBUGS\fP sections -of individual man pages. -.PP -The \fBncurses\fP 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. -.PP -A program using these routines must be linked with the \fB\-lncurses\fP option, -or (if it has been generated) with the debugging library \fB\-lncurses_g\fP. -(Your system integrator may also have installed these libraries under -the names \fB\-lcurses\fP and \fB\-lcurses_g\fP.) -The ncurses_g library generates trace logs (in a file called \*(``trace\*('' in the -current directory) that describe curses actions. -See also the section on \fBALTERNATE CONFIGURATIONS\fP. -.PP -The \fBncurses\fP package supports: overall screen, window and pad -manipulation; output to windows and pads; reading terminal input; control over -terminal and \fBcurses\fP input and output options; environment query -routines; color manipulation; use of soft label keys; terminfo capabilities; -and access to low-level terminal-manipulation routines. -.SS Initialization -.PP -The library uses the locale which the calling program has initialized. -That is normally done with \fBsetlocale\fP(3): -.NS -\fBsetlocale(LC_ALL, "");\fP -.NE -.PP -If the locale is not initialized, -the library assumes that characters are printable as in ISO\-8859\-1, +The \*(``new curses\*('' library offers the programmer a +terminal-independent means of reading keyboard and mouse input and +updating character-cell terminals with output optimized to minimize +screen updates. +.I \%ncurses +replaces the +.I curses +libraries from +System V Release 4 Unix (\*(``SVr4\*('') +and +4.4BSD Unix, +the development of which ceased in the 1990s. +This document describes +.I \%ncurses +version @NCURSES_MAJOR@.@NCURSES_MINOR@ +(patch @NCURSES_PATCH@). +.PP +.I \%ncurses +permits control of the terminal screen's contents; +abstraction and subdivision thereof with +.I windows +and +.IR pads ; +the reading of terminal input; +control of terminal input and output options; +environment query routines; +color manipulation; +the definition and use of +.I "soft label" +keys; +.I \%term\%info +capability access; +a +.I termcap +compatibility interface; +and an abstraction of the system's API for manipulating the terminal +(such as \fI\%termios\fP(3)). +.PP +.I \%ncurses +implements the standard interface described by +X/Open Curses Issue\ 7. +In many behavioral details not standardized by X/Open, +.I \%ncurses +emulates the +.I curses +library of SVr4 and provides numerous useful extensions. +.PP +.I \%ncurses +man pages employ several sections to clarify matters of usage and +interoperability with other +.I curses +implementations. +.bP +\*(``NOTES\*('' describes issues and caveats of which any user of the +.I \%ncurses +API should be aware, +such as limitations on the size of an underlying integral type or the +availability of a preprocessor macro exclusive of a function definition +(which prevents its address from being taken). +This section also describes implementation details that will be +significant to the programmer but which are not standardized. +.bP +\*(``EXTENSIONS\*('' presents +.I \%ncurses +innovations beyond the X/Open Curses standard and/or the SVr4 +.I curses +implementation. +They are termed +.I extensions +to indicate that they cannot be implemented solely by using the library +API, +but require access to the library's internal state. +.bP +\*(``PORTABILITY\*('' discusses matters +(beyond the exercise of extensions) +that should be considered when writing to a +.I curses +standard, +or for multiple implementations. +.bP +\*(``HISTORY\*('' examines points of detail in +.I \%ncurses +and other +.I curses +implementations over the decades of their development, +particularly where precedent or inertia have frustrated better design +(and, +in a few cases, +where such inertia has been overcome). +.PP +A +.I curses +application must be linked with the library; +use the +.B \-lncurses +option to your compiler or linker. +A debugging version of the library may be available; +if so, +link with it using +.BR \-lncurses_g . +(Your system integrator may have installed these libraries such that you +can use the options +.B \-lcurses +and +.BR \-lcurses_g , +respectively.) +The +.I \%ncurses_g +library generates trace logs +(in a file called +.I \%trace +in the current directory) +that describe +.I \%ncurses +actions. +See section \*(``ALTERNATE CONFIGURATIONS\*('' below. +.SS "Application Structure" +A +.I curses +application uses information from the system locale; +\fI\%setlocale\fP(3) prepares it for +.I curses +library calls. +.PP +.RS 4 +.EX +setlocale(LC_ALL, ""); +.EE +.RE +.PP +If the locale is not thus initialized, +the library assumes that characters are printable as in ISO\ 8859-1, to work with certain legacy programs. -You should initialize the locale and not rely on specific details of -the library when the locale has not been setup. -.PP -The function \fBinitscr\fP or \fBnewterm\fP -must be called to initialize the library -before any of the other routines that deal with windows -and screens are used. -The routine \fBendwin\fP(3X) must be called before exiting. -.PP -To get character-at-a-time input without echoing (most -interactive, screen oriented programs want this), the following -sequence should be used: -.NS -\fBinitscr(); cbreak(); noecho();\fP -.NE -.PP -Most programs would additionally use the sequence: -.NS -\fBintrflush(stdscr, FALSE);\fP -\fBkeypad(stdscr, TRUE);\fP -.NE -.PP -Before a \fBcurses\fP 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 \fB@TPUT@ init\fP command -after the shell environment variable \fBTERM\fP has been exported. -\fB@TSET@(1)\fP is usually responsible for doing this. -[See \fBterminfo\fP(\*n) for further details.] -.SS Datatypes -.PP -The \fBncurses\fP library permits manipulation of data structures, -called \fIwindows\fP, which can be thought of as two-dimensional -arrays of characters representing all or part of a CRT screen. -A default window called \fBstdscr\fP, which is the size of the terminal -screen, is supplied. -Others may be created with \fBnewwin\fP. -.PP -Note that \fBcurses\fP does not handle overlapping windows, that's done by -the \fBpanel\fP(3X) library. -This means that you can either use -\fBstdscr\fP or divide the screen into tiled windows and not using -\fBstdscr\fP at all. -Mixing the two will result in unpredictable, and undesired, effects. -.PP -Windows are referred to by variables declared as \fBWINDOW *\fP. -These data structures are manipulated with routines described here and -elsewhere in the \fBncurses\fP manual pages. -Among those, the most basic -routines are \fBmove\fP and \fBaddch\fP. -More general versions of -these routines are included with names beginning with \fBw\fP, -allowing the user to specify a window. -The routines not beginning -with \fBw\fP affect \fBstdscr\fP. -.PP -After using routines to manipulate a window, \fBrefresh\fP(3X) is called, -telling \fBcurses\fP to make the user's CRT screen look like -\fBstdscr\fP. -The characters in a window are actually of type -\fBchtype\fP, (character and attribute data) so that other information -about the character may also be stored with each character. -.PP -Special windows called \fIpads\fP 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 \fBcurs_pad\fP(3X) for more information. -.PP -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, \fBcurses\fP is also able to translate arrow and function keys that -transmit escape sequences into single values. -The video attributes, line -drawing characters, and input values use names, defined in \fB\fP, -such as \fBA_REVERSE\fP, \fBACS_HLINE\fP, and \fBKEY_LEFT\fP. -.SS Environment variables -.PP -If the environment variables \fBLINES\fP and \fBCOLUMNS\fP are set, or if the -program is executing in a window environment, line and column information in -the environment will override information read by \fIterminfo\fP. -This would affect a program running in an AT&T 630 layer, -for example, where the size of a -screen is changeable (see \fBENVIRONMENT\fP). -.PP -If the environment variable \fBTERMINFO\fP is defined, any program using -\fBcurses\fP checks for a local terminal definition before checking in the -standard place. -For example, if \fBTERM\fP is set to \fBatt4424\fP, then the -compiled terminal definition is found in -.NS -\fB\*d/a/att4424\fP. -.NE -.PP -(The \fBa\fP is copied from the first letter of \fBatt4424\fP to avoid -creation of huge directories.) However, if \fBTERMINFO\fP is set to -\fB$HOME/myterms\fP, \fBcurses\fP first checks -.NS -\fB$HOME/myterms/a/att4424\fP, -.NE -.PP -and if that fails, it then checks -.NS -\fB\*d/a/att4424\fP. -.NE -.PP -This is useful for developing experimental definitions or when write -permission in \fB\*d\fP is not available. -.PP -The integer variables \fBLINES\fP and \fBCOLS\fP are defined in -\fB\fP and will be filled in by \fBinitscr\fP with the size of the -screen. -The constants \fBTRUE\fP and \fBFALSE\fP have the values \fB1\fP and -\fB0\fP, respectively. -.PP -The \fBcurses\fP routines also define the \fBWINDOW *\fP variable \fBcurscr\fP -which is used for certain low-level operations like clearing and redrawing a -screen containing garbage. -The \fBcurscr\fP can be used in only a few routines. -.\" -.SS Routine and Argument Names -Many \fBcurses\fP routines have two or more versions. -The routines prefixed with \fIw\fP require a window argument. -The routines prefixed with \fIp\fP require a pad argument. -Those without a prefix generally use \fBstdscr\fP. -.PP -The routines prefixed with \fBmv\fP require a \fIy\fP and \fIx\fP -coordinate to move to before performing the appropriate action. -The \fBmv\fP routines imply a call to \fBmove\fP before the call to the -other routine. -The coordinate \fIy\fP always refers to the row (of -the window), and \fIx\fP always refers to the column. -The upper left-hand corner is always (0,0), not (1,1). -.PP -The routines prefixed with \fBmvw\fP take both a window argument and -\fIx\fP and \fIy\fP coordinates. -The window argument is always specified before the coordinates. -.PP -In each case, \fIwin\fP is the window affected, and \fIpad\fP is the -pad affected; \fIwin\fP and \fIpad\fP are always pointers to type -\fBWINDOW\fP. -.PP -Option setting routines require a Boolean flag \fIbf\fP with the value -\fBTRUE\fP or \fBFALSE\fP; \fIbf\fP is always of type \fBbool\fP. -Most of the data types used in the library routines, -such as \fBWINDOW\fP, \fBSCREEN\fP, \fBbool\fP, and \fBchtype\fP -are defined in \fB\fP. -Types used for the terminfo routines such as -\fBTERMINAL\fP are defined in \fB\fP. -.PP -This manual page describes functions which may appear in any configuration +You should initialize the locale; +do not expect consistent behavior from the library when the locale has +not been set up. +.PP +\fB\%initscr\fP(3X) or \fB\%newterm\fP(3X) +must be called to initialize +.I curses +before use of any functions that deal with windows and screens. +.PP +To get character-at-a-time input without echoing\(emmost interactive, +screen-oriented programs want this\(emuse the following sequence. +.PP +.RS 4 +.EX +initscr(); cbreak(); noecho(); +.EE +.RE +.PP +Most applications perform further setup as follows. +.PP +.RS 4 +.EX +intrflush(stdscr, FALSE); +keypad(stdscr, TRUE); +.EE +.RE +.PP +A +.I curses +program then often enters an event loop of some sort. +Call \fB\%endwin\fP(3X) before exiting. +.SS Overview +A +.I curses +library abstracts the terminal screen by representing all or part of it +as a +.I \%WINDOW +data structure. +A +.I window +is a rectangular grid of character cells, +addressed by row and column coordinates +.RI ( y , +.IR x ), +with the upper left corner as (0, 0). +A window called +.BR \%stdscr , +the same size as the terminal screen, +is always available. +Create others with \fB\%newwin\fP(3X). +.PP +A +.I curses +library does not manage overlapping windows +(but see below). +You can either use +.B \%stdscr +to manage one screen-filling window, +or tile the screen into non-overlapping windows and not use +.B \%stdscr +at all. +Mixing the two approaches will result in unpredictable and undesired +effects. +.PP +Functions permit manipulation of a window and the +.I cursor +identifying the cell within it at which the next output operation will +occur. +Among those, +the most basic are \fB\%move\fP(3X) and \fB\%addch\fP(3X): +these place the cursor and write a character to +.BR \%stdscr , +respectively. +.PP +Frequent changes to the terminal screen can cause unpleasant flicker or +inefficient use of the communication channel to the device, +so the library does not generally update it automatically. +Therefore, +after using +.I curses +functions to accumulate a set of desired updates that make sense to +present together, +call \fB\%refresh\fP(3X) to tell the library to make the user's screen +look like \fBstdscr\fP. +The library +.\" X/Open Curses Issue 7 assumes some optimization will be done, but +.\" does not mandate it in any way. +.I optimizes +its output by computing a minimal number of operations to mutate the +screen from its state at the previous refresh to the new one. +Effective optimization demands accurate information about the terminal +device: +the management of such information is the province of the +\fB\%terminfo\fP(3X) API, +a feature of every standard +.I curses +implementation. +.PP +Special windows called +.I pads +may also be manipulated. +These are windows that are not constrained to the size of the terminal +screen and whose contents need not be completely displayed. +See \fB\%curs_pad\fP(3X). +.PP +In addition to drawing characters on the screen, +rendering 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. +See \fB\%curs_attr\fP(3X). +.PP +.I curses +predefines constants for a small set of forms-drawing graphics +corresponding to the DEC Alternate Character Set (ACS), +a feature of VT100 and other terminals. +See \fB\%waddch\fP(3X). +.PP +.I curses +is implemented using the operating system's terminal driver; +keystroke events are received not as scan codes but as byte sequences. +Graphical keycaps +(alphanumeric and punctuation keys, +and the space) +appear as-is. +Everything else, +including the tab, +enter/return, +keypad, +arrow, +and function keys, +appears as a control character or a multibyte +.I "escape sequence." +.I curses +translates these into unique +.I "key codes." +See \fB\%getch\fP(3X). +.PP +.I \%ncurses +provides reimplementations of the SVr4 \fBpanel\fP(3X), \fBform\fP(3X), +and \fBmenu\fP(3X) libraries to ease construction of user interfaces +with +.IR curses . +.SS "Initialization" +The selection of an appropriate value of +.I TERM +in the process environment is essential to correct +.I curses +and +.I \%term\%info +library operation. +A well-configured system selects a correct +.I TERM +value automatically; +\fB\%tset\fP(1) may assist with troubleshooting exotic situations. +.PP +If you change the terminal type, +export the +.I TERM +environment variable in the shell, +then run \fB\%tset\fP(1) or the +.RB \*(`` "@TPUT@ init" \*('' +command. +See subsection \*(``Tabs and Initialization\*('' of \fB\%terminfo\fP(5). +.PP +If the environment variables +.I \%LINES +and +.I \%COLUMNS +are set, +or if the +.I curses +program is executing in a graphical windowing environment, +the information obtained thence overrides that obtained by +.IR \%term\%info . +An +.I \%ncurses +extension supports resizable terminals; +see \fB\%wresize\fP(3X). +.PP +If the environment variable +.I \%TERMINFO +is defined, +a +.I curses +program checks first for a terminal type description in the location it +identifies. +.I \%TERMINFO +is useful for developing experimental type descriptions or when write +permission to +.I \%\*d +is not available. +.PP +See section \*(``ENVIRONMENT\*('' below. +.SS "Naming Conventions" +.I curses +offers many functions in variant forms using a regular set of +alternatives to the name of an elemental one. +Those prefixed with \*(``w\*('' require a +.I \%WINDOW +pointer argument; +those with a \*(``mv\*('' prefix first perform cursor movement using +\fB\%wmove\fP(3X); +a \*(``mvw\*('' prefix indicates both. +The \*(``w\*('' function is typically the elemental one; +the removal of this prefix usually indicates operation on +.BR \%stdscr . +.PP +Four functions prefixed with \*(``p\*('' require a pad argument. +.PP +In function synopses, +.I \%ncurses +man pages apply the following names to parameters. +.PP +.TS +center; +Li L. +bf \fIbool\fP (\fBTRUE\fP or \fBFALSE\fP) +c a \fIchar\fP or \fIint\fP +ch a \fIchtype\fP +wc a \fIwchar_t\fP or \fIwint_t\fP +wch a \fIcchar_t\fP +win pointer to a \fIWINDOW\fP +pad pointer to a \fIWINDOW\fP that is a pad +.TE +.SS "Wide and Non-wide Character Configurations" +This manual page describes functions that appear in any configuration of the library. -There are two common configurations of the library: -.RS 3 -.TP 5 -.I ncurses -the \*(``normal\*('' library, which handles 8-bit characters. -The normal (8-bit) library stores characters combined with attributes -in \fBchtype\fP data. -.IP -Attributes alone (no corresponding character) may be stored in \fBchtype\fP -or the equivalent \fBattr_t\fP data. -In either case, the data is stored in something like an integer. +There are two common configurations; +see section \*(``ALTERNATE CONFIGURATIONS\*('' below. +.TP 10 \" "ncursesw" + 2n +.I \%ncurses +is the library in its \*(``non-wide\*('' configuration, +handling only eight-bit characters. +It stores a character combined with attributes in a +.I \%chtype +datum, +which is often an alias of +.IR int . .IP -Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBchtype\fP. -.TP 5 -.I ncursesw -the so-called \*(``wide\*('' library, which handles multibyte characters -(see the section on \fBALTERNATE CONFIGURATIONS\fP). -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: -.RS 5 -.TP 5 -.B cchar_t -corresponds to \fBchtype\fP. -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 value \- and there -may be more than one character per cell. -The video attributes and color are stored in separate fields of the structure. +Attributes alone +(with no corresponding character) +can be stored in variables of +.I \%chtype +or +.I \%attr_t +type. +In either case, +they are represented as an integral bit mask. .IP -Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBcchar_t\fP. -.IP -The \fBsetcchar\fP(3X) and \fBgetcchar\fP(3X) -functions store and retrieve the data from -a \fBcchar_t\fP structure. -.TP 5 -.B wchar_t -stores a \*(``wide\*('' character. -Like \fBchtype\fP, this may be an integer. -.TP 5 -.B wint_t -stores a \fBwchar_t\fP or \fBWEOF\fP \- not the same, though both may have -the same size. +Each cell of a +.I \%WINDOW +is stored as a +.IR \%chtype . +.TP 10 +.I \%ncursesw +is the library in its \*(``wide\*('' configuration, +which handles character encodings requiring a larger data type than +.I \%char +(a byte-sized type) +can represent. +It adds about one third more calls using additional data types that +can store such +.I multibyte +characters. +.RS 10 \" same as foregoing tag width +.TP 9 \" "cchar_t" + 2n +.I \%cchar_t +corresponds to the non-wide configuration's +.IR \%chtype . +It always a structure type, +because it stores more data than fit into a standard scalar type. +A character code may not be representable as a +.IR \%char , +and moreover more than one character may occupy a cell +(as with accent marks and other diacritics). +Each character is of type +.IR \%wchar_t ; +a complex character contains one spacing character and zero or more +non-spacing characters +(see below). +Attributes and color data are stored in separate fields of the +structure, +not combined as in +.IR \%chtype . +.PP +Each cell of a +.I \%WINDOW +is stored as a +.IR \%cchar_t . +.PP +\fB\%setcchar\fP(3X) and \fB\%getcchar\fP(3X) +store and retrieve +.I \%cchar_t +data. +The wide library API of +.I \%ncurses +depends on two data types standardized by ISO C95. +.TP 9 +.I \%wchar_t +stores a wide character. +Like +.IR \%chtype , +it may be an alias of +.IR int . +Depending on the character encoding, +a wide character may be +.IR spacing , +meaning that it occupies a character cell by itself and typically +accompanies cursor advancement, +or +.IR non-spacing , +meaning that it occupies the same cell as a spacing character, +is often regarded as a \*(``modifier\*('' of the base glyph with which +it combines, +and typically does not advance the cursor. +.TP 9 +.I \%wint_t +can store a +.I \%wchar_t +or the constant +.BR \%WEOF , +analogously to the +.IR int -sized +character manipulation functions of ISO C and its constant +.BR \%EOF . .RE .IP -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, \fBwaddch\fP becomes \fBwadd_wch\fP. -.RE -.PP +The wide library provides additional functions that complement those in +the non-wide library where the size of the underlying character type is +significant. +A somewhat regular naming convention relates many of the wide variants +to their non-wide counterparts; +where a non-wide function name contains \*(``ch\*('' or \*(``str\*('', +prefix it with \*(``_w\*('' to obtain the wide counterpart. +For example, +\fB\%waddch\fP becomes \fB\%wadd_wch\fP. +(Exceptions that add only \*(``w\*('' comprise +.BR \%addwstr , +.BR \%inwstr , +and their variants.) +.IP +This convention is inapplicable to some non-wide function names, +so other transformations are used for the wide configuration: +the window background management function \*(``bkgd\*('' becomes +\*(``bkgrnd\*(''; +the window border-drawing and -clearing functions are suffixed with +\*(``_set\*(''; +and character attribute manipulation functions like +\*(``attron\*('' become \*(``attr_on\*(''. .\" -.SS Routine Name Index -The following table lists the \fBcurses\fP 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. +.SS "Function Name Index" +The following table lists the +.I curses +functions provided in the non-wide and wide APIs and the corresponding +man pages that describe them. +Those flagged with \*(``*\*('' +are +.IR \%ncurses "-specific," +neither described by X/Open Curses nor present in SVr4. .PP .TS center tab(/); -l l l l . -\fBcurses\fP Routine Name/Manual Page Name -= +\f(BIcurses\fP Function Name/Man Page +_ COLOR_PAIR/\fBcurs_color\fP(3X) -PAIR_NUMBER/\fBcurs_attr\fP(3X) +PAIR_NUMBER/\fBcurs_color\fP(3X) add_wch/\fBcurs_add_wch\fP(3X) add_wchnstr/\fBcurs_add_wchstr\fP(3X) add_wchstr/\fBcurs_add_wchstr\fP(3X) @@ -403,6 +635,7 @@ find_pair/\fBnew_pair\fP(3X)* flash/\fBcurs_beep\fP(3X) flushinp/\fBcurs_util\fP(3X) free_pair/\fBnew_pair\fP(3X)* +get_escdelay/\fBcurs_threads\fP(3X)* get_wch/\fBcurs_get_wch\fP(3X) get_wstr/\fBcurs_get_wstr\fP(3X) getattrs/\fBcurs_attr\fP(3X) @@ -463,16 +696,20 @@ insstr/\fBcurs_insstr\fP(3X) instr/\fBcurs_instr\fP(3X) intrflush/\fBcurs_inopts\fP(3X) inwstr/\fBcurs_inwstr\fP(3X) +is_cbreak/\fBcurs_inopts\fP(3X)* is_cleared/\fBcurs_opaque\fP(3X)* +is_echo/\fBcurs_inopts\fP(3X)* is_idcok/\fBcurs_opaque\fP(3X)* is_idlok/\fBcurs_opaque\fP(3X)* is_immedok/\fBcurs_opaque\fP(3X)* is_keypad/\fBcurs_opaque\fP(3X)* is_leaveok/\fBcurs_opaque\fP(3X)* is_linetouched/\fBcurs_touch\fP(3X) +is_nl/\fBcurs_inopts\fP(3X)* is_nodelay/\fBcurs_opaque\fP(3X)* is_notimeout/\fBcurs_opaque\fP(3X)* is_pad/\fBcurs_opaque\fP(3X)* +is_raw/\fBcurs_inopts\fP(3X)* is_scrollok/\fBcurs_opaque\fP(3X)* is_subwin/\fBcurs_opaque\fP(3X)* is_syncok/\fBcurs_opaque\fP(3X)* @@ -594,7 +831,7 @@ notimeout/\fBcurs_inopts\fP(3X) overlay/\fBcurs_overlay\fP(3X) overwrite/\fBcurs_overlay\fP(3X) pair_content/\fBcurs_color\fP(3X) -pecho_wchar/\fBcurs_pad\fP(3X)* +pecho_wchar/\fBcurs_pad\fP(3X) pechochar/\fBcurs_pad\fP(3X) pnoutrefresh/\fBcurs_pad\fP(3X) prefresh/\fBcurs_pad\fP(3X) @@ -623,6 +860,8 @@ scrl/\fBcurs_scroll\fP(3X) scroll/\fBcurs_scroll\fP(3X) scrollok/\fBcurs_outopts\fP(3X) set_curterm/\fBcurs_terminfo\fP(3X) +set_escdelay/\fBcurs_threads\fP(3X)* +set_tabsize/\fBcurs_threads\fP(3X)* set_term/\fBcurs_initscr\fP(3X) setcchar/\fBcurs_getcchar\fP(3X) setscrreg/\fBcurs_outopts\fP(3X) @@ -644,7 +883,7 @@ slk_refresh/\fBcurs_slk\fP(3X) slk_restore/\fBcurs_slk\fP(3X) slk_set/\fBcurs_slk\fP(3X) slk_touch/\fBcurs_slk\fP(3X) -slk_wset/\fBcurs_slk\fP(3X)* +slk_wset/\fBcurs_slk\fP(3X) standend/\fBcurs_attr\fP(3X) standout/\fBcurs_attr\fP(3X) start_color/\fBcurs_color\fP(3X) @@ -663,7 +902,9 @@ tigetflag/\fBcurs_terminfo\fP(3X) tigetnum/\fBcurs_terminfo\fP(3X) tigetstr/\fBcurs_terminfo\fP(3X) timeout/\fBcurs_inopts\fP(3X) -tiparm/\fBcurs_terminfo\fP(3X)* +tiparm/\fBcurs_terminfo\fP(3X) +tiparm_s/\fBcurs_terminfo\fP(3X)* +tiscan_s/\fBcurs_terminfo\fP(3X)* touchline/\fBcurs_touch\fP(3X) touchwin/\fBcurs_touch\fP(3X) tparm/\fBcurs_terminfo\fP(3X) @@ -680,7 +921,9 @@ use_default_colors/\fBdefault_colors\fP(3X)* use_env/\fBcurs_util\fP(3X) use_extended_names/\fBcurs_extend\fP(3X)* use_legacy_coding/\fBlegacy_coding\fP(3X)* +use_screen/\fBcurs_threads\fP(3X)* use_tioctl/\fBcurs_util\fP(3X)* +use_window/\fBcurs_threads\fP(3X)* vid_attr/\fBcurs_terminfo\fP(3X) vid_puts/\fBcurs_terminfo\fP(3X) vidattr/\fBcurs_terminfo\fP(3X) @@ -777,483 +1020,699 @@ wvline/\fBcurs_border\fP(3X) wvline_set/\fBcurs_border_set\fP(3X) .TE .PP -Depending on the configuration, -additional sets of functions may be available: -.RS 3 -.TP 5 -\fBcurs_memleaks\fP(3X) - curses memory-leak checking -.TP 5 -\fBcurs_sp_funcs\fP(3X) - curses screen-pointer extension -.TP 5 -\fBcurs_threads\fP(3X) - curses thread support -.TP 5 -\fBcurs_trace\fP(3X) - curses debugging routines -.RE +.IR \%ncurses 's +.I "screen-pointer extension" +adds additional functions corresponding to many of the above, +each with an \*(``_sp\*('' suffix; +see \fBcurs_sp_funcs\fP(3X). +.PP +The availability of some extensions is configurable when +.I \%ncurses +is compiled; +see sections \*(``ALTERNATE CONFIGURATIONS\*('' and \*(``EXTENSIONS\*('' +below. .SH RETURN VALUE -Routines that return an integer return \fBERR\fP upon failure and an -integer value other than \fBERR\fP upon successful completion, unless -otherwise noted in the routine descriptions. -.PP -As a general rule, routines check for null pointers passed as parameters, -and handle this as an error. -.PP -All macros return the value of the \fBw\fP version, except \fBsetscrreg\fP, -\fBwsetscrreg\fP, \fBgetyx\fP, \fBgetbegyx\fP, and \fBgetmaxyx\fP. -The return values of -\fBsetscrreg\fP, -\fBwsetscrreg\fP, -\fBgetyx\fP, -\fBgetbegyx\fP, and -\fBgetmaxyx\fP are undefined (i.e., these should not be used as the -right-hand side of assignment statements). -.PP -Functions with a \*(``mv\*('' prefix first perform a cursor movement using -\fBwmove\fP, and return an error if the position is outside the window, -or if the window pointer is null. -Most \*(``mv\*(''-prefixed functions -(except variadic functions such as \fBmvprintw\fP) -are provided both as macros and functions. -.PP -Routines that return pointers return \fBNULL\fP on error. +Unless otherwise noted, +functions that return an integer return +.B OK +on success and +.B ERR +on failure. +Functions that return pointers return +.B NULL +on failure. +Typically, +.I \%ncurses +treats a null pointer passed as a function parameter as a failure. +Functions prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. .SH ENVIRONMENT -.PP -The following environment symbols are useful for customizing the -runtime behavior of the \fBncurses\fP library. -The most important ones have been already discussed in detail. -.SS CC command-character -.PP -When set, change occurrences of the command_character -(i.e., the \fBcmdch\fP capability) -of the loaded terminfo entries to the value of this variable. -Very few terminfo entries provide this feature. +The following symbols from the process environment customize the +runtime behavior of +.I \%ncurses +applications. +The library may be configured to disregard the variables +.IR \%TERMINFO , +.IR \%TERMINFO_DIRS , +.IR \%TERMPATH , +and +.IR HOME , +if the user is the superuser (root), +or the application uses \fI\%setuid\fP(2) or \fI\%setgid\fP(2). +.SS "\fIBAUDRATE\fP" +The debugging library checks this variable when the application has +redirected output to a file. +Its integral value is used for the baud rate. +If that value is absent or invalid, +.I \%ncurses +uses 9600. +This feature allows testers to construct repeatable test cases +that take into account optimization decisions that depend on baud rate. +.SS "\fICC\fP (command character)" +When set, +the +.B \%command_character +.RB ( \%cmdch ) +capability value of loaded +.I \%term\%info +entries changes to the value of this variable. +Very few +.I \%term\%info +entries provide this feature. .PP Because this name is also used in development environments to represent -the C compiler's name, \fBncurses\fP ignores it if it does not happen to -be a single character. -.SS BAUDRATE -.PP -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, \fBncurses\fP uses 9600. -This allows testers to construct repeatable test-cases -that take into account costs that depend on baudrate. -.SS COLUMNS -.PP -Specify the width of the screen in characters. +the C compiler's name, +.I \%ncurses +ignores its value if it is not one character in length. +.SS "\fICOLUMNS\fP" +This variable specifies 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 \fBCOLUMNS\fP value nor the terminal's screen size is available, -\fBncurses\fP uses the size which may be specified in the terminfo database -(i.e., the \fBcols\fP capability). -.PP -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 \fBCOLUMNS\fP and/or \fBLINES\fP overrides the library's -use of the screen size obtained from the operating system. -.PP -Either \fBCOLUMNS\fP or \fBLINES\fP 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, \fBlines\fP and \fBcols\fP should not be specified in -a terminal description for terminals which are run as emulations. -.PP -Use the \fBuse_env\fP function to disable all use of external environment -(but not including system calls) to determine the screen size. -Use the \fBuse_tioctl\fP function to update \fBCOLUMNS\fP or \fBLINES\fP -to match the screen size obtained from system calls or the terminal database. -.SS ESCDELAY -.PP -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 to accommodate unusual applications. +If +.I \%COLUMNS +is not defined and the terminal's screen size is not available from the +terminal driver, +.I \%ncurses +uses the size specified by the +.B \%columns +.RB ( \%cols ) +capability of the terminal type's entry in the +.I \%term\%info +database, +if any. +.PP +It is important that your application use the correct screen size. +Automatic detection thereof is not always possible because an +application may be running on a host that does not honor NAWS +(Negotiations About Window Size) +or as a different user ID than the owner of the terminal device file. +Setting +.I \%COLUMNS +and/or +.I \%LINES +overrides the library's use of the screen size obtained from the +operating system. +.PP +The +.I \%COLUMNS +and +.I \%LINES +variables may be specified independently. +This property is useful to circumvent misfeatures of legacy terminal +type descriptions; +\fI\%xterm\fP(1) descriptions specifying 65 lines were once notorious. +For best results, +avoid specifying +.B cols +and +.B lines +capability codes in +.I \%term\%info +descriptions of terminal emulators. +.PP +\fBuse_env\fP(3X) can disable use of the process environment +in determining the screen size. +\fBuse_tioctl\fP(3X) can update +.I \%COLUMNS +and +.I \%LINES +to match the screen size obtained from system calls or the terminal +database. +.SS "\fIESCDELAY\fP" +For +.I curses +to distinguish the ESC character resulting from a user's press of the +\*(``Escape\*('' key on the input device from one beginning an +.I "escape sequence" +(as commonly produced by function keys), +it waits after receiving the escape character to see if further +characters are available on the input stream within a short interval. +A global variable +.B \%ESCDELAY +stores this interval in milliseconds. +The default value of 1000 +(one second) +is adequate for most uses. +This environment variable overrides it. .PP 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. -.PP -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. -.PP -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 +is to work with a remote host over a slow communication channel. +If the host running a +.I curses +application does not receive the characters of an escape sequence in a +timely manner, +the library can interpret them as multiple key stroke events. +.PP +\fI\%xterm\fP(1) mouse events are a form of escape sequence; +therefore, +if your application makes heavy use of multiple-clicking, +you may wish to lengthen the default value because the delay applies +to the composite multi-click event as well as the individual clicks. +.PP +Portable applications should not rely upon the presence of +.B \%ESCDELAY in either form, but setting the environment variable rather than the global variable does not create problems when compiling an application. -.SS HOME -Tells \fBncurses\fP where your home directory is. -That is where it may read and write auxiliary terminal descriptions: -.NS -$HOME/.termcap -$HOME/.terminfo -.NE -.SS LINES -.PP -Like COLUMNS, specify the height of the screen in characters. -See COLUMNS for a detailed description. -.SS MOUSE_BUTTONS_123 -.PP -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: -.NS -1 = left -.br -2 = right -.br -3 = middle. -.NE -.PP -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 specified, \fBncurses\fP uses 132. -.SS NCURSES_ASSUMED_COLORS -.PP -Override the compiled-in assumption that the -terminal's default colors are white-on-black -(see \fBdefault_colors\fP(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 \fBmax_colors\fP value is allowed. -.SS NCURSES_CONSOLE2 -This applies only to the MinGW port of ncurses. -.PP -The \fBConsole2\fP program's handling of the Microsoft Console API call -\fBCreateConsoleScreenBuffer\fP 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 \fBNCGDB\fP has the same effect. -.SS NCURSES_GPM_TERMS -.PP -This applies only to ncurses configured to use the GPM interface. -.PP -If present, -the environment variable is a list of one or more terminal names -against which the \fBTERM\fP environment variable is matched. -Setting it to an empty value disables the GPM interface; -using the built-in support for xterm, etc. .PP -If the environment variable is absent, -ncurses will attempt to open GPM if \fBTERM\fP contains \*(``linux\*(''. -.SS NCURSES_NO_HARD_TABS -.PP -\fBNcurses\fP may use tabs as part of the cursor movement optimization. +If \fB\%keypad\fP(3X) is disabled for the +.I curses +window receiving input, +a program must disambiguate escape sequences itself. +.SS "\fIHOME\fP" +.I \%ncurses +may read and write auxiliary terminal descriptions in +.I \%.termcap +and +.I \%.terminfo +files in the user's home directory. +.SS "\fILINES\fP" +This counterpart to +.I \%COLUMNS +specifies the height of the screen in characters. +The corresponding +.I \%term\%info +capability and code is +.BR \%lines . +See the description of the +.I \%COLUMNS +variable above. +.SS "\fIMOUSE_BUTTONS_123\fP" +(OS/2 EMX port only) +OS/2 numbers a three-button mouse inconsistently with other platforms, +such that 1 is the left button, +2 the right, +and 3 the middle. +This variable customizes the mouse button numbering. +Its value must be three digits 1\-3 in any order. +By default, +.I \%ncurses +assumes a numbering of \*(``132\*(''. +.SS "\fINCURSES_ASSUMED_COLORS\fP" +If set, +this variable overrides the +.I \%ncurses +library's compiled-in assumption that the terminal's default colors are +white on black; +see \fB\%default_colors\fP(3X). +Set the foreground and background color values with this environment +variable by assigning it two integer values separated by a comma, +indicating foregound and background color numbers, +respectively. +.PP +For example, +to tell +.I \%ncurses +not to assume anything about the colors, +use a value of \*(``\-1,\-1\*(''. +To make the default color scheme green on black, +use \*(``2,0\*(''. +.I \%ncurses +accepts integral values from \-1 up to the value of the +.I \%term\%info +.B \%max_colors +.RB ( colors ) +capability. +.SS "\fINCURSES_CONSOLE2\fP" +(MinGW port only) +The +.I \%Console2 +.\" https://www.hanselman.com/blog/console2-a-better-windows-command-prompt +program defectively handles the Microsoft Console API call +.IR \%Create\%Console\%Screen\%Buffer . +Applications that use it 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 +.I \%NCGDB +has the same effect. +.SS "\fINCURSES_GPM_TERMS\fP" +(Linux only) +When +.I \%ncurses +is configured to use the GPM interface, +this variable may list one or more terminal names +against which the +.I TERM +variable +(see below) +is matched. +An empty value disables the GPM interface, +using +.IR \%ncurses 's +built-in support for \fIxterm\fP(1) mouse protocols instead. +If the variable is absent, +.I \%ncurses +attempts to open GPM if +.I TERM +contains \*(``linux\*(''. +.SS "\fINCURSES_NO_HARD_TABS\fP" +.I \%ncurses +may use tab characters in 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 \fBstty\fP(1) settings to avoid the problem. -.SS NCURSES_NO_MAGIC_COOKIE -.PP -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. -.SS NCURSES_NO_PADDING -.PP -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. +your terminal driver may not handle them properly. +Set this environment variable to any value to disable the feature. +You can also adjust your \fI\%stty\fP(1) settings to avoid the problem. +.SS "\fINCURSES_NO_MAGIC_COOKIE\fP" +Many terminals store video attributes as a property of a character cell, +as +.I curses +does. +Historically, +some recorded changes in video attributes as data that logically +.I occupies +character cells on the display, +switching attributes on or off, +similarly to tags in a markup language; +these are termed \*(``magic cookies\*('', +and must be subsequently overprinted. +If the +.I \%term\%info +entry for your terminal type does not adequately describe its handling +of magic cookies, +set this variable to any value to instruct +.I \%ncurses +to disable attributes entirely. +.SS "\fINCURSES_NO_PADDING\fP" +Most terminal type descriptions in the +.I \%term\%info +database detail hardware devices. +Many people use +.IR curses -based +applications in terminal emulator programs that run in a windowing +environment. +These programs can duplicate all of the important features of a hardware +terminal, +but often lack their limitations. +Chief among these absent drawbacks is the problem of data flow +management; +that is, +limiting the speed of communication to what the hardware could handle. 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. -.PP -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. -.PP -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 \fBflash\fP. -.SS NCURSES_NO_SETBUF -This setting is obsolete. -Before changes -.RS 3 -.bP -started with 5.9 patch 20120825 -and -.bP -continued -though 5.9 patch 20130126 -.RE -.PP -\fBncurses\fP enabled buffered output during terminal initialization. -This was done (as in SVr4 curses) for performance reasons. -For testing purposes, both of \fBncurses\fP and certain applications, +an application must manage flow control itself to prevent overruns and +data loss. +.PP +A solution that comes at no hardware cost is for an application to pause +after directing a terminal to execute an operation that it performs +slowly, +such as clearing the display. +Many terminal type descriptions, +including that for the VT100, +embed delay specifications in capabilities. +You may wish to use these temrinal descriptions without paying the +performance penalty. +Set +.I \%NCURSES_NO_PADDING +to any value to disable all but mandatory padding. +Mandatory padding is used by such terminal capabilities as +.B \%flash_screen +.RB ( flash ). +.SS "\fINCURSES_NO_SETBUF\fP" +(Obsolete) +Prior to internal changes developed in +.I \%ncurses +5.9 +(patches 20120825 through 20130126), +the library used \fI\%setbuf\fP(3) to enable fully buffered output when +initializing the terminal. +This was done, +as in SVr4 +.IR curses , +to increase performance. +For testing purposes, +both of +.I \%ncurses +and of 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. -.PP -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. -.PP -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 \fBputp\fP still use the -standard output. -But high-level curses calls do not. -.SS NCURSES_NO_UTF8_ACS -.PP -During initialization, the \fBncurses\fP 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 emulator and the GNU screen program ignore these. -Ncurses checks the \fBTERM\fP 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. -.PP -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\*(''. -.PP -As an alternative to the environment variable, -ncurses checks for an extended terminfo capability \fBU8\fP. -This is a numeric capability which can be compiled using \fB@TIC@\ \-x\fP. -For example +Setting this variable disabled output buffering, +leaving the output stream in the original +(usually line-buffered) +mode. +.PP +Nowadays, +.I \%ncurses +performs its own buffering and does not require this workaround; +it does not modify the buffering of the standard output stream. +This approach makes signal handling, +as for interrupts, +more robust. +A drawback is that certain unconventional programs mixed +\fI\%stdio\fP(3) calls with +.I \%ncurses +calls and (usually) +got the behavior they expected. +This is no longer the case; +.I \%ncurses +does not write to the standard output file descriptor through a +.IR stdio -buffered +stream. +.PP +As a special case, +low-level API calls such as \fB\%putp\fP(3X) still use the +standard output stream. +High-level +.I curses +calls such as \fB\%printw\fP(3X) do not. +.SS "\fINCURSES_NO_UTF8_ACS\fP" +At initialization, +.I \%ncurses +inspects the +.I TERM +environment variable for special cases where VT100 forms-drawing +characters +(and the corresponding alternate character set +.I \%term\%info +capabilities) +are known to be unsupported by terminal types that otherwise claim VT100 +compatibility. +Specifically, +when running in a UTF-8 locale, +the Linux virtual console device and the GNU \fI\%screen\fP(1) +program ignore them. +Set this variable to a nonzero value to instruct +.I \%ncurses +that the terminal's ACS support is broken; +the library then outputs Unicode code points that correspond to the +forms-drawing +characters. +Set it to zero +(or a non-integer) +to disable the special check for terminal type names matching +\*(``linux\*('' or \*(``screen\*('', +directing +.I \%ncurses +to assume that the ACS feature works if the terminal type description +advertises it. +.PP +As an alternative to use of this variable, +.I \%ncurses +checks for an extended +.I \%term\%info +numeric capability \fBU8\fP +that can be compiled using +.RB \*(`` "@TIC@ \-x" \*(''. +Examples follow. +.PP .RS 3 -.ft CW -.sp -.nf +.EX # linux console, if patched to provide working -# VT100 shift-in/shift-out, with corresponding font. -linux-vt100|linux console with VT100 line-graphics, +# VT100 shift\-in/shift\-out, with corresponding font. +linux\-vt100|linux console with VT100 line\-graphics, U8#0, use=linux, -.sp +\& # uxterm with vt100Graphics resource set to false -xterm-utf8|xterm relying on UTF-8 line-graphics, +xterm\-utf8|xterm relying on UTF\-8 line\-graphics, U8#1, use=xterm, -.fi -.ft +.EE .RE .PP -The name \*(``U8\*('' is chosen to be two characters, -to permit it to be used by applications that use ncurses' -termcap interface. -.SS NCURSES_TRACE -.PP -During initialization, the \fBncurses\fP debugging library -checks the NCURSES_TRACE environment variable. -If it is defined, to a numeric value, \fBncurses\fP calls the \fBtrace\fP -function, using that value as the argument. -.PP -The argument values, which are defined in \fBcurses.h\fP, provide several -types of information. -When running with traces enabled, your application will write the -file \fBtrace\fP to the current directory. -.PP -See \fBcurs_trace\fP(3X) for more information. -.SS TERM -.PP -Denotes your terminal type. -Each terminal type is distinct, though many are similar. -.PP -\fBTERM\fP 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. -.PP -If you set \fBTERM\fP 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 (\fBxterm\fP(1) being a rare exception), -terminal emulators which allow you to -specify \fBTERM\fP as a parameter or configuration value do -not change their behavior to match that setting. -.SS TERMCAP -If the \fBncurses\fP library has been configured with \fItermcap\fP -support, \fBncurses\fP will check for a terminal's description in -termcap form if it is not available in the terminfo database. -.PP -The \fBTERMCAP\fP environment variable contains -either a terminal description (with newlines stripped out), -or a file name telling where the information denoted by -the \fBTERM\fP environment variable exists. -In either case, setting it directs \fBncurses\fP to ignore -the usual place for this information, e.g., /etc/termcap. -.SS TERMINFO -.PP -\fBncurses\fP can be configured to read from multiple terminal databases. -The \fBTERMINFO\fP variable overrides the location for -the default terminal database. -Terminal descriptions (in terminal format) are stored in terminal databases: +The two-character name \*(``U8\*('' was chosen to permit its use via +.IR \%ncurses 's +.I termcap +interface. +.SS "\fINCURSES_TRACE\fP" +At initialization, +.I \%ncurses +(in its debugging configuration) +checks for this variable's presence. +If defined with an integral value, +the library calls \fB\%curses_trace\fP(3X) with that value as the +argument. +.SS "\fITERM\fP" +The +.I TERM +variable denotes the terminal type. +Each is distinct, +though many are similar. +It is commonly set by terminal emulators to help applications find a +workable terminal description. +Some choose a popular approximation such as \*(``ansi\*('', +\*(``vt100\*('', or \*(``xterm\*('' rather than an exact fit to their +capabilities. +Not infrequently, +an application will have problems with that approach; +for example, +a key stroke may not operate correctly, +or produce no effect but seeming garbage characters on the screen. +.PP +Setting +.I TERM +has no effect on hardware operation; +it affects the way applications communicate with the terminal. +Likewise, +as a general rule +(\fIxterm\fP(1) being a rare exception), +terminal emulators that allow you to specify +.I TERM +as a parameter or configuration value do not change their behavior to +match that setting. +.SS "\fITERMCAP\fP" +If +.I \%ncurses +is configured with +.I termcap +support, +it checks for a terminal type description in +.I termcap +format if one in +.I \%term\%info +format is not available. +Setting this variable directs +.I \%ncurses +to ignore the usual +.I termcap +database location, +.IR \%/etc/termcap ; +see +.I \%TERMPATH +below. +.I \%TERMCAP +should contain either a terminal description +(with newlines stripped out), +or a file name indicating where the information required by the +.I TERM +environment variable is stored. +.SS "\fITERMINFO\fP" +.I \%ncurses +can be configured to read terminal type description databases in various +locations using different formats. +This variable overrides the default location. .bP -Normally these are stored in a directory tree, -using subdirectories named by the first letter of the terminal names therein. -.IP -This is the scheme used in System V, which legacy Unix systems use, -and the \fBTERMINFO\fP variable is used by \fIcurses\fP applications on those -systems to override the default location of the terminal database. +Descriptions in +.I \%term\%info +format are normally stored in a directory tree using subdirectories +named by the common first letters of the terminal types named therein. +This is the scheme used in System\ V. .bP -If \fBncurses\fP is built to use hashed databases, -then each entry in this list may be the path of a hashed database file, e.g., -.NS -/usr/share/terminfo.db -.NE -.IP +If +.I \%ncurses +is configured to use hashed databases, +then +.I \%TERM\%INFO +may name its location, +such as +.IR \%/usr/share/terminfo.db , rather than -.NS -/usr/share/terminfo/ -.NE -.IP -The hashed database uses less disk-space and is a little faster than the +.IR \%/usr/share/terminfo/ . +.PP +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. +and read it directly +rather than using the +.I \%term\%info +API. .bP -If \fBncurses\fP is built with a support for reading termcap files -directly, then an entry in this list may be the path of a termcap file. +If +.I \%ncurses +is configured with +.I termcap +support, +this variable may contain the location of a +.I \%termcap +file. .bP -If the \fBTERMINFO\fP variable begins with -\*(``hex:\*('' or \*(``b64:\*('', -\fBncurses\fP uses the remainder of that variable as a compiled terminal +If the value of +.I \%TERM\%INFO +begins with \*(``hex:\*('' or \*(``b64:\*('', +.I \%ncurses +uses the remainder of the value as a compiled +.I \%term\%info description. -You might produce the base64 format using \fBinfocmp\fP(1M): -.NS -TERMINFO="$(infocmp -0 -Q2 -q)" +You might produce the base64 format using \fB\%infocmp\fP(1M). +.RS 4 +.IP +.EX +TERMINFO=$(infocmp \-0 \-Q2 \-q) export TERMINFO -.NE +.EE +.RE .IP -The compiled description is used if it corresponds to the terminal identified -by the \fBTERM\fP variable. -.PP -Setting \fBTERMINFO\fP 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: -.RS 3 +The compiled description is used only if it corresponds to the terminal +type identified by +.IR TERM . +.PP +Setting +.I \%TERM\%INFO +is the simplest, +but not the only, +way to direct +.I \%ncurses +to a terminal database. +The search path is as follows. .bP -the last terminal database to which \fBncurses\fP wrote, -if any, is searched first +the last terminal database to which the running +.I \%ncurses +application wrote, +if any .bP -the location specified by the TERMINFO environment variable +the location specified by the +.I \%TERM\%INFO +environment variable .bP -$HOME/.terminfo +.I $HOME/.terminfo .bP -locations listed in the TERMINFO_DIRS environment variable +locations listed in the +.I \%TERMINFO_DIRS +environment variable +.ds td \" empty +.if !'@TERMINFO_DIRS@'no default value' .as td @TERMINFO_DIRS@ +.if !'@TERMINFO@\*(td'' \{\ .bP -one or more locations whose names are configured and compiled into the -ncurses library, i.e., +location(s) configured and compiled into +.I \%ncurses .RS 3 +.if !'\*(td'' \{\ .bP -@TERMINFO_DIRS@ (corresponding to the TERMINFO_DIRS variable) +.I \%@TERMINFO_DIRS@ +.\} +.if !'@TERMINFO'' .if !'\*(td'@TERMINFO@' \{\ .bP -@TERMINFO@ (corresponding to the TERMINFO variable) +.I \%@TERMINFO@ +.\} +.\} .RE -.RE -.PP -.SS TERMINFO_DIRS -.PP -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 \fBTERMINFO\fP variable. -The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX. -.PP -There is no corresponding feature in System V terminfo; -it is an extension developed for \fBncurses\fP. -.SS TERMPATH -.PP -If \fBTERMCAP\fP does not hold a file name then \fBncurses\fP checks -the \fBTERMPATH\fP environment variable. -This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, -semicolons on OS/2 EMX. -.PP -If the \fBTERMPATH\fP environment variable is not set, -\fBncurses\fP looks in the files -.NS -/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, -.NE -.PP +.SS "\fITERMINFO_DIRS\fP" +This variable specifies a list of locations, +akin to +.IR PATH , +in which +.I \%ncurses +searches for the terminal type descriptions described by +.I \%TERMINFO +above. +The list items are separated by colons on Unix +and semicolons on OS/2 EMX. +System\ V +.I \%term\%info +lacks a corresponding feature; +.I \%TERMINFO_DIRS +is an +.I \%ncurses +extension. +.SS "\fITERMPATH\fP" +If +.I \%TERMCAP +does not hold a terminal type description or file name, +then +.I \%ncurses +checks the contents of +.IR \%TERMPATH , +a list of locations, +akin to +.IR PATH , +in which it searches for +.I termcap +terminal type descriptions. +The list items are separated by colons on Unix +and semicolons on OS/2 EMX. +.PP +If both +.I \%TERMCAP +and +.I \%TERMPATH +are unset or invalid, +.I \%ncurses +searches for the files +.IR \%/etc/termcap , +.IR \%/usr/share/misc/termcap , +and +.IR \%$HOME/.termcap , in that order. -.PP -The library may be configured to disregard the following variables when the -current user is the superuser (root), or if the application uses setuid or -setgid permissions: -.NS -$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME. -.NE -.SH ALTERNATE CONFIGURATIONS -.PP -Several different configurations are possible, -depending on the configure script options used when building \fBncurses\fP. -There are a few main options whose effects are visible to the applications -developer using \fBncurses\fP: +.SH "ALTERNATE CONFIGURATIONS" +Many different +.I \%ncurses +configurations are possible, +determined by the options given to the +.I \%configure +script when building the library. +Run the script with the +.B \-\-help +option to peruse them all. +A few are of particular significance to the application developer +employing +.IR \%ncurses . .TP 5 -\-\-disable\-overwrite -The standard include for \fBncurses\fP is as noted in \fBSYNOPSIS\fP: -.NS +.B \-\-disable\-overwrite +The standard include for \fI\%ncurses\fP is as noted in \fBSYNOPSIS\fP: +.RS 5 +.PP +.RS 4 +.EX \fB#include \fP -.NE -.IP -This option is used to avoid filename conflicts when \fBncurses\fP +.EE +.RE +.PP +This option is used to avoid filename conflicts when \fI\%ncurses\fP is not the main implementation of curses of the computer. -If \fBncurses\fP is installed disabling overwrite, it puts its headers in -a subdirectory, e.g., -.NS +If \fI\%ncurses\fP is installed disabling overwrite, +it puts its headers in a subdirectory, +e.g., +.PP +.RS 4 +.EX \fB#include \fP -.NE -.IP +.EE +.RE +.PP It also omits a symbolic link which would allow you to use \fB\-lcurses\fP to build executables. +.RE .TP 5 -\-\-enable\-widec +.B \-\-enable\-widec The configure script renames the library and (if the \fB\-\-disable\-overwrite\fP 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 -.NS +.RS 5 +.PP +.RS 4 +.EX \fB\-lncurses\fP -.NE -.IP +.EE +.RE +.PP you link with -.NS +.PP +.RS 4 +.EX \fB\-lncursesw\fP -.NE -.IP +.EE +.RE +.PP 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: -.RS +The symbol which enables these features has changed +since X/Open Curses, Issue 4: .bP Originally, the wide-character feature required the symbol \fB_XOPEN_SOURCE_EXTENDED\fP @@ -1270,19 +1729,19 @@ Alternatively, you can enable the feature by defining \fBNCURSES_WIDECHAR\fP with the caveat that some other header file than \fBcurses.h\fP may require a specific value for \fB_XOPEN_SOURCE\fP (or a system-specific symbol). -.RE -.IP -The \fBcurses.h\fP 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 \fBWINDOW\fP structure differs, and very few -applications require more than a pointer to \fBWINDOW\fPs. -.IP +.PP +The \fI\%curses.h\fP header file installed for the wide-character +library is designed to be compatible with the non-wide library's header. +Only the size of the \fI\%WINDOW\fP structure differs; +few applications require more than pointers to \fI\%WINDOW\fPs. +.PP 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. +.RE .TP 5 -\-\-with\-pthread +.B \-\-with\-pthread The configure script renames the library. All of the library names have a \*(``t\*('' appended to them (before any \*(``w\*('' added by \fB\-\-enable\-widec\fP). @@ -1292,20 +1751,20 @@ allow read-only access. At the same time, setter-functions are provided to set these values. Some applications (very few) may require changes to work with this convention. .TP 5 -\-\-with\-shared -.TP -\-\-with\-normal -.TP -\-\-with\-debug -.TP -\-\-with\-profile +.B \-\-with\-shared +.tQ +.B \-\-with\-normal +.tQ +.B \-\-with\-debug +.tQ +.B \-\-with\-profile The shared and normal (static) library names differ by their suffixes, e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP. The debug and profiling libraries add a \*(``_g\*('' and a \*(``_p\*('' to the root names respectively, e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP. .TP 5 -\-\-with\-termlib +.B \-\-with\-termlib Low-level functions which do not depend upon whether the library supports wide-characters, are provided in the tinfo library. .IP @@ -1316,242 +1775,487 @@ when only low-level functions are needed. Those functions are described in these pages: .RS .bP -\fBcurs_extend\fP(3X) \- miscellaneous curses extensions +\fB\%curs_extend\fP(3X) \- miscellaneous \fIcurses\fP extensions .bP -\fBcurs_inopts\fP(3X) \- \fBcurses\fP input options +\fB\%curs_inopts\fP(3X) \- \fIcurses\fP input options .bP -\fBcurs_kernel\fP(3X) \- low-level \fBcurses\fP routines +\fB\%curs_kernel\fP(3X) \- low-level \fIcurses\fP routines .bP -\fBcurs_termattrs\fP(3X) \- \fBcurses\fP environment query routines +\fB\%curs_termattrs\fP(3X) \- \fIcurses\fP environment query routines .bP -\fBcurs_termcap\fP(3X) \- \fBcurses\fP emulation of termcap +\fB\%curs_termcap\fP(3X) \- \fIcurses\fP emulation of \fItermcap\fP .bP -\fBcurs_terminfo\fP(3X) \- \fBcurses\fP interfaces to terminfo database +\fB\%curs_terminfo\fP(3X) \- \fIcurses\fP interface to \fIterminfo\fP +database .bP -\fBcurs_util\fP(3X) \- miscellaneous \fBcurses\fP utility routines +\fB\%curs_util\fP(3X) \- miscellaneous \fIcurses\fP utility routines .RE .TP 5 -\-\-with\-trace +.B \-\-with\-trace The \fBtrace\fP function normally resides in the debug library, but it 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. .SH FILES -.TP 5 -@DATADIR@/tabset -directory containing initialization files for the terminal capability database -@TERMINFO@ -terminal capability database -.SH SEE ALSO -\fBterminfo\fP(\*n) and related pages whose names begin -\*(``curs_\*('' for detailed routine descriptions. -.br -\fBcurs_variables\fP(3X) -.br -\fBuser_caps\fP(5) for user-defined capabilities -.SH EXTENSIONS -The \fBncurses\fP library can be compiled with an option (\fB\-DUSE_GETCAP\fP) -that falls back to the old-style /etc/termcap file if the terminal setup code -cannot find a terminfo entry corresponding to \fBTERM\fP. -Use of this feature -is not recommended, as it essentially includes an entire termcap compiler in -the \fBncurses\fP startup code, at significant cost in core and startup cycles. -.PP -The \fBncurses\fP library includes facilities for capturing mouse events on -certain terminals (including xterm). -See the \fBcurs_mouse\fP(3X) -manual page for details. -.PP -The \fBncurses\fP library includes facilities for responding to window -resizing events, e.g., when running in an xterm. -See the \fBresizeterm\fP(3X) -and \fBwresize\fP(3X) manual pages for details. -In addition, the library may be configured with a \fBSIGWINCH\fP handler. -.PP -The \fBncurses\fP 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 \fBdefine_key\fP(3X) -\fBkey_defined\fP(3X), -and \fBkeyok\fP(3X) manual pages for details. -.PP -The \fBncurses\fP 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 \fBdefault_colors\fP(3X) manual page for details. -.PP -The \fBncurses\fP library includes a function for directing application output -to a printer attached to the terminal device. -See the \fBcurs_print\fP(3X) manual page for details. -.SH PORTABILITY -The \fBncurses\fP library is intended to be BASE-level conformant with XSI -Curses. -The EXTENDED XSI Curses functionality -(including color support) is supported. -.PP -A small number of local differences (that is, individual differences between -the XSI Curses and \fBncurses\fP calls) are described in \fBPORTABILITY\fP -sections of the library man pages. -.SS Error checking -.PP -In many cases, X/Open Curses is vague about error conditions, -omitting some of the SVr4 documentation. -.PP -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. -.SS Extensions versus portability -.PP -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: +.TP +.I @DATADIR@/tabset +tab stop initialization database +.TP +.I \*d +compiled terminal capability database +.SH NOTES +X/Open Curses permits most functions it specifies to be made available +as macros as well. +.\" See X/Open Curses Issue 4, Version 2, pp. 227-234. +.\" See X/Open Curses Issue 7, pp. 311-318. +\fI\%ncurses\fP does so .bP -The routine \fBhas_key\fP is not part of XPG4, nor is it present in SVr4. -See the \fBcurs_getch\fP(3X) manual page for details. +for functions that return values via their parameters, .bP -The routine \fBslk_attr\fP is not part of XPG4, nor is it present in SVr4. -See the \fBcurs_slk\fP(3X) manual page for details. +to support obsolete features, +.bP +to reuse functions +(for example, +those that move the cursor before another operation), +and .bP -The routines \fBgetmouse\fP, \fBmousemask\fP, \fBungetmouse\fP, -\fBmouseinterval\fP, and \fBwenclose\fP relating to mouse interfacing are not -part of XPG4, nor are they present in SVr4. -See the \fBcurs_mouse\fP(3X) manual page for details. +a few special cases. +.PP +If the standard output file descriptor of an +.I \%ncurses +program is redirected to something that is not a terminal device, +the library writes screen updates to the standard error file descriptor. +This was an undocumented feature of SVr3 +.IR curses . +.PP +See subsection \*(``Header Files\*('' below regarding symbols exposed by +inclusion of \fI\%curses.h\fP. +.SH EXTENSIONS +.I \%ncurses +enables an application to capture mouse events on certain terminals, +including \fI\%xterm\fP(1); +see \fB\%curs_mouse\fP(3X). +.PP +.I \%ncurses +provides a means of responding to window resizing events, +as when running in a GUI terminal emulator application such as +.IR \%xterm ; +see \fB\%resizeterm\fP(3X) and \fB\%wresize\fP(3X). +.PP +.I \%ncurses +allows an application to query the terminal for the presence of a wide +variety of special keys; +see \fB\%has_key\fP(3X). +.PP +.I \%ncurses +extends the fixed set of function key capabilities specified by X/Open +Curses by allowing the application programmer to define additional key +events at runtime; +see +\fB\%define_key\fP(3X), +\fB\%key_defined\fP(3X), +\fB\%keybound\fP(3X), +and +\fB\%keyok\fP(3X). +.PP +.I \%ncurses +can exploit the capabilities of terminals implementing ISO\ 6429/ECMA-48 +SGR\ 39 and SGR\ 49 sequences, +which allow an application to reset the terminal to its original +foreground and background colors. +From a user's perspective, +the application is able to draw colored text on a background whose color +is set independently, +providing better control over color contrasts. +See \fB\%default_colors\fP(3X). +.PP +An +.I \%ncurses +application can eschew knowledge of +.I \%WINDOW +structure internals, +instead using accessor functions such as +\fB\%is_scrollok\fP(3X). +.PP +.I \%ncurses +enables an application to direct application output to a printer +attached to the terminal device; +see \fB\%curs_print\fP(3X). +.PP +.I \%ncurses +offers \fB\%slk_attr\fP(3X) as a counterpart of \fB\%attr_get\fP(3X) for +soft-label key lines, +and \fB\%extended_slk_color\fP(3X) as a form of \fB\%slk_color\fP(3X) +that can gather color information from them when many colors are +supported. +.PP +Some extensions are available only if +.I \%ncurses +permits modification of \fB\%unctrl\fP(3X)'s behavior; +see \fB\%use_legacy_coding\fP(3X). +.I \%ncurses +is compiled to support them; +section \*(``ALTERNATE CONFIGURATIONS\*('' describes how. .bP -The routine \fBmcprint\fP was not present in any previous curses implementation. -See the \fBcurs_print\fP(3X) manual page for details. +Rudimentary support for multi-threaded applications may be available; +see \fBcurs_threads\fP(3X). .bP -The routine \fBwresize\fP is not part of XPG4, nor is it present in SVr4. -See the \fBwresize\fP(3X) manual page for details. +Functions that ease the management of multiple screens can be exposed; +see \fBcurs_sp_funcs\fP(3X). .bP -The WINDOW structure's internal details can be hidden from application -programs. -See \fBcurs_opaque\fP(3X) for the discussion of \fBis_scrollok\fP, etc. +To aid applications to debug their memory usage, +.I ncurses +optionally offers functions to more aggressively free memory it +dynamically allocates itself; +see \fBcurs_memleaks\fP(3X). .bP -This implementation can be configured to provide rudimentary support -for multi-threaded applications. -See \fBcurs_threads\fP(3X) for details. +The library facilitates auditing and troubleshooting of its behavior; +see \fBcurs_trace\fP(3X). .bP -This implementation can also be configured to provide a set of functions which -improve the ability to manage multiple screens. -See \fBcurs_sp_funcs\fP(3X) for details. -.SS Padding differences -.PP -In historic curses versions, delays embedded in the capabilities \fBcr\fP, -\fBind\fP, \fBcub1\fP, \fBff\fP and \fBtab\fP 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 interface -to the UNIX kernel significantly and increases the package's portability -correspondingly. -.SS Header files -The header file \fB\fP automatically includes the header files -\fB\fP and \fB\fP. +The compiler option +.B \%\-DUSE_GETCAP +causes the library to fall back to reading +.I \%/etc/termcap +if the terminal setup code cannot find a +.I \%term\%info +entry corresponding to +.IR TERM . +Use of this feature is not recommended, +as it essentially includes an entire +.I termcap +compiler in the +.I \%ncurses +startup code, +at a cost in memory usage and application launch latency. +.PP +.I \%PDCurses +and NetBSD +.I curses +incorporate some +.I \%ncurses +extensions. +Individual man pages indicate where this is the case. +.SH PORTABILITY +X/Open Curses defines two levels of conformance, +\*(``base\*('' and \*(``enhanced\*(''. +The latter includes several additional features, +such as wide-character and color support. +.I \%ncurses +intends base-level conformance with X/Open Curses, +and supports nearly all features of its enhanced level. +.\" XXX: What's missing? GBR counts untic(1), and that's all. +.PP +Differences between X/Open Curses and +.I \%ncurses +are documented in the \*(``PORTABILITY\*('' sections of applicable man +pages. +.SS "Error Checking" +In many cases, X/Open Curses is vague about error conditions, +omitting some of the SVr4 documentation. +.PP +Unlike other implementations, +.I \%ncurses +checks pointer parameters, +such as those to +.I \%WINDOW +structures, +to ensure that they are not null. +This is done primarily 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 occurred. +Relying on this +(or some other) +extension adversely affects the portability of +.I curses +applications. +.SS "Padding Differences" +In historical +.I curses +implementations, +delays embedded in the +.I \%term\%info +capabilities +.B \%carriage_return +.RB ( cr ), +.B \%scroll_forward +.RB ( ind ), +.B \%cursor_left +.RB ( cub1 ), +.B \%form_feed +.RB ( ff ), +and +.B \%tab +.RB ( ht ) +activated corresponding delay bits in the Unix terminal driver. +.I \%ncurses +performs all padding by sending NUL bytes to the device. +This method is slightly more expensive, +but narrows the interface to the Unix kernel significantly and +correspondingly increases the package's portability. +.SS "Header Files" +The header file +.I \%curses.h +itself includes the header files +.I \%stdio.h +and +.IR \%unctrl.h . .PP X/Open Curses has more to say, -but does not finish the story: .RS 4 .PP -The inclusion of may make visible all symbols -from the headers , , , and . +The inclusion of +.I \%curses.h +may make visible all symbols from the headers +.IR \%stdio.h , +.IR \%term.h , +.IR \%termios.h , +and +.IR \%wchar.h . .RE .PP -Here is a more complete story: +but does not finish the story. +A more complete account follows. .bP -Starting with BSD curses, all implementations have included . +Starting with 4BSD +.I curses +(1980) +all implementations have provided a +.I \%curses.h +file. .IP -BSD curses included and from an internal header -"curses.ext" ("ext" was a short name for \fIexterns\fP). +BSD +.I curses +code included +.I \%curses.h +and +.I \%unctrl.h +from an internal header file +.IR \%curses.ext , +where +\*(``ext\*('' abbreviated \*(``externs\*(''. .IP -BSD curses used internally (for \fBprintw\fP and \fBscanw\fP), -but nothing in itself relied upon . +The implementations of +.I \%printw +and +.I \%scanw +used undocumented internal functions of the standard I/O library +.RI ( _doprnt +and +.IR _doscan ), +but nothing in +.I \%curses.h +itself relied upon +.IR \%stdio.h . .bP -SVr2 curses added \fBnewterm\fP(3X), which relies upon . -That is, the function prototype uses \fBFILE\fP. +SVr2 +.I curses +added +.IR \%newterm , +which relies upon +.I \%stdio.h +because its function prototype employs the +.I FILE +type. .IP -SVr4 curses added \fBputwin\fP and \fBgetwin\fP, which also use . +SVr4 +.I curses +added +.I \%putwin +and +.IR \%getwin , +which also use +.IR \%stdio.h . .IP -X/Open Curses documents all three of these functions. +X/Open Curses specifies all three of these functions. .IP -SVr4 curses and X/Open Curses do not require the developer to -include before including . -Both document curses showing as the only required header. +SVr4 +.I curses +and X/Open Curses do not require the developer to include +.I \%stdio.h +before +.IR \%curses.h . +Both document use of +.I curses +as requiring only +.IR \%curses.h . .IP -As a result, standard will always include . +As a result, +standard +.I \%curses.h +always includes +.IR \%stdio.h . .bP -X/Open Curses is inconsistent with respect to SVr4 regarding . +X/Open Curses and SVr4 +.I curses +are inconsistent with respect to +.IR \%unctrl.h . .IP -As noted in \fBcurs_util\fP(3X), ncurses includes from - (like SVr4). +As noted in \fBcurs_util\fP(3X), +.I \%ncurses +includes +.I \%unctrl.h +from +.I \%curses.h +(as SVr4 does). .bP -X/Open's comments about and may refer to HP-UX and AIX: +X/Open Curses's comments about +.I \%term.h +and +.I \%termios.h +may refer to HP-UX and AIX. .IP -HP-UX curses includes from -to declare \fBsetupterm\fP in curses.h, -but ncurses (and Solaris curses) do not. +HP-UX +.I curses +includes +.I \%term.h +from +.I \%curses.h +to declare +.I \%setupterm +in +.IR \%curses.h , +but +.I \%ncurses +and Solaris +.I curses +do not. .IP -AIX curses includes and . -Again, ncurses (and Solaris curses) do not. +AIX +.I curses +includes +.I \%term.h +and +.IR \% termios.h . +Again, +.I \%ncurses +and Solaris +.I curses +do not. .bP -X/Open says that \fImay\fP include , -but there is no requirement that it do that. +X/Open Curses says that +.I \%curses.h +.B may +include +.IR \%term.h , +but does not require it to do so. .IP -Some programs use functions declared in both and , -and must include both headers in the same module. -Very old versions of AIX curses required including -before including . +Some programs use functions declared in both +.I \%curses.h +and +.IR \%term.h , +and must include both header files in the same module. +Very old versions of AIX +.I curses +required inclusion of +.I \%curses.h +before +.IR \%term.h . .IP -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 before . +The header files supplied by +.I \%ncurses +include the standard library headers required for its declarations, +so +.IR \%ncurses 's +own header files can be included in any order. +But for portability, +you should include +.I \%curses.h +before +.IR \%term.h . .bP -X/Open Curses says \fI"may make visible"\fP -because including a header file does not necessarily make all symbols -in it visible (there are ifdef's to consider). +X/Open Curses says \*(``may make visible\*('' because including a header +file does not necessarily make visible all of the symbols in it +(consider +.B \%#ifdef +and similar). .IP -For instance, in ncurses \fImay\fP 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 \fB_XOPEN_SOURCE\fP +For instance, +.IR \%ncurses 's +.I \%curses.h +.B may \" bold to contrast with preceding italic +include +.I \%wchar.h +if the proper symbol is defined, +and if +.I \%ncurses +is configured for wide-character support. +If +.I \%wchar.h +is included, +its symbols +.B may \" bold for consistency in this paragraph +be made visible depending on the value of the +.B _XOPEN_SOURCE feature test macro. .bP -X/Open Curses documents one required header, -in a special case: before to prototype -the \fBvw_printw\fP and \fBvw_scanw\fP functions +X/Open Curses mandates an application's inclusion of one standard C +library header in a special case: +.I \%stdarg.h +before +.I \%curses.h +to prototype the functions +.I \%vw_printw +and +.I \%vw_scanw (as well as the obsolete -the \fBvwprintw\fP and \fBvwscanw\fP functions). -Each of those uses a \fBva_list\fP parameter. +.I \%vwprintw +and +.IR \%vwscanw ). +Each of these takes a variadic argument list, +a +.I \%va_list +parameter, +like that of \fI\%printf\fP(3). .IP -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 or . -Initially, that was done by using \fBvoid*\fP for the \fBva_list\fP +SVr3 +.I curses +introduced +the two obsolete functions, +and X/Open Curses the others. +In between, +SVr4 +.I curses +provided for the possibility that an application might include either +.I \%varargs.h +or +.IR \%stdarg.h . +These represented contrasting approaches to handling variadic +argument lists. +The older interface, +.IR \%varargs.h , +used a pointer to +.I char \" V7, 32V, System III, 3BSD +for variadic functions' +.I \%va_list parameter. -Later, a special type (defined in ) was introduced, -to allow for compiler type-checking. -That special type is always available, -because is always included by . +Later, +the list acquired its own standard data type, +.IR \%va_list , +defined in +.IR \%stdarg.h , +empowering the compiler to check the types of a function call's actual +parameters against the formal ones declared in its prototype. .IP -None of the X/Open Curses implementations require an application -to include before because they either -have allowed for a special type, or (like ncurses) include -directly to provide a portable interface. -.SH NOTES -.PP -If standard output from a \fBncurses\fP 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. +No conforming implementations of X/Open Curses require an application +to include +.I \%stdarg.h +before +.I \%curses.h +because they either have allowed for a special type, +or, +like +.IR \%ncurses , +they include +.I \%stdarg.h +themselves to provide a portable interface. .SH AUTHORS -Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. -Based on \fIpcurses\fP by Pavel Curtis. +Zeyd M. Ben-Halim, +Eric S. Raymond, +Thomas E. Dickey. +Based on +.I \%pcurses +by Pavel Curtis. +.SH SEE ALSO +\fB\%curs_variables\fP(3X), +\fB\%terminfo\fP(5), +\fB\%user_caps\fP(5) diff --git a/man/new_pair.3x b/man/new_pair.3x index 5a92af2f..5e844bf8 100644 --- a/man/new_pair.3x +++ b/man/new_pair.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,44 +29,38 @@ .\" .\" Author: Thomas E. Dickey .\" -.\" $Id: new_pair.3x,v 1.18 2021/12/25 20:10:40 tom Exp $ -.TH new_pair 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: new_pair.3x,v 1.46 2024/03/16 15:35:01 tom Exp $ +.TH new_pair 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. .SH NAME -\fBalloc_pair\fP, -\fBfind_pair\fP, -\fBfree_pair\fP \- new curses color-pair functions +\fB\%alloc_pair\fP, +\fB\%find_pair\fP, +\fB\%free_pair\fP \- +dynamically allocate \fIcurses\fR color pairs .SH SYNOPSIS -\fB#include \fP -.sp -\fBint alloc_pair(int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP -.br -\fBint find_pair(int \fP\fIfg\fP\fB, int \fP\fIbg\fP\fB);\fP -.br -\fBint free_pair(int \fP\fIpair\fP\fB);\fP +.nf +\fB#include +.PP +\fBint alloc_pair(int \fIfg\fP, int \fIbg\fP); +\fBint find_pair(int \fIfg\fP, int \fIbg\fP); +\fBint free_pair(int \fIpair\fP); +.fi .SH DESCRIPTION -These functions are an extension to the curses library. +These functions are an extension to the \fIcurses\fP library. They permit an 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. @@ -80,25 +74,31 @@ 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. .bP -Color pairs are the curses library's way of managing a color palette +Color pairs are the \fIcurses\fP library's way of managing a color palette on a terminal. If the library does not keep track of the \fIcombinations\fP of colors which are displayed, it will be inefficient. -.bP +.IP \(bu 4 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: -.NS -\fBCOLORS\fP\fI * \fP\fBCOLORS\fP -.NE -.bP +.PP +.RS 8 +.EX +\fBCOLORS\fI * \fBCOLORS\fR +.EE +.RE +.IP \(bu 4 Terminals which support \fIdefault colors\fP distinct from \*(``ANSI colors\*('' add to the possible combinations, producing this total: -.NS -\fI( \fP\fBCOLORS\fP\fI + 1 ) * ( \fP\fBCOLORS\fP\fI + 1 )\fP -.NE +.PP +.RS 8 +.EX +\fI( \fBCOLORS\fI + 1 ) * ( \fBCOLORS\fI + 1 )\fR +.EE +.RE .bP An application might use up to a few dozen color pairs to implement a predefined color scheme. @@ -130,7 +130,8 @@ All of the color pairs are allocated from a table of possible color pairs. The size of the table is determined by the terminfo \fBpairs\fP capability. The table is shared with \fBinit_pair\fP; in fact \fBalloc_pair\fP calls \fBinit_pair\fP after -updating the ncurses library's fast index to the colors versus color pairs. +updating the \fI\%ncurses\fP library's fast index +to the colors versus color pairs. .SS find_pair The \fBfind_pair\fP function accepts parameters for foreground and background color, and @@ -141,7 +142,6 @@ Otherwise it returns \-1. Marks the given color pair as unused, i.e., like color pair 0. .SH RETURN VALUE -.PP The \fBalloc_pair\fP function returns a color pair number in the range 1 through \fBCOLOR_PAIRS\fP\-1, unless it encounters an error updating its fast index to the color pair values, preventing it from allocating @@ -155,12 +155,12 @@ or \-1 if not. Likewise, \fBfree_pair\fP returns \fBOK\fP unless it encounters an error updating the fast index or if no such color pair is in use. .SH PORTABILITY -These routines are specific to ncurses. +These routines are specific to \fI\%ncurses\fP. They were not supported on Version 7, BSD or System V implementations. It is recommended that -any code depending on them be conditioned using NCURSES_VERSION. +any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP. +.SH AUTHORS +Thomas Dickey .SH SEE ALSO -\fBcurs_color\fP(3X). -.SH AUTHOR -Thomas Dickey. +\fB\%curs_color\fP(3X) diff --git a/man/panel.3x b/man/panel.3x index 4f9952b5..c63b4315 100644 --- a/man/panel.3x +++ b/man/panel.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,253 +27,264 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: panel.3x,v 1.41 2021/12/25 21:49:32 tom Exp $ -.TH panel 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: panel.3x,v 1.63 2024/03/16 15:35:01 tom Exp $ +.TH panel 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -panel \- panel stack extension for curses +panel \- +panel stack extension for \fIcurses\fP .SH SYNOPSIS -\fB#include \fP -.P -\fBcc [flags] sourcefiles \-lpanel \-lncurses\fP -.P -\fBPANEL *new_panel(WINDOW *\fIwin\fP\fB);\fP -.sp -\fBint bottom_panel(PANEL *\fP\fIpan\fP\fB);\fP -.br -\fBint top_panel(PANEL *\fP\fIpan\fP\fB);\fP -.br -\fBint show_panel(PANEL *\fP\fIpan\fP\fB);\fP -.br -\fBvoid update_panels(void);\fP -.br -\fBint hide_panel(PANEL *\fP\fIpan\fP\fB);\fP -.sp -\fBWINDOW *panel_window(const PANEL *\fIpan\fP\fB);\fP -.br -\fBint replace_panel(PANEL *\fIpan\fP\fB, WINDOW *\fIwindow\fP\fB);\fP -.br -\fBint move_panel(PANEL *\fIpan\fP\fB, int \fIstarty\fP\fB, int \fIstartx\fP\fB);\fP -.br -\fBint panel_hidden(const PANEL *\fIpan\fP\fB);\fP -.sp -\fBPANEL *panel_above(const PANEL *\fIpan\fP\fB);\fP -.br -\fBPANEL *panel_below(const PANEL *\fIpan\fP\fB);\fP -.sp -\fBint set_panel_userptr(PANEL *\fIpan\fP\fB, const void *\fIptr\fP\fB);\fP -.br -\fBconst void *panel_userptr(const PANEL *\fIpan\fP\fB);\fP -.sp -\fBint del_panel(PANEL *\fIpan\fP\fB);\fP -.sp -\fR/* ncurses-extensions */\fP -.br -\fBPANEL *ground_panel(SCREEN *\fIsp\fP\fB);\fP -.br -\fBPANEL *ceiling_panel(SCREEN *\fIsp\fP\fB);\fP -.br +.nf +\fB#include +.PP +\fBPANEL *new_panel(WINDOW *\fIwin\fP); +.PP +\fBint bottom_panel(PANEL *\fIpan\fP); +\fBint top_panel(PANEL *\fIpan\fP); +\fBint show_panel(PANEL *\fIpan\fP); +\fBvoid update_panels(void); +\fBint hide_panel(PANEL *\fIpan\fP); +.PP +\fBWINDOW *panel_window(const PANEL *\fIpan\fP); +\fBint replace_panel(PANEL *\fIpan\fP, WINDOW *\fIwindow\fP); +\fBint move_panel(PANEL *\fIpan\fP, int \fIstarty\fP, int \fIstartx\fP); +\fBint panel_hidden(const PANEL *\fIpan\fP); +.PP +\fBPANEL *panel_above(const PANEL *\fIpan\fP); +\fBPANEL *panel_below(const PANEL *\fIpan\fP); +.PP +\fBint set_panel_userptr(PANEL *\fIpan\fP, const void *\fIptr\fP); +\fBconst void *panel_userptr(const PANEL *\fIpan\fP); +.PP +\fBint del_panel(PANEL *\fIpan\fP); +.PP +\fI/* ncurses extensions */\fP +\fBPANEL *ground_panel(SCREEN *\fIsp\fP); +\fBPANEL *ceiling_panel(SCREEN *\fIsp\fP); +.fi .SH DESCRIPTION -Panels are \fBcurses\fP(3X) windows with the added feature of +Panels are \fBcurses\fP(3X) windows with the added property of depth. -Panel functions allow the use of stacked windows and ensure -the proper portions of each window and the curses \fBstdscr\fP window are -hidden or displayed when panels are added, moved, modified or removed. +Panel functions allow the use of stacked windows and ensure that the +proper portions of each window and the \fIcurses\fP \fB\%stdscr\fP +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 -\fBstdscr\fP window is beneath all panels, and is not considered part -of the stack. -.P -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 any desired location in the stack. -.P -Panel routines are a functional layer added to \fBcurses\fP(3X), make only -high-level curses calls, and work anywhere terminfo curses does. +\fB\%stdscr\fP window is beneath all panels, +and is not considered part of the stack. +.PP +A window is associated with each panel. +The panel routines enable you to create, +move, +hide, +and show panels. +You can relocate a panel to any desired position in the stack. +.PP +Panel routines are a functional layer added to \fIcurses\fP, +make only high-level \fIcurses\fP calls, +and work anywhere \fIcurses\fP does. .SH FUNCTIONS .\" --------- .SS bottom_panel -\fBbottom_panel(\fIpan\fP\fB)\fR +\fB\%bottom_panel(\fIpan\fB)\fR puts panel \fIpan\fP at the bottom of all panels. .\" --------- .SS ceiling_panel -\fBceiling_panel(\fIsp\fP\fB)\fR -acts like \fBpanel_below(NULL)\fP, for the given \fBSCREEN\fP \fIsp\fP. +\fB\%ceiling_panel(\fIsp\fB)\fR +acts like \fB\%panel_below(NULL)\fP +for the given \fISCREEN\fP \fIsp\fP. .\" --------- .SS del_panel -\fBdel_panel(\fIpan\fP\fB)\fR -removes the given panel \fIpan\fP from the stack and deallocates the -\fBPANEL\fP structure (but not its associated window). +\fB\%del_panel(\fIpan\fB)\fR +removes the given panel \fIpan\fP from the stack and deallocates the +\fI\%PANEL\fP structure (but not its associated window). .\" --------- .SS ground_panel -\fBground_panel(\fIsp\fP\fB)\fR -acts like \fBpanel_above(NULL)\fP, for the given \fBSCREEN\fP \fIsp\fP. +\fB\%ground_panel(\fIsp\fB)\fR +acts like \fB\%panel_above(NULL)\fP +for the given \fISCREEN\fP \fIsp\fP. .\" --------- .SS hide_panel -\fBhide_panel(\fIpan\fP\fB)\fR +\fB\%hide_panel(\fIpan\fB)\fR removes the given panel \fIpan\fP from the panel stack and thus hides it from view. -The \fBPANEL\fP structure is not lost, merely removed from the stack. +The \fI\%PANEL\fP structure is not lost, +merely removed from the stack. .\" --------- .SS move_panel -\fBmove_panel(\fIpan\fP\fB,\fIstarty\fP\fB,\fIstartx\fP\fB)\fR -moves the given panel \fIpan\fP's window so that its upper-left corner is at -\fIstarty\fP, \fIstartx\fP. +\fB\%move_panel(\fIpan\fB, \fIstarty\fB, \fIstartx\fB)\fR +moves the given panel \fIpan\fP's window so that its upper-left corner +is at +\fIstarty\fP, +\fIstartx\fP. It does not change the position of the panel in the stack. -Be sure to use this function, not \fBmvwin\fP(3X), to move a panel window. +Be sure to use this function, +not \fB\%mvwin\fP(3X), +to move a panel window. .\" --------- .SS new_panel -\fBnew_panel(\fIwin\fP\fB)\fR allocates a \fBPANEL\fP structure, -associates it with \fIwin\fP, 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. +\fB\%new_panel(\fIwin\fB)\fR allocates a \fI\%PANEL\fR structure, +associates it with \fIwin\fP, +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. .\" --------- .SS panel_above -\fBpanel_above(\fIpan\fP\fB)\fR +\fB\%panel_above(\fIpan\fB)\fR returns a pointer to the panel above \fIpan\fP. If the panel argument is -\fB(PANEL *)0\fP, it returns a pointer to the bottom panel in the stack. +\*(``\fB(PANEL *)0\fP\*('', +it returns a pointer to the bottom panel in the stack. .\" --------- .SS panel_below -\fBpanel_below(\fIpan\fP\fB)\fR +\fB\%panel_below(\fIpan\fB)\fR returns a pointer to the panel just below \fIpan\fP. -If the panel argument -is \fB(PANEL *)0\fP, it returns a pointer to the top panel in the stack. +If the panel argument is +\*(``\fB(PANEL *)0\fP\*('', +it returns a pointer to the top panel in the stack. .\" --------- .SS panel_hidden -\fBpanel_hidden(\fIpan\fP\fB)\fR -returns \fBTRUE\fP if the panel \fIpan\fP is in the panel stack, -\fBFALSE\fP if it is not. -If the panel is a null pointer, return \fBERR\fP. +\fB\%panel_hidden(\fIpan\fB)\fR +returns \fBFALSE\fP if the panel \fIpan\fP is in the panel stack, +and \fBTRUE\fP if it is not. +If the panel is a null pointer, +it returns \fBERR\fP. .\" --------- .SS panel_userptr -\fBpanel_userptr(\fIpan\fP\fB)\fR +\fB\%panel_userptr(\fIpan\fB)\fR returns the user pointer for a given panel \fIpan\fP. .\" --------- .SS panel_window -\fBpanel_window(\fIpan\fP\fB)\fR +\fB\%panel_window(\fIpan\fB)\fR returns a pointer to the window of the given panel \fIpan\fP. .\" --------- .SS replace_panel -\fBreplace_panel(\fIpan\fP\fB,\fIwindow\fP\fB)\fR +\fB\%replace_panel(\fIpan\fB, \fIwindow\fB)\fR replaces the current window of panel \fIpan\fP with \fIwindow\fP -This is useful, for example if you want to resize a panel. -In \fBncurses\fP, you can call \fBreplace_panel\fP -to resize a panel using a window resized with \fBwresize\fP(3X). +This is useful if, +for example, +you want to resize a panel. +In \fI\%ncurses\fP, +you can call \fB\%replace_panel\fP +to resize a panel using a window resized with \fB\%wresize\fP(3X). It does not change the position of the panel in the stack. .\" --------- .SS set_panel_userptr -\fBset_panel_userptr(\fIpan\fP\fB,\fIptr\fP\fB)\fR +\fB\%set_panel_userptr(\fIpan\fB, \fIptr\fB)\fR sets the panel's user pointer. .\" --------- .SS show_panel -\fBshow_panel(\fIpan\fP\fB)\fR +\fB\%show_panel(\fIpan\fB)\fR makes a hidden panel visible by placing it on top of the panels in the panel stack. -See \fBCOMPATIBILITY\fP below. +See \*(``PORTABILITY\*('' below. .\" --------- .SS top_panel -\fBtop_panel(\fIpan\fP\fB)\fR -puts the given visible panel \fIpan\fP on top of all panels in the stack. -See \fBCOMPATIBILITY\fP below. +\fB\%top_panel(\fIpan\fB)\fR +puts the given visible panel \fIpan\fP on top of all panels in the +stack. +See \*(``PORTABILITY\*('' below. .\" --------- .SS update_panels -\fBupdate_panels()\fR -refreshes the \fIvirtual screen\fP to reflect the relations between the -panels in the stack, but does not call \fBdoupdate\fP(3X) to refresh the -\fIphysical screen\fP. -Use this function and not \fBwrefresh\fP(3X) or \fBwnoutrefresh\fP(3X). +\fB\%update_panels()\fR +refreshes the virtual screen to reflect the relations between the panels +in the stack, +but does not call \fB\%doupdate\fP(3X) to refresh the physical screen. +Use this function and not \fB\%wrefresh\fP(3X) or +\fB\%wnoutrefresh\fP(3X). .PP -\fBupdate_panels\fP may be called more than once before a call to -\fBdoupdate\fP, but \fBdoupdate\fP is the function responsible for updating -the \fIphysical screen\fP. -.SH DIAGNOSTICS +\fB\%update_panels\fP may be called more than once before a call to +\fB\%doupdate\fP, +but \fB\%doupdate\fP is the function responsible for updating +the physical screen. +.SH "RETURN VALUE" Each routine that returns a pointer returns \fBNULL\fP if an error occurs. Each routine that returns an int value returns \fBOK\fP if it executes successfully and \fBERR\fP if not. .PP -Except as noted, the \fIpan\fP and \fIwindow\fP parameters must be non-null. -If those are null, an error is returned. +Except as noted, +the \fIpan\fP and \fIwindow\fP parameters must be non-null. +If either is null, +an error is returned. .PP -The \fBmove_panel\fP function uses \fBmvwin\fP(3X), -and will return an error if \fBmvwin\fP returns an error. -.SH 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 \fBPANEL\fP data structures are merely similar. -The programmer -is cautioned not to directly use \fBPANEL\fP fields. -.P -The functions \fBshow_panel\fP and \fBtop_panel\fP are identical -in this implementation, and work equally well with displayed or hidden -panels. -In the native System V implementation, \fBshow_panel\fP is -intended for making a hidden panel visible (at the top of the stack) -and \fBtop_panel\fP 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. -.SH NOTE -In your library list, libpanel.a should be before libncurses.a; that is, -you should say \*(``\-lpanel \-lncurses\*('', not the other way around -(which would give a link-error with static libraries). +The \fB\%move_panel\fP function uses \fBmvwin\fP(3X), +and returns an error if \fB\%mvwin\fP returns an error. +.SH NOTES +The header file \fI\%panel.h\fP itself includes the header file +\fI\%curses.h\fP. .SH PORTABILITY +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 +never changed. +The \fI\%PANEL\fP data structures are merely similar. +The programmer is cautioned not to directly use \fI\%PANEL\fP fields. .PP -The panel facility was documented in SVr4.2 in -\fICharacter User Interface Programming (UNIX SVR4.2)\fP. +The functions \fB\%show_panel\fP and \fB\%top_panel\fP are identical +in this implementation, +and work equally well with displayed or hidden panels. +In the System\ V implementation, +\fB\%show_panel\fP is intended for making a hidden panel visible +(at the top of the stack) +and \fB\%top_panel\fP 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 System\ V panel libraries. +.SH HISTORY +A panel facility was documented in SVr4.2's +\fICharacter User Interface Programming\fP document. .PP It is not part of X/Open Curses. .PP A few implementations exist: .bP Systems based on SVr4 source code, -e.g., Solaris, provide this library. +such as Solaris, +provide this library. .bP -\fBncurses\fP (since version 0.6 in 1993) -and \fBPDCurses\fP (since version 2.2 in 1995) +\fI\%ncurses\fP (since version 0.6 in 1993) +and \fIPDCurses\fP (since version 2.2 in 1995) provide a panel library whose common ancestor -was a public domain implementation by Warren Tucker +is a public domain implementation by Warren Tucker published in \fIu386mon\fP 2.20 (1990). .IP -According to Tucker, the SystemV panel library -was first released in SVr3.2 (1988), +According to Tucker, +the System\ V panel library was first released in SVr3.2 (1988), and his implementation helped with a port to SVr3.1 (1987). .IP Several developers have improved each of these; they are no longer the same as Tucker's implementation. .bP NetBSD 8 (2018) -has a panel library begun by Valery Ushakov in 2015. -This is based on the AT&T documentation. -.SH FILES -.P -panel.h -interface for the panels library -.P -libpanel.a -the panels library itself -.SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_variables\fP(3X), -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.SH AUTHOR +has a panel library begun by Valery Ushakov in 2015, +based on the System\ V documentation. +.SH AUTHORS +Warren Tucker originally wrote this +implementation, +primarily to assist in porting \fI\%u386mon\fP to systems without a +native panel library. .PP -Originally written by Warren Tucker , -primarily to assist in porting \fIu386mon\fP to systems without a native -panels library. +Zeyd ben-Halim repackaged it for \fI\%ncurses\fP. .PP -Repackaged for ncurses by Zeyd ben-Halim. -.PP -Juergen Pfeifer and Thomas E. Dickey revised/improved the library. +Juergen Pfeifer and Thomas E. Dickey revised and improved the library. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%curs_variables\fP(3X) diff --git a/man/resizeterm.3x b/man/resizeterm.3x index 708b3a26..5e23d9fb 100644 --- a/man/resizeterm.3x +++ b/man/resizeterm.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,61 +29,95 @@ .\" .\" Author: Thomas E. Dickey 1996-on .\" -.\" $Id: resizeterm.3x,v 1.30 2021/12/25 21:49:32 tom Exp $ -.TH resizeterm 3X "" +.\" $Id: resizeterm.3x,v 1.56 2024/03/16 15:35:01 tom Exp $ +.TH resizeterm 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -\fBis_term_resized\fP, -\fBresize_term\fP, -\fBresizeterm\fP \- change the curses terminal size +\fB\%is_term_resized\fP, +\fB\%resize_term\fP, +\fB\%resizeterm\fP \- +manage the terminal dimensions understood by \fIcurses\fR .SH SYNOPSIS -\fB#include \fP -.sp -\fBbool is_term_resized(int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP -.br -\fBint resize_term(int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP -.br -\fBint resizeterm(int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP +.nf +\fB#include +.PP +\fBbool is_term_resized(int \fIlines\fP, int \fIcolumns\fP); +\fBint resize_term(int \fIlines\fP, int \fIcolumns\fP); +\fBint resizeterm(int \fIlines\fP, int \fIcolumns\fP); +.fi .SH DESCRIPTION +This is an extension to the \fIcurses\fP library. +It provides callers with a hook into the \fI\%ncurses\fP data to resize +windows, +primarily for use by programs running in an X Window terminal (e.g., xterm) +when the terminal's screen size is changed by the user: +.bP +\fIcurses\fP windows cannot extend outside the screen. +If the terminal is shrunk, \fIcurses\fP windows must be shrunk to fit. +.bP +If the terminal is stretched, +rows and/or columns can be added to existing windows. +The added cells should match the current attributes of the windows. .PP -This is an extension to the curses library. -It provides callers with a hook into the \fBncurses\fP data to resize windows, -primarily for use by programs running in an X Window terminal (e.g., xterm). -.SS resizeterm +If the calling program has not set up a handler for \fB\%SIGWINCH\fP +when it initializes \fI\%ncurses\fP +(e.g., using \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X)), +then \fI\%ncurses\fP sets a handler for \fB\%SIGWINCH\fP which notifies +the library when a window-size event has occurred. +The library checks for this notification +.bP +when reading input data, +.bP +when implicitly resuming program mode +(e.g., between \fB\%endwin\fP(3X) and \fB\%wrefresh\fP(3X)), +and +.bP +when explicitly resuming program mode in \fB\%restartterm\fP(3X). +.PP +When the library has found that the terminal's window-size has +changed, it calls \fB\%resizeterm\fP to update its data structures. .PP -The function \fBresizeterm\fP resizes the standard and current windows +An application which establishes its own \fB\%SIGWINCH\fP handler +can call \fB\%resizeterm\fP, but in that case, the library will not +see \fB\%SIGWINCH\fP, and proper layout will rely upon the application. +.SH FUNCTIONS +.SS resizeterm +The function \fB\%resizeterm\fP resizes the standard and current windows +(i.e., \fB\%stdscr\fP and \fB\%curscr\fP) to the specified dimensions, and adjusts other bookkeeping data used by -the \fBncurses\fP library that record the window dimensions -such as the \fBLINES\fP and \fBCOLS\fP variables. +the \fI\%ncurses\fP library that record the window dimensions +such as the \fB\%LINES\fP and \fB\%COLS\fP variables. .SS resize_term +Most of the work for \fB\%resizeterm\fP is +done by the inner function \fB\%resize_term\fP. +The outer function \fB\%resizeterm\fP adds bookkeeping +for the \fB\%SIGWINCH\fP handler, +as well as repainting the soft-key area (see \fB\%slk_touch\fP(3X)). .PP -Most of the work is done by the inner function \fBresize_term\fP. -The outer function \fBresizeterm\fP adds bookkeeping -for the \fBSIGWINCH\fP handler, -as well as repainting the soft-key area (see \fBslk_touch\fP(3X)). -.PP -When resizing the windows, -\fBresize_term\fP blank-fills the areas that are extended. -The calling application should fill in these areas with appropriate data. -.PP -The \fBresize_term\fP function attempts to resize all windows. -However, due to the calling convention of pads, -it is not possible to resize these -without additional interaction with the application. +The \fB\%resize_term\fP function attempts to resize all windows. +This helps with simple applications. +However: +.bP +It is not possible to automatically resize pads. +.bP +Applications which have complicated layouts should check for +\fB\%KEY_RESIZE\fP returned from \fB\%wgetch\fP, +and adjust their layout, e.g., using \fB\%wresize\fP and \fB\%mvwin\fP, +or by recreating the windows. .PP -When resizing windows, \fBresize_term\fP recursively adjusts subwindows, +When resizing windows, \fB\%resize_term\fP recursively adjusts subwindows, keeping them within the updated parent window's limits. If a top-level window happens to extend to the screen's limits, -then on resizing the window, \fBresize_term\fP will keep the window +then on resizing the window, \fB\%resize_term\fP will keep the window extending to the corresponding limit, regardless of whether the screen has shrunk or grown. .SS is_term_resized -.PP -A support function \fBis_term_resized\fP is provided so that applications -can check if the \fBresize_term\fP function would modify the window structures. +A support function \fB\%is_term_resized\fP is provided so that applications +can check if the \fB\%resize_term\fP function would modify +the window structures. It returns \fBTRUE\fP if the windows would be modified, and \fBFALSE\fP otherwise. .SH RETURN VALUE @@ -93,51 +127,54 @@ They will fail if either of the dimensions are less than or equal to zero, or if an error occurs while (re)allocating memory for the windows. .SH NOTES While these functions are intended to be used to support a signal handler -(i.e., for \fBSIGWINCH\fP), care should be taken to avoid invoking them in a -context where \fBmalloc\fP or \fBrealloc\fP may have been interrupted, +(i.e., for \fB\%SIGWINCH\fP), care should be taken to avoid invoking them in a +context where \fB\%malloc\fP or \fB\%realloc\fP may have been interrupted, since it uses those functions. .PP -If ncurses is configured to supply its own \fBSIGWINCH\fP handler, +If \fI\%ncurses\fP is configured to supply its own \fB\%SIGWINCH\fP +handler, .bP -on receipt of a \fBSIGWINCH\fP, the handler sets a flag +on receipt of a \fB\%SIGWINCH\fP, the handler sets a flag .bP -which is tested in \fBwgetch\fP(3X) and \fBdoupdate\fP, +which is tested in +\fB\%wgetch\fP(3X), +\fB\%doupdate\fP(3X) and +\fB\%restartterm\fP(3X), .bP -in turn, calling the \fBresizeterm\fP function, +in turn, calling the \fB\%resizeterm\fP function, .bP -which \fBungetch\fP's a \fBKEY_RESIZE\fP which -will be read on the next call to \fBwgetch\fP. +which \fB\%ungetch\fP's a \fB\%KEY_RESIZE\fP which +will be read on the next call to \fB\%wgetch\fP. .IP -The \fBKEY_RESIZE\fP alerts an application that the screen size has changed, +The \fB\%KEY_RESIZE\fP alerts an application that the screen size has changed, and that it should repaint special features such as pads that cannot be done automatically. .IP -Calling \fBresizeterm\fP or \fBresize_term\fP +Calling \fB\%resizeterm\fP or \fB\%resize_term\fP directly from a signal handler is unsafe. -This indirect method is used to provide a safe way to resize the ncurses -data structures. +This indirect method is used to provide a safe way to resize the +\fI\%ncurses\fP data structures. .PP -If the environment variables \fBLINES\fP or \fBCOLUMNS\fP are set, +If the environment variables \fILINES\fP or \fI\%COLUMNS\fP are set, this overrides the library's use of the window size obtained from the operating system. -Thus, even if a \fBSIGWINCH\fP is received, +Thus, even if a \fB\%SIGWINCH\fP is received, no screen size change may be recorded. .SH PORTABILITY -.PP -It is possible to resize the screen with SVr4 curses, +It is possible to resize the screen with SVr4 \fIcurses\fP, by .bP -exiting curses with \fBendwin\fP(3X) and +exiting \fIcurses\fP with \fB\%endwin\fP(3X) and .bP -resuming using \fBrefresh\fP(3X). +resuming using \fB\%refresh\fP(3X). .PP Doing that clears the screen and is visually distracting. .PP -This extension of ncurses was introduced in mid-1995. -It was adopted in NetBSD curses (2001) and PDCurses (2003). +This extension of \fI\%ncurses\fP was introduced in mid-1995. +It was adopted in NetBSD \fIcurses\fP (2001) and PDCurses (2003). +.SH AUTHORS +Thomas Dickey (from an equivalent function written in 1988 for BSD \fIcurses\fP) .SH SEE ALSO -\fBcurs_getch\fP(3X), -\fBcurs_variables\fP(3X), -\fBwresize\fP(3X). -.SH AUTHOR -Thomas Dickey (from an equivalent function written in 1988 for BSD curses). +\fB\%curs_getch\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%wresize\fP(3X) diff --git a/man/scr_dump.5 b/man/scr_dump.5 index fd2e1a07..95b2142e 100644 --- a/man/scr_dump.5 +++ b/man/scr_dump.5 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,36 +27,28 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: scr_dump.5,v 1.20 2021/12/25 21:13:38 tom Exp $ -.TH scr_dump 5 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +.\" $Id: scr_dump.5,v 1.46 2024/03/23 20:42:29 tom Exp $ +.TH scr_dump 5 2024-03-23 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "File formats" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -scr_dump \- format of curses screen-dumps. -.SH SYNOPSIS -.B scr_dump +scr_dump \- +\fIcurses\fR screen dump +.\"SH SYNOPSIS .SH DESCRIPTION -.PP The curses library provides applications with the ability to write the contents of a window to an external file using \fBscr_dump\fP or \fBputwin\fP, and read it back using \fBscr_restore\fP or \fBgetwin\fP. @@ -65,10 +57,9 @@ The \fBputwin\fP and \fBgetwin\fP functions do the work; while \fBscr_dump\fP and \fBscr_restore\fP conveniently save and restore the whole screen, i.e., \fBstdscr\fP. .SS ncurses6 -.PP A longstanding implementation of screen-dump was revised with ncurses6 to remedy problems with the earlier approach: -.bP +.IP \(bu 4 A \*(``magic number\*('' is written to the beginning of the dump file, allowing applications (such as \fBfile\fP(1)) to recognize curses dump files. .IP @@ -76,25 +67,36 @@ Because ncurses6 uses a new format, that requires a new magic number was unused by other applications. This 16-bit number was unused: -.NS -0x8888 (octal \*(``\\210\\210\*('') -.NE -.IP +.RS 4 +.PP +.RS 4 +.EX +0x8888 (octal \*(``\e210\e210\*('') +.EE +.RE +.PP but to be more certain, this 32-bit number was chosen: -.NS -0x88888888 (octal \*(``\\210\\210\\210\\210\*('') -.NE -.IP +.PP +.RS 4 +.EX +0x88888888 (octal \*(``\e210\e210\e210\e210\*('') +.EE +.RE +.PP This is the pattern submitted to the maintainers of the \fBfile\fP program: -.NS +.PP +.RS 4 +.EX # # ncurses5 (and before) did not use a magic number, # making screen dumps "data". # # ncurses6 (2015) uses this format, ignoring byte-order -0 string \\210\\210\\210\\210ncurses ncurses6 screen image +0 string \e210\e210\e210\e210ncurses ncurses6 screen image # -.NE +.EE +.RE +.RE .bP The screen dumps are written in textual form, so that internal data sizes are not directly related to the dump-format, and @@ -111,171 +113,208 @@ screen-size, because the library truncates or fills the screen as necessary. .bP The ncurses6 \fBgetwin\fP reads the legacy screen dumps from ncurses5. -.SS ncurses5 (legacy) -.PP -The screen-dump feature was added to ncurses in June 1995. +.SS "ncurses5 (Legacy)" +The screen-dump feature was added to \fI\%ncurses\fP in June 1995. While there were fixes and improvements in succeeding years, the basic scheme was unchanged: .bP -The \fBWINDOW\fP structure was written in binary form. +The \fI\%WINDOW\fP structure was written in binary form. .bP -The \fBWINDOW\fP structure refers to lines of data, -which were written as an array of binary data following the \fBWINDOW\fP. +The \fI\%WINDOW\fP structure refers to lines of data, +which were written as an array of binary data following the \fI\%WINDOW\fP. .bP When \fBgetwin\fP restored the window, it would keep track of offsets into the array of line-data -and adjust the \fBWINDOW\fP structure which was read back into memory. +and adjust the \fI\%WINDOW\fP structure which was read back into memory. .PP -This is similar to Unix SystemV, +This is similar to Unix System\ V, but does not write a \*(``magic number\*('' to identify the file format. .SH PORTABILITY -.PP -There is no standard format for \fBputwin\fP. -This section gives a brief description of the existing formats. -.SS X/Open Curses -.PP -Refer to \fIX/Open Curses, Issue 7\fP (2009). -.PP -X/Open's documentation for \fIenhanced curses\fP says only: +There is no standard format for +.I curses +screen dumps. +A brief survey of the existing implementations follows. +.SS "X/Open Curses" +X/Open Curses, Issue 7 specifies little. +It says +(boldface emphasis added) .RS 3 .PP -The \fBgetwin(\ ) \fPfunction reads window-related data -stored in the file by \fIputwin(\ )\fP. -The function -then creates and initializes a new window using that data. +\*(``[t]he \fI\%getwin()\fP function reads window-related data stored in +the file by \fI\%putwin()\fP. +The function then creates and initializes a new window using that data. .PP -The \fBputwin(\ )\fP function writes all data associated -with \fIwin\fP into the \fBstdio\fP(3) stream to which \fIfilep\fP -points, using an \fBunspecified format\fP. -This information can be retrieved later using \fBgetwin(\ )\fP. +The \fI\%putwin()\fP function writes all data associated with \fIwin\fP +into the \fI\%stdio\fP stream to which \fIfilep\fP points, +using an \fBunspecified format\fP. +This information can be retrieved later using \fI\%getwin()\fP.\*('' .RE .PP In the mid-1990s when the X/Open Curses document was written, -there were still systems using older, less capable curses libraries -(aside from the BSD curses library which was not relevant to X/Open -because it did not meet the criteria for \fIbase curses\fP). -The document explained the term \*(``enhanced\*('' as follows: -.RS 3 -.bP -Shading is used to identify \fIX/Open Enhanced Curses\fP material, -relating to interfaces included to provide enhanced capabilities -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 \fBXPG4 or to earlier XPG releases\fP. -The relevant reference pages may provide additional -or more specific portability warnings about use of the material. -.RE -.PP -In the foregoing, emphasis was added to \fBunspecified format\fP -and to \fBXPG4 or to earlier XPG releases\fP, -for clarity. -.SS Unix SystemV +there were still System\ V systems using older, +less capable +.I curses +libraries. +BSD +.I curses +was not relevant to X/Open because it did not meet the criteria +for base-level conformance; +see \fB\%ncurses\fP(3X). +.SS "System V" +System\ V +.I curses +identified the file format by writing a \*(``magic number\*('' at the +beginning of the dump. +The \fI\%WINDOW\fP data and the lines of text follow, all in binary form. .PP -Unix SystemV curses identified the file format by writing a -\*(``magic number\*('' at the beginning of the dump. -The \fBWINDOW\fP data and the lines of text follow, all in binary form. +Solaris +.I curses +has the following definitions. .PP -The Solaris curses source has these definitions: -.NS +.RS 4 +.EX /* terminfo magic number */ #define MAGNUM 0432 /* curses screen dump magic number */ #define SVR2_DUMP_MAGIC_NUMBER 0433 #define SVR3_DUMP_MAGIC_NUMBER 0434 -.NE +.EE +.RE .PP That is, the feature was likely introduced in SVr2 (1984), and improved in SVr3 (1987). -The Solaris curses source has no magic number for SVr4 (1989). -Other operating systems (AIX and HPUX) use a magic number which would -correspond to this definition: -.NS +Solaris +.I curses +has no magic number for SVr4 (1989). +Other System\ V operating systems +(AIX and HP-UX) +use a magic number that would correspond to the following. +.PP +.RS 4 +.EX /* curses screen dump magic number */ #define SVR4_DUMP_MAGIC_NUMBER 0435 -.NE +.EE +.RE .PP That octal number in bytes is 001, 035. -Because most Unix vendors use big-endian hardware, -the magic number is written with the high-order byte first, e.g., -.NS -\001\035 -.NE +Because most Unix vendors at the time used big-endian hardware, +the magic number is written with the high-order byte first. .PP -After the magic number, the \fBWINDOW\fP structure and line-data are -written in binary format. -While the magic number used by the Unix systems can be seen using \fBod\fP(1), -none of the Unix systems documents the format used for screen-dumps. +.RS 4 +.EX +\e001\e035 +.EE +.RE +.PP +After the magic number, +the \fI\%WINDOW\fP structure and line data are written in binary format. +While the magic number used by these systems can be observed with +\fIod\fP(1), +none of them documents the format used for screen dumps. .PP -The Unix systems do not use identical formats. -While collecting information for for this manual page, -the \fIsavescreen\fP test-program -produced dumps of different size -(all on 64-bit hardware, on 40x80 screens): +Nor do they use an identical format, +even with the System\ V family. +The +.I \%ncurses +.I \%savescreen +test program was used to collect information for this manual page. +It produced dumps of different size +(all on 64-bit hardware, +on 40x80 screens): .bP AIX (51817 bytes) .bP -HPUX (90093 bytes) +HP-UX (90093 bytes) .bP Solaris 10 (13273 bytes) .bP -ncurses5 (12888 bytes) +\fI\%ncurses\fP5 (12888 bytes) .SS Solaris -.PP -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: +As noted above, +Solaris +.I curses +has no magic number corresponding to SVr4 +.IR curses . +This is odd, +since Solaris was the first operating system to meet the SVr4 +guidelines. +Solaris furthermore supplies two versions of +.IR curses . .bP -The default curses library uses the SVr3 magic number. +The default +.I curses +library uses the SVr3 magic number. .bP -There is an alternate curses library in \fB/usr/xpg4\fP. -This uses a textual format with no magic number. +An alternate +.I curses +library +(which we term +.I \%xcurses), +available in +.IR /usr/xpg4 , +uses a textual format with no magic number. .IP -According to the copyright notice, the \fIxpg4\fP Solaris curses library was -developed by MKS (Mortice Kern Systems) from 1990 to 1995. +According to its copyright notice, +this +.I \%xcurses +library was developed by MKS +(Mortice Kern Systems) from 1990 to 1995. .IP -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. +Like ncurses6, +it includes a 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. .SS PDCurses -.PP -PDCurses added support for screen dumps in version 2.7 (2005). -Like Unix SystemV and ncurses5, -it writes the \fBWINDOW\fP structure in binary, +.I \%PDCurses +added support for screen dumps in version 2.7 (2005). +Like System\ V and ncurses5, +it writes the \fI\%WINDOW\fP structure in binary, but begins the file with its three-byte identifier \*(``PDC\*('', -followed by a one-byte version, -e.g., -.NS - \*(``PDC\\001\*('' -.NE -.SS NetBSD +followed by a single-byte version number. .PP -As of April 2017, NetBSD curses does -not support \fBscr_dump\fP and \fBscr_restore\fP -(or \fBscr_init\fP, \fBscr_set\fP), -although it has \fBputwin\fP and \fBgetwin\fP. +.RS 4 +.EX + \*(``PDC\e001\*('' +.EE +.RE +.SS NetBSD +As of April 2017, +NetBSD +.I curses +does not support \fB\%scr_dump\fP and \fB\%scr_restore\fP +(or \fB\%scr_init\fP, +\fB\%scr_set\fP), +although it has \fB\%putwin\fP and \fB\%getwin\fP. .PP -Like ncurses5, NetBSD \fBputwin\fP does not identify its dumps with a -useful magic number. +Like ncurses5, +NetBSD \fB\%putwin\fP does not identify its dumps with a useful magic +number. It writes .bP -the curses shared library major and minor versions -as the first two bytes (e.g., 7 and 1), +the +.I curses +shared library major and minor versions as the first two bytes +(for example, +7 and 1), .bP -followed by a binary dump of the \fBWINDOW\fP, +followed by a binary dump of the \fI\%WINDOW\fP, .bP -some data for wide-characters referenced by the \fBWINDOW\fP structure, and +some data for wide characters referenced by the \fI\%WINDOW\fP +structure, +and .bP -finally, lines as done by other implementations. -.SH EXAMPLE -.PP +finally, +lines as done by other implementations. +.SH EXAMPLES Given a simple program which writes text to the screen (and for the sake of example, limiting the screen-size to 10x20): -.NS +.PP +.RS 4 +.EX #include int @@ -300,33 +339,37 @@ main(void) endwin(); return 0; } -.NE +.EE +.RE .PP When run using ncurses6, the output looks like this: -.NS -\\210\\210\\210\\210ncurses 6.0.20170415 +.PP +.RS 4 +.EX +\e210\e210\e210\e210ncurses 6.0.20170415 _cury=5 _curx=11 _maxy=9 _maxx=19 _flags=14 -_attrs=\\{REVERSE|C2} +_attrs=\e{REVERSE|C2} flag=_idcok _delay=-1 _regbottom=9 -_bkgrnd=\\{NORMAL|C1}\\s +_bkgrnd=\e{NORMAL|C1}\es rows: -1:\\{NORMAL|C1}\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -2:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -3:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -4:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -5:\\s\\s\\s\\s\\s\\{BOLD}Hello\\{NORMAL}\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -6:\\s\\s\\s\\s\\s\\{REVERSE|C2}World!\\{NORMAL|C1}\\s\\s\\s\\s\\s\\s\\s\\s\\s -7:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -8:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -9:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -10:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s -.NE +1:\e{NORMAL|C1}\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +2:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +3:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +4:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +5:\es\es\es\es\es\e{BOLD}Hello\e{NORMAL}\es\es\es\es\es\es\es\es\es\es +6:\es\es\es\es\es\e{REVERSE|C2}World!\e{NORMAL|C1}\es\es\es\es\es\es\es\es\es +7:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +8:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +9:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +10:\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es\es +.EE +.RE .PP The first four octal escapes are actually nonprinting characters, while the remainder of the file is printable text. @@ -334,18 +377,20 @@ You may notice: .bP The actual color pair values are not written to the file. .bP -All characters are shown in printable form; spaces are \*(``\\s\*('' to +All characters are shown in printable form; spaces are \*(``\es\*('' to ensure they are not overlooked. .bP -Attributes are written in escaped curly braces, e.g., \*(``\\{BOLD}\*('', -and may include a color-pair (C1 or C2 in this example). +Attributes are written in escaped curly braces, e.g., \*(``\e{BOLD}\*('', +and may include a color pair (C1 or C2 in this example). .bP The parameters in the header are written out only if they are nonzero. When reading back, order does not matter. .ne 10 .PP Running the same program with Solaris \fIxpg4\fP curses gives this dump: -.NS +.PP +.RS 4 +.EX MAX=10,20 BEG=0,0 SCROLL=0,10 @@ -379,7 +424,8 @@ BG=0,0, 9,0,0,1, 9,19,0,0, CUR=11,5 -.NE +.EE +.RE .PP Solaris \fBgetwin\fP requires that all parameters are present, and in the same order. @@ -389,8 +435,10 @@ The \fIxpg4\fP curses library does not know about the \fBbce\fP .PP 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\*(''): -.NS +Here is the corresponding dump (using \*(``od \-t x1\*(''): +.PP +.RS 4 +.EX 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 0000040 00 00 b8 1a 06 08 cc 1a 06 08 00 00 09 00 10 00 @@ -413,17 +461,16 @@ Here is the corresponding dump (using \*(``od -t x1\*(''): 0001620 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0002371 -.NE -.SH SEE ALSO -.PP -\fBcurs_scr_dump\fP(3X), -\fBcurs_util\fP(3X). +.EE +.RE .SH AUTHORS -.PP Thomas E. Dickey .br -extended screen-dump format for ncurses 6.0 (2015) +extended screen-dump format for \fI\%ncurses\fP 6.0 (2015) .sp Eric S. Raymond .br -screen dump feature in ncurses 1.9.2d (1995) +screen dump feature in \fI\%ncurses\fP 1.9.2d (1995) +.SH SEE ALSO +\fB\%curs_scr_dump\fP(3X), +\fB\%curs_util\fP(3X) diff --git a/man/tabs.1 b/man/tabs.1 index 84c6b22e..059bc1ec 100644 --- a/man/tabs.1 +++ b/man/tabs.1 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2008-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,44 +27,40 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tabs.1,v 1.35 2021/12/25 19:04:39 tom Exp $ -.TH @TABS@ 1 "" -.ds n 5 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: tabs.1,v 1.59 2024/04/20 19:08:15 tom Exp $ +.TH @TABS@ 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +. .SH NAME -\fB@TABS@\fP \- set tabs on a terminal +\fB\%@TABS@\fP \- +set terminal tab stops .SH SYNOPSIS -\fB@TABS@\fP [\fIoptions\fP]] \fI[tabstop-list]\fP +\fB@TABS@\fP [\fIoptions\fP] [\fItabstop-list\fP] .SH DESCRIPTION -.PP The \fB@TABS@\fP program clears and sets tab-stops on the terminal. This uses the terminfo \fBclear_all_tabs\fP and \fBset_tab\fP capabilities. If either is absent, \fB@TABS@\fP is unable to clear/set tab-stops. The terminal should be configured to use hard tabs, e.g., -.NS +.PP +.RS 4 +.EX stty tab0 -.NE +.EE +.RE .PP Like \fB@CLEAR@\fP(1), \fB@TABS@\fP writes to the standard output. You can redirect the standard output to a file (which prevents @@ -79,15 +75,18 @@ 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 -.NS -tabs -8 -.NE +.PP +.RS 4 +.EX +tabs \-8 +.EE +.RE .PP or use the \fB@RESET@\fP program, since the normal initialization sequences do not ensure that tab-stops are reset. .SH OPTIONS -.SS General Options +.SS "General Options" .TP 5 .BI \-T "name" Tell \fB@TABS@\fP which terminal type to use. @@ -105,12 +104,13 @@ This option tells \fB@TABS@\fP to check the options and run any debugging option, but not to modify the terminal settings. .TP \fB\-V\fP -reports the version of ncurses which was used in this program, and exits. +reports the version of \fI\%ncurses\fP which was used in this program, +and exits. .PP The \fB@TABS@\fP program processes a single list of tab stops. The last option to be processed which defines a list is the one that determines the list to be processed. -.SS Implicit Lists +.SS "Implicit Lists" Use a single number as an option, e.g., \*(``\fB\-5\fP\*('' to set tabs at the given interval (in this case 1, 6, 11, 16, 21, etc.). @@ -119,27 +119,32 @@ Tabs are repeated up to the right margin of the screen. Use \*(``\fB\-0\fP\*('' to clear all tabs. .PP Use \*(``\fB\-8\fP\*('' to set tabs to the standard interval. -.SS Explicit Lists +.SS "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 example, -.NS +.PP +.RS 4 +.EX tabs 1,6,11,16,21 -.br tabs 1 6 11 16 21 -.NE +.EE +.RE .PP Use a \*(``+\*('' to treat a number as an increment relative to the previous value, e.g., -.NS +.PP +.RS 4 +.EX tabs 1,+5,+5,+5,+5 -.NE +.EE +.RE .PP which is equivalent to the 1,6,11,16,21 example. -.SS Predefined Tab-Stops +.SS "Predefined Tab Stops" POSIX defines several predefined lists of tab stops. .TP 5 .B \-a @@ -187,107 +192,166 @@ UNIVAC 1100 Assembler .br 1,12,20,44 .SS Margins -A few terminals provide the capability for changing their left/right margins. -The @TABS@ program has an option to use this feature: +A few terminals expose a means of changing their left and right margins. +\fB@TABS@\fP supports this feature with an option. .TP 5 .BI +m \ margin The effect depends on whether the terminal has the margin capabilities: .RS .bP If the terminal provides the capability for setting the left margin, -@TABS@ uses this, and adjusts the available width for tab-stops. +\fB@TABS@\fP uses this, +and adjusts the available tab stop widths. .bP 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. +\fB@TABS@\fP imitates their effect, +putting tab stops at appropriate places on each line. +The terminal's left margin is not modified. .RE .IP -If the \fImargin\fP parameter is omitted, the default is 10. -Use \fB+m0\fP 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. +If the +.I margin +parameter is omitted, +the default is 10. +Use +.B +m0 +to reset the left margin, +that is, +to make it the left edge of the terminal's display. +Before setting a left margin, +\fB@TABS@\fP resets the margin to reduce problems that might arise +from moving the cursor to the left of the current left margin. .PP -When setting or resetting the left-margin, -@TABS@ may reset the right-margin. +When setting or resetting the left margin, +\fB@TABS@\fP may also reset the right margin. +.SH FILES +.TP +.I @DATADIR@/tabset +tab stop initialization database .SH PORTABILITY -.PP -\fIIEEE Std 1003.1/The Open Group Base Specifications Issue 7\fP (POSIX.1-2008) -describes a \fBtabs\fP utility. -However +IEEE Std 1003.1/The Open Group Base Specifications Issue 7 +(POSIX.1-2008) +describes a +.B tabs +utility. +However, .bP -This standard describes a \fB+m\fP option, to set a terminal's left-margin. +this standard describes a +.B +m +option to set a terminal's left margin. Very few of the entries in the terminal database provide the -\fBsmgl\fP (\fBset_left_margin\fP) or -\fBsmglp\fP (\fBset_left_margin_parm\fP) -capability needed to support the feature. +.B \%set_left_margin +.RB ( smgl ) +or +.B \%set_left_margin_parm +.RB \%( smglp ) +capabilities needed to support the feature. .bP There is no counterpart in X/Open Curses Issue 7 for this utility, unlike \fB@TPUT@\fP(1). .PP -The \fB\-d\fP (debug) and \fB\-n\fP (no-op) options are extensions not provided -by other implementations. -.PP -A \fBtabs\fP utility appeared in PWB/Unix 1.0 (1977). -There was a reduced version of the \fBtabs\fP 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 +.B \-d +(debug) and +.B \-n +(no-op) options are +.I \%ncurses +extensions not provided by other implementations. +.SH HISTORY +A +.B tabs +utility appeared in PWB/Unix 1.0 (1977). +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/source/s2/\ +.\" tabs.c +A reduced version shipped in Seventh Edition Unix +(early 1979) +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/tabs.c +and in 3BSD +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/cmd/\ +.\" tabs.c +(later the same year); +it supported a \*(``\-n\*('' option to set the first tab stop at the +left margin. +That option is not specified by POSIX. .PP -The PWB/Unix \fBtabs\fP utility, which was included in System III (1980), -used built-in tables rather than the terminal database, +The PWB/Unix +.B tabs +utility returned in System III (1980), +and used built-in tables to support a half-dozen hardcopy terminal (printer) types. -It also had built-in logic to support the left-margin, +It also had logic to support setting the left margin, as well as a feature for copying the tab settings from a file. .PP -Later versions of Unix, e.g., SVr4, +Versions of the program in later releases of AT&T Unix, +such as SVr4, +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=SysVR4/cmd/tabs/tabs.c 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 \fBtset\fP (1982) -and incorporated into \fBtput\fP uses the terminal database, +but retained the tables to support the printers. +By this time, +System\ V +.B tput +had incorporated the tab stop initialization feature of BSD's +.B tset +from 1982, +but employed the +.I \%term\%info +database to do so. .PP -The \fB+m\fP option was documented -in the Base Specifications Issue 5 (Unix98, 1997), -and omitted in Issue 6 (Unix03, 2004) without documenting the rationale, +The +.B +m +option was documented in the POSIX Base Specifications Issue 5 +(Unix98, 1997), +then omitted in Issue 6 +(Unix03, 2004) +without express motivation, though an introductory comment -\fI\*(``and optionally adjusts the margin\*(''\fP remains, +\*(``and optionally adjusts the margin\*('' remains, overlooked in the removal. -The documented \fBtabs\fP utility in Issues 6 and later has no mechanism -for setting margins. -The \fB+m\fP option in this implementation differs from the feature -in SVr4 by using terminal capabilities rather than built-in tables. +The +.B tabs +utility documented in Issues 6 and later has no mechanism for setting +margins. +The +.B +m +option in +.I \%ncurses +\fB\%@TABS@\fP differs from the SVr4 feature by using terminal +capabilities rather than built-in tables. .PP -POSIX documents no limits on the number of tab stops. -Documentation for other implementations states that there is a limit on the -number of tab stops -(e.g., 20 in PWB/Unix's \fBtabs\fP utility). -While some terminals may not accept an arbitrary number -of tab stops, this implementation will attempt to set tab stops up to the -right margin of the screen, if the given list happens to be that long. +POSIX documents no limit on the number of tab stops. +Other implementations impose one; +the limit is 20 in PWB/Unix's +.B tabs +utility. +While some terminals may not accept an arbitrary number of tab stops, +.I \%ncurses +\fB\%@TABS@\fP attempts to set tab stops up to the right margin if the +list thereof is sufficiently long. .PP -The \fIRationale\fP section of the POSIX documentation goes into some -detail about the ways the committee considered redesigning the -\fBtabs\fP and \fBtput\fP utilities, -without proposing an improved solution. -It comments that -.RS 5 +The \*(``Rationale\*('' section of the Issue 6 +.B tabs +reference page +.\" https://pubs.opengroup.org/onlinepubs/009604499/utilities/tabs.html +details how the committee considered redesigning the +.B tabs +and +.B tput +utilities, +without settling on an improved solution. +It claims that .PP -no known historical version of tabs supports the capability of setting -arbitrary tab stops. +.RS 4 +\*(``no known historical version of +.I tabs +supports the capability of setting arbitrary tab stops.\*('' .RE .PP -However, the \fIExplicit Lists\fP described in this manual page -were implemented in PWB/Unix. -Those provide the capability of setting abitrary tab stops. +The feature described in subsection \*(``Explicit Lists\*('' above was +implemented in PWB/Unix, +.\" see URL above +and permitted the setting of abitrary tab stops nevertheless. .SH SEE ALSO -\fB@INFOCMP@\fP(1M), -\fB@TSET@\fP(1), -\fBcurses\fP(3X), -\fBterminfo\fP(\*n). -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +\fB\%@INFOCMP@\fP(1M), +\fB\%@TSET@\fP(1), +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/term.5 b/man/term.5 index b21e90f8..cec231f5 100644 --- a/man/term.5 +++ b/man/term.5 @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,44 +28,48 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: term.5,v 1.43 2021/12/25 21:28:59 tom Exp $ -.TH term 5 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +.\" $Id: term.5,v 1.77 2024/04/20 21:24:19 tom Exp $ +.TH term 5 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "File formats" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ' \(aq +.ds ^ \(ha +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ds ' ' +.ds ^ ^ +.\} +.ie n .ds CW R +.el \{ +.ie \n(.g .ds CW CR +.el .ds CW CW +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ds n 5 +. .ds d @TERMINFO@ .SH NAME -term \- format of compiled term file. +term \- +compiled \fIterminfo\fR terminal description .SH SYNOPSIS .B term .SH DESCRIPTION -.SS STORAGE LOCATION +.SS "Storage Location" Compiled terminfo descriptions are placed under the directory \fB\*d\fP. -Two configurations are supported (when building the \fBncurses\fP libraries): +Two configurations are supported +(when building the \fI\%ncurses\fP libraries): .TP 5 .B directory tree A two-level scheme is used to avoid a linear search -of a huge \s-1UNIX\s+1 system directory: \fB\*d/c/name\fP where +of a huge Unix system directory: \fB\*d/c/name\fP where .I name is the name of the terminal, and .I c @@ -83,15 +88,16 @@ the terminfo's primary name as a key, and records containing only aliases pointing to the primary name. .IP If built to write hashed databases, -\fBncurses\fP can still read terminfo databases organized as a directory tree, +\fI\%ncurses\fP can still read terminfo databases organized as a +directory tree, but cannot write entries into the directory tree. It can write (or rewrite) entries in the hashed database. .IP -\fBncurses\fP distinguishes the two cases in the TERMINFO and TERMINFO_DIRS -environment variable by assuming a directory tree for entries that -correspond to an existing directory, +\fI\%ncurses\fP distinguishes the two cases in the \fI\%TERMINFO\fP and +\fI\%TERMINFO_DIRS\fP environment variable by assuming a directory tree +for entries that correspond to an existing directory, and hashed database otherwise. -.SS LEGACY STORAGE FORMAT +.SS "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 ordering or sign extension are made. @@ -105,7 +111,7 @@ a) \fIheader\fP, .TP 3 b) \fIterminal names\fP, .TP 3 -c) \fIboolean flags\fP, +c) \fIBoolean flags\fP, .TP 3 d) \fInumbers\fP, .TP 3 @@ -124,7 +130,7 @@ These integers are .TP 5 (2) the size, in bytes, of the \fIterminal names\fP section; .TP 5 -(3) the number of bytes in the \fIboolean flags\fP section; +(3) the number of bytes in the \fIBoolean flags\fP section; .TP 5 (4) the number of short integers in the \fInumbers\fP section; .TP 5 @@ -134,7 +140,7 @@ These integers are .RE .PP The capabilities in the -\fIboolean flags\fP, +\fIBoolean flags\fP, \fInumbers\fP, and \fIstrings\fP sections are in the same order as the file . @@ -162,14 +168,14 @@ If a capability is absent from this terminal, .IP The integer value \-1 is represented by two bytes 0377, 0377. .br -Absent boolean values are represented by the byte 0 (false). +Absent Boolean values are represented by the byte 0 (false). .bP If a capability has been canceled from this terminal, @TIC@ stores a \-2 in the corresponding table. .IP The integer value \-2 is represented by two bytes 0377, 0376. .br -The boolean value \-2 is represented by the byte 0376. +The Boolean value \-2 is represented by the byte 0376. .br .bP Other negative values are illegal. @@ -181,11 +187,11 @@ separated by the \*(``|\*('' character. The \fIterminal names\fP section is terminated with an \s-1ASCII NUL\s+1 character. .PP -The \fIboolean flags\fP section has one byte for each flag. +The \fIBoolean flags\fP 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. .PP -Between the \fIboolean flags\fP section and the \fInumber\fP section, +Between the \fIBoolean flags\fP section and the \fInumber\fP section, a null byte will be inserted, if necessary, to ensure that the \fInumber\fP section begins on an even byte This is a relic of the PDP\-11's word-addressed architecture, @@ -193,7 +199,7 @@ 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. .PP -The \fInumbers\fP section is similar to the \fIboolean flags\fP section. +The \fInumbers\fP section is similar to the \fIBoolean flags\fP section. Each capability takes up two bytes, and is stored as a little-endian short integer. .PP @@ -205,24 +211,24 @@ The \fIstring table\fP is the last section. It contains all of the values of string capabilities referenced in the \fIstrings\fP section. Each string is null-terminated. -Special characters in ^X or \ec notation are stored in their +Special characters in \*^X or \ec notation are stored in their interpreted form, not the printing representation. Padding information $ and parameter information %x are stored intact in uninterpreted form. -.SS EXTENDED STORAGE FORMAT +.SS "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 predefined set of boolean, number or string capabilities. +the same binary format is used in all modern Unix systems. +Each system uses a predefined set of Boolean, number or string capabilities. .PP -The \fBncurses\fP libraries and applications support +The \fI\%ncurses\fP libraries and applications support extended terminfo binary format, allowing users to define capabilities which are loaded at runtime. This extension is made possible by using the fact that the other implementations stop reading the terminfo data when they have reached the end of the size given in the header. -\fBncurses\fP checks the size, +\fI\%ncurses\fP checks the size, and if it exceeds that due to the predefined data, continues to parse according to its own scheme. .PP @@ -230,7 +236,7 @@ First, it reads the extended header (5 short integers): .RS 5 .TP 5 (1) -count of extended boolean capabilities +count of extended Boolean capabilities .TP 5 (2) count of extended numeric capabilities @@ -249,22 +255,31 @@ The count- and size-values for the extended string table include the extended capability \fInames\fP as well as extended capability \fIvalues\fP. .PP -Using the counts and sizes, \fBncurses\fP allocates arrays and reads data -for the extended capabilities in the same order as the header information. +Using the counts and sizes, +\fI\%ncurses\fP allocates arrays and reads data for the extended +capabilities in the same order as the header information. .PP The extended string table contains values for string capabilities. 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 capabilities in order, e.g., Booleans, then numbers and finally strings. .PP +By storing terminal descriptions in this way, +\fI\%ncurses\fP is able to provide a database useful with legacy +applications, +as well as providing data for applications which need more than the +predefined capabilities. +See \fBuser_caps\fP(5) for an overview +of the way \fI\%ncurses\fP uses this extended information. +.PP Applications which manipulate terminal data can use the definitions described in \fBterm_variables\fP(3X) which associate the long capability names with members of a \fBTERMTYPE\fP structure. . -.SS EXTENDED NUMBER FORMAT -.PP +.SS "Extended Number Format" On occasion, 16-bit signed integers are not large enough. -With \fBncurses\fP 6.1, a new format was introduced by making a few changes +With \fI\%ncurses\fP 6.1, +a new format was introduced by making a few changes to the legacy format: .bP a different magic number (octal 01036) @@ -277,9 +292,12 @@ to direct users of the \fBTERMTYPE\fP structure as in previous formats. However, that cannot provide callers with the extended numbers. The library uses a similar but hidden data structure \fBTERMTYPE2\fP to provide data for the terminfo functions. +.SH FILES +.TP +.I \*d +compiled terminal description database .SH PORTABILITY .SS setupterm -.PP Note that it is possible for .B setupterm to expect a different set of capabilities @@ -296,22 +314,21 @@ The routine 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. -.SS Binary format -.PP +of Boolean, number, and string capabilities. +.SS "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, +System V curses used a directory-tree of binary files, one per terminal description. .PP Despite the consistent use of little-endian for numbers and the otherwise self-describing format, it is not wise to count on portability of binary -terminfo entries between commercial UNIX versions. +terminfo entries between commercial Unix versions. The problem is that there are at least three versions of terminfo (under HP\-UX, AIX, and OSF/1) which diverged from System V terminfo after SVr1, and have added extension capabilities to the string table that (in the binary format) collide with -System V and XSI Curses extensions. -See \fBterminfo\fP(\*n) for detailed +System V and X/Open Curses extensions. +See \fBterminfo\fP(5) for detailed discussion of terminfo source compatibility issues. .PP This implementation is by default compatible with the binary @@ -319,10 +336,9 @@ 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 +can be matched by building \fI\%ncurses\fP with different configuration options. -.SS Magic codes -.PP +.SS "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, @@ -331,41 +347,72 @@ System V defined more than one magic number, with 0433, 0435 as screen-dumps (see \fBscr_dump\fP(5)). This implementation uses 01036 as a continuation of that sequence, but with a different high-order byte to avoid confusion. -.SS The TERMTYPE structure -.PP +.SS "The \fITERMTYPE\fP Structure" Direct access to the \fBTERMTYPE\fP structure is provided for legacy applications. Portable applications should use the \fBtigetflag\fP and related functions described in \fBcurs_terminfo\fP(3X) for reading terminal capabilities. -.SS Mixed-case terminal names -.PP +.SS "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, -\fBncurses\fP represents the \*(``first character\*('' +\fI\%ncurses\fP represents the \*(``first character\*('' of the terminal name used as the intermediate level of a directory tree in (two-character) hexadecimal form. -.SH EXAMPLE +.SS Limits +\fI\%ncurses\fP stores compiled terminal descriptions +in three related formats, +described in the sections +.bP +\fBLEGACY STORAGE FORMAT\fP, and +.bP +\fBEXTENDED STORAGE FORMAT\fP, and +.bP +\fBEXTENDED NUMBER FORMAT\fP. +.PP +The legacy storage format and the extended number format differ by +the types of numeric capability which they can store +(i.e., 16-bit versus 32-bit integers). +The extended storage format introduced by \fI\%ncurses\fP 5.0 adds data +to either of these formats. +.PP +Some limitations apply: +.bP +total compiled entries cannot exceed 4096 bytes in the legacy format. +.bP +total compiled entries cannot exceed 32768 bytes in the extended format. +.bP +the name field cannot exceed 128 bytes. +.PP +Compiled entries are limited to 32768 bytes because offsets into the +\fIstrings table\fP use two-byte integers. +The legacy format could have supported 32768-byte entries, +but was limited to a virtual memory page's 4096 bytes. +.SH EXAMPLES As an example, here is a description for the Lear-Siegler ADM\-3, a popular though rather stupid early terminal: -.NS +.PP +.EX adm3a|lsi adm3a, am, cols#80, lines#24, - bel=^G, clear=\032$<1>, cr=^M, cub1=^H, cud1=^J, - cuf1=^L, cup=\\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, - home=^^, ind=^J, -.NS + bel=\*^G, clear=\e032$<1>, cr=\*^M, cub1=\*^H, cud1=\*^J, + cuf1=\*^L, cup=\eE=%p1%{32}%+%c%p2%{32}%+%c, cuu1=\*^K, + home=\*^\*^, ind=\*^J, +.EE .PP and a hexadecimal dump of the compiled terminal description: -.NS -.ft CW -\s-20000 1a 01 10 00 02 00 03 00 82 00 31 00 61 64 6d 33 ........ ..1.adm3 +.PP +.if t .in +4n +.ft \*(CW +.TS +Lp-1. +0000 1a 01 10 00 02 00 03 00 82 00 31 00 61 64 6d 33 ........ ..1.adm3 0010 61 7c 6c 73 69 20 61 64 6d 33 61 00 00 01 50 00 a|lsi ad m3a...P. 0020 ff ff 18 00 ff ff 00 00 02 00 ff ff ff ff 04 00 ........ ........ -0030 ff ff ff ff ff ff ff ff 0a 00 25 00 27 00 ff ff ........ ..%.'... -0040 29 00 ff ff ff ff 2b 00 ff ff 2d 00 ff ff ff ff ).....+. ..-..... +0030 ff ff ff ff ff ff ff ff 0a 00 25 00 27 00 ff ff ........ ..%.\*'... +0040 29 00 ff ff ff ff 2b 00 ff ff 2d 00 ff ff ff ff ).....+. ..\-..... 0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ 0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ 0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ @@ -382,36 +429,24 @@ and a hexadecimal dump of the compiled terminal description: 0120 ff ff ff ff ff ff 2f 00 07 00 0d 00 1a 24 3c 31 ....../. .....$<1 0130 3e 00 1b 3d 25 70 31 25 7b 33 32 7d 25 2b 25 63 >..=%p1% {32}%+%c 0140 25 70 32 25 7b 33 32 7d 25 2b 25 63 00 0a 00 1e %p2%{32} %+%c.... -0150 00 08 00 0c 00 0b 00 0a 00 ........ .\s+2 -.ft R -.NE -.sp -.SH LIMITS -Some limitations: -.bP -total compiled entries cannot exceed 4096 bytes in the legacy format. -.bP -total compiled entries cannot exceed 32768 bytes in the extended format. -.bP -the name field cannot exceed 128 bytes. -.PP -Compiled entries are limited to 32768 bytes because offsets into the -\fIstrings table\fP use two-byte integers. -The legacy format could have supported 32768-byte entries, -but was limited a virtual memory page's 4096 bytes. -.SH FILES -\*d/*/* compiled terminal capability database -.SH SEE ALSO -\fBcurses\fP(3X), \fBterminfo\fP(\*n). +0150 00 08 00 0c 00 0b 00 0a 00 ........ . +.TE +.ft +.in .SH AUTHORS Thomas E. Dickey .br -extended terminfo format for ncurses 5.0 +extended terminfo format for \fI\%ncurses\fP 5.0 .br -hashed database support for ncurses 5.6 +hashed database support for \fI\%ncurses\fP 5.6 .br -extended number support for ncurses 6.1 +extended number support for \fI\%ncurses\fP 6.1 .sp Eric S. Raymond .br documented legacy terminfo format, e.g., from \fIpcurses\fP. +.SH SEE ALSO +\fB\%curses\fP(3X), +\fB\%curs_terminfo\fP(3X), +\fB\%terminfo\fP(5), +\fB\%user_caps\fP(5) diff --git a/man/term.7 b/man/term.7 index f3a0e756..84d100d8 100644 --- a/man/term.7 +++ b/man/term.7 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2011,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,57 +27,66 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: term.7,v 1.31 2021/12/25 17:39:16 tom Exp $ -.TH term 7 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.ds n 5 +.\" $Id: term.7,v 1.48 2024/03/16 15:35:01 tom Exp $ +.TH term 7 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" Miscellaneous +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .ds d @TERMINFO@ .SH NAME -term \- conventions for naming terminal types +term \- +conventions for naming terminal types +.\"SH SYNOPSIS .SH DESCRIPTION -.PP -The environment variable \fBTERM\fP should normally contain the type name of -the terminal, console or display-device type you are using. +The environment variable \fITERM\fP should normally contain the type +name of the terminal, +console or display-device type you are using. This information is critical for all screen-oriented programs, including your editor and mailer. .PP -A default \fBTERM\fP value will be set on a per-line basis by either -\fB/etc/inittab\fP (e.g., System\-V-like UNIXes) -or \fB/etc/ttys\fP (BSD UNIXes). +A default \fITERM\fP value will be set on a per-line basis by either +\fB/etc/inittab\fP (e.g., System\-V-like Unices) +or \fB/etc/ttys\fP (BSD Unices). This will nearly always suffice for workstation and microcomputer consoles. .PP 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 +Older Unix systems pre-set a very dumb terminal type like \*(``dumb\*('' or \*(``dialup\*('' on dialup lines. Newer ones may pre-set \*(``vt100\*('', reflecting the prevalence of DEC VT100-compatible terminals and personal-computer emulators. .PP -Modern telnets pass your \fBTERM\fP environment variable from the local side to -the remote one. +Modern telnets pass your \fITERM\fP 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 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). .PP -In any case, you are free to override the system \fBTERM\fP setting to your -taste in your shell profile. +In any case, you are free to override the system \fITERM\fP setting to +your taste in your shell profile. The \fB@TSET@\fP(1) utility may be of assistance; you can give it a set of rules for deducing or requesting a terminal type based on the tty device and baud rate. .PP -Setting your own \fBTERM\fP value may also be useful if you have created a -custom entry incorporating options (such as visual bell or reverse-video) +Setting your own \fITERM\fP value may also be useful if you have created +a custom entry incorporating options +(such as visual bell or reverse-video) which you wish to override the system default type for your line. .PP Terminal type descriptions are stored as files of capability data underneath \*d. To browse a list of all terminal names recognized by the system, do .sp - @TOE@ | more + @TOE@ | more .sp from your shell. These capability files are in a binary format optimized for @@ -85,21 +94,24 @@ retrieval speed (unlike the old text-based \fBtermcap\fP format they replace); to examine an entry, you must use the \fB@INFOCMP@\fP(1M) command. Invoke it as follows: .sp - @INFOCMP@ \fIentry_name\fP + @INFOCMP@ \fIentry_name\fP .sp where \fIentry_name\fP is the name of the type you wish to examine (and the name of its capability file the subdirectory of \*d named for its first letter). This command dumps a capability file in the text format described by -\fBterminfo\fP(\*n). +\fBterminfo\fP(5). .PP -The first line of a \fBterminfo\fP(\*n) description gives the names by which +The first line of a \fBterminfo\fP(5) description gives the names by which terminfo knows a terminal, separated by \*(``|\*('' (pipe-bar) characters with the last name field terminated by a comma. The first name field is the type's -\fIprimary name\fP, and is the one to use when setting \fBTERM\fP. The last -name field (if distinct from the first) is actually a description of the +\fIprimary name\fP, +and is the one to use when setting \fITERM\fP. +The last name field +(if distinct from the first) +is actually a description of the terminal type (it may contain blanks; the others must be single words). Name fields between the first and last (if present) are aliases for the terminal, @@ -206,19 +218,21 @@ are distinguished by using embedded plus signs rather than dashes. Commands which use a terminal type to control display often accept a \-T option that accepts a terminal name argument. Such programs should fall back -on the \fBTERM\fP environment variable when no \-T option is specified. +on the \fITERM\fP environment variable when no \-T option is specified. +.SH FILES +.TP +.I \*d +compiled terminal description database +.TP +.I /etc/inittab +tty line initialization (AT&T-like Unices) +.TP +.I /etc/ttys +tty line initialization (BSD-like Unices) .SH PORTABILITY -For maximum compatibility with older System V UNIXes, names and aliases +For maximum compatibility with older System V Unices, names and aliases should be unique within the first 14 characters. -.SH FILES -.TP 5 -\*d/?/* -compiled terminal capability database -.TP 5 -/etc/inittab -tty line initialization (AT&T-like UNIXes) -.TP 5 -/etc/ttys -tty line initialization (BSD-like UNIXes) .SH SEE ALSO -\fBcurses\fP(3X), \fBterminfo\fP(\*n), \fBterm\fP(\*n). +\fB\%curses\fP(3X), +\fB\%term\fP(5), +\fB\%terminfo\fP(5) diff --git a/man/term_variables.3x b/man/term_variables.3x index 736c1d3f..6aee63f4 100644 --- a/man/term_variables.3x +++ b/man/term_variables.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 2010-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,64 +27,58 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: term_variables.3x,v 1.15 2021/12/25 22:03:30 tom Exp $ -.TH term_variables 3X "" -.ds n 5 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.na -.hy 0 +.\" $Id: term_variables.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH term_variables 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .SH NAME -\fBSP\fP, -\fBacs_map\fP, -\fBboolcodes\fP, -\fBboolfnames\fP, -\fBboolnames\fP, -\fBcur_term\fP, -\fBnumcodes\fP, -\fBnumfnames\fP, -\fBnumnames\fP, -\fBstrcodes\fP, -\fBstrfnames\fP, -\fBstrnames\fP, -\fBttytype\fP -\- \fBcurses\fP terminfo global variables -.ad -.hy +\fB\%SP\fP, +\fB\%acs_map\fP, +\fB\%boolcodes\fP, +\fB\%boolfnames\fP, +\fB\%boolnames\fP, +\fB\%cur_term\fP, +\fB\%numcodes\fP, +\fB\%numfnames\fP, +\fB\%numnames\fP, +\fB\%strcodes\fP, +\fB\%strfnames\fP, +\fB\%strnames\fP, +\fB\%ttytype\fP \- +\fIterminfo\fR global variables .SH SYNOPSIS .nf -\fB#include \fP -.br -\fB#include \fP -.PP -\fBchtype acs_map[];\fP -.sp -\fBSCREEN * SP;\fP -.sp -\fBTERMINAL * cur_term;\fP -.sp -\fBchar ttytype[];\fP -.sp -\fBNCURSES_CONST char * const boolcodes[];\fP -.br -\fBNCURSES_CONST char * const boolfnames[];\fP -.br -\fBNCURSES_CONST char * const boolnames[];\fP -.sp -\fBNCURSES_CONST char * const numcodes[];\fP -.br -\fBNCURSES_CONST char * const numfnames[];\fP -.br -\fBNCURSES_CONST char * const numnames[];\fP -.sp -\fBNCURSES_CONST char * const strcodes[];\fP -.br -\fBNCURSES_CONST char * const strfnames[];\fP -.br -\fBNCURSES_CONST char * const strnames[];\fP -.br +\fB#include +\fB#include +.PP +\fBchtype acs_map[]; +.PP +\fBSCREEN * SP; +.PP +\fBTERMINAL * cur_term; +.PP +\fBchar ttytype[]; +.PP +\fBNCURSES_CONST char * const boolcodes[]; +\fBNCURSES_CONST char * const boolfnames[]; +\fBNCURSES_CONST char * const boolnames[]; +.PP +\fBNCURSES_CONST char * const numcodes[]; +\fBNCURSES_CONST char * const numfnames[]; +\fBNCURSES_CONST char * const numnames[]; +.PP +\fBNCURSES_CONST char * const strcodes[]; +\fBNCURSES_CONST char * const strfnames[]; +\fBNCURSES_CONST char * const strnames[]; .fi .SH DESCRIPTION This page summarizes variables provided by the \fBcurses\fP library's @@ -96,7 +90,7 @@ or macros (see \fBcurs_threads\fP(3X)) which provide read-only access to \fIcurses\fP's state. In either case, applications should treat them as read-only to avoid confusing the library. -.SS Alternate Character Set Mapping +.SS "Alternate Character Set Mapping" After initializing the curses or terminfo interfaces, the \fBacs_map\fP array holds information used to translate cells with the \fBA_ALTCHARSET\fP video attribute into line-drawing characters. @@ -106,7 +100,7 @@ Application developers need only know that it is used for the \*(``ACS_\*('' constants in . .PP The comparable data for the wide-character library is a private variable. -.SS Current Terminal Data +.SS "Current Terminal Data" After initializing the curses or terminfo interfaces, the \fBcur_term\fP contains data describing the current terminal. This variable is also set as a side-effect of \fBset_term\fP(3X) @@ -116,7 +110,7 @@ It is possible to save a value of \fBcur_term\fP for subsequent use as a parameter to \fBset_term\fP, for switching between screens. Alternatively, one can save the return value from \fBnewterm\fP or \fBsetupterm\fP(3X) to reuse in \fBset_term\fP. -.SS Terminfo Lookup Tables +.SS "\fIterminfo\fP Lookup Tables" The \fB@TIC@\fP(1) and \fB@INFOCMP@\fP(1) programs use lookup tables for the long and short names of terminfo capabilities, as well as the corresponding names for termcap capabilities. @@ -124,7 +118,7 @@ These are available to other applications, although the hash-tables used by the terminfo and termcap functions are not available. .PP -The long terminfo capability names use a \*(``l\*('' (ell) in their names: +The long terminfo capability names use a \*(``f\*('' (eff) in their names: \fBboolfnames\fP, \fBnumfnames\fP, and \fBstrfnames\fP. @@ -139,24 +133,21 @@ These are the corresponding names used for termcap descriptions: \fBnumcodes\fP, and \fBstrcodes\fP. .\" -.SS Terminal Type +.SS "Terminal Type" A terminal description begins with one or more terminal names separated by \*(``|\*('' (vertical bars). On initialization of the curses or terminfo interfaces, \fBsetupterm\fP(3X) copies the terminal names to the array \fBttytype\fP. .\" -.SS Terminfo Names -.PP +.SS "\fIterminfo\fP Names" In addition to the variables, \fB\fP also defines a symbol for each terminfo capability \fIlong name\fP. These are in terms of the symbol \fBCUR\fP, which is defined .PP -.nf -.ft CW -#define CUR ((TERMTYPE *)(cur_term))-> -.fi -.ft R +.EX +#define CUR ((TERMTYPE *)(cur_term))\-> +.EE .PP These symbols provide a faster method of accessing terminfo capabilities than using \fBtigetstr\fP(3X), etc. @@ -167,9 +158,7 @@ into the current terminal description loaded into memory. .\" .SH NOTES The low-level terminfo interface is initialized using -.hy 0 -\fBsetupterm\fP(3X). -.hy +\fB\%setupterm\fP(3X). The upper-level curses interface uses the low-level terminfo interface, internally. .\" @@ -186,9 +175,7 @@ All implementations which provide terminfo interfaces add definitions as described in the \fBTerminfo Names\fP section. Most, but not all, base the definition upon the \fBcur_term\fP variable. .SH SEE ALSO -.hy 0 -\fBcurses\fP(3X), -\fBcurs_terminfo\fP(3X), -\fBcurs_threads\fP(3X), -\fBterminfo\fP(\*n). -.hy +\fB\%curses\fP(3X), +\fB\%curs_terminfo\fP(3X), +\fB\%curs_threads\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/terminfo.head b/man/terminfo.head index a17fa782..717f849e 100644 --- a/man/terminfo.head +++ b/man/terminfo.head @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,34 +27,34 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: terminfo.head,v 1.42 2021/12/25 17:39:16 tom Exp $ -.TH terminfo 5 "" "" "File Formats" -.ds n 5 -.ds d @TERMINFO@ -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: terminfo.head,v 1.65 2024/04/20 21:14:00 tom Exp $ +.TH terminfo 5 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "File formats" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ' \(aq +.ds ^ \(ha +.ds ~ \(ti +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ds ' ' +.ds ^ ^ +.ds ~ ~ +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +. +.ds d @TERMINFO@ .SH NAME -terminfo \- terminal capability database +\fB\%terminfo\fP \- +terminal capability database .SH SYNOPSIS \*d/*/* .SH DESCRIPTION @@ -75,17 +75,18 @@ describes terminals by giving a set of capabilities which they have, by specifying how to perform screen operations, and by specifying padding requirements and initialization sequences. .PP -This manual describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.SS Terminfo Entry Syntax -.PP +This document describes +.I \%ncurses +version @NCURSES_MAJOR@.@NCURSES_MINOR@ +(patch @NCURSES_PATCH@). +.SS "\fIterminfo\fP Entry Syntax" Entries in .I terminfo consist of a sequence of fields: .bP Each field ends with a comma \*(``,\*('' (embedded commas may be -escaped with a backslash or written as \*(``\\054\*(''). +escaped with a backslash or written as \*(``\e054\*(''). .bP White space between fields is ignored. .bP @@ -121,7 +122,7 @@ it allows that to be both an alias and a verbose name .bP Lines beginning with a \*(``#\*('' in the first column are treated as comments. .IP -While comment lines are legal at any point, the output of \fB@CAPTOINFO@\fP +While comment lines are valid at any point, the output of \fB@CAPTOINFO@\fP and \fB@INFOTOCAP@\fP (aliases for \fB@TIC@\fP) will move comments so they occur only between entries. .PP @@ -136,38 +137,38 @@ Thus, a vt100 in 132-column mode would be vt100\-w. The following suffixes should be used where possible: .PP .TS -center ; -l c l -l l l. -\fBSuffix Meaning Example\fP -\-\fInn\fP Number of lines on the screen aaa\-60 -\-\fIn\fPp Number of pages of memory c100\-4p -\-am With automargins (usually the default) vt100\-am -\-m Mono mode; suppress color ansi\-m -\-mc Magic cookie; spaces when highlighting wy30\-mc -\-na No arrow keys (leave them in local) c100\-na -\-nam Without automatic margins vt100\-nam -\-nl No status line att4415\-nl -\-ns No status line hp2626\-ns -\-rv Reverse video c100\-rv -\-s Enable status line vt100\-s -\-vb Use visible bell instead of beep wy370\-vb -\-w Wide mode (> 80 columns, usually 132) vt100\-w +center; +Lb Lb Lb +L L Lx. +Suffix Example Meaning +_ +\-\fInn\fP aaa\-60 Number of lines on the screen +\-\fIn\fPp c100\-4p Number of pages of memory +\-am vt100\-am With automargins (usually the default) +\-m ansi\-m Mono mode; suppress color +\-mc wy30\-mc Magic cookie; spaces when highlighting +\-na c100\-na No arrow keys (leave them in local) +\-nam vt100\-nam Without automatic margins +\-nl hp2621\-nl No status line +\-ns hp2626\-ns No status line +\-rv c100\-rv Reverse video +\-s vt100\-s Enable status line +\-vb wy370\-vb Use visible bell instead of beep +\-w vt100\-w Wide mode (> 80 columns, usually 132) .TE .PP For more on terminal naming conventions, see the \fBterm\fP(7) manual page. -.SS Terminfo Capabilities Syntax -.PP +.SS "\fIterminfo\fP Capabilities Syntax" The terminfo entry consists of several \fIcapabilities\fP, i.e., features that the terminal has, or methods for exercising the terminal's features. .PP After the first field (giving the name(s) of the terminal entry), there should be one or more \fIcapability\fP fields. -These are boolean, numeric or string names with corresponding values: +These are Boolean, numeric or string names with corresponding values: .bP Boolean capabilities are true when present, false when absent. -There is no explicit value for boolean capabilities. +There is no explicit value for Boolean capabilities. .bP Numeric capabilities have a \*(``#\*('' following the name, then an unsigned decimal integer value. @@ -186,8 +187,7 @@ Any capability can be \fIcanceled\fP, i.e., suppressed from the terminal entry, by following its name with \*(``@\*('' rather than a capability value. -.SS Similar Terminals -.PP +.SS "Similar Terminals" If there are two very similar terminals, one (the variant) can be defined as being just like the other (the base) with certain exceptions. In the @@ -222,6 +222,6 @@ user preferences. An entry included via \fBuse\fP can contain canceled capabilities, which have the same effect as if those cancels were inline in the using terminal entry. -.SS Predefined Capabilities +.SS "Predefined Capabilities" .\" Head of terminfo man page ends here .ps -1 diff --git a/man/terminfo.tail b/man/terminfo.tail index 070319c4..4d6daa38 100644 --- a/man/terminfo.tail +++ b/man/terminfo.tail @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,9 +27,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: terminfo.tail,v 1.110 2021/12/25 20:14:56 tom Exp $ +.\" $Id: terminfo.tail,v 1.148 2024/04/20 21:24:19 tom Exp $ .ps +1 -.SS User-Defined Capabilities +.SS "User-Defined Capabilities" . The preceding section listed the \fIpredefined\fP capabilities. They deal with some special features for terminals no longer @@ -38,24 +38,25 @@ Occasionally there are special features of newer terminals which are awkward or impossible to represent by reusing the predefined capabilities. .PP -\fBncurses\fP addresses this limitation by allowing user-defined capabilities. +\fI\%ncurses\fP addresses this limitation by allowing user-defined +capabilities. The \fB@TIC@\fP and \fB@INFOCMP@\fP programs provide the \fB\-x\fP option for this purpose. When \fB\-x\fP is set, \fB@TIC@\fP treats unknown capabilities as user-defined. That is, if \fB@TIC@\fP encounters a capability name which it does not recognize, -it infers its type (boolean, number or string) from the syntax +it infers its type (Boolean, number or string) from the syntax and makes an extended table entry for that capability. The \fBuse_extended_names\fP(3X) function makes this information conditionally available to applications. -The ncurses library provides the data leaving most of the behavior -to applications: +The \fI\%ncurses\fP library provides the data leaving most of the +behavior to applications: .bP User-defined capability strings whose name begins with \*(``k\*('' are treated as function keys. .bP -The types (boolean, number, string) determined by \fB@TIC@\fP +The types (Boolean, number, string) determined by \fB@TIC@\fP can be inferred by successful calls on \fBtigetflag\fP, etc. .bP If the capability name happens to be two characters, @@ -67,51 +68,56 @@ in practice it has been limited to the capabilities defined by terminfo implementations. As a rule, user-defined capabilities intended for use by termcap applications should -be limited to booleans and numbers to avoid running past the 1023 byte +be limited to Booleans and numbers to avoid running past the 1023 byte limit assumed by termcap implementations and their applications. In particular, providing extended sets of function keys (past the 60 numbered keys and the handful of special named keys) is best done using the longer names available using terminfo. +.PP +The \fI\%ncurses\fP library uses a few of these user-defined +capabilities, +as described in \fBuser_caps\fR(5). +Other user-defined capabilities (including function keys) are +described in the terminal database, in the section on +.I "NCURSES USER-DEFINABLE CAPABILITIES" . -.SS A Sample Entry +.SS "A Sample Entry" . The following entry, describing an ANSI-standard terminal, is representative of what a \fBterminfo\fP entry for a modern terminal typically looks like. .PP -.nf -.ft CW -\s-2ansi|ansi/pc-term compatible with color, +.EX +\s-2ansi|ansi/pc\-term compatible with color, am, mc5i, mir, msgr, colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, - acsc=+\\020\\,\\021-\\030.^Y0\\333`\\004a\\261f\\370g\\361h\\260 - j\\331k\\277l\\332m\\300n\\305o~p\\304q\\304r\\304s_t\\303 - u\\264v\\301w\\302x\\263y\\363z\\362{\\343|\\330}\\234~\\376, - bel=^G, blink=\\E[5m, bold=\\E[1m, cbt=\\E[Z, clear=\\E[H\\E[J, - cr=^M, cub=\\E[%p1%dD, cub1=\\E[D, cud=\\E[%p1%dB, cud1=\\E[B, - cuf=\\E[%p1%dC, cuf1=\\E[C, cup=\\E[%i%p1%d;%p2%dH, - cuu=\\E[%p1%dA, cuu1=\\E[A, dch=\\E[%p1%dP, dch1=\\E[P, - dl=\\E[%p1%dM, dl1=\\E[M, ech=\\E[%p1%dX, ed=\\E[J, el=\\E[K, - el1=\\E[1K, home=\\E[H, hpa=\\E[%i%p1%dG, ht=\\E[I, hts=\\EH, - ich=\\E[%p1%d@, il=\\E[%p1%dL, il1=\\E[L, ind=^J, - indn=\\E[%p1%dS, invis=\\E[8m, kbs=^H, kcbt=\\E[Z, kcub1=\\E[D, - kcud1=\\E[B, kcuf1=\\E[C, kcuu1=\\E[A, khome=\\E[H, kich1=\\E[L, - mc4=\\E[4i, mc5=\\E[5i, nel=\\r\\E[S, op=\\E[39;49m, - rep=%p1%c\\E[%p2%{1}%-%db, rev=\\E[7m, rin=\\E[%p1%dT, - rmacs=\\E[10m, rmpch=\\E[10m, rmso=\\E[m, rmul=\\E[m, - s0ds=\\E(B, s1ds=\\E)B, s2ds=\\E*B, s3ds=\\E+B, - setab=\\E[4%p1%dm, setaf=\\E[3%p1%dm, - sgr=\\E[0;10%?%p1%t;7%; + acsc=+\e020\e,\e021\-\e030.\*^Y0\e333\(ga\e004a\e261f\e370g\e361h\e260 + j\e331k\e277l\e332m\e300n\e305o\*~p\e304q\e304r\e304s_t\e303 + u\e264v\e301w\e302x\e263y\e363z\e362{\e343|\e330}\e234\*~\e376, + bel=\*^G, blink=\eE[5m, bold=\eE[1m, cbt=\eE[Z, clear=\eE[H\eE[J, + cr=\*^M, cub=\eE[%p1%dD, cub1=\eE[D, cud=\eE[%p1%dB, cud1=\eE[B, + cuf=\eE[%p1%dC, cuf1=\eE[C, cup=\eE[%i%p1%d;%p2%dH, + cuu=\eE[%p1%dA, cuu1=\eE[A, dch=\eE[%p1%dP, dch1=\eE[P, + dl=\eE[%p1%dM, dl1=\eE[M, ech=\eE[%p1%dX, ed=\eE[J, el=\eE[K, + el1=\eE[1K, home=\eE[H, hpa=\eE[%i%p1%dG, ht=\eE[I, hts=\eEH, + ich=\eE[%p1%d@, il=\eE[%p1%dL, il1=\eE[L, ind=\*^J, + indn=\eE[%p1%dS, invis=\eE[8m, kbs=\*^H, kcbt=\eE[Z, kcub1=\eE[D, + kcud1=\eE[B, kcuf1=\eE[C, kcuu1=\eE[A, khome=\eE[H, kich1=\eE[L, + mc4=\eE[4i, mc5=\eE[5i, nel=\er\eE[S, op=\eE[39;49m, + rep=%p1%c\eE[%p2%{1}%\-%db, rev=\eE[7m, rin=\eE[%p1%dT, + rmacs=\eE[10m, rmpch=\eE[10m, rmso=\eE[m, rmul=\eE[m, + s0ds=\eE(B, s1ds=\eE)B, s2ds=\eE*B, s3ds=\eE+B, + setab=\eE[4%p1%dm, setaf=\eE[3%p1%dm, + sgr=\eE[0;10%?%p1%t;7%; %?%p2%t;4%; %?%p3%t;7%; %?%p4%t;5%; %?%p6%t;1%; %?%p7%t;8%; %?%p9%t;11%;m, - sgr0=\\E[0;10m, smacs=\\E[11m, smpch=\\E[11m, smso=\\E[7m, - smul=\\E[4m, tbc=\\E[3g, u6=\\E[%i%d;%dR, u7=\\E[6n, - u8=\\E[?%[;0123456789]c, u9=\\E[c, vpa=\\E[%i%p1%dd, -.fi -.ft R + sgr0=\eE[0;10m, smacs=\eE[11m, smpch=\eE[11m, smso=\eE[7m, + smul=\eE[4m, tbc=\eE[3g, u6=\eE[%i%d;%dR, u7=\eE[6n, + u8=\eE[?%[;0123456789]c, u9=\eE[c, vpa=\eE[%i%p1%dd, +.EE .PP Entries may continue onto multiple lines by placing white space at the beginning of each line except the first. @@ -129,9 +135,7 @@ or the size of particular delays, and string capabilities, which give a sequence which can be used to perform particular terminal operations. -.PP -.SS Types of Capabilities -.PP +.SS "Types of Capabilities" All capabilities have names. For instance, the fact that ANSI-standard terminals have @@ -139,15 +143,22 @@ ANSI-standard terminals have (i.e., an automatic return and line-feed when the end of a line is reached) is indicated by the capability \fBam\fP. Hence the description of ansi includes \fBam\fP. -Numeric capabilities are followed by the character \*(``#\*('' and then a positive value. +Numeric capabilities are followed by the character \*(``#\*('' +and then a positive value. Thus \fBcols\fP, which indicates the number of columns the terminal has, gives the value \*(``80\*('' for ansi. -Values for numeric capabilities may be specified in decimal, octal or hexadecimal, -using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF). -.PP -Finally, string valued capabilities, such as \fBel\fP (clear to end of line -sequence) are given by the two-character code, an \*(``=\*('', and then a string -ending at the next following \*(``,\*(''. +Values for numeric capabilities may be specified in +decimal, +octal, or +hexadecimal, +using the C programming language conventions +(e.g., 255, 0377 and 0xff or 0xFF). +.PP +Finally, string valued capabilities, +such as \fBel\fP (clear to end of line sequence) +are given by the two-character code, +an \*(``=\*('', and then +a string ending at the next following \*(``,\*(''. .PP A number of escape sequences are provided in the string valued capabilities for easy encoding of characters there: @@ -155,7 +166,8 @@ for easy encoding of characters there: Both \fB\eE\fP and \fB\ee\fP map to an \s-1ESCAPE\s0 character, .bP -\fB^x\fP maps to a control-x for any appropriate \fIx\fP, and +\fB\*^\f(BIx\fR maps to a control-\fIx\fP for any appropriate \fIx\fP, +and .bP the sequences .RS 6 @@ -173,13 +185,13 @@ respectively. .PP X/Open Curses does not say what \*(``appropriate \fIx\fP\*('' might be. In practice, that is a printable ASCII graphic character. -The special case \*(``^?\*('' is interpreted as DEL (127). +The special case \*(``\*^?\*('' is interpreted as DEL (127). In all other cases, the character value is AND'd with 0x1f, mapping to ASCII control codes in the range 0 through 31. .PP Other escapes include .bP -\fB\e^\fP for \fB^\fP, +\fB\e\*^\fP for \fB\*^\fP, .bP \fB\e\e\fP for \fB\e\fP, .bP @@ -208,7 +220,8 @@ and padding characters are supplied by \fBtputs\fP(3X) to provide this delay. .bP The delay must be a number with at most one decimal -place of precision; it may be followed by suffixes \*(``*\*('' or \*(``/\*('' or both. +place of precision; +it may be followed by suffixes \*(``*\*('' or \*(``/\*('' or both. .bP A \*(``*\*('' indicates that the padding required is proportional to the number of lines @@ -232,41 +245,68 @@ For example, see the second in the example above. .br .ne 5 -.PP -.SS Fetching Compiled Descriptions -.PP -The \fBncurses\fP library searches for terminal descriptions in several places. -It uses only the first description found. -The library has a compiled-in list of places to search +.SS "Fetching Compiled Descriptions" +Terminal descriptions in \fI\%ncurses\fP are stored in terminal +databases. +These databases, which are found by their pathname, +may be configured either as directory trees or hashed databases +(see \fBterm\fR(5)), +.PP +The library uses a compiled-in list of pathnames, which can be overridden by environment variables. Before starting to search, -\fBncurses\fP eliminates duplicates in its search list. +\fI\%ncurses\fP checks the search list, +eliminating duplicates and pathnames where no terminal database is found. +The \fI\%ncurses\fP library reads the first description +which passes its consistency checks. .bP -If the environment variable TERMINFO is set, it is interpreted as the pathname -of a directory containing the compiled description you are working on. -Only that directory is searched. +The environment variable \fBTERMINFO\fR is checked first, for +a terminal database containing the terminal description. .bP -If TERMINFO is not set, -\fBncurses\fP will instead look in the directory \fB$HOME/.terminfo\fP +Next, +\fI\%ncurses\fP looks in \fI$HOME/.terminfo\fP for a compiled description. +.IP +This is an optional feature which may be omitted entirely from +the library, or limited to prevent accidental use by privileged applications. .bP -Next, if the environment variable TERMINFO_DIRS is set, -\fBncurses\fP will interpret the contents of that variable -as a list of colon-separated directories (or database files) to be searched. +Next, +if the environment variable \fI\%TERMINFO_DIRS\fP is set, +\fI\%ncurses\fP interprets the contents of that variable +as a list of colon-separated pathnames of terminal databases to be searched. .IP -An empty directory name (i.e., if the variable begins or ends +An empty pathname (i.e., if the variable begins or ends with a colon, or contains adjacent colons) is interpreted as the system location \fI\*d\fP. .bP -Finally, \fBncurses\fP searches these compiled-in locations: +Finally, \fI\%ncurses\fP searches these compiled-in locations: .RS .bP a list of directories (@TERMINFO_DIRS@), and .bP -the system terminfo directory, \fI\*d\fP (the compiled-in default). +the system terminfo directory, \fI\*d\fP .RE -.SS Preparing Descriptions .PP +The \fBTERMINFO\fP variable can contain a terminal description instead +of the pathname of a terminal database. +If this variable begins with \*(``hex:\*('' or \*(``b64:\*('' +then \fI\%ncurses\fP reads a terminal description from +hexadecimal- or base64-encoded data, +and if that description matches the name sought, will use that. +This encoded data can be set using the \*(``\-Q\*('' option of +\fB@TIC@\fR or \fB@INFOCMP@\fR. +.PP +The preceding addresses the usual configuration of \fI\%ncurses\fP, +which uses terminal descriptions prepared in \fIterminfo\fP format. +While \fItermcap\fP is less expressive, +\fI\%ncurses\fP can also be configured to read \fItermcap\fP +descriptions. +In that configuration, +it checks the \fI\%TERMCAP\fP and \fI\%TERMPATH\fP variables +(for content and search path, +respectively) +after the system terminal database. +.SS "Preparing Descriptions" We now outline how to prepare descriptions of terminals. The most effective way to prepare a terminal description is by imitating the description of a similar terminal in @@ -287,9 +327,7 @@ delete 16 or so lines from the middle of the screen, then hit the \*(``u\*('' key several times quickly. If the terminal messes up, more padding is usually needed. A similar test can be used for insert character. -.PP -.SS Basic Capabilities -.PP +.SS "Basic Capabilities" The number of columns on each line for the terminal is given by the \fBcols\fP numeric capability. If the terminal is a \s-1CRT\s0, then the @@ -396,34 +434,27 @@ it may still be possible to craft a working .B nel out of one or both of them. .PP -These capabilities suffice to describe hard-copy and \*(``glass-tty\*('' terminals. +These capabilities suffice to describe +hard-copy and \*(``glass-tty\*('' terminals. Thus the model 33 teletype is described as .PP -.DT -.nf -.ft CW +.EX .\".in -2 \s-133\||\|tty33\||\|tty\||\|model 33 teletype, - bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,\s+1 + bel=\*^G, cols#72, cr=\*^M, cud1=\*^J, hc, ind=\*^J, os,\s+1 .\".in +2 -.ft R -.fi +.EE .PP while the Lear Siegler \s-1ADM-3\s0 is described as .PP -.DT -.nf -.ft CW +.EX .\".in -2 \s-1adm3\||\|3\||\|lsi adm3, - am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J, - ind=^J, lines#24,\s+1 + am, bel=\*^G, clear=\*^Z, cols#80, cr=\*^M, cub1=\*^H, cud1=\*^J, + ind=\*^J, lines#24,\s+1 .\".in +2 -.ft R -.fi -.PP -.SS Parameterized Strings -.PP +.EE +.SS "Parameterized Strings" Cursor addressing and other strings requiring parameters in the terminal are described by a parameterized string capability, @@ -448,35 +479,34 @@ It is noted that more complex operations are often necessary, e.g., in the \fBsgr\fP string. .PP The \fB%\fP encodings have the following meanings: -.PP .TP 5 \fB%%\fP outputs \*(``%\*('' .TP -\fB%\fP\fI[[\fP:\fI]flags][width[.precision]][\fP\fBdoxXs\fP\fI]\fP +\fB%\fI[[\fR:\fI]flags][width[.precision]][\fBdoxXs\fI]\fR as in \fBprintf\fP(3), flags are \fI[\-+#]\fP and \fIspace\fP. Use a \*(``:\*('' to allow the next character to be a \*(``\-\*('' flag, avoiding interpreting \*(``%\-\*('' as an operator. .TP -\f(CW%c\fP +\fB%c\fP print \fIpop()\fP like %c in \fBprintf\fP .TP \fB%s\fP print \fIpop()\fP like %s in \fBprintf\fP .TP -\fB%p\fP\fI[1\-9]\fP +\fB%p\fI[1\-9]\fR push \fIi\fP'th parameter .TP -\fB%P\fP\fI[a\-z]\fP +\fB%P\fI[a\-z]\fR set dynamic variable \fI[a\-z]\fP to \fIpop()\fP .TP -\fB%g\fP\fI[a\-z]/\fP +\fB%g\fI[a\-z]\fR get dynamic variable \fI[a\-z]\fP and push it .TP -\fB%P\fP\fI[A\-Z]\fP +\fB%P\fI[A\-Z]\fR set static variable \fI[a\-z]\fP to \fIpop()\fP .TP -\fB%g\fP\fI[A\-Z]\fP +\fB%g\fI[A\-Z]\fR get static variable \fI[a\-z]\fP and push it .IP The terms \*(``static\*('' and \*(``dynamic\*('' are misleading. @@ -493,7 +523,7 @@ will give unpredictable results, because dynamic variables are an uninitialized local array on the stack in the \fBtparm\fP function. .bP SVr3.2 curses supported \fIstatic\fP variables. -Those are an array in the \fBTERMINAL\fP +Those are an array in the \fI\%TERMINAL\fP structure (declared in \fBterm.h\fP), and are zeroed automatically when the \fBsetupterm\fP function allocates the data. @@ -506,19 +536,30 @@ Solaris XPG4 curses does not distinguish between \fIdynamic\fP and They are the same. Like SVr4 curses, XPG4 curses does not initialize these explicitly. .bP -Before version 6.3, ncurses stores both \fIdynamic\fP and \fIstatic\fP +Before version 6.3, +\fI\%ncurses\fP stores both \fIdynamic\fP and \fIstatic\fP variables in persistent storage, initialized to zeros. .bP -Beginning with version 6.3, ncurses stores \fIstatic\fP and \fIdynamic\fP +Beginning with version 6.3, +\fI\%ncurses\fP stores \fIstatic\fP and \fIdynamic\fP variables in the same manner as SVr4. -Unlike other implementations, ncurses zeros dynamic variables +.RS +.bP +Unlike other implementations, \fI\%ncurses\fP zeros dynamic variables before the first \fB%g\fP or \fB%P\fP operator. +.bP +Like SVr2, +the scope of dynamic variables in \fI\%ncurses\fP +is within the current call to +\fBtparm\fP. +Use static variables if persistent storage is needed. +.RE .RE .TP -\fB%\(aq\fP\fIc\fP\fB\(aq\fP +\fB%\*'\fIc\fB\*'\fR char constant \fIc\fP .TP -\fB%{\fP\fInn\fP\fB}\fP +\fB%{\fInn\fB}\fR integer constant \fInn\fP .TP \fB%l\fP @@ -527,7 +568,7 @@ push strlen(pop) \fB%+\fP, \fB%\-\fP, \fB%*\fP, \fB%/\fP, \fB%m\fP arithmetic (%m is \fImod\fP): \fIpush(pop() op pop())\fP .TP -\fB%&\fP, \fB%|\fP, \fB%^\fP +\fB%&\fP, \fB%|\fP, \fB%\*^\fP bit operations (AND, OR and exclusive-OR): \fIpush(pop() op pop())\fP .TP \fB%=\fP, \fB%>\fP, \fB%<\fP @@ -536,7 +577,7 @@ logical operations: \fIpush(pop() op pop())\fP \fB%A\fP, \fB%O\fP logical AND and OR operations (for conditionals) .TP -\fB%!\fP, \fB%~\fP +\fB%!\fP, \fB%\*~\fP unary operations (logical and bit complement): \fIpush(op pop())\fP .TP \fB%i\fP @@ -569,33 +610,40 @@ persistent across escape-string evaluations. .PP Consider the HP2645, which, to get to row 3 and column 12, needs to be sent \eE&a12c03Y padded for 6 milliseconds. -Note that the order -of the rows and columns is inverted here, and that the row and column -are printed as two digits. -Thus its \fBcup\fP capability is \*(``cup=6\eE&%p2%2dc%p1%2dY\*(''. +The order of the rows and columns is inverted here, +and the row and column are printed as two digits. +The corresponding terminal description is expressed thus: +.RS +cup=\eE&a%p2%dc%p1%dY$<6>, +.RE .PP The Microterm \s-1ACT-IV\s0 needs the current row and column sent -preceded by a \fB^T\fP, with the row and column simply encoded in binary, -\*(``cup=^T%p1%c%p2%c\*(''. +preceded by a \fB\*^T\fP, with the row and column simply encoded in binary, +.RS +cup=\*^T%p1%c%p2%c +.RE +.PP Terminals which use \*(``%c\*('' need to be able to backspace the cursor (\fBcub1\fP), and to move the cursor up one line on the screen (\fBcuu1\fP). This is necessary because it is not always safe to transmit \fB\en\fP -\fB^D\fP and \fB\er\fP, as the system may change or discard them. +\fB\*^D\fP and \fB\er\fP, as the system may change or discard them. (The library routines dealing with terminfo set tty modes so that tabs are never expanded, so \et is safe to send. This turns out to be essential for the Ann Arbor 4080.) .PP A final example is the \s-1LSI ADM\s0-3a, which uses row and column -offset by a blank character, thus \*(``cup=\eE=%p1%\(aq \(aq%+%c%p2%\(aq \(aq%+%c\*(''. +offset by a blank character, thus +.RS +cup=\eE=%p1%\*' \*'%+%c%p2%\*' \*'%+%c +.RE +.PP After sending \*(``\eE=\*('', this pushes the first parameter, pushes the ASCII value for a space (32), adds them (pushing the sum on the stack in place of the two previous values) and outputs that value as a character. Then the same is done for the second parameter. More complex arithmetic is possible using the stack. -.PP -.SS Cursor Motions -.PP +.SS "Cursor Motions" If the terminal has a fast way to home the cursor (to very upper left corner of screen) then this can be given as \fBhome\fP; similarly a fast way of getting to the lower left-hand corner @@ -633,7 +681,8 @@ such as the \s-1TEKTRONIX\s+1 4025. .PP If the terminal needs to be in a special mode when running a program that uses these capabilities, -the codes to enter and exit this mode can be given as \fBsmcup\fP and \fBrmcup\fP. +the codes to enter and exit this mode can be given +as \fBsmcup\fP and \fBrmcup\fP. This arises, for example, from terminals like the Concept with more than one page of memory. If the terminal has only memory relative cursor addressing and not screen @@ -646,7 +695,6 @@ sets the command character to be the one used by terminfo. If the \fBsmcup\fP sequence will not restore the screen after an \fBrmcup\fP sequence is output (to the state prior to outputting \fBrmcup\fP), specify \fBnrrmc\fP. -.PP .SS Margins SVr4 (and X/Open Curses) list several string capabilities for setting margins. @@ -667,7 +715,6 @@ line position, and parameterized capabilities for setting the top, bottom, left, right margins given the number of rows or columns. .RE -.RE .PP In practice, the categorization into \*(``terminal\*('' and \*(``printer\*('' is not suitable: @@ -694,12 +741,13 @@ If either is omitted, the corresponding margin is set to the left or right edge of the display (rather than leaving the margin unmodified). .PP These are the margin-related capabilities: +.PP .TS center; -l l -_ _ -lw8 lw18. -\fBName Description\fP +lb lb +lb l . +Name Description +_ smgl Set left margin at current column smgr Set right margin at current column smgb Set bottom margin at current line @@ -744,7 +792,7 @@ When developing an application that uses \fBsmgbp\fP to set the bottom margin, both arguments must be given. .PP Conversely, when only one capability in the pair is set: -.bP +.bP If only one of \fBsmglp\fP and \fBsmgrp\fP is set, then it is used with two arguments, the column number of the left and right margins, in that order. @@ -772,8 +820,7 @@ When setting margins, the line- and column-values are zero-based. The \fBmgc\fP string capability should be defined. Applications such as \fBtabs\fP(1) rely upon this to reset all margins. .\" -.SS Area Clears -.PP +.SS "Area Clears" If the terminal can clear from the current position to the end of the line, leaving the cursor where it is, this should be given as \fBel\fP. If the terminal can clear from the beginning of the line to the current @@ -786,10 +833,8 @@ display, then this should be given as \fBed\fP. if a true .B ed is not available.) -.PP .\" -.SS Insert/delete line and vertical motions -.PP +.SS "Insert/Delete Line and Vertical Motions" If the terminal can open a new blank line before the line where the cursor is, this should be given as \fBil1\fP; this is done only from the first position of a line. @@ -822,12 +867,12 @@ and .B rc (save and restore cursor) commands may be useful for ensuring that your synthesized insert/delete string does not move the cursor. -(Note that the \fBncurses\fP(3X) library does this synthesis +(Note that the \fB\%ncurses\fP(3X) library does this synthesis automatically, so you need not compose insert/delete strings for an entry with \fBcsr\fP). .PP Yet another way to construct insert and delete might be to use a combination of -index with the memory-lock feature found on some terminals (like the HP\-700/90 +index with the memory-lock feature found on some terminals (like the HP-700/90 series, which however also has insert/delete). .PP Inserting lines at the top or bottom of the screen can also be @@ -838,7 +883,7 @@ or on many terminals without a true insert/delete line, and is often faster even on terminals with those features. .PP -The boolean \fBnon_dest_scroll_region\fP should be set if each scrolling +The Boolean \fBnon_dest_scroll_region\fP should be set if each scrolling window is effectively a view port on a screen-sized canvas. To test for this capability, create a scrolling region in the middle of the screen, @@ -847,7 +892,7 @@ and do \fBri\fP followed by \fBdl1\fP or \fBind\fP. If the data scrolled off the bottom of the region by the \fBri\fP re-appears, then scrolling is non-destructive. -System V and XSI Curses expect that \fBind\fP, \fBri\fP, +System V and X/Open Curses expect that \fBind\fP, \fBri\fP, \fBindn\fP, and \fBrin\fP will simulate destructive scrolling; their documentation cautions you not to define \fBcsr\fP unless this is true. This \fBcurses\fP implementation is more liberal and will do explicit erases @@ -866,12 +911,10 @@ below, then \fBdb\fP should be given. These indicate that deleting a line or scrolling may bring non-blank lines up from below or that scrolling back with \fBri\fP may bring down non-blank lines. -.PP -.SS Insert/Delete Character -.PP +.SS "Insert/Delete Character" There are two basic kinds of intelligent terminals with respect to insert/delete character which can be described using -.I terminfo. +.IR terminfo . The most common insert/delete character operations affect only the characters on the current line and shift characters off the end of the line rigidly. Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make @@ -965,7 +1008,7 @@ to delete a single character, with one parameter, .IR n , to delete -.I n characters, +.IR n "characters," and delete mode by giving \fBsmdc\fP and \fBrmdc\fP to enter and exit delete mode (any mode the terminal needs to be placed in for @@ -980,9 +1023,7 @@ blanks without moving the cursor) can be given as .B ech with one parameter. -.PP .SS "Highlighting, Underlining, and Visible Bells" -.PP If your terminal has one or more kinds of display attributes, these can be represented in a number of different ways. You should choose one display form as @@ -1034,7 +1075,8 @@ this should be given as .B sgr (set attributes), taking 9 parameters. -Each parameter is either 0 or nonzero, as the corresponding attribute is on or off. +Each parameter is either zero (0) or nonzero, +as the corresponding attribute is on or off. The 9 parameters are, in order: standout, underline, reverse, blink, dim, bold, blank, protect, alternate character set. @@ -1046,21 +1088,20 @@ For example, the DEC vt220 supports most of the modes: .PP .TS center; -l l l -l l l -lw18 lw14 lw18. -\fBtparm parameter attribute escape sequence\fP - -none none \\E[0m -p1 standout \\E[0;1;7m -p2 underline \\E[0;4m -p3 reverse \\E[0;7m -p4 blink \\E[0;5m +lb lb lb +l l l . +tparm Parameter Attribute Escape Sequence +_ +none none \eE[0m +p1 standout \eE[0;1;7m +p2 underline \eE[0;4m +p3 reverse \eE[0;7m +p4 blink \eE[0;5m p5 dim not available -p6 bold \\E[0;1m -p7 invis \\E[0;8m +p6 bold \eE[0;1m +p7 invis \eE[0;8m p8 protect not used -p9 altcharset ^O (off) ^N (on) +p9 altcharset \*^O (off) \*^N (on) .TE .PP We begin each escape sequence by turning off any existing modes, since @@ -1069,9 +1110,9 @@ Standout is set up to be the combination of reverse and bold. The vt220 terminal has a protect mode, though it is not commonly used in sgr because it protects characters on the screen from the host's erasures. -The altcharset mode also is different in that it is either ^O or ^N, +The altcharset mode also is different in that it is either \*^O or \*^N, depending on whether it is off or on. -If all modes are turned on, the resulting sequence is \\E[0;1;4;5;7;8m^N. +If all modes are turned on, the resulting sequence is \eE[0;1;4;5;7;8m\*^N. .PP Some sequences are common to different modes. For example, ;7 is output when either p1 or p3 is true, that is, if @@ -1082,31 +1123,26 @@ Writing out the above sequences, along with their dependencies yields .ne 11 .TS center; -l l l -l l l -lw18 lw14 lw18. -\fBsequence when to output terminfo translation\fP - -.ft CW -\\E[0 always \\E[0 +lb lb lb +l l l . +Sequence When to Output terminfo Translation +_ +\eE[0 always \eE[0 ;1 if p1 or p6 %?%p1%p6%|%t;1%; ;4 if p2 %?%p2%|%t;4%; ;5 if p4 %?%p4%|%t;5%; ;7 if p1 or p3 %?%p1%p3%|%t;7%; ;8 if p7 %?%p7%|%t;8%; m always m -^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%; -.ft R +\*^N or \*^O if p9 \*^N, else \*^O %?%p9%t\*^N%e\*^O%; .TE .PP Putting this all together into the sgr sequence gives: .PP -.ft CW -.nf - sgr=\\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%; - %?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\\016%e\\017%;, -.fi -.ft R +.EX + sgr=\eE[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%; + %?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\e016%e\e017%;, +.EE .PP Remember that if you specify sgr, you must also specify sgr0. Also, some implementations rely on sgr being given if sgr0 is, @@ -1152,9 +1188,7 @@ If a character overstriking another leaves both characters on the screen, specify the capability \fBos\fP. If overstrikes are erasable with a blank, then this should be indicated by giving \fBeo\fP. -.PP -.SS Keypad and Function Keys -.PP +.SS "Keypad and Function Keys" If the terminal has a keypad that transmits codes when the keys are pressed, this information can be given. Note that it is not possible to handle @@ -1261,9 +1295,7 @@ If there are commands to turn the labels on and off, give them in \fBsmln\fP and \fBrmln\fP. \fBsmln\fP is normally output after one or more pln sequences to make sure that the change becomes visible. -.PP -.SS Tabs and Initialization -.PP +.SS "Tabs and Initialization" A few capabilities are used only for tabs: .bP If the terminal has hardware tabs, the command to advance to the next @@ -1447,8 +1479,7 @@ use the \fBhts\fP (\fBset_tab\fP) capabilities directly only when the \fBit\fP (\fBinit_tabs\fP) capability is set to a value other than \fIeight\fP. -.SS Delays and Padding -.PP +.SS "Delays and Padding" Many older and slower terminals do not support either XON/XOFF or DTR handshaking, including hard copy terminals and some very archaic CRTs (including, for example, DEC VT100s). @@ -1456,7 +1487,7 @@ These may require padding characters after certain cursor motions and screen changes. .PP If the terminal uses xon/xoff handshaking for flow control (that is, -it automatically emits ^S back to the host when its input buffers are +it automatically emits \*^S back to the host when its input buffers are close to full), set .BR xon . This capability suppresses the emission of padding. @@ -1476,8 +1507,7 @@ then this can be given as \fBpad\fP. Only the first character of the .B pad string is used. -.PP -.SS Status Lines +.SS "Status Lines" Some terminals have an extra \*(``status line\*('' which is not normally used by software (and thus not counted in the terminal's \fBlines\fP capability). .PP @@ -1506,61 +1536,59 @@ capability \fBwsl\fP. .PP A command to erase or blank the status line may be specified as \fBdsl\fP. .PP -The boolean capability \fBeslok\fP specifies that escape sequences, tabs, +The Boolean capability \fBeslok\fP specifies that escape sequences, tabs, etc., work ordinarily in the status line. .PP -The \fBncurses\fP implementation does not yet use any of these capabilities. +The \fI\%ncurses\fP implementation does not yet use any of these +capabilities. They are documented here in case they ever become important. -.PP -.SS Line Graphics -.PP +.SS "Line Graphics" Many terminals have alternate character sets useful for forms-drawing. Terminfo and \fBcurses\fP have built-in support for most of the drawing characters supported by the VT100, with some characters from the AT&T 4410v1 added. This alternate character set may be specified by the \fBacsc\fP capability. .PP -.TS H -center expand; -l l l l l -l l l l l -_ _ _ _ _ -lw25 lw10 lw6 lw6 lw6. -.\".TH -\fBGlyph ACS Ascii acsc acsc\fP -\fBName Name Default Char Value\fP -arrow pointing right ACS_RARROW > + 0x2b -arrow pointing left ACS_LARROW < , 0x2c -arrow pointing up ACS_UARROW ^ \- 0x2d -arrow pointing down ACS_DARROW v . 0x2e -solid square block ACS_BLOCK # 0 0x30 -diamond ACS_DIAMOND + ` 0x60 -checker board (stipple) ACS_CKBOARD : a 0x61 -degree symbol ACS_DEGREE \e f 0x66 -plus/minus ACS_PLMINUS # g 0x67 -board of squares ACS_BOARD # h 0x68 -lantern symbol ACS_LANTERN # i 0x69 -lower right corner ACS_LRCORNER + j 0x6a -upper right corner ACS_URCORNER + k 0x6b -upper left corner ACS_ULCORNER + l 0x6c -lower left corner ACS_LLCORNER + m 0x6d -large plus or crossover ACS_PLUS + n 0x6e -scan line 1 ACS_S1 ~ o 0x6f -scan line 3 ACS_S3 \- p 0x70 -horizontal line ACS_HLINE \- q 0x71 -scan line 7 ACS_S7 \- r 0x72 -scan line 9 ACS_S9 \&_ s 0x73 -tee pointing right ACS_LTEE + t 0x74 -tee pointing left ACS_RTEE + u 0x75 -tee pointing up ACS_BTEE + v 0x76 -tee pointing down ACS_TTEE + w 0x77 -vertical line ACS_VLINE | x 0x78 -less-than-or-equal-to ACS_LEQUAL < y 0x79 -greater-than-or-equal-to ACS_GEQUAL > z 0x7a -greek pi ACS_PI * { 0x7b -not-equal ACS_NEQUAL ! | 0x7c -UK pound sign ACS_STERLING f } 0x7d -bullet ACS_BULLET o ~ 0x7e +.TS +center; +Lb Cb S L Lb +Lb2 Lb2 Lb Lb1 S +Lb L C Lb Lx. +\& acsc \& \& +ACS Name Value Symbol ASCII Fallback / Glyph Name +_ +ACS_RARROW 0x2b + > arrow pointing right +ACS_LARROW 0x2c , < arrow pointing left +ACS_UARROW 0x2d \- \*^ arrow pointing up +ACS_DARROW 0x2e . v arrow pointing down +ACS_BLOCK 0x30 0 # solid square block +ACS_DIAMOND 0x60 \(ga + diamond +ACS_CKBOARD 0x61 a : checker board (stipple) +ACS_DEGREE 0x66 f \e degree symbol +ACS_PLMINUS 0x67 g # plus/minus +ACS_BOARD 0x68 h # board of squares +ACS_LANTERN 0x69 i # lantern symbol +ACS_LRCORNER 0x6a j + lower right corner +ACS_URCORNER 0x6b k + upper right corner +ACS_ULCORNER 0x6c l + upper left corner +ACS_LLCORNER 0x6d m + lower left corner +ACS_PLUS 0x6e n + large plus or crossover +ACS_S1 0x6f o \*~ scan line 1 +ACS_S3 0x70 p \- scan line 3 +ACS_HLINE 0x71 q \- horizontal line +ACS_S7 0x72 r \- scan line 7 +ACS_S9 0x73 s \&_ scan line 9 +ACS_LTEE 0x74 t + tee pointing right +ACS_RTEE 0x75 u + tee pointing left +ACS_BTEE 0x76 v + tee pointing up +ACS_TTEE 0x77 w + tee pointing down +ACS_VLINE 0x78 x | vertical line +ACS_LEQUAL 0x79 y < less-than-or-equal-to +ACS_GEQUAL 0x7a z > greater-than-or-equal-to +ACS_PI 0x7b { * greek pi +ACS_NEQUAL 0x7c | ! not-equal +ACS_STERLING 0x7d } f UK pound sign +ACS_BULLET 0x7e \*~ o bullet .TE .PP A few notes apply to the table itself: @@ -1589,9 +1617,7 @@ to a copy of this table for your terminal, giving the character which as the corresponding graphic. Then read off the VT100/your terminal character pairs right to left in sequence; these become the ACSC string. -.PP -.SS Color Handling -.PP +.SS "Color Handling" The curses library functions \fBinit_pair\fP and \fBinit_color\fP manipulate the \fIcolor pairs\fP and \fIcolor values\fP discussed in this section @@ -1604,25 +1630,25 @@ terminals have a predefined set of \fIN\fP colors (where \fIN\fP is usually 8), and can set character-cell foreground and background characters independently, mixing them -into \fIN\fP\ *\ \fIN\fP color-pairs. +into \fIN\fP\ *\ \fIN\fP color pairs. .bP On HP-like terminals, the user must set each color pair up separately (foreground and background are not independently settable). -Up to \fIM\fP color-pairs may be set up from 2*\fIM\fP different colors. +Up to \fIM\fP color pairs may be set up from 2*\fIM\fP different colors. ANSI-compatible terminals are Tektronix-like. .PP Some basic color capabilities are independent of the color method. The numeric capabilities \fBcolors\fP and \fBpairs\fP specify the maximum numbers of colors -and color-pairs that can be displayed simultaneously. +and color pairs that can be displayed simultaneously. The \fBop\fP (original pair) string resets foreground and background colors to their default values for the terminal. -The \fBoc\fP string resets all colors or color-pairs to +The \fBoc\fP string resets all colors or color pairs to their default values for the terminal. Some terminals (including many PC terminal emulators) erase screen areas with the current background color rather -than the power-up default background; these should have the boolean capability +than the power-up default background; these should have the Boolean capability \fBbce\fP. .PP While the curses library works with \fIcolor pairs\fP @@ -1649,47 +1675,52 @@ The \fBsetaf\fP/\fBsetab\fP and \fBsetf\fP/\fBsetb\fP capabilities take a single numeric argument each. Argument values 0-7 of \fBsetaf\fP/\fBsetab\fP are portably defined as follows (the middle column is the symbolic #define available in the header for -the \fBcurses\fP or \fBncurses\fP libraries). +the \fBcurses\fP or \fI\%ncurses\fP libraries). The terminal hardware is free to map these as it likes, but the RGB values indicate normal locations in color space. .PP -.TS H +.TS center; -l c c c -l l n l. -\fBColor #define Value RGB\fP -black \fBCOLOR_BLACK\fP 0 0, 0, 0 -red \fBCOLOR_RED\ \fP 1 max,0,0 -green \fBCOLOR_GREEN\fP 2 0,max,0 -yellow \fBCOLOR_YELLOW\fP 3 max,max,0 -blue \fBCOLOR_BLUE\fP 4 0,0,max -magenta \fBCOLOR_MAGENTA\fP 5 max,0,max -cyan \fBCOLOR_CYAN\fP 6 0,max,max -white \fBCOLOR_WHITE\fP 7 max,max,max +cb cb cb cb s s +l lb c l1 l1 l . +Color #define Value RGB +_ +black COLOR_BLACK 0 0, 0, 0 +red COLOR_RED 1 max, 0, 0 +green COLOR_GREEN 2 0, max, 0 +yellow COLOR_YELLOW 3 max, max, 0 +blue COLOR_BLUE 4 0, 0, max +magenta COLOR_MAGENTA 5 max, 0, max +cyan COLOR_CYAN 6 0, max, max +white COLOR_WHITE 7 max, max, max .TE +.br +.if t .ne 6v .PP The argument values of \fBsetf\fP/\fBsetb\fP historically correspond to a different mapping, i.e., -.TS H +.PP +.TS center; -l c c c -l l n l. -\fBColor #define Value RGB\fP -black \fBCOLOR_BLACK\fP 0 0, 0, 0 -blue \fBCOLOR_BLUE\fP 1 0,0,max -green \fBCOLOR_GREEN\fP 2 0,max,0 -cyan \fBCOLOR_CYAN\fP 3 0,max,max -red \fBCOLOR_RED\ \fP 4 max,0,0 -magenta \fBCOLOR_MAGENTA\fP 5 max,0,max -yellow \fBCOLOR_YELLOW\fP 6 max,max,0 -white \fBCOLOR_WHITE\fP 7 max,max,max +cb cb cb cb s s +l lb c l1 l1 l . +Color #define Value RGB +_ +black COLOR_BLACK 0 0, 0, 0 +blue COLOR_BLUE 1 0, 0, max +green COLOR_GREEN 2 0, max, 0 +cyan COLOR_CYAN 3 0, max, max +red COLOR_RED 4 max, 0, 0 +magenta COLOR_MAGENTA 5 max, 0, max +yellow COLOR_YELLOW 6 max, max, 0 +white COLOR_WHITE 7 max, max, max .TE .PP It is important to not confuse the two sets of color capabilities; otherwise red/blue will be interchanged on the display. .PP -On an HP-like terminal, use \fBscp\fP with a color-pair number parameter to set +On an HP-like terminal, use \fBscp\fP with a color pair number parameter to set which color pair is current. .PP Some terminals allow the \fIcolor values\fP to be modified: @@ -1701,14 +1732,14 @@ take a color number (0 to \fBcolors\fP \- 1)and three more parameters which describe the color. These three parameters default to being interpreted as RGB (Red, Green, Blue) values. -If the boolean capability \fBhls\fP is present, +If the Boolean capability \fBhls\fP is present, they are instead as HLS (Hue, Lightness, Saturation) indices. The ranges are terminal-dependent. .bP On an HP-like terminal, \fBinitp\fP may give a capability for changing a -color-pair value. -It will take seven parameters; a color-pair number (0 to +color pair value. +It will take seven parameters; a color pair number (0 to \fBmax_pairs\fP \- 1), and two triples describing first background and then foreground colors. These parameters must be (Red, Green, Blue) or @@ -1717,23 +1748,24 @@ These parameters must be (Red, Green, Blue) or On some color terminals, colors collide with highlights. You can register these collisions with the \fBncv\fP capability. -This is a bit-mask of +This is a bit mask of attributes not to be used when colors are enabled. The correspondence with the attributes understood by \fBcurses\fP is as follows: .PP .TS center; -l l l l -lw20 lw2 lw10 lw10. -\fBAttribute Bit Decimal Set by\fP +cb cb cb cb +lb n n lb. +Attribute Bit Decimal Set by +_ A_STANDOUT 0 1 sgr A_UNDERLINE 1 2 sgr A_REVERSE 2 4 sgr -A_BLINK 3 8 sgr -A_DIM 4 16 sgr -A_BOLD 5 32 sgr -A_INVIS 6 64 sgr +A_BLINK 3 8 sgr +A_DIM 4 16 sgr +A_BOLD 5 32 sgr +A_INVIS 6 64 sgr A_PROTECT 7 128 sgr A_ALTCHARSET 8 256 sgr A_HORIZONTAL 9 512 sgr1 @@ -1750,17 +1782,19 @@ foreground color blue and is not available in color mode. These should have an \fBncv\fP capability of 2. .PP -SVr4 curses does nothing with \fBncv\fP, ncurses recognizes it and optimizes +SVr4 curses does nothing with \fBncv\fP, +\fI\%ncurses\fP recognizes it and optimizes the output in favor of colors. -.PP .SS Miscellaneous If the terminal requires other than a null (zero) character as a pad, then this can be given as pad. Only the first character of the pad string is used. If the terminal does not have a pad character, specify npc. -Note that ncurses implements the termcap-compatible \fBPC\fP variable; +Note that \fI\%ncurses\fP implements the termcap-compatible \fBPC\fP +variable; though the application may set this value to something other than -a null, ncurses will test \fBnpc\fP first and use napms if the terminal +a null, +\fI\%ncurses\fP will test \fBnpc\fP first and use napms if the terminal has no pad character. .PP If the terminal can move up or down half a line, @@ -1781,16 +1815,17 @@ this can be indicated with the parameterized string .BR rep . The first parameter is the character to be repeated and the second is the number of times to repeat it. -Thus, tparm(repeat_char, \(aqx\(aq, 10) is the same as \*(``xxxxxxxxxx\*(''. +Thus, tparm(repeat_char, \*'x\*', 10) is the same as \*(``xxxxxxxxxx\*(''. .PP -If the terminal has a settable command character, such as the \s-1TEKTRONIX\s+1 4025, +If the terminal has a settable command character, +such as the \s-1TEKTRONIX\s+1 4025, this can be indicated with .BR cmdch . A prototype command character is chosen which is used in all capabilities. This character is given in the .B cmdch capability to identify it. -The following convention is supported on some UNIX systems: +The following convention is supported on some Unix systems: The environment is to be searched for a .B CC variable, and if found, all @@ -1832,7 +1867,7 @@ A value of indicates that the number of lines is not fixed, but that there is still more memory than fits on the screen. .PP -If the terminal is one of those supported by the \s-1UNIX\s+1 virtual +If the terminal is one of those supported by the Unix virtual terminal protocol, the terminal number can be given as .BR vt . .PP @@ -1859,10 +1894,9 @@ All text, including is transparently passed to the printer while an .B mc5p is in effect. -.PP -.SS Glitches and Braindamage -.PP -Hazeltine terminals, which do not allow \*(``~\*('' characters to be displayed should +.SS "Glitches and Brain Damage" +Hazeltine terminals, +which do not allow \*(``\*~\*('' characters to be displayed should indicate \fBhz\fP. .PP Terminals which ignore a line-feed immediately after an \fBam\fP wrap, @@ -1883,7 +1917,7 @@ This glitch is also taken to mean that it is not possible to position the cursor on top of a \*(``magic cookie\*('', that to erase standout mode it is instead necessary to use delete and insert line. -The ncurses implementation ignores this glitch. +The \fI\%ncurses\fP implementation ignores this glitch. .PP The Beehive Superbee, which is unable to correctly transmit the escape or control/C characters, has @@ -1894,28 +1928,32 @@ Note that in older terminfo versions, this capability was called \*(``beehive_glitch\*(''; it is now \*(``no_esc_ctl_c\*(''. .PP Other specific terminal problems may be corrected by adding more -capabilities of the form \fBx\fP\fIx\fP. -.PP -.SS Pitfalls of Long Entries -.PP +capabilities of the form \fBx\fIx\fR. +.SS "Pitfalls of Long Entries" Long terminfo entries are unlikely to be a problem; to date, no entry has even approached terminfo's 4096-byte string-table maximum. Unfortunately, the termcap -translations are much more strictly limited (to 1023 bytes), thus termcap translations -of long terminfo entries can cause problems. +translations are much more strictly limited (to 1023 bytes), +thus termcap translations of long terminfo entries can cause problems. .PP -The man pages for 4.3BSD and older versions of \fBtgetent\fP instruct the user to +The man pages for 4.3BSD +and older versions of \fBtgetent\fP instruct the user to allocate a 1024-byte buffer for the termcap entry. The entry gets null-terminated by the termcap library, so that makes the maximum safe length for a termcap entry 1k\-1 (1023) bytes. -Depending on what the application and the termcap library -being used does, and where in the termcap file the terminal type that \fBtgetent\fP -is searching for is, several bad things can happen. +Depending on what the application and the termcap library being used does, +and where in the termcap file the terminal type that \fBtgetent\fP +is searching for is, several bad things can happen: +.bP +some termcap libraries print a warning message, +.bP +some exit if they find an entry that's longer than 1023 bytes, +.bP +some neither exit nor warn, doing nothing useful, and +.bP +some simply truncate the entries to 1023 bytes. .PP -Some termcap libraries print a warning message or exit if they find an -entry that's longer than 1023 bytes; others do not; others truncate the -entries to 1023 bytes. Some application programs allocate more than the recommended 1K for the termcap entry; others do not. .PP @@ -1948,8 +1986,9 @@ long entry, appears in the termcap file after the long entry, or does not appear in the file at all (so that \fBtgetent\fP has to search the whole termcap file). .PP -Then \fBtgetent\fP will overwrite memory, perhaps its stack, and probably core dump -the program. +Then \fBtgetent\fP will overwrite memory, +perhaps its stack, +and probably core dump the program. Programs like telnet are particularly vulnerable; modern telnets pass along values like the terminal type automatically. The results are almost @@ -1960,7 +1999,7 @@ termcap library truncates long entries, like OSF/1 3.0, it is immune to dying here but will return incorrect data for the terminal. .PP The \*(``after tc expansion\*('' length will have a similar effect to the -above, but only for people who actually set TERM to that terminal +above, but only for people who actually set \fITERM\fP to that terminal type, since \fBtgetent\fP only does \*(``tc\*('' expansion once it is found the terminal type it was looking for, not while searching. .PP @@ -1969,25 +2008,22 @@ on various combinations of termcap libraries and applications, a core dump, warnings, or incorrect operation. If it is too long even before \*(``tc\*('' expansion, it will have this effect even for users of some other -terminal types and users whose TERM variable does not have a termcap +terminal types and users whose \fITERM\fP variable does not have a termcap entry. .PP -When in \-C (translate to termcap) mode, the \fBncurses\fP implementation of +When in \-C (translate to termcap) mode, +the \fI\%ncurses\fP implementation of \fB@TIC@\fP(1M) issues warning messages when the pre-tc length of a termcap translation is too long. The \-c (check) option also checks resolved (after tc expansion) lengths. -.SS Binary Compatibility -It is not wise to count on portability of binary terminfo entries between -commercial UNIX versions. -The problem is that there are at least two versions -of terminfo (under HP\-UX and AIX) 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. +.SH FILES +.TP +.I \*d +compiled terminal description database directory .SH EXTENSIONS -.PP Searching for terminal descriptions in -\fB$HOME/.terminfo\fP and TERMINFO_DIRS +\fI$HOME/.terminfo\fP and \fI\%TERMINFO_DIRS\fP is not supported by older implementations. .PP Some SVr4 \fBcurses\fP implementations, and all previous to SVr4, do not @@ -1996,81 +2032,97 @@ interpret the %A and %O operators in parameter strings. SVr4/XPG4 do not specify whether \fBmsgr\fP licenses movement while in an alternate-character-set mode (such modes may, among other things, map CR and NL to characters that do not trigger local motions). -The \fBncurses\fP implementation ignores \fBmsgr\fP in \fBALTCHARSET\fP -mode. +The \fI\%ncurses\fP implementation ignores \fBmsgr\fP in +\fBALTCHARSET\fP mode. This raises the possibility that an XPG4 implementation making the opposite interpretation may need terminfo -entries made for \fBncurses\fP to have \fBmsgr\fP turned off. +entries made for \fI\%ncurses\fP to have \fBmsgr\fP turned off. .PP -The \fBncurses\fP library handles insert-character and insert-character modes -in a slightly non-standard way to get better update efficiency. +The \fI\%ncurses\fP library handles insert-character and +insert-character modes in a slightly non-standard way to get better +update efficiency. See the \fBInsert/Delete Character\fP subsection above. .PP The parameter substitutions for \fBset_clock\fP and \fBdisplay_clock\fP are -not documented in SVr4 or the XSI Curses standard. +not documented in SVr4 or X/Open Curses. They are deduced from the documentation for the AT&T 505 terminal. .PP Be careful assigning the \fBkmous\fP capability. -The \fBncurses\fP library wants to interpret it as \fBKEY_MOUSE\fP, +The \fI\%ncurses\fP library wants to interpret it as \fBKEY_MOUSE\fP, for use by terminals and emulators like xterm that can return mouse-tracking information in the keyboard-input stream. .PP X/Open Curses does not mention italics. Portable applications must assume that numeric capabilities are signed 16-bit values. -This includes the \fIno_color_video\fP (ncv) capability. -The 32768 mask value used for italics with ncv can be confused with -an absent or cancelled ncv. +This includes the \fIno_color_video\fP (\fBncv\fP) capability. +The 32768 mask value used for italics with \fBncv\fP can be confused with +an absent or cancelled \fBncv\fP. If italics should work with colors, -then the ncv value must be specified, even if it is zero. -.PP -Different commercial ports of terminfo and curses support different subsets of -the XSI Curses standard and (in some cases) different extension sets. -Here -is a summary, accurate as of October 1995: -.bP -\fBSVR4, Solaris, ncurses\fP \-\- -These support all SVr4 capabilities. -.bP -\fBSGI\fP \-\- -Supports the SVr4 set, adds one undocumented extended string -capability (\fBset_pglen\fP). -.bP -\fBSVr1, Ultrix\fP \-\- -These support a restricted subset of terminfo capabilities. -The booleans end with \fBxon_xoff\fP; -the numerics with \fBwidth_status_line\fP; -and the strings with \fBprtr_non\fP. -.bP -\fBHP/UX\fP \-\- -Supports the SVr1 subset, plus the SVr[234] numerics \fBnum_labels\fP, -\fBlabel_height\fP, \fBlabel_width\fP, plus function keys 11 through 63, plus -\fBplab_norm\fP, \fBlabel_on\fP, and \fBlabel_off\fP, plus some incompatible -extensions in the string table. -.bP -\fBAIX\fP \-\- -Supports the SVr1 subset, plus function keys 11 through 63, plus a number -of incompatible string table extensions. -.bP -\fBOSF\fP \-\- -Supports both the SVr4 set and the AIX extensions. -.SH FILES -.TP 25 -\*d/?/* -files containing terminal descriptions -.SH SEE ALSO -\fB@INFOCMP@\fP(1M), -\fB@TABS@\fP(1), -\fB@TIC@\fP(1M), -\fBcurses\fP(3X), -\fBcurs_color\fP(3X), -\fBcurs_variables\fP(3X), -\fBprintf\fP(3), -\fBterm_variables\fP(3X). -\fBterm\fP(\*n). -\fBuser_caps\fP(5). +then the \fBncv\fP value must be specified, even if it is zero. +.PP +Different commercial ports of \fI\%terminfo\fP and \fIcurses\fP support +different subsets of X/Open Curses and +(in some cases) +different extensions. +Here is a summary, +accurate as of October 1995, +after which the commercial Unix market contracted and lost diversity. +.bP +SVr4, +Solaris, +and \fI\%ncurses\fP support all SVr4 capabilities. +.bP +IRIX supports the SVr4 set and adds one undocumented extended string +capability (\fB\%set_pglen\fP). +.bP +SVr1 and Ultrix support a restricted subset of \fI\%terminfo\fP +capabilities. +The Booleans end with \fB\%xon_xoff\fP; +the numerics with \fB\%width_status_line\fP; +and the strings with \fB\%prtr_non\fP. +.bP +HP/UX supports the SVr1 subset, +plus the SVr[234] numerics +\fB\%num_labels\fP, +\fB\%label_height\fP, +\fB\%label_width\fP, +plus function keys 11 through 63, +plus +\fB\%plab_norm\fP, +\fB\%label_on\fP, +and +\fB\%label_off\fP, +plus a number of incompatible string table extensions. +.bP +AIX supports the SVr1 subset, +plus function keys 11 through 63, +plus a number of incompatible string table extensions. +.bP +OSF/1 supports both the SVr4 set and the AIX extensions. +.SH PORTABILITY +Do not count on compiled (binary) \fI\%terminfo\fP entries being +portable between commercial Unix systems. +At least two implementations of \fI\%terminfo\fP +(those of HP-UX and AIX) +diverged from those of other System V Unices after SVr1, +adding extension capabilities to the string table that +(in the binary format) +collide with subsequent System V and X/Open Curses extensions. .SH AUTHORS Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. Based on \fIpcurses\fP by Pavel Curtis. +.SH SEE ALSO +\fB\%@INFOCMP@\fP(1M), +\fB\%@TABS@\fP(1), +\fB\%@TIC@\fP(1M), +\fB\%curses\fP(3X), +\fB\%curs_color\fP(3X), +\fB\%curs_terminfo\fP(3X), +\fB\%curs_variables\fP(3X), +\fB\%printf\fP(3), +\fB\%term_variables\fP(3X), +\fB\%term\fP(5), +\fB\%user_caps\fP(5) diff --git a/man/tic.1m b/man/tic.1m index b76cbc2a..f949e5a6 100644 --- a/man/tic.1m +++ b/man/tic.1m @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,61 +27,68 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tic.1m,v 1.81 2021/12/25 17:39:16 tom Exp $ -.TH @TIC@ 1M "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.ds n 5 -.ds d @TERMINFO@ +.\" $Id: tic.1m,v 1.108 2024/03/16 15:35:01 tom Exp $ +.TH @TIC@ 1M 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. +. +.ds d @TERMINFO@ .SH NAME -\fB@TIC@\fP \- the \fIterminfo\fP entry-description compiler +\fB\%@TIC@\fP \- +compile terminal descriptions for \fIterminfo\fR or \fItermcap\fR .SH SYNOPSIS \fB@TIC@\fP [\fB\-\ 0\ 1\ +a\ +c\ C\ D\ +f\ +g\ G\ I\ K\ L\ N\ -T\ -U\ -V\ -W\ -a\ -c\ -f\ -g\ q\ r\ s\ t\ +T\ +U\ +V\ +W\ x\ \fP] -[\fB\-e\fP \fInames\fP] +[\fB\-e\fP \fIterminal-type-list\fP] [\fB\-o\fP \fIdir\fP] [\fB\-Q\fP[\fIn\fP]] [\fB\-R\fP \fIsubset\fP] [\fB\-v\fP[\fIn\fP]] [\fB\-w\fP[\fIn\fP]] \fIfile\fP -.br .SH DESCRIPTION The \fB@TIC@\fP command translates a \fBterminfo\fP file from source format into compiled format. The compiled format is necessary for use with -the library routines in \fBncurses\fP(3X). +the library routines in \fB\%ncurses\fP(3X). .PP -As described in \fBterm\fP(\*n), the database may be either a directory +As described in \fBterm\fP(5), the database may be either a directory tree (one file per terminal entry) or a hashed database (one record per entry). The \fB@TIC@\fP command writes only one type of entry, depending on how it was built: @@ -109,35 +116,37 @@ There are two ways to achieve this: .bP First, you may override the system default either by using the \fB\-o\fP option, -or by setting the variable \fBTERMINFO\fP +or by setting the variable \fI\%TERMINFO\fP in your shell environment to a valid database location. .bP Secondly, if \fB@TIC@\fP cannot write in \fI\*d\fP -or the location specified using your TERMINFO variable, +or the location specified using your \fI\%TERMINFO\fP variable, it looks for the directory \fI$HOME/.terminfo\fP (or hashed database \fI$HOME/.terminfo.db)\fP; if that location exists, the entry is placed there. .PP Libraries that read terminfo entries are expected to check in succession .bP -a location specified with the TERMINFO environment variable, +a location specified with the \fI\%TERMINFO\fP environment variable, .bP \fI$HOME/.terminfo\fP, .bP -directories listed in the TERMINFO_DIRS environment variable, +directories listed in the \fI\%TERMINFO_DIRS\fP environment variable, .bP a compiled-in list of directories (@TERMINFO_DIRS@), and .bP the system terminfo database (\fI\*d\fP). -.SS ALIASES .PP +The \fIFetching Compiled Descriptions\fP section in the \fBterminfo\fR(5) +manual goes into further detail. +.SS Aliases This is the same program as @INFOTOCAP@ and @CAPTOINFO@; usually those are linked to, or copied from this program: .bP When invoked as @INFOTOCAP@, @TIC@ sets the \fB\-I\fP option. .bP When invoked as @CAPTOINFO@, @TIC@ sets the \fB\-C\fP option. -.SS OPTIONS +.SH OPTIONS .TP \fB\-0\fP restricts the output to a single line @@ -206,9 +215,9 @@ according to the rules summarized above, it will print a diagnostic and exit with an error rather than printing a list of database locations. .TP -\fB\-e \fP\fInames\fP -Limit writes and translations to the following comma-separated list of -terminals. +\fB\-e \fIlist\fR +Limit writes and translations to the comma-separated \fIlist\fP of +terminal types. 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. @@ -233,8 +242,8 @@ rather than their decimal equivalents. Force source translation to terminfo format. .TP \fB\-K\fP -Suppress some longstanding ncurses extensions to termcap format, -e.g., "\\s" for space. +Suppress some longstanding \fI\%ncurses\fP extensions to termcap format, +e.g., "\es" for space. .TP \fB\-L\fP Force source translation to terminfo format @@ -253,11 +262,11 @@ normally suppresses output of obsolete termcap capabilities such as \fBbs\fP. This option forces a more literal translation that also preserves the obsolete capabilities. .TP -\fB\-o\fP\fIdir\fP +\fB\-o\fIdir\fR Write compiled entries to given database location. -Overrides the TERMINFO environment variable. +Overrides the \fI\%TERMINFO\fP environment variable. .TP -\fB\-Q\fP\fIn\fP +\fB\-Q\fIn\fR Rather than show source in terminfo (text) format, print the compiled (binary) format in hexadecimal or base64 form, depending on the option's value: @@ -276,15 +285,23 @@ hexadecimal and base64 \fB\-q\fP Suppress comments and blank lines when showing translated source. .TP -\fB\-R\fP\fIsubset\fP +\fB\-R\fIsubset\fR 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 \fBterminfo\fP(\*n) for details. +.IP +Available subsets are +.RS +\*(``SVr1\*('', +\*(``Ultrix\*('', +\*(``HP\*('', +\*(``BSD\*('', and +\*(``AIX\*('' +.RE +.IP +See \fBterminfo\fP(5) for details. .TP \fB\-r\fP Force entry resolution (so there are no remaining tc capabilities) even @@ -314,22 +331,30 @@ Normally, it infers data which is commonly missing in older terminfo data, or in termcaps. .TP \fB\-V\fP -reports the version of ncurses which was used in this program, and exits. +reports the version of \fI\%ncurses\fP which was used in this program, +and exits. .TP -\fB\-v\fP\fIn\fP +\fB\-v\fIn\fR specifies that (verbose) output be written to standard error trace information showing \fB@TIC@\fP's progress. .IP -The optional parameter \fIn\fP is a number from 1 to 10, inclusive, +The optional parameter \fIn\fP is a number from 1 to 9, inclusive, indicating the desired level of detail of information. -If ncurses is built without tracing support, the optional parameter is ignored. +.RS +.bP +If \fI\%ncurses\fP is built without tracing support, +the optional parameter is ignored. +.bP If \fIn\fP is omitted, the default level is 1. +.bP If \fIn\fP is specified and greater than 1, the level of -detail is increased. +detail is increased, and the output is written (with tracing information) +to the \*(``trace\*('' file. +.RE .RS .PP The debug flag levels are as follows: -.TP +.TP 4 1 Names of files created and linked .TP @@ -339,8 +364,14 @@ Information related to the \*(``use\*('' facility 3 Statistics from the hashing algorithm .TP +4 +Details of extended capabilities +.TP 5 -String-table memory allocations +(unused) +.TP +6 +(unused) .TP 7 Entries into the string-table @@ -350,8 +381,6 @@ List of tokens encountered by scanner .TP 9 All values computed in construction of the hash table -.LP -If the debug level \fIn\fP is not given, it is taken to be one. .RE .TP \fB\-W\fP @@ -361,32 +390,31 @@ Use the \fB\-W\fP option to do this. If you specify both \fB\-f\fP and \fB\-W\fP options, the latter is ignored when \fB\-f\fP has already split the line. .TP -\fB\-w\fP\fIn\fP +\fB\-w\fIn\fR specifies the width of the output. The parameter is optional. If it is omitted, it defaults to 60. .TP \fB\-x\fP -Treat unknown capabilities as user-defined (see \fBuser_caps(\*n)\fP). +Treat unknown capabilities as user-defined (see \fBuser_caps\fP(5)). That is, if you supply a capability name which \fB@TIC@\fP does not recognize, -it will infer its type (boolean, number or string) from the syntax and +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. -.SS PARAMETERS +.SS Parameters .TP \fIfile\fP contains one or more \fBterminfo\fP terminal descriptions in source -format [see \fBterminfo\fP(\*n)]. +format [see \fBterminfo\fP(5)]. Each description in the file describes the capabilities of a particular terminal. .IP If \fIfile\fP is \*(``-\*('', then the data is read from the standard input. The \fIfile\fP parameter may also be the path of a character-device. -.SS PROCESSING -.PP +.SS Processing All but one of the capabilities recognized by \fB@TIC@\fP are documented -in \fBterminfo\fP(\*n). +in \fBterminfo\fP(5). The exception is the \fBuse\fP capability. .PP When a \fBuse\fP=\fIentry\fP\-\fIname\fP field is discovered in a @@ -399,125 +427,47 @@ from \fB\*d\fP to complete the entry. those capabilities that explicitly are defined in the current entry. .PP When an entry, e.g., \fBentry_name_1\fP, contains a -\fBuse=\fP\fIentry\fR_\fIname\fR_\fI2\fP field, any canceled +\fBuse=\fIentry\fR_\fIname\fR_\fI2\fR field, any canceled capabilities in \fIentry\fR_\fIname\fR_\fI2\fP must also appear in \fBentry_name_1\fP before \fBuse=\fP for these capabilities to be canceled in \fBentry_name_1\fP. .PP -Total compiled entries cannot exceed 4096 bytes. +Total compiled entries cannot exceed +4096 bytes in the legacy storage format, or +32768 using the extended number format. The name field cannot 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 printed. -.SH HISTORY -.PP -System V Release 2 provided a \fBtic\fP utility. -It accepted a single option: \fB\-v\fP (optionally followed by a number). -According to Ross Ridge's comment in \fImytinfo\fP, -this version of \fBtic\fP was -unable to represent cancelled capabilities. -.PP -System V Release 3 provided a different \fBtic\fP utility, -written by Pavel Curtis, -(originally named \*(``compile\*('' in \fIpcurses\fP). -This added an option \fB\-c\fP 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 \fIpcurses\fP. -While the program itself was changed little as development -continued with System V Release 4, -the table of capabilities grew from 180 (\fIpcurses\fP) to 464 (Solaris). -.PP -In early development of ncurses (1993), -Zeyd Ben-Halim used the table from \fImytinfo\fP to -extend the \fIpcurses\fP table to 469 capabilities -(456 matched SVr4, 8 were only in SVr4, 13 were not in SVr4). -Of those 13, 11 were ultimately discarded -(perhaps to match the draft of X/Open Curses). -The exceptions were -\fBmemory_lock_above\fP and -\fBmemory_unlock\fP (see \fBuser_caps\fP(5)). -.PP -Eric Raymond incorporated parts of \fImytinfo\fP into ncurses -to implement the termcap-to-terminfo source conversion, -and extended that to begin development of -the corresponding terminfo-to-termcap source conversion, -Thomas Dickey completed that development over the course of several years. -.PP -In 1999, Thomas Dickey added the \fB\-x\fP option -to support user-defined capabilities. -.PP -In 2010, Roy Marples provided a \fBtic\fP program -and terminfo library for NetBSD. -That implementation adapts several features from ncurses, -including \fB@TIC@\fP's \fB\-x\fP option. -.PP -The \fB\-c\fP option tells \fB@TIC@\fP to check for problems in the -terminfo source file. -Continued development provides additional checks: -.bP -\fIpcurses\fP had 8 warnings -.bP -ncurses in 1996 had 16 warnings -.bP -Solaris (SVr4) curses has 28 warnings -.bP -NetBSD tic in 2019 has 19 warnings. -.bP -ncurses in 2019 has 96 warnings -.PP -The checking done in ncurses' \fB@TIC@\fP helps with the conversion to -termcap, as well as pointing out errors and inconsistencies. -It is also used to ensure consistency with the user-defined capabilities. -There are 527 distinct capabilities in ncurses' terminal database; -128 of those are user-defined. -.SH PORTABILITY -.PP -X/Open Curses, Issue 7 (2009) provides a brief description of \fBtic\fP. -It lists one option: \fB\-c\fP. -The omission of \fB\-v\fP is unexpected. -The change history states that the description is derived from True64 UNIX. -According to its manual pages, that system also supported the \fB\-v\fP option. -.PP -Shortly after Issue 7 was released, Tru64 was discontinued. -As of 2019, the surviving implementations of \fBtic\fP -are SVr4 (AIX, HP-UX and Solaris), -ncurses -and NetBSD curses. -The SVr4 \fBtic\fP programs all support the \fB\-v\fP option. -The NetBSD \fBtic\fP program follows X/Open's documentation, -omitting the \fB\-v\fP option. -.PP -The X/Open rationale states that some implementations of \fBtic\fP -read terminal descriptions from the standard input if the \fIfile\fP -parameter is omitted. -None of these implementations do that. -Further, it comments 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. -.SS COMPATIBILITY +.SH FILES +.TP +.I \*d +compiled terminal description database +.SH NOTES There is some evidence that historic \fB@TIC@\fP implementations treated description fields with no whitespace in them as additional aliases or short names. This \fB@TIC@\fP does not do that, but it does warn when description fields may be treated that way and check them for dangerous characters. -.SS EXTENSIONS +.SH EXTENSIONS Unlike the SVr4 \fB@TIC@\fP command, this implementation can actually compile termcap sources. In fact, entries in terminfo and termcap syntax can be mixed in a single source file. -See \fBterminfo\fP(\*n) for the list of +See \fBterminfo\fP(5) for the list of termcap names taken to be equivalent to terminfo names. .PP The SVr4 manual pages are not clear on the resolution rules for \fBuse\fP capabilities. This implementation of \fB@TIC@\fP will find \fBuse\fP targets anywhere -in the source file, or anywhere in the file tree rooted at \fBTERMINFO\fP (if -\fBTERMINFO\fP is defined), +in the source file, +or anywhere in the file tree rooted at +\fI\%TERMINFO\fP +(if +\fI\%TERMINFO\fP is defined), or in the user's \fI$HOME/.terminfo\fP database (if it exists), or (finally) anywhere in the system's file tree of @@ -552,7 +502,7 @@ are not supported by SVr4 \fBtic\fP: \fB\-x\fP .RE .bP -The NetBSD \fBtic\fP supports a few of the ncurses options +The NetBSD \fBtic\fP supports a few of the \fI\%ncurses\fP options .sp .RS \fB\-a\fP @@ -567,25 +517,106 @@ as @INFOCMP@'s \fB\-e\fP and \fB\-E\fP options). The SVr4 \fB\-c\fP mode does not report bad \*(``use=\*('' links. .PP System V does not compile entries to or read entries from your -\fI$HOME/.terminfo\fP database unless TERMINFO is explicitly set to it. -.SH FILES -.TP 5 -\fB\*d/?/*\fP -Compiled terminal description database. -.SH SEE ALSO -\fB@CAPTOINFO@\fP(1M), -\fB@INFOCMP@\fP(1M), -\fB@INFOTOCAP@\fP(1M), -\fB@TOE@\fP(1M), -\fBcurses\fP(3X), -\fBterm\fP(\*n). -\fBterminfo\fP(\*n). -\fBuser_caps\fP(\*n). +\fI$HOME/.terminfo\fP database unless \fI\%TERMINFO\fP is explicitly set +to it. +.SH PORTABILITY +X/Open Curses, Issue 7 (2009) provides a brief description of \fBtic\fP. +It lists one option: \fB\-c\fP. +The omission of \fB\-v\fP is unexpected. +The change history states that the description is derived from Tru64. +According to its manual pages, that system also supported the \fB\-v\fP option. +.PP +Shortly after Issue 7 was released, Tru64 was discontinued. +As of 2019, the surviving implementations of \fBtic\fP +are SVr4 (AIX, HP-UX and Solaris), +\fI\%ncurses\fP +and NetBSD curses. +The SVr4 \fBtic\fP programs all support the \fB\-v\fP option. +The NetBSD \fBtic\fP program follows X/Open's documentation, +omitting the \fB\-v\fP option. +.PP +The X/Open rationale states that some implementations of \fBtic\fP +read terminal descriptions from the standard input if the \fIfile\fP +parameter is omitted. +None of these implementations do that. +Further, it comments 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. +.SH HISTORY +System V Release 2 provided a \fBtic\fP utility. +It accepted a single option: \fB\-v\fP (optionally followed by a number). +According to Ross Ridge's comment in \fImytinfo\fP, +this version of \fBtic\fP was +unable to represent cancelled capabilities. .PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). -.SH AUTHOR +System V Release 3 provided a different \fBtic\fP utility, +written by Pavel Curtis, +(originally named \*(``compile\*('' in \fIpcurses\fP). +This added an option \fB\-c\fP 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 \fIpcurses\fP. +While the program itself was changed little as development +continued with System V Release 4, +the table of capabilities grew from 180 (\fIpcurses\fP) to 464 (Solaris). +.PP +In early development of \fI\%ncurses\fP (1993), +Zeyd Ben-Halim used the table from \fImytinfo\fP to +extend the \fIpcurses\fP table to 469 capabilities +(456 matched SVr4, 8 were only in SVr4, 13 were not in SVr4). +Of those 13, 11 were ultimately discarded +(perhaps to match the draft of X/Open Curses). +The exceptions were +\fB\%memory_lock_above\fP and +\fB\%memory_unlock\fP (see \fB\%user_caps\fP(5)). +.PP +Eric Raymond incorporated parts of \fImytinfo\fP into \fI\%ncurses\fP +to implement the termcap-to-terminfo source conversion, +and extended that to begin development of +the corresponding terminfo-to-termcap source conversion, +Thomas Dickey completed that development over the course of several years. +.PP +In 1999, Thomas Dickey added the \fB\-x\fP option +to support user-defined capabilities. +.PP +In 2010, Roy Marples provided a \fBtic\fP program +and terminfo library for NetBSD. +That implementation adapts several features from \fI\%ncurses\fP, +including \fB@TIC@\fP's \fB\-x\fP option. +.PP +The \fB\-c\fP option tells \fB@TIC@\fP to check for problems in the +terminfo source file. +Continued development provides additional checks: +.bP +\fIpcurses\fP had 8 warnings +.bP +\fI\%ncurses\fP in 1996 had 16 warnings +.bP +Solaris (SVr4) curses has 28 warnings +.bP +NetBSD tic in 2019 has 19 warnings. +.bP +\fI\%ncurses\fP in 2019 has 96 warnings +.PP +The checking done in \fI\%ncurses\fP' \fB@TIC@\fP helps with the +conversion to termcap, +as well as pointing out errors and inconsistencies. +It is also used to ensure consistency with the user-defined capabilities. +There are 527 distinct capabilities in \fI\%ncurses\fP' terminal +database; +128 of those are user-defined. +.SH AUTHORS Eric S. Raymond and .br -Thomas E. Dickey +Thomas E. Dickey +.SH SEE ALSO +\fB\%@CAPTOINFO@\fP(1M), +\fB\%@INFOCMP@\fP(1M), +\fB\%@INFOTOCAP@\fP(1M), +\fB\%@TOE@\fP(1M), +\fB\%curses\fP(3X), +\fB\%term\fP(5), +\fB\%terminfo\fP(5), +\fB\%user_caps\fP(5) diff --git a/man/toe.1m b/man/toe.1m index 3213d473..c4eba848 100644 --- a/man/toe.1m +++ b/man/toe.1m @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2019-2020,2021 Thomas E. Dickey * +.\" Copyright 2019-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2015,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,168 +28,215 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: toe.1m,v 1.35 2021/12/25 17:39:16 tom Exp $ -.TH @TOE@ 1M "" +.\" $Id: toe.1m,v 1.68 2024/04/20 18:59:26 tom Exp $ +.TH @TOE@ 1M 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +.ie n .ds CW R +.el \{ +.ie \n(.g .ds CW CR +.el .ds CW CW +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. -.ds n 5 .ds d @TERMINFO@ .SH NAME -\fB@TOE@\fP \- table of (terminfo) entries +\fB\%@TOE@\fP \- +list table of entries of \fIterminfo\fR terminal types .SH SYNOPSIS -\fB@TOE@\fP [\fB\-v\fP[\fIn\fP]] [\fB\-ahsuUV\fP] \fIfile...\fP -.br -.SH DESCRIPTION +.B @TOE@ +.RB [ \-ahs ] +.RB [ \-v\ \c +.RI [ n ]] +.RI [ directory +\&.\|.\|.] .PP -With no options, -\fB@TOE@\fP 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 directory is scanned. -If you also specify the \fB\-h\fP option, -a directory header will be issued as each -directory is entered. +.B @TOE@ +.RB [ \-u | \-U ] +.I file .PP -There are other options intended for use by terminfo file maintainers: -.TP -\fB\-a\fP -report on all of the terminal databases which ncurses would search, -rather than only the first one that it finds. +.B "@TOE@ \-V" +.SH DESCRIPTION +\fB\%@TOE@\fP reports to the standard output stream the (primary) names +and descriptions of the terminal types available to the \fIterminfo\fP +library. +Each \fIdirectory\fP is scanned; +if none are given, +\fB\%@TOE@\fP scans the default \fIterminfo\fP directory. +.SH OPTIONS +The \fB\-h\fP option can be helpful to observe where \fB\%@TOE@\fP is +looking for terminal descriptions. +Other options support maintainers of \fIterminfo\fP terminal +descriptions. +.TP 9 \" "-u file" + 2n +.B \-a +lists entries from all terminal database directories that \fIterminfo\fP +would search, +instead of only the first that it finds. .IP -If the \fB\-s\fP is also given, \fB@TOE@\fP -adds a column to the report, -showing (like \fBconflict\fP(1)) which entries which -belong to a given terminal database. -An "*" marks entries which differ, and "+" marks equivalent entries. +If +.B \-s +is also given, +\fB\%@TOE@\fP +additionally reports, +like \fI\%conflict\fP(1), +which entries correspond to a given terminal database. +An \*(``*\*('' marks entries that differ, +and \*(``+\*('' marks equivalent entries. .IP -Without the \fB\-s\fP option, \fB@TOE@\fP does not attempt to merge -duplicates in its report +Without the \fB\-s\fP option, +\fB\%@TOE@\fP does not attempt to merge duplicates in its report. +.TP +.B \-h +writes a heading naming each each directory as it is accessed. .TP -\fB\-s\fP -sort the output by the entry names. +.B \-s +sorts the output by the entry names. .TP -\fB\-u\fP \fIfile\fP -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 +.BI \-u\ file +lists terminal type dependencies in \fIfile\fP, +a \fIterminfo\fP entry source or \fItermcap\fP database file. +The report summarizes the \*(``\fBuse\fP\*('' (\fIterminfo\fP) and +\fBtc\fP (\fItermcap\fP) relations: +each line comprises the primary name of a terminal type employing +\fBuse\fP/\fBtc\fP capabilities, +a colon, +a space- and tab-separated list of primary names of terminal types thus +named, +and a newline. .TP -\fB\-U\fP \fIfile\fP -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, -followed by a colon, -followed by the -whitespace-separated primary names of all terminals which depend on it, -followed by a newline. +.BI \-U\ file +lists terminal type reverse dependencies in \fIfile\fP, +a \fIterminfo\fP entry source or \fItermcap\fP database file. +The report summarizes the \*(``\fBuse\fP\*('' (\fIterminfo\fP) and +\fBtc\fP (\fItermcap\fP) reverse relations: +each line comprises the primary name of a terminal type occurring in +\fBuse\fP/\fBtc\fP capabilities, +a colon, +a space- and tab-separated list of primary names of terminal types +naming them thus, +and a newline. .TP -\fB\-v\fP\fIn\fP -specifies that (verbose) output be written to standard error, -showing \fB@TOE@\fP's progress. +.BR \-v\ [\c +.IR n ] +reports verbose status information to the standard error stream, +showing \fB\%@TOE@\fP's progress. .IP -The optional parameter \fIn\fP is a number from 1 to 10, -interpreted as for \fB@TIC@\fP(1M). -If ncurses is built without tracing support, the optional parameter is ignored. +The optional parameter \fIn\fP is an integer between 1 and 10 inclusive, +interpreted as for \fB\%@TIC@\fP(1M). +If \fI\%ncurses\fP is built without tracing support, +\fIn\fP is ignored. .TP \fB\-V\fP -reports the version of ncurses which was used in this program, -and exits. -.SH EXAMPLES -.PP -Without sorting, the \fB\-a\fP option reports all of the names found -in all of the terminal databases found by the \fBTERMINFO\fP and -\fBTERMINFO_DIRS\fP environment variables: -.NS -MtxOrb162 16x2 Matrix Orbital LCD display -MtxOrb204 20x4 Matrix Orbital LCD display -MtxOrb Generic Matrix Orbital LCD display -qvt101+ qume qvt 101 PLUS product -qvt119+-25 QVT 119 PLUS with 25 data lines -qansi-g QNX ANSI -qvt103 qume qvt 103 -qnxw QNX4 windows -qansi-w QNX ansi for windows -qnxm QNX4 with mouse events -qvt203-25-w QVT 203 PLUS with 25 by 132 columns -qansi-t QNX ansi without console writes -\&.\ .\ . -.NE -.PP -Use the \fB\-a\fP and \fB\-s\fP options together to show where each terminal -description was found: -.NS ---> /usr/local/ncurses/share/terminfo -----> /usr/share/terminfo -*-+-: 9term Plan9 terminal emulator for X -*---: Eterm Eterm with xterm-style color support (X Window System) -*-*-: Eterm-256color Eterm with xterm 256-colors -*-*-: Eterm-88color Eterm with 88 colors -*-+-: MtxOrb Generic Matrix Orbital LCD display -*-+-: MtxOrb162 16x2 Matrix Orbital LCD display -*-+-: MtxOrb204 20x4 Matrix Orbital LCD display -*-*-: NCR260VT300WPP NCR 2900_260 vt300 wide mode pc+ kybd -*-+-: aaa ann arbor ambassador/30 lines -*-+-: aaa+dec ann arbor ambassador in dec vt100 mode -*-+-: aaa+rv ann arbor ambassador in reverse video -\&.\ .\ . -.NE +reports the version of \fI\%ncurses\fP associated +with this program and exits with a successful status. .SH FILES -.TP 5 -\fB\*d/?/*\fP -Compiled terminal description database. +.TP +.I \*d +compiled terminal description database +.SH PORTABILITY +\fB\%@TOE@\fP is not provided by other implementations. +There is no applicable X/Open or POSIX standard for it. .SH HISTORY -This utility is not provided by other implementations. -There is no relevant X/Open or POSIX standard for \fB@TOE@\fP. +\fB\%@TOE@\fP replaces a \fB\-T\fP option that was briefly supported by +the \fI\%ncurses\fP \fB\%infocmp\fP utility in 1995. +.PP +The \fB\-a\fP and \fB\-s\fP options were added in 2006 and 2011, +respectively. .PP -The program name refers to a developer's pun: +The program's name originates with a developer's pun: .bP \fBtic\fP, .bP \fBtac\fP (now \fBtack\fP), .bP \fBtoe\fP. +.SH EXAMPLES +When not sorting with the \fB\-s\fP option, +the \fB\-a\fP option reports all of the names found in all of the +terminal database directories named in the \fI\%TERMINFO\fP and +\fI\%TERMINFO_DIRS\fP environment variables. +.RS 4 .PP -It replaced a \fB\-T\fP option which was briefly supported by -the ncurses \fBinfocmp\fP utility in 1995. +.\" toe -a | grep -E '^(xterm|vt)' +.ft \*(CW +.TS +L2 Lx. +xterm\-color generic color xterm +xterm\-xfree86 xterm terminal emulator (XFree86) +xterm\-vt220 xterm emulating vt220 +xterm\-256color xterm with 256 colors +xterm\-r6 xterm X11R6 version +xterm\-r5 xterm R5 version +xterm\-mono monochrome xterm +xterm T{ +.ad l +xterm terminal emulator (X Window System) +T} +vt220 dec vt220 +vt102 dec vt102 +vt100 dec vt100 (w/advanced video) +vt52 dec vt52 +.T& +L. +\&.\|.\|. +.TE +.ft +.RE .PP -The \fB\-a\fP and \fB\-s\fP options were added to -\fB@TOE@\fP several years later (2006 and 2011, respectively). -.SH SEE ALSO -\fB@CAPTOINFO@\fP(1M), -\fB@INFOCMP@\fP(1M), -\fB@INFOTOCAP@\fP(1M), -\fB@TIC@\fP(1M), -\fBcurses\fP(3X), -\fBterminfo\fP(\*n). +Use the \fB\-a\fP and \fB\-s\fP options together to show where each +terminal description was found. +.RS 4 .PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +.\" toe -as | grep -E '(^-+>|:.(xterm|vt))' +.ft \*(CW +.TS +Lx. +\-\-> /etc/terminfo +\-\-\-\-> /lib/terminfo +\-\-\-\-\-\-> /usr/share/terminfo +.TE +.TS +L1 L2 Lx. +\-\-*\-\-\-: vt100 dec vt100 (w/advanced video) +\-\-*\-\-\-: vt102 dec vt102 +\-\-*\-\-\-: vt220 dec vt220 +\-\-*\-\-\-: vt52 dec vt52 +\-\-*\-\-\-: xterm T{ +.ad l +xterm terminal emulator (X Window System) +T} +\-\-*\-\-\-: xterm\-256color xterm with 256 colors +\-\-*\-\-\-: xterm\-color generic color xterm +\-\-*\-\-\-: xterm\-mono monochrome xterm +\-\-*\-\-\-: xterm\-r5 xterm R5 version +\-\-*\-\-\-: xterm\-r6 xterm X11R6 version +\-\-*\-\-\-: xterm\-vt220 xterm emulating vt220 +\-\-*\-\-\-: xterm\-xfree86 T{ +.ad l +xterm terminal emulator (XFree86) +T} +.T& +L. +\&.\|.\|. +.TE +.ft +.RE +.SH SEE ALSO +\fB\%@CAPTOINFO@\fP(1M), +\fB\%@INFOCMP@\fP(1M), +\fB\%@INFOTOCAP@\fP(1M), +\fB\%@TIC@\fP(1M), +\fB\%curses\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/tput.1 b/man/tput.1 index 2c57f137..eba07339 100644 --- a/man/tput.1 +++ b/man/tput.1 @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,593 +28,977 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tput.1,v 1.75 2021/12/25 21:31:59 tom Exp $ -.TH @TPUT@ 1 "" -.ds d @TERMINFO@ -.ds n 1 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: tput.1,v 1.113 2024/04/20 19:58:50 tom Exp $ +.TH @TPUT@ 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. +.ds d @TERMINFO@ .SH NAME -\fB@TPUT@\fP, \fBreset\fP \- initialize a terminal or query terminfo database +\fB\%@TPUT@\fP \- +initialize a terminal, exercise its capabilities, or query \fI\%term\%info\fP database .SH SYNOPSIS -\fB@TPUT@\fP [\fB\-T\fP\fItype\fP] \fIcapname\fP [\fIparameters\fP] -.br -\fB@TPUT@\fP [\fB\-T\fP\fItype\fP] [\fB\-x\fP] \fBclear\fP -.br -\fB@TPUT@\fP [\fB\-T\fP\fItype\fP] \fBinit\fP -.br -\fB@TPUT@\fP [\fB\-T\fP\fItype\fP] \fBreset\fP -.br -\fB@TPUT@\fP [\fB\-T\fP\fItype\fP] \fBlongname\fP -.br -\fB@TPUT@ \-S\fP \fB<<\fP -.br +\fB@TPUT@\fP [\fB\-T\fP \fIterminal-type\fP] +{\fIcap-code\fP [\fIparameter\fP .\|.\|.\&]} .\|.\|. +.PP +\fB@TPUT@\fP [\fB\-T\fP \fIterminal-type\fP] [\fB\-x\fP] \fBclear\fP +.PP +\fB@TPUT@\fP [\fB\-T\fP \fIterminal-type\fP] \fBinit\fP +.PP +\fB@TPUT@\fP [\fB\-T\fP \fIterminal-type\fP] \fB\%reset\fP +.PP +\fB@TPUT@\fP [\fB\-T\fP \fIterminal-type\fP] \fB\%longname\fP +.PP +\fB@TPUT@ \-S\fP +.PP \fB@TPUT@ \-V\fP -.br .SH DESCRIPTION -The \fB@TPUT@\fP utility uses the \fBterminfo\fP database to make the -values of terminal-dependent capabilities and information available to -the shell (see \fBsh\fP(1)), to initialize or reset the terminal, or -return the long name of the requested terminal type. -The result depends upon the capability's type: -.RS 3 -.TP 5 -string -\fB@TPUT@\fP writes the string to the standard output. -No trailing newline is supplied. +\fB\%@TPUT@\fP uses the +.I \%term\%info +library and database to make terminal-specific capabilities and +information available to the shell, +to initialize or reset the terminal, +or +to report a description of the current +(or specified) +terminal type. +Terminal capabilities are accessed by +.IR cap-code . +.PP +\fB\%terminfo\fP(5) discusses terminal capabilities at length +and presents a complete list of +.IR cap-codes . +.PP +When retrieving capability values, +the result depends upon the capability's type. +.TP 9 \" "Boolean" + 2n +Boolean +\fB\%@TPUT@\fP sets its exit status to +.B 0 +if the terminal possesses +.IR cap-code , +and +.B 1 +if it does not. .TP -integer -\fB@TPUT@\fP writes the decimal value to the standard output, -with a trailing newline. +numeric +\fB\%@TPUT@\fP writes +.IR cap-code 's +decimal value to the standard output stream if defined +.RB ( \-1 +if it is not) +followed by a newline. .TP -boolean -\fB@TPUT@\fP simply sets the exit code -(\fB0\fP for TRUE if the terminal has the capability, -\fB1\fP for FALSE if it does not), -and writes nothing to the standard output. -.RE +string +\fB\%@TPUT@\fP writes +.IR cap-code 's +value to the standard output stream if defined, +without a trailing newline. .PP Before using a value returned on the standard output, -the application should test the exit code -(e.g., \fB$?\fP, see \fBsh\fP(1)) to be sure it is \fB0\fP. -(See the \fBEXIT CODES\fP and \fBDIAGNOSTICS\fP sections.) -For a complete list of capabilities -and the \fIcapname\fP associated with each, see \fBterminfo\fP(5). -.SS Options -.TP -\fB\-S\fP -allows more than one capability per invocation of \fB@TPUT@\fP. The -capabilities must be passed to \fB@TPUT@\fP from the standard input -instead of from the command line (see example). -Only one \fIcapname\fP is allowed per line. -The \fB\-S\fP option changes the -meaning of the \fB0\fP and \fB1\fP boolean and string exit codes (see the -EXIT CODES section). +the application should test \fB\%@TPUT@\fP's exit status +to be sure it is 0; +see section \*(``EXIT STATUS\*('' below. +.SS Operands +Generally, +an operand is a +.IR cap-code , +a capability code from the terminal database, +or a parameter thereto. +Three others are specially recognized by \fB\%@TPUT@\fP: +.BR init , +.BR \%reset , +and +.BR \%longname . +Although these resemble capability codes, +they in fact receive special handling; +we term them \*(``pseudo-capabilities\*(''. +.TP 11n \" "longname" + 2n + adjustment for PDF +.I cap-code +indicates a capability from the terminal database. .IP -Because some capabilities may use -\fIstring\fP parameters rather than \fInumbers\fP, -\fB@TPUT@\fP uses a table and the presence of parameters in its input -to decide whether to use \fBtparm\fP(3X), -and how to interpret the parameters. -.TP -\fB\-T\fP\fItype\fP -indicates the \fItype\fP of terminal. -Normally this option is -unnecessary, because the default is taken from the environment -variable \fBTERM\fP. -If \fB\-T\fP is specified, then the shell -variables \fBLINES\fP and \fBCOLUMNS\fP will also be ignored. -.TP -\fB\-V\fP -reports the version of ncurses which was used in this program, and exits. -.TP -.B \-x -do not attempt to clear the terminal's scrollback buffer -using the extended \*(``E3\*('' capability. -.SS Commands -A few commands (\fBinit\fP, \fBreset\fP and \fBlongname\fP) are -special; they are defined by the \fB@TPUT@\fP program. -The others are the names of \fIcapabilities\fP from the terminal database -(see \fBterminfo\fP(5) for a list). -Although \fBinit\fP and \fBreset\fP resemble capability names, -\fB@TPUT@\fP uses several capabilities to perform these special functions. -.TP -\fIcapname\fP -indicates the capability from the terminal database. -.IP -If the capability is a string that takes parameters, the arguments -following the capability will be used as parameters for the string. +If +.I cap-code +is of string type and takes parameters, +\fB\%@TPUT@\fP interprets arguments following +.I cap-code +as the parameters, +up to the (fixed) quantity the capability requires. .IP -Most parameters are numbers. +Most parameters are numeric. Only a few terminal capabilities require string parameters; -\fB@TPUT@\fP uses a table to decide which to pass as strings. -Normally \fB@TPUT@\fP uses \fBtparm\fP(3X) to perform the substitution. +\fB\%@TPUT@\fP uses a table to decide which to pass as strings. +Normally \fB\%@TPUT@\fP uses \fB\%tparm\fP(3X) to perform the +substitution. If no parameters are given for the capability, -\fB@TPUT@\fP writes the string without performing the substitution. +\fB\%@TPUT@\fP writes the string without performing the substitution. .TP -\fBinit\fP -If the terminal database is present and an entry for the user's -terminal exists (see \fB\-T\fP\fItype\fP, above), the following will -occur: +.B init +initializes the terminal. +If the terminal database is present +and an entry for the user's terminal type exists, +the following occur. .RS .TP 5 (1) -first, \fB@TPUT@\fP retrieves the current terminal mode settings -for your terminal. -It does this by successively testing +\fB\%@TPUT@\fP retrieves the terminal's mode settings. +It successively tests the file descriptors corresponding to .RS .bP -the standard error, +the standard error stream, .bP -standard output, +the standard output stream, .bP -standard input and +the standard input stream, +and .bP -ultimately \*(``/dev/tty\*('' +.I \%/dev/tty .RE .IP to obtain terminal settings. -Having retrieved these settings, \fB@TPUT@\fP remembers which -file descriptor to use when updating settings. +Having retrieved them, +\fB\%@TPUT@\fP remembers which descriptor to use for further updates. .TP (2) -if the window size cannot be obtained from the operating system, -but the terminal description (or environment, e.g., \fBLINES\fP -and \fBCOLUMNS\fP variables specify this), -update the operating system's notion of the window size. +If the terminal dimensions cannot be obtained from the operating system, +but the environment or terminal type database entry describes them, +\fB\%@TPUT@\fP updates the operating system's notion of them. .TP (3) -the terminal modes will be updated: +\fB\%@TPUT@\fP updates the terminal modes. .RS .bP -any delays (e.g., newline) specified in the entry will -be set in the tty driver, +Any delays specified in the entry +(for example, +when a newline is sent) +are set in the terminal driver. .bP -tabs expansion will be turned on or off according to -the specification in the entry, and +Tab expansion is turned on or off per the specification in the entry, +and .bP if tabs are not expanded, -standard tabs will be set (every 8 spaces). +standard tabs +(every 8 spaces) +are set. .RE .TP (4) -if present, the terminal's initialization strings will be -output as detailed in the \fBterminfo\fP(5) section on -.IR "Tabs and Initialization" , +If initialization capabilities, +detailed in subsection \*(``Tabs and Initialization\*('' of +\fB\%terminfo\fP(5), +are present, +\fB\%@TPUT@\fP writes them to the standard output stream. .TP (5) -output is flushed. +\fB\%@TPUT@\fP flushes the standard output stream. .RE .IP -If an entry does not -contain the information needed for any of these activities, -that activity will silently be skipped. +If an entry lacks the information needed for an activity above, +that activity is silently skipped. .TP -\fBreset\fP -This is similar to \fBinit\fP, with two differences: +.B reset +re-initializes the terminal. +A reset differs from initialization in two ways. .RS .TP 5 (1) -before any other initialization, -the terminal modes will be reset to a \*(``sane\*('' state: +\fB\%@TPUT@\fP sets the the terminal modes to a \*(``sane\*('' state, .RS .bP -set cooked and echo modes, +enabling cooked and echo modes, .bP -turn off cbreak and raw modes, +disabling cbreak and raw modes, .bP -turn on newline translation and +enabling newline translation, +and .bP -reset any unset special characters to their default values +setting any unset special characters to their default values. .RE .TP 5 (2) -Instead of putting out \fIinitialization\fP strings, the terminal's -\fIreset\fP strings will be output if present -(\fBrs1\fP, \fBrs2\fP, \fBrs3\fP, \fBrf\fP). -If the \fIreset\fP strings are not present, but \fIinitialization\fP -strings are, the \fIinitialization\fP strings will be output. +If any reset capabilities are defined for the terminal type, +\fB\%@TPUT@\fP writes them to the output stream. +Otherwise, +\fB\%@TPUT@\fP uses any defined initialization capabilities. +Reset capabilities are detailed in subsection +\*(``Tabs and Initialization\*('' of \fB\%terminfo\fP(5). .RE -.IP -Otherwise, \fBreset\fP acts identically to \fBinit\fP. .TP -\fBlongname\fP -If the terminal database is present and an entry for the -user's terminal exists (see \fB\-T\fP\fItype\fP 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 -\fBterminfo\fP database [see \fBterm\fP(5)]. -.SS Aliases -\fB@TPUT@\fP handles the \fBclear\fP, \fBinit\fP and \fBreset\fP -commands specially: -it allows for the possibility that it is invoked by a link with those names. -.PP -If \fB@TPUT@\fP is invoked by a link named \fBreset\fP, this has the -same effect as \fB@TPUT@ reset\fP. -The \fB@TSET@\fP(\*n) utility also treats a link named \fBreset\fP specially. -.PP -Before ncurses 6.1, the two utilities were different from each other: -.bP -\fB@TSET@\fP utility reset the terminal modes and special characters -(not done with \fB@TPUT@\fP). -.bP -On the other hand, \fB@TSET@\fP's repertoire of terminal capabilities for -resetting the terminal was more limited, -i.e., only \fBreset_1string\fP, \fBreset_2string\fP and \fBreset_file\fP -in contrast to the tab-stops and margins which are set by this utility. -.bP -The \fBreset\fP program is usually an alias for \fB@TSET@\fP, -because of this difference with resetting terminal modes and special characters. -.PP -With the changes made for ncurses 6.1, the \fIreset\fP feature of the -two programs is (mostly) the same. -A few differences remain: -.bP -The \fB@TSET@\fP program waits one second when resetting, -in case it happens to be a hardware terminal. -.bP -The two programs write the terminal initialization strings -to different streams (i.e., the standard error for \fB@TSET@\fP and the -standard output for \fB@TPUT@\fP). +.B longname +A +.I \%term\%info +entry begins with one or more names by which an application +can refer to the entry, +before the list of terminal capabilities. +The names are separated by \*(``|\*('' characters. +X/Open Curses terms the last name the \*(``long name\*('', +and indicates that it may include blanks. .IP -\fBNote:\fP 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. -.PP -If \fB@TPUT@\fP is invoked by a link named \fBinit\fP, this has the -same effect as \fB@TPUT@ init\fP. -Again, you are less likely to use that link because another program -named \fBinit\fP has a more well-established use. -.SS Terminal Size -.PP -Besides the special commands (e.g., \fBclear\fP), -@TPUT@ treats certain terminfo capabilities specially: -\fBlines\fP and \fBcols\fP. -@TPUT@ calls \fBsetupterm\fP(3X) to obtain the terminal size: -.bP -first, it gets the size from the terminal database -(which generally is not provided for terminal emulators -which do not have a fixed window size) -.bP -then it asks the operating system for the terminal's size -(which generally works, unless connecting via a serial line which -does not support \fINAWS\fP: negotiations about window size). -.bP -finally, it inspects the environment variables \fBLINES\fP and \fBCOLUMNS\fP -which may override the terminal size. +\fB\%@TIC@\fP warns if the last name does not include blanks, +to accommodate old +.I \%term\%info +entries that treated the long name as an optional feature. +The long name is often referred to as the description field. +.IP +If the terminal database is present and an entry for the user's terminal +type exists, +\fB\%@TPUT@\fP reports its description to the standard output stream, +without a trailing newline. +See \fB\%terminfo\fP(5). .PP -If the \fB\-T\fP option is given -@TPUT@ ignores the environment variables by calling \fBuse_tioctl(TRUE)\fP, -relying upon the operating system (or finally, the terminal database). -.SH EXAMPLES -.TP 5 -\fB@TPUT@ init\fP -Initialize the terminal according to the type of -terminal in the environmental variable \fBTERM\fP. This -command should be included in everyone's .profile after -the environmental variable \fBTERM\fP has been exported, as -illustrated on the \fBprofile\fP(5) manual page. -.TP 5 -\fB@TPUT@ \-T5620 reset\fP -Reset an AT&T 5620 terminal, overriding the type of -terminal in the environmental variable \fBTERM\fP. -.TP 5 -\fB@TPUT@ cup 0 0\fP -Send the sequence to move the cursor to row \fB0\fP, column \fB0\fP -(the upper left corner of the screen, usually known as the \*(``home\*('' -cursor position). -.TP 5 -\fB@TPUT@ clear\fP -Echo the clear-screen sequence for the current terminal. -.TP 5 -\fB@TPUT@ cols\fP -Print the number of columns for the current terminal. -.TP 5 -\fB@TPUT@ \-T450 cols\fP -Print the number of columns for the 450 terminal. -.TP 5 -\fBbold=`@TPUT@ smso` offbold=`@TPUT@ rmso`\fP -Set the shell variables \fBbold\fP, to begin stand-out mode -sequence, and \fBoffbold\fP, to end standout mode sequence, -for the current terminal. -This might be followed by a -prompt: \fBecho "${bold}Please type in your name: ${offbold}\\c"\fP -.TP 5 -\fB@TPUT@ hc\fP -Set exit code to indicate if the current terminal is a hard copy terminal. -.TP 5 -\fB@TPUT@ cup 23 4\fP -Send the sequence to move the cursor to row 23, column 4. -.TP 5 -\fB@TPUT@ cup\fP -Send the terminfo string for cursor-movement, with no parameters substituted. -.TP 5 -\fB@TPUT@ longname\fP -Print the long name from the \fBterminfo\fP database for the -type of terminal specified in the environmental -variable \fBTERM\fP. +.I Note: +Redirecting the output of +.RB \%\*(`` "@TPUT@ init" \*('' +or +.RB \%\*(`` "@TPUT@ reset" \*('' +to a file will capture only part of their actions. +Changes to the terminal modes are not affected by file descriptor +redirection, +since the terminal modes are altered via \fB\%ioctl\fP(2). +.SS Aliases +If \fB\%@TPUT@\fP is invoked via link with any of the names +.BR clear , +.BR init , +or +.BR \%reset , +it operates as if run with the corresponding (pseudo-)capability +operand. +For example, +executing a link named +.B \%reset +that points to \fB\%@TPUT@\fP has the same effect as +.RB \%\*(`` "@TPUT@ \%reset" \*(''. .PP -.RS 5 -\fB@TPUT@ \-S < clear\fP -.br -\fB> cup 10 10\fP -.br -\fB> bold\fP -.br -\fB> !\fP -.RE -.TP 5 -\& -This example shows \fB@TPUT@\fP 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 terminated by an exclamation mark (\fB!\fP) on a line by itself. -.SH FILES +This feature was introduced by +.I \%ncurses +5.2 in 2000. +It is rarely used: .TP -\fB\*d\fP -compiled terminal description database +.B \%clear +is a separate program, +which is both smaller and more frequently executed. .TP -\fB@DATADIR@/tabset/*\fP -tab settings for some terminals, in a format -appropriate to be output to the terminal (escape -sequences that set margins and tabs); for more -information, see the -.IR "Tabs and Initialization" , -section of \fBterminfo\fP(5) -.SH EXIT CODES -If the \fB\-S\fP option is used, -\fB@TPUT@\fP checks for errors from each line, -and if any errors are found, will set the exit code to 4 plus the -number of lines with errors. -If no errors are found, the exit code is \fB0\fP. -No indication of which line failed can be given so -exit code \fB1\fP will never appear. -Exit codes \fB2\fP, \fB3\fP, and -\fB4\fP retain their usual interpretation. -If the \fB\-S\fP option is not used, -the exit code depends on the type of \fIcapname\fP: -.RS 3 +.B init +has the same name as another program in widespread use. .TP -.I boolean -a value of \fB0\fP is set for TRUE and \fB1\fP for FALSE. +.B \%reset +is provided +by the \fB\%@TSET@\fP(1) utility (also via a link named +.BR \%reset ")." +.SS "Terminal Size" +Besides the pseudo-capabilities +(such as +.BR init ), +\fB\%@TPUT@\fP treats the +.B lines +and +.B cols +.I cap-codes +specially: +it may call \fB\%setupterm\fP(3X) to obtain the terminal size. +.bP +First, +\fB\%@TPUT@\fP attempts to obtain these capabilities from the terminal +database. +This generally fails for terminal emulators, +which lack a fixed window size and thus omit the capabilities. +.bP +It then asks the operating system for the terminal's size, +which generally works, +unless the connection is via a serial line that +does not support \*(``NAWS\*('': negotiations about window size. +.bP +Finally, +it inspects the environment variables +.I LINES +and +.IR \%COLUMNS , +which may override the terminal size. +.PP +If the +.B \-T +option is given, +\fB\%@TPUT@\fP ignores the environment variables by calling +.BR \%use_tioctl(TRUE) , +relying upon the operating system +(or, +ultimately, +the terminal database). +.SH OPTIONS +.TP 9n \" "-T type" + 2n +.B \-S +retrieves more than one capability per invocation of \fB\%@TPUT@\fP. +The capabilities must be passed to \fB\%@TPUT@\fP from the standard +input stream instead of from the command line +(see section \*(``EXAMPLES\*('' below). +Only one +.I cap-code +is allowed per line. +The +.B \-S +option changes the meanings of the +.B 0 +and +.B 1 +exit statuses +(see section \*(``EXIT STATUS\*('' below). +.IP +Some capabilities use string parameters rather than numeric ones. +\fB\%@TPUT@\fP employs a built-in table and the presence of parameters +in its input to decide how to interpret them, +and whether to use \fB\%tparm\fP(3X). .TP -.I string -a value of \fB0\fP is set if the -\fIcapname\fP is defined for this terminal \fItype\fP (the value of -\fIcapname\fP is returned on standard output); -a value of \fB1\fP is set if \fIcapname\fP -is not defined for this terminal \fItype\fP -(nothing is written to standard output). +.BI \-T\ type +indicates the terminal's +.IR type . +Normally this option is unnecessary, +because a default is taken from the +.I TERM +environment variable. +If specified, +the environment variables +.I LINES +and +.I \%COLUMNS +are also ignored. .TP -.I integer -a value of \fB0\fP is always set, -whether or not \fIcapname\fP is defined for this terminal \fItype\fP. -To determine if \fIcapname\fP is defined for this terminal \fItype\fP, -the user must test the value written to standard output. -A value of \fB\-1\fP -means that \fIcapname\fP is not defined for this terminal \fItype\fP. +.B \-V +reports the version of +.I \%ncurses +associated with \fB\%@TPUT@\fP, +and exits with a successful status. .TP -.I other -\fBreset\fP or \fBinit\fP may fail to find their respective files. -In that case, the exit code is set to 4 + \fBerrno\fP. -.RE -.PP -Any other exit code indicates an error; see the DIAGNOSTICS section. -.SH DIAGNOSTICS -\fB@TPUT@\fP prints the following error messages and sets the corresponding exit -codes. +.B \-x +prevents +.RB \%\*(`` "@TPUT@ clear" \*('' +from attempting to clear the scrollback buffer. +.SH EXIT STATUS +Normally, +one should interpret \fB\%@TPUT@\fP's exit statuses as follows. .PP -.ne 15 +.if n .ne 3 +.if t .ne 2 .TS -l l. -exit code error message -= -\fB0\fP T{ -(\fIcapname\fP is a numeric variable that is not specified in the -\fBterminfo\fP(5) database for this terminal type, e.g. -\fB@TPUT@ \-T450 lines\fP and \fB@TPUT@ \-Thp2621 xmc\fP) -T} -\fB1\fP no error message is printed, see the \fBEXIT CODES\fP section. -\fB2\fP usage error -\fB3\fP unknown terminal \fItype\fP or no \fBterminfo\fP database -\fB4\fP unknown \fBterminfo\fP capability \fIcapname\fP -\fB>4\fP error occurred in \-S -= +Lb Lb +Lb Lx. +Status Meaning When \-S Not Specified +_ +0 Boolean or string capability present +1 Boolean or numeric capability absent +2 usage error or no terminal type specified +3 unrecognized terminal type +4 unrecognized capability code +>4 system error (4 + \fBerrno\fP) .TE -.SH HISTORY -The \fBtput\fP command was begun by Bill Joy in 1980. -The initial version only cleared the screen. .PP -AT&T System V provided a different \fBtput\fP command: -.bP -SVr2 provided a rudimentary \fBtput\fP -which checked the parameter against each -predefined capability and returned the corresponding value. -This version of \fBtput\fP did not use \fBtparm\fP(3X) for -the capabilities which are parameterized. -.bP -SVr3 replaced that, a year later, by a more extensive program -whose \fBinit\fP and \fBreset\fP subcommands -(more than half the program) were incorporated from -the \fBreset\fP feature of BSD \fBtset\fP written by Eric Allman. -.bP -SVr4 added color initialization using the \fBorig_colors\fP and -\fBorig_pair\fP capabilities in the \fBinit\fP subcommand. -.PP -Keith Bostic replaced the BSD \fBtput\fP command in 1989 -with a new implementation -based on the AT&T System V program \fBtput\fP. -Like the AT&T program, Bostic's version -accepted some parameters named for \fIterminfo\fP capabilities -(\fBclear\fP, \fBinit\fP, \fBlongname\fP and \fBreset\fP). -However (because he had only \fItermcap\fP available), -it accepted \fItermcap\fP names for other capabilities. -Also, Bostic's BSD \fBtput\fP did not modify the terminal I/O modes -as the earlier BSD \fBtset\fP had done. +When the +.B \-S +option is used, +some statuses change meanings. .PP -At the same time, Bostic added a shell script named \*(``clear\*('', -which used \fBtput\fP to clear the screen. -.PP -Both of these appeared in 4.4BSD, -becoming the \*(``modern\*('' BSD implementation of \fBtput\fP. -.PP -This implementation of \fBtput\fP began from a different source than -AT&T or BSD: Ross Ridge's \fImytinfo\fP package, published on -\fIcomp.sources.unix\fP in December 1992. -Ridge's program made more sophisticated use of the terminal capabilities -than the BSD program. -Eric Raymond used that \fBtput\fP program -(and other parts of \fImytinfo\fP) 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. +.if n .ne 4 +.if t .ne 3 +.TS +Lb Lb +Lb Lx. +Status Meaning When \-S Specified +_ +0 all operands interpreted +1 unused +4 some operands not interpreted +.TE +.SH ENVIRONMENT +\fB@TPUT@\fP reads one environment variable. +.TP 8n \" "TERM" + 2n + adjustment for PDF +.I TERM +denotes the terminal type. +Each terminal type is distinct, +though many are similar. +The +.B \-T +option overrides its value. +.SH FILES +.TP +.I @DATADIR@/tabset +tab stop initialization database +.TP +.I \*d +compiled terminal description database .SH PORTABILITY -.PP -This implementation of \fBtput\fP differs from AT&T \fBtput\fP in -two important areas: -.bP -\fB@TPUT@\fP \fIcapname\fP 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. +Over time +.I \%ncurses +\fB\%@TPUT@\fP +has differed from that of System\ V in two important respects, +one now mostly historical. +.bP +\%\*(``\fB@TPUT@\fP +.IR cap-code \*('' +writes to the standard output, +which need not be a terminal device. +However, +the operands that manipulate terminal modes might not use the standard +output. .IP -The AT&T implementation's \fBinit\fP and \fBreset\fP commands -use the BSD (4.1c) \fBtset\fP 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. +System\ V +.BR tput 's +.B init +and +.B \%reset +operands use logic from 4.1cBSD +.BR tset , +manipulating terminal modes. +It checks the same file descriptors +(and +.IR \%/dev/tty ) +for association with a terminal device as +.I \%ncurses +now does, +and if none are, +finally assumes a 1200 baud terminal. +When updating terminal modes, +it ignores errors. .IP -Until changes made after ncurses 6.0, -\fB@TPUT@\fP did not modify terminal modes. -\fB@TPUT@\fP now uses a similar scheme, -using functions shared with \fB@TSET@\fP -(and ultimately based on the 4.4BSD \fBtset\fP). -If it is not able to open a terminal, e.g., when running in \fBcron\fP(1), -\fB@TPUT@\fP will return an error. -.bP -AT&T \fBtput\fP guesses the type of its \fIcapname\fP operands by seeing if -all of the characters are numeric, or not. +Until +.I \%ncurses +6.1 +(see section \*(``HISTORY\*('' below), +\fB\%@TPUT@\fP did not modify terminal modes. +It now employs a scheme similar to System\ V, +using functions shared with \fB\%@TSET@\fP +(and ultimately based on 4.4BSD +.BR tset ). +If it is not able to open a terminal +(for instance, +when run by \fIcron\fP(1)), +\fB\%@TPUT@\fP exits with an error status. +.bP +System\ V +.B tput +assumes that the type of a +.I cap-code +operand is numeric if all the characters of its value are decimal +numbers; +if they are not, +it treats +.I cap-code +as a string capability. .IP -Most implementations which provide support for \fIcapname\fP operands -use the \fBtparm\fP function to expand parameters in it. +Most implementations that provide support for +.I cap-code +operands use the \fB\%tparm\fP(3X) function to expand its parameters. That function expects a mixture of numeric and string parameters, -requiring \fB@TPUT@\fP to know which type to use. +requiring \fB\%@TPUT@\fP to know which type to use. .IP -This implementation uses a table to determine the parameter types for -the standard \fIcapname\fP operands, and an internal library -function to analyze nonstandard \fIcapname\fP operands. +.I \%ncurses +\fB\%@TPUT@\fP +uses a table to determine the parameter types for +the standard +.I cap-code +operands, +and an internal function to analyze nonstandard +.I cap-code +operands. .IP -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 \fBtput\fP to terminfo. -That had been modified to interpret multiple commands on a line. +While more reliable than System\ V's utility, +a portability problem is introduced by this analysis. +An OpenBSD developer adapted the internal library function from +.I \%ncurses +to port NetBSD's +.IR termcap -based +.B tput +to +.IR \%term\%info , +and modified it to interpret multiple +.I cap-codes +(and parameters) +on the command line. Portable applications should not rely upon this feature; -ncurses provides it to support applications written -specifically for OpenBSD. +.I \%ncurses +offers it to support applications written specifically for OpenBSD. .PP -This implementation (unlike others) can accept both \fItermcap\fP -and \fIterminfo\fP names for the \fIcapname\fP feature, +This implementation, +unlike others, +accepts both +.I termcap +and +.I \%term\%info +.I cap-codes if -\fItermcap\fP support is compiled in. -However, the predefined \fItermcap\fP and \fIterminfo\fP names have two -ambiguities in this case (and the \fIterminfo\fP name is assumed): -.bP -The \fItermcap\fP name \fBdl\fP corresponds to -the \fIterminfo\fP name \fBdl1\fP (delete one line). -.br -The \fIterminfo\fP name \fBdl\fP corresponds to -the \fItermcap\fP name \fBDL\fP (delete a given number of lines). -.bP -The \fItermcap\fP name \fBed\fP corresponds to -the \fIterminfo\fP name \fBrmdc\fP (end delete mode). -.br -The \fIterminfo\fP name \fBed\fP corresponds to -the \fItermcap\fP name \fBcd\fP (clear to end of screen). +.I termcap +support is compiled in. +In that case, +however, +the predefined +.I termcap +and +.I \%term\%info +codes have two +ambiguities; +.I \%ncurses +assumes the +.I \%term\%info +code. +.bP +The +.I cap-code +.B dl +means +.B \%delete_line +to +.I termcap +but +.B \%parm_delete_line +to +.IR \%term\%info . +.I termcap +uses the code +.B DL +for +.BR \%parm_delete_line . +.I \%term\%info +uses the code +.B dl1 +for +.BR \%delete_line . +.bP +The +.I cap-code +.B ed +means +.B \%exit_delete_mode +to +.I termcap +but +.B \%clr_eos +to +.IR \%term\%info . +.I termcap +uses the code +.B cd +for +.BR \%clr_eos . +.I \%term\%info +uses the code +.B rmdc +for +.BR \%exit_delete_mode . .PP -The \fBlongname\fP and \fB\-S\fP options, and the parameter-substitution -features used in the \fBcup\fP example, -were not supported in BSD curses before 4.3reno (1989) or in -AT&T/USL curses before SVr4 (1988). +The +.B \%longname +operand, +.B \-S +option, +and the parameter-substitution features used in the +.B cup +example below, +were not supported in +AT&T/USL +.I curses +before SVr4 (1989). +Later, +4.3BSD-Reno (1990) added support for +.BR \%longname , +.\" longname was added in October 1989. +and in 1994, +NetBSD added support for the parameter-substitution features. .PP -IEEE Std 1003.1/The Open Group Base Specifications Issue 7 (POSIX.1-2008) -documents only the operands for \fBclear\fP, \fBinit\fP and \fBreset\fP. -There are a few interesting observations to make regarding that: -.bP -In this implementation, \fBclear\fP is part of the \fIcapname\fP support. -The others (\fBinit\fP and \fBlongname\fP) do not correspond to terminal -capabilities. -.bP -Other implementations of \fBtput\fP on -SVr4-based systems such as Solaris, IRIX64 and HPUX -as well as others such as AIX and Tru64 -provide support for \fIcapname\fP operands. -.bP -A few platforms such as FreeBSD recognize termcap names rather -than terminfo capability names in their respective \fBtput\fP commands. -Since 2010, NetBSD's \fBtput\fP uses terminfo names. -Before that, it (like FreeBSD) recognized termcap names. +IEEE Std 1003.1/The Open Group Base Specifications Issue 7 +(POSIX.1-2008) +documents only the +.BR clear , +.BR init , +and +.B \%reset +operands. +A few observations of interest arise from that selection. +.bP +.I \%ncurses +supports +.B clear +as it does any other standard +.IR cap-code . +The others +.RB ( init +and +.BR \%longname ) +do not correspond to terminal capabilities. +.bP +The +.B tput +on SVr4-based systems such as Solaris, +IRIX64, +and HP-UX, +as well as others such as AIX and Tru64, +also support standard +.I cap-code +operands. +.bP +A few platforms such as FreeBSD recognize +.I termcap +codes rather than +.I \%term\%info +capability codes in their respective +.B tput +commands. +Since 2010, +NetBSD's +.B tput +uses +.I \%term\%info +codes. +Before that, +it +(like FreeBSD) +recognized +.I termcap +codes. .IP -Beginning in 2021, FreeBSD uses the ncurses \fBtput\fP, -configured for both terminfo (tested first) and termcap (as a fallback). +Beginning in 2021, +FreeBSD uses +.I \%ncurses +.BR tput , +configured for both +.I \%term\%info +(tested first) +and +.I termcap +(as a fallback). .PP -Because (apparently) \fIall\fP of the certified Unix systems -support the full set of capability names, the reasoning for documenting -only a few may not be apparent. -.bP -X/Open Curses Issue 7 documents \fBtput\fP differently, with \fIcapname\fP +Because (apparently) all +.I certified +Unix systems support the full set of capability codes, +the reason for documenting only a few may not be apparent. +.bP +X/Open Curses Issue 7 documents +.B tput +differently, +with +.I cap-code and the other features used in this implementation. .bP -That is, there are two standards for \fBtput\fP: +That is, +there are two standards for +.BR 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 terminal capabilities database. -.bP -While it is certainly possible to write a \fBtput\fP program -without using curses, -none of the systems which have a curses implementation provide -a \fBtput\fP utility which does not provide the \fIcapname\fP feature. +POSIX documents a subset to avoid the complication of including +X/Open Curses and the terminal capability database. +.bP +While it is certainly possible to write a +.B tput +program without using +.IR curses , +no system with a +.I curses +implementation provides a +.B tput +utility that does not also support standard +.IR cap-codes . .PP 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): -.bP -It assigns exit code 4 to \*(``invalid operand\*('', -which may be the same as \fIunknown capability\fP. -For instance, the source code for Solaris' xcurses uses the term -\*(``invalid\*('' in this case. -.bP -It assigns exit code 255 to a numeric variable that is not specified in -the terminfo database. +(that is, +System\ V +.I curses +behavior). +.bP +It assigns exit status 4 to \*(``invalid operand\*('', +which may have the same meaning as \*(``unknown capability\*(''. +For instance, +the source code for +Solaris +.I xcurses +uses the term \*(``invalid\*('' in this case. +.bP +It assigns exit status 255 to a numeric variable that is not specified +in the +.I \%term\%info +database. That likely is a documentation error, -confusing the \fB\-1\fP written to the standard output for an absent -or cancelled numeric value versus an (unsigned) exit code. +mistaking the \*(``\-1\*('' written to the standard output to indicate +an absent or cancelled numeric capability for an (unsigned) exit status. .PP -The various Unix systems (AIX, HPUX, Solaris) use the same exit-codes -as ncurses. +The various System\ V implementations +(AIX, +HP-UX, +Solaris) +use the same exit statuses as +.IR \%ncurses . .PP -NetBSD curses documents different exit codes which do not correspond -to either ncurses or X/Open. -.SH SEE ALSO -\fB@CLEAR@\fP(\*n), -\fBstty\fP(1), -\fB@TABS@\fP(\*n), -\fB@TSET@\fP(\*n), -\fBcurs_termcap\fP(3X), -\fBterminfo\fP(5). +NetBSD +.I curses +documents exit statuses that correspond to neither +.I \%ncurses +nor X/Open Curses. +.SH HISTORY +Bill Joy wrote a +.B tput +command during development of 4BSD in October 1980. +This initial version only cleared the screen, +and did not ship with official distributions. +.\" It also exited with backwards exit status (1 on success, 0 on +.\" failure), and was characterized by Bostic in 1988 as "pretty +.\" unreasonable". +.\" See Spinellis's "unix-history-repo" on GitHub. +.PP +System\ V developed a different +.B tput +command. +.bP +SVr2 (1984) provided a rudimentary +.B tput +that checked the parameter against each +predefined capability and returned the corresponding value. +This version of +.B tput +did not use \fB\%tparm\fP(3X) for parameterized capabilities. +.bP +SVr3 (1987) replaced that +.\" SVr3 released in 1987, not 1985. +.\" https://unix.org/what_is_unix/history_timeline.html +with a more extensive program +whose support for +.B init +and +.B \%reset +operands +(more than half the program) +incorporated the +.B \%reset +feature of BSD +.B tset +written by Eric Allman. +.bP +SVr4 (1989) added color initialization by using the +.B \%orig_colors +.RB ( oc ) +and +.B \%orig_pair +.RB ( op ) +capabilities in its +.B init +logic. .PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +Keith Bostic refactored BSD +.B tput +for shipment in 4.3BSD-Tahoe (1988), +then replaced it the next year with a new implementation based on +System\ V +.BR tput . +Bostic's version similarly accepted some parameters named for +.I \%term\%info +(pseudo-)capabilities: +.BR clear , +.BR init , +.BR \%longname , +and +.BR \%reset . +However, +because he had only +.I termcap +available, +it accepted +.I termcap +codes for other capabilities. +Also, +Bostic's BSD +.B tput +did not modify the terminal modes as the earlier BSD +.B tset +had done. +.PP +At the same time, +Bostic added a shell script named \*(``clear\*('' that used +.B tput +to clear the screen. +Both of these appeared in 4.4BSD, +becoming the \*(``modern\*('' BSD implementation of +.BR tput . +.PP +The origin of +.I \%ncurses +\fB\%@TPUT@\fP lies outside both System\ V and BSD, +in Ross Ridge's +.I \%mytinfo +package, +published on +.I 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 +.B tput +program +(and other parts of +.IR \%mytinfo ) +in +.I \%ncurses +in June 1995. +Incorporating the portions dealing with terminal capabilities +almost without change, +Raymond made improvements to the way command-line parameters +were handled. +.PP +Before +.I \%ncurses +6.1 (2018), +its \fB\%@TSET@\fP and \fB\%@TPUT@\fP utilities differed. +.bP +\fB\%@TSET@\fP was more effective, +resetting the terminal modes and special characters. +.bP +On the other hand, +\fB\%@TSET@\fP's repertoire of terminal capabilities for resetting the +terminal was more limited; +it had only equivalents of +.B \%reset_1string +.RB ( rs1 ), +.B \%reset_2string +.RB ( rs2 ), +and +.B \%reset_file +.RB ( rf ), +and not the tab stop and margin update features of \fB\%@TPUT@\fP. +.PP +The +.B \%reset +program is traditionally an alias for \fB\%@TSET@\fP due to its ability +to reset terminal modes and special characters. +.PP +As of +.I \%ncurses +6.1, +the \*(``reset\*('' features of the two programs are (mostly) the same. +Two minor differences remain. +.bP +The \fB\%@TSET@\fP program waits one second when resetting, +in case the terminal happens to be a hardware device. +.bP +The two programs write the terminal initialization strings +to different streams; +that is, +standard error for \fB\%@TSET@\fP and +standard output for \fB\%@TPUT@\fP. +.SH EXAMPLES +.TP +.B "@TPUT@ init" +Initialize the terminal according to the type of +terminal in the +.I TERM +environment variable. +If the system does not reliably initialize the terminal upon login, +this command can be included in +.I \%$HOME/.profile +after exporting the +.I TERM +environment variable. +.TP +.B "@TPUT@ \-T5620 reset" +Reset an AT&T 5620 terminal, +overriding the terminal type in the +.I TERM +environment variable. +.TP +.B "@TPUT@ cnorm" +Set cursor to normal visibility. +.TP +.B "@TPUT@ home" +Move the cursor to row 0, +column 0: +the upper left corner of the screen, +usually known as the \*(``home\*('' cursor position. +.TP +.B "@TPUT@ clear" +Clear the screen: +write the +.B \%clear_screen +capability's value to the standard output stream. +.TP +.B "@TPUT@ cols" +Report the number of columns used by the current terminal type. +.TP +.B "@TPUT@ \-Tadm3a cols" +Report the number of columns used by an ADM-3A terminal. +.TP +.B "strong=\(ga@TPUT@ smso\(ga normal=\(ga@TPUT@ rmso\(ga" +Set shell variables to capability values: +.B strong +and +.BR normal , +to begin and end, +respectively, +stand-out mode for the terminal. +One might use these to present a prompt. +.IP +.EX +.RS 14 +printf "${strong}Username:${normal} " +.RE +.EE +.TP +.B "@TPUT@ hc" +Indicate via exit status whether the terminal is a hard copy device. +.TP +.B "@TPUT@ cup 23 4" +Move the cursor to row 23, +column 4. +.TP +.B "@TPUT@ cup" +Report the value of the +.B \%cursor_address +.RB ( cup ) +capability +(used for cursor movement), +with no parameters substituted. +.TP +.B "@TPUT@ longname" +Report the +.I \%term\%info +database's description of the terminal type specified in the +.I TERM +environment variable. +.TP +.B "@TPUT@ \-S" +Process multiple capabilities. +The +.B \-S +option can be profitably used with a shell \*(``here document\*(''. +.IP +.EX +.RB $\ "@TPUT@ \-S <\ clear +.RB >\ "cup 10 10" +.RB >\ bold +.RB >\ ! +.EE +.IP +The foregoing +clears the screen, +moves the cursor to position +(10, 10) +and turns on bold +(extra bright) +mode. +.TP +.B "@TPUT@ clear cup 10 10 bold" +Perform the same actions as the foregoing +.RB \%\*(`` "@TPUT@ \-S" \*('' +example. +.SH SEE ALSO +\fB\%@CLEAR@\fP(1), +\fB\%stty\fP(1), +\fB\%@TABS@\fP(1), +\fB\%@TSET@\fP(1), +\fB\%curs_termcap\fP(3X), +\fB\%terminfo\fP(5) diff --git a/man/tset.1 b/man/tset.1 index 547fb862..d64f9850 100644 --- a/man/tset.1 +++ b/man/tset.1 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,24 +27,37 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tset.1,v 1.61 2021/12/25 21:27:03 tom Exp $ -.TH @TSET@ 1 "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: tset.1,v 1.83 2024/04/20 19:09:08 tom Exp $ +.TH @TSET@ 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.ds ^ \(ha +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.ds ^ ^ +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. +. +.ds d @TERMINFO@ .SH NAME -\fB@TSET@\fP, \fB@RESET@\fP \- terminal initialization +\fB\%@TSET@\fP, +\fB\%@RESET@\fP \- +initialize or reset terminal state .SH SYNOPSIS -\fB@TSET@\fP [\fB\-IQVcqrsw\fP] [\fB\-\fP] [\fB\-e\fP \fIch\fP] [\fB\-i\fP \fIch\fP] [\fB\-k\fP \fIch\fP] [\fB\-m\fP \fImapping\fP] [\fIterminal\fP] +\fB@TSET@\fP [\fB\-IQVcqrsw\fP] [\fB\-\fP] [\fB\-e\fP \fIch\fP] [\fB\-i\fP \fIch\fP] [\fB\-k\fP \fIch\fP] [\fB\-m\fP \fImapping\fP] [\fIterminal-type\fP] .br -\fB@RESET@\fP [\fB\-IQVcqrsw\fP] [\fB\-\fP] [\fB\-e\fP \fIch\fP] [\fB\-i\fP \fIch\fP] [\fB\-k\fP \fIch\fP] [\fB\-m\fP \fImapping\fP] [\fIterminal\fP] +\fB@RESET@\fP [\fB\-IQVcqrsw\fP] [\fB\-\fP] [\fB\-e\fP \fIch\fP] [\fB\-i\fP \fIch\fP] [\fB\-k\fP \fIch\fP] [\fB\-m\fP \fImapping\fP] [\fIterminal-type\fP] .SH DESCRIPTION -.SS tset - initialization +.SS "\fItset\fP \(em initialization" This program initializes terminals. .PP First, \fB@TSET@\fP retrieves the current terminal mode settings @@ -68,20 +81,20 @@ This determination is done as follows, using the first terminal type found. .PP 1. The \fBterminal\fP argument specified on the command line. .PP -2. The value of the \fBTERM\fP environmental variable. +2. The value of the \fITERM\fP environment variable. .PP 3. (BSD systems only.) The terminal type associated with the standard error output device in the \fI/etc/ttys\fP file. -(On System\-V-like UNIXes and systems using that convention, -\fBgetty\fP(1) does this job by setting -\fBTERM\fP according to the type passed to it by \fI/etc/inittab\fP.) +(On System\ V hosts and systems using that convention, +\fI\%getty\fP(8) does this job by setting +\fITERM\fP according to the type passed to it by \fI\%/etc/inittab\fP.) .PP -4. The default terminal type, \*(``unknown\*(''. +4. The default terminal type, \*(``unknown\*('', +is not suitable for curses applications. .PP If the terminal type was not specified on the command-line, the \fB\-m\fP -option mappings are then applied (see the section -.B TERMINAL TYPE MAPPING -for more information). +option mappings are then applied; +see subsection \*(``Terminal Type Mapping\*(''. Then, if the terminal type begins with a question mark (\*(``?\*(''), the user is prompted for confirmation of the terminal type. An empty @@ -98,8 +111,10 @@ if the \*(``\fB\-w\fP\*('' option is enabled, \fB@TSET@\fP may update the terminal's window size. .IP If the window size cannot be obtained from the operating system, -but the terminal description (or environment, e.g., \fBLINES\fP -and \fBCOLUMNS\fP variables specify this), +but the terminal description +(or environment, +e.g., +\fILINES\fP and \fI\%COLUMNS\fP variables specify this), use this to set the operating system's notion of the window size. .bP if the \*(``\fB\-c\fP\*('' option is enabled, @@ -114,8 +129,7 @@ and \fB@TSET@\fP waits one second (in case a hardware reset was issued). Finally, if the erase, interrupt and line kill characters have changed, or are not set to their default values, their values are displayed to the standard error output. -.SS reset - reinitialization -.PP +.SS "\fIreset\fP \(em reinitialization" When invoked as \fB@RESET@\fP, \fB@TSET@\fP sets the terminal modes to \*(``sane\*('' values: .bP @@ -137,93 +151,35 @@ after a program dies leaving a terminal in an abnormal state: .bP you may have to type .sp - \fI\fP\fB@RESET@\fP\fI\fP + \fI\fB@RESET@\fI\fR .sp (the line-feed character is normally control-J) to get the terminal to work, as carriage-return may no longer work in the abnormal state. .bP Also, the terminal will often not echo the command. -.SH OPTIONS -.PP -The options are as follows: -.TP 5 -.B \-c -Set control characters and modes. -.TP 5 -.BI \-e\ ch -Set the erase character to \fIch\fP. -.TP -.B \-I -Do not send the terminal or tab initialization strings to the terminal. -.TP -.BI \-i\ ch -Set the interrupt character to \fIch\fP. -.TP -.BI \-k\ ch -Set the line kill character to \fIch\fP. -.TP -.BI \-m\ mapping -Specify a mapping from a port type to a terminal. -See the section -.B TERMINAL TYPE MAPPING -for more information. -.TP -.B \-Q -Do not display any values for the erase, interrupt and line kill characters. -Normally \fB@TSET@\fP displays the values for control characters which -differ from the system's default values. -.TP -.B \-q -The terminal type is displayed to the standard output, and the terminal is -not initialized in any way. -The option \*(``\-\*('' by itself is equivalent but archaic. -.TP -.B \-r -Print the terminal type to the standard error output. -.TP -.B \-s -Print the sequence of shell commands to initialize the environment variable -\fBTERM\fP to the standard output. -See the section -.B SETTING THE ENVIRONMENT -for details. -.TP -.B \-V -reports the version of ncurses which was used in this program, and exits. -.TP -.B \-w -Resize the window to match the size deduced via \fBsetupterm\fP(3X). -Normally this has no effect, -unless \fBsetupterm\fP is not able to detect the window size. -.PP -The arguments for the \fB\-e\fP, \fB\-i\fP, and \fB\-k\fP -options may either be entered as actual characters -or by using the \*(``hat\*('' -notation, i.e., control-h may be specified as \*(``^H\*('' or \*(``^h\*(''. -.PP -If neither \fB\-c\fP or \fB\-w\fP is given, both options are assumed. -. -.SH SETTING THE ENVIRONMENT +.SS "Setting the Environment" It is often desirable to enter the terminal type and information about the terminal's capabilities into the shell's environment. This is done using the \fB\-s\fP option. .PP When the \fB\-s\fP option is specified, the commands to enter the information into the shell's environment are written to the standard output. -If -the \fBSHELL\fP environmental variable ends in \*(``csh\*('', the commands -are for \fBcsh\fP, otherwise, they are for \fBsh\fP(1). -Note, the \fBcsh\fP commands set and unset the shell variable -\fBnoglob\fP, leaving it unset. +If the \fISHELL\fP environment variable ends in \*(``csh\*('', +the commands +are for \fIcsh\fP(1), +otherwise, +they are for \fIsh\fP(1). +The \fIcsh\fP commands set and unset the shell variable \fBnoglob\fP, +leaving it unset. The following line in the \fB.login\fP or \fB.profile\fP files will initialize the environment correctly: .sp - eval \`@TSET@ \-s options ... \` + eval \(ga@TSET@ \-s options ... \(ga . -.SH TERMINAL TYPE MAPPING +.SS "Terminal Type Mapping" When the terminal is not hardwired into the system (or the current system information is incorrect) the terminal type derived from the -\fI/etc/ttys\fP file or the \fBTERM\fP environmental variable is often +\fI/etc/ttys\fP file or the \fITERM\fP environment variable is often something generic like \fBnetwork\fP, \fBdialup\fP, or \fBunknown\fP. When \fB@TSET@\fP is used in a startup script it is often desirable to provide information about the type of terminal used on such ports. @@ -280,43 +236,92 @@ terminal. No whitespace characters are permitted in the \fB\-m\fP option argument. Also, to avoid problems with meta-characters, it is suggested that the entire \fB\-m\fP option argument be placed within single quote characters, -and that \fBcsh\fP users insert a backslash character (\*(``\e\*('') before -any exclamation marks (\*(``!\*(''). -.SH HISTORY -.PP -A \fBreset\fP command appeared in 1BSD (March 1978), written by Kurt Shoens. -This program set the \fIerase\fP and \fIkill\fP characters -to \fB^H\fP (backspace) and \fB@\fP respectively. -Mark Horton improved that in 3BSD (October 1979), adding -\fIintr\fP, \fIquit\fP, \fIstart\fP/\fIstop\fP and \fIeof\fP characters -as well as changing the program to avoid modifying any user settings. -That version of \fBreset\fP did not use the termcap database. -.PP -A separate \fBtset\fP 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. -.PP -According to comments in the source code, -the \fBtset\fP program was modified in September 1980, -to use logic copied from the 3BSD \*(``reset\*('' -when it was invoked as \fBreset\fP. -This version appeared in 4.1cBSD, late in 1982. -.PP -Other developers (e.g., Keith Bostic and Jim Bloom) -continued to modify \fBtset\fP until 4.4BSD was released in 1993. +and that \fIcsh\fP users insert a backslash character (\*(``\e\*('') +before any exclamation marks (\*(``!\*(''). +.SH OPTIONS +The options are as follows: +.TP 5 +.B \-c +Set control characters and modes. +.TP 5 +.BI \-e\ ch +Set the erase character to \fIch\fP. +.TP +.B \-I +Do not send the terminal or tab initialization strings to the terminal. +.TP +.BI \-i\ ch +Set the interrupt character to \fIch\fP. +.TP +.BI \-k\ ch +Set the line kill character to \fIch\fP. +.TP +.BI \-m\ mapping +Specify a mapping from a port type to a terminal; +see subsection \*(``Terminal Type Mapping\*(''. +.TP +.B \-Q +Do not display any values for the erase, interrupt and line kill characters. +Normally \fB@TSET@\fP displays the values for control characters which +differ from the system's default values. +.TP +.B \-q +The terminal type is displayed to the standard output, and the terminal is +not initialized in any way. +The option \*(``\-\*('' by itself is equivalent but archaic. +.TP +.B \-r +Print the terminal type to the standard error output. +.TP +.B \-s +Print the sequence of shell commands to initialize the environment variable +\fITERM\fP to the standard output; +see subsection \*(``Setting the Environment\*(''. +.TP +.B \-V +reports the version of \fI\%ncurses\fP which was used in this program, +and exits. +.TP +.B \-w +Resize the window to match the size deduced via \fBsetupterm\fP(3X). +Normally this has no effect, +unless \fBsetupterm\fP is not able to detect the window size. .PP -The \fBncurses\fP implementation -was lightly adapted from the 4.4BSD sources for a terminfo environment by Eric -S. Raymond . -.SH COMPATIBILITY +The arguments for the \fB\-e\fP, \fB\-i\fP, and \fB\-k\fP +options may either be entered as actual characters +or by using the \*(``hat\*('' +notation, i.e., control-h may be specified as \*(``\*^H\*('' or \*(``\*^h\*(''. .PP +If neither \fB\-c\fP or \fB\-w\fP is given, both options are assumed. +.SH ENVIRONMENT +The \fB@TSET@\fP command uses these environment variables: +.TP 5 +.I SHELL +tells \fB@TSET@\fP whether to initialize \fITERM\fP using \fIsh\fP(1) or +\fIcsh\fP(1) syntax. +.TP 5 +.I TERM +Denotes your terminal type. +Each terminal type is distinct, though many are similar. +.TP 5 +.I TERMCAP +may denote the location of a termcap database. +If it is not an absolute pathname, e.g., begins with a \*(``/\*('', +\fB@TSET@\fP removes the variable from the environment before looking +for the terminal description. +.SH FILES +.TP +.I /etc/ttys +system port name to terminal type mapping database (BSD versions only). +.TP +.I \*d +compiled terminal description database directory +.SH PORTABILITY Neither IEEE Std 1003.1/The Open Group Base Specifications Issue 7 (POSIX.1-2008) nor X/Open Curses Issue 7 documents \fB@TSET@\fP or \fB@RESET@\fP. .PP -The AT&T \fBtput\fP utility (AIX, HPUX, Solaris) +The AT&T \fBtput\fP utility (AIX, HP-UX, Solaris) incorporated the terminal-mode manipulation as well as termcap-based features such as resetting tabstops from \fBtset\fP in BSD (4.1c), presumably with the intention of making \fBtset\fP obsolete. @@ -324,21 +329,24 @@ However, each of those systems still provides \fBtset\fP. In fact, the commonly-used \fBreset\fP utility is always an alias for \fBtset\fP. .PP -The \fB@TSET@\fP utility provides for backward-compatibility with BSD -environments (under most modern UNIXes, \fB/etc/inittab\fP and \fBgetty\fP(1) -can set \fBTERM\fP appropriately for each dial-up line; this obviates what was -\fB@TSET@\fP's most important use). -This implementation behaves like 4.4BSD -\fBtset\fP, with a few exceptions specified here. +The \fB\%@TSET@\fP utility provides backward compatibility with BSD +environments; +under most modern Unices, +\fI\%/etc/inittab\fP and \fI\%getty\fP(8) can set \fITERM\fP +appropriately for each dial-up line, +obviating what was \fB\%@TSET@\fP's most important use. +This implementation behaves like 4.4BSD \fBtset\fP, +with a few exceptions we shall consider now. .PP A few options are different -because the \fBTERMCAP\fP variable -is no longer supported under terminfo-based \fBncurses\fP: +because the \fI\%TERMCAP\fP variable +is no longer supported under terminfo-based \fI\%ncurses\fP: .bP The \fB\-S\fP option of BSD \fBtset\fP no longer works; it prints an error message to the standard error and dies. .bP -The \fB\-s\fP option only sets \fBTERM\fP, not \fBTERMCAP\fP. +The \fB\-s\fP option only sets \fITERM\fP, +not \fI\%TERMCAP\fP. .PP There was an undocumented 4.4BSD feature that invoking \fBtset\fP via a link named @@ -382,57 +390,75 @@ In 4.4BSD, \fBtset\fP uses the window size from the termcap description to set the window size if \fBtset\fP is not able to obtain the window size from the operating system. .bP -In ncurses, \fB@TSET@\fP obtains the window size using +In \fI\%ncurses\fP, \fB@TSET@\fP obtains the window size using \fBsetupterm\fP, which may be from the operating system, -the \fBLINES\fP and \fBCOLUMNS\fP environment variables or +the \fILINES\fP and \fICOLUMNS\fP environment variables or the terminal description. .PP -Obtaining the window size from the terminal description is common to -both implementations, but considered obsolescent. +Obtaining the window size from a terminal's type 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 \fBsetupterm\fP would still fail). -For that reason, the \fBLINES\fP and \fBCOLUMNS\fP 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 \fBresize\fP(1) program. -.SH ENVIRONMENT -The \fB@TSET@\fP command uses these environment variables: -.TP 5 -SHELL -tells \fB@TSET@\fP whether to initialize \fBTERM\fP using \fBsh\fP(1) or -\fBcsh\fP(1) syntax. -.TP 5 -TERM -Denotes your terminal type. -Each terminal type is distinct, though many are similar. -.TP 5 -TERMCAP -may denote the location of a termcap database. -If it is not an absolute pathname, e.g., begins with a \*(``/\*('', -\fB@TSET@\fP removes the variable from the environment before looking -for the terminal description. -.SH FILES -.TP 5 -/etc/ttys -system port name to terminal type mapping database (BSD versions only). -.TP -@TERMINFO@ -terminal capability database +Generally, +the window size will remain uninitialized only if there were a problem +obtaining the value from the operating system +(and \fB\%setupterm\fP would still fail). +The \fILINES\fP and \fI\%COLUMNS\fP environment variables +may thus be useful for working around window-size problems, +but have the drawback that if the window is resized, +their values must be recomputed and reassigned. +The \fI\%resize\fP(1) program distributed with +\fI\%xterm\fP(1) assists this activity. +.SH HISTORY +A \fB\%reset\fP command written by Kurt Shoens appeared in 1BSD +(March 1978). +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/reset.c +It set the \fIerase\fP and \fIkill\fP characters +to \fB\*^H\fP (backspace) and \fB@\fP respectively. +Mark Horton improved this \fB\%reset\fP in 3BSD +(October 1979), +adding \fIintr\fP, +\fIquit\fP, +\fIstart\fP/\fIstop\fP, +and \fIeof\fP +characters as well as changing the program to avoid modifying any user +settings. +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/cmd/\ +.\" reset.c +That version of \fB\%reset\fP did not use \fI\%termcap\fP. +.PP +Eric Allman wrote a distinct \fBtset\fP command for 1BSD, +using a forerunner of \fI\%termcap\fP called \fI\%ttycap\fP. +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/tset.c +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/man7/ttycap.7 +Allman's comments in the source code indicate +that he began work in October 1977, +continuing development over the next few years. +By late 1979, +it had migrated to \fI\%termcap\fP and handled the \fI\%TERMCAP\fP +variable. +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/cmd/\ +.\" tset/tset.c +Later comments indicate that \fBtset\fP was modified in September 1980 +to use logic copied from the 3BSD \*(``reset\*('' program when it was +invoked as \fB\%reset\fP. +.\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=2.9BSD/usr/src/ucb/\ +.\" tset/tset.c +This version appeared in 4.1cBSD, \" and backported to 2.9BSD +late in 1982. +Other developers such as Keith Bostic and Jim Bloom continued to modify +\fBtset\fP until 4.4BSD was released in 1993. +.PP +The \fI\%ncurses\fP implementation was lightly adapted from the 4.4BSD +sources to use the \fI\%terminfo\fP API by Eric S.\& Raymond +. .SH SEE ALSO -.hy 0 -\fBcsh\fP(1), -\fBsh\fP(1), -\fBstty\fP(1), -\fBcurs_terminfo\fP(3X), -\fBtty\fP(4), -\fBterminfo\fP(5), -\fBttys\fP(5), -\fBenviron\fP(7) -.hy -.PP -This describes \fBncurses\fP -version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@). +\fB\%csh\fP(1), +\fB\%sh\fP(1), +\fB\%stty\fP(1), +\fB\%curs_terminfo\fP(3X), +\fB\%tty\fP(4), +\fB\%terminfo\fP(5), +\fB\%ttys\fP(5), +\fB\%environ\fP(7) diff --git a/man/user_caps.5 b/man/user_caps.5 index 6b6956dd..219bbf5f 100644 --- a/man/user_caps.5 +++ b/man/user_caps.5 @@ -1,5 +1,6 @@ +'\" t .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,45 +28,40 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: user_caps.5,v 1.20 2021/12/25 21:09:22 tom Exp $ -.TH user_caps 5 -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' -.de NS -.ie n .sp -.el .sp .5 -.ie n .in +4 -.el .in +2 -.nf -.ft C \" Courier -.. -.de NE -.fi -.ft R -.ie n .in -4 -.el .in -2 -.. +.\" $Id: user_caps.5,v 1.49 2024/03/16 15:35:01 tom Exp $ +.TH user_caps 5 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "File formats" +.ie \n(.g \{\ +.ds `` \(lq +.ds '' \(rq +.\} +.el \{\ +.ie t .ds `` `` +.el .ds `` "" +.ie t .ds '' '' +.el .ds '' "" +.\} +. .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME -user_caps \- user-defined terminfo capabilities +user_caps \- +user-defined \fIterminfo\fR capability format .SH SYNOPSIS -.B @TIC@ -x, @INFOCMP@ -x +.B @INFOCMP@ \-x +.PP +.B @TIC@ \-x .SH DESCRIPTION .SS Background -.PP -Before ncurses 5.0, +Before \fI\%ncurses\fP 5.0, terminfo databases used a \fIfixed repertoire\fP 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. .PP Most of the \fIextensions\fP in this fixed repertoire were additions -to the tables of boolean, numeric and string capabilities. +to the tables of Boolean, numeric and string capabilities. Rather than change 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 @@ -92,22 +88,24 @@ Although they \fImay\fP provide all of the standard capability names, the position in the tables differs because some features were added as needed, while others were added (out of order) to comply with X/Open Curses. .IP -While ncurses' repertoire of predefined capabilities is closest to Solaris, +While \fI\%ncurses\fP' 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 configured with tables which match the -terminal databases for AIX, HP-UX or OSF/1, +For example, +\fI\%ncurses\fP can be configured with tables which match the terminal +databases for AIX, HP-UX or OSF/1, rather than the default Solaris-like configuration. .bP -In SVr4 curses and ncurses, +In SVr4 curses and \fI\%ncurses\fP, the terminal database is defined at compile-time using a text file which lists the different terminal capabilities. .IP 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 +The text-file used in \fI\%ncurses\fP for terminal capabilities includes details for various systems past the documented X/Open Curses features. -For example, ncurses supports these capabilities in each configuration: +For example, \fI\%ncurses\fP supports these capabilities in each configuration: .RS 8 .TP 5 memory_lock @@ -142,16 +140,16 @@ it could represent larger numbers. Although termcap's extensibility was rarely used (it was never the \fIspeaker\fP who had actually used the feature), the criticism had a point. -ncurses 5.0 provided a way to detect nonstandard capabilities, +\fI\%ncurses\fP 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 \fIuser-defined capabilities\fP because no modifications to the toolset's predefined capability names are needed. .PP -The ncurses utilities \fB@TIC@\fP and \fB@INFOCMP@\fP have a command-line -option \*(``\-x\*('' to control whether the nonstandard capabilities -are stored or retrieved. +The \fI\%ncurses\fP utilities \fB@TIC@\fP and \fB@INFOCMP@\fP have a +command-line option \*(``\-x\*('' to control whether the nonstandard +capabilities are stored or retrieved. A library function \fBuse_extended_names\fP is provided for the same purpose. .PP @@ -159,7 +157,7 @@ When compiling a terminal database, if \*(``\-x\*('' is set, \fB@TIC@\fP will store a user-defined capability if the capability name is not one of the predefined names. .PP -Because ncurses provides a termcap library interface, +Because \fI\%ncurses\fP provides a termcap library interface, these user-defined capabilities may be visible to termcap applications: .bP The termcap interface (like all implementations of termcap) @@ -181,21 +179,20 @@ 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 \fBxterm\fP(1) to -provide extended special-key names. +The \fI\%ncurses\fP database uses a convention based on \fBxterm\fP(1) +to provide extended special-key names. .IP Fitting that into termcap's limitation of 2-character names would be pointless. These extended keys are available only with terminfo. -.SS Recognized capabilities -.PP -The ncurses library uses the user-definable capabilities. +.SS "Recognized Capabilities" +The \fI\%ncurses\fP library uses the user-definable capabilities. While the terminfo database may have other extensions, -ncurses makes explicit checks for these: +\fI\%ncurses\fP makes explicit checks for these: .RS 3 .TP 3 AX -\fIboolean\fP, asserts that the terminal interprets SGR 39 and SGR 49 +\fIBoolean\fP, asserts that the terminal interprets SGR 39 and SGR 49 by resetting the foreground and background color, respectively, to the default. .IP This is a feature recognized by the \fBscreen\fP program as well. @@ -207,9 +204,17 @@ the terminal. .IP The command \*(``\fBtput clear\fP\*('' does the same thing. .TP 3 +NQ +\fIBoolean\fP, +used to suppress a consistency check in @TIC@ for the \fI\%ncurses\fP +capabilities +in user6 through user9 (u6, u7, u8 and u9) +which tell how to query the terminal's cursor position +and its device attributes. +.TP 3 RGB -\fIboolean\fP, \fInumber\fP \fBor\fP \fIstring\fP, -to assert that the +\fIBoolean\fP, \fInumber\fP \fBor\fP \fIstring\fP, +used to assert that the \fBset_a_foreground\fP and \fBset_a_background\fP capabilities correspond to \fIdirect colors\fP, using an RGB (red/green/blue) convention. @@ -217,22 +222,24 @@ This capability allows the \fBcolor_content\fP function to return appropriate values without requiring the application to initialize colors using \fBinit_color\fP. .IP -The capability type determines the values which ncurses sees: +The capability type determines the values which \fI\%ncurses\fP sees: .RS 3 .TP 3 -\fIboolean\fP +\fIBoolean\fP implies that the number of bits for red, green and blue are the same. Using the maximum number of colors, -ncurses adds two, divides that sum by three, and assigns the result -to red, green and blue in that order. +\fI\%ncurses\fP adds two, +divides that sum by three, +and assigns the result to red, +green and blue in that order. .IP If the number of bits needed for the number of colors is not a multiple of three, the blue (and green) components lose in comparison to red. .TP 3 \fInumber\fP -tells ncurses what result to add to red, green and blue. -If ncurses runs out of bits, -blue (and green) lose just as in the \fIboolean\fP case. +tells \fI\%ncurses\fP what result to add to red, green and blue. +If \fI\%ncurses\fP runs out of bits, +blue (and green) lose just as in the \fIBoolean\fP case. .TP 3 \fIstring\fP explicitly list the number of bits used for red, green and blue components @@ -247,27 +254,29 @@ to represent the standard eight ANSI colors, i.e., one bit per color. .TP 3 U8 \fInumber\fP, -asserts that ncurses must use Unicode values for line-drawing characters, +asserts that \fI\%ncurses\fP must use Unicode values for line-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 -\fBNCURSES_NO_UTF8_ACS\fP in \fBncurses\fP(3X). +\fBNCURSES_NO_UTF8_ACS\fP in \fB\%ncurses\fP(3X). .IP Set this capability to a nonzero value to enable it. .TP 3 XM \fIstring\fP, -override ncurses's built-in string which +override \fI\%ncurses\fP's built-in string which enables/disables \fBxterm\fP(1) mouse mode. .IP -ncurses sends a character sequence to the terminal to initialize mouse mode, +\fI\%ncurses\fP sends a character sequence to the terminal to initialize mouse mode, and when the user clicks the mouse buttons or (in certain modes) moves the mouse, handles the characters sent back by the terminal to tell it what was done with the mouse. .IP The mouse protocol is enabled when the \fImask\fP passed in the \fBmousemask\fP function is nonzero. -By default, ncurses handles the responses for the X11 xterm mouse protocol. +By default, +\fI\%ncurses\fP handles the responses for the X11 xterm mouse protocol. It also knows about the \fISGR 1006\fP xterm mouse protocol, but must to be told to look for this specifically. It will not be able to guess which mode is used, @@ -276,7 +285,7 @@ because the responses are enough alike that only confusion would result. The \fBXM\fP capability has a single parameter. If nonzero, the mouse protocol should be enabled. If zero, the mouse protocol should be disabled. -ncurses inspects this capability if it is present, +\fI\%ncurses\fP inspects this capability if it is present, to see whether the 1006 protocol is used. If so, it expects the responses to use the \fISGR 1006\fP xterm mouse protocol. .IP @@ -324,22 +333,21 @@ xterm mouse protocols: .IP .nf xterm+x11mouse|X11 xterm mouse protocol, - kmous=\\E[M, XM=\\E[?1000%?%p1%{1}%=%th%el%;, - xm=\\E[M + kmous=\eE[M, XM=\eE[?1000%?%p1%{1}%=%th%el%;, + xm=\eE[M %?%p4%t%p3%e%{3}%;%'\ '%+%c %p2%'!'%+%c %p1%'!'%+%c, xterm+sm+1006|xterm SGR-mouse, - kmous=\\E[<, XM=\\E[?1006;1000%?%p1%{1}%=%th%el%;, - xm=\\E[<%i%p3%d; + kmous=\eE[<, XM=\eE[?1006;1000%?%p1%{1}%=%th%el%;, + xm=\eE[<%i%p3%d; %p1%d; %p2%d; %?%p4%tM%em%;, .fi . -.SS Extended key-definitions -.PP +.SS "Extended Key Definitions" 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. @@ -347,33 +355,52 @@ There is no standard for what those keys can send. Since 1999, \fBxterm\fP(1) has supported \fIshift\fP, \fIcontrol\fP, \fIalt\fP, and \fImeta\fP modifiers which produce distinct special-key strings. -In a terminal description, ncurses has no special knowledge of the -modifiers used. +In a terminal description, +\fI\%ncurses\fP has no special knowledge of the modifiers used. Applications can use the \fInaming convention\fP established for \fBxterm\fP to find these special keys in the terminal description. .PP -Starting with the curses convention that \fIkey names\fP begin with \*(``k\*('' -and that shifted special keys are an uppercase name, -ncurses' terminal database defines these names to which a suffix is added: +Starting with the +.I curses +convention that capability codes describing the input generated by a +terminal's key caps begin with \*(``k\*('', +and that shifted special keys use uppercase letters in their names, +.IR \%ncurses 's +terminal database defines the following names and codes to which a +suffix is added. +.PP .RS 5 .TS -tab(/) ; -l l . -\fBName\fP/\fBDescription\fP +Lb Lb +Lb Lx. +Code Description _ -kDC/special form of kdch1 (delete character) -kDN/special form of kcud1 (cursor down) -kEND/special form of kend (End) -kHOM/special form of khome (Home) -kLFT/special form of kcub1 (cursor-left or cursor-back) -kNXT/special form of knext (Next, or Page-Down) -kPRV/special form of kprev (Prev, or Page-Up) -kRIT/special form of kcuf1 (cursor-right, or cursor-forward) -kUP/special form of kcuu1 (cursor-up) +kDC shifted kdch1 (delete character) +.\" kDC is a standard capability; see X/Open Curses Issue 7, p. 345. +kDN shifted kcud1 (cursor down) +kEND shifted kend (end) +kHOM shifted khome (home) +kLFT shifted kcub1 (cursor back) +kNXT shifted knext (next) +kPRV shifted kprev (previous) +kRIT shifted kcuf1 (cursor forward) +kUP shifted kcuu1 (cursor up) .TE .RE .PP +Keycap nomenclature on the Unix systems for which +.I curses +was developed differs from today's ubiquitous descendants of the IBM +PC/AT keyboard layout. +In the foregoing, +interpret \*(``backward\*('' as \*(``left\*('', +\*(``forward\*('' as \*(``right\*('', +\*(``next\*('' as \*(``page down\*('', +and +\*(``prev(ious)\*('' as \*(``page up\*(''. +.PP These are the suffixes used to denote the modifiers: +.PP .RS 5 .TS tab(/) ; @@ -399,8 +426,9 @@ _ .RE .PP None of these are predefined; terminal descriptions can refer to \fInames\fP -which ncurses will allocate at runtime to \fIkey-codes\fP. -To use these keys in an ncurses program, an application could do this: +which \fI\%ncurses\fP will allocate at runtime to \fIkey-codes\fP. +To use these keys in an \fI\%ncurses\fP program, +an application could do this: .bP using a list of extended key \fInames\fP, ask \fBtigetstr\fP(3X) for their values, and @@ -408,32 +436,29 @@ ask \fBtigetstr\fP(3X) for their values, and given the list of values, ask \fBkey_defined\fP(3X) for the \fIkey-code\fP which would be returned for those keys by \fBwgetch\fP(3X). -.PP .\" .SH PORTABILITY -.PP The \*(``\-x\*('' extension feature of \fB@TIC@\fP and \fB@INFOCMP@\fP has been adopted in NetBSD curses. That implementation stores user-defined capabilities, but makes no use of these capabilities itself. .\" +.SH AUTHORS +Thomas E. Dickey +.br +beginning with \fI\%ncurses\fP 5.0 (1999) +.\" .SH SEE ALSO -.PP -\fB@INFOCMP@\fP(1M), -\fB@TIC@\fP(1M). +\fB\%@INFOCMP@\fP(1M), +\fB\%@TIC@\fP(1M) .PP The terminal database section .I "NCURSES USER-DEFINABLE CAPABILITIES" summarizes commonly-used user-defined capabilities which are used in the terminal descriptions. -Some of those features are mentioned in \fBscreen\fP(1) or \fBtmux\fP(1). +Some of those features are mentioned in \fB\%screen\fP(1) or +\fBtmux\fP(1). .PP .I "XTerm Control Sequences" -provides further information on the \fBxterm\fP(1) features -which are used in these extended capabilities. -.\" -.SH AUTHORS -.PP -Thomas E. Dickey -.br -beginning with ncurses 5.0 (1999) +provides further information on the \fB\%xterm\fP(1) features +that are used in these extended capabilities. diff --git a/man/wresize.3x b/man/wresize.3x index d20115a7..b67feada 100644 --- a/man/wresize.3x +++ b/man/wresize.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,38 +29,44 @@ .\" .\" Author: Thomas E. Dickey 1996 .\" -.\" $Id: wresize.3x,v 1.19 2021/12/25 21:42:57 tom Exp $ -.TH wresize 3X "" +.\" $Id: wresize.3x,v 1.36 2024/03/16 15:35:01 tom Exp $ +.TH wresize 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" .SH NAME -\fBwresize\fP \- resize a curses window +\fB\%wresize\fP \- +resize a \fIcurses\fR window .SH SYNOPSIS -\fB#include \fP -.sp -\fBint wresize(WINDOW *\fP\fIwin\fP\fB, int \fP\fIlines\fP\fB, int \fP\fIcolumns\fP\fB);\fP +.nf +\fB#include +.PP +\fBint wresize(WINDOW *\fIwin\fP, int \fIlines\fP, int \fIcolumns\fP); +.fi .SH DESCRIPTION -This is an extension to the curses library. -It reallocates storage for an \fBncurses\fP -window to adjust its dimensions to the specified values. -If either dimension is larger than the current values, the -window's data is filled with blanks that have the current background rendition -(as set by \fBwbkgdset\fP) merged into them. +This \fI\%ncurses\fP extension to standard \fIcurses\fP reallocates +storage for a \fIcurses\fP window to adjust its dimensions to the +specified values. +If either dimension is larger than its current value, +the expanded part of the window is filled with blanks merged with +current background rendition +(as set by \fB\%wbkgdset\fP(3X)). .SH RETURN VALUE -The function returns the integer \fBERR\fP upon failure and \fBOK\fP on success. -It will fail if either of the dimensions less than or equal to zero, +\fB\%wresize\fP returns \fBERR\fP upon failure and \fBOK\fP on success. +It will fail if either of the dimensions is less than or equal to zero, or if an error occurs while (re)allocating memory for the window. .SH NOTES -The only restriction placed on the dimensions is that they be greater than zero. -The dimensions are not compared to \fBcurses\fP screen dimensions to -simplify the logic of \fBresizeterm\fP. +The only restriction placed on the dimensions is that they be greater +than zero. +They are \fInot\fP compared to the \fIcurses\fP screen dimensions; +this keeps the logic of \fB\%resizeterm\fP(3X) simple. The caller must ensure that the window's dimensions fit within the actual screen dimensions. .SH PORTABILITY +It is not possible to resize windows with SVr4 \fIcurses\fP. .PP -It is not possible to resize windows with SVr4 curses. -.PP -This extension of ncurses was introduced in mid-1995. -It was adopted in NetBSD curses (2001) and PDCurses (2003). +\fI\%ncurses\fP introduced this extension in mid-1995. +NetBSD \fIcurses\fP adopted it in 2001, +and \fI\%PDCurses\fP in 2003. +.SH AUTHORS +Thomas Dickey +(from an equivalent function written in 1988 for BSD \fIcurses\fP). .SH SEE ALSO -\fBresizeterm\fP(3X). -.SH AUTHOR -Thomas Dickey (from an equivalent function written in 1988 for BSD curses). +\fB\%resizeterm\fP(3X) diff --git a/menu/m_global.c b/menu/m_global.c index 4ec08c52..4bc8ef8f 100644 --- a/menu/m_global.c +++ b/menu/m_global.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_global.c,v 1.33 2021/03/27 23:46:29 tom Exp $") +MODULE_ID("$Id: m_global.c,v 1.34 2023/09/16 16:39:26 tom Exp $") static char mark[] = "-"; /* *INDENT-OFF* */ @@ -568,7 +568,7 @@ _nc_New_TopRow_and_CurrentItem( cur_item = menu->curitem; assert(cur_item); menu->toprow = (short)(((menu->rows - menu->frows) >= 0) - ? min(menu->rows - menu->frows, new_toprow) + ? Min(menu->rows - menu->frows, new_toprow) : 0); menu->curitem = new_current_item; @@ -592,7 +592,7 @@ _nc_New_TopRow_and_CurrentItem( else { /* if we are not posted, this is quite simple */ menu->toprow = (short)(((menu->rows - menu->frows) >= 0) - ? min(menu->rows - menu->frows, new_toprow) + ? Min(menu->rows - menu->frows, new_toprow) : 0); menu->curitem = new_current_item; } diff --git a/menu/m_post.c b/menu/m_post.c index 1dbd6b80..cb802304 100644 --- a/menu/m_post.c +++ b/menu/m_post.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_post.c,v 1.36 2021/05/08 20:20:01 tom Exp $") +MODULE_ID("$Id: m_post.c,v 1.38 2022/09/24 09:38:44 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -203,7 +203,6 @@ _nc_Draw_Menu(const MENU *menu) ITEM *item = menu->items[0]; ITEM *lastvert; ITEM *hitem; - int y = 0; chtype s_bkgd; assert(item && menu->win); @@ -217,6 +216,8 @@ _nc_Draw_Menu(const MENU *menu) if (item != NULL) { + int y = 0; + do { ITEM *lasthor; diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in index a45dd54f..89a5cd4a 100644 --- a/misc/gen-pkgconfig.in +++ b/misc/gen-pkgconfig.in @@ -1,7 +1,7 @@ #!@SHELL@ -# $Id: gen-pkgconfig.in,v 1.52 2021/08/07 21:36:33 tom Exp $ +# $Id: gen-pkgconfig.in,v 1.56 2022/10/08 16:45:20 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2021,2022 Thomas E. Dickey # # Copyright 2009-2015,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -98,9 +98,16 @@ do -Wl,--dynamic-linker*) # ignore ELF interpreter continue ;; + -Wl,--as-needed|-Wl,--build-id=*|-Wl,-dT,*|-Wl,-T,*) + continue + ;; -L*) lib_check=`echo "x$opt" | sed -e 's/^.-L//'` - [ -d "$lib_check" ] || continue + # on a new/nonstandard install, $libdir may not yet exist at this point + if [ "$libdir" != "$lib_check" ] + then + [ -d "$lib_check" ] || continue + fi case "$lib_check" in @LD_SEARCHPATH@) # skip standard libdir if [ "$lib_check" = "$libdir" ] @@ -167,7 +174,7 @@ fi # The "URL" feature came in pkg-config 0.17 USEURL="" -CFGVER=`pkg-config --version 2>/dev/null |head -n 1 | awk -F. '/0.[0-9][0-9]/{print $2;}'` +CFGVER=`${PKG_CONFIG:-pkg-config} --version 2>/dev/null |head -n 1 | awk -F. '/0.[0-9][0-9]/{print $2;}'` # A missing version should simply fail, but some packagers insist on building # packages on machines which do not actually have the tools they depend on at # runtime. @@ -219,7 +226,7 @@ do echo "** creating ${name}${suffix}.pc" cat >${name}${suffix}.pc <= 20150502 ); + if ( &patchdate >= 20150502 && !$opt_6 ); my @options = ( - "--with-ospeed=int", # - "--with-shared", # - "--without-normal", # - "--without-debug", # + "--with-ospeed=int", # + "--with-shared", # + "--without-normal", # + "--without-debug", # "--with-terminfo-dirs=" . join( ':', @search ), # "--without-ada", # "--disable-hard-tabs", # @@ -1191,7 +1191,8 @@ sub configure_tree() { "--enable-bsdpad", # "--enable-signed-char", # "--enable-termcap", # - "--enable-widec" + "--enable-widec", # + "--disable-setuid-environ" ); $options[ ++$#options ] = "--with-trace" if ($opt_t); $options[ ++$#options ] = "--enable-string-hacks" @@ -1250,6 +1251,7 @@ sub usage() { Usage: ncu2openbsd [options] [sourcetree] Options: + -6 use ABI 6 rather than 5 if available -d DST specify destination (default: /usr/src) -n no-op, do not update destination -r remove update, restore sources from ".orig" @@ -1261,7 +1263,7 @@ EOF } $Getopt::Std::STANDARD_HELP_VERSION = 1; -&getopts('d:nrtvx') || &usage(); +&getopts('6d:nrtvx') || &usage(); $opt_d = "/usr/src" unless ($opt_d); &usage() unless ( $#ARGV <= 0 ); diff --git a/misc/ncurses-config.in b/misc/ncurses-config.in index 7b02ac27..c9f1cf80 100644 --- a/misc/ncurses-config.in +++ b/misc/ncurses-config.in @@ -1,7 +1,7 @@ #!@SHELL@ -# $Id: ncurses-config.in,v 1.50 2021/08/07 21:36:14 tom Exp $ +# $Id: ncurses-config.in,v 1.52 2022/07/26 21:36:28 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2021,2022 Thomas E. Dickey # # Copyright 2006-2015,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -113,6 +113,9 @@ do -Wl,--dynamic-linker*) # ignore ELF interpreter continue ;; + -Wl,--as-needed|-Wl,--build-id=*|-Wl,-dT,*|-Wl,-T,*) + continue + ;; -L*) lib_check=`echo "x$opt" | sed -e 's/^.-L//'` [ -d "$lib_check" ] || continue @@ -170,7 +173,7 @@ do lib_flags="$lib_flags $opt" done -[ $# = 0 ] && exec @SHELL@ $0 --error +[ $# = 0 ] && exec @SHELL@ "$0" --error while [ $# -gt 0 ]; do case "$1" in @@ -201,7 +204,7 @@ ENDECHO [ -n "$OPTS" ] && OPTS="$OPTS " OPTS="${OPTS}${opt}" done - printf "%s\n" "$OPTS" + printf '%s\n' "$OPTS" ;; --libs-only-L) OPTS= @@ -214,7 +217,7 @@ ENDECHO ;; esac done - printf "%s\n" "$OPTS" + printf '%s\n' "$OPTS" ;; --libs-only-l) OPTS= @@ -227,7 +230,7 @@ ENDECHO ;; esac done - printf "%s\n" "$OPTS" + printf '%s\n' "$OPTS" ;; --libs-only-other) OPTS= @@ -242,7 +245,7 @@ ENDECHO ;; esac done - printf "%s\n" "$OPTS" + printf '%s\n' "$OPTS" ;; # identification --version) @@ -268,7 +271,7 @@ ENDECHO elif [ "${includedir}" != /usr/include ]; then INCS="${includedir}" fi - echo $INCS + echo "$INCS" ;; --libdir) echo "${libdir}" @@ -288,7 +291,7 @@ ENDECHO # general info --help) cat <&2 + @SHELL@ "$0" --help 1>&2 exit 1 ;; esac diff --git a/misc/run_tic.in b/misc/run_tic.in index b335b48e..bd11c4c8 100644 --- a/misc/run_tic.in +++ b/misc/run_tic.in @@ -1,7 +1,7 @@ #!@SHELL@ -# $Id: run_tic.in,v 1.38 2020/02/15 15:30:53 tom Exp $ +# $Id: run_tic.in,v 1.40 2022/07/16 19:37:03 tom Exp $ ############################################################################## -# Copyright 2019,2020 Thomas E. Dickey # +# Copyright 2019-2020,2022 Thomas E. Dickey # # Copyright 2000-2012,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -42,21 +42,20 @@ echo "** Building terminfo database, please wait..." # The script is designed to be run from the misc/Makefile as # make install.data -: ${suffix:=@EXEEXT@} -: ${DESTDIR:=@DESTDIR@} -: ${prefix:=@prefix@} -: ${exec_prefix:=@exec_prefix@} -: ${bindir:=@bindir@} -: ${top_srcdir:=@top_srcdir@} -: ${srcdir:=@srcdir@} -: ${datarootdir:=@datarootdir@} -: ${datadir:=@datadir@} -: ${TIC_PATH:=@TIC@} -: ${ticdir:=@TERMINFO@} -: ${source:=@TERMINFO_SRC@} -: ${LN_S:="@LN_S@"} -: ${cross_compiling:=no} -: ${ext_funcs:=@NCURSES_EXT_FUNCS@} +: "${suffix:=@EXEEXT@}" +: "${DESTDIR:=@DESTDIR@}" +: "${prefix:=@prefix@}" +: "${exec_prefix:=@exec_prefix@}" +: "${bindir:=@bindir@}" +: "${top_srcdir:=@top_srcdir@}" +: "${srcdir:=@srcdir@}" +: "${datarootdir:=@datarootdir@}" +: "${datadir:=@datadir@}" +: "${TIC_PATH:=@TIC@}" +: "${ticdir:=@TERMINFO@}" +: "${source:=@TERMINFO_SRC@}" +: "${cross_compiling:=no}" +: "${ext_funcs:=@NCURSES_EXT_FUNCS@}" test -z "${DESTDIR}" && DESTDIR= @@ -118,7 +117,7 @@ TICDIR=`echo "$TERMINFO" | sed -e 's%/share/\([^/]*\)$%/lib/\1%'` PARENT=`echo "$TERMINFO" | sed -e 's%/[^/]*$%%'` if test -n "$PARENT" then - test -d $PARENT || mkdir -p $PARENT + mkdir -p "$PARENT" fi # Remove the old terminfo stuff; we don't care if it existed before, and it @@ -127,7 +126,7 @@ fi # the directory is actually a symbolic link. if test -d "$TERMINFO" then - ( cd "$TERMINFO" && rm -fr ? 2>/dev/null ) + ( cd "$TERMINFO" && rm -fr ./? 2>/dev/null ) elif test -f "$TERMINFO.db" then ( rm -f "$TERMINFO.db" 2>/dev/null ) @@ -183,9 +182,9 @@ if test "$TICDIR" != "$TERMINFO" ; then ( rm -f "$TICDIR" 2>/dev/null ) if ( cd "$TICDIR" 2>/dev/null ) then - cd "$TICDIR" + cd "$TICDIR" || exit TICDIR=`pwd` - if test "$TICDIR "!= "$TERMINFO "; then + if test "$TICDIR " != "$TERMINFO "; then # Well, we tried. Some systems lie to us, so the # installer will have to double-check. echo "Verify if $TICDIR and $TERMINFO are the same." @@ -193,7 +192,7 @@ if test "$TICDIR" != "$TERMINFO" ; then echo "Otherwise, remove $TICDIR and link it to $TERMINFO." fi else - cd ${DESTDIR}$prefix + cd ${DESTDIR}$prefix || exit # Construct a symbolic link that only assumes $ticdir has the # same $prefix as the other installed directories. RELATIVE=`echo $ticdir|sed -e 's%^'$prefix'/%%'` diff --git a/misc/terminfo.src b/misc/terminfo.src index 52b0b723..5d575b8e 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -6,8 +6,8 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # -# $Revision: 1.970 $ -# $Date: 2021/11/27 21:53:31 $ +# $Revision: 1.1143 $ +# $Date: 2024/03/09 20:01:40 $ # # The original header is preserved below for reference. It is noted that there # is a "newer" version which differs in some cosmetic details (but actually @@ -349,7 +349,7 @@ ansi+inittabs|ANSI initial tab-stops, it#8, use=ansi+tabs, ansi+erase|ANSI clear screen/line, clear=\E[H\E[J, ed=\E[J, el=\E[K, -ansi+rca|ANSI relative cursor-addressing, +ansi+rca|ANSI relative cursor-addressing (1-based), hpa=\E[%p1%{1}%+%dG, vpa=\E[%p1%{1}%+%dd, ansi+rca2|ANSI relative cursor-addressing, hpa=\E[%i%p1%dG, vpa=\E[%i%p1%dd, @@ -365,9 +365,12 @@ ansi+idc1|ANSI insert/delete one character, dch1=\E[P, ich1=\E[@, rmir=\E[4l, smir=\E[4h, ansi+idc|ANSI insert/delete characters, dch=\E[%p1%dP, ich=\E[%p1%d@, use=ansi+idc1, -ansi+arrows|ANSI normal-mode cursor-keys, +ansi+arrows|ANSI normal-mode home and cursor-keys, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, +ansi+apparrows|ANSI application-mode home and cursor-keys, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, khome=\EOH, + use=ansi+arrows, ansi+sgr|ANSI graphic renditions, blink=\E[5m, invis=\E[8m, rev=\E[7m, sgr=\E[0%?%p3%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, @@ -427,7 +430,7 @@ klone+sgr|attribute control for ansi.sys displays, use=klone+acs, # Most Intel boxes do not treat "invis" (invisible) text. -klone+sgr8|attribute control for ansi.sys displays, +klone+sgr8|attribute control for ansi.sys displays with invis, invis=\E[8m, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6 %t;1%;%?%p7%t;8%;%?%p9%t;11%;m, @@ -438,11 +441,9 @@ klone+sgr8|attribute control for ansi.sys displays, # work; uses \E[12m instead, which is pretty bulletproof but loses you the ACS # diamond and arrow characters under curses. klone+sgr-dumb|attribute control for ansi.sys displays (no ESC [ 11 m), - blink=\E[5m, bold=\E[1m, invis=\E[8m, rev=\E[7m, rmso=\E[m, - rmul=\E[m, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6 %t;1%;%?%p7%t;8%;%?%p9%t;12%;m, - sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m, + sgr0=\E[0;10m, smacs=\E[12m, use=ansi+sgrbold, use=klone+acs, # KOI8-R (RFC1489) acs (alternate character set) @@ -469,8 +470,7 @@ klone+color|color control for ansi.sys and ISO6429-compatible displays, # default color pair, but many `ANSI' terminals don't grok the cap. ecma+color|color control for ECMA-48-compatible terminals, AX, - colors#8, ncv#3, pairs#64, - op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + op=\E[39;49m, use=klone+color, ecma+italics|ECMA-48 italics, ritm=\E[23m, sitm=\E[3m, @@ -492,13 +492,12 @@ ecma+index|ECMA-48 scroll up/down, # For more detail on this rather pathetic standard, see the comments # near the end of this file. ibcs2|Intel Binary Compatibility Standard prescriptions, - cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cub1=\E[1D, - cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A, - dch=\E[%p1%dP, dispc=\E=%p1%dg, ech=\E[%p1%dX, - hpa=\E[%i%p1%dG, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, rc=\E7, rmam=\E[?7l, sc=\E7, smam=\E[?7h, - tbc=\E[g, vpa=\E[%i%p1%dd, use=ecma+index, + cbt=\E[Z, clear=\Ec, cub1=\E[1D, cud1=\E[1B, cuf1=\E[1C, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[1A, dch=\E[%p1%dP, + dispc=\E=%p1%dg, ech=\E[%p1%dX, hpa=\E[%i%p1%dG, hts=\EH, + ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, rc=\E7, + rmam=\E[?7l, sc=\E7, smam=\E[?7h, tbc=\E[g, + vpa=\E[%i%p1%dd, use=ansi+local, use=ecma+index, #### ANSI/ECMA-48 terminals and terminal emulators # @@ -526,7 +525,7 @@ ansi-mini|any ANSI terminal with pessimistic assumptions, use=ansi+erase, # ansi-mtabs adds relative addressing and minimal tab support -ansi-mtabs|any ANSI terminal with pessimistic assumptions, +ansi-mtabs|any ANSI terminal with pessimistic assumptions (relative addressing), it#8, ht=^I, use=ansi-mini, use=ansi+local1, @@ -560,14 +559,12 @@ ansi-mtabs|any ANSI terminal with pessimistic assumptions, ansi77|ANSI 3.64 standard 1977 version, OTbs, am, mir, cols#80, it#8, lines#24, - bel=^G, clear=\E[;H\E[2J, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, dch1=\E[P, dl1=\E[M$<5*/>, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, il1=\E[L$<5*/>, ind=\ED, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, - kf2=\EOR, kf4=\EOS, khome=\E[H, nel=\r\ED, rc=\E8, ri=\EM, - rmir=\E[4l, rmso=\E[m, rmul=\E[m, sc=\E7, smir=\E[4h, - smso=\E[7m, smul=\E[4m, + bel=^G, clear=\E[;H\E[2J, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M$<5*/>, + ed=\E[J, el=\E[K, home=\E[H, ht=^I, il1=\E[L$<5*/>, ind=\ED, + kf1=\EOP, kf2=\EOR, kf4=\EOS, nel=\r\ED, ri=\EM, rmir=\E[4l, + rmso=\E[m, rmul=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m, + use=ansi+arrows, use=ansi+csr, use=ansi+local1, # Procomm and some other ANSI emulations don't recognize all of the ANSI- # standard capabilities. This entry deletes , , , , and @@ -581,13 +578,12 @@ ansi77|ANSI 3.64 standard 1977 version, # From: Eric S. Raymond Oct 30 1995 pcansi-m|pcansi-mono|ibm-pc terminal programs claiming to be ANSI (mono mode), OTbs, am, mir, msgr, - cols#80, it#8, lines#24, - bel=^G, cbt=\E[Z, clear=\E[H\E[J, cr=\r, cub1=\E[D, - cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - hts=\EH, il1=\E[L, ind=\n, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[3g, + cols#80, lines#24, + bel=^G, cr=\r, cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, + home=\E[H, ht=^I, il1=\E[L, ind=\n, use=ansi+arrows, + use=ansi+erase, use=ansi+inittabs, use=ansi+local1, use=klone+sgr-dumb, + pcansi-25-m|pcansi25m|ibm-pc terminal programs with 25 lines (mono mode), lines#25, use=pcansi-m, pcansi-33-m|pcansi33m|ibm-pc terminal programs with 33 lines (mono mode), @@ -610,18 +606,52 @@ pcansi-43|pcansi43|ibm-pc terminal programs with 43 lines, # From: Eric S. Raymond Nov 6 1995 ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes, mc5i, - cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, - cuu=\E[%p1%dA, dch=\E[%p1%dP, dl=\E[%p1%dM, - ech=\E[%p1%dX, el1=\E[1K, hpa=\E[%i%p1%dG, ht=\E[I, - ich=\E[%p1%d@, il=\E[%p1%dL, kbs=^H, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kich1=\E[L, mc4=\E[4i, - mc5=\E[5i, nel=\r\E[S, rep=%p1%c\E[%p2%{1}%-%db, - s0ds=\E(B, s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[3g, - vpa=\E[%i%p1%dd, use=ecma+index, use=pcansi-m, - + dch=\E[%p1%dP, dl=\E[%p1%dM, ech=\E[%p1%dX, el1=\E[1K, + hpa=\E[%i%p1%dG, ht=\E[I, ich=\E[%p1%d@, il=\E[%p1%dL, + kcbt=\E[Z, kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S, + rep=%p1%c\E[%p2%{1}%-%db, s0ds=\E(B, s1ds=\E)B, + s2ds=\E*B, s3ds=\E+B, vpa=\E[%i%p1%dd, use=ansi+local, + use=ecma+index, use=pcansi-m, + +# ECMA-48 addresses three of the four capabilities here: +# +# u6 - +# 8.3.14 CPR - ACTIVE POSITION REPORT +# Notation: (Pn1;Pn2) Representation: CSI Pn1;Pn2 05/02 +# Parameter default values: Pn1 = 1; Pn2 = 1 +# +# u7 +# 8.3.35 DSR - DEVICE ST A TUS REPORT +# Notation: (Ps) Representation: CSI Ps 06/14 +# Parameter default value: Ps = 0 +# DSR is used either to report the status of the sending device or to +# request a status report from the receiving device, depending on the +# parameter values: +# 6 a report of the active presentation position or of the active data +# position in the form of ACTIVE POSITION REPORT (CPR) is requested +# +# u9 - +# 8.3.24 DA - DEVICE ATTRIBUTES +# Notation: (Ps) Representation: CSI Ps 06/03 +# Parameter default value: Ps = 0 +# With a parameter value not equal to 0, DA is used to identify the +# device which sends the DA. The parameter value is a device type +# identification code according to a register which is to be established. +# If the parameter value is 0, DA is used to request an identifying DA +# from a device. +# +# DEC (and most "ANSI") terminals reply with a private-mode ("?") sequence, +# but that register "which is to be" in ECMA-48 was never established. +# For terminals that support DA1, a more specific u8 capability is preferred, +# except for those (such as xterm) which can be configured to return different +# responses. +ansi+cpr|ncurses extension for ANSI CPR, + u6=\E[%i%d;%dR, u7=\E[6n, ansi+enq|ncurses extension for ANSI ENQ, - u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, - u9=\E[c, + u8=\E[?%[;0123456789]c, u9=\E[c, use=ansi+cpr, +# DEC terminals provided DECID, subsumed into DA1: +decid+cpr|ncurses extension for DECID, + u8=\E[?%[;0123456789]c, u9=\EZ, use=ansi+cpr, # ansi -- this terminfo expresses the largest subset of X3.64 that will fit in # standard terminfo. Assumes ANSI.SYS-compatible attributes and color. @@ -657,12 +687,11 @@ ansi-generic|ansiterm|generic ANSI standard terminal, ansi.sys-old|ANSI.SYS under PC-DOS 2.0, OTbs, am, mir, msgr, xon, cols#80, lines#25, - clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H, - is2=\E[m\E[?7h, kcub1=^H, kcud1=\n, kcuf1=^L, kcuu1=^K, - khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, rc=\E[u, - rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR, - u7=\E[6n, use=klone+color, use=klone+sgr8, + clear=\E[2J, cub1=^H, cup=\E[%i%p1%d;%p2%dH, el=\E[k, + home=\E[H, is2=\E[m\E[?7h, kcub1=^H, kcud1=\n, kcuf1=^L, + kcuu1=^K, khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, + rc=\E[u, rmam=\E[?7l, sc=\E[s, smam=\E[?7h, use=ansi+cpr, + use=ansi+local1, use=klone+color, use=klone+sgr8, # Keypad: Home=\0G Up=\0H PrPag=\0I # ka1,kh kcuu1 kpp,ka3 @@ -685,7 +714,7 @@ ansi.sys-old|ANSI.SYS under PC-DOS 2.0, # # capability for F1-F48 -TD ansi.sys|ANSI.SYS 3.1 and later versions, - el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q, + el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kc1=\0O, kc3=\0Q, kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205, kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W, @@ -700,7 +729,7 @@ ansi.sys|ANSI.SYS 3.1 and later versions, pfkey=\E[0;%?%p1%{11}%<%t%':'%e%p1%{13}%<%t%'z'%e%p1%{23}%< %t%'G'%e%p1%{25}%<%t%'p'%e%p1%'#'%<%t%'E'%e%p1%'%'%<%t %'f'%e%p1%'/'%<%t%'C'%e%{92}%;%p1%+%d;%p2"%s"p, - use=ansi.sys-old, + use=ansi+arrows, use=ansi.sys-old, # # Define IBM PC keypad keys for vi as per MS-Kermit while using ANSI.SYS. @@ -790,41 +819,33 @@ st52-color|at-color|atari-color|atari_st-color|Atari ST with color, use=st52, st52|st52-m|at|at-m|atari|atari-m|atari_st|atarist-m|Atari ST, am, eo, mir, npc, - cols#80, it#8, lines#24, - bel=^G, civis=\Ef, clear=\EE, cnorm=\Ee, cr=\r, cub1=\ED, - cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, el1=\Eo, home=\EH, ht=^I, - il1=\EL, ind=\n, is2=\Ev\Eq\Ee, kLFT=\Ed, kRIT=\Ec, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=^?, - kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es, - kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EQ, - kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, kf8=\EW, - kf9=\EX, khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, kpp=\Ea, - kund=\EK, nel=\r\n, rc=\Ek, rev=\Ep, ri=\EI, rmso=\Eq, - rs2=\Ev\Eq\Ee, sc=\Ej, sgr0=\Eq, smso=\Ep, + civis=\Ef, clear=\EE, cnorm=\Ee, dl1=\EM, el1=\Eo, il1=\EL, + is2=\Ev\Eq\Ee, kLFT=\Ed, kRIT=\Ec, kdch1=^?, kf1=\EP, + kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es, kf15=\Et, + kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EQ, kf20=\Ey, + kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, + khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, + rc=\Ek, rev=\Ep, rmso=\Eq, rs2=\Ev\Eq\Ee, sc=\Ej, sgr0=\Eq, + smso=\Ep, use=vt52-basic, tw100|Toswin VT100 window manager, eo, mir, msgr, xon, colors#8, cols#80, it#8, lines#24, pairs#64, vt#3, acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxy yzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\Ef, - clear=\E[2J\E[H, cnorm=\Ee, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB, - cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\EA, dch1=\Ea, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, il1=\EL, ind=\n, is2=\E<\E)0, kbs=^H, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=^?, - kf1=\EOP, kf10=\EOY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es, - kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EOQ, - kf20=\Ey, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, - kf8=\EOW, kf9=\EOX, khlp=\EH, khome=\E\EE, kich1=\EI, - knp=\Eb, kpp=\E\Ea, kund=\EK, ll=\E[24H, nel=\EE, - oc=\E[30;47m, op=\E[30;47m, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmcup=\E[?7h, rmir=\Ei, rmkx=\E[?1l\E>, + clear=\E[2J\E[H, cnorm=\Ee, cr=\r, cub1=^H, cud1=\EB, + cuf1=\EC, cup=\E[%i%p1%d;%p2%dH, cuu1=\EA, dch1=\Ea, + dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, + el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il1=\EL, + ind=\n, is2=\E<\E)0, kdch1=^?, kf1=\EOP, kf10=\EOY, kf11=\Ep, + kf12=\Eq, kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, + kf18=\Ew, kf19=\Ex, kf2=\EOQ, kf20=\Ey, kf3=\EOR, kf4=\EOS, + kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, khlp=\EH, + khome=\E\EE, kich1=\EI, knp=\Eb, kpp=\E\Ea, kund=\EK, + ll=\E[24H, nel=\EE, oc=\E[30;47m, op=\E[30;47m, rev=\E[7m, + ri=\EM, rmacs=^O, rmcup=\E[?7h, rmir=\Ei, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=\E<\E[20l\E[?3;6;9l\E[r\Eq\E(B\017\E)0\E>, - sc=\E7, setb=\E[4%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%= %t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6' %=%t3%e7%;m, @@ -833,42 +854,38 @@ tw100|Toswin VT100 window manager, %=%t3%e7%;m, sgr0=\E[m, smacs=^N, smcup=\E[?7l, smir=\Eh, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, + use=ansi+apparrows, use=ansi+csr, use=ansi+local, + # The entries for stv52 and stv52pc probably need a revision. stv52|MiNT virtual console, am, msgr, - cols#80, it#8, lines#30, - bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE, - cnorm=\E. \Ee, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.", - dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL, - ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=^?, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, - kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, - kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, - kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE, - kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>, - op=\Eb@\EcO, rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, - rmso=\Eq, rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, - smcup=\Ev\Ee\Ez_, smso=\Ep, smul=\EyH, + lines#30, + blink=\Er, bold=\EyA, civis=\Ef, clear=\EE, cnorm=\E. \Ee, + cub1=^H, cvvis=\E.", dim=\Em, dl1=\EM, il1=\EL, ind=\n$<2*/>, + kdch1=^?, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, + kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, + kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, + kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, + kpp=\Ea, kund=\EK, nel=\r\n$<2*/>, op=\Eb@\EcO, rev=\Ep, + ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, rmso=\Eq, rmul=\EzH, + rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, smcup=\Ev\Ee\Ez_, smso=\Ep, + smul=\EyH, use=vt52-basic, stv52pc|MiNT virtual console with PC charset, am, msgr, - cols#80, it#8, lines#30, + lines#30, acsc=+\257\,\256-\^.v0\333I\374`\177a\260f\370g\361h\261j \331k\277l\332m\300n\305o\377p-q\304r-s_t+u+v+w+x\263y \363z\362{\343|\366}\234~\371, - bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE, - cnorm=\E. \Ee, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.", - dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL, - ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=^?, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, - kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, - kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, - kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE, - kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>, - rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, rmso=\Eq, - rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, smcup=\Ev\Ee\Ez_, - smso=\Ep, smul=\EyH, + blink=\Er, bold=\EyA, civis=\Ef, clear=\EE, cnorm=\E. \Ee, + cub1=^H, cvvis=\E.", dim=\Em, dl1=\EM, il1=\EL, ind=\n$<2*/>, + kdch1=^?, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, + kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, + kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, + kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, + kpp=\Ea, kund=\EK, nel=\r\n$<2*/>, rev=\Ep, ri=\EI$<2*/>, + rmcup=\Ev\E. \Ee\Ez_, rmso=\Eq, rmul=\EzH, + rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, smcup=\Ev\Ee\Ez_, smso=\Ep, + smul=\EyH, use=vt52-basic, # From: Simson L. Garfinkel atari-old|Atari st, @@ -876,8 +893,8 @@ atari-old|Atari st, cols#80, it#8, lines#25, clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, - ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep, + ed=\EJ, el=\EK, ht=^I, il1=\EL, ri=\EI, rmso=\Eq, sgr0=\Eq, + smso=\Ep, use=vt52+arrows, # UniTerm terminal program for the Atari ST: 49-line VT220 emulation mode # From: Paul M. Aoki uniterm|uniterm49|UniTerm VT220 emulator with 49 lines, @@ -907,30 +924,26 @@ st52-old|Atari ST with VT52 emulation, # BeOS entry for Terminal program Seems to be almost ANSI beterm|BeOS Terminal, am, eo, mir, msgr, xenl, xon, - colors#8, cols#80, it#8, lines#25, ncv#5, pairs#64, - bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[11~, - kf10=\E[20~, kf11=\E[21~, kf12=\E[22~, kf2=\E[12~, - kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[16~, kf7=\E[17~, - kf8=\E[18~, kf9=\E[19~, kspd=^Z, nel=\r\n, op=\E[m, rc=\E8, - rev=\E[7m, ri=\EM, rmir=\E[4l, rmkx=\E[?4l, rmso=\E[m, - rmul=\E[24m, rs1=\Ec, sc=\E7, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, setb=\E[%p1%{40}%+%cm, - setf=\E[%p1%{30}%+%cm, sgr0=\E[0;10m, smir=\E[4h, - smkx=\E[?4h, smso=\E[7m, smul=\E[4m, - u6=\E[%i%p1%d;%p2%dR, u7=\E[6n, vpa=\E[%i%p1%dd, - use=vt220+pcedit, + cols#80, it#8, lines#25, ncv#5, + bel=^G, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ech=\E[%p1%dX, el1=\E[1K, + home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ind=\n, + kf1=\E[11~, kf10=\E[20~, kf11=\E[21~, kf12=\E[22~, + kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[16~, + kf7=\E[17~, kf8=\E[18~, kf9=\E[19~, khome=\E[1~, kspd=^Z, + nel=\r\n, op=\E[m, rev=\E[7m, ri=\EM, rmkx=\E[?4l, rmso=\E[m, + rmul=\E[24m, rs1=\Ec, setb=\E[%p1%{40}%+%cm, + setf=\E[%p1%{30}%+%cm, sgr0=\E[0;10m, smkx=\E[?4h, + smso=\E[7m, smul=\E[4m, u6=\E[%i%p1%d;%p2%dR, u7=\E[6n, + vpa=\E[%i%p1%dd, use=ansi+arrows, use=ansi+csr, + use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+local, use=klone+color, use=vt220+pcedit, #### Linux consoles # +# release 1.2.13: 1995/03 +# # This entry is good for the 1.2.13 or later version of the Linux console. # # *************************************************************************** @@ -954,34 +967,30 @@ beterm|BeOS Terminal, # All linux kernels since 1.2.13 (at least) set the screen size # themselves; this entry assumes that capability. # -linux-basic|Linux console, +linux-basic|Linux console (basic), am, bce, eo, mir, msgr, xenl, xon, it#8, ncv#18, U8#1, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, - el=\E[K, el1=\E[1K, flash=\E[?5h$<200/>\E[?5l, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\n, kb2=\E[G, kbs=^?, kcbt=\E[Z, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[[A, + bel=^G, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, + dim=\E[2m, ech=\E[%p1%dX, el1=\E[1K, + flash=\E[?5h$<200/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, + ht=^I, hts=\EH, ind=\n, kb2=\E[G, kbs=^?, kcbt=\E[Z, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, kmous=\E[M, kspd=^Z, nel=\r\n, - rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l, rmir=\E[4l, - rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, + kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kmous=\E[M, kspd=^Z, + nel=\r\n, ri=\EM, rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m, + rs1=\Ec\E]R, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5 %t;2%;%?%p6%t;1%;%?%p9%t;11%;m, - smam=\E[?7h, smir=\E[4h, smul=\E[4m, tbc=\E[3g, - vpa=\E[%i%p1%dd, use=vt220+pcedit, use=vt102+enq, + smam=\E[?7h, tbc=\E[3g, vpa=\E[%i%p1%dd, use=ansi+arrows, + use=ansi+csr, use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+local, use=vt220+pcedit, use=vt102+enq, use=klone+sgr, use=ecma+color, use=linux+sfkeys, linux+decid|ncurses extension for Linux console DECID, - u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\EZ, + u8=\E[?6c, use=decid+cpr, linux+sfkeys|shifted function-keys for Linux console, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, @@ -991,6 +1000,8 @@ linux-m|Linux console no color, colors@, pairs@, setab@, setaf@, setb@, setf@, use=linux, +# release 1.3: 1995/06 +# # The 1.3.x kernels add color-change capabilities; if yours doesn't have this # and it matters, turn off . The %02x escape used to implement this is # not supposedly back-portable to older SV curses (although it has worked fine @@ -1015,6 +1026,8 @@ linux-c|Linux console 1.3.6+ for older ncurses, %d%;, oc=\E]R, use=linux-basic, +# release 2.2: 1999/01 +# # The 2.2.x kernels add a private mode that sets the cursor type; use that to # get a block cursor for cvvis. # reported by Frank Heckenbach . @@ -1022,6 +1035,8 @@ linux2.2|Linux 2.2.x console, civis=\E[?25l\E[?1c, cnorm=\E[?25h\E[?0c, cvvis=\E[?25h\E[?8c, use=linux-c-nc, +# release 2.6: 2003/12 - 2004/12 +# # Linux 2.6.x has a fix for SI/SO to work with UTF-8 encoding added here: # http://lkml.iu.edu/hypermail/linux/kernel/0602.2/0738.html # Although the kernel has mappings for these, they were not in the default @@ -1119,6 +1134,8 @@ linux-vt|Linux console using VT codes for graphics, rmacs=\E(K, rmpch@, sgr@, sgr0=\E[0m\E(K\017, smacs=\E(0, smpch@, use=linux, +# release: 0.3.9b 1997/01 to 2000/05 +# # This is based on the Linux console (relies on the console to perform some # of the functionality), but does not recognize as many control sequences. # The program comes bundled with an old (circa 1998) copy of the Linux @@ -1129,11 +1146,35 @@ linux-vt|Linux console using VT codes for graphics, # \E[y,xf same as \E[y,xH # # Note: The status-line support is buggy (dsl does not work). -kon|kon2|jfbterm|Kanji ON Linux console, - ccc@, hs, - civis@, cnorm@, cvvis@, dsl=\E[?H, flash@, fsl=\E[?F, initc@, - initp@, kcbt@, oc@, op=\E[37;40m, rs1=\Ec, tsl=\E[?T, - use=linux, +kon|kon2|Kanji ON Linux console, + am, bce, ccc, eo, eslok, hs, mir, msgr, xenl, xon, + it#8, ncv#18, + bel=^G, civis=\E[?25l, cnorm=\E[?25h, cr=\r, cub1=^H, + cud1=\n, cup=\E[%i%p1%d;%p2%dH, dim=\E[2m, + dsl=\E[?H\E[?E, el1=\E[1K, fsl=\E[?F, home=\E[H, + hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ind=\n, + initc=\E]P%p1%x%p2%02x%p3%02x%p4%02x, kb2=\E[G, kbs=^?, + kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, + kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kspd=^Z, + nel=\r\n, op=\E[37;40m, ri=\EM, rmso=\E[27m, rmul=\E[24m, + rs1=\Ec, + sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5 + %t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, + sgr0=\E[0;10m, tbc=\E[3g, tsl=\E[?T, u8=\E[?6c, + vpa=\E[%i%p1%dd, use=ansi+arrows, use=ansi+csr, + use=ansi+enq, use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+local, use=ansi+sgrbold, use=ecma+sgr, + use=klone+color, use=vt220+pcedit, + +# release: 0.4.7 2005/05 +# +jfbterm|japanese framebuffer terminal, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy + yzz{{||}}~~, + sgr0=\E[0m, use=kon, # FbTerm # Another variant. There are two parts (src, src/lib) with the latter @@ -1198,15 +1239,15 @@ bterm|bogl virtual terminal, acsc=aajjkkllmmqqttuuxx, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ind=\n, kb2=\E[G, kbs=^?, kcbt=\E[Z, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[[A, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, - kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, - kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, kmous=\E[M, kspd=^Z, nel=\r\n, - op=\E[49m\E[39m, rev=\E[7m, ri=\EM, rmacs=^O, rmso=\E[27m, - rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, - sgr0=\E[0m, smacs=^N, smso=\E[7m, smul=\E[4m, + kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, + kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, + kmous=\E[M, kspd=^Z, nel=\r\n, op=\E[49m\E[39m, rev=\E[7m, + ri=\EM, rmacs=^O, rmso=\E[27m, rmul=\E[24m, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0m, smacs=^N, + smso=\E[7m, smul=\E[4m, use=ansi+arrows, use=vt220+pcedit, use=vt220+cvis, #### Mach @@ -1214,19 +1255,17 @@ bterm|bogl virtual terminal, # From: Matthew Vernon mach|Mach console, - am, km, + am, km, NQ, cols#80, it#8, lines#25, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\Ec, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=\n, - kbs=^?, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[9, kend=\E[Y, kf1=\EOP, kf10=\EOY, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, - kf9=\EOX, khome=\E[H, kich1=\E[@, kll=\E[F, knp=\E[U, - kpp=\E[V, rev=\E[7m, rmso=\E[0m, rmul=\E[24m, sgr0=\E[0m, - smso=\E[7m, smul=\E[4m, + bel=^G, blink=\E[5m, bold=\E[1m, clear=\Ec, cr=\r, cub1=^H, + cud1=\n, cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, + home=\E[H, ht=^I, ind=\n, kbs=^?, kdch1=\E[9, kend=\E[Y, + kf1=\EOP, kf10=\EOY, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, + kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, kich1=\E[@, kll=\E[F, + knp=\E[U, kpp=\E[V, rev=\E[7m, rmso=\E[0m, rmul=\E[24m, + sgr0=\E[0m, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+idl, use=ansi+local, + mach-bold|Mach console with bold instead of underline, rmul=\E[0m, smul=\E[1m, use=mach, mach-color|Mach console with ANSI color, @@ -1250,7 +1289,7 @@ mach-gnu|GNU Mach, 2%;%?%p6%t;1%;%?%p7%t;8%;m, use=ecma+index, use=mach, -mach-gnu-color|Mach console with ANSI color, +mach-gnu-color|GNU Mach console with ANSI color, colors#8, pairs#64, op=\E[37;40m, rmso=\E[27m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=mach-gnu, @@ -1283,34 +1322,29 @@ mach-gnu-color|Mach console with ANSI color, # # Reading the source, RIS resets cnorm, but not xmous. hurd|The GNU Hurd console server, - am, bce, bw, eo, km, mir, msgr, xenl, xon, - colors#8, it#8, ncv#18, pairs#64, + am, bce, bw, eo, km, mir, msgr, xenl, xon, NQ, + it#8, ncv#18, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy yzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\Ec, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - el1=\E[1K, flash=\Eg, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, - ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, - invis=\E[8m, kb2=\E[G, kbs=^?, kcbt=\E[Z, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf10=\E[21~, + bel=^G, cbt=\E[Z, clear=\Ec, cr=\r, cub1=^H, cvvis=\E[34l, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ech=\E[%p1%dX, + el1=\E[1K, flash=\Eg, ht=^I, ich=\E[%p1%d@, ind=\E[S, + kb2=\E[G, kbs=^?, kcbt=\E[Z, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - kich1=\E[2~, kmous=\E[M, kspd=^Z, nel=\r\n, op=\E[39;49m, - rc=\E8, rev=\E[7m, ri=\E[T, rmacs=\E[10m, rmir=\E[4l, - rmso=\E[27m, rmul=\E[24m, rs1=\EM\E[?1000l, sc=\E7, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + khome=\E[1~, kmous=\E[M, kspd=^Z, nel=\r\n, op=\E[39;49m, + ri=\E[T, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, + rs1=\EM\E[?1000l, sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t; 2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, - sgr0=\E[0m, smacs=\E[11m, smir=\E[4h, smso=\E[7m, - smul=\E[4m, vpa=\E[%i%p1%dd, grbom=\E[>1l, gsbom=\E[>1h, - use=vt220+pcedit, use=ecma+index, use=ecma+italics, - use=vt220+cvis, + smir=\E[4h, grbom=\E[>1l, gsbom=\E[>1h, + use=ansi+apparrows, use=ansi+csr, use=ansi+cup, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ansi+rca2, use=ansi+sgrbold, use=vt220+pcedit, + use=ecma+index, use=ecma+italics, use=klone+acs, + use=klone+color, use=vt220+cvis, #### QNX # @@ -1413,25 +1447,21 @@ qnxt2|QNX 2.15 serial terminal, # QNX ANSI terminal definition qansi-g|QNX ANSI, am, eslok, hs, xon, - colors#8, cols#80, it#8, lines#25, ncv#19, pairs#64, wsl#80, + colors#8, cols#80, lines#25, ncv#19, pairs#64, wsl#80, acsc=Oa``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[2J\E[H, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[1M, dsl=\E[r, ech=\E[%p1%dX, ed=\E[J, - el=\E[K, el1=\E[1K\E[X, flash=\E[?5h$<200>\E[?5l, - fsl=\E[?6h\E8, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, - ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L, - ind=\E[S, invis=\E[9m, + bel=^G, clear=\E[2J\E[H, cr=\r, csr=\E[%i%p1%d;%p2%dr, + cup=\E[%i%p1%d;%p2%dH$<5>, cvvis=\E[?12;25h, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, + dl1=\E[1M, dsl=\E[r, ech=\E[%p1%dX, ed=\E[J, el=\E[K, + el1=\E[1K\E[X, flash=\E[?5h$<200>\E[?5l, fsl=\E[?6h\E8, + home=\E[H, hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[1@, + il=\E[%p1%dL, il1=\E[1L, ind=\E[S, invis=\E[9m, is2=\E>\E[?1l\E[?7h\E[0;10;39;49m, is3=\E(B\E)0, kBEG=\ENn, kCAN=\E[s, kCMD=\E[t, kCPY=\ENs, kCRT=\ENt, kDL=\ENv, kEXT=\ENw, kFND=\ENx, kHLP=\ENy, kHOM=\E[h, kLFT=\E[d, kNXT=\E[u, kOPT=\ENz, kPRV=\E[v, kRIT=\E[c, - kbs=^H, kcan=\E[S, kcbt=\E[Z, kclo=\ENc, kclr=\ENa, - kcmd=\E[G, kcpy=\E[g, kctab=\E[z, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[p, kend=\E[Y, + kcan=\E[S, kcbt=\E[Z, kclo=\ENc, kclr=\ENa, kcmd=\E[G, + kcpy=\E[g, kctab=\E[z, kdch1=\E[P, kdl1=\E[p, kend=\E[Y, kext=\E[y, kf1=\EOP, kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf13=\EOp, kf14=\EOq, kf15=\EOr, kf16=\EOs, kf17=\EOt, kf18=\EOu, kf19=\EOv, kf2=\EOQ, kf20=\EOw, kf21=\EOx, @@ -1443,13 +1473,13 @@ qansi-g|QNX ANSI, kf42=\E[22~, kf43=\E[23~, kf44=\E[24~, kf45=\E[25~, kf46=\E[26~, kf47=\E[27~, kf48=\E[28~, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, kfnd=\ENf, khlp=\ENh, - khome=\E[H, khts=\ENb, kich1=\E[@, kil1=\E[`, kind=\E[a, - kmov=\ENi, kmrk=\ENm, kmsg=\ENe, knp=\E[U, kopn=\ENo, - kopt=\ENk, kpp=\E[V, kref=\ENl, kres=\ENp, krfr=\ENg, - kri=\E[b, krpl=\ENr, krst=\ENj, ksav=\ENq, kslt=\E[T, - ktbc=\ENd, kund=\ENu, ll=\E[99H, nel=\EE, op=\E[39;49m, - rev=\E[7m, ri=\E[T, rmacs=^O, rmam=\E[?7l, rmso=\E[27m, - rmul=\E[24m, rs1=\017\E[?7h\E[0;39;49m$<2>\E>\E[?1l, + khts=\ENb, kich1=\E[@, kil1=\E[`, kind=\E[a, kmov=\ENi, + kmrk=\ENm, kmsg=\ENe, knp=\E[U, kopn=\ENo, kopt=\ENk, + kpp=\E[V, kref=\ENl, kres=\ENp, krfr=\ENg, kri=\E[b, + krpl=\ENr, krst=\ENj, ksav=\ENq, kslt=\E[T, ktbc=\ENd, + kund=\ENu, ll=\E[99H, nel=\EE, op=\E[39;49m, ri=\E[T, + rmacs=^O, rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m, + rs1=\017\E[?7h\E[0;39;49m$<2>\E>\E[?1l, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, @@ -1457,10 +1487,11 @@ qansi-g|QNX ANSI, %=%t3%e%p1%d%;m, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%t;7%;%?%p7%t;9%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, - tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH, use=ansi+rep, - use=att610+cvis0, use=ecma+index, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, + tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH, use=ansi+arrows, + use=ansi+local, use=ansi+rep, use=ansi+inittabs, + use=ansi+sgrbold, use=att610+cvis0, use=decid+cpr, + use=ecma+index, # qansi|QNX ANSI with console writes, daisy, xhpa, use=qansi-g, @@ -1509,36 +1540,34 @@ qansi-w|QNX ANSI for windows, # # Console documents only 3 attributes can be set with SGR (so we don't use sgr). scoansi-old|SCO Extended ANSI standard crt (5.0.5), - OTbs, am, bce, eo, xon, + OTbs, am, bce, eo, xon, NQ, colors#8, cols#80, it#8, lines#25, pairs#64, acsc=+/\,.-\230.\2310[5566778899::;;<<==>>FFGGHHIIJJKKLLMMNN OOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3 yszr{c}\034~\207, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[=14;12C, clear=\E[H\E[2J, cnorm=\E[=10;12C, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[=0;12C, dch=\E[%p1%dP, - dch1=\E[P, dispc=\E[=%p1%dg, dl=\E[%p1%dM, dl1=\E[M, - ed=\E[m\E[J, el=\E[m\E[K, el1=\E[1K, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, - ind=\E[S, invis=\E[8m, kbeg=\E[E, kbs=^H, kcbt=\E[Z, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=^?, - kend=\E[F, kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X, - kf13=\E[Y, kf15=\E[a, kf16=\E[b, kf17=\E[c, kf18=\E[d, - kf19=\E[e, kf2=\E[N, kf20=\E[f, kf21=\E[g, kf22=\E[h, - kf23=\E[i, kf24=\E[j, kf25=\E[k, kf26=\E[l, kf27=\E[m, - kf28=\E[n, kf29=\E[o, kf3=\E[O, kf30=\E[p, kf31=\E[q, - kf32=\E[r, kf33=\E[s, kf34=\E[t, kf35=\E[u, kf36=\E[v, - kf37=\E[w, kf38=\E[x, kf39=\E[y, kf4=\E[P, kf40=\E[z, - kf41=\E[@, kf42=\E[[, kf43=\E[\\, kf44=\E[], kf45=\E[\^, - kf46=\E[_, kf47=\E[`, kf48=\E[{, kf5=\E[Q, kf6=\E[R, - kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, kich1=\E[L, + cub1=^H, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[=0;12C, + dch=\E[%p1%dP, dch1=\E[P, dispc=\E[=%p1%dg, ed=\E[m\E[J, + el=\E[m\E[K, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, + ich=\E[%p1%d@, ich1=\E[@, ind=\E[S, invis=\E[8m, kbeg=\E[E, + kcbt=\E[Z, kdch1=^?, kend=\E[F, kf1=\E[M, kf10=\E[V, + kf11=\E[W, kf12=\E[X, kf13=\E[Y, kf15=\E[a, kf16=\E[b, + kf17=\E[c, kf18=\E[d, kf19=\E[e, kf2=\E[N, kf20=\E[f, + kf21=\E[g, kf22=\E[h, kf23=\E[i, kf24=\E[j, kf25=\E[k, + kf26=\E[l, kf27=\E[m, kf28=\E[n, kf29=\E[o, kf3=\E[O, + kf30=\E[p, kf31=\E[q, kf32=\E[r, kf33=\E[s, kf34=\E[t, + kf35=\E[u, kf36=\E[v, kf37=\E[w, kf38=\E[x, kf39=\E[y, + kf4=\E[P, kf40=\E[z, kf41=\E[@, kf42=\E[[, kf43=\E[\\, + kf44=\E[], kf45=\E[\^, kf46=\E[_, kf47=\E[`, kf48=\E[{, + kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, kich1=\E[L, knp=\E[G, kpp=\E[I, op=\E[0;37;40m, rc=\E8, rev=\E[7m, ri=\E[T, rmacs=\E[10m, rmam=\E[?7l, rmso=\E[m, rmul=\E[m, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0;10m, smacs=\E[12m, smam=\E[?7h, smso=\E[7m, - smul=\E[4m, use=ecma+index, + smul=\E[4m, use=ansi+arrows, use=ansi+idl, + use=ansi+local, use=ecma+index, + scoansi-new|SCO Extended ANSI standard crt (5.0.6), km, civis=\E[=0c, cnorm=\E[=1c, csr=\E[%i%p1%d;%p2%dr, @@ -1595,36 +1624,33 @@ iris-ansi|iris-ansi-net|IRIS emulating 40 line ANSI terminal (almost VT100), am, cols#80, it#8, lines#40, bel=^G, bold=\E[1m, clear=\E[H\E[2J, - cnorm=\E[9/y\E[12/y\E[=6l, cr=\r, cub=\E[%p1%dD, - cub1=\E[D, cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, cvvis=\E[10/y\E[=1h\E[=2l\E[=6h, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=\ED, + cnorm=\E[9/y\E[12/y\E[=6l, cr=\r, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, + cvvis=\E[10/y\E[=1h\E[=2l\E[=6h, ed=\E[J, el=\E[K, + el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=\ED, is2=\E[?1l\E>\E[?7h\E[100g\E[0m\E7\E[r\E8, kDC=\E[P, kEND=\E[147q, kHOM=\E[143q, kLFT=\E[158q, kPRT=\E[210q, - kRIT=\E[167q, kSPD=\E[218q, kbs=^H, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=^?, kend=\E[146q, - kent=\r, kf1=\E[001q, kf10=\E[010q, kf11=\E[011q, - kf12=\E[012q, kf2=\E[002q, kf3=\E[003q, kf4=\E[004q, - kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, kf8=\E[008q, - kf9=\E[009q, khome=\E[H, kich1=\E[139q, knp=\E[154q, + kRIT=\E[167q, kSPD=\E[218q, kcbt=\E[Z, kdch1=^?, + kend=\E[146q, kent=\r, kf1=\E[001q, kf10=\E[010q, + kf11=\E[011q, kf12=\E[012q, kf2=\E[002q, kf3=\E[003q, + kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, + kf8=\E[008q, kf9=\E[009q, kich1=\E[139q, knp=\E[154q, kpp=\E[150q, kprt=\E[209q, krmir=\E[146q, kspd=\E[217q, nel=\EE, pfkey=\EP101;%p1%d.y%p2%s\E\\, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, smam=\E[?7h, smso=\E[1;7m, smul=\E[4m, - tbc=\E[3g, + tbc=\E[3g, use=ansi+arrows, use=ansi+idl, use=ansi+local, + iris-ansi-ap|IRIS ANSI in application-keypad mode, - is2=\E[?1l\E=\E[?7h, kent=\EOM, kf10=\E[010q, - kf11=\E[011q, kf12=\E[012q, kf9=\E[009q, use=iris-ansi, + is2=\E[?1l\E=\E[?7h, kent=\EOM, use=iris-ansi, # From the man-page, this is a quasi-vt100 emulator that runs on SGI's IRIX # (T.Dickey 98/1/24) iris-color|xwsh|IRIX ANSI with color, ncv#33, csr=\E[%i%p1%d;%p2%dr, dch=\E[%p1%dP, dim=\E[2m, - ech=\E[%p1%dX, ich=\E[%p1%d@, rc=\E8, rmul=\E[24m, rs1=\Ec, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + ech=\E[%p1%dX, ich=\E[%p1%d@, rmul=\E[24m, rs1=\Ec, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, use=ecma+italics, use=vt100+enq, use=klone+color, use=iris-ansi-ap, @@ -1650,15 +1676,14 @@ iris-color|xwsh|IRIX ANSI with color, # CSI ? 5 h Reverse Video (DECSCNM). # pccon+keys|OpenBSD PC keyboard keys, - kbs=^?, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[3~, kend=\E[8~, kent=\r, kf1=\E[11~, kf10=\E[21~, + kbs=^?, kend=\E[8~, kent=\r, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf21=\E[35~, kf22=\E[36~, kf23=\E[37~, kf24=\E[38~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, - kf9=\E[20~, khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - krfr=^R, + kf9=\E[20~, khome=\E[7~, krfr=^R, use=ansi+arrows, + use=vt220+pcedit, pccon+sgr+acs0|sgr and simple ASCII pseudographics for OpenBSD PC console, acsc=+>\,<-\^.v0#`+a:f\\h#i#j+k+l+m+n+o~p-q-r-s_t+u+v+w+x|y# z#{*|!}#~o, @@ -1674,8 +1699,8 @@ pccon+sgr+acs|sgr and default ASCII pseudographics for OpenBSD PC console, # underline renders as color pccon+colors|ANSI colors for OpenBSD PC console, bce, - colors#8, ncv#2, pairs#64, - op=\E[49;39m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + ncv#2, + op=\E[49;39m, use=klone+color, # OpenBSD uses wscons, # + which does not implement DECSCNM or anything comparable, so it does not # support flash. @@ -1683,15 +1708,13 @@ pccon+colors|ANSI colors for OpenBSD PC console, pccon+base|base capabilities for OpenBSD PC console, am, km, mc5i, msgr, npc, nxon, xenl, xon, cols#80, it#8, lines#24, - bel=^G, clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\ED, nel=\EE, rc=\E8, ri=\EM, - rmam=\E[?7l, rmul=\E[24m, rs2=\Ec, sc=\E7, smam=\E[?7h, - smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, + bel=^G, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, ech=\E[%p1%dX, el1=\E[1K, + home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ind=\ED, nel=\EE, + ri=\EM, rmam=\E[?7l, rmul=\E[24m, rs2=\Ec, smam=\E[?7h, + smul=\E[4m, tbc=\E[3g, use=ansi+cpr, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+local, + pccon0-m|OpenBSD PC console without colors & with simple ASCII pseudographics, use=pccon+sgr+acs0, use=pccon+base, use=pccon+keys, pccon0|OpenBSD PC console with simple ASCII pseudographics, @@ -1720,25 +1743,22 @@ pcvtXX|pcvt VT200 emulator (DEC VT220), it#8, vt#3, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy yzz~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\ED, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ind=\ED, is1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, kbs=^?, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\E[17~, kf2=\E[18~, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, khome=\E[1~, kich1=\E[2~, kll=\E[4~, knp=\E[6~, kpp=\E[5~, - nel=\EE, rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt100, - ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, - rs1=\Ec\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr0=\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - use=ecma+index, use=vt220+cvis, + nel=\EE, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, + rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[27m, rmul=\E[24m, + rs1=\Ec\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m, + smacs=\E(0, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=ansi+apparrows, + use=ansi+csr, use=ansi+erase, use=ansi+idl, + use=ansi+local, use=decid+cpr, use=ecma+index, + use=vt220+cvis, # NetBSD/FreeBSD VT220 terminal emulator console (pc keyboard & monitor) # termcap entries for pure VT220-Emulation and 25, 28, 35, 40, 43 and @@ -1800,28 +1820,21 @@ pcvt25-color|DEC VT220 emulation with 25 lines and color, # modified codes for setf/setb to setaf/setab, then to klone+color, corrected # typo in invis - TD arm100|arm100-am|Arm(RiscPC) ncurses compatible (for 640x480), - am, bce, msgr, xenl, xon, - cols#80, it#8, lines#30, + bce, xenl, xon, + lines#30, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, - cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, - enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=\n, - invis=\E[8m$<2>, ka1=\E[q, ka3=\E[s, kb2=\E[r, kbs=^H, - kc1=\E[p, kc3=\E[n, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kent=\E[M, kf0=\E[y, kf1=\E[P, kf10=\E[x, - kf2=\E[Q, kf3=\E[R, kf4=\E[S, kf5=\E[t, kf6=\E[u, kf7=\E[v, - kf8=\E[l, kf9=\E[w, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, + blink=\E[5m$<2>, bold=\E[1m$<2>, cub1=^H, cud1=\n, + cuf1=\E[C$<2>, cuu1=\E[A$<2>, invis=\E[8m$<2>, ka1=\E[q, + ka3=\E[s, kb2=\E[r, kc1=\E[p, kc3=\E[n, kent=\E[M, kf0=\E[y, + kf1=\E[P, kf10=\E[x, kf2=\E[Q, kf3=\E[R, kf4=\E[S, kf5=\E[t, + kf6=\E[u, kf7=\E[v, kf8=\E[l, kf9=\E[w, rev=\E[7m$<2>, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, - rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - sc=\E7, + rmul=\E[m$<2>, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, use=ecma+sgr, + smso=\E[7m$<2>, smul=\E[4m$<2>, use=ansi+csr, + use=ansi+local, use=ecma+sgr, use=vt100+4bsd, use=klone+color, arm100-w|arm100-wam|Arm(RiscPC) ncurses compatible (for 1024x768), @@ -1832,7 +1845,7 @@ arm100-w|arm100-wam|Arm(RiscPC) ncurses compatible (for 1024x768), # From Minoura Makoto , 12 May 1996 x68k|x68k-ite|NetBSD/x68k ITE, cols#96, lines#32, - kclr=\E[9~, khlp=\E[28~, use=vt220-base, + kbs=^?, kclr=\E[9~, khlp=\E[28~, use=vt220-base, # : # Entry for the DNARD OpenFirmware console, close to ANSI but not quite. @@ -1858,8 +1871,9 @@ ofcons|DNARD OpenFirmware console, sgr0=\2330m, smso=\2337m, smul=\2334m, # NetBSD "wscons" emulator in VT220 mode. -# This entry is based on the NetBSD termcap entry, correcting the ncv value. -# The emulator renders underlined text in red. Colors are otherwise usable. +# This entry is based on the NetBSD termcap entry. The emulator renders +# underlined text in red. Colors are otherwise usable. NetBSD developers +# prefer to not specify the corresponding ncv value. # # Testing the emulator and reading the source code (NetBSD 2.0), it appears # that "vt220" is inaccurate. There are a few VT220-features, but most of the @@ -1870,13 +1884,12 @@ ofcons|DNARD OpenFirmware console, # the level of detail in a termcap, it is a passable emulator, since ECH does # work. Don't use it on a VMS system -TD wsvt25|NetBSD wscons in 25 line DEC VT220 mode, - bce, msgr, - colors#8, cols#80, it#8, lines#25, ncv#2, pairs#64, + bce, + colors#8, lines#25, pairs#64, is2=\E[r\E[25;1H, kdch1=\E[3~, kend=\E[8~, kf1=\E[11~, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, - kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[7~, op=\E[m, rs1=\Ec, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=vt220, + kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, + khome=\E[7~, op=\E[m, rs1=\Ec, setab=\E[4%p1%dm, + setaf=\E[3%p1%dm, use=vt220, wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta, km, use=wsvt25, @@ -1935,24 +1948,22 @@ rcons-color|BSD rasterconsole with ANSI color, mgterm|MGL/MGL2 MobileGear Graphic Library, OTbs, OTpt, am, bce, bw, eo, km, msgr, npc, colors#8, cols#80, it#8, lines#18, pairs#64, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[30;1m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, - home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, kb2=\E[E, - kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=^?, kend=\E[F, kf1=\E[M, kf10=\E[V, - kf11=\E[W, kf12=\E[X, kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, - kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, - kich1=\E[L, knp=\E[G, kpp=\E[I, nel=\E[E, op=\E[x, rc=\E8, - rev=\E[7m, ri=\E[T, rmso=\E[m, rs2=\E[x\E[m\Ec, sc=\E7, - setb=\E[4%p1%dm, setf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, - vpa=\E[%i%p1%dd, use=ecma+index, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[30;1m, ech=\E[%p1%dX, el1=\E[1K, home=\E[H, + hpa=\E[%i%p1%d`, ht=^I, ich=\E[%p1%d@, ich1=\E[@, ind=\E[S, + kb2=\E[E, kcbt=\E[Z, kdch1=^?, kend=\E[F, kf1=\E[M, + kf10=\E[V, kf11=\E[W, kf12=\E[X, kf2=\E[N, kf3=\E[O, + kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, + kich1=\E[L, knp=\E[G, kpp=\E[I, nel=\E[E, op=\E[x, rev=\E[7m, + ri=\E[T, rmso=\E[m, rs2=\E[x\E[m\Ec, setb=\E[4%p1%dm, + setf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, vpa=\E[%i%p1%dd, + use=ansi+arrows, use=ansi+csr, use=ansi+erase, + use=ansi+idl, use=ansi+local, use=ecma+index, #### FreeBSD console entries + +# Originally from termcap: # # From: Andrey Chernov 29 Mar 1996 # Andrey Chernov maintains the FreeBSD termcap distributions. @@ -1964,8 +1975,9 @@ mgterm|MGL/MGL2 MobileGear Graphic Library, # I have seen FreeBSD-2.1.5R... The old el1 bug changed, but it is still there. # Now el1 clears not only to the line beginning, but also a large chunk # of previous line. But there is another bug - ech does not work at all. -# +# syscons, sc - the console driver +# # for syscons # common entry without semigraphics # Bug: The capability resets attributes. @@ -1976,40 +1988,37 @@ mgterm|MGL/MGL2 MobileGear Graphic Library, # Setting colors turns off reverse; we cannot guarantee order, so use ncv. # Note that this disables standout with color. # -# The emulator sends difference strings based on shift- and control-keys, +# The emulator sends different strings based on shift- and control-keys, # like scoansi: # F13-F24 are shifted F1-F12 # F25-F36 are control F1-F12 # F37-F48 are shift+control F1-F12 cons25w|ansiw|ansi80x25-raw|FreeBSD console (25-line raw mode), am, bce, bw, eo, msgr, npc, - colors#8, cols#80, it#8, lines#25, ncv#21, pairs#64, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cnorm=\E[=0C, cr=\r, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, - cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[=1C, dch=\E[%p1%dP, dch1=\E[P, dim=\E[30;1m, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, + cols#80, it#8, lines#25, ncv#21, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, cnorm=\E[=0C, + cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[=1C, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[30;1m, ech=\E[%p1%dX, home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, kb2=\E[E, - kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=^?, kend=\E[F, kf1=\E[M, kf10=\E[V, - kf11=\E[W, kf12=\E[X, kf13=\E[Y, kf14=\E[Z, kf15=\E[a, - kf16=\E[b, kf17=\E[c, kf18=\E[d, kf19=\E[e, kf2=\E[N, - kf20=\E[f, kf21=\E[g, kf22=\E[h, kf23=\E[i, kf24=\E[j, - kf25=\E[k, kf26=\E[l, kf27=\E[m, kf28=\E[n, kf29=\E[o, - kf3=\E[O, kf30=\E[p, kf31=\E[q, kf32=\E[r, kf33=\E[s, - kf34=\E[t, kf35=\E[u, kf36=\E[v, kf37=\E[w, kf38=\E[x, - kf39=\E[y, kf4=\E[P, kf40=\E[z, kf41=\E[@, kf42=\E[[, - kf43=\E[\\, kf44=\E[], kf45=\E[\^, kf46=\E[_, kf47=\E[`, - kf48=\E[{, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, - khome=\E[H, kich1=\E[L, knp=\E[G, kpp=\E[I, nel=\E[E, - op=\E[x, rc=\E8, rev=\E[7m, ri=\E[T, rmso=\E[m, - rs2=\E[x\E[m\Ec, sc=\E7, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, + ich1=\E[@, ind=\E[S, kb2=\E[E, kcbt=\E[Z, kdch1=^?, + kend=\E[F, kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X, + kf13=\E[Y, kf14=\E[Z, kf15=\E[a, kf16=\E[b, kf17=\E[c, + kf18=\E[d, kf19=\E[e, kf2=\E[N, kf20=\E[f, kf21=\E[g, + kf22=\E[h, kf23=\E[i, kf24=\E[j, kf25=\E[k, kf26=\E[l, + kf27=\E[m, kf28=\E[n, kf29=\E[o, kf3=\E[O, kf30=\E[p, + kf31=\E[q, kf32=\E[r, kf33=\E[s, kf34=\E[t, kf35=\E[u, + kf36=\E[v, kf37=\E[w, kf38=\E[x, kf39=\E[y, kf4=\E[P, + kf40=\E[z, kf41=\E[@, kf42=\E[[, kf43=\E[\\, kf44=\E[], + kf45=\E[\^, kf46=\E[_, kf47=\E[`, kf48=\E[{, kf5=\E[Q, + kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, kich1=\E[L, knp=\E[G, + kpp=\E[I, nel=\E[E, op=\E[x, rc=\E8, rev=\E[7m, ri=\E[T, + rmso=\E[m, rs2=\E[x\E[m\Ec, sc=\E7, sgr=\E[0%?%p1%t;2;7%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;30;1%;%? %p6%t;1%;m, - sgr0=\E[m, smso=\E[7m, vpa=\E[%i%p1%dd, use=ecma+index, + sgr0=\E[m, smso=\E[7m, vpa=\E[%i%p1%dd, use=ansi+arrows, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ecma+index, use=klone+color, + cons25|ansis|ansi80x25|FreeBSD console (25-line ANSI mode), acsc=-\030.^Y0\333`\004a\260f\370g\361h\261i\025j\331k\277l \332m\300n\305q\304t\303u\264v\301w\302x\263y\363z\362~ @@ -2077,11 +2086,66 @@ cons60l1|cons60-iso|FreeBSD console w/iso 8859-1 chars (60 lines), cons60l1-m|cons60-iso-m|FreeBSD console w/iso 8859-1 chars (60-line mono), lines#60, use=cons25l1-m, +# vt - virtual terminal console driver +# # Starting with FreeBSD 8, an alternative configuration for syscons is provided, # which is intended to be xterm-compatible. See for example # http://svnweb.freebsd.org/base/stable/8/sys/dev/syscons/ # in particular scterm-teken.c # +# Some of the documentation refers to this as "vt"; its proper name is "teken". +# +# The sc(4) manual page states that it is possible to switch between the two +# by editing /boot/loader.conf, adding +# kern.vty=sc +# Doing that does not change the default TERM variable. That is hard-coded in +# /etc/ttys, rather than deriving it from the kernel state. +# +# For FreeBSD 12 and 13: +# --------------------- +# In newer releases, it is no longer possible to boot into a configuration that +# works with syscons. According to efi(4), +# "The vt(4) system console is automatically selected when booting via UEFI." +# See FreeBSD #264226. +# +# FreeBSD 13 supports 64-bit machines which boot with UEFI: +# https://www.freebsd.org/platforms/ +# The i386 platform does not use UEFI (and modifying the loader configuration +# does load sysconf); however because no updates (fixes) are available, most +# developers will regard that as unsupported. +# +# With FreeBSD 13, even when syscons is loaded (e.g., with the i386 platform), +# its function-keys are not configured. Using +# vidcontrol -T cons25 +# repairs this. +# +# When teken is loaded, vidcontrol can switch at runtime between the +# teken/cons25 function keys: +# vidcontrol -T cons25 +# vidcontrol -T xterm +# However due to a limitation in the implementation, only the first 12 function +# keys are available. The real syscons supports 48 function keys (using the +# shift and control modifiers), while xterm supports more than twice as many. +# +# vidcontrol does not change the emulation. As a result, the quarter (17/73) of +# non-function key capabilities which differ between syscons and teken are +# unsupported in the UEFI-based configurations. +# +# tack: +# VT100 line-drawing does not work (UTF-8 equivalents do). +# Shift/control modifiers have no effect on special keys. +# Meta does not work. +# vttest: +# supports REP (repeat). +# still does not support left/right margins +# SU/SD work, but not SL/SR +# alternate screen does not work +# ENQ/DA1 is unimplemented (the terminal does not identify itself) +# CPR, XCPR are unimplemented (i.e., vttest and resize are broken) +# implements X11 (original) xterm-mouse. +# ncurses: +# UTF-8 line-drawing works, including some double/thick lines +# # For FreeBSD 9 and 10: # -------------------- # The /etc/ttys entries for console and other ttys are all configured to set @@ -2111,18 +2175,51 @@ cons60l1-m|cons60-iso-m|FreeBSD console w/iso 8859-1 chars (60-line mono), # # Those are removed from this entry's acsc string to avoid confusion. # The resulting description provides correct line-drawing and function-keys -TD -teken|syscons with teken, - bw@, mir, xenl, +teken-2018|teken as of 2018, + bw@, mir, xenl, NQ, acsc=0\333a\260f\370g\361h\261j\331k\277l\332m\300n\305q \304t\303u\264v\301w\302x\263y\363z\362~\371, - cvvis@, hpa=\E[%i%p1%dG, hts=\EH, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[F, kent=\r, + cvvis@, hpa=\E[%i%p1%dG, hts=\EH, kdch1=\E[3~, kent=\r, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[H, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, rmir=\E[4l, smir=\E[4h, tbc=\E[3g, - u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, - vpa=\E[%i%p1%dd, use=vt220+cvis, use=cons25, + kf8=\E[19~, kf9=\E[20~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + rmir=\E[4l, smir=\E[4h, tbc=\E[3g, use=vt220+cvis, + use=cons25, + +teken-2022|teken as of 2022, + am, bce, eo, mir, msgr, npc, NQ, + cols#80, it#8, lines#25, ncv#21, U8#1, + bold=\E[1m, cr=\r, cub1=^H, dim=\E[30;1m, ech=\E[%p1%dX, + ind=\E[S, kent=\r, nel=\E[E, op=\E[x, rev=\E[7m, ri=\E[T, + rmso=\E[27m, rs2=\E[x\E[m\Ec, + sgr=\E[0%?%p1%t;2;7%;%?%p3%t;7%;%?%p5%t;30;1%;%?%p6%t;1%;m, + sgr0=\E[m, use=vt220+cvis, use=ecma+index, + use=ansi+arrows, use=ansi+csr, use=ansi+cup, + use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+local, use=ansi+rca2, use=ansi+sgrso, + use=ansi+tabs, use=klone+color, + +teken-vt+fkeys|teken's xterm special keys, + kend=\E[F, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, + use=vt220+pcedit, + +teken-sc+fkeys|teken's syscons special keys, + kdch1=^?, kend=\E[F, kf1=\E[M, kf10=\E[V, kf11=\E[W, + kf12=\E[X, kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, + kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, kich1=\E[L, + knp=\E[G, kpp=\E[I, + +teken-sc|teken imitating syscons, + use=teken-sc+fkeys, use=teken-2022, + +teken|teken-vt|teken imitating xterm, + xenl, use=teken-vt+fkeys, use=xterm+x11mouse, + use=teken-2022, + +teken-16color|teken using 16 colors, + use=ibm+16color, use=teken, #### 386BSD and BSD/OS Consoles # @@ -2135,21 +2232,20 @@ origpc3|origibmpc3|IBM PC 386BSD console, cols#80, lines#25, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x \263, - bold=\E[7m, clear=\Ec, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\E[J, el=\E[K, - home=\E[H, ind=\E[S, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, khome=\E[Y, ri=\E[T, rmso=\E[1;0x\E[2;7x, - rmul=\E[1;0x\E[2;7x, sgr0=\E[m\E[1;0x\E[2;7x, - smso=\E[1;7x\E[2;0x, smul=\E[1;7x\E[2;0x, + bold=\E[7m, clear=\Ec, cub1=^H, cup=\E[%i%p1%2d;%p2%2dH, + ed=\E[J, el=\E[K, home=\E[H, ind=\E[S, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[Y, ri=\E[T, + rmso=\E[1;0x\E[2;7x, rmul=\E[1;0x\E[2;7x, + sgr0=\E[m\E[1;0x\E[2;7x, smso=\E[1;7x\E[2;0x, + smul=\E[1;7x\E[2;0x, use=ansi+local1, # description of BSD/386 console emulator in version 1.0 (supplied by BSDI) oldpc3|oldibmpc3|old IBM PC BSD/386 console, OTbs, km, lines#25, bel=^G, bold=\E[=15F, cr=\r, cud1=\n, dim=\E[=8F, dl1=\E[M, - ht=^I, il1=\E[L, ind=\n, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kich1=\E[L, kll=\E[F, - knp=\E[G, kpp=\E[I, nel=\r\n, sgr0=\E[=R, + ht=^I, il1=\E[L, ind=\n, kich1=\E[L, kll=\E[F, knp=\E[G, + kpp=\E[I, nel=\r\n, sgr0=\E[=R, use=ansi+arrows, # Description of BSD/OS console emulator in version 1.1, 2.0, 2.1 # Note, the emulator supports many of the additional console features @@ -2170,15 +2266,13 @@ bsdos-pc-nobold|BSD/OS PC console w/o bold, bsdos-pc-m|bsdos-pc-mono|BSD/OS PC console mono, OTbs, am, eo, km, xon, cols#80, it#8, lines#25, - bel=^G, clear=\Ec, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kich1=\E[L, - kll=\E[F, knp=\E[G, kpp=\E[I, nel=\r\n, rc=\E8, sc=\E7, + bel=^G, clear=\Ec, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + ind=\n, kich1=\E[L, kll=\E[F, knp=\E[G, kpp=\E[I, nel=\r\n, + rc=\E8, sc=\E7, sgr=\E[0;10%?%p1%t;7%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7 %t;8%;%?%p9%t;11%;m%?%p5%t\E[=8F%;, + use=ansi+arrows, use=ansi+idl, use=ansi+local, use=klone+sgr8, # Old names for BSD/OS PC console used in releases before 4.1. @@ -2215,11 +2309,9 @@ bsdos-ppc|PowerPC BSD/OS console, # that VT52 does not support line-drawing characters (the scan-X values refer # to a crude plotting feature) -TD vt52|DEC VT52, - OTbs, - it#8, lines#24, - acsc=+h.k0affggolpnqprrss, home=\EH, kbs=^H, nel=\r\n, - ri=\EI, rmacs=\EG, rmkx=\E>, smacs=\EF, smkx=\E=, u8=\E/[KL], - use=vt50h, + lines#24, + acsc=+h.k0affggolpnqprrss, rmacs=\EG, rmkx=\E>, + smacs=\EF, smkx=\E=, u8=\E/[KL], use=vt50h, use=vt52-basic, # This is more likely the "vt52" that you would see in emulation, i.e., no # keypad, no graphics. @@ -2227,8 +2319,11 @@ vt52-basic|VT52 for emulators, cols#80, it#8, lines#24, bel=^G, clear=\EH\EJ, cr=\r, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%' '%+%c%p2%' '%+%c, cuu1=\EA, ed=\EJ, el=\EK, - home=\EH, ht=^I, ind=\n, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, nel=\r\n, ri=\EI, + home=\EH, ht=^I, ind=\n, kbs=^H, nel=\r\n, ri=\EI, + use=vt52+arrows, + +vt52+arrows|cursor keys for VT52, + kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, #### DEC VT100 and compatibles # @@ -2343,10 +2438,10 @@ vt52-basic|VT52 for emulators, # support: vt100+keypad|DEC VT100 numeric keypad no fkeys, ka1=\EOq, ka3=\EOs, kb2=\EOr, kc1=\EOp, kc3=\EOn, -vt100+pfkeys|DEC VT100 numeric keypad, +vt100+pfkeys|DEC VT100 numeric keypad (kf1-kf4), kent=\EOM, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, use=vt100+keypad, -vt100+fnkeys|DEC VT100 numeric keypad, +vt100+fnkeys|DEC VT100 numeric keypad (kf0-kf10), kf0=\EOy, kf10=\EOx, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, use=vt100+pfkeys, # @@ -2372,9 +2467,8 @@ vt100+fnkeys|DEC VT100 numeric keypad, # |___________________|_________|_kent_@8_| # vt220+keypad|DEC VT220 numeric keypad, - ka1=\EOw, ka3=\EOy, kb2=\EOu, kc1=\EOq, kc3=\EOs, kent=\EOM, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, ka2=\EOx, kb1=\EOt, - kb3=\EOv, kc2=\EOr, + ka1=\EOw, ka3=\EOy, kb2=\EOu, kc1=\EOq, kc3=\EOs, ka2=\EOx, + kb1=\EOt, kb3=\EOv, kc2=\EOr, use=vt100+pfkeys, # vt100+enq|ncurses extension for VT100-style ENQ, u8=\E[?1;2c, use=ansi+enq, @@ -2416,25 +2510,24 @@ vt102+enq|ncurses extension for VT102-style ENQ, # # (vt100: I added / based on the init string, also . -- esr) vt100|vt100-am|DEC VT100 (w/advanced video), - OTbs, mc5i, xenl, xon, + OTbs, xenl, xon, vt#3, - csr=\E[%i%p1%d;%p2%dr, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, - mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rmam=\E[?7l, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, lf1=pf1, + lf2=pf2, lf3=pf3, lf4=pf4, mc0=\E[0i, rmam=\E[?7l, rmkx=\E[?1l\E>, rs2=\E<\E>\E[?3;4;5l\E[?7;8h\E[r, - sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;$<2>, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m$<2>, - use=vt100+4bsd, use=vt100+fnkeys, + use=ansi+csr, use=ansi+pp, use=decid+cpr, use=vt100+4bsd, + use=vt100+fnkeys, + vt100+4bsd|DEC VT100 from 4.0BSD, am, msgr, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[J$<50>, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, + clear=\E[H\E[J$<50>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=\n, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, @@ -2443,7 +2536,8 @@ vt100+4bsd|DEC VT100 from 4.0BSD, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smso=\E[1;7m$<2>, - smul=\E[4m$<2>, tbc=\E[3g, + smul=\E[4m$<2>, tbc=\E[3g, use=ansi+local, + vt100nam|vt100-nam|VT100 no automargins, am@, xenl@, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h, use=vt100-am, @@ -2517,18 +2611,17 @@ vt131|DEC VT131, OTbs, am, xenl, cols#80, it#8, lines#24, vt#3, bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, - clear=\E[;H\E[2J$<50/>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\n, cuf1=\E[C$<2/>, - cup=\E[%i%p1%d;%p2%dH$<5/>, cuu1=\E[A$<2/>, - ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, ht=^I, - is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, nel=\r\n, rc=\E8, rev=\E[7m$<2/>, ri=\EM$<5/>, + clear=\E[;H\E[2J$<50/>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2/>, cup=\E[%i%p1%d;%p2%dH$<5/>, + cuu1=\E[A$<2/>, ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, + ht=^I, is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, + kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, nel=\r\n, rev=\E[7m$<2/>, ri=\EM$<5/>, rmam=\E[?7h, rmkx=\E[?1l\E>, rmso=\E[m$<2/>, rmul=\E[m$<2/>, - rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m$<2/>, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[7m$<2/>, smul=\E[4m$<2/>, + smso=\E[7m$<2/>, smul=\E[4m$<2/>, use=ansi+csr, # vt132 - like vt100 but slower and has ins/del line and such. # I'm told that / are backwards in the terminal from the @@ -2553,23 +2646,23 @@ vt220-old|vt200-old|DEC VT220 in VT100 emulation mode, OTnl=\n, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[2J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH$<10>, cuu1=\E[A, dch1=\E[P, - dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, home=\E[H, ht=^I, - if=/usr/share/tabset/vt100, il1=\E[L, ind=\ED$<20/>, - is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, + clear=\E[H\E[2J$<50>, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH$<10>, dch1=\E[P, ed=\E[J$<50>, + el=\E[K$<3>, home=\E[H, ht=^I, + if=/usr/share/tabset/vt100, ind=\ED$<20/>, + is2=\E[1;24r\E[24;1H, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, - kf8=\E[20~, kf9=\E[21~, kich1=\E[2~, rc=\E8, rev=\E[7m$<2>, - rf=/usr/share/tabset/vt100, ri=\EM$<14/>, - rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmso=\E[27m, - rmul=\E[24m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - sc=\E7, + kf8=\E[20~, kf9=\E[21~, khome=\E[1~, kich1=\E[2~, + rev=\E[7m$<2>, rf=/usr/share/tabset/vt100, + ri=\EM$<14/>, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, + rmso=\E[27m, rmul=\E[24m, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;$<2>, sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, - smso=\E[7m, smul=\E[4m, use=vt220+pcedit, use=vt220+cvis, + smso=\E[7m, smul=\E[4m, use=ansi+arrows, use=ansi+csr, + use=ansi+idl1, use=ansi+local1, use=vt220+pcedit, + use=vt220+cvis, # Here's a picture of the Sun/PC editing keypad: # +--------+--------+--------+ @@ -2612,29 +2705,26 @@ vt220-base|DEC VT220 as emulated, OTbs, am, mir, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, - flash=\E[?5h$<200/>\E[?5l, home=\E[H, ht=^I, hts=\EH, - ich=\E[%p1%d@, if=/usr/share/tabset/vt100, - il=\E[%p1%dL, il1=\E[L, ind=\ED, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + dch=\E[%p1%dP, dch1=\E[P, ech=\E[%p1%dX, el1=\E[1K, + enacs=\E)0, flash=\E[?5h$<200/>\E[?5l, ht=^I, hts=\EH, + ich=\E[%p1%d@, if=/usr/share/tabset/vt100, ind=\ED, is2=\E[?7h\E[>\E[?1l\E F\E[?4l, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kf1=\EOP, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, - kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, - krdo=\E[29~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, nel=\EE, - rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, - rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\E[?3l, sc=\E7, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[21~, + kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, + kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, krdo=\E[29~, lf1=pf1, + lf2=pf2, lf3=pf3, lf4=pf4, nel=\EE, rev=\E[7m, ri=\EM, + rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmso=\E[27m, + rmul=\E[24m, rs1=\E[?3l, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;$<2>, sgr0=\E[m\E(B, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt220+vtedit, - use=ansi+pp, use=ansi+enq, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=ansi+csr, + use=ansi+cup, use=ansi+pp, use=ansi+enq, use=ansi+erase, + use=ansi+idl, use=ansi+local, use=vt220+vtedit, + vt220|vt200|DEC VT220, use=vt220+cvis, use=vt220-base, vt220-w|vt200-w|DEC VT220 in wide mode, @@ -2706,19 +2796,18 @@ vt220-nam|v200-nam|VT220 in VT100 mode with no auto margins, vt200-js|vt220-js|DEC VT200 series with jump scroll, am, msgr, cols#80, - bel=^G, clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, - ht=^I, il1=\E[L, ind=\ED, + bel=^G, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, + home=\E[H, ht=^I, il1=\E[L, ind=\ED, is2=\E[61"p\E[H\E[?3l\E[?4l\E[?1h\E[?5l\E[?6l\E[?7h\E[?8h\E[ ?25h\E>\E[m, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\r\ED, rc=\E8, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\r\ED, rf=/usr/share/tabset/vt100, ri=\EM, rmdc=, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m$<5/>, rmul=\E[24m, - rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, smdc=, + rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, smdc=, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m$<5/>, smul=\E[4m, - use=vt220+cvis, + use=ansi+csr, use=ansi+erase, use=vt220+cvis, # This was DEC's VT320. Use the purpose-built one below instead #vt320|DEC VT320 in VT100 emulation mode, @@ -2749,31 +2838,28 @@ vt320|vt300|DEC VT320 7 bit terminal, cols#80, lines#24, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, + dch1=\E[P, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ind=\ED, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, - kbs=^?, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kel=\E[4~, kf10=\E[21~, kf11=\E[23~, + kbs=^?, kdch1=\E[3~, kel=\E[4~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, knxt=^I, - kpp=\E[5~, kprv=\E[Z, kslt=\E[4~, nel=\EE, rc=\E8, rev=\E[7m, + kpp=\E[5~, kprv=\E[Z, kslt=\E[4~, nel=\EE, rev=\E[7m, rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, - sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;$<2>, sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - use=dec+pp, use=vt220+cvis, use=vt220+keypad, use=dec+sl, - use=ansi+enq, + use=ansi+apparrows, use=ansi+csr, use=ansi+enq, + use=ansi+idl, use=ansi+local, use=dec+pp, use=vt220+cvis, + use=vt220+keypad, use=dec+sl, + vt320-nam|vt300-nam|DEC VT320 7 bit terminal with no am to make SAS happy, am@, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h\E[1;24r\E[24;1H, @@ -2812,28 +2898,26 @@ vt340|dec-vt340|vt330|dec-vt330|DEC VT340 graphics terminal with 24 line page, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - dsl=\E[2$~\r\E[1$}\E[K\E[$}, ed=\E[J, el=\E[K, + blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dsl=\E[2$~\r\E[1$}\E[K\E[$}, flash=\E[?5h$<200/>\E[?5l, fsl=\E[$}, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, + hts=\EH, ich=\E[%p1%d@, ind=\ED, is2=\E<\E\sF\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r \E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, - lf3=pf3, lf4=pf4, nel=\r\ED, rc=\E8, rev=\E[7m, + lf3=pf3, lf4=pf4, nel=\r\ED, rev=\E[7m, rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, - rmul=\E[24m, rs1=\E[?3l, sc=\E7, + rmul=\E[24m, rs1=\E[?3l, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;$<2>, sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[2$~\E[1$}\E[1;%dH, use=vt220+cvis, + tsl=\E[2$~\E[1$}\E[1;%dH, use=ansi+csr, use=ansi+erase, + use=ansi+idl, use=ansi+local, use=vt220+cvis, # Left/right margins are supported in xterm since patch #279 (2012/05/10) vt420+lrmm|VT420 left/right margins, @@ -2867,28 +2951,25 @@ vt400|vt400-24|dec-vt400|DEC VT400 24x80 column autowrap, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J$<10/>, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - dsl=\E[2$~\r\E[1$}\E[K\E[$}, ed=\E[J$<10/>, - el=\E[K$<4/>, flash=\E[?5h$<200/>\E[?5l, fsl=\E[$}, - home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\ED, + cub1=^H, cud1=\n, dsl=\E[2$~\r\E[1$}\E[K\E[$}, + ed=\E[J$<10/>, el=\E[K$<4/>, flash=\E[?5h$<200/>\E[?5l, + fsl=\E[$}, ht=^I, hts=\EH, ind=\ED, is2=\E<\E\sF\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r \E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, - lf3=pf3, lf4=pf4, nel=\r\ED, rc=\E8, rev=\E[7m, + lf3=pf3, lf4=pf4, nel=\r\ED, rev=\E[7m, rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B, - rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, - rmul=\E[24m, rs1=\E<\E[?3l\E[!p\E[?7h, sc=\E7, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, + rs1=\E<\E[?3l\E[!p\E[?7h, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;$<2>, - sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[2$~\E[1$}\E[1;%dH, use=dec+sl, use=vt220+cvis, + sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, + tsl=\E[2$~\E[1$}\E[1;%dH, use=ansi+csr, use=ansi+cup, + use=ansi+idc, use=ansi+idl, use=ansi+local, use=dec+sl, + use=vt220+cvis, # (vt420: I removed , it collided with . I also restored # a missing -- esr) @@ -2898,29 +2979,26 @@ vt420|DEC VT420, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[2J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH$<10>, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J$<50>, - el=\E[K$<3>, el1=\E[1K, enacs=\E)0, - flash=\E[?5h$<200/>\E[?5l, home=\E[H, ht=^I, hts=\EH, - ich=\E[%p1%d@, if=/usr/share/tabset/vt300, - il=\E[%p1%dL, il1=\E[L, ind=\ED, is2=\E[1;24r\E[24;1H, - is3=\E[?67h\E[64;1"p, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, - kf8=\E[20~, kf9=\E[21~, nel=\EE, rc=\E8, rev=\E[7m$<2>, - rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B$<4>, - rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, + clear=\E[H\E[2J$<50>, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH$<10>, dch=\E[%p1%dP, dch1=\E[P, + ech=\E[%p1%dX, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K, + enacs=\E)0, flash=\E[?5h$<200/>\E[?5l, home=\E[H, ht=^I, + hts=\EH, ich=\E[%p1%d@, if=/usr/share/tabset/vt300, + ind=\ED, is2=\E[1;24r\E[24;1H, is3=\E[?67h\E[64;1"p, + kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~, kf9=\E[21~, + nel=\EE, rev=\E[7m$<2>, rf=/usr/share/tabset/vt300, + ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - rmso=\E[27m, rmul=\E[24m, rs3=\E[?67h\E[64;1"p, sc=\E7, + rmso=\E[27m, rmul=\E[24m, rs3=\E[?67h\E[64;1"p, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;$<2>, sgr0=\E[m\E(B$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - use=vt220+vtedit, use=ansi+pp, use=dec+sl, use=ansi+enq, - use=vt220+cvis, use=vt420+lrmm, + use=ansi+csr, use=ansi+enq, use=ansi+idl, use=ansi+pp, + use=ansi+local, use=dec+sl, use=vt220+cvis, + use=vt420+lrmm, use=vt220+vtedit, # DEC VT220 and up support DECUDK (user-defined keys). DECUDK (i.e., pfx) # takes two parameters, the key and the string. Translating the key is @@ -3265,36 +3343,29 @@ tt|tkterm|Don Libes' tk text widget terminal emulator, nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset, am, bw, msgr, xenl, xon, cols#80, it#8, lines#24, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - el1=\E[1K, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, - ind=\n, invis=\E[8m, kbs=^?, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, - rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + bel=^G, cr=\r, cub1=^H, cud1=\n, dim=\E[2m, el1=\E[1K, ht=^I, + hts=\EH, ind=\n, kbs=^?, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, kent=\EOM, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m, - sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys, + sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, tbc=\E[3g, + use=ansi+csr, use=ansi+cup, use=ansi+erase, use=ansi+idl, + use=ansi+local, use=ansi+sgrbold, use=vt100+enq, + use=vt100+pfkeys, nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - enacs=\E(B\E)0, rmacs=^O, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, use=nsterm+7, + sgr0=\E[m\017, use=nsterm+7, use=vt100+4bsd, nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset, acsc=+\335\,\334-\366.\3770#`\327a:f\241g\261h#i \360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{ \271|\255}\243~\245, - enacs=\E(B\E)0, rmacs=^O, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, use=nsterm+7, + sgr0=\E[m\017, use=nsterm+7, use=vt100+4bsd, # compare with xterm+sl-twm nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support, @@ -3304,8 +3375,8 @@ nsterm+c|AppKit Terminal.app v51+ full color support (including 16 colors), op=\E[0m, use=ibm+16color, nsterm+c41|AppKit Terminal.app v41 color support, - colors#8, ncv#37, pairs#64, - op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + ncv#37, + op=\E[0m, use=klone+color, # These are different combinations of the building blocks @@ -3386,16 +3457,14 @@ nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline) # vt52, vt100, vt102 and xterm. nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5, bw@, mir, npc, - dch=\E[%p1%dP, dch1=\E[P, flash=\E[?5h$<200/>\E[?5l, - hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[@, kdch1=\E[3~, - kend=\E[F, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[22~, kf19=\E[33~, kf20=\E[34~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[H, knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8, - rmir=\E[4l, smcup=\E7\E[?47h, smir=\E[4h, - vpa=\E[%i%p1%dd, kLFT5=\E[5D, kRIT5=\E[5C, - use=nsterm-c-s-acs, use=vt220+cvis, + flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG, + kdch1=\E[3~, kend=\E[F, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, + kf16=\E[29~, kf17=\E[31~, kf18=\E[22~, kf19=\E[33~, + kf20=\E[34~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khome=\E[H, knp=\E[6~, kpp=\E[5~, + vpa=\E[%i%p1%dd, kLFT5=\E[5D, kRIT5=\E[5C, use=ansi+idc, + use=xterm+alt47, use=nsterm-c-s-acs, use=vt220+cvis, # The versions of Terminal.app in Mac OS X version 10.3.x seem to have # the background color erase feature. The newer version 240.2 in Mac OS X @@ -3519,9 +3588,12 @@ nsterm-build400|Terminal.app in OS X 10.13, rmso=\E[27m, rmul=\E[24m, use=xterm+sm+1006, use=ecma+italics, use=nsterm-build361, +nsterm-build440|Terminal.app in MacOS 11.6.8, + use=xterm+alt1049, use=nsterm-build400, + # This is an alias which should always point to the "current" version nsterm|nsterm-256color|Apple_Terminal|AppKit Terminal.app, - use=nsterm-build400, + use=nsterm-build440, #### iTerm, iTerm2 @@ -3560,33 +3632,24 @@ nsterm|nsterm-256color|Apple_Terminal|AppKit Terminal.app, # can display/alter xterm-256color cube # can display/alter xterm-88color cube iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X, - am, bce, hs, mir, msgr, npc, xenl, xon, - cols#80, it#8, lines#24, wsl#50, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, enacs=\E(B\E)0, - flash=\E[?5h$<200/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\n, kLFT=\E[1;2D, kRIT=\E[1;2C, kbs=^?, - kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + bce, mir, npc, xenl, xon, + wsl#50, + blink=\E[5m, bold=\E[1m, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, el1=\E[1K, + flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG, + kLFT=\E[1;2D, kRIT=\E[1;2C, kbs=^?, kcbt=\E[Z, kdch1=\E[3~, + kend=\EOF, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, - rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + knp=\E[6~, kpp=\E[5~, op=\E[0m, rev=\E[7m, ri=\EM, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%? %p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, vpa=\E[%i%p1%dd, kEND5=\E[1;5F, kHOM5=\E[1;5H, - use=ansi+enq, use=xterm+sl-twm, use=vt100+keypad, + sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, + smul=\E[4m, vpa=\E[%i%p1%dd, kEND5=\E[1;5F, + kHOM5=\E[1;5H, use=ansi+apparrows, use=ansi+csr, + use=ansi+enq, use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+local, use=vt100+4bsd, use=vt100+keypad, + use=vt100+pfkeys, use=xterm+alt47, use=xterm+sl-twm, use=xterm+x11mouse, use=xterm+256setaf, use=vt220+cvis, # iTerm2 3.0.15 @@ -3623,13 +3686,13 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X, # 2018/01/21: found xterm+sm+1006 did not work with version 3.1.5 # 2018/05/19: xterm+sm+1006 seems to work with 3.1.6beta -TD iTerm2.app|iterm2|terminal emulator for Mac OS X, - blink=\E[5m, cbt=\E[Z, dim=\E[2m, kEND=\E[1;2F, - kHOM=\E[1;2H, ka1@, ka3@, kb2@, kc1@, kc3@, kent@, kf13=\E[1;2P, - kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, - kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, - kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~, - kf24=\E[24;2~, kind=\E[1;2B, kri=\E[1;2A, nel=\EE, - op=\E[39;49m, rmso=\E[27m, rmul=\E[24m, + cbt=\E[Z, dim=\E[2m, kEND=\E[1;2F, kHOM=\E[1;2H, ka1@, ka3@, + kb2@, kc1@, kc3@, kent@, kf13=\E[1;2P, kf14=\E[1;2Q, + kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~, + kf19=\E[18;2~, kf20=\E[19;2~, kf21=\E[20;2~, + kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, + kind=\E[1;2B, kri=\E[1;2A, nel=\EE, op=\E[39;49m, + rmso=\E[27m, rmul=\E[24m, rs2=\E[!p\E[?3;4l\E[4l\E>\E[?1000l, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;m%?%p9%t\016%e\017%;, @@ -3643,6 +3706,7 @@ iTerm2.app|iterm2|terminal emulator for Mac OS X, kRIT5=\E[1;5C, kRIT6=\E[1;6C, kUP3=\E\E[A, kUP4=\E[1;10A, kUP5=\E[1;5A, kUP6=\E[1;6A, use=ecma+index, use=xterm+alt+title, use=ecma+italics, use=iterm, + use=bracketed+paste, # xnuppc - Darwin PowerPC Console (a.k.a. "darwin") # @@ -3740,24 +3804,20 @@ iTerm2.app|iterm2|terminal emulator for Mac OS X, # The '+' entries are building blocks xnuppc+basic|Darwin PowerPC console basic capabilities, - am, bce, mir, xenl, + am, bce, mir, xenl, NQ, it#8, - bold=\E[1m, clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dsl=\E]2;\007, ed=\E[J, el=\E[K, - el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=\n, kbs=^?, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, - rev=\E[7m, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, - rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - sc=\E7, + bold=\E[1m, cr=\r, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + dsl=\E]2;\007, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=\n, + kbs=^?, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + rev=\E[7m, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, - sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, use=vt100+keypad, + sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, tbc=\E[3g, + use=ansi+csr, use=ansi+erase, use=ansi+local, + use=ansi+sgrso, use=ansi+sgrul, use=vt100+keypad, xnuppc+c|Darwin PowerPC console ANSI color support, - colors#8, ncv#32, pairs#64, - op=\E[37;40m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + ncv#32, use=klone+color, xnuppc+b|Darwin PowerPC console color-bold support, ncv#32, @@ -3916,9 +3976,8 @@ xnuppc-256x96|darwin-256x96|Darwin PowerPC console (color) 256x96, ######## DOS/WINDOWS # CRT is shareware. It implements some xterm features, including mouse. crt|crt-vt220|CRT 2.3 emulating VT220, - bce, msgr, - ncv@, - hts=\EH, use=vt100+enq, use=vt220-base, use=ecma+color, + bce, + ncv@, use=vt100+enq, use=vt220-base, use=ecma+color, # SecureCRT 8.7.3.2279 # 8.7.3 was released 2020/08/11 @@ -3979,7 +4038,7 @@ crt|crt-vt220|CRT 2.3 emulating VT220, # resize.pl gets no reply, resize.sh needs fix for no reply. scrt|securecrt|SecureCRT emulating xterm-256color, bce@, km@, npc, - bel@, cvvis@, kcbt=\E[Z, kent=\EOM, use=vt220+pcedit, + bel@, cvvis@, kcbt=\E[Z, use=vt220+pcedit, use=xterm+256setaf, use=ecma+index, use=ansi+rep, use=xterm+keypad, use=xterm+pcfkeys, use=xterm-basic, @@ -4029,15 +4088,23 @@ scrt|securecrt|SecureCRT emulating xterm-256color, # supports 256-colors, including changing palette (ncurses menu d works) # supports UTF-8, but honors VT100 line-drawing absolute|Absolute Telnet emulating xterm, - kcbt=\E[Z, use=ecma+index, use=ansi+rep, + kcbt=\E[Z, use=ecma+index, use=linux+kbs, use=ansi+rep, use=vt220+pcedit, use=xterm+keypad, use=xterm+app, use=xterm+pcf0, use=xterm+256color, use=xterm+x11mouse, use=xterm-basic, #### PuTTY -# PuTTY 0.74 (27 June 2020) # http://www.chiark.greenend.org.uk/~sgtatham/putty/ # +# PuTTY 0.78 (September 2020, tested 12 August 2023) +# Testing with tack: +# implements cross-out text (shortly after 0.74) +# restore kLFT as kLFT5, etc. (mentioned in October 2021) +# does not support direct-colors (mentioned in July 2021) +# +# PuTTY 0.74 (27 June 2020) +# (unchanged) +# # PuTTY 0.73 (September 2019) # Testing with tack: # does not implement italics @@ -4082,42 +4149,46 @@ absolute|Absolute Telnet emulating xterm, # http://stackoverflow.com/questions/24613237/terminal-retains-bg-color-after-closing-vim-using-color-scheme-and-putty-256co/37869114#37869114 putty|PuTTY terminal emulator, am, bce, bw, ccc, mir, msgr, xenl, xon, XT, - colors#8, it#8, ncv#22, pairs#64, U8#1, + it#8, ncv#22, U8#1, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, - dch=\E[%p1%dP, dch1=\E[P, + bel=^G, cr=\r, cub1=^H, cud1=\ED, cup=\E[%i%p1%d;%p2%dH, + cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P, dispc=%?%p1%{8}%=%t\E%%G\342\227\230\E%%@%e%p1%{10}%=%t\E%%G \342\227\231\E%%@%e%p1%{12}%=%t\E%%G\342\231\0\E%%@%e %p1%{13}%=%t\E%%G\342\231\252\E%%@%e%p1%{14}%=%t\E%%G \342\231\253\E%%@%e%p1%{15}%=%t\E%%G\342\230\274\E%%@ %e%p1%{27}%=%t\E%%G\342\206\220\E%%@%e%p1%{155}%=%t\E %%G\340\202\242\E%%@%e%p1%c%;, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - el1=\E[1K, enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, - home=\E[H, hpa=\E[%i%p1%dG, il=\E[%p1%dL, il1=\E[L, ind=\n, + ech=\E[%p1%dX, el1=\E[1K, enacs=\E(B\E)0, + flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, + ind=\n, initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/ %02x%p4%{255}%*%{1000}%/%02x, is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R, - kbs=^?, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, kind=\E[B, kri=\E[A, kspd=^Z, nel=\r\n, oc=\E]R, - op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmam=\E[?7l, rmcup=\E[2J\E[?47l, rmir=\E[4l, - rmkx=\E[?1l\E>, rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, + kbs=^?, kcbt=\E[Z, khome=\E[1~, kind=\E[B, kri=\E[A, kspd=^Z, + nel=\r\n, oc=\E]R, op=\E[39;49m, ri=\EM, rmacs=^O, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, + rmul=\E[24m, rs2=\E<\E["p\E[50;6"p\Ec\E[?3l\E]R\E[?1000l, - s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sc=\E7, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[?47h, - smir=\E[4h, smkx=\E[?1h\E=, smpch=\E[11m, smso=\E[7m, - smul=\E[4m, vpa=\E[%i%p1%dd, E3=\E[3J, use=vt220+pcedit, - use=ansi+tabs, use=ansi+rep, use=ecma+index, - use=xterm+sm+1006, use=putty+fnkeys, use=vt102+enq, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, + smkx=\E[?1h\E=, vpa=\E[%i%p1%dd, E3=\E[3J, + use=ansi+apparrows, use=ansi+csr, use=ansi+erase, + use=ansi+idl, use=ansi+local, use=ansi+tabs, + use=ansi+rep, use=bracketed+paste, use=ecma+index, + use=ecma+strikeout, use=klone+color, use=klone+sgr, + use=putty+cursor, use=putty+fnkeys, use=vt220+pcedit, + use=xterm+alt1049, use=vt102+enq, use=xterm+sm+1006, use=xterm+sl, use=vt100+fnkeys, use=putty+keypad, use=vt220+cvis, + +# older versions (e.g., before 0.71) of PuTTY used a shift-modifier to toggle +# between normal- and application-mode for the cursor-keys. That was dropped, +# and a few years later (after 0.74) restored as the control-modifier. +putty+cursor|PuTTY modified cursor-keys, + kDN5=\E[B, kLFT5=\E[D, kRIT5=\E[C, kUP5=\E[A, putty+keypad|PuTTY numeric keypad, kp1=\EOq, kp2=\EOr, kp3=\EOs, kp4=\EOt, kp5=\EOu, kp6=\EOv, kp7=\EOw, kp8=\EOx, kp9=\EOy, kpADD=\EOl, kpDIV=\EOQ, @@ -4233,9 +4304,7 @@ mintty|Cygwin Terminal, setal=\E[5%p1%dm, use=xterm+256color, use=mintty+common, mintty-direct|Cygwin Terminal direct-color, - setal=\E[%?%p1%{8}%<%t5%p1%d%e58:2::%p1%{65536}%/%d:%p1 - %{256}%/%{255}%&%d:%p1%{255}%&%d%;m, - use=xterm+direct, use=mintty+common, + use=kitty+setal, use=xterm+direct, use=mintty+common, mintty+common|shared capabilities for mintty, km@, npc, kcbt=\E[Z, kent=\EOM, rmm@, rmpch=\E[10m, @@ -4243,10 +4312,11 @@ mintty+common|shared capabilities for mintty, rsupm=\E[75m, smm@, smpch=\E[11m, sshm=\E[1:2m, ssubm=\E[74m, ssupm=\E[73m, Rmol=\E[55m, Smol=\E[53m, Smulx=\E[4:%p1%dm, blink2=\E[6m, norm=\E[22m, - opaq=\E[28m, smul2=\E[21m, use=ansi+rep, + opaq=\E[28m, smul2=\E[21m, use=linux+kbs, use=ansi+rep, use=ecma+strikeout, use=ecma+index, use=vt420+lrmm, - use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux, - use=ecma+italics, use=xterm-basic, + use=xterm+focus, use=xterm+sm+1006, use=xterm+pcfkeys, + use=xterm+tmux, use=ecma+italics, use=xterm-basic, + use=bracketed+paste, use=report+version, # 2019-06-09: These capabilities are commented-out for compatibility with # existing releases 5.9-6.1, and may be considered for inclusion after the # release of ncurses 6.2: @@ -4306,7 +4376,7 @@ mintty+common|shared capabilities for mintty, # retrieving the window title, and for setting the window size (i.e., using # "resize -s"), though it does not pass SIGWINCH to the application if the # user resizes the window with the mouse. -teraterm2.3|Tera Term Pro, +teraterm2.3|Tera Term Pro 2.3, km, ncv#43, vt@, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i @@ -4314,18 +4384,17 @@ teraterm2.3|Tera Term Pro, \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, - dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, - el=\E[K, el1=\E[1K, flash=\E[?5h$<200/>\E[?5l, - hpa=\E[%i%p1%dG, il=\E[%p1%dL, il1=\E[L, kf1=\E[11~, + dch1=\E[P, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, op=\E[100m, rev=\E[7m, ri=\EM, rmso=\E[27m, rmul=\E[24m, sgr0=\E[0m\017, smso=\E[7m, - smul=\E[4m, vpa=\E[%i%p1%dd, use=vt220+vtedit, - use=vt100+enq, use=klone+color, use=vt100, - use=vt220+cvis, + smul=\E[4m, vpa=\E[%i%p1%dd, use=ansi+idl, + use=vt220+vtedit, use=vt100+enq, use=klone+color, + use=vt100, use=vt220+cvis, # Version 4.59 has regular VT100 line-drawing (so it is no longer necessary # to choose a Windows OEM font). @@ -4340,7 +4409,7 @@ teraterm2.3|Tera Term Pro, # - it recognizes the dtterm window controls for reporting size in # characters and pixels. # - it passes SIGWINCH. -teraterm4.59|Tera Term Pro, +teraterm4.59|Tera Term Pro 4.59, bce, xenl@, ncv#41, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, @@ -4370,7 +4439,7 @@ teraterm4.59|Tera Term Pro, # + recognizes xterm's original direct-colors sequences, but result is # poor. # + no UTF-8 apparent when UTF-8 is set, with font Lucida Control -teraterm4.97|Tera Term Pro, +teraterm4.97|Tera Term Pro 4.97, XT, use=ecma+color, use=xterm+sm+1006, use=teraterm4.59, teraterm-256color|TeraTerm with xterm 256-colors, use=xterm+256setaf, use=teraterm, @@ -4444,9 +4513,88 @@ ms-vt100+|vt100+|windows XP VT100+ (sic), ms-vt-utf8|vt-utf8|UTF-8 flavor of VT100+, use=ms-vt100+, +# VT-UTF-8 and VT100+ Protocols +# https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-vuvp/969416c0-ccd6-4a75-a9b3-597d7713845b +# +# This Microsoft "protocol" adapted the aixterm 16-color feature from xterm's +# documentation in 2015, as seen in successive revisions: +# +# 2013/07/22 has 8 colors +# 2015/10/16 has 16 colors using SGR 90-97, 100-107 as well as SGR 24 and 27, +# adds "informative" reference to xterm's ctlseqs +# +# The cnorm/civis definitions added in 2015 are unrelated to any standard. +ms-vt100-16color|VT-UTF-8 and VT100+, + civis=\E[?h, cnorm=\E[?l, rmso=\E[27m, rmul=\E[24m, + use=ibm+16color, use=ms-vt100+, + +# Based on +# https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences +# We use this scheme to map function keys +# terminfo modifier code keys +# kf13-kf24 shift 2 F1 to F12 +# kf25-kf36 alt 3 F1 to F12 +# kf37-kf48 control 4 F1 to F12 +# kf49-kf60 ctrl-alt 7 F1 to F12 +# +# Unclear: smam and rmam implemented? +# Unclear: rmkx, smkx, rmir, smir - irrelevant? +# +# TD: +# + According to tack, tbc and cbt fail. +# + The line-drawing (acsc) does not work in telnet or ssh. I added the +# U8 extension to tell ncurses to use UTF-8 for line-drawing (when the +# locale uses UTF-8). That won't work for telnet (which uses ASCII), +# but seems to work for OpenSSH's ssh. I set the codepage to 65001, +# of course. +# + Function keys... do not work consistently in telnet and ssh. With +# telnet, kf1-kf4 are \EOP to \EOS, and kf5-kf12 match the terminfo. +# But with ssh, it's entirely different (reminds me of rxvt). +winconsole|Windows 10 new console, + am, km, mir, msgr, xenl, + ncv@, U8#1, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy + yzz~~, + bel=^G, blink@, cr=\r, ech=\E[%p1%dX, el1=\E[0K, ich1@, ind=\n, + invis@, is1=\E[!p, kf13=\E[11;2~, kf14=\E[12;2~, + kf15=\E[13;2~, kf16=\E[14;2~, kf17=\E[15;2~, + kf18=\E[17;2~, kf19=\E[18;2~, kf20=\E[19;2~, + kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[24;2~, + kf24=\E[25;2~, kf25=\E[11;3~, kf26=\E[12;3~, + kf27=\E[13;3~, kf28=\E[14;3~, kf29=\E[15;3~, + kf30=\E[17;3~, kf31=\E[18;3~, kf32=\E[19;3~, + kf33=\E[20;3~, kf34=\E[21;3~, kf35=\E[24;3~, + kf36=\E[25;3~, kf37=\E[11;4~, kf38=\E[12;4~, + kf39=\E[13;4~, kf40=\E[14;4~, kf41=\E[15;4~, + kf42=\E[17;4~, kf43=\E[18;4~, kf44=\E[19;4~, + kf45=\E[20;4~, kf46=\E[21;4~, kf47=\E[24;4~, + kf48=\E[25;4~, kf49=\E[11;7~, kf50=\E[12;7~, + kf51=\E[13;7~, kf52=\E[14;7~, kf53=\E[15;7~, + kf54=\E[17;7~, kf55=\E[18;7~, kf56=\E[19;7~, + kf57=\E[20;7~, kf58=\E[21;7~, kf59=\E[24;7~, + kf60=\E[25;7~, khome=\E[1~, nel=\r\n, ri=\E[T, rmacs=\E(B, + rmir@, rmpch@, rs1=\E[!p, + sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t + \E(0%e\E(B%;, + sgr0=\E[0m\E(B, smacs=\E(0, smir@, smpch@, use=ansi+arrows, + use=ansi+csr, use=ansi+cup, use=ansi+erase, use=ansi+idc, + use=ansi+idl, use=ecma+index, use=ansi+inittabs, + use=ansi+local, use=ecma+sgr, use=ecma+color, + use=vt220+cvis, use=vt220+pcedit, use=xterm+nopcfkeys, + # Windows Terminal (Preview) # https://github.com/microsoft/terminal # +# Windows 10 22H2 (also Windows 11) +# Version 1.16.10261.0 +# +# - Windows Terminal #1553: "Feature Request: Mouse/Touch/Pointer Bindings +# (like middle-click paste, right-click context menu, etc.)", compare to +# https://learn.microsoft.com/en-us/windows/console/mouse-event-record-str +# This appears to be related to a problem with its implementation of the +# Console API; the mouse does not work in a "Command Window" (e.g., as used +# in the ncurses MinGW driver), although escape sequences work. +# # Windows 10 21H1 # Version 1.9.1942.0 # @@ -4537,10 +4685,10 @@ ms-vt-utf8|vt-utf8|UTF-8 flavor of VT100+, ms-terminal|Windows10 terminal, npc, cud1=\E[B, kcbt=\E[Z, rmkx=\E[?1l, rmm@, smkx=\E[?1h, smm@, - Cr@, Ms@, use=xterm+256color, use=xterm+pcfkeys, - use=ansi+rep, use=xterm+sm+1006, use=ecma+index, - use=ecma+italics, use=ecma+strikeout, use=xterm-basic, - use=xterm+tmux, + Cr@, Ms@, use=linux+kbs, use=xterm+256color, + use=xterm+pcfkeys, use=ansi+rep, use=xterm+sm+1006, + use=ecma+index, use=ecma+italics, use=ecma+strikeout, + use=xterm-basic, use=xterm+tmux, #### Visual Studio # Visual Studio Code 1.45.0 uses xterm.js 12.8.1 (see https://xtermjs.org/). @@ -4589,9 +4737,10 @@ ms-terminal|Windows10 terminal, # - color-palette cannot be changed vscode|xterm.js|Visual Studio Code terminal using xterm.js, npc, - kcbt=\E[Z, rmkx=\E[?1l, smkx=\E[?1h, use=xterm+256setaf, - use=ecma+index, use=xterm+sm+1006, use=xterm+pcfkeys, - use=ecma+italics, use=xterm-basic, + kcbt=\E[Z, rmkx=\E[?1l, smkx=\E[?1h, use=linux+kbs, + use=xterm+256setaf, use=ecma+index, use=xterm+focus, + use=xterm+sm+1006, use=xterm+pcfkeys, use=ecma+italics, + use=xterm-basic, use=bracketed+paste, vscode-direct|Visual Studio Code with direct-colors, use=xterm+indirect, use=vscode, @@ -4618,14 +4767,14 @@ x10term|vs100-x10|xterm terminal emulator (X10 window system), cols#80, it#8, lines#65, bold=\E[1m, clear=\E[H\E[2J, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, il=\E[%p1%dL, - il1=\E[L, ind=\n, is2=\E\E[m\E[?7h\E[?1;4l, kbs=^H, + cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, ed=\E[J, el=\E[K, + home=\E[H, ht=^I, ind=\n, is2=\E\E[m\E[?7h\E[?1;4l, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rev=\E[7m, ri=\EM, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, - smso=\E[7m, smul=\E[4m, + smso=\E[7m, smul=\E[4m, use=ansi+idl, + # csl is extension which clears the status line x10term+sl|status-line for X10 xterm, eslok, hs, @@ -4639,26 +4788,22 @@ x10term+sl|status-line for X10 xterm, xterm-r5|xterm R5 version, OTbs, am, km, msgr, xenl, cols#80, it#8, lines#24, - bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\n, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kdl1=\E[31~, kel=\E[8~, kf0=\EOq, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + hts=\EH, ind=\n, kdl1=\E[31~, kel=\E[8~, kf0=\EOq, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, - kil1=\E[30~, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, - rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + kil1=\E[30~, kmous=\E[M, rev=\E[7m, ri=\EM, rmkx=\E[?1l\E>, + rmso=\E[m, rmul=\E[m, rs2=\E>\E[?1;3;4;5;6l\E[4l\E[?7h\E[m\E[r\E[2J\E[H, - sc=\E7, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1 %;m, - sgr0=\E[m, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, use=vt220+pcedit, use=vt100+enq, - use=xterm+kbs, + sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + tbc=\E[3g, use=xterm+kbs, use=ansi+apparrows, + use=ansi+csr, use=ansi+idc, use=ansi+idl, use=ansi+local, + use=vt220+pcedit, use=vt100+enq, + # Compatible with the R6 xterm # (from XFree86 3.2 distribution, and added, removed) # added khome/kend, hts based on the R6 xterm code - TD @@ -4668,13 +4813,10 @@ xterm-r6|xterm X11R6 version, OTbs, am, km, mir, msgr, xenl, cols#80, it#8, lines#24, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, - il1=\E[L, ind=\n, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, + dch1=\E[P, ed=\E[J, el=\E[K, enacs=\E)0, home=\E[H, ht=^I, + hts=\EH, ind=\n, is2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, @@ -4682,12 +4824,13 @@ xterm-r6|xterm X11R6 version, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kmous=\E[M, meml=\El, memu=\Em, - rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, - rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - rs2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, sc=\E7, - sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, + rev=\E[7m, ri=\EM, rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, + rs2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, + sgr0=\E[m, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, tbc=\E[3g, + use=xterm+alt47, use=ansi+csr, use=ansi+idl, + use=ansi+local, use=ansi+sgrso, use=ansi+sgrul, use=vt220+vtedit, use=xterm+kbs, use=vt100+enq, + xterm-old|antique xterm version, use=xterm-r6, # The monochrome version began as a copy of "xtermm" (from Solaris), and was @@ -4703,40 +4846,35 @@ xterm-mono|monochrome xterm, # The name has been changed and some aliases have been removed. xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System), OTbs, am, bce, km, mir, msgr, xenl, XT, - cols#80, it#8, lines#24, ncv@, + cols#80, lines#24, ncv@, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, - flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\n, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ech=\E[%p1%dX, ed=\E[J, el=\E[K, + el1=\E[1K, enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, + home=\E[H, hpa=\E[%i%p1%dG, ind=\n, is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, - kbeg=\EOE, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=^?, kend=\EOF, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, - kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, - kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, - kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - kfnd=\E[1~, khome=\EOH, kich1=\E[2~, kmous=\E[M, knp=\E[6~, - kpp=\E[5~, kslt=\E[4~, meml=\El, memu=\Em, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, - rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, - rs1=^O, rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, - sc=\E7, + kbeg=\EOE, kbs=^?, kdch1=^?, kend=\EOF, kf1=\E[11~, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, + kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, + kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, + kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, kmous=\E[M, kslt=\E[4~, + meml=\El, memu=\Em, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=^O, + rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, vpa=\E[%i%p1%dd, use=xterm+kbs, use=vt100+enq, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, + smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, + use=ansi+apparrows, use=ansi+csr, use=ansi+idc, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=xterm+alt47, use=xterm+kbs, use=vt100+enq, use=ecma+color, use=vt220+cvis, use=vt220+keypad, + use=vt220+pcedit, # This is the stock xterm entry supplied with XFree86 3.3, which uses VT100 # codes for F1-F4 except while in VT220 mode. @@ -4762,18 +4900,17 @@ xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System), npc, kDC=\E[3;5~, kEND=\EO5F, kHOM=\EO5H, kIC=\E[2;5~, kLFT=\EO5D, kNXT=\E[6;5~, kPRV=\E[5;5~, kRIT=\EO5C, ka1@, - ka3@, kb2=\EOE, kc1@, kc3@, kcbt=\E[Z, kdch1=\E[3~, kend=\EOF, - kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S, - kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, - kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, - kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, kf26=\EO5Q, - kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~, kf30=\E[17;5~, - kf31=\E[18;5~, kf32=\E[19;5~, kf33=\E[20;5~, - kf34=\E[21;5~, kf35=\E[23;5~, kf36=\E[24;5~, kf37=\EO6P, - kf38=\EO6Q, kf39=\EO6R, kf40=\EO6S, kf41=\E[15;6~, - kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, - kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, - kf48=\E[24;6~, khome=\EOH, + ka3@, kb2=\EOE, kc1@, kc3@, kcbt=\E[Z, kf13=\EO2P, kf14=\EO2Q, + kf15=\EO2R, kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, + kf19=\E[18;2~, kf20=\E[19;2~, kf21=\E[20;2~, + kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, + kf26=\EO5Q, kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~, + kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, + kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, + kf36=\E[24;5~, kf37=\EO6P, kf38=\EO6Q, kf39=\EO6R, + kf40=\EO6S, kf41=\E[15;6~, kf42=\E[17;6~, kf43=\E[18;6~, + kf44=\E[19;6~, kf45=\E[20;6~, kf46=\E[21;6~, + kf47=\E[23;6~, kf48=\E[24;6~, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%? %p9%t\016%e\017%;, use=xterm+alt1049, use=xterm-xf86-v333, @@ -4794,13 +4931,10 @@ vt220+cvis|DECTCEM VT220 cursor-visibility, civis=\E[?25l, cnorm=\E[?25h, vt220+cvis8|8-bit DECTCEM VT220 cursor-visibility, civis=\233?25l, cnorm=\233?25h, -# The cvvis capability was unused in the SVr4 terminal descriptions for the -# AT&T terminals, and there are no available documents as of 2021 which can -# provide that it would have worked. The first block is used for those 1980s -# terminals; the second is used for terminals whose behavior can be verified. +# The first block is for terminals which did not support blinking cursor. att610+cvis0|AT&T 610 cursor-visibility, - civis=\E[?25l, cnorm=\E[?25h\E[?12l, -att610+cvis|xterm cursor-visibility in XFree86 4.4, + civis=\E[?25l, cnorm=\E[?12l\E[?25h, +att610+cvis|AT&T 610 cursor-visibility with blink, civis=\E[?25l, cnorm=\E[?12l\E[?25h, cvvis=\E[?12;25h, # This version was released in XFree86 4.4. @@ -4812,22 +4946,36 @@ xterm-xfree86|xterm terminal emulator (XFree86), xterm+nofkeys|building block for xterm fkey-variants, npc, - kcbt=\E[Z, kent=\EOM, nel=\EE, use=ecma+index, - use=ansi+rep, use=ecma+strikeout, use=vt420+lrmm, + kcbt=\E[Z, nel=\EE, use=ecma+index, use=ansi+rep, + use=ecma+strikeout, use=vt420+lrmm, use=xterm+focus, use=xterm+sm+1006, use=xterm+tmux, use=ecma+italics, use=xterm+keypad, use=xterm-basic, +xterm-p370|xterm patch #370, + rv=\E\\[41;[1-6][0-9][0-9];0c, + xr=\EP>\\|XTerm\\([1-9][0-9]+\\)\E\\\\, + use=ecma+index, use=ansi+rep, use=ecma+strikeout, + use=xterm+pcfkeys, use=xterm+nofkeys, + use=bracketed+paste, use=report+version, + use=xterm+focus, + +xterm-p371|xterm patch #371, + use=dec+sl, use=xterm-p370, + # This version reflects the current xterm features. xterm-new|modern xterm terminal emulator, - npc, - kcbt=\E[Z, kent=\EOM, nel=\EE, use=ecma+index, - use=ansi+rep, use=ecma+strikeout, use=xterm+pcfkeys, - use=xterm+nofkeys, + use=xterm-p370, # This fragment is for people who cannot agree on what the backspace key -# should send. +# should send. The ncurses configure script option "--with-xterm-kbs" can +# set it to BS (standard) or DEL (Linux's notion of "vt220"). xterm provides +# either, depending on how the pseudoterminals are configured. xterm+kbs|fragment for backspace key, kbs=^H, + +# Use this fragment for terminals that always use DEL for "backspace". +linux+kbs|fragment for "backspace" key, + kbs=^?, # # This fragment describes as much of XFree86 xterm's "pc-style" function # keys as will fit into terminfo's 60 function keys. @@ -4844,7 +4992,7 @@ xterm+kbs|fragment for backspace key, # --------------------------------- # The meta key may also be used as a modifier in this scheme, adding another # bit to the parameter. -xterm+pcfkeys|fragment for PC-style fkeys, +xterm+pcfkeys|xterm fragment for PC-style fkeys, use=xterm+app, use=xterm+pcf2, use=xterm+pcc2, use=xterm+pce2, @@ -4869,13 +5017,23 @@ xterm+nopcfkeys|fragment without PC-style fkeys, kf42=\E[63~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, +vt100+noapp|fragment with cursor keys in normal mode, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + use=vt100+noapp+pc, + xterm+noapp|fragment with cursor keys in normal mode, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[F, khome=\E[H, xterm+app|fragment with cursor keys in application mode, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\EOF, - khome=\EOH, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + use=xterm+app+pc, + +vt100+noapp+pc|fragment for noapp pc-style home/end, + kend=\E[F, khome=\E[H, + +xterm+app+pc|fragment for app pc-style home/end, + kend=\EOF, khome=\EOH, # # The "PC-style" modifier scheme was introduced in xterm patch #94 (1999/3/27) # and revised in xterm patch #167 (2002/8/24). Some other terminal emulators @@ -4948,8 +5106,7 @@ xterm+pcc0|fragment with modifyCursorKeys:0, # Here are corresponding fragments from xterm patch #216: # xterm+pcf0|fragment with modifyFunctionKeys:0, - kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S, + kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, kf26=\EO5Q, @@ -4960,50 +5117,51 @@ xterm+pcf0|fragment with modifyFunctionKeys:0, kf4=\EOS, kf40=\EO6S, kf41=\E[15;6~, kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, kf49=\EO3P, - kf5=\E[15~, kf50=\EO3Q, kf51=\EO3R, kf52=\EO3S, - kf53=\E[15;3~, kf54=\E[17;3~, kf55=\E[18;3~, - kf56=\E[19;3~, kf57=\E[20;3~, kf58=\E[21;3~, - kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, kf61=\EO4P, - kf62=\EO4Q, kf63=\EO4R, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kf50=\EO3Q, kf51=\EO3R, kf52=\EO3S, kf53=\E[15;3~, + kf54=\E[17;3~, kf55=\E[18;3~, kf56=\E[19;3~, + kf57=\E[20;3~, kf58=\E[21;3~, kf59=\E[23;3~, + kf60=\E[24;3~, kf61=\EO4P, kf62=\EO4Q, kf63=\EO4R, + use=xterm+nopcfkeys, # xterm+pcf2|fragment with modifyFunctionKeys:2, - kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, - kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, - kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, - kf23=\E[23;2~, kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q, - kf27=\E[1;5R, kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR, - kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, - kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, - kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, kf39=\E[1;6R, - kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, kf42=\E[17;6~, - kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~, - kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, - kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, kf51=\E[1;3R, + kf1=\EOP, kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, + kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~, + kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, + kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, + kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S, + kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~, + kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~, + kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, + kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, + kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, + kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, + kf48=\E[24;6~, kf49=\E[1;3P, kf50=\E[1;3Q, kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~, kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~, - kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, - kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, + kf58=\E[21;3~, kf59=\E[23;3~, kf60=\E[24;3~, + kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, + use=xterm+nopcfkeys, # # Chunks from xterm #230: -xterm+pce2|fragment with modifyCursorKeys:2, +xterm+pce2|fragment with modifyCursorKeys:2 editing-keys, kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, - kNXT=\E[6;2~, kPRV=\E[5;2~, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, kDC3=\E[3;3~, kDC4=\E[3;4~, kDC5=\E[3;5~, - kDC6=\E[3;6~, kDC7=\E[3;7~, kEND3=\E[1;3F, kEND4=\E[1;4F, - kEND5=\E[1;5F, kEND6=\E[1;6F, kEND7=\E[1;7F, - kHOM3=\E[1;3H, kHOM4=\E[1;4H, kHOM5=\E[1;5H, - kHOM6=\E[1;6H, kHOM7=\E[1;7H, kIC3=\E[2;3~, kIC4=\E[2;4~, - kIC5=\E[2;5~, kIC6=\E[2;6~, kIC7=\E[2;7~, kNXT3=\E[6;3~, - kNXT4=\E[6;4~, kNXT5=\E[6;5~, kNXT6=\E[6;6~, - kNXT7=\E[6;7~, kPRV3=\E[5;3~, kPRV4=\E[5;4~, - kPRV5=\E[5;5~, kPRV6=\E[5;6~, kPRV7=\E[5;7~, - use=xterm+edit, + kNXT=\E[6;2~, kPRV=\E[5;2~, kDC3=\E[3;3~, kDC4=\E[3;4~, + kDC5=\E[3;5~, kDC6=\E[3;6~, kDC7=\E[3;7~, kEND3=\E[1;3F, + kEND4=\E[1;4F, kEND5=\E[1;5F, kEND6=\E[1;6F, + kEND7=\E[1;7F, kHOM3=\E[1;3H, kHOM4=\E[1;4H, + kHOM5=\E[1;5H, kHOM6=\E[1;6H, kHOM7=\E[1;7H, + kIC3=\E[2;3~, kIC4=\E[2;4~, kIC5=\E[2;5~, kIC6=\E[2;6~, + kIC7=\E[2;7~, kNXT3=\E[6;3~, kNXT4=\E[6;4~, + kNXT5=\E[6;5~, kNXT6=\E[6;6~, kNXT7=\E[6;7~, + kPRV3=\E[5;3~, kPRV4=\E[5;4~, kPRV5=\E[5;5~, + kPRV6=\E[5;6~, kPRV7=\E[5;7~, use=xterm+edit, xterm+edit|fragment for 6-key editing-keypad, + use=xterm+pc+edit, use=vt220+pcedit, + +xterm+decedit|fragment for vt220 6-key editing-keypad, kdch1=\E[3~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - use=xterm+pc+edit, + use=xterm+vt+edit, xterm+pc+edit|fragment for pc-style editing keypad, kend=\E[4~, khome=\E[1~, @@ -5016,6 +5174,9 @@ xterm+vt+edit|fragment for VT220-style editing keypad, xterm+noalt|xterm without altscreen, rmcup@, smcup@, +xterm+alt47|X11R4 alternate-screen, + rmcup=\E[2J\E[?47l\E8, smcup=\E7\E[?47h, + xterm+alt1049|xterm 90 feature, rmcup=\E[?1049l, smcup=\E[?1049h, @@ -5081,35 +5242,34 @@ xterm+r6f2|xterm with oldFunctionKeys and modifyFunctionKeys:2, kf52=\E[14;3~, kf61=\E[11;4~, kf62=\E[12;4~, kf63=\E[13;4~, use=xterm+pcf2, # +xterm+acs|ISO-2022 alternate character-switching for xterm, + acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + enacs@, rmacs=\E(B, smacs=\E(0, + # This chunk is used for building the VT220/Sun/PC keyboard variants. xterm-basic|modern xterm terminal emulator - common, OTbs, am, bce, mir, msgr, xenl, AX, XT, - colors#8, cols#80, it#8, lines#24, pairs#64, - acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + colors#8, cols#80, lines#24, pairs#64, + bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\n, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, - kmous=\E[M, meml=\El, memu=\Em, op=\E[39;49m, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, - rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, + ich=\E[%p1%d@, ind=\n, is2=\E[!p\E[?3;4l\E[4l\E>, + kmous=\E[M, meml=\El, memu=\Em, op=\E[39;49m, ri=\EM, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, + rmul=\E[24m, rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%; %?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, - sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%i%p1%dd, E3=\E[3J, use=ansi+pp, use=xterm+kbs, - use=xterm+alt+title, use=ansi+enq, use=att610+cvis, + sgr0=\E(B\E[m, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, + vpa=\E[%i%p1%dd, E3=\E[3J, use=ansi+csr, use=ansi+enq, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+pp, use=ansi+sgrbold, use=xterm+kbs, + use=xterm+alt+title, use=att610+cvis, use=xterm+acs, use=xterm+meta, xterm+meta|meta mode for xterm, @@ -5215,7 +5375,7 @@ xterm-88color|xterm with 88 colors, # is of interest only to the numerically illiterate), is compatible with other # terminal descriptions written for curses. It relies upon the extended range # for numeric capabilities provided in ncurses 6.1: -xterm+direct2|xterm with direct-color indexing, +xterm+direct2|xterm with direct-color indexing (old building-block), RGB, colors#0x1000000, pairs#0x10000, CO#8, initc@, op=\E[39;49m, @@ -5230,7 +5390,7 @@ xterm-direct2|xterm with direct-color indexing (old), # That in turn had a problem: in the original patch submitted for KDE konsole # in 2006, the submitter and the developer alike overlooked a "color space # identifier" parameter. This version provides for that parameter: -xterm+direct|xterm with direct-color indexing, +xterm+direct|xterm with direct-color indexing (building-block), RGB, colors#0x1000000, pairs#0x10000, CO#8, initc@, op=\E[39;49m, @@ -5252,7 +5412,7 @@ mlterm-direct|mlterm with direct-color indexing, # that xterm's original implementation should have used colons for the # subparameter separators, but chose not to correct this in konsole. As of # late 2017, konsole still accepts only the nonstandard semicolon delimiters. -xterm+indirect|xterm with direct-color indexing (old), +xterm+indirect|xterm with direct-color indexing (old legacy building-block), RGB, colors#0x1000000, pairs#0x10000, initc@, op=\E[39;49m, @@ -5296,7 +5456,7 @@ nsterm-direct|nsterm with direct-color indexing, # palette, though the intrusion of indexed colors on the direct-color space # would be more noticeable. -xterm+direct16|xterm with direct-color indexing, +xterm+direct16|xterm with direct-color indexing (16-color building-block), CO#16, setab=\E[%?%p1%{8}%<%t4%p1%d%e%?%p1%{16}%<%t%p1%{92}%+%d%e48 :2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%& @@ -5309,7 +5469,7 @@ xterm+direct16|xterm with direct-color indexing, xterm-direct16|xterm with direct-colors and 16 indexed colors, use=xterm+direct16, use=xterm, -xterm+direct256|xterm with direct-color indexing, +xterm+direct256|xterm with direct-color indexing (256-color building-block), CO#0x100, setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e%? %p1%{256}%<%t48;5;%p1%d%e48:2::%p1%{65536}%/%d:%p1 @@ -5342,7 +5502,7 @@ xterm-direct256|xterm with direct-colors and 256 indexed colors, # Se resets the cursor style to the terminal power-on default. # # Cs and Cr set and reset the cursor colour. -xterm+tmux|advanced xterm features used in tmux, +xterm+tmux|advanced xterm features used in tmux (cursor style 2), Cr=\E]112\007, Cs=\E]12;%p1%s\007, Ms=\E]52;%p1%s;%p2%s\007, Se=\E[2 q, Ss=\E[%p1%d q, xterm+tmux2|advanced xterm features used in tmux, @@ -5361,7 +5521,6 @@ xterm+tmux2|advanced xterm features used in tmux, xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), OTbs, am, bce, km, mc5i, mir, msgr, npc, xenl, AX, colors#8, cols#80, it#8, lines#24, pairs#64, - acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\2335m, bold=\2331m, cbt=\233Z, civis=\233?25l, clear=\233H\2332J, cnorm=\233?25l\233?25h, cr=\r, csr=\233%i%p1%d;%p2%dr, @@ -5386,9 +5545,8 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), kf9=\23320~, khome=\2331~, kich1=\2332~, kmous=\233M, knp=\2336~, kpp=\2335~, mc0=\233i, mc4=\2334i, mc5=\2335i, meml=\El, memu=\Em, op=\23339;49m, rc=\E8, rev=\2337m, - ri=\215, rmacs=\E(B, rmam=\233?7l, rmcup=\233?1049l, - rmir=\2334l, rmkx=\233?1l\E>, rmso=\23327m, rmul=\23324m, - rs1=\Ec, + ri=\215, rmam=\233?7l, rmcup=\233?1049l, rmir=\2334l, + rmkx=\233?1l\E>, rmso=\23327m, rmul=\23324m, rs1=\Ec, rs2=\E[62"p\E\sG\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r \E8, sc=\E7, setab=\2334%p1%dm, setaf=\2333%p1%dm, @@ -5398,11 +5556,11 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), %{6}%=%t3%e%p1%d%;m, sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p7%t;8%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\2330m\E(B, smacs=\E(0, smam=\233?7h, - smcup=\233?1049h, smir=\2334h, smkx=\233?1h\E=, - smso=\2337m, smul=\2334m, tbc=\2333g, u6=\233[%i%d;%dR, - u7=\E[6n, u8=\233[?%[;0123456789]c, u9=\E[c, - vpa=\233%i%p1%dd, use=xterm+kbs, + sgr0=\2330m\E(B, smam=\233?7h, smcup=\233?1049h, + smir=\2334h, smkx=\233?1h\E=, smso=\2337m, smul=\2334m, + tbc=\2333g, u6=\233[%i%d;%dR, u8=\233[?%[;0123456789]c, + vpa=\233%i%p1%dd, use=ansi+enq, use=xterm+acs, + use=xterm+kbs, # Note: normally xterm supports modified function-keys as described in # XTerm - "Other" modified keys @@ -5422,24 +5580,23 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), # -e tack # e.g., "foo sun" if the script is named "foo" -TD xterm-hp|xterm with hpterm function keys, - kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - kdch1=\EP, kend=\EF, khome=\Eh, kich1=\EQ, knp=\ES, kpp=\ET, - use=hp+pfk-cr, use=xterm+nofkeys, use=xterm+nopcfkeys, + kclr=\EJ, kdch1=\EP, kend=\EF, khome=\Eh, kich1=\EQ, knp=\ES, + kpp=\ET, use=hp+pfk-cr, use=vt52+arrows, + use=xterm+nofkeys, use=xterm+nopcfkeys, xterm-sco|xterm with SCO function keys, - kbeg=\E[E, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=^?, kend=\E[F, kf1=\E[M, kf10=\E[V, kf11=\E[W, - kf12=\E[X, kf13=\E[Y, kf14=\E[Z, kf15=\E[a, kf16=\E[b, - kf17=\E[c, kf18=\E[d, kf19=\E[e, kf2=\E[N, kf20=\E[f, - kf21=\E[g, kf22=\E[h, kf23=\E[i, kf24=\E[j, kf25=\E[k, - kf26=\E[l, kf27=\E[m, kf28=\E[n, kf29=\E[o, kf3=\E[O, - kf30=\E[p, kf31=\E[q, kf32=\E[r, kf33=\E[s, kf34=\E[t, - kf35=\E[u, kf36=\E[v, kf37=\E[w, kf38=\E[x, kf39=\E[y, - kf4=\E[P, kf40=\E[z, kf41=\E[@, kf42=\E[[, kf43=\E[\\, - kf44=\E[], kf45=\E[\^, kf46=\E[_, kf47=\E[`, kf48=\E[{, - kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, + kbeg=\E[E, kbs=^?, kdch1=^?, kend=\E[F, kf1=\E[M, kf10=\E[V, + kf11=\E[W, kf12=\E[X, kf13=\E[Y, kf14=\E[Z, kf15=\E[a, + kf16=\E[b, kf17=\E[c, kf18=\E[d, kf19=\E[e, kf2=\E[N, + kf20=\E[f, kf21=\E[g, kf22=\E[h, kf23=\E[i, kf24=\E[j, + kf25=\E[k, kf26=\E[l, kf27=\E[m, kf28=\E[n, kf29=\E[o, + kf3=\E[O, kf30=\E[p, kf31=\E[q, kf32=\E[r, kf33=\E[s, + kf34=\E[t, kf35=\E[u, kf36=\E[v, kf37=\E[w, kf38=\E[x, + kf39=\E[y, kf4=\E[P, kf40=\E[z, kf41=\E[@, kf42=\E[[, + kf43=\E[\\, kf44=\E[], kf45=\E[\^, kf46=\E[_, kf47=\E[`, + kf48=\E[{, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, kich1=\E[L, kmous=\E[>M, knp=\E[G, kpp=\E[I, - use=xterm+nofkeys, + use=ansi+arrows, use=xterm+nofkeys, # The xterm-new description has all of the features, but is not completely # compatible with VT220. If you are using a Sun or PC keyboard, set the @@ -5452,32 +5609,26 @@ xterm-sco|xterm with SCO function keys, # xterm-vt220|xterm emulating VT220, npc, - kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kend=\E[4~, kent=\EOM, kf10=\E[21~, kf11=\E[23~, + kcbt=\E[Z, kend=\E[4~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, - kmous=\E[M, knp=\E[6~, kpp=\E[5~, nel=\EE, use=xterm+app, - use=xterm+edit, use=vt220+keypad, use=ecma+italics, - use=ecma+index, use=ansi+rep, use=ecma+strikeout, - use=xterm+sm+1006, use=xterm+tmux, use=xterm+keypad, - use=xterm-basic, + kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kmous=\E[M, nel=\EE, + use=xterm+app, use=xterm+edit, use=vt220+keypad, + use=ecma+italics, use=ecma+index, use=ansi+rep, + use=ecma+strikeout, use=xterm+focus, use=xterm+sm+1006, + use=xterm+tmux, use=xterm+keypad, use=xterm-basic, xterm-vt52|xterm emulating DEC VT52, - cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, clear=\EH\EJ, cr=\r, cub1=\ED, cud1=\EB, cuf1=\EC, - cup=\EY%p1%' '%+%c%p2%' '%+%c, cuu1=\EA, ed=\EJ, el=\EK, - home=\EH, ht=^I, ind=\n, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, nel=\r\n, ri=\EI, rmacs=\EG, smacs=\EF, - use=xterm+kbs, use=vt52+keypad, + clear=\EH\EJ, rmacs=\EG, smacs=\EF, use=xterm+kbs, + use=vt52+keypad, use=vt52-basic, xterm-noapp|xterm with cursor keys in normal mode, rmcup@, rmkx=\E>, smcup@, smkx=\E=, use=xterm+noapp, use=xterm, -xterm-24|vs100|xterms|xterm terminal emulator (X Window System), +xterm-24|vs100|xterms|xterm terminal emulator 24-line (X Window System), lines#24, use=xterm-old, # This is xterm for ncurses. @@ -5557,7 +5708,7 @@ xterm+sl-alt|alternate access X title line, # dec+sl|DEC VTxx status line, eslok, hs, - dsl=\E[1$~, fsl=\E[0$}, tsl=\E[2$~\E[1$}\E[%i%p1%d`, + dsl=\E[0$~, fsl=\E[0$}, tsl=\E[2$~\E[1$}\E[%i%p1%d`, # # The following xterm variants don't depend on your base version @@ -5575,6 +5726,33 @@ xterm-nic|xterm with ich/ich1 suppressed for non-curses programs, xterm1|xterm terminal emulator ignoring the alternate screen buffer, rmcup@, smcup@, use=xterm, +# https://invisible-island.net/xterm/xterm-paste64.html +# +# Bracketed paste was introduced by xterm patch #203 in May 2005, as part of a +# larger feature for manipulating the clipboard selection. Few terminals aside +# from xterm fully implement the clipboard feature, but several copy this +# detail. The names for the extended capabilities here were introduced by vim +# in January 2017, but used internally. In 2023, vim patch 9.0.1117 is needed +# to work with this change. +bracketed+paste|xterm bracketed paste, + BD=\E[?2004l, BE=\E[?2004h, PE=\E[201~, PS=\E[200~, + +# https://invisible-island.net/xterm/xterm.log.html#xterm_354 +# +# The response is a DSR sequence identifying the version: DCS > | text ST +# For example: +# ^[P>|XTerm(354)^[\ +report+version|Report xterm name and version (XTVERSION), + XR=\E[>0q, xr=\EP>\\|[ -~]+\E\\\\, use=report+da2, + +# Vim uses RV to denote the secondary device attributes. Xterm documents the +# - first parameter as the terminal type (extending it to VT100), +# - the second as the patch number for xterm, and +# - the third parameter as zero. +# Other terminals may provide useful responses, though few are documented. +report+da2|report secondary device attributes (DA2), + RV=\E[>c, rv=\E\\[[0-9]+;[0-9]+;[0-9]+c, + #### XTERM Mouse # The xterm mouse protocol is used by other terminal emulators. # In this section, two extended capabilities are used to illustrate the mouse @@ -5656,17 +5834,32 @@ xterm-x11hilite|X11 mouse with highlight, # xterm patch #83 (1998/10/7), added Jason Bacon's changes to provide an # "any-event" mouse mode. -xterm+sm+1002|xterm any-event mouse, - kmous=\E[M, XM=\E[?1002%?%p1%{1}%=%th%el%;, -xterm-1002|xterm any-event mouse, - use=xterm+sm+1002, use=xterm, +# +# These building blocks incorporate later features as well: +# xterm patch #224 (2007/2/11) added private mode 1004, for enabling/disabling +# focus in/out event reporting. +# xterm patch #277 (2012/01/07) added private mode 1006 -xterm+sm+1003|testing xterm-mouse, - kmous=\E[M, XM=\E[?1003%?%p1%{1}%=%th%el%;, +xterm+sm+1002|xterm any-button mouse, + kmous=\E[<, XM=\E[?1006;1004;1002%?%p1%{1}%=%th%el%;, + xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;, + use=xterm+focus, +xterm-1002|example of xterm any-button mouse, + use=xterm+sm+1002, use=xterm, -xterm-1003|testing xterm-mouse, +xterm+sm+1003|xterm any-event mouse, + XM=\E[?1006;1004;1003%?%p1%{1}%=%th%el%;, + use=xterm+sm+1002, +xterm-1003|example of xterm any-event mouse, use=xterm+sm+1003, use=xterm, +# Some terminal emulators implement xterm focus in/out, but do it incorrectly, +# interfering with user applications. +# https://lists.gnu.org/archive/html/bug-ncurses/2023-10/msg00087.html +xterm+focus|xterm focus-in/out event "keys", + XF, + fd=\E[?1004l, fe=\E[?1004h, kxIN=\E[I, kxOUT=\E[O, + # xterm patch #116 (1999/9/25) added Stephen P Wall's changes to support DEC # locator mode. @@ -5680,7 +5873,7 @@ xterm-1003|testing xterm-mouse, # where the coordinates in the mouse response would be encoded in UTF-8, # thereby extending the range of coordinates past 222=(255-33). This is the # "1005" mouse mode. -xterm+sm+1005|xterm UTF-8 mouse, +xterm+sm+1005|xterm UTF-8 mouse (building block), kmous=\E[M, XM=\E[?1005;1000%?%p1%{1}%=%th%el%;, xm=\E[M%?%p4%t3%e%p3%'\s'%+%c%;%p2%'!'%+%u%p1%'!'%+%u, xterm-1005|xterm UTF-8 mouse, @@ -5697,12 +5890,19 @@ xterm-1005|xterm UTF-8 mouse, # As an alternative (and fixing the longstanding limitation of X11 mouse # protocol regarding button-releases), I provided the 1006 mode, referring # to it as "SGR 1006" since the replies resemble the SGR control string: -xterm+sm+1006|xterm SGR-mouse, +xterm+sm+1006|xterm SGR-mouse (building block), kmous=\E[<, XM=\E[?1006;1000%?%p1%{1}%=%th%el%;, xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;, xterm-1006|xterm SGR-mouse, use=xterm+sm+1006, use=xterm, +# Some terminal emulators implement xterm focus in/out, but do it incorrectly, +# interfering with user applications. +# https://lists.gnu.org/archive/html/bug-ncurses/2023-10/msg00087.html +oldxterm+sm+1006|xterm SGR-mouse (building block), + kmous=\E[<, XM=\E[?1006;1000%?%p1%{1}%=%th%el%;, + xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;, + #### KTERM # (kterm: this had extension capabilities ":KJ:TY=ascii:" -- esr) # (kterm should not invoke DEC Graphics as the alternate character set @@ -5713,9 +5913,8 @@ xterm-1006|xterm SGR-mouse, kterm|kterm kanji terminal emulator (X window system), XT, ncv@, - acsc=``aajjkkllmmnnooppqqrrssttuuvvwwxx~~, - csr=\E[%i%p1%d;%p2%dr, enacs=, kmous=\E[M, rc=\E8, - rmacs=\E(B, rmam=\E[?7l, sc=\E7, + acsc=``aajjkkllmmnnooppqqrrssttuuvvwwxx~~, enacs=, + rmacs=\E(B, rmam=\E[?7l, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e \E(B%;, sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, use=x10term+sl, @@ -5732,34 +5931,31 @@ xtermm|xterm terminal emulator (monochrome), OTbs, am, km, mir, msgr, xenl, btns#3, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink@, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, getm=\E[%p1%dY, - home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^H, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kf0=\EOy, - kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf5=\EOT, kf6=\EOU, - kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, kmous=\E[^_, - knp=\E[U, kpp=\E[V, rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM, - rmacs=^O, rmcup=\E@0\E[?4r, rmso=\E[m, + bel=^G, blink@, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cud1=\n, + dch=\E[%p1%dP, dch1=\E[P, el1=\E[1K$<3>, enacs=\E(B\E)0, + getm=\E[%p1%dY, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, + ind=\n, kend=\E[Y, kf0=\EOy, kf10=\EOY, kf11=\EOZ, kf12=\EOA, + kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, + kmous=\E[^_, knp=\E[U, kpp=\E[V, reqmp=\E[492Z, rev=\E[7m, + ri=\EM, rmacs=^O, rmcup=\E@0\E[?4r, rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smcup=\E@0\E[?4s\E[?4h\E@1, - smso=\E[7m, tbc=\E[3g, use=vt100+fnkeys, + tbc=\E[3g, use=ansi+apparrows, use=ansi+csr, + use=ansi+cup, use=ansi+erase, use=ansi+idl, + use=ansi+local, use=ansi+sgrso, use=decid+cpr, + use=vt100+fnkeys, xtermc|xterm terminal emulator (color), - colors#8, ncv#7, pairs#64, - op=\E[100m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + ncv#7, + op=\E[100m, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, - use=xtermm, + use=xtermm, use=klone+color, # From: David J. MacKenzie 20 Apr 1995 # Here's a termcap entry I've been using for xterm_color, which comes @@ -5773,8 +5969,25 @@ xterm-pcolor|xterm with color used for highlights and status line, %t;7;31%;%?%p3%t;7;34%;m, smso=\E[7;31m, smul=\E[4;42m, use=xterm+sl, use=xterm-r6, +# This was mentioned +# http://unix.stackexchange.com/questions/119/colors-in-man-pages +# pointing to +# http://nion.modprobe.de/blog/archives/569-colored-manpages.html +# (blog posting by Nico Golde, June 24 2007) +# archive: +# https://web-beta.archive.org/web/20070921042430/http://nion.modprobe.de/mostlike.txt +# The comment hints where it started, but there are differences: +# Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm-pcolor +mostlike|manpages with color looking like most, + OTbs@, + bold=\E[1m\E[31m, + is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, kbs=^H, + meml@, memu@, rev=\E[7m\E[34m, + rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sgr@, + smso=\E[1;30m\E[47m, smul=\E[32m, TS@, use=xterm-pcolor, + # This describes the capabilities of color_xterm, an xterm variant from -# before ECMA-64 color support was folded into the main-line xterm release. +# before ECMA-48 color support was folded into the main-line xterm release. # This entry is straight from color_xterm's maintainer. # From: Jacob Mandelson , 09 Nov 1996 # The README's with the distribution also say that it supports SGR 21, 24, 25 @@ -5783,28 +5996,52 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X, OTbs, am, km, mir, msgr, xenl, XT, cols#80, it#8, lines#65, ncv@, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, home=\E[H, ht=^I, - ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, - is1=\E[r\E[m\E[?7h\E[?4;6l\E[4l, kbs=^H, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[8~, kf1=\E[11~, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, - kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[7~, kich1=\E[2~, - kmous=\E[M, knp=\E[6~, kpp=\E[5~, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmam=\E[?7l, rmcup=\E>\E[?41;1r, rmir=\E[4l, - rmso=\E[27m, rmul=\E[24m, + ich=\E[%p1%d@, ind=\n, is1=\E[r\E[m\E[?7h\E[?4;6l\E[4l, + kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, + kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[7~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, + rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmcup=\E>\E[?41;1r, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\E(B\017\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<, - sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;, sgr0=\E[0m\017, smacs=^N, smam=\E[?7h, smcup=\E[?1;41s\E[?1;41h\E=, smir=\E[4h, smso=\E[7m, - smul=\E[4m, use=ecma+color, use=vt220+keypad, + smul=\E[4m, use=ansi+apparrows, use=ansi+csr, + use=ansi+idl, use=ansi+local, use=decid+cpr, + use=ecma+color, use=vt220+keypad, + +# The IRAF source has a terminfo using "xterm-r5", but line-drawing does not +# work in that case. This entry uses xterm+acs, to work around that problem. +# +# Home/end keys do not work, due to a bug in the X Consortium xterm on which +# this is based: +# +# https://invisible-island.net/xterm/xterm.faq.html#bug_xterm_r6 +# +# Comparing to the X11R5 source, xgterm has dynamic and ANSI colors (probably +# not bce). It interchanges mouse buttons 2/3 for menus. +# +# It also has a few features found in later versions of xterm: +# - vi-button and dired-button, +# - i18n stuff like X11R6. +# - colorBD, colorUL +# - scrollBarRight +# +# Debian provides a package for xgterm (and iraf). Although the source for +# xgterm implements the control-sequences for ANSI color, the packaged xgterm +# does nothing with those, even after installing the app-defaults file which +# was overlooked by the Debian packager. +xgterm|graphic terminal for IRAF, + enacs=\E(B\E)0, rmacs=^O, + sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t + \016%e\017%;, + sgr0=\E[m\017, smacs=^N, use=xterm+acs, use=xterm-r5, + use=xterm+keypad, # The 'nxterm' distributed with Redhat Linux 5.2 is a slight rehack of # xterm-sb_right-ansi-3d, which implements ANSI colors, but does not support @@ -5829,8 +6066,7 @@ xterm-color|nxterm|generic color xterm, # with their Sun keyboard labels instead. # From: Simon J. Gerraty 10 Jan 1996 xterm-sun|xterm with sunFunctionKeys true, - kb2=\E[218z, kcpy=\E[197z, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3z, kend=\E[220z, + kb2=\E[218z, kcpy=\E[197z, kdch1=\E[3z, kend=\E[220z, kent=\EOM, kf1=\E[224z, kf10=\E[233z, kf11=\E[192z, kf12=\E[193z, kf13=\E[194z, kf14=\E[195z, kf15=\E[196z, kf17=\E[198z, kf18=\E[199z, kf19=\E[200z, kf2=\E[225z, @@ -5841,16 +6077,18 @@ xterm-sun|xterm with sunFunctionKeys true, kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z, kf9=\E[232z, kfnd=\E[200z, khlp=\E[196z, khome=\E[214z, kich1=\E[2z, knp=\E[222z, kpp=\E[216z, kund=\E[195z, - use=xterm+nofkeys, use=xterm+nopcfkeys, + use=xterm+kbs, use=ansi+apparrows, use=xterm+nofkeys, + use=xterm+nopcfkeys, + xterms-sun|small (80x24) xterm with sunFunctionKeys true, - cols#80, lines#24, use=xterm-sun, + use=xterm-sun, #### GNOME (VTE) # this describes the alpha-version of GNOME terminal shipped with Redhat 6.0 gnome-rh62|GNOME terminal, bce, kdch1=^?, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - use=xterm-color, + use=linux+kbs, use=xterm-color, # GNOME Terminal 1.4.0.4 (Redhat 7.2) # @@ -5870,14 +6108,13 @@ gnome-rh62|GNOME terminal, # vt100 TBC (tab reset) is not implemented. # xterm alternate screen controls do not restore cursor position properly # it hangs in tack after running function-keys test. -gnome-rh72|GNOME Terminal, +gnome-rh72|GNOME Terminal in RedHat 7, bce, km@, - kdch1=\E[3~, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - rmam=\E[?7l, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rmam=\E[?7l, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\016%e \017%;, sgr0=\E[0m\017, smam=\E[?7h, tbc@, use=vt220+cvis, - use=xterm-color, + use=linux+kbs, use=xterm-color, # GNOME Terminal 2.0.1 (Redhat 8.0) # @@ -5892,24 +6129,23 @@ gnome-rh72|GNOME Terminal, # kf1 and kf10 are not tested since they're assigned (hardcoded?) to menu # operations. Shift-tab generates a distinct sequence so it can be argued # that it implements kcbt. -gnome-rh80|GNOME Terminal, +gnome-rh80|GNOME Terminal in RedHat 8, bce@, msgr@, - ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, kbs=^?, - kcbt=\E^I, op=\E[39;49m, use=gnome-rh72, + ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, kcbt=\E^I, + op=\E[39;49m, use=gnome-rh72, # GNOME Terminal 2.2.1 (Redhat 9.0) # # bce and msgr are repaired. -gnome-rh90|GNOME Terminal, +gnome-rh90|GNOME Terminal in RedHat 9, bce, msgr, XT, - hpa=\E[%i%p1%dG, kDC=\E[3;2~, kLFT=\EO2D, kRIT=\EO2C, - kb2=\E[E, kcbt=\E[Z, kend=\EOF, khome=\EOH, tbc=\E[3g, - vpa=\E[%i%p1%dd, use=xterm+pcf0, use=xterm+pcfkeys, - use=gnome-rh80, + hpa=\E[%i%p1%dG, kLFT=\EO2D, kRIT=\EO2C, kb2=\E[E, + kcbt=\E[Z, tbc=\E[3g, vpa=\E[%i%p1%dd, use=xterm+pcf0, + use=xterm+pcfkeys, use=gnome-rh80, # GNOME Terminal 2.14.2 (Fedora Core 5) # Ed Catmur notes that gnome-terminal has recognized soft-reset since May 2002. -gnome-fc5|GNOME Terminal, +gnome-fc5|GNOME Terminal in Fedora Core 5, rs1=\Ec, rs2=\E7\E[r\E8\E[m\E[?7h\E[!p\E[?1;3;4;6l\E[4l\E>\E[?1000l \E[?25h, @@ -5973,15 +6209,14 @@ gnome-2012|GNOME Terminal 3.6.0, # # The parameters with \EO (SS3) are technically an error, since SS3 should have # no parameters. This appears to be rote copying based on xterm+pcc0. -vte+pcfkeys|VTE's variation on xterm+pcfkeys, - kf1=\EOP, kf13=\EO1;2P, kf14=\EO1;2Q, kf15=\EO1;2R, - kf16=\EO1;2S, kf2=\EOQ, kf25=\EO1;5P, kf26=\EO1;5Q, - kf27=\EO1;5R, kf28=\EO1;5S, kf3=\EOR, kf37=\EO1;6P, - kf38=\EO1;6Q, kf39=\EO1;6R, kf4=\EOS, kf40=\EO1;6S, +vte+pcfkeys|VTE's variation on xterm+pcfkeys (building block), + kf13=\EO1;2P, kf14=\EO1;2Q, kf15=\EO1;2R, kf16=\EO1;2S, + kf25=\EO1;5P, kf26=\EO1;5Q, kf27=\EO1;5R, kf28=\EO1;5S, + kf37=\EO1;6P, kf38=\EO1;6Q, kf39=\EO1;6R, kf40=\EO1;6S, kf49=\EO1;3P, kf50=\EO1;3Q, kf51=\EO1;3R, kf52=\EO1;3S, kf61=\EO1;4P, kf62=\EO1;4Q, kf63=\EO1;4R, use=xterm+pcfkeys, -gnome+pcfkeys|VTE's variation on xterm+pcfkeys, +gnome+pcfkeys|GHOME Terminal's variation on xterm+pcfkeys (building block), use=vte+pcfkeys, # deprecated - use "vte" for newer versions @@ -6011,12 +6246,13 @@ vte-2014|VTE 0.35.1, ncv@, cbt=\E[Z, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, ich=\E[%p1%d@, kent=\EOM, use=ecma+index, - use=xterm+sm+1006, use=xterm+pcfkeys, use=vte-2012, + use=oldxterm+sm+1006, use=xterm+pcfkeys, use=vte-2012, + use=bracketed+paste, # As of January 2018, this was the most recent release, # e.g., with gnome-terminal 3.26.2 vte-2017|VTE 0.50.2, - use=ecma+strikeout, use=vte-2014, + E3=\E[3J, use=ecma+strikeout, use=vte-2014, # VTE 0.51.2 and gnome-terminal 3.28.2 copied a feature from KovId's TTY # late in 2017 for changing the appearance of underlines, which was @@ -6024,9 +6260,24 @@ vte-2017|VTE 0.50.2, # 2018, respectively. Overline (Smol/Rmol) has been supported since December # 2017. vte-2018|VTE 0.51.2, - Rmol=\E[55m, Smol=\E[53m, Smulx=\E[4:%p1%dm, + AX, + blink=\E[5m, enacs=\E(B\E)0, nel=\EE, + rep=%p1%c\E[%p2%{1}%-%db, + sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t; + 8%;%?%p1%p3%|%t;7%;m%?%p9%t\016%e\017%;, + Rmol=\E[55m, Se=\E[1 q, Smol=\E[53m, Smulx=\E[4:%p1%dm, + use=xterm+alt+title, use=xterm+tmux, use=kitty+setal, use=vte-2017, +# Summarizing as of March 2022, these terminfo-capabilities of xterm are +# absent from VTE: +# - DEC application keypad mode +# - DEC-compatible status-line +# - DEC left/right margin support +# - DEC printer controls +# - AT&T cursor-blinking +# - meta mode, as documented in terminfo(5) +# - xterm's extension to clear scrollback vte|VTE aka GNOME Terminal, use=vte-2018, @@ -6056,10 +6307,12 @@ xfce|Xfce Terminal, hterm|Chromium hterm, npc, U8#1, - kcbt=\E[Z, kent=\EOM, nel=\EE, use=xterm+osc104, - use=ecma+index, use=ansi+rep, use=ecma+strikeout, - use=vt420+lrmm, use=xterm+sm+1006, use=xterm+tmux, - use=ecma+italics, use=xterm+pcfkeys, use=xterm-basic, + kcbt=\E[Z, kent=\EOM, nel=\EE, use=linux+kbs, + use=xterm+osc104, use=ecma+index, use=ansi+rep, + use=ecma+strikeout, use=vt420+lrmm, use=xterm+focus, + use=xterm+sm+1006, use=xterm+tmux, use=ecma+italics, + use=xterm+pcfkeys, use=xterm-basic, + use=bracketed+paste, hterm-256color|Chromium hterm with xterm 256-colors, use=xterm+256color2, use=hterm, @@ -6084,29 +6337,27 @@ hterm-256color|Chromium hterm with xterm 256-colors, # trimmed to eliminate those. Also, since it is a slightly older version of # VTE, it lacks a few more features (again, trimmed). termite|VTE-based terminal, - am, ccc, km, mir, msgr, npc, xenl, - cols#80, it#8, lines#24, ncv@, + am, km, mir, msgr, npc, xenl, + cols#80, lines#24, ncv@, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy yzz{{||}}~~, - bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, - flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ind=\n, invis=\E[8m, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ech=\E[%p1%dX, ed=\E[J, el=\E[K, + el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, home=\E[H, + hpa=\E[%i%p1%dG, ind=\n, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kb2=\EOE, kbs=^?, kcbt=\E[Z, - kent=\EOM, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E(B, + kent=\EOM, kmous=\E[M, rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, - rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, + rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| %t;7%;%?%p7%t;8%;m, sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, - use=xterm+alt1049, use=ecma+index, use=ansi+idc, - use=ansi+idl, use=ansi+enq, use=ecma+italics, - use=xterm+256color, use=ecma+color, use=vt220+cvis, - use=xterm+pcfkeys, use=xterm+sl-twm, + smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, use=ansi+csr, + use=ansi+enq, use=ansi+idc, use=ansi+idl, + use=ansi+inittabs, use=ecma+index, use=ecma+italics, + use=ansi+local, use=xterm+alt1049, use=xterm+256color, + use=ecma+color, use=vt220+cvis, use=xterm+pcfkeys, + use=xterm+sl-twm, #### Other GNOME # Multi-GNOME-Terminal 1.6.2 @@ -6121,7 +6372,8 @@ mgt|Multi GNOME Terminal, # or not is debatable). kvt|KDE terminal, bce, km@, - kdch1=^?, kend=\E[F, khome=\E[H, use=xterm-color, + kdch1=^?, kend=\E[F, khome=\E[H, use=linux+kbs, + use=xterm-color, # Konsole 1.0.1 (2001/11/25) # (formerly known as kvt) @@ -6176,22 +6428,23 @@ kvt|KDE terminal, # # Re-enable "bel", since it is latent in the source-code even though KDE config # often hides the feature (2020/5/30) -konsole-base|KDE console window, +konsole-base|KDE console window (common), bce, km@, npc, XT, ncv@, - blink=\E[5m, dim=\E[2m, ech=\E[%p1%dX, - flash=\E[?5h$<100/>\E[?5l, hpa=\E[%i%p1%dG, - invis=\E[8m, kbs=^?, kdch1=\E[3~, kend=\E[4~, kf1@, kf10@, - kf11@, kf12@, kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2@, - kf20@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, kfnd@, khome=\E[1~, - kslt@, rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, + ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, + hpa=\E[%i%p1%dG, kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, + kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, + kf5@, kf6@, kf7@, kf8@, kf9@, kfnd@, khome=\E[1~, kslt@, + rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[0m\017, smam=\E[?7h, vpa=\E[%i%p1%dd, - use=ecma+index, use=xterm+sm+1006, use=ecma+strikeout, + use=ansi+sgrdim, use=ecma+index, use=xterm+focus, + use=xterm+sm+1006, use=ecma+strikeout, use=ecma+italics, use=ecma+color, use=xterm-r6, - use=vt220+cvis, + use=vt220+cvis, use=bracketed+paste, + use=report+version, # The keytab feature was introduced in 0.9.12 (February 2000) with "linux" and # "vt100" key-table files along with a compiled-in default key-table. @@ -6277,11 +6530,11 @@ konsole+pcfkeys|konsole subset of xterm+pcfkeys, # it is still useful for deriving the other entries, since the developer # provided function-keys based on xterm. konsole-vt100|KDE console window with VT100 (sic) keyboard, - kbs=^?, kdch1=\E[3~, kend=\E[F, kf1=\E[11~, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf13@, kf14@, kf15@, kf16@, kf17@, - kf18@, kf19@, kf2=\E[12~, kf20@, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[H, use=konsole-base, + kend=\E[F, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, + kf2=\E[12~, kf20@, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, + use=konsole-base, # Obsolete: vt420pc.keytab was added in June 2000, dropped from the install in # September 2008 and removed in June 2016. The developer who removed it stated @@ -6340,7 +6593,7 @@ mlterm|multi lingual terminal emulator, # mlterm 3.x made further changes, but they were not reflected in the included # mlterm.ti (which was dropped in 2015). This entry has been based on testing # with ncurses, tack and vttest -TD -mlterm3|multi lingual terminal emulator, +mlterm3|multi lingual terminal emulator 3.x, bce, AX, blink=\E[5m, flash=\E[?5h$<100/>\E[?5l, invis=\E[8m, is2=\E[!p\E[?3;4l\E>, rs2=\E[!p\E[?3;4l\E>, @@ -6350,7 +6603,8 @@ mlterm3|multi lingual terminal emulator, use=ecma+strikeout, use=xterm+app, use=xterm+pcf2, use=xterm+pcc2, use=xterm+pce2, use=xterm+meta, use=xterm+alt+title, use=xterm+sm+1006, - use=vt100+pfkeys, use=mlterm2, + use=vt100+pfkeys, use=bracketed+paste, use=mlterm2, + use=report+version, # This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD # @@ -6371,39 +6625,35 @@ mlterm3|multi lingual terminal emulator, # control/alt kf1 to kf12 \E[11;7~ to \E[24;7~ # control/shift/alt kf1 to kf12 \E[11;8~ to \E[24;8~ # -mlterm2|multi lingual terminal emulator, +mlterm2|multi lingual terminal emulator 2.x, am, eslok, km, mc5i, mir, msgr, npc, xenl, XT, - colors#8, cols#80, it#8, lines#24, pairs#64, + colors#8, cols#80, lines#24, pairs#64, acsc=00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=, - home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, + home=\E[H, hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ind=\n, is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, kbs=^?, - kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kend=\EOF, kent=\EOM, khome=\EOH, kind=\EO1;2B, kmous=\E[M, - kri=\EO1;2A, mc0=\E[i, nel=\EE, op=\E[39;49m, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, + kcbt=\E[Z, kend=\EOF, kent=\EOM, kind=\EO1;2B, kmous=\E[M, + kri=\EO1;2A, mc0=\E[i, nel=\EE, op=\E[39;49m, rev=\E[7m, + ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l, - sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e \E(B%;, sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, - vpa=\E[%i%p1%dd, use=vt220+vtedit, use=xterm+alt1049, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u8=\E[?1;2c, + vpa=\E[%i%p1%dd, use=ansi+apparrows, use=ansi+csr, + use=ansi+enq, use=ansi+idl, use=ansi+inittabs, + use=ansi+local, use=vt220+vtedit, use=xterm+alt1049, use=ecma+index, use=mlterm+pcfkeys, use=vt220+cvis, use=xterm+r6f2, # The insert/delete/home/end keys do not respond to modifiers because mlterm # looks in its termcap to decide which string to send. If it used terminfo # (when available), it could use the extended names introduced for xterm. -mlterm+pcfkeys|fragment for PC-style fkeys, +mlterm+pcfkeys|mlterm fragment for PC-style fkeys, kLFT=\EO1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\EO1;2C, kDN=\EO1;2B, kDN3=\EO1;3B, kDN4=\EO1;4B, kDN5=\EO1;5B, kDN6=\EO1;6B, kDN7=\EO1;7B, kIC5=\E[2;5~, kIC6=\E[2;6~, @@ -6440,30 +6690,25 @@ mlterm-256color|mlterm 3.0 with xterm 256-colors, # removed dch/dch1 because they are inconsistent with bce/ech -TD # remove km as per tack test -TD rxvt-basic|rxvt terminal base (X Window System), - OTbs, am, bce, eo, mir, msgr, xenl, xon, XT, - cols#80, it#8, lines#24, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H, - ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\n, is1=\E[?47l\E=\E[?1l, - is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H, - kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m, - rmul=\E[24m, + OTbs, bce, eo, mir, xenl, xon, XT, + blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, el1=\E[1K, + flash=\E[?5h$<100/>\E[?5l, ich=\E[%p1%d@, + is1=\E[?47l\E=\E[?1l, + is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, + kcbt=\E[Z, kmous=\E[M, rev=\E[7m, ri=\EM, rmir=\E[4l, + rmkx=\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[? 25h, - s0ds=\E(B, s1ds=\E(0, sc=\E7, + s0ds=\E(B, s1ds=\E(0, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%? %p9%t\016%e\017%;, - sgr0=\E[0m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, - smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt100+enq, + sgr0=\E[0m\017, smir=\E[4h, smkx=\E=, smso=\E[7m, + smul=\E[4m, use=ansi+csr, use=ansi+idl, use=ansi+local, + use=xterm+alt47, use=vt100+enq, use=vt100+4bsd, use=rxvt+pcfkeys, use=vt220+cvis, use=vt220+keypad, + # Key Codes from rxvt reference: # # Note: Shift + F1-F10 generates F11-F20 @@ -6544,26 +6789,22 @@ rxvt-basic|rxvt terminal base (X Window System), # # kDN, kDN5, kDN6, etc are extensions based on the names from xterm+pcfkeys -TD # Removed kDN6, etc (control+shift) since rxvt does not implement this -TD -rxvt+pcfkeys|fragment for PC-style fkeys, +rxvt+pcfkeys|rxvt fragment for PC-style fkeys, kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d, kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kel=\E[8\^, kend=\E[8~, kf1=\E[11~, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, - kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, + kcuf1=\E[C, kcuu1=\E[A, kel=\E[8\^, kend=\E[8~, kf21=\E[23$, kf22=\E[24$, kf23=\E[11\^, kf24=\E[12\^, kf25=\E[13\^, kf26=\E[14\^, kf27=\E[15\^, kf28=\E[17\^, - kf29=\E[18\^, kf3=\E[13~, kf30=\E[19\^, kf31=\E[20\^, - kf32=\E[21\^, kf33=\E[23\^, kf34=\E[24\^, kf35=\E[25\^, - kf36=\E[26\^, kf37=\E[28\^, kf38=\E[29\^, kf39=\E[31\^, - kf4=\E[14~, kf40=\E[32\^, kf41=\E[33\^, kf42=\E[34\^, - kf43=\E[23@, kf44=\E[24@, kf5=\E[15~, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[7~, kind=\E[a, - kri=\E[b, kDC5=\E[3\^, kDC6=\E[3@, kDN=\E[b, kDN5=\EOb, - kEND5=\E[8\^, kEND6=\E[8@, kHOM5=\E[7\^, kHOM6=\E[7@, - kIC5=\E[2\^, kIC6=\E[2@, kLFT5=\EOd, kNXT5=\E[6\^, - kNXT6=\E[6@, kPRV5=\E[5\^, kPRV6=\E[5@, kRIT5=\EOc, - kUP=\E[a, kUP5=\EOa, use=vt220+vtedit, + kf29=\E[18\^, kf30=\E[19\^, kf31=\E[20\^, kf32=\E[21\^, + kf33=\E[23\^, kf34=\E[24\^, kf35=\E[25\^, kf36=\E[26\^, + kf37=\E[28\^, kf38=\E[29\^, kf39=\E[31\^, kf40=\E[32\^, + kf41=\E[33\^, kf42=\E[34\^, kf43=\E[23@, kf44=\E[24@, + khome=\E[7~, kind=\E[a, kri=\E[b, kDC5=\E[3\^, kDC6=\E[3@, + kDN=\E[b, kDN5=\EOb, kEND5=\E[8\^, kEND6=\E[8@, + kHOM5=\E[7\^, kHOM6=\E[7@, kIC5=\E[2\^, kIC6=\E[2@, + kLFT5=\EOd, kNXT5=\E[6\^, kNXT6=\E[6@, kPRV5=\E[5\^, + kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa, + use=vt220+vtedit, use=xterm+nopcfkeys, # rxvt was originally "xvt", first announced in April 1993: # http://www.krsaborio.net/linux-desktops/research/1993/0416.html @@ -6614,17 +6855,15 @@ rxvt+pcfkeys|fragment for PC-style fkeys, # Olesen (or possibly Davis) diverged in one respect from Linux's bce color # behavior: inserting/deleting characters does not fill the newly empty cell # with the default background color. -rxvt|rxvt terminal emulator (X Window System), +rxvt|rxvt-color|rxvt terminal emulator (X Window System), ncv@, hpa=\E[%i%p1%dG, kf0=\E[21~, sgr0=\E[m\017, vpa=\E[%i%p1%dd, use=rxvt-basic, use=ecma+color, -rxvt-color|rxvt terminal emulator (X Window System), - use=rxvt, rxvt-256color|rxvt 2.7.9 with xterm 256-colors, use=xterm+256color, use=rxvt, rxvt-88color|rxvt 2.7.9 with xterm 88-colors, use=xterm+88color, use=rxvt, -rxvt-xpm|rxvt terminal emulator (X Window System), +rxvt-xpm|rxvt terminal emulator (X Window System with xpm), use=rxvt, rxvt-cygwin|rxvt terminal emulator (X Window System) on cygwin, acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k @@ -6665,7 +6904,6 @@ rxvt-16color|rxvt with 16 colors like aixterm, # (not in rxvt, but not documented by mrxvt) but not CSI 19 t. # + none of the "dynamic colors" (OSC colors) scripts work. mrxvt|multitabbed rxvt, - XT, kEND=\E[8;2~, kHOM=\E[7;2~, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[8~, khome=\E[7~, kEND3=\E[8;3~, kEND4=\E[8;4~, kEND5=\E[8;5~, @@ -6689,33 +6927,27 @@ mrxvt-256color|multitabbed rxvt with 256 colors, # remove nonworking flash -TD # remove km as per tack test -TD Eterm|Eterm-color|Eterm with xterm-style color support (X Window System), - am, bce, bw, eo, mc5i, mir, msgr, xenl, xon, XT, - btns#5, cols#80, it#8, lines#24, lm#0, ncv@, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, + bce, bw, eo, mc5i, mir, xenl, xon, XT, + btns#5, lm#0, ncv@, + blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, - home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, is1=\E[?47l\E>\E[?1l, + hpa=\E[%i%p1%dG, ich=\E[%p1%d@, is1=\E[?47l\E>\E[?1l, is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kNXT@, - kPRV@, ka1=\E[7~, ka3=\E[5~, kb2=\EOu, kbeg=\EOu, kbs=^H, - kc1=\E[8~, kc3=\E[6~, kent=\EOM, khlp=\E[28~, kmous=\E[M, - mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=, + kPRV@, ka1=\E[7~, ka3=\E[5~, kb2=\EOu, kbeg=\EOu, kc1=\E[8~, + kc3=\E[6~, kent=\EOM, khlp=\E[28~, kmous=\E[M, mc4=\E[4i, + mc5=\E[5i, rev=\E[7m, ri=\EM, rmam=\E[?7l, rmir=\E[4l, rmkx=, rmso=\E[27m, rmul=\E[24m, rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[? 25h, - sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h, - smir=\E[4h, smkx=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%i%p1%dd, use=vt100+enq, use=rxvt+pcfkeys, - use=ecma+color, use=vt220+cvis, + sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h, smkx=, smso=\E[7m, + smul=\E[4m, vpa=\E[%i%p1%dd, use=ansi+csr, use=ansi+idl, + use=ansi+local, use=xterm+alt47, use=vt100+enq, + use=rxvt+pcfkeys, use=ecma+color, use=vt100+4bsd, + use=vt220+cvis, Eterm-256color|Eterm with xterm 256-colors, use=xterm+256color, use=Eterm, @@ -6735,15 +6967,14 @@ aterm|AfterStep terminal, # vttest shows several problems with keyboard, cursor-movements. # see also https://invisible-island.net/xterm/xterm.faq.html#bug_xiterm xiterm|internationalized terminal emulator for X, - km@, - kbs=^?, kdch1=\E[3~, use=klone+color, use=xterm-r6, + km@, use=klone+color, use=xterm-r6, #### HPTERM # HP ships this (HPUX 9 and 10), except for the pb#9600 which was merged in # from BSD termcap. (hpterm: added empty , we have no idea what ACS # chars look like --esr) -hpterm|X-hpterm|HP X11 terminal emulator, +hpterm|X-hpterm|HP X11 terminal emulator (old), am, da, db, mir, xhp, xon, cols#80, lh#2, lines#24, lm#0, lw#8, nlab#8, pb#9600, xmc#0, acsc=, bel=^G, bold=\E&dB, cbt=\Ei, clear=\E&a0y0C\EJ, cr=\r, @@ -6787,7 +7018,7 @@ hpterm-color|HP X11 terminal emulator with color, # # This version, which came from Martin Trusler, was tested with lynx using # ncurses 5.4 -hpterm-color2|X-hpterm-color2|HP X11 terminal emulator with color, +hpterm-color2|X-hpterm-color2|HP X11 terminal emulator with color (new), OTbs, am, ccc, da, db, km, mir, xhp, colors#8, cols#80, it#8, lh#2, lines#24, lm#0, lw#8, nlab#8, pairs#8, xmc#0, @@ -6862,28 +7093,27 @@ emu-220|Emu-220 (vt200-7bit mode), cols#80, it#8, lines#24, vt#200, acsc=aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, blink=\E[0;5m, bold=\E[0;1m, clear=\E[2J\E[H, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[1D, - cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A, - dch=\E[%p1%dP, dch1=\E[1P, dl=\E[%p1%dM, dl1=\E[1M, - ed=\E[0J, el=\E[0K, el1=\E[1K, enacs=\E)0, home=\E[H, ht=^I, - hts=\EH, if=/usr/share/tabset/vt300, il=\E[%p1%dL, - il1=\E[1L, ind=\ED, is2=\E>\E[?1l\E[?3l\E[4l\E[?7h, - kbs=^H, kcmd=\E[29~, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + cub1=\E[1D, cud1=\E[1B, cuf1=\E[1C, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[1A, dch=\E[%p1%dP, + dch1=\E[1P, dl=\E[%p1%dM, dl1=\E[1M, ed=\E[0J, el=\E[0K, + el1=\E[1K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, + if=/usr/share/tabset/vt300, il=\E[%p1%dL, il1=\E[1L, + ind=\ED, is2=\E>\E[?1l\E[?3l\E[4l\E[?7h, kbs=^H, + kcmd=\E[29~, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kent=\EOM, kf0=\EOp, kf1=\EOq, kf10=\EOl, kf11=\EOm, kf12=\EOn, kf13=\EOP, kf14=\EOQ, kf15=\EOR, kf16=\EOS, kf2=\EOr, kf26=\E[17~, kf27=\E[18~, kf28=\E[19~, kf29=\E[20~, kf3=\EOs, kf30=\E[21~, kf34=\E[26~, kf37=\E[31~, kf38=\E[32~, kf39=\E[33~, kf4=\EOt, kf40=\E[34~, kf5=\EOu, kf6=\EOv, kf7=\EOw, kf8=\EOx, - kf9=\EOy, khlp=\E[28~, rc=\E8, rev=\E[0;7m, ri=\EM, rmacs=^O, + kf9=\EOy, khlp=\E[28~, rev=\E[0;7m, ri=\EM, rmacs=^O, rmcup=\E>, rmkx=\E>, rmso=\E[m, rmul=\E[m, - rs2=\E[4l\E[34l\E[?1l\E[?3l\E[?5l\E[?7h, sc=\E7, + rs2=\E[4l\E[34l\E[?1l\E[?3l\E[?5l\E[?7h, sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t; 2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smcup=\E[?1l\E=, smkx=\E=, - smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g, use=vt220+vtedit, - use=vt220+cvis, + smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g, use=ansi+csr, + use=ansi+local, use=vt220+vtedit, use=vt220+cvis, #### MVTERM # A commercial product, Reportedly a version of Xterm with an OPEN LOOK UI, @@ -6897,28 +7127,21 @@ emu-220|Emu-220 (vt200-7bit mode), # apparently implements alternate screen like xterm # does not use padding, of course. mvterm|vv100|SwitchTerm aka mvTERM, - am, km, mir, msgr, xenl, xon, - colors#8, cols#80, it#8, lines#24, pairs#64, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, - ind=\n, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, kf0=\EOy, kf10=\EOx, kf5=\EOt, kf6=\EOu, - kf7=\EOv, kf8=\EOl, kf9=\EOw, op=\E[100m, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, rmkx=\E[?1l\E>, - rmso=\E[m, rmul=\E[m, + km, mir, xenl, xon, + colors#8, pairs#64, + blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, ed=\E[J, + el=\E[K, ich=\E[%p1%d@, ich1=\E[@, kcub1=\EOD, kcud1=\EOB, + kcuf1=\EOC, kcuu1=\EOA, op=\E[100m, rev=\E[7m, ri=\EM, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs2=\E>\E[1;3;4;5;6l\E[?7h\E[100m\E[m\E[r\E[2J\E[H, - sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smcup=\E7\E[?47h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - use=vt100+fnkeys, use=x10term+sl, + sgr0=\E[m\017, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + use=ansi+csr, use=ansi+idl, use=ansi+local, + use=xterm+alt47, use=vt100+fnkeys, use=vt100+4bsd, + use=x10term+sl, #### MTERM # @@ -6929,19 +7152,16 @@ mterm-ansi|ANSI emulation, am, bw, mir, msgr, it#8, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, - el=\E[K, home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich1=, - il=\E[%p1%dL, il1=\E[L, ind=\E[S, invis=\E[8m, - is2=\E)0\017, kbs=^H, nel=\EE, rev=\E[7m, ri=\E[T, rmacs=^O, - rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, + bel=^G, cr=\r, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, + dim=\E[2m, ech=\E[%p1%dX, home=\E[H, hpa=\E[%i%p1%d`, + ht=^I, ich1=, ind=\E[S, is2=\E)0\017, kbs=^H, nel=\EE, ri=\E[T, + rmacs=^O, rmso=\E[27m, rmul=\E[24m, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, smso=\E[7m, - smul=\E[4m, vpa=\E[%i%p1%dd, use=ecma+index, + sgr0=\E[m\017, smacs=^N, vpa=\E[%i%p1%dd, use=ansi+erase, + use=ansi+idc1, use=ansi+idl, use=ansi+local, + use=ansi+sgrbold, use=ecma+index, + # mterm normally sets $TERM to "mterm" mterm|mouse-sun|Der Mouse term, am, bw, mir, @@ -6957,28 +7177,24 @@ decansi|ANSI emulation with DEC compatibility hacks, am, mir, msgr, xenl, colors#8, it#8, pairs#64, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, enacs=\E(B\E)0, - home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich1=, il=\E[%p1%dL, - il1=\E[L, ind=\E[S, invis=\E[8m, is2=\E)0\E[r\017, kbs=^H, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\E[11~, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, - kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, - kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, nel=\EE, op=\E[0m, rc=\E8, rev=\E[7m, - ri=\E[T, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[27m, rmul=\E[24m, sc=\E7, setab=\E[4%p1%dm, + bel=^G, cr=\r, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, + dim=\E[2m, ech=\E[%p1%dX, enacs=\E(B\E)0, home=\E[H, + hpa=\E[%i%p1%d`, ht=^I, ich1=, ind=\E[S, is2=\E)0\E[r\017, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, + kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, nel=\EE, + op=\E[0m, ri=\E[T, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, + rmso=\E[27m, rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR, - u7=\E[6n, vpa=\E[%i%p1%dd, use=vt220+vtedit, + sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, + vpa=\E[%i%p1%dd, use=ansi+cpr, use=ansi+csr, + use=ansi+erase, use=ansi+idc1, use=ansi+idl, + use=ansi+local, use=ansi+sgrbold, use=vt220+vtedit, use=ecma+index, use=vt220+cvis, #### VWM @@ -6987,26 +7203,24 @@ decansi|ANSI emulation with DEC compatibility hacks, # VWM 2.0.2 (2009-05-01) # vwmterm is a terminal emulator written for the VWM console window manager. # This version is obsolete, replaced by libvterm in 2.1.0 (2009-10-23). -vwmterm|(vwm term), +vwmterm|VWM terminal, am, bce, ccc, mir, msgr, npc, xenl, xon, colors#8, pairs#64, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?25h, dim=\E[2m, - ed=\E[J, el=\E[K, home=\E[H, il1=\E[L, ind=\n, invis=\E[8m, + bel=^G, bold=\E[1m, cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, + cvvis=\E[?25h, dim=\E[2m, home=\E[H, il1=\E[L, ind=\n, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[22~, kf12=\E[23~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[1~, knp=\E[6~, kpp=\E[5~, rev=\E[7m, rmacs=\E[10m, + khome=\E[1~, knp=\E[6~, kpp=\E[5~, rmacs=\E[10m, rmam=\E[?7l, rs1=\E[H\E[J\E[m\Ec, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0;10%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5 %t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h, smso=\E[3m, - smul=\E[4m, use=vt220+cvis, use=xterm+alt1049, + smul=\E[4m, use=ansi+erase, use=ansi+local, use=ansi+sgr, + use=vt220+cvis, use=xterm+alt1049, #### MGR # @@ -7061,14 +7275,12 @@ st|stterm|aka simpleterm, # This entry discards the ccc/initc capabilities from st-0.7 because they # belong in st-256color. st-0.8|simpleterm 0.8, - dim=\E[2m, kcbt@, kent@, oc=\E]104\007, - sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| - %t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m, - Ms=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B, - kLFT3=\E[1;3D, kLFT5=\E[1;5D, kNXT3=\E[6;3~, - kNXT5=\E[6;5~, kPRV3=\E[5;3~, kPRV5=\E[5;5~, - kRIT3=\E[1;3C, kRIT5=\E[1;5C, kUP3=\E[1;3A, kUP5=\E[1;5A, - use=ecma+strikeout, use=st-0.6, + kcbt@, kent@, oc=\E]104\007, Ms=\E]52;%p1%s;%p2%s\007, + kDN3=\E[1;3B, kDN5=\E[1;5B, kLFT3=\E[1;3D, kLFT5=\E[1;5D, + kNXT3=\E[6;3~, kNXT5=\E[6;5~, kPRV3=\E[5;3~, + kPRV5=\E[5;5~, kRIT3=\E[1;3C, kRIT5=\E[1;5C, + kUP3=\E[1;3A, kUP5=\E[1;5A, use=ecma+strikeout, + use=st-0.6, # Reviewed 0.7: # dim is intermittent, sometimes works, sometimes does not @@ -7080,18 +7292,12 @@ st-0.8|simpleterm 0.8, # provided with the source is incorrect, since Se/Ss are mis-coded # as booleans rather than strings. st-0.7|simpleterm 0.7, - ccc, - dim=\E[2m, - initc=\E]4;%p1%d;rgb:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%* - %{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, - kcbt@, kent@, oc=\E]104\007, - sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| - %t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m, - Ms=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B, - kLFT3=\E[1;3D, kLFT5=\E[1;5D, kNXT3=\E[6;3~, - kNXT5=\E[6;5~, kPRV3=\E[5;3~, kPRV5=\E[5;5~, - kRIT3=\E[1;3C, kRIT5=\E[1;5C, kUP3=\E[1;3A, kUP5=\E[1;5A, - use=ecma+strikeout, use=st-0.6, + kcbt@, kent@, Ms=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, + kDN5=\E[1;5B, kLFT3=\E[1;3D, kLFT5=\E[1;5D, + kNXT3=\E[6;3~, kNXT5=\E[6;5~, kPRV3=\E[5;3~, + kPRV5=\E[5;5~, kRIT3=\E[1;3C, kRIT5=\E[1;5C, + kUP3=\E[1;3A, kUP5=\E[1;5A, use=ecma+strikeout, + use=st-0.6, use=xterm+256color, # st-0.4.1 # @@ -7115,67 +7321,47 @@ st-0.7|simpleterm 0.7, # Reviewed st 0.5: # implements control-modifier, but not control-shift for special keys # implements alt-modifier, but not alt-shift for special keys -# -# Reviewed st 0.6: -# http://git.suckless.org/st/log/st.info -# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -# still has no function keys past kf36 (no combinations of modifiers) -# no application keypad mode, e.g, kent. -st-0.6|simpleterm 0.6, - am, bce, hs, mir, msgr, npc, xenl, XT, - colors#8, cols#80, it#8, lines#24, pairs#64, - acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyy - zz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E)0, flash=\E[?5h$<100/>\E[?5l, fsl=^G, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, - is2=\E[4l\E>\E[?1034l, kDC=\E[3;2~, kEND=\E[1;2F, - kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~, - kPRV=\E[5;2~, kRIT=\E[1;2C, ka1=\E[1~, ka3=\E[5~, kb2=\EOu, - kbs=^?, kc1=\E[4~, kc3=\E[6~, kcbt=\E[Z, kclr=\E[3;5~, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdl1=\E[3;2~, ked=\E[1;5F, kel=\E[1;2F, kent=\EOM, - kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, - kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, - kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, - kf23=\E[23;2~, kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q, - kf27=\E[1;5R, kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR, - kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, - kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, - kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, kf39=\E[1;6R, - kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, kf42=\E[17;6~, - kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~, - kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, - kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, kf51=\E[1;3R, - kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~, - kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~, - kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, - kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kil1=\E[2;5~, - kind=\E[1;2B, kmous=\E[M, kri=\E[1;2A, krmir=\E[2;2~, - mc0=\E[i, mc4=\E[4i, mc5=\E[5i, op=\E[39;49m, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=\E(B, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[27m, rmul=\E[24m, rs1=\Ec, rs2=\E[4l\E>\E[?1034l, - sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, +# +# Reviewed st 0.6: +# http://git.suckless.org/st/log/st.info +# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) +# still has no function keys past kf36 (no combinations of modifiers) +# no application keypad mode, e.g, kent. +st-0.6|simpleterm 0.6, + bce, mir, npc, xenl, XT, + colors#8, pairs#64, + acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyy + zz{{||}}~~, + clear=\E[H\E[2J, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ech=\E[%p1%dX, + ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, + flash=\E[?5h$<100/>\E[?5l, hpa=\E[%i%p1%dG, + ich=\E[%p1%d@, is2=\E[4l\E>\E[?1034l, kDC=\E[3;2~, + kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, + kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, ka1=\E[1~, + ka3=\E[5~, kb2=\EOu, kbs=^?, kc1=\E[4~, kc3=\E[6~, kcbt=\E[Z, + kclr=\E[3;5~, kdl1=\E[3;2~, ked=\E[1;5F, kel=\E[1;2F, + khome=\E[1~, kil1=\E[2;5~, kind=\E[1;2B, kmous=\E[M, + kri=\E[1;2A, krmir=\E[2;2~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, + op=\E[39;49m, ri=\EM, rmacs=\E(B, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, + rs2=\E[4l\E>\E[?1034l, setab=\E[4%p1%dm, + setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| %t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m, - sgr0=\E[0m, smacs=\E(0, smir=\E[4h, smkx=\E[?1h\E=, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, - u7=\E[6n, u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, Se=\E[2 q, - Ss=\E[%p1%d q, use=vt220+pcedit, use=ecma+index, - use=xterm+alt1049, use=vt220+cvis, use=xterm+sl, - use=ecma+italics, use=ecma+strikeout, + smacs=\E(0, smir=\E[4h, smkx=\E[?1h\E=, u8=\E[?1;2c, + vpa=\E[%i%p1%dd, Se=\E[2 q, Ss=\E[%p1%d q, + use=ansi+apparrows, use=ansi+csr, use=ansi+enq, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+sgrbold, use=vt100+4bsd, use=vt100+pfkeys, + use=vt220+pcedit, use=ecma+index, use=xterm+alt1049, + use=vt220+cvis, use=xterm+sl, use=ecma+italics, + use=ecma+strikeout, use=bracketed+paste, + use=xterm+pcf2, # # st-0.1.1 # @@ -7197,25 +7383,23 @@ st-0.6|simpleterm 0.6, # Fixes: add eo and xenl per tack, remove nonworking cbt, hts and tbc, invis simpleterm|old-st|simpleterm 0.1.1, am, eo, mir, msgr, ul, xenl, - colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, - acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^?, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[1~, knp=\E[6~, kpp=\E[5~, op=\E[37;40m, rc=\E8, - rev=\E[7m, rmacs=\E(B, rmso=\E[m, rmul=\E[m, sc=\E7, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + cols#80, it#8, lines#24, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, + cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + dch1=\E[P, ed=\E[J, el=\E[K, home=\E[H, hpa=\E[%i%p1%dG, + ht=^I, ich=\E[%p1%d@, ind=\n, kbs=^?, kdch1=\E[3~, + kend=\E[4~, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, knp=\E[6~, kpp=\E[5~, rev=\E[7m, rmso=\E[m, + rmul=\E[m, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| %t;7%;m, - sgr0=\E[0m, smacs=\E(0, smso=\E[7m, smul=\E[4m, - use=vt220+cvis, use=ecma+index, + sgr0=\E[0m, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+csr, use=ansi+idl, use=vt220+cvis, + use=ecma+index, use=klone+color, use=xterm+acs, + st-16color|stterm-16color|simpleterm with 16-colors, use=ibm+16color, use=st, # Tested with st 0.8.2 @@ -7305,29 +7489,26 @@ terminator|Terminator no line wrap, bce, eo, mir, msgr, xenl, xon, cols#80, it#8, lines#24, lm#0, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, - flash=^G, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, - il=\E[%p1%dL, il1=\E[L, ind=\n, is1=\E[?47l\E=\E[?1l, + bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, + flash=^G, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ind=\n, + is1=\E[?47l\E=\E[?1l, is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^?, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, - kf9=\E[20~, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E(B, - rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, - rs2=\E[!p\E[?3;4l\E[4l\E>, s0ds=\E(B, s1ds=\E(0, sc=\E7, + kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, rev=\E[7m, + ri=\EM, rmacs=\E(B, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, + rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, s0ds=\E(B, s1ds=\E(0, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p5%t;2%;%?%p1%p3%|%t;7 %;m%?%p9%t\E(0%e\E(B%;, sgr0=\E[m\E(B, smacs=\E(0, smir=\E[4h, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, tsl=\E]2;, vpa=\E[%i%p1%dd, + smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=ansi+arrows, + use=ansi+csr, use=ansi+enq, use=ansi+idl, use=ansi+local, use=vt220+pcedit, use=ecma+italics, use=ecma+index, use=xterm+256setaf, use=xterm+sl-twm, - use=xterm+alt1049, use=vt220+cvis, + use=xterm+alt1049, use=vt220+cvis, use=bracketed+paste, #### TERMINOLOGY # https://www.enlightenment.org/about-terminology @@ -7379,12 +7560,10 @@ terminator|Terminator no line wrap, # This description uses xterm+pcf0, which is misleading because the program # does not handle combinations of modifiers - but listing them all would # involve more effort than its developers spent -TD -terminology-0.6.1|EFL-based terminal emulator, +terminology-0.6.1|EFL-based terminal emulator (0.6.1), mc5i@, blink@, ed@, el@, el1@, invis=\E[8m, kLFT=\E[1;2D, - kRIT=\E[1;2C, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - kind=\E[1;2B, kri=\E[1;2A, + kRIT=\E[1;2C, kind=\E[1;2B, kri=\E[1;2A, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p7%t;8 %;m%?%p9%t\016%e\017%;$<2>, vpa=\E[%i%p1%dd, kDC3=\E[3;3~, kDC4=\E[3;4~, @@ -7394,10 +7573,10 @@ terminology-0.6.1|EFL-based terminal emulator, kLFT3=\E[1;3D, kLFT4=\E[1;4D, kLFT5=\E[1;5D, kLFT6=\E[1;6D, kLFT7=\E[1;7D, kRIT3=\E[1;3C, kRIT4=\E[1;4C, kRIT5=\E[1;5C, kRIT6=\E[1;6C, - kRIT7=\E[1;7C, kUP=\E[1;2A, use=xterm+pcf0, use=vt100, - use=xterm+256setaf, + kRIT7=\E[1;7C, kUP=\E[1;2A, use=ansi+enq, use=xterm+pcf0, + use=vt100, use=xterm+256setaf, -# 2017-11-11 +# 2017-11-11: # Tested terminology 1.0.0 # # tack - @@ -7411,14 +7590,15 @@ terminology-0.6.1|EFL-based terminal emulator, # # Aside from the partial fixes for function/cursor/editing keys, no improvement # in other tests versus 0.6.1 -terminology-1.0.0|EFL-based terminal emulator, +terminology-1.0.0|EFL-based terminal emulator (1.0.0), dim=\E[2m, flash=\E[?5h$<100/>\E[?5l, kend=\E[OF, khome=\E[OH, rmacs=\E(B, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%; %?%p1%p3%|%t;7%;%?%p7%t;8%;m$<2>, sgr0=\E(B\E[m, smacs=\E(0, use=ecma+italics, use=vt220+cvis, use=xterm+x11mouse, use=xterm+pce2, - use=xterm+pcf2, use=xterm+pcc2, use=terminology-0.6.1, + use=xterm+pcf2, use=xterm+pcc2, use=bracketed+paste, + use=terminology-0.6.1, # 2020/12/26: # Tested terminology 1.8.1 using tack and vttest. @@ -7434,13 +7614,14 @@ terminology-1.0.0|EFL-based terminal emulator, # left/right margins do not work # most of DECSCUSR works # most problems with bce are fixed. -terminology-1.8.1|EFL-based terminal emulator, +terminology-1.8.1|EFL-based terminal emulator (1.8.1), km@, cvvis@, flash@, initc@, kcbt=\E[Z, rmm@, smm@, Ms@, - use=ecma+index, use=xterm+256setaf, use=ansi+rep, - use=ecma+strikeout, use=xterm+sm+1006, - use=xterm+pcfkeys, use=xterm+tmux, use=vt220+cvis, - use=ecma+italics, use=xterm-basic, + use=linux+kbs, use=ecma+index, use=xterm+256setaf, + use=ansi+rep, use=ecma+strikeout, use=xterm+focus, + use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux, + use=vt220+cvis, use=ecma+italics, use=xterm-basic, + use=report+version, terminology|EFL-based terminal emulator, use=terminology-1.8.1, @@ -7508,12 +7689,19 @@ alacritty-direct|alacritty with direct color indexing, # added xterm+sl-twm in 0.3.3 -TD alacritty+common|base fragment for alacritty, km@, npc, - kb2=\EOE, kbs=^?, kcbt=\E[Z, kent=\EOM, Se=\E[0 q, - Smulx=\E[4:%p1%dm, use=ecma+index, use=xterm+sm+1006, - use=xterm-basic, use=xterm+app, use=ansi+rep, - use=xterm+tmux, use=ecma+strikeout, use=xterm+sl-twm, - use=ecma+italics, use=xterm+pce2, use=xterm+pcc2, - use=xterm+pcf2, + kb2=\EOE, kcbt=\E[Z, kent=\EOM, Se=\E[0 q, + Smulx=\E[4:%p1%dm, use=ecma+index, use=xterm+focus, + use=xterm+sm+1006, use=xterm-basic, use=xterm+app, + use=ansi+rep, use=xterm+tmux, use=ecma+strikeout, + use=xterm+sl-twm, use=ecma+italics, use=xterm+pce2, + use=xterm+pcc2, use=xterm+pcf2, use=bracketed+paste, + +# https://github.com/raphamorim/rio +# derived from alacritty +rio|fork of alacritty, + use=alacritty, +rio-direct|fork of alacritty, + use=alacritty-direct, #### Kitty # https://github.com/kovidgoyal/kitty @@ -7531,7 +7719,26 @@ alacritty+common|base fragment for alacritty, # http://lists.gnu.org/archive/html/bug-ncurses/2018-09/msg00005.html # https://github.com/kovidgoyal/kitty/issues/879 # -# Version 0.19.1 +# Version 0.21.2 (June 28, 2021) +# changes since 0.19.1 +# Notes: +# Repeatable tests with tack and vttest assume a standard screensize -- +# measured in characters. However, kitty uses pixel-measurements and +# does not readily use characters. +# Resizing with twm shows only pixel-based hint rather than characters +# manual page states that it is possible to override initial window size, +# but configuration file has no effect on initial window size. +# The same problem with XFCE4, but editing the cached json file works +# for setting the window size (the "c" suffix for cells does not): +# {"window-size": [720, 440]} +# though the values depend upon the font in use. +# vttest +# tack +# flash works +# invisible text still does not work +# function/special key modifiers finally work +# +# Version 0.19.1 (October 6, 2020) # changes since 0.13.3: # vttest # ISO-6429 @@ -7547,7 +7754,7 @@ alacritty+common|base fragment for alacritty, # rs1 adds an empty string for resetting title- and other OSC-strings. # italics work # -# Version 0.13.3 +# Version 0.13.3 (January 19, 2019) # Notes: # initial screensize 71x22 # does not respond to "resize -s" @@ -7614,41 +7821,32 @@ kitty-direct|KovId's TTY using direct colors, oc=\E]104\007, use=xterm+direct2, use=kitty+common, kitty+common|KovId's TTY common properties, am, mc5i, mir, msgr, npc, xenl, - cols#80, it#8, lines#24, + cols#80, lines#24, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy yzz{{||}}~~, - bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\n, kbs=^?, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kf1=\EOP, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P, - kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, - kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, - kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~, - kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, - kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, - kf31=\E[18;5~, kf32=\E[19;5~, kf33=\E[20;5~, - kf34=\E[21;5~, kf35=\E[23;5~, kf36=\E[24;5~, kf4=\EOS, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\EOH, kich1=\E[2~, kind=\E[1;2B, knp=\E[6~, - kpp=\E[5~, kri=\E[1;2A, op=\E[39;49m, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l, - rmso=\E[27m, rmul=\E[24m, rs1=\E]\E\\\Ec, sc=\E7, + ich=\E[%p1%d@, ind=\n, kBEG=\E[1;2E, kbeg=\EOE, kbs=^?, + kcbt=\E[Z, op=\E[39;49m, rev=\E[7m, ri=\EM, rmacs=\E(B, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l, rmso=\E[27m, + rmul=\E[24m, rs1=\E]\E\\\Ec, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%; %?%p1%p3%|%t;7%;m, sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%i%p1%dd, use=ansi+enq, use=ansi+rep, - use=xterm+sm+1006, use=ecma+index, use=xterm+sl-twm, - use=ecma+strikeout, use=xterm+pce2, use=xterm+pcc2, - use=ecma+italics, use=xterm+alt1049, use=att610+cvis, - use=xterm+tmux, + smkx=\E[?1h, smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, + Smulx=\E[4:%p1%dm, use=ansi+csr, use=ansi+enq, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+rep, use=xterm+focus, use=xterm+sm+1006, + use=ecma+index, use=xterm+pcfkeys, use=xterm+sl-twm, + use=ecma+strikeout, use=ecma+italics, + use=xterm+alt1049, use=att610+cvis, use=xterm+tmux, + use=bracketed+paste, use=report+version, + +kitty+setal|set underline colors (nonstandard), + setal=\E[58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1 + %{255}%&%dm, ######## WAYLAND CLIENTS @@ -7686,26 +7884,25 @@ foot-direct|foot with direct color indexing, use=xterm+direct, use=foot+base, foot+base|foot base fragment, - am, bce, bw, hs, mir, msgr, npc, xenl, AX, XT, + am, bce, bw, mir, msgr, npc, xenl, AX, XT, cols#80, it#8, lines#24, - acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - cub1=^H, cud1=\n, dim=\E[2m, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - el1=\E[1K, flash=\E]555\E\\, ind=\n, invis=\E[8m, - is2=\E[!p\E[?3;4l\E[4l\E>, kbs=^?, kcbt=\E[Z, - oc=\E]104\E\\, op=\E[39;49m, rev=\E[7m, ri=\EM, rmacs=\E(B, + bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, dim=\E[2m, + ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + flash=\E]555\E\\, ind=\n, is2=\E[!p\E[4l\E>, kbs=^?, + kcbt=\E[Z, oc=\E]104\E\\, op=\E[39;49m, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, - rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, + rs1=\Ec, rs2=\E[!p\E[4l\E>, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%; %?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, - sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[7m, smul=\E[4m, E3=\E[3J, use=att610+cvis, - use=ansi+csr, use=ansi+cup, use=ansi+enq, use=ansi+local, - use=ansi+idc, use=ansi+idl, use=ansi+rca2, use=ansi+rep, - use=ansi+tabs, use=ecma+index, use=ecma+italics, - use=ecma+strikeout, use=xterm+alt+title, + sgr0=\E(B\E[m, smam=\E[?7h, smkx=\E[?1h\E=, E3=\E[3J, + use=att610+cvis, use=ansi+csr, use=ansi+cup, + use=ansi+enq, use=ansi+local, use=ansi+idc, use=ansi+idl, + use=ansi+rca2, use=ansi+rep, use=ansi+tabs, + use=ansi+sgrbold, use=ecma+index, use=ecma+italics, + use=ecma+strikeout, use=xterm+acs, use=xterm+alt+title, use=xterm+pcfkeys, use=xterm+sm+1006, use=xterm+tmux2, - use=xterm+sl-alt, + use=xterm+sl-alt, use=bracketed+paste, + use=report+version, use=xterm+focus, ######## WEB CLIENTS @@ -7759,8 +7956,150 @@ domterm|DomTerm web client, bel@, blink@, dim@, invis@, kcbt=\E[Z, ritm@, rmkx=\E[?1l, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| %t;7%;m, - sitm@, smkx=\E[?1h, use=xterm+256setaf, use=ecma+index, - use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm-basic, + sitm@, smkx=\E[?1h, use=linux+kbs, use=xterm+256setaf, + use=ecma+index, use=xterm+focus, use=xterm+sm+1006, + use=xterm+pcfkeys, use=xterm-basic, + use=bracketed+paste, + +######## Miscellaneous + +#### WezTerm +# https://wezfurlong.org/wezterm/ +# https://github.com/wez/wezterm +# +# which says: +# "wezterm is a terminal emulator with support for modern features +# such as fonts with ligatures, hyperlinks, tabs and multiple windows." +# +# wezterm-20230712_072601_f4abf8fd-1.fedora38.x86_64 +# tested with MacOS and Fedora 38/39. +# +# General: +# + written in Rust. +# + initial screensize is odd, i.e., 81x24 +# provides no visual feedback on resize +# ignores "resize -s" +# manual resize and then running resize got off-by-one adjustment +# + leaves debris (unerased cells) when switching between normal/alternate +# screens. +# + sets TERM=xterm-256color +# tack: +# + misplaced message in "am" screen +# + fails xenl (should be false) +# + cvvis is same as cnorm, block +# + has blink and dim +# + in bce test, blue isn't really blue but some pale purple +# + modified keys mostly work, but its tab control interferes with some +# + rmm/smm don't work (always uses escape-prefix) +# wraptest: +# + poor (doesn't copy anyone, most of the results are wrong) +# vttest: +# + DA is VT5xx with sixel, selective erase, user windows, color +# + DA2 is VT220 version 277 +# + only the VT100 character set works, contrary to DA/DA2. +# + no NRCS, either +# + double-sized character work, with some debris +# + doesn't switch between 80/132 columns. +# + numeric keypad ANSI application mode escapes don't work. +# + numeric keypad ANSI mode misses "0", ".", "," +# + uses PC-style editing keypad \E[H and \E[F for Find and Select +# + no VT52 +# + DECSED selective erase doesn't work +# + SRM doesn't work +# + 8-bit controls don't work +# + DECNCSM doesn't work +# + most DECRQSS do not work (DECSCL, DECSTBM, DECSLRM respond) +# + DECRQM/DECRPM don't work (most reply permanently reset) +# + DECLRMM responds to DECRPM, but VT420 rectangle tests do not work. +# Some of the left/right margin tests work with the cursor-movement screen, +# but DECFI/DECBI do not work. The other cursor-movement tests are buggy. +# + implements ECMA-48 cursor movement, but not SL/SR or protected area +# + implements xterm normal, any-event and button-event mouse, none of the rest +# + reports window size, none of the other window reports +wezterm|Wez's Terminal Emulator, + km@, xenl@, + cvvis@, rmkx=\E[?1l, rmm@, smkx=\E[?1h, smm@, + use=xterm-256color, + +#### Contour +# https://github.com/contour-terminal/contour +# +# "Modern C++ Terminal Emulator" +# Contour is a modern and actually fast, modal, virtual terminal emulator, +# for everyday use. It is aiming for power users with a modern feature mindset. +# +# That is three occurrences of "modern" too many -TD +# +# MacOS +# - cannot run, because the package is not signed. +# +# Fedora rawhide +# contour-terminal-0.3.12.262-6.fc39.x86_64 +# - dumps core, cannot test +# +# Fedora 39 +# contour-terminal-0.4.0.6245-1.fc38.x86_64 +# - starts but doesn't display +# +# Fedora 38 +# contour-terminal-0.4.0.6245-1.fc38.x86_64 +# - starts but doesn't display +# contour-terminal-0.3.12.262-1.fc38.x86_64 +# + testable (see below) +# + initial screensize 62x23, no visual feedback on resize, no "resize -s" +# +# Sets TERM=contour (which is preferable to xterm). +# +# tack: +# + cvvis is same as cnorm, "|" +# + sitm/ritm don't work +# + rmm/smm don't work (always uses escape, but terminfo defines km) +# + initp interchanges red/blue (bug in tack?) +# + modified F1-F4 are wrong, sending SS3 with modifier numbers +# + shifted editing-keypad doesn't send anything +# + meta key doesn't work +# + status-line works (based on xterm, including window-resizing) +# + dots don't line up for home test +# +# wraptest: +# + poor 7/25 differences from xterm (perhaps copying iTerm2) +# +# vttest: +# + hangs in menu 1, etc., when it tries to resize +# +# infocmp vs xterm-256color +# + missing XM/xm +# + rmcup/smcup doesn't use title-stack (but is implemented) +# + doesn't use SGR mouse (but is implemented) +# + sgr doesn't define dim, but dim capability is in terminfo (implemented) +# +# Developer's terminfo (compiled-in) uses some extensions. +contour|contour-latest|Contour Terminal Emulator, + am, bce, eslok, hs, km, mc5i, mir, msgr, npc, xenl, xvpa, + cols#80, lines#24, pairs#0x7fff, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + dim=\E[2m, dsl=\E[$~, ech=\E[%p1%dX, el1=\E[1K, + flash=\E[?5h$<100/>\E[?5l, fsl=\E[$}, hpa=\E[%i%p1%dG, + ind=\n, indn=\E[%p1%dS, invis=\E[8m, ka1=, ka3=, kbs=^?, kc1=, + kc3=, kcbt=\E[Z, kend=\EOF, khlp=, kmous=\E[M, kund=, + oc=\E]104\E\\, op=\E[39;49m, rev=\E[7m, ri=\EM, + rin=\E[%p1%dT, rmam=\E[?7l, rmkx=\E[?1l, rmso=\E[27m, + rmul=\E[24m, rs1=\E]\E\\\Ec, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| + %t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sgr0=\E(B\E[m, smam=\E[?7h, smkx=\E[?1h, smso=\E[7m, + smul=\E[4m, tsl=\E[2$~\E[1$}\E[H\E[2J, vpa=\E[%i%p1%dd, + Cs=\E]12;%p1%s\E\\, E3=\E[3J, Rmol=\E[55m, Se=\E[ q, + Smol=\E[53m, Smulx=\E[4:%p1%dm, Ss=\E[%p1%d q, + use=ansi+apparrows, use=ansi+cup, use=ansi+csr, + use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, use=ansi+rep, + use=att610+cvis, use=ecma+italics, use=ecma+strikeout, + use=xterm+256color, use=xterm+acs, use=xterm+alt1049, + use=xterm+pcc2, use=xterm+pce2, use=xterm+pcf2, + +contour-direct|Contour terminal with direct colors, + use=xterm+direct, use=contour, ######## UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS # @@ -7773,9 +8112,8 @@ cbunix|cb unix virtual terminal, cols#80, lines#24, lm#0, bel=^G, clear=\EL, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, cup=\EG%p2%c%p1%c, cuu1=\EA, dch1=\EM, dl1=\EN, ed=\EL, - el=\EK, ich1=\EO, il1=\EP, ind=\n, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, khome=\EE, rmso=\Eb^D, rmul=\Eb^A, - smso=\Ea^D, smul=\Ea^A, + el=\EK, ich1=\EO, il1=\EP, ind=\n, khome=\EE, rmso=\Eb^D, + rmul=\Eb^A, smso=\Ea^D, smul=\Ea^A, use=vt52+arrows, # (vremote: removed obsolete ":nl@:" -- esr) vremote|virtual remote terminal, am@, @@ -7794,36 +8132,25 @@ pty|4bsd pseudo teletype, eterm|GNU Emacs term.el terminal emulation, am, mir, xenl, cols#80, lines#24, - bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, rev=\E[7m, - rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m, - smul=\E[4m, + bel=^G, bold=\E[1m, cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, + cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@, ind=\n, + rev=\E[7m, rmir=\E[4l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, + smir=\E[4h, smso=\E[7m, smul=\E[4m, use=ansi+cpr, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=xterm+alt47, # The codes supported by the term.el terminal emulation in GNU Emacs 22.2 eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96, - am, mir, msgr, xenl, - colors#8, cols#80, lines#24, pairs#64, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, kbs=^?, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, - rmso=\E[27m, rmul=\E[24m, rs1=\Ec, sc=\E7, - setab=\E[%p1%'('%+%dm, setaf=\E[%p1%{30}%+%dm, + msgr, + colors#8, pairs#64, + kbs=^?, khome=\E[1~, op=\E[39;49m, ri=\EM, rmso=\E[27m, + rmul=\E[24m, rs1=\Ec, setab=\E[%p1%'('%+%dm, + setaf=\E[%p1%{30}%+%dm, sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%? %p7%t;8%;m, - sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m, - u6=\E[%i%d;%dR, u7=\E[6n, use=vt220+pcedit, + sgr0=\E[m, use=ansi+apparrows, use=ansi+csr, + use=ansi+sgr, use=vt220+pcedit, use=eterm, # shell.el can "do" color, though not nearly as well. # @@ -7840,10 +8167,10 @@ eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96, # italics but does not lose the color information -TD 2017/01/28. dumb-emacs-ansi|Emacs dumb terminal with ANSI color codes, am, hc, - colors#8, it#8, ncv#13, pairs#64, + it#8, ncv#13, bold=\E[1m, cud1=\n, ht=^I, ind=\n, op=\E[39;49m, - rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, - sgr0=\E[m, smul=\E[4m, use=ecma+italics, + rmul=\E[24m, sgr0=\E[m, smul=\E[4m, use=ecma+italics, + use=klone+color, #### Screen @@ -7917,40 +8244,44 @@ dumb-emacs-ansi|Emacs dumb terminal with ANSI color codes, # since 1994 (i.e., screen 3.0.5), stating that it was an obscure code used by # the (Siemens Nixdorf) 97801 terminal. It was not shown in the termcap or # terminfo entries (which list about 60% of the control sequences). -screen|VT 100/ANSI X3.64 virtual terminal, - OTbs, OTpt, am, km, mir, msgr, xenl, G0, - colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1, +screen-base|VT 100/ANSI X3.64 virtual terminal (base), + OTbs, OTpt, km, mir, xenl, G0, + ncv@, U8#1, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy yzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, - clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, - cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)0, flash=\Eg, home=\E[H, hpa=\E[%i%p1%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\n, indn=\E[%p1%dS, is2=\E)0, kbs=^H, kcbt=\E[Z, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, - kf9=\E[20~, kmous=\E[M, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m, - rmul=\E[24m, rs2=\Ec\E[?1000l\E[?25h, sc=\E7, + blink=\E[5m, bold=\E[1m, civis=\E[?25l, + cnorm=\E[34h\E[?25h, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, cvvis=\E[34l, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, el1=\E[1K, flash=\Eg, + hpa=\E[%i%p1%dG, ich=\E[%p1%d@, indn=\E[%p1%dS, is2=\E)0, + kbs=^?, kcbt=\E[Z, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, kmous=\E[M, nel=\EE, rev=\E[7m, ri=\EM, + rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, + rs2=\Ec\E[?1000l\E[?25h, sgr=\E[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t; 5%;%?%p5%t;2%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, - smso=\E[3m, smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, - E0=\E(B, S0=\E(%p1%c, use=vt220+pcedit, - use=xterm+alt1049, use=ecma+color, use=vt100+enq, + sgr0=\E[m\017, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[3m, + smul=\E[4m, vpa=\E[%i%p1%dd, E0=\E(B, S0=\E(%p1%c, + use=ansi+apparrows, use=ansi+csr, use=ansi+erase, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=xterm+kbs, use=vt220+pcedit, use=xterm+alt1049, + use=ecma+color, use=vt100+enq, use=vt100+4bsd, + +screen|VT 100/ANSI X3.64 virtual terminal, + use=screen4, + +no+brackets|cancel bracketed paste, + BD@, BE@, PE@, PS@, + # The bce and status-line entries are from screen 3.9.13 (and require some # changes to .screenrc). screen-bce|VT 100/ANSI X3.64 virtual terminal with bce, bce, - ech@, use=screen4, + ech@, use=screen, screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line, - dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen4, + dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen, # ====================================================================== # Entries for GNU Screen with 16 colors. @@ -7961,7 +8292,7 @@ screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line, # do all support 16 color palette. screen-16color|GNU Screen with 16 colors, - use=ibm+16color, use=screen4, + use=ibm+16color, use=screen, screen-16color-s|GNU Screen with 16 colors and status line, use=ibm+16color, use=screen-s, @@ -7976,13 +8307,13 @@ screen-16color-bce-s|GNU Screen with 16 colors using BCE and status line, # Entries for GNU Screen 4.02 with --enable-colors256. screen-256color|GNU Screen with 256 colors, - use=xterm+256setaf, use=screen4, + use=xterm+256setaf, use=screen, screen-256color-s|GNU Screen with 256 colors and status line, use=xterm+256setaf, use=screen-s, screen-256color-bce|GNU Screen with 256 colors and BCE, - bce, use=xterm+256setaf, use=screen-bce, + use=xterm+256setaf, use=screen-bce, screen-256color-bce-s|GNU Screen with 256 colors using BCE and status line, bce, use=xterm+256setaf, use=screen-s, @@ -7991,7 +8322,7 @@ screen.xterm-256color|GNU Screen with xterm using 256 colors, use=xterm+256setaf, use=screen.xterm-new, screen.konsole-256color|GNU Screen with konsole using 256 colors, - use=xterm+256setaf, use=screen.konsole, + XR@, use=xterm+256setaf, use=screen.konsole, screen.vte-256color|GNU Screen with vte using 256 colors, use=xterm+256setaf, use=screen.vte, @@ -8000,7 +8331,7 @@ screen.putty-256color|GNU Screen with putty using 256 colors, use=xterm+256setaf, use=screen.putty, screen.mlterm-256color|GNU Screen with mlterm using 256 colors, - use=xterm+256setaf, use=screen.mlterm, + XR@, use=xterm+256setaf, use=screen.mlterm, # ====================================================================== @@ -8038,6 +8369,7 @@ screen+italics|screen cannot support italics, # match. Hence, no "screen.xterm" entry is provided, since that would # create heartburn for people running remote xterm's. # (f) screen does not support rep. +# (g) the xterm-new compatibility does not include bracketed paste. # # xterm (-xfree86 or -r6) does not normally support kIC, kNXT and kPRV # since the default translations override the built-in keycode @@ -8048,9 +8380,14 @@ screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| %t;7%;%?%p4%t;5%;%?%p5%t;2%;m, E3@, use=screen+italics, use=screen+fkeys, - use=xterm+x11mouse, use=xterm-new, + use=xterm+x11mouse, use=ecma+index, use=ansi+rep, + use=ecma+strikeout, use=xterm+pcfkeys, + use=xterm+nofkeys, + +# Don't use this, because not everyone has "screen.xterm-new": #:screen.xterm|screen for modern xterm, #: use=screen.xterm-new, + # xterm-r6 does not really support khome/kend unless it is propped up by # the translations resource. screen.xterm-r6|screen customized for X11R6 xterm, @@ -8062,36 +8399,38 @@ screen.teraterm|disable ncv in teraterm, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, - use=screen+fkeys, use=xterm+x11mouse, use=screen4, + use=screen+fkeys, use=xterm+x11mouse, use=screen, # Other terminals screen.rxvt|screen in rxvt, bw, XT, cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, use=screen+fkeys, use=vt100+enq, use=rxvt+pcfkeys, use=xterm+x11mouse, use=vt220+keypad, - use=screen4, + use=screen, screen.Eterm|screen in Eterm, use=xterm+x11mouse, use=screen+fkeys, use=Eterm, screen.mrxvt|screen in mrxvt, use=xterm+x11mouse, use=screen+fkeys, use=mrxvt, screen.vte|screen in any VTE-based terminal, use=xterm+x11mouse, use=screen+italics, - use=screen+fkeys, use=vte, + use=screen+fkeys, use=no+brackets, use=vte, screen.gnome|screen in GNOME Terminal, use=xterm+x11mouse, use=screen+italics, - use=screen+fkeys, use=gnome, + use=screen+fkeys, use=no+brackets, use=gnome, screen.konsole|screen in KDE console window, - use=xterm+x11mouse, use=screen+italics, - use=screen+fkeys, use=konsole, + XR@, use=xterm+x11mouse, use=screen+italics, + use=screen+fkeys, use=no+brackets, use=konsole, # fix the backspace key screen.linux|screen.linux-s|screen in Linux console, bw, - kbs=^?, kcbt@, use=linux+sfkeys, use=xterm+x11mouse, - use=screen+fkeys, use=screen4, + kcbt@, use=linux+sfkeys, use=xterm+x11mouse, + use=screen+fkeys, use=screen, screen.mlterm|screen in mlterm, - use=xterm+x11mouse, use=screen+fkeys, use=mlterm, + XR@, use=xterm+x11mouse, use=screen+fkeys, + use=no+brackets, use=mlterm, screen.putty|screen in putty, - use=xterm+x11mouse, use=screen+fkeys, use=putty, + use=xterm+x11mouse, use=screen+fkeys, use=no+brackets, + use=putty, # The default "screen" entry is reasonably portable, but not optimal for the # most widely-used terminal emulators. The "bce" capability is supported in @@ -8119,55 +8458,47 @@ screen-bce.mrxvt|screen optimized for mrxvt, bce, ech@, use=screen.mrxvt, screen-bce.gnome|screen optimized for GNOME-Terminal, - bce, ech@, use=screen+italics, use=screen.gnome, screen-bce.konsole|screen optimized for KDE console window, - bce, ech@, use=screen+italics, use=screen.konsole, screen-bce.linux|screen optimized for Linux console, bce, ech@, use=screen.linux, screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, - cols#132, use=screen4, + cols#132, use=screen, + +screen2|VT 100/ANSI X3.64 virtual terminal (old 2.x), + cols#80, lines#24, + clear=\E[2J\E[H, cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, + ed=\E[J, el=\E[K, ich1=, ind=\n, kbs=^H, kf0=\E~, kf1=\ES, + kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, + kf9=\E0I, khome=\EH, nel=\r\n, rc=\E8, ri=\EM, rmso=\E[23m, + rmul=\E[24m, rs1=\Ec, sc=\E7, sgr0=\E[m, smso=\E[3m, + smul=\E[4m, use=ansi+idc, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, use=vt52+arrows, -screen2|VT 100/ANSI X3.64 virtual terminal (old), - cols#80, it#8, lines#24, - cbt=\E[Z, clear=\E[2J\E[H, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=, il=\E[%p1%dL, - il1=\E[L, ind=\n, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf0=\E~, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, - kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\E0I, khome=\EH, - nel=\r\n, rc=\E8, ri=\EM, rmir=\E[4l, rmso=\E[23m, - rmul=\E[24m, rs1=\Ec, sc=\E7, sgr0=\E[m, smir=\E[4h, - smso=\E[3m, smul=\E[4m, tbc=\E[3g, # (screen3: removed unknown ":xv:LP:G0:" -- esr) -screen3|VT 100/ANSI X3.64 virtual terminal (old), +screen3|VT 100/ANSI X3.64 virtual terminal (old 3.x), km, mir, msgr, - cols#80, it#8, lines#24, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0, kbs=^H, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, - rmir=\E[4l, rmkx=\E>, rmso=\E[23m, rmul=\E[24m, rs1=\Ec, - sc=\E7, sgr0=\E[m, smir=\E[4h, smkx=\E=, smso=\E[3m, - smul=\E[4m, tbc=\E[3g, + cols#80, lines#24, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch=\E[%p1%dP, + dch1=\E[P, home=\E[H, ich=\E[%p1%d@, ind=\n, is2=\E)0, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\EE, rev=\E[7m, + ri=\EM, rmir=\E[4l, rmkx=\E>, rmso=\E[23m, rmul=\E[24m, + rs1=\Ec, sgr0=\E[m, smir=\E[4h, smkx=\E=, smso=\E[3m, + smul=\E[4m, use=ansi+csr, use=ansi+erase, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, # screen 4.0 was released 2003-07-21, and as of March 2019, its terminfo file # was last updated in 2009 to include 256-color support. The most recent # release is 4.6.2 (October 2017). -screen4|VT 100/ANSI X3.64 virtual terminal, - use=ecma+index, use=screen, +screen4|VT 100/ANSI X3.64 virtual terminal (4.x), + use=ecma+index, use=screen-base, -# As of March 2019, screen 5.0 has not been released. +# As of December 2022, screen 5.0 has not been released. # # However, # @@ -8183,7 +8514,8 @@ screen5|VT 100/ANSI X3.64 virtual terminal (someday), rmso=\E[27m, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;m%?%p9%t\016%e\017%;, - smso=\E[7m, use=ecma+italics, use=screen4, + smso=\E[7m, use=ecma+italics, use=ecma+index, + use=screen-base, #### Tmux @@ -8196,21 +8528,67 @@ screen5|VT 100/ANSI X3.64 virtual terminal (someday), # various entries such as screen.xterm-new provide a way to more closely # match the terminal. tmux|tmux terminal multiplexer, - invis=\E[8m, kbs=^?, rmso=\E[27m, + invis=\E[8m, rmso=\E[27m, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, smso=\E[7m, E3=\E[3J, Smulx=\E[4:%p1%dm, use=ecma+italics, use=ecma+strikeout, use=xterm+edit, use=xterm+pcfkeys, use=xterm+sl, use=xterm+tmux, - use=screen, + use=screen, use=bracketed+paste, use=report+version, + use=xterm+focus, tmux-256color|tmux with 256 colors, use=xterm+256setaf, use=tmux, tmux-direct|tmux with direct-color indexing, - setal=\E[%?%p1%{8}%<%t5%p1%d%e58:2::%p1%{65536}%/%d:%p1 - %{256}%/%{255}%&%d:%p1%{255}%&%d%;m, - use=xterm+direct, use=tmux, + use=kitty+setal, use=xterm+direct, use=tmux, + +#### Mosh +# https://mosh.org/ +# mosh 1.3.2 +# +# mosh's DA1 identifies it as a VT220, but sets $TERM to "xterm" or +# "xterm-256color" (hard-coded), which in its pretense that it is xterm, is +# several years out of date. +# +# There is little documentation; the existing manpages amount to a quarter of +# the length of mosh.org's heavily promotional website. This entry is based +# on testing, and reading the source-code. For the latter, analysis is aided +# by the developer's extensive use of hard-coded strings. +# +# The website has an example "Tricky unicode", which shows a shell command +# with a typo (i.e., assuming that a byte in octal uses 4 digits) and suggests +# that mosh and OS X Terminal "gets it right". +# +# The example as shown would not work. Correcting the typo, xterm gives the +# result expected by the mosh developer. +# +# The other examples follow in a similar vein. +# +# It does not support these xterm features: +# use=ansi+rep (xterm patch #36, 1997) +# use=ecma+strikeout (xterm patch #305, 2014) +# use=vt420+lrmm (xterm patch #279, 2012) +# titlestack in smcup/rmcup has no effect (xterm patch #251, 2009) +# does not support "dim" (xterm patch #305, 2014) +# In tack +# rmkx/smkx has no effect on numeric keypad +# acs stuff has no effect, is included here for ease of comparison +# +# Unlike screen and tmux, mosh has only limited awareness of a terminal +# description. It assumes that the underlying terminal is xterm, and would +# not work well with terminals using other key-definitions, such as urxvt. +mosh|mobile shell, + U8#1, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| + %t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sgr0=\E(B\E[m, use=ansi+enq, use=xterm+meta, + use=ecma+italics, use=ecma+index, use=xterm+acs, + use=xterm+focus, use=xterm+sm+1006, use=xterm+pcfkeys, + use=xterm-xfree86, use=bracketed+paste, + +mosh-256color|mosh using 256-colors, + use=xterm+256color, use=mosh, #### Dvtm @@ -8234,41 +8612,35 @@ tmux-direct|tmux with direct-color indexing, # + Most of the mode-settings in the initialization/reset strings are not # implemented; dvtm copies its description from rxvt. dvtm|dynamic virtual terminal manager, - am, eo, mir, msgr, xenl, AX, - colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)0, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, + eo, mir, xenl, + ncv@, + blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, el1=\E[1K, + hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[@, is1=\E[?47l\E=\E[?1l, is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d, kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy, - kb2=\EOu, kbs=^?, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kel=\E[8\^, kend=\E[8~, - kent=\EOM, kf0=\E[21~, kf1=\E[11~, kf10=\E[21~, + kb2=\EOu, kbs=^?, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kel=\E[8\^, + kend=\E[8~, kent=\EOM, kf0=\E[21~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf21=\E[23$, kf22=\E[24$, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[7~, kind=\E[a, kmous=\E[M, kri=\E[b, op=\E[39;49m, - rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, - rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, + khome=\E[7~, kind=\E[a, kmous=\E[M, kri=\E[b, rev=\E[7m, + ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[? 25h, - s0ds=\E(B, s1ds=\E(0, sc=\E7, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, + s0ds=\E(B, s1ds=\E(0, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%? %p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, - use=vt220+vtedit, use=vt220+cvis, use=ecma+italics, + sgr0=\E[m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m, + vpa=\E[%i%p1%dd, use=ansi+arrows, use=ansi+csr, + use=ansi+idl, use=ansi+local, use=xterm+alt47, + use=vt220+vtedit, use=vt220+cvis, use=ecma+color, + use=ecma+italics, use=vt100+4bsd, dvtm-256color|dynamic virtual terminal manager with 256 colors, colors#0x100, pairs#0x10000, @@ -8316,39 +8688,36 @@ dvtm-256color|dynamic virtual terminal manager with 256 colors, # pairs, since the latter ends the string that is loaded to the window-title. ncsa-m|ncsa-vt220-8|NCSA Telnet 2.6 for Macintosh in VT220-8 mode, am, km, mir, msgr, xenl, - acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, enacs=\E)0, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, + dch1=\E[P, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, if=/usr/share/tabset/vt100, - il=\E[%p1%dL, il1=\E[L, ind=\n$<150*>, - is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + ind=\n$<150*>, + is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>, kdch1=\E[4~, kend=\E[5~, kf1=\E[17~, kf10=\E[28~, kf11=\E[29~, kf12=\E[31~, kf13=\E[32~, kf14=\E[33~, kf15=\E[34~, kf2=\E[18, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khlp=\E[1~, khome=\E[2~, knp=\E[6~, kpp=\E[3~, mc4=\E[4i, mc5=\E[5i, - rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, - rmacs=\E(B, rmam=\E[?7l, rmcup=\E[2J\E8, rmir=\E[4l, - rmso=\E[27m, rmul=\E[24m, - rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;4;6l\E[4l\E>, sc=\E7, + rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, + rmam=\E[?7l, rmcup=\E[2J\E8, rmir=\E[4l, rmso=\E[27m, + rmul=\E[24m, + rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;4;6l\E[4l\E>, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%? %p9%t\E(0%e\E(B%;, - sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E7, - smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - u8=\E[?62;1;6c, use=vt220+cvis, use=xterm+sl, - use=ansi+enq, -ncsa|NCSA Telnet 2.7 for Macintosh in VT220-8 mode, + sgr0=\E[m\E(B, smam=\E[?7h, smcup=\E7, smir=\E[4h, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, u8=\E[?62;1;6c, + use=ansi+arrows, use=ansi+csr, use=ansi+idl, + use=ansi+local, use=vt220+cvis, use=xterm+acs, + use=xterm+sl, use=ansi+enq, + +ncsa|NCSA Telnet 2.7 for Macintosh in VT220-8 mode (color), use=ncsa-m, use=klone+color, -ncsa-ns|NCSA Telnet 2.7 for Macintosh in VT220-8 mode, +ncsa-ns|NCSA Telnet 2.7 for Macintosh in VT220-8 mode (color w/o status line), hs@, dsl@, fsl@, tsl@, use=ncsa, -ncsa-m-ns|NCSA Telnet 2.6 for Macintosh in VT220-8 mode, +ncsa-m-ns|NCSA Telnet 2.6 for Macintosh in VT220-8 mode (no status line), hs@, dsl@, fsl@, tsl@, use=ncsa-m, # alternate -TD: @@ -8399,9 +8768,9 @@ elks-vt52|ELKS VT52 console, home=\EH, use=elks-glasstty, elks-ansi|ELKS ANSI console, - clear=\E[H\E[2J, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[K, home=\E[H, - rmso=\E[m, smso=\E[7m, use=elks-glasstty, + clear=\E[H\E[2J, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, + el=\E[K, home=\E[H, use=ansi+local1, use=ansi+sgrso, + use=elks-glasstty, # As a matter of fact, ELKS 0.0.83 on PCs defaults to ANSI emulation # instead of VT52, but the "elks" entry still refers to the latter. @@ -8427,9 +8796,9 @@ pccons|pcconsole|ANSI (mostly) Alpha PC console terminal emulation, cols#80, lines#25, bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, - nel=\r\n, rev=\E[7m, rmso=\E[m, sgr0=\E[m, smso=\E[7m, + el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, nel=\r\n, + rev=\E[7m, rmso=\E[m, sgr0=\E[m, smso=\E[7m, + use=ansi+arrows, #### Sun consoles # @@ -8438,13 +8807,13 @@ pccons|pcconsole|ANSI (mostly) Alpha PC console terminal emulation, oldsun|Sun Microsystems Workstation console, OTbs, am, km, mir, msgr, cols#80, it#8, lines#34, - bel=^G, clear=^L, cr=\r, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, - dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, ht=^I, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, - is1=\E[1r, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, - rmso=\E[m, sgr0=\E[m, smso=\E[7m, + bel=^G, clear=^L, cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, ed=\E[J, el=\E[K, ht=^I, + ich=\E[%p1%d@, ich1=\E[@, ind=\n, is1=\E[1r, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, khome=\E[H, rmso=\E[m, sgr0=\E[m, + smso=\E[7m, use=ansi+idl, use=ansi+local1, + # From: Alexander Lukyanov , 14 Nov 1995 # capability later corrected by J.T. Conklin # SGR 1, 4 aren't supported - removed bold/underline (T.Dickey 17 Jan 1998) @@ -8453,22 +8822,42 @@ sun-il|Sun Microsystems console with working insert-line, cols#80, lines#34, bel=^G, clear=^L, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, - dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, ht=^I, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, - kb2=\E[218z, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=^?, kend=\E[220z, kf1=\E[224z, + dch1=\E[P, ed=\E[J, el=\E[K, ht=^I, ich=\E[%p1%d@, ich1=\E[@, + ind=\n, kb2=\E[218z, kdch1=^?, kend=\E[220z, kf1=\E[224z, kf10=\E[233z, kf11=\E[234z, kf12=\E[235z, kf2=\E[225z, kf3=\E[226z, kf4=\E[227z, kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z, kf9=\E[232z, khome=\E[214z, kich1=\E[247z, knp=\E[222z, kopt=\E[194z, kpp=\E[216z, kres=\E[193z, kund=\E[195z, rev=\E[7m, rmso=\E[m, rmul@, rs2=\E[s, sgr=\E[0%?%p1%p3%|%t;7%;m, sgr0=\E[m, - smso=\E[7m, u8=\E[1t, u9=\E[11t, + smso=\E[7m, u8=\E[1t, u9=\E[11t, use=ansi+arrows, + use=ansi+idl, + # On some versions of CGSIX framebuffer firmware (SparcStation 5), / # flake out on the last line. Unfortunately, without them the terminal has no # way to scroll. sun-cgsix|sun-ss5|Sun SparcStation 5 console, il@, il1@, use=sun-il, + +# The Sun console was documented in the wscons manual page (apparently +# unrelated to the "wscons" used by some of the BSDs). +# +# https://illumos.org/man/4D/wscons +# https://www.bitsavers.org/pdf/sun/sun1/800-0345_Sun-1_System_Reference_Manual_Jul82.pdf +# +# The early cmdtool and shelltool programs in Sun's NeWS were based on this. +# After NeWS was discontinued, XView provided a similar shelltool, with an +# incomplete manual page. Presumably the intent was to document features of +# shelltool not in wscons: +# +# https://manpages.ubuntu.com/manpages/bionic/en/man1/shelltool.1.html +# https://manpages.ubuntu.com/manpages/bionic/en/man1/cmdtool.1.html +# +# The wscons manual page and the XView source show that it had no feature that +# could be used in ncurses u6/u7/u8/u9 extensions. Interesting, the XView +# source shows that its shelltool could tell the host what a particular mode +# was set to. But neither that nor its CSI..t controls support u6/u7/u8/u9. +# # If you are using an SS5, change the sun definition to use sun-ss5. sun|sun1|sun2|Sun Microsystems Inc. workstation console, use=sun-il, @@ -8485,7 +8874,7 @@ sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs, sun-48|Sun 48-line window, cols#80, lines#48, use=sun, sun-34|Sun 34-line window, - cols#80, lines#34, use=sun, + use=sun, sun-24|Sun 24-line window, cols#80, lines#24, use=sun, sun-17|Sun 17-line window, @@ -8527,16 +8916,13 @@ sun-type4|Sun Workstation console with type 4 keyboard, # blink=\E[5m # It supports bold, but not underline -TD (2009-09-19) sun-color|Sun Microsystems Workstation console with color support (IA systems), - colors#8, ncv#3, pairs#64, - bold=\E[1m, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, - cuu=\E[%p1%dA, home=\E[H, op=\E[0m, rs2=\E[s, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + bold=\E[1m, cub1=^H, cud1=\n, home=\E[H, op=\E[0m, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6} %=%t3%e%p1%d%;m, - sgr=\E[0%?%p6%t;1%;%?%p1%p3%|%t;7%;m, sgr0=\E[m, - smso=\E[7m, use=sun, + sgr=\E[0%?%p6%t;1%;%?%p1%p3%|%t;7%;m, use=ansi+local, + use=sun, use=klone+color, #### Iris consoles # @@ -8554,11 +8940,10 @@ wsiris|iris40|IRIS emulating a 40 line Visual 50 (approximately), cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E;, dim=\E7F2, dl1=\EM, ed=\EJ, el=\EK, flash=\E7F4\E7B1\013\E7F7\E7B0, home=\EH, ht=^I, il1=\EL, - ind=\n, is2=\E7B0\E7F7\E7C2\E7R3, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, kf0=\E0, kf1=\E1, kf2=\E2, kf3=\E3, - kf4=\E4, kf5=\E5, kf6=\E6, kf7=\E7, kf8=\E8, kf9=\E9, ri=\EI, - rmso=\E0@, rmul=\E7R3\E0@, sgr0=\E7F7, smso=\E9P, - smul=\E7R2\E9P, + ind=\n, is2=\E7B0\E7F7\E7C2\E7R3, kf0=\E0, kf1=\E1, + kf2=\E2, kf3=\E3, kf4=\E4, kf5=\E5, kf6=\E6, kf7=\E7, kf8=\E8, + kf9=\E9, ri=\EI, rmso=\E0@, rmul=\E7R3\E0@, sgr0=\E7F7, + smso=\E9P, smul=\E7R2\E9P, use=vt52+arrows, #### NeWS consoles # @@ -8627,17 +9012,17 @@ news-unk|Sony NEWS VT100 emulator common entry, OTbs, OTpt, am, xenl, cols#80, OTnl=\n, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, - ed=\E[J, el=\E[K, home=\E[H, ht=^I, - if=/usr/share/tabset/vt100, il=\E[%p1%dL, il1=\E[L, + cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + if=/usr/share/tabset/vt100, is2=\E[?7h\E[?1h\E[?3l\E7\E8, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOY, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, - kf8=\EOW, kf9=\EOX, rc=\E8, rev=\E[7m, ri=\EM, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[r, sc=\E7, - sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + kf8=\EOW, kf9=\EOX, rev=\E[7m, ri=\EM, rmkx=\E[?1l\E>, + rmso=\E[m, rmul=\E[m, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[r, sgr0=\E[m, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, use=ansi+csr, + use=ansi+idl, # # (news-29: this had :TY=ascii: --esr) news-29|Sony NEWS VT100 emulator with 29 lines, @@ -8672,21 +9057,21 @@ news-42-sjis|Sony NEWS VT100 with 42 lines and SJIS, # NEWS-OS old termcap entry # # (news-old-unk: this had :KB=news:TY=sjis: --esr) -news-old-unk|Sony NEWS VT100 emulator common entry, +news-old-unk|old Sony NEWS VT100 emulator common entry, OTbs, OTpt, am, xenl, cols#80, vt#3, OTnl=\n, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, if=/usr/share/tabset/vt100, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, - kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m, ri=\EM, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + if=/usr/share/tabset/vt100, kbs=^H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, rev=\E[7m, ri=\EM, rmkx=\E[?1l\E>, + rmso=\E[m, rmul=\E[m, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, use=ansi+csr, # # (nwp512: this had :DE=^H:, which I think means --esr) -nwp512|news|nwp514|news40|vt100-bm|old Sony VT100 emulator 40 lines, +nwp512|news|nwp514|news40|vt100-bm|nwp512-o|nwp514-o|news-o|news40-o|vt100-bm-o|old Sony VT100 emulator 40 lines, OTbs, lines#40, is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;40 @@ -8694,21 +9079,13 @@ nwp512|news|nwp514|news40|vt100-bm|old Sony VT100 emulator 40 lines, use=news-old-unk, # # (nwp512-a: this had :TY=ascii: and the alias vt100-bm --esr) -nwp512-a|nwp514-a|news-a|news42|news40-a|Sony VT100 emulator 42 line, +nwp512-a|nwp514-a|news-a|news42|news40-a|old Sony VT100 emulator 42 line, lines#42, is2=\E[?7h\E[?1l\E[?3l\E7\E[1;42r\E8, use=news-old-unk, # -# (nwp-512-o: this had :KB=nwp410:DE=^H: I interpret the latter as . --esr) -nwp512-o|nwp514-o|news-o|news40-o|vt100-bm-o|Sony VT100 emulator 40 lines, - OTbs, - lines#40, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;40 - r\E8, - use=news-old-unk, -# # (nwp513: this had :DE=^H: and the alias vt100-bm --esr) -nwp513|nwp518|nwe501|newscbm|news31|Sony VT100 emulator 33 lines, +nwp513|nwp518|nwe501|newscbm|news31|nwp513-o|nwp518-o|nwe501-o|nwp251-o|newscbm-o|news31-o|old Sony VT100 emulator 31 lines, OTbs, lines#31, is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;31 @@ -8724,16 +9101,8 @@ nwp513-a|nwp518-a|nwe501-a|nwp251-a|newscbm-a|news31-a|newscbm33|news33|old Sony r\E8, use=news-old-unk, # -# (nwp513-o: had :DE=^H:, I think that's ; also the alias vt100-bm --esr) -nwp513-o|nwp518-o|nwe501-o|nwp251-o|newscbm-o|news31-o|old Sony VT100 emulator 33 lines, - OTbs, - lines#31, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;31 - r\E8, - use=news-old-unk, -# # (news28: this had :DE=^H:, I think that's , and :KB=nws1200: --esr) -news28|Sony VT100 emulator 28 lines, +news28|old Sony VT100 emulator 28 lines, OTbs, lines#28, is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;28 @@ -8741,7 +9110,7 @@ news28|Sony VT100 emulator 28 lines, use=news-old-unk, # # (news29: this had :TY=ascii:KB=nws1200:\ --esr) -news29|news28-a|Sony VT100 emulator 29 lines, +news29|news28-a|old Sony VT100 emulator 29 lines, lines#29, is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;29 r\E8, @@ -8751,23 +9120,21 @@ news29|news28-a|Sony VT100 emulator 29 lines, nwp511|nwp-511|nwp-511 VT100, OTbs, OTpt, am, xenl, cols#80, lines#24, - clear=\E[;H\E[2J$<20/>, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A$<2/>, dl1=\E[M, - ed=\E[J$<30/>, el=\E[K$<3/>, + clear=\E[;H\E[2J$<20/>, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A$<2/>, dl1=\E[M, ed=\E[J$<30/>, el=\E[K$<3/>, flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l, il1=\E[L, is2=\E[?5l\E[?1l\E>\E[?7h\E[?8h, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\E#W, khome=\E[H, ri=\EM$<5/>, rmso=\E[m$<2/>, rmul=\E[m$<2/>, rs2=\E7\E[r\E8\E[?5l\E[?1l\E>\E[?7h\E[?8h, - smso=\E[7m$<2/>, smul=\E[4m$<2/>, + smso=\E[7m$<2/>, smul=\E[4m$<2/>, use=ansi+local1, # (news517: this had :TY=sjis:. --esr) nwp517|nwp-517|nwp-517 VT200 80 cols 30 rows, - eslok, hs, cols#80, lines#30, - OTi2=\E[2$~\n, dsl=\E[1$~, fsl=\E[0$}, + OTi2=\E[2$~\n, dsl=\E[1$~, is2=\E7\E[r\E8\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - tsl=\E[1$}\E[;%df, use=vt220-base, + tsl=\E[1$}\E[;%df, use=dec+sl, use=vt220-base, # (news517-w: this had :TY=sjis:. --esr) nwp517-w|nwp-517-w|nwp-517 VT200 132 cols 50 rows, eslok, hs, @@ -8786,28 +9153,25 @@ dtterm|CDE desktop terminal, am, mir, msgr, xenl, xon, cols#80, it#8, lines#24, lm#0, ncv@, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)0, flash=\E[?5h$<200>\E[?5l, home=\E[H, - ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\ED, invis=\E[8m, is2=\E F\E>\E[?1l\E[?7h\E[?45l, + bel=^G, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, ech=\E[%p1%dX, el1=\E[1K, enacs=\E(B\E)0, + flash=\E[?5h$<200>\E[?5l, home=\E[H, ht=^I, hts=\EH, + ich=\E[%p1%d@, ind=\ED, is2=\E F\E>\E[?1l\E[?7h\E[?45l, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khlp=\E[28~, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmam=\E[?7l, rmir=\E[4l, rmso=\E[22;27m, rmul=\E[24m, - sc=\E7, + khlp=\E[28~, nel=\EE, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmir=\E[4l, rmso=\E[22;27m, rmul=\E[24m, sgr=\E[0%?%p1%t;2;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5 %t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smso=\E[2;7m, smul=\E[4m, tbc=\E[3g, use=vt220+vtedit, + smso=\E[2;7m, smul=\E[4m, tbc=\E[3g, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ansi+sgr, use=decid+cpr, use=vt220+vtedit, use=vt220+cvis, use=ecma+color, ######## Non-Unix Consoles @@ -8829,43 +9193,34 @@ emx-base|DOS special keys, # # Removed: rmacs=\E[10m, smacs=\E[11m, because OS/2 does not implement acs. ansi-emx|ANSI.SYS color, - am, bce, eo, mir, msgr, xon, - colors#8, cols#80, it#8, lines#25, pairs#64, - bel=^G, blink=\E[5m, bold=\E[1m, - clear=\E[1;33;44m\E[H\E[J, cr=\r, cub1=^H, cud1=\n, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch=\E[%p1%dp, ed=\E[J, el=\E[K, - flash=\E[?5h$<100/>\E[?5l, home=\E[H, ht=^I, hts=\EH, - ich=\E[%p1%d@, ich1=\E[@, ind=\n, kb2=\E[G, kbs=^H, kf0=\0D, - kll=\0O, kspd=^Z, nel=\r\n, rev=\E[5;37;41m, rmir=\E[4l, - rmpch=\E[10m, rmso=\E[0;44m\E[1;33m, - rmul=\E[0;44m\E[1;33m, rs1=\Ec, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, sgr0=\E[0m\E[1;33;44m, smir=\E[4h, - smpch=\E[11m, smso=\E[0;31;47m, smul=\E[1;31;44m, - tbc=\E[3g, u8=\E[?6c, u9=\E[c, use=vt220+cvis, - use=emx-base, + eo, + clear=\E[1;33;44m\E[H\E[J, cr=\r, cud1=\n, dch=\E[%p1%dp, + ed=\E[J, flash=\E[?5h$<100/>\E[?5l, ht=^I, hts=\EH, + ich=\E[%p1%d@, ich1=\E[@, ind=\n, kb2=\E[G, kf0=\0D, kll=\0O, + kspd=^Z, nel=\r\n, rev=\E[5;37;41m, rmir=\E[4l, + rmso=\E[0;44m\E[1;33m, rmul=\E[0;44m\E[1;33m, rs1=\Ec, + sgr0=\E[0m\E[1;33;44m, smir=\E[4h, smso=\E[0;31;47m, + smul=\E[1;31;44m, tbc=\E[3g, u8=\E[?6c, u9=\E[c, + use=vt220+cvis, use=emx-base, # nice colors for Emacs (white on blue, mode line white on cyan) ansi-color-2-emx|ANSI.SYS color 2, clear=\E[0;37;44m\E[H\E[J, rev=\E[1;37;46m, - rmso=\E[0;37;44m, rmul=\E[0;37;44m, rs1=\Ec, - setaf=\E[3%p1%dm, sgr0=\E[0;37;44m, smso=\E[1;37;46m, - smul=\E[1;36;44m, use=ansi-emx, + rmso=\E[0;37;44m, rmul=\E[0;37;44m, sgr0=\E[0;37;44m, + smso=\E[1;37;46m, smul=\E[1;36;44m, use=ansi-emx, # nice colors for Emacs (white on black, mode line black on cyan) ansi-color-3-emx|ANSI.SYS color 3, clear=\E[0;37;40m\E[H\E[J, rev=\E[1;37;46m, - rmso=\E[0;37;40m, rmul=\E[0;37;40m, rs1=\Ec, - setaf=\E[3%p1%dm, sgr0=\E[0;10m, smso=\E[1;37;46m, - smul=\E[0;36;40m, use=ansi-emx, + rmso=\E[0;37;40m, rmul=\E[0;37;40m, sgr0=\E[0;10m, + smso=\E[1;37;46m, smul=\E[0;36;40m, use=ansi-emx, mono-emx|stupid monochrome ANSI terminal with only one kind of emphasis, am, cols#80, it#8, lines#24, - clear=\E[H\E[2J$<50>, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[K, home=\E[H, - ht=^I, kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, - kcuu1=\0H, kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, - kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, - kich1=\0R, kll=\0O, knp=\0Q, kpp=\0I, nel=\r\n, rev=\E[7m, - sgr0=\E[0m, + clear=\E[H\E[2J$<50>, cup=\E[%i%p1%d;%p2%dH, el=\E[K, + home=\E[H, ht=^I, kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, + kcuf1=\0M, kcuu1=\0H, kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, + kf4=\0>, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B, kf9=\0C, + khome=\0G, kich1=\0R, kll=\0O, knp=\0Q, kpp=\0I, nel=\r\n, + rev=\E[7m, sgr0=\E[0m, use=ansi+local1, #### Cygwin @@ -8935,31 +9290,23 @@ cygwinB19|ANSI emulation for cygwin32, cygwin|ANSI emulation for Cygwin, am, hs, mir, msgr, xon, colors#8, it#8, pairs#64, - acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j - \331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v - \301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, - cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, kb2=\E[G, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, - kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kspd=^Z, nel=\r\n, - op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, - rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m, - rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + bel=^G, bold=\E[1m, cr=\r, cub=\E[%p1%dD, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, el1=\E[1K, fsl=^G, home=\E[H, ht=^I, + ind=\n, invis=\E[8m, kb2=\E[G, kf1=\E[[A, kf10=\E[21~, + kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, + kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, + kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, + kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, kspd=^Z, nel=\r\n, op=\E[39;49m, rc=\E8, + rev=\E[7m, ri=\EM, rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, + rs1=\Ec\E]R, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p6%t;1%;%?%p7 %t;8%;%?%p9%t;11%;m, - sgr0=\E[0;10m, smacs=\E[11m, smcup=\E7\E[?47h, - smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];, - vpa=\E[%i%p1%dd, use=vt220+pcedit, use=vt102+enq, + sgr0=\E[0;10m, smpch=\E[11m, smso=\E[7m, smul=\E[4m, + tsl=\E];, use=ansi+arrows, use=ansi+erase, use=ansi+idc, + use=ansi+idl, use=ansi+local, use=ansi+rca2, + use=vt220+pcedit, use=vt102+enq, use=klone+acs, + use=xterm+alt47, # I've supplied this so that you can help test new values and add other # features. Cheers, earnie_boyd@yahoo.com. @@ -8969,31 +9316,22 @@ cygwin|ANSI emulation for Cygwin, # this list, but DOES cause problems so it has been removed cygwinDBG|Debug Version for Cygwin, am, eo, mir, msgr, xon, - colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, - acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j - \331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v - \301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - el1=\E[1K, flash=\E[?5h$<200/>\E[?5l, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, kNXT=\E[6$, - kPRV=\E[5$, kb2=\E[G, kbs=^H, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[[A, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, - kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, - kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, - kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - kspd=^Z, nel=\r\n, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=\E[10m, rmir=\E[4l, rmso=\E[m, rmul=\E[m, - rs1=\Ec\E]R, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + cols#80, lines#24, ncv#3, + bel=^G, cr=\r, cup=\E[%i%p1%d;%p2%dH, dim=\E[2m, el1=\E[1K, + flash=\E[?5h$<200/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, + ind=\n, kNXT=\E[6$, kPRV=\E[5$, kb2=\E[G, kcbt=\E[Z, + kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, + kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kspd=^Z, + nel=\r\n, op=\E[39;49m, rc=\E8, ri=\EM, rs1=\Ec\E]R, sc=\E7, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5 %t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m, - sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt220+pcedit, + sgr0=\E[0;10m, vpa=\E[%i%p1%dd, use=ansi+arrows, + use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, use=ansi+sgrbold, + use=klone+acs, use=klone+color, use=vt220+pcedit, use=vt220+cvis, use=vt102+enq, #### DJGPP @@ -9122,24 +9460,21 @@ djgpp|ANSI emulation for DJGPP alpha, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j \331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v \301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, - clear=\E[H\E[J, cnorm=\E[v, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[2v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[1v, cnorm=\E[v, cr=\r, + cub1=^H, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[2v, + dch=\E[%p1%dP, dch1=\E[P, ech=\E[%p1%dX, el1=\E[1K, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, invis=\E[8m, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, nel=\r\n, op=\E[37;40m, - rev=\E[7m, ri=\E[T, rmso=\E[m, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, + ich1=\E[@, ind=\E[S, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, nel=\r\n, op=\E[37;40m, ri=\E[T, rmso=\E[m, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%e;25%;%? %p6%t;1%;%?%p7%t;8%;m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, - use=vt220+pcedit, use=ecma+index, + use=ansi+arrows, use=ansi+erase, use=ansi+idl, + use=ansi+local, use=ansi+sgr, use=vt220+pcedit, + use=ecma+index, djgpp203|entry for DJGPP 2.03, OTbs, am, @@ -9151,19 +9486,17 @@ djgpp204|entry for DJGPP 2.04, OTbs, am, AX, colors#8, cols#80, it#8, lines#25, ncv#3, pairs#64, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, - clear=\E[H\E[2J, cnorm=\E[v, cr=\r, cub=\E[%p1%dD, - cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, cvvis=\E[2v, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\E[S, invis=\E[8m, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[21~, kf1=\E[[A, - kf10=\E[21~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, - kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kll=\E[4~, - nel=\r\n, rev=\E[7m, ri=\E[T, rmso=\E[m, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, smul=\E[4m, - use=vt220+pcedit, use=ecma+index, + clear=\E[H\E[2J, cnorm=\E[v, cr=\r, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E[2v, dch=\E[%p1%dP, + dch1=\E[P, ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + ich=\E[%p1%d@, ich1=\E[@, ind=\E[S, invis=\E[8m, + kf0=\E[21~, kf1=\E[[A, kf10=\E[21~, kf2=\E[[B, kf3=\E[[C, + kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, + kf9=\E[20~, khome=\E[1~, kll=\E[4~, nel=\r\n, rev=\E[7m, + ri=\E[T, rmso=\E[m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr0=\E[m, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+idl, use=ansi+local, use=vt220+pcedit, + use=ecma+index, #### U/Win @@ -9172,24 +9505,21 @@ djgpp204|entry for DJGPP 2.04, # set (the emulator spits out error messages). Compare with att6386 -TD uwin|U/Win 3.2 console, am, eo, in, msgr, xenl, xon, - colors#8, it#8, ncv#58, pairs#64, + it#8, ncv#58, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, ich1=\E[@, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=^?, kend=\E[Y, - kf1=\EOP, kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, - kf9=\EOX, khome=\E[H, kich1=\E[@, nel=\r\n, op=\E[39;49m, - rc=\E8, rev=\E[7m, rmacs=\E[10m, rmir=\E[4l, rmpch=\E[10m, - rmso=\E[27m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0;10m, - smacs=\E[11m, smir=\E[4h, smpch=\E[11m, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dim=\E[2m, + ech=\E[%p1%dX, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, + kdch1=^?, kend=\E[Y, kf1=\EOP, kf10=\EOY, kf11=\EOZ, + kf12=\EOA, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, + kf7=\EOV, kf8=\EOW, kf9=\EOX, kich1=\E[@, nel=\r\n, + op=\E[39;49m, rc=\E8, rev=\E[7m, rmacs=\E[10m, + rmpch=\E[10m, rmso=\E[27m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7, + sgr0=\E[0;10m, smacs=\E[11m, smpch=\E[11m, smso=\E[7m, + smul=\E[4m, tbc=\E[3g, use=ansi+arrows, use=ansi+cpr, + use=ansi+erase, use=ansi+idc, use=klone+color, use=vt220+cvis, #### Microsoft (miscellaneous) @@ -9281,30 +9611,28 @@ interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with colo acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j \331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v \301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, bold=\E[1m, clear=\E[2J, cr=\r, cub=\E[%p1%dD, - cub1=\E[D, cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=\E[S, - kLFT=\EF\^, kRIT=\EF$, kbs=^H, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=^?, kend=\E[U, - kf0=\EFA, kf1=\EF1, kf10=\EFA, kf11=\EFB, kf12=\EFC, - kf13=\EFD, kf14=\EFE, kf15=\EFF, kf16=\EFG, kf17=\EFH, - kf18=\EFI, kf19=\EFJ, kf2=\EF2, kf20=\EFK, kf21=\EFL, - kf22=\EFM, kf23=\EFN, kf24=\EFO, kf25=\EFP, kf26=\EFQ, - kf27=\EFR, kf28=\EFS, kf29=\EFT, kf3=\EF3, kf30=\EFU, - kf31=\EFV, kf32=\EFW, kf33=\EFX, kf34=\EFY, kf35=\EFZ, - kf36=\EFa, kf37=\EFb, kf38=\EFc, kf39=\EFd, kf4=\EF4, - kf40=\EFe, kf41=\EFf, kf42=\EFg, kf43=\EFh, kf44=\EFi, - kf45=\EFj, kf46=\EFk, kf47=\EFm, kf48=\EFn, kf49=\EFo, - kf5=\EF5, kf50=\EFp, kf51=\EFq, kf52=\EFr, kf53=\EFs, - kf54=\EFt, kf55=\EFu, kf56=\EFv, kf57=\EFw, kf58=\EFx, - kf59=\EFy, kf6=\EF6, kf60=\EFz, kf7=\EF7, kf8=\EF8, kf9=\EF9, - khome=\E[H, kich1=\E[L, kind=\EF+, kll=\E[U, knp=\E[T, - kpp=\E[S, kri=\EF-, ll=\E[U, nel=\r\n, op=\E[m, rc=\E[u, - rev=\E[7m, ri=\E[T, rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, - rmul=\E[m, rs1=\Ec, sc=\E[s, sgr0=\E[0m, smcup=\E[s\E[1b, - smso=\E[7m, smul=\E[4m, use=ecma+index, use=klone+color, + bel=^G, bold=\E[1m, clear=\E[2J, cr=\r, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + ind=\E[S, kLFT=\EF\^, kRIT=\EF$, kcbt=\E[Z, kdch1=^?, + kend=\E[U, kf0=\EFA, kf1=\EF1, kf10=\EFA, kf11=\EFB, + kf12=\EFC, kf13=\EFD, kf14=\EFE, kf15=\EFF, kf16=\EFG, + kf17=\EFH, kf18=\EFI, kf19=\EFJ, kf2=\EF2, kf20=\EFK, + kf21=\EFL, kf22=\EFM, kf23=\EFN, kf24=\EFO, kf25=\EFP, + kf26=\EFQ, kf27=\EFR, kf28=\EFS, kf29=\EFT, kf3=\EF3, + kf30=\EFU, kf31=\EFV, kf32=\EFW, kf33=\EFX, kf34=\EFY, + kf35=\EFZ, kf36=\EFa, kf37=\EFb, kf38=\EFc, kf39=\EFd, + kf4=\EF4, kf40=\EFe, kf41=\EFf, kf42=\EFg, kf43=\EFh, + kf44=\EFi, kf45=\EFj, kf46=\EFk, kf47=\EFm, kf48=\EFn, + kf49=\EFo, kf5=\EF5, kf50=\EFp, kf51=\EFq, kf52=\EFr, + kf53=\EFs, kf54=\EFt, kf55=\EFu, kf56=\EFv, kf57=\EFw, + kf58=\EFx, kf59=\EFy, kf6=\EF6, kf60=\EFz, kf7=\EF7, + kf8=\EF8, kf9=\EF9, kich1=\E[L, kind=\EF+, kll=\E[U, + knp=\E[T, kpp=\E[S, kri=\EF-, ll=\E[U, nel=\r\n, op=\E[m, + rc=\E[u, rev=\E[7m, ri=\E[T, rmcup=\E[2b\E[u\r\E[K, + rmso=\E[m, rmul=\E[m, rs1=\Ec, sc=\E[s, sgr0=\E[0m, + smcup=\E[s\E[1b, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+idl, use=ansi+local, use=ecma+index, + use=klone+color, opennt-35|ntconsole-35|OpenNT-term35 compatible with color, lines#35, use=opennt, @@ -9386,15 +9714,15 @@ altos2|alt2|altos-2|Altos II, ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@, if=/usr/share/tabset/vt100, il1=\E[L, ind=\n, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, kDL=^Am\r, - kEOL=^An\r, kbs=^H, kcbt=^AK\r, kclr=^AL\r, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=^AM\r, kel=^AN\r, + kEOL=^An\r, kcbt=^AK\r, kclr=^AL\r, kdch1=^AM\r, kel=^AN\r, kf0=^AI\r, kf1=^A@\r, kf2=^AA\r, kf3=^AB\r, kf32=^A`\r, kf33=^Aa\r, kf34=^Ab\r, kf35=^Ac\r, kf36=^Ad\r, kf37=^Ae\r, kf38=^Af\r, kf39=^Ag\r, kf4=^AC\r, kf40=^Ah\r, kf41=^Ai\r, kf42=^Aj\r, kf43=^Ak\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=\E[f, kil1=^AJ\r, kind=^AO\r, nel=\r\n, rmam=\E[?7l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, - smam=\E[?7h, smso=\E[7m, smul=\E[4m, + smam=\E[?7h, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + # (altos3: had extension capabilities # :c0=^A`\r:c1=^Aa\r:c2=^Ab\r:c3=^Ac\r:\ # :c4=^Ad\r:c5=^Ae\r:c6=^Af\r:c7=^Ag\r:\ @@ -9485,21 +9813,21 @@ hp+pfk+arrows|HP alternate arrow definitions, kll=\Eq\r, kri=\Es\r, hp+arrows|HP arrow definitions, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\Eh, - kind=\ES, kll=\EF, kri=\ET, + khome=\Eh, kind=\ES, kll=\EF, kri=\ET, use=vt52+arrows, # Generic stuff from the HP 262x series # hp262x|HP 262x terminals, xhp, blink=\E&dA, dch1=\EP$<2>, ed=\EJ, ht=\011$<2>, ind=\ES, - invis=\E&dS, ip=$<2>, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=\EP, kdl1=\EM, ked=\EJ, kel=\EK, khome=\Eh, - kich1=\EQ, kil1=\EL, kind=\ES, knp=\EU, kpp=\EV, kri=\ET, - krmir=\ER, rev=\E&dB, rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, + invis=\E&dS, ip=$<2>, kdch1=\EP, kdl1=\EM, ked=\EJ, kel=\EK, + khome=\Eh, kich1=\EQ, kil1=\EL, kind=\ES, knp=\EU, kpp=\EV, + kri=\ET, krmir=\ER, rev=\E&dB, rmkx=\E&s0A, rmso=\E&d@, + rmul=\E&d@, sgr=\E&d%{64}%?%p1%t%{66}%|%;%?%p2%t%{68}%|%;%?%p3%t%{66}%| %;%?%p4%t%{65}%|%;%c, sgr0=\E&d@, smkx=\E&s1A, smso=\E&dB, smul=\E&dD, + use=vt52+arrows, # Note: no on HPs since that homes to top of memory, not screen. # Due to severe 2621 braindamage, the only way to get the arrow keys to @@ -9529,8 +9857,7 @@ hp2621-fl|HP 2621, xhp@, xon, pb#19200, cbt=\Ei, cup=\E&a%p2%dc%p1%dY, dch1=\EP$<2>, ht=\011$<2>, - ip=$<2>, is2=\E&j@\r, rmkx=\E&j@, rmso=\E&d@, rmul=\E&d@, - sgr0=\E&d@, smkx=\E&jB, smso=\E&dD, smul=\E&dD, + ip=$<2>, is2=\E&j@\r, rmkx=\E&j@, smkx=\E&jB, smso=\E&dD, use=hp+pfk+cr, use=hpgeneric, # To use hp2621p printer, setenv TERM=2621p, PRINTER=2612p @@ -9542,8 +9869,8 @@ hp2621p-a|HP 2621p with fn as arrows, # hp2621 with k45 keyboard hp2621-k45|hp2621k45|k45|HP 2621 with 45 keyboard, - kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - khome=\Eh, rmkx=\E&s0A, smkx=\E&s1A, use=hp2621, + kbs=^H, khome=\Eh, rmkx=\E&s0A, smkx=\E&s1A, use=hp2621, + use=vt52+arrows, # 2621 using all 48 lines of memory, only 24 visible at any time. hp2621-48|HP 48 line 2621, @@ -9657,21 +9984,20 @@ hp2626-12-s|Hewlett-Packard 2626 11 lines plus status, # hp2627 color tubes from University of Wisconsin # hp2627a-rev|HP 2627 with reverse video colors, - cr=\r, cud1=\n, ht=^I, ind=\n, + ht=^I, is2=\E&v0m1a0b0c1x1y1z1i0a0b1c1x1y1z0i0S\E&j@\r\E3 \r, - kbs=^H, kcub1=^H, kcud1=\n, nel=\r\n, rmul=\E&v0S\E&d@, + kcub1=^H, kcud1=\n, nel=\r\n, rmul=\E&v0S\E&d@, smul=\E&dD\E&v1S, use=hp2621-nl, hp2627a|HP 2627 color terminal with no labels, - cr=\r, cud1=\n, ht=^I, ind=\n, + ht=^I, is2=\E&v0m1a1b0c1i0a1b1c2i1a0b0c0i0S\E&j@\r\E3\r, - kbs=^H, kcub1=^H, kcud1=\n, nel=\r\n, rmso=\E&v0S, + kcub1=^H, kcud1=\n, nel=\r\n, rmso=\E&v0S, rmul=\E&v0S\E&d@, smso=\E&v2S, smul=\E&dD\E&v1S, use=hp2621-nl, hp2627c|HP 2627 color (cyan) terminal with no labels, - cr=\r, cud1=\n, ht=^I, ind=\n, is2=\E&v0m1a0b0c2i1a1b0c1i0a1b1c0i0S\E&j@\r\E3\r, - kbs=^H, kcub1=^H, kcud1=\n, nel=\r\n, use=hp2627a, + use=hp2627a, # hp2640a doesn't have the Y cursor addressing feature, and C is # memory relative instead of screen relative, as we need. @@ -9700,14 +10026,13 @@ hp2641a|hp2645a|hp2647a|HP 264?A series BRL entry, # software to support it. hp2645|hp45|HP 2645 series, pb#9600, - blink=\E&dA, cr=\r$<20>, dim=\E&dH, kctab=\E2, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\EP, kdl1=\EM, - ked=\EJ, kel=\EK, khome=\Eh, khts=\E1, kich1=\EQ, kil1=\EL, - kind=\ES, knp=\EU, kpp=\EV, kri=\ET, krmir=\ER, rev=\E&dB, - rmkx=\E&s0A, + blink=\E&dA, cr=\r$<20>, dim=\E&dH, kctab=\E2, kdch1=\EP, + kdl1=\EM, ked=\EJ, kel=\EK, khome=\Eh, khts=\E1, kich1=\EQ, + kil1=\EL, kind=\ES, knp=\EU, kpp=\EV, kri=\ET, krmir=\ER, + rev=\E&dB, rmkx=\E&s0A, sgr=\E&d%{64}%?%p1%t%{66}%|%;%?%p2%t%{68}%|%;%?%p3%t%{66}%| %;%?%p4%t%{65}%|%;%?%p5%t%{72}%|%;%?%p6%t%{66}%|%;%c, - sgr0=\E&d@, smkx=\E&s1A, smul=\E&dD, use=hpgeneric, + sgr0=\E&d@, smkx=\E&s1A, use=hpgeneric, use=vt52+arrows, # You should use this terminal at 4800 baud or less. hp2648|hp2648a|HP 2648a graphics terminal, clear=\EH\EJ$<50>, cup=\E&a%p2%dc%p1%dY$<20>, @@ -9741,11 +10066,10 @@ hp2621-a|hp2621a-a|hp2621 with fn as arrows, # newer hewlett packard terminals newhpkeyboard|generic entry for HP extended keyboard, - kbs=^H, kcbt=\Ei, kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=\EP, kdl1=\EM, ked=\EJ, kel=\EK, khome=\Eh, - kich1=\EQ, kil1=\EL, kind=\ET, kll=\EF, knp=\EU, kpp=\EV, - kri=\ES, krmir=\ER, rmkx=\E&s0A, smkx=\E&s1A, - use=hp+pfk-cr, + kbs=^H, kcbt=\Ei, kclr=\EJ, kdch1=\EP, kdl1=\EM, ked=\EJ, + kel=\EK, khome=\Eh, kich1=\EQ, kil1=\EL, kind=\ET, kll=\EF, + knp=\EU, kpp=\EV, kri=\ES, krmir=\ER, rmkx=\E&s0A, + smkx=\E&s1A, use=hp+pfk-cr, use=vt52+arrows, newhp|generic entry for new Hewlett Packard terminals, am, bw, mir, xhp, xon, @@ -9799,11 +10123,10 @@ hp+printer|"standard" printer info for HP ttys, # length label, the following character is eaten! hp2621b|HP 2621b with old style keyboard, lh#1, lm#48, lw#8, nlab#8, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\Eh, - kind=\ET, kll=\EF, kri=\ES, + khome=\Eh, kind=\ET, kll=\EF, kri=\ES, pln=\E&f0a%p1%dk%p2%l%Pa%?%ga%t%ga%d%e1%;d3L%?%ga%!%t%{32}%c %;%p2%s\E%{111}%p1%+%c\r, - smln=\E&jB, use=hp2621, + smln=\E&jB, use=hp2621, use=vt52+arrows, hp2621b-p|HP 2621b with printer, use=hp+printer, use=hp2621b, @@ -9882,29 +10205,25 @@ hpansi|hp700|Hewlett Packard 700/44 in HP-PCterm mode, cols#80, lines#25, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x \263, - bel=^G, cbt=\E[Z, clear=\E[2J\E[H, cr=\r, cub1=\E[D, - cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - ich1=\E[@, il1=\E[L, ind=\n, + bel=^G, cbt=\E[Z, clear=\E[2J\E[H, cr=\r, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, ed=\E[J, + el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, ind=\n, is2=\E[44"p\E[?7h\E[>10h\E[>12h\EP1;1|3/7F\E\\, - kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kend=\E[4~, kf1=\E[17~, kf10=\E[28~, - kf2=\E[18~, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, - kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khome=\E[1~, knp=\E[6~, - kpp=\E[5~, rmam=\E[?7l, - rmsc=\E[>11l\EP1**x0/11;1/13\E[m\E\\, rmso=\E[m, - rmul=\E[m, sgr0=\E[m, smam=\E[?7h, + kcbt=\E[Z, kend=\E[4~, kf1=\E[17~, kf10=\E[28~, kf2=\E[18~, + kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, + kf8=\E[25~, kf9=\E[26~, khome=\E[1~, knp=\E[6~, kpp=\E[5~, + rmam=\E[?7l, rmsc=\E[>11l\EP1**x0/11;1/13\E[m\E\\, + rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smsc=\E[>11h\EPO**x0/65;1/67\E\\$<250>, smso=\E[7m, - smul=\E[4m, xoffc=g, xonc=e, use=vt220+cvis, + smul=\E[4m, xoffc=g, xonc=e, use=ansi+arrows, + use=ansi+local1, use=vt220+cvis, # # (hp2392: copied here from hpex -- esr) hp2392|239x series, cols#80, - cbt=\Ei, cup=\E&a%p1%dy%p2%dC, kf1=\Ep\r, kf2=\Eq\r, - kf3=\Er\r, kf4=\Es\r, kf5=\Et\r, kf6=\Eu\r, kf7=\Ev\r, - kf8=\Ew\r, khome=\Eh, kind=\EU, knp=\Eu, kpp=\Ev, kri=\EV, - rmir=\ER, rmul=\E&d@, smir=\EQ, smul=\E&dD, vpa=\E&a%p1%dY, - use=hpsub, + cbt=\Ei, cup=\E&a%p1%dy%p2%dC, khome=\Eh, kind=\EU, + knp=\Eu, kpp=\Ev, kri=\EV, rmir=\ER, rmul=\E&d@, smir=\EQ, + smul=\E&dD, vpa=\E&a%p1%dY, use=hpsub, use=hp+pfk+cr, hpsub|HP terminals -- capability subset, am, da, db, mir, xhp, xon, @@ -9912,9 +10231,9 @@ hpsub|HP terminals -- capability subset, bel=^G, clear=\EH\EJ, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, hpa=\E&a%p1%dC, ht=^I, if=/usr/share/tabset/stdcrt, il1=\EL, ind=\n, - is2=\E&s1A\E<\E&k0\\, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, khome=\Eh, rmkx=\E&s0A, rmso=\E&d@, - sgr0=\E&d@, smkx=\E&s1A, smso=\E&dB, + is2=\E&s1A\E<\E&k0\\, kbs=^H, khome=\Eh, rmkx=\E&s0A, + rmso=\E&d@, sgr0=\E&d@, smkx=\E&s1A, smso=\E&dB, + use=vt52+arrows, # hpex: # May be used for most 24 x 80 hp terminals, @@ -9927,9 +10246,9 @@ hpsub|HP terminals -- capability subset, # (hpex: removed memory-lock capabilities ":ml=\El:mu=\Em:", # moved here from hpsub -- esr) hpex|HP extended capabilities, - cr=\r, cud1=\n, cup=\E&a%p1%dy%p2%dC, ht=^I, ind=\n, kbs=^H, - kcub1=^H, kcud1=\n, nel=\r\n, rmir=\ER, rmul=\E&d@, smir=\EQ, - smul=\E&dD, vpa=\E&a%p1%dY, use=hpsub, + cud1=\n, cup=\E&a%p1%dy%p2%dC, kcub1=^H, kcud1=\n, + nel=\r\n, rmir=\ER, rmul=\E&d@, smir=\EQ, smul=\E&dD, + vpa=\E&a%p1%dY, use=hpsub, # From: Ville Sulko , 05 Aug 1996 hp2|hpex2|Hewlett-Packard extended capabilities newer version, @@ -9971,10 +10290,9 @@ hp300h|HP Catseye console, cuf1=\EC, cup=\E&a%p1%dy%p2%dC, cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, hpa=\E&a%p1%dC, ht=^I, if=/usr/share/tabset/stdcrt, il1=\EL, ind=\n, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\Eh, - rmir=\ER, rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, sgr0=\E&d@, - smir=\EQ, smkx=\E&s1A, smso=\E&dB, smul=\E&dD, tbc=\E3, - vpa=\E&a%p1%dY, + khome=\Eh, rmir=\ER, rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, + sgr0=\E&d@, smir=\EQ, smkx=\E&s1A, smso=\E&dB, smul=\E&dD, + tbc=\E3, vpa=\E&a%p1%dY, use=vt52+arrows, # From: Greg Couch hp9837|hp98720|hp98721|HP 9000/300 workstations, OTbs, am, da, db, mir, xhp, @@ -9982,12 +10300,11 @@ hp9837|hp98720|hp98721|HP 9000/300 workstations, bel=^G, cbt=\Ei, clear=\E&a0y0C\EJ, cub1=^H, cud1=\EB, cuf1=\EC, cup=\E&a%p1%dy%p2%dC, cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, hpa=\E&a%p1%dC, ht=^I, hts=\E1, - il1=\EL, ind=\n, is2=\E&v0m1b0i&j@, kbs=^H, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\EP, kdl1=\EM, - ked=\EJ, kel=\EK, khome=\Eh, kich1=\EQ, kil1=\EL, knp=\EU, - kpp=\EV, rmir=\ER, rmkx=\E&s0A, rmso=\E&v0S, rmul=\E&d@, - sgr0=\E&d@, smir=\EQ, smkx=\E&s1A, smso=\E&v5S, smul=\E&dD, - tbc=\E3, vpa=\E&a%p1%dY, + il1=\EL, ind=\n, is2=\E&v0m1b0i&j@, kbs=^H, kdch1=\EP, + kdl1=\EM, ked=\EJ, kel=\EK, khome=\Eh, kich1=\EQ, kil1=\EL, + knp=\EU, kpp=\EV, rmir=\ER, rmkx=\E&s0A, rmso=\E&v0S, + rmul=\E&d@, sgr0=\E&d@, smir=\EQ, smkx=\E&s1A, smso=\E&v5S, + smul=\E&dD, tbc=\E3, vpa=\E&a%p1%dY, use=vt52+arrows, # HP 9845 desktop computer from BRL # (hp9845: removed unknown capability :gu: -- esr) hp9845|HP 9845, @@ -10002,30 +10319,31 @@ hp9845|HP 9845, # added empty to avoid warnings re / --esr) hp98550|hp98550a|HP 9000 Series 300 color console, OTbs, am, da, db, mir, xhp, - cols#128, it#8, lines#49, lm#0, + cols#128, lines#49, lm#0, acsc=, bel=^G, blink=\E&dA, bold=\E&dJ, cbt=\Ei, civis=\E*dR, clear=\EH\EJ, cnorm=\E*dQ, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, cup=\E&a%p1%dy%p2%dC, cuu1=\EA, dch1=\EP, dim=\E&dH, - dl1=\EM, ed=\EJ, el=\EK, hpa=\E&a%p1%dC, ht=^I, hts=\E1, + dl1=\EM, ed=\EJ, el=\EK, hpa=\E&a%p1%dC, hts=\E1, if=/usr/share/tabset/std, il1=\EL, ind=\n, invis=\E&ds, kbs=^H, kclr=\EJ, kctab=\E2, kdch1=\EP, kdl1=\EM, ked=\EJ, kel=\EK, khts=\E1, kich1=\EQ, kil1=\EL, kll=\EF, knp=\EU, kpp=\EV, krmir=\ER, ktbc=\E3, rev=\E&dJ, rmacs=^O, rmir=\ER, rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, sgr0=\E&d@, smacs=^N, smir=\EQ, smkx=\E&s1A, smso=\E&dJ, smul=\E&dD, tbc=\E3, - vpa=\E&a%p1%dY, use=hp+pfk-cr, use=hp+arrows, + vpa=\E&a%p1%dY, use=hp+pfk-cr, use=ansi+inittabs, + use=hp+arrows, # From: Martin Trusler -hp98550-color|hp98550a-color|HP 9000 Series 300 color console, +hp98550-color|hp98550a-color|HP 9000 Series 300 color console (Trusler), OTbs, am, ccc, da, db, km, mir, xhp, - colors#8, cols#128, it#8, lh#2, lines#49, lm#0, lw#8, nlab#8, - pairs#8, xmc#0, + colors#8, cols#128, lh#2, lines#49, lm#0, lw#8, nlab#8, pairs#8, + xmc#0, acsc=+>\,<-\^.v0\374``a\374f\372g\376h\374j+k+l+m+n+o-q-s-t+ u+v+w+x|y{*|!}\273~\362, bel=^G, bold=\E&dD, cbt=\Ei, clear=\EH\EJ, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cup=\E&a%p1%dy%p2%dC, cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, home=\E&a0y0C, - hpa=\E&a%p1%dC, ht=^I, hts=\E1, il1=\EL, ind=\ES, + hpa=\E&a%p1%dC, hts=\E1, il1=\EL, ind=\ES, initp=\E&v0m%?%p2%{1000}%=%t1%e.%p2%d%;a%?%p3%{1000}%=%t1%e. %p3%d%;b%?%p4%{1000}%=%t1%e.%p4%d%;c%?%p5%{1000}%=%t1 %e.%p5%d%;x%?%p6%{1000}%=%t1%e.%p6%d%;y%?%p7%{1000}%= @@ -10048,7 +10366,7 @@ hp98550-color|hp98550a-color|HP 9000 Series 300 color console, smir=\EQ, smkx=\E&s1A, smln=\E&jB, smm=\E&k1I, smso=\E&dB, smul=\E&dD, tbc=\E3, u6=\Ea%dc%dR\r, u7=\Ea, u8=\E%[0123456789/], u9=\E*s1\^, vpa=\E&a%p1%dY, - use=hp+pfk-cr, use=hp+arrows, + use=hp+pfk-cr, use=ansi+inittabs, use=hp+arrows, # From: Victor Duchovni # (hp700-wy: removed obsolete ":nl=^J:"; @@ -10087,23 +10405,24 @@ bobcat|sbobcat|HP 9000 model 300 console, cbt=\Ei, clear=\EH\EJ, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cup=\E&a%p1%dy%p2%dC$<6/>, cuu1=\EA, dch1=\EP, dl1=\EM$<10*/>, ed=\EJ, el=\EK, hpa=\E&a%p1%dC$<6/>, ht=^I, - il1=\EL$<10*/>, ind=\n, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, khome=\Eh, nel=\r\n, rmir=\ER, - rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, sgr0=\E&d@, smir=\EQ, - smkx=\E&s1A, smso=\E&dB, smul=\E&dD, vpa=\E&a%p1%dY$<6/>, + il1=\EL$<10*/>, ind=\n, kbs=^H, khome=\Eh, nel=\r\n, + rmir=\ER, rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, sgr0=\E&d@, + smir=\EQ, smkx=\E&s1A, smso=\E&dB, smul=\E&dD, + vpa=\E&a%p1%dY$<6/>, use=vt52+arrows, gator-t|HP 9000 model 237 emulating extra-tall AAA, lines#94, use=gator, gator|HP 9000 model 237 emulating AAA, bw, km, mir, ul, cols#128, it#8, lines#47, - bel=^G, cbt=\E[Z, clear=\E[H\E[J, cr=\r, cub1=^H, cud1=\n, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, - dch=\E[%p1%dP$<4/>, dch1=\E[P, dl=\E[%p1%dM$<1*/>, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, hpa=\E[%i%p1%d`, - ht=^I, ich=\E[%p1%d@$<4/>, ich1=\E[@, il=\E[%p1%dL$<1*/>, - il1=\E[L, kbs=^H, kcub1=^H, kcud1=\n, nel=\r\n, - rep=%p1%c\E[%p2%db$<1*/>, rev=\E[7m, rmso=\E[m, + bel=^G, cbt=\E[Z, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch=\E[%p1%dP$<4/>, + dch1=\E[P, dl=\E[%p1%dM$<1*/>, dl1=\E[M, home=\E[H, + hpa=\E[%i%p1%d`, ht=^I, ich=\E[%p1%d@$<4/>, ich1=\E[@, + il=\E[%p1%dL$<1*/>, il1=\E[L, kbs=^H, kcub1=^H, kcud1=\n, + nel=\r\n, rep=%p1%c\E[%p2%db$<1*/>, rev=\E[7m, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, + use=ansi+erase, + gator-52|HP 9000 model 237 emulating VT52, cols#128, lines#47, use=vt52-basic, gator-52t|HP 9000 model 237 emulating extra-tall VT52, @@ -10187,8 +10506,7 @@ adm3a+|adm3a plus, # (adm5: removed obsolete ":ma=^Hh^Jj^Kk^Ll^^H:" & duplicate ":do=^J:" -- esr) adm5|LSI adm5, xmc#1, - bel=^G, cr=\r, cud1=\n, ed=\EY, el=\ET, kbs=^H, khome=^^, - rmso=\EG, smso=\EG, use=adm3a+, + ed=\EY, el=\ET, khome=^^, rmso=\EG, smso=\EG, use=adm3a+, # A lot of terminals other than adm11s use these. Wherever you see # use=adm+sgr with some of its capabilities disabled, try the # disabled ones. They may well work but not have been documented or @@ -10282,10 +10600,9 @@ adm20|Lear Siegler adm20, sgr0=\E(, smso=\E), adm21|Lear Siegler adm21, xmc#1, - bel=^G, cr=\r, cud1=\n, dch1=\EW, dl1=\ER$<30*>, ed=\EY, - el=\ET, ich1=\EQ, il1=\EE$<30*>, ind=\n, invis@, kbs=^H, - kcub1=^H, kcud1=\n, kcuf1=^L, kcuu1=^K, khome=^^, - use=adm+sgr, use=adm3a, + dch1=\EW, dl1=\ER$<30*>, ed=\EY, el=\ET, ich1=\EQ, + il1=\EE$<30*>, invis@, kbs=^H, khome=^^, use=adm+sgr, + use=adm3a, # (adm22: ":em=:" was an obvious typo for ":ei=:"; also, # removed obsolete ":kn#7:ma=j^Jk^P^K^Pl ^R^L^L :"; # removed bogus-looking \200 from before . -- esr) @@ -10511,18 +10828,17 @@ adm1178|1178|LSI adm1178, pt100|pt200|wren|fenix|Prime pt100/pt200, am, bw, mir, msgr, cols#80, it#8, lines#24, - cbt=\E[Z, clear=\E?, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E0%p1%{33}%+%c%p2%{33}%+%c, cuu=\E[%p1%dA, - cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl1=\E[M, - ed=\E[J\E[r, el=\E[K\E[t, flash=\E$$<200/>\E$P, - home=\E$B, ht=^I, il1=\E[L\E[t, ind=\n, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E$A, nel=\r\n, - rmcup=, rmir=\E[4l, rmkx=\E[>13l, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, + cbt=\E[Z, clear=\E?, cr=\r, cub1=^H, cud1=\ED, + cup=\E0%p1%{33}%+%c%p2%{33}%+%c, cuu1=\EM, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl1=\E[M, ed=\E[J\E[r, + el=\E[K\E[t, flash=\E$$<200/>\E$P, home=\E$B, ht=^I, + il1=\E[L\E[t, ind=\n, khome=\E$A, nel=\r\n, rmcup=, + rmir=\E[4l, rmkx=\E[>13l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smcup=\E[>1l\E[>2l\E[>16l\E[4l\E[>9l\E[20l\E[>3l\E[>7h\E[>12 l\E[1Q, smir=\E[4h, smkx=\E[>13h, smso=\E[2;7m, smul=\E[4m, + use=ansi+arrows, use=ansi+local, + pt100w|pt200w|wrenw|fenixw|Prime pt100/pt200 in 132-column mode, cols#132, cup=\E[%i%p1%d;%p2%dH, use=pt100, @@ -10597,20 +10913,20 @@ qvt103|Qume qvt 103, am, xenl, xon, cols#80, it#8, lines#24, vt#3, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[2J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, + clear=\E[H\E[2J$<50>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, home=\E[H, ht=^I, hts=\EH, ind=\n, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, + kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rev=\E[7m$<2>, ri=\EM$<5>, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1 %;m$<2>, sgr0=\E[m$<2>, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, use=ansi+csr, + use=ansi+local, + qvt103-w|Qume qvt103 132 cols, cols#132, lines#24, rs2=\E>\E[?3h\E[?4l\E[?5l\E[?8h, use=qvt103, @@ -11424,7 +11740,7 @@ tvi925|TeleVideo 925, # to avoid "magic cookie" standout glitch: tvi925-hi|TeleVideo Model 925 with half intensity standout mode, xmc@, - kbs=^H, kcub1=^H, kcud1=\n, rmso=\E(, smso=\E), use=tvi925, + kcud1=\n, rmso=\E(, smso=\E), use=tvi925, # From: Todd Litwin 28 May 1993 # Originally Tim Curry, Univ. of Central Fla., 5/21/82 @@ -11622,8 +11938,8 @@ tvi950-rv-4p|TeleVideo 950 rev video w/4 pages, # If the BSD termcap file was right, would # also work. tvi955|TeleVideo 955, - OTbs, mc5i, msgr@, - it#8, xmc@, + mc5i, msgr@, + xmc@, acsc=0_`RjHkGlFmEnIoPqKsQtMuLvOwNxJ, blink=\EG2, civis=\E.0, cnorm=\E.2, cud1=^V, cup=\E[%i%p1%d;%p2%dH, cvvis=\E.1, dim=\E[=5h, ind@, invis=\EG1, @@ -11632,8 +11948,7 @@ tvi955|TeleVideo 955, rmam=\E[=7l, rmxon=^N, rs1=\EDF\EC\Eg\Er\EO\E'\E(\Ew\EX\Ee\s\017\E0P\E6\0\E0p\E4\0 \Ef\r, - sgr0=\EG0\E[=5l, smacs=\E$, smam=\E[=7h, smxon=^O, - use=tvi950, + sgr0=\EG0\E[=5l, smam=\E[=7h, smxon=^O, use=tvi950, tvi955-w|955-w|TeleVideo 955 w/132 cols, cols#132, is2=\E[=3h\EF1\Ed\EG0\E[=5l\E%\El, use=tvi955, @@ -11656,13 +11971,13 @@ tvi970|TeleVideo 970, ed=\E[J, el=\E[K, flash=\E[5m$<200/>\E[m, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, il1=\E[L, is2=\E<\E[?21l\E[19h\E[1Q\E[10l\E[7l\E[H\E[2J, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E?a, kf2=\E?b, kf3=\E?c, kf4=\E?d, kf5=\E?e, kf6=\E?f, - kf7=\E?g, kf8=\E?h, kf9=\E?i, khome=\E[H, ri=\EM, rmacs=\E(B, + kf7=\E?g, kf8=\E?h, kf9=\E?i, ri=\EM, rmacs=\E(B, rmam=\E[?7h, rmcup=, rmir=\E[4l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smacs=\E(B, smam=\E[?7l, smcup=\E[?20l\E[?7h\E[1Q, smir=\E[4h, smso=\E[7m, - smul=\E[4m, vpa=\E[%i%p1%dd, + smul=\E[4m, vpa=\E[%i%p1%dd, use=ansi+arrows, + tvi970-vb|TeleVideo 970 with visual bell, flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l, use=tvi970, @@ -11694,10 +12009,9 @@ tvi9065|TeleVideo 9065, wnum#0, wsl#30, acsc='r0_jhkglfmeniopqksqtmulvownxj, bel=^G, blink=\EG2, bold=\EG\,, cbt=\EI, civis=\E.0, clear=^Z, - cnorm=\E.3, cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, - cub1=^H, cud=\E[%p1%dB, cud1=^V, cuf=\E[%p1%dC, cuf1=^L, - cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu=\E[%p1%dA, - cuu1=^K, cvvis=\E.2, dch=\E[%p1%dP, dch1=\EW, dim=\EGp, + cnorm=\E.3, cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^V, + cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, + cvvis=\E.2, dch=\E[%p1%dP, dch1=\EW, dim=\EGp, dl=\E[%p1%dM, dl1=\ER, dsl=\E_30\r, ech=\E[%p1%d@, ed=\EY, el=\ET, flash=\Eb$<15>\Ed, fsl=\r, home=^^, ht=^I, hts=\E1, ich=\E[%p1%d@, if=/usr/share/tabset/stdcrt, @@ -11729,7 +12043,8 @@ tvi9065|TeleVideo 9065, %p9%t\E$%e\E%%%;, sgr0=\EG0\E%, smacs=\E$, smam=\E=7h, smcup=\E.2, smdc=\Er, smir=\Eq, smln=\E[4;2v, smso=\EGt, smul=\EG8, smxon=^O, - tbc=\E3, tsl=\E[4;1v\E_30, uc=\EG8\EG0, use=ecma+index, + tbc=\E3, tsl=\E[4;1v\E_30, uc=\EG8\EG0, use=ansi+local, + use=ecma+index, #### Visual (vi) # @@ -11756,14 +12071,10 @@ tvi9065|TeleVideo 9065, # disguise; - are really l1-l3. vi50|Visual 50, OTbs, OTpt, am, da, db, msgr, - cols#80, it#8, lines#24, - OTnl=\n, bel=^G, cbt=\Ez$<4/>, clear=\EH\EJ, cr=\r, cub1=^H, - cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\EA, dl1=\EM$<3*/>, ed=\EJ, el=\EK$<16/>, home=\EH, - ht=^I, il1=\EL, ind=\n, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, kf1=\EP, kf2=\EQ, kf3=\ER, kf4=\EV, + OTnl=\n, cbt=\Ez$<4/>, cub1=^H, dl1=\EM$<3*/>, + el=\EK$<16/>, il1=\EL, kf1=\EP, kf2=\EQ, kf3=\ER, kf4=\EV, kf5=\EE, kf6=\E], kf7=\EL, kf8=\Ev, kf9=\EM, khome=\EH, - nel=\r\n, ri=\EI, rmso=\ET, rmul=\EW, smso=\EU, smul=\ES, + rmso=\ET, rmul=\EW, smso=\EU, smul=\ES, use=vt52-basic, # this one was BSD & SCO's vi50 vi50adm|Visual 50 in adm3a mode, am, msgr, @@ -11771,8 +12082,7 @@ vi50adm|Visual 50 in adm3a mode, bel=^G, clear=^Z, cr=\r, cub1=^H, cud1=\n, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dl1=\EM, ed=\Ek, el=\EK, home=\EH, ht=^I, il1=\EL, ind=\n, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\EH, - rmso=\ET, smso=\EU, + khome=\EH, rmso=\ET, smso=\EU, use=vt52+arrows, # From: Jeff Siegal vi55|Visual 55, OTbs, am, mir, msgr, @@ -11780,9 +12090,8 @@ vi55|Visual 55, clear=\Ev, csr=\E_%p1%{65}%+%c%p2%{65}%+%c, cub1=^H, cud1=\n, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\Ew, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, - il1=\EL, is2=\Ev\E_AX\Eb\EW\E9P\ET, kbs=^H, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, ri=\EI, rmir=\Eb, rmso=\ET, - smir=\Ea, smso=\EU, + il1=\EL, is2=\Ev\E_AX\Eb\EW\E9P\ET, kbs=^H, ri=\EI, + rmir=\Eb, rmso=\ET, smir=\Ea, smso=\EU, use=vt52+arrows, # Visual 200 from BRL # The following switch settings are assumed for normal operation: @@ -11802,24 +12111,21 @@ vi200|Visual 200, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ed, dch1=\EO, dim=\E4, dl1=\EM, ed=\Ey, el=\Ex, home=\EH, ht=^I, hts=\E1, il1=\EL, ind=\n, invis=\Ea, kbs=^H, kclr=\Ev, - kctab=\E2, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - kdch1=\EO, kdl1=\EM, ked=\EJ, kel=\Et, kf0=\E?p, kf1=\E?q, - kf2=\E?r, kf3=\E?s, kf4=\E?t, kf5=\E?u, kf6=\E?v, kf7=\E?w, - kf8=\E?x, kf9=\E?y, khome=\EH, khts=\E1, kich1=\Ei, kil1=\EL, - krmir=\Ej, mc0=\EH\E], mc4=\EX, mc5=\EW, ri=\EI, rmacs=\EG, - rmkx=\E>, rmso=\E3, rs1=\E3\Eb\Ej\E\El\EG\Ec\Ek\EX, - sgr0=\E3\Eb, smacs=\EF, smkx=\E=, smso=\E4, tbc=\Eg, + kctab=\E2, kdch1=\EO, kdl1=\EM, ked=\EJ, kel=\Et, kf0=\E?p, + kf1=\E?q, kf2=\E?r, kf3=\E?s, kf4=\E?t, kf5=\E?u, kf6=\E?v, + kf7=\E?w, kf8=\E?x, kf9=\E?y, khome=\EH, khts=\E1, kich1=\Ei, + kil1=\EL, krmir=\Ej, mc0=\EH\E], mc4=\EX, mc5=\EW, ri=\EI, + rmacs=\EG, rmkx=\E>, rmso=\E3, + rs1=\E3\Eb\Ej\E\El\EG\Ec\Ek\EX, sgr0=\E3\Eb, smacs=\EF, + smkx=\E=, smso=\E4, tbc=\Eg, use=vt52+arrows, # The older Visuals didn't come with function keys. This entry uses # and so that the keypad keys can be used as function keys. # If your version of vi doesn't support function keys you may want # to use vi200-f. vi200-f|Visual 200 no function keys, - is2=\E3\Eb\Ej\E\\\El\EG\Ed\Ek, kf0=\E?p, kf1=\E?q, - kf2=\E?r, kf3=\E?s, kf4=\E?t, kf5=\E?u, kf6=\E?v, kf7=\E?w, - kf8=\E?x, kf9=\E?y, rmkx=\E>, rmso@, smkx=\E=, smso@, - use=vi200, + is2=\E3\Eb\Ej\E\\\El\EG\Ed\Ek, rmso@, smso@, use=vi200, vi200-rv|Visual 200 reverse video, - cnorm@, cvvis@, ri@, rmso=\E3, smso=\E4, use=vi200, + cnorm@, cvvis@, ri@, use=vi200, # the function keys are programmable but we don't reprogram them to their # default values with because programming them is very verbose. maybe @@ -11829,17 +12135,17 @@ vi200-rv|Visual 200 reverse video, vi300|Visual 300 ANSI x3.64, am, bw, mir, xenl, cols#80, lines#24, - bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[P$<40>, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - il1=\E[L, ind=\n, + bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P$<40>, dl1=\E[M, ed=\E[J, + el=\E[K, home=\E[H, ht=^I, il1=\E[L, ind=\n, is2=\E[7s\E[2;3;4;20;?5;?6l\E[12;?7h\E[1Q\E[0;1(D\E[8s, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E_A\E\\, kf2=\E_B\E\\, kf3=\E_C\E\\, kf4=\E_D\E\\, kf5=\E_E\E\\, kf6=\E_F\E\\, kf7=\E_G\E\\, kf8=\E_H\E\\, kf9=\E_I\E\\, khome=\E[H, ri=\EM, rmam=\E[?7l, rmir=\E[4l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smir=\E[4h, - smso=\E[1m, smul=\E[4m, + smso=\E[1m, smul=\E[4m, use=ansi+local1, + # some of the vi300s have older firmware that has the command # sequence for setting editing extent reversed. vi300-old|Visual 300 with old firmware (set edit extent reversed), @@ -11864,9 +12170,9 @@ vi500|Visual 500, el=\Ex$<16/>, home=\EH, ht=\011$<8/>, il1=\EL\Ex$<3*/>, ind=\n, is2=\E3\E\001\E\007\E\003\Ek\EG\Ed\EX\El\E>\Eb\E\\, - kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - khome=\EH, nel=\r\n, rmacs=^O, rmir=\Ej, rmso=\E^G, + kbs=^H, khome=\EH, nel=\r\n, rmacs=^O, rmir=\Ej, rmso=\E^G, rmul=\E^C, smacs=^N, smir=\Ei, smso=\E^H, smul=\E^D, + use=vt52+arrows, # The visual 550 is a visual 300 with Tektronix graphics, # and with 33 lines. clear screen is modified here to @@ -11877,14 +12183,14 @@ vi550|Visual 550 ANSI x3.64, vi603|visual603|Visual 603, hs, mir, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, + blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, csr=\E[%i%p1%d;%p2%dr, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - dsl=\EP2;1~\E\\, ed=\E[J, el=\E[K, fsl=\E\\, il1=\E[L, - ind=\ED, is1=\E>\E[?3l\E[?4l\E[?7h\E[?8h\E[1;24r, - rev=\E[7m, ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, + dsl=\EP2;1~\E\\, ed=\E[J, el=\E[K, fsl=\E\\, ind=\ED, + is1=\E>\E[?3l\E[?4l\E[?7h\E[?8h\E[1;24r, rev=\E[7m, + ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, sgr0=\E[m\017$<2>, smir=\E[4h, smso=\E[7m, smul=\E[4m, - tsl=\EP2~, use=vt100+4bsd, + tsl=\EP2~, use=ansi+idl1, use=decid+cpr, use=vt100+4bsd, #### Wyse (wy) # @@ -12254,9 +12560,9 @@ wy60-42|wyse60-42|Wyse 60 80-column 42-lines, ri=\Ej$<10>, rs3=\Ee*$<150>, use=wy60, wy60-42-w|wyse60-42-w|Wyse 60 132-column 42-lines, cols#132, lw#7, nlab#16, wsl#97, - clear=\E+$<260>, cup=\Ea%i%p1%dR%p2%dC$<2>, - dch1=\EW$<19>, ed=\Ey$<260>, home=\036$<2>, ip=$<6>, - nel=\r\n$<11>, rs2=\EeF$<150>\E`;$<150>, use=wy60-42, + cup=\Ea%i%p1%dR%p2%dC$<2>, dch1=\EW$<19>, + home=\036$<2>, ip=$<6>, nel=\r\n$<11>, + rs2=\EeF$<150>\E`;$<150>, use=wy60-42, # wy60-43|wyse60-43|Wyse 60 80-column 43-lines, lh@, lines#43, lw@, nlab@, @@ -12288,8 +12594,7 @@ wy60-w-vb|wy60-wvb|wyse60-wvb|Wyse 60 132-column visible bell, wy99gt|wyse99gt|Wyse 99gt, msgr@, clear=\E+$<130>, dch1=\EW$<7>, dl1=\ER$<4>, ed=\Ey$<130>, - el=\Et$<5>, flash=\E`8$<100/>\E`9, ht=\011$<1>, - il1=\EE$<4>, ind=\n$<4>, ip=$<2>, is3=\Ew0$<20>, nel@, + el=\Et$<5>, ind=\n$<4>, ip=$<2>, is3=\Ew0$<20>, nel@, ri=\Ej$<3>, rmcup=\Ew0, rs2=\E`:$<150>, smcup=\Ew1, u0=\E~>\E8, u1=\E[42h, use=wy60, # @@ -12301,7 +12606,7 @@ wy99gt-w|wyse99gt-w|Wyse 99gt 132-column, # wy99gt-25|wyse99gt-25|Wyse 99gt 80-column 25-lines, lh@, lines#25, lw@, nlab@, - pln@, rs2=\E`:$<150>, rs3=\EwG\Ee)$<200>, use=wy99gt, + pln@, rs3=\EwG\Ee)$<200>, use=wy99gt, # wy99gt-25-w|wyse99gt-25-w|Wyse 99gt 132-column 25-lines, lh@, lines#25, lw@, nlab@, @@ -12328,20 +12633,18 @@ wy99gt-w-vb|wy99gt-wvb|wyse99gt-wvb|Wyse 99gt 132-column visible bell, # not, so smir and rmir are commented out as well. # From: Francesco Potorti` , 24 Aug 1998 wy99-ansi|Wyse WY-99GT in ANSI mode (int'l PC keyboard), - am, km, mc5i, mir, msgr, xenl, + am, km, mir, msgr, xenl, cols#80, it#8, lines#25, vt#3, acsc=``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, - clear=\E[H\E[J$<200>, cnorm=\E[34h\E[?25h, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD$<1>, + bel=^G, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[J$<200>, + cnorm=\E[34h\E[?25h, cr=\r, cub=\E[%p1%dD$<1>, cub1=\010$<1>, cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC$<1>, cuf1=\E[C$<1>, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, - cvvis=\E[34l\E[?25h, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J$<8*>, el=\E[K$<1>, el1=\E[1K$<1>, - enacs=\E)0, flash=\E[?5h$<30/>\E[?5l, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL, - il1=\E[L, ind=\n$<1>, invis=\E[8m, + cvvis=\E[34l\E[?25h, dim=\E[2m, ech=\E[%p1%dX, + ed=\E[J$<8*>, el=\E[K$<1>, el1=\E[1K$<1>, enacs=\E)0, + flash=\E[?5h$<30/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, + ht=^I, ich=\E[%p1%d@, ind=\n$<1>, is2=\E7\E[1r\E8\E[2;3;4;13;20;34;39;36l\E[12;16;34h\E[?1;3;4 ;5;10;18l\E[?7;8;25h\E>\E[?5W\E(B\017\E[4i, kbs=^H, kcbt=\E[z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, @@ -12350,17 +12653,16 @@ wy99-ansi|Wyse WY-99GT in ANSI mode (int'l PC keyboard), kf20=\E[33~, kf21=\E[34~, kf22=\E[35~, kf23=\E[1~, kf24=\E[2~, kf3=\EOR, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, ll=\E[24E, mc0=\E[?19h, - mc4=\E[4i, mc5=\E[5i, nel=\EE, prot=\E[1"q, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E[?1l, rmso=\E[27m, rmul=\E[24m, + nel=\EE, prot=\E[1"q, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmir=\E[4l, rmkx=\E[?1l, rmso=\E[27m, rmul=\E[24m, rs2=\E[61"p\E[40h\E[?6l\E[1r\E[2;3;4;13;20;34;39;36l\E[12;16 ;34h\E[?1;3;4;5;10;18l\E[?7;8;25h\E>\E[?5W\E(B\017\E[24E \E[4i, - sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%O%t;7%;%?%p4%t;5%;%? %p5%t;2%;%?%p7%t;8%;m\E[%?%p8%t1%;"q%?%p9%t\016%e\017%;, sgr0=\E[m\017\E["q, smacs=^N, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h, smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, + smkx=\E[?1h, vpa=\E[%i%p1%dd, use=ansi+csr, use=ansi+idl, + use=ansi+pp, use=ansi+sgrbold, # This is the american terminal. Here tabs work fine. # From: Francesco Potorti` , 24 Aug 1998 @@ -12513,41 +12815,38 @@ wy160-w-vb|wy160-wvb|wyse160-wvb|Wyse 160 132-column visible bell, # to correctly handle multiple attributes on a screen. # wy75|wyse75|Wyse 75, - am, hs, mc5i, mir, msgr, xenl, xon, + am, hs, mir, msgr, xenl, xon, cols#80, lines#24, ma#1, pb#1201, wsl#78, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, cbt=\E[Z, clear=\E[H\E[J$<30>, cr=\r, - csr=\E[%i%p1%d;%p2%dr$<2>, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP$<3*>, dch1=\E[P$<3>, dim=\E[0t\E[2m, - dl=\E[%p1%dM$<1*>, dl1=\E[M, - dsl=\E[>\,\001\001\E[>-\001\001, ech=\E[%p1%dX, - ed=\E[J$<30>, el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E)0, - flash=\E[30h\E\,$<250/>\E[30l, fsl=^A, home=\E[H, - hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@$<1*>, + bel=^G, clear=\E[H\E[J$<30>, cr=\r, + csr=\E[%i%p1%d;%p2%dr$<2>, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP$<3*>, + dch1=\E[P$<3>, dim=\E[0t\E[2m, dl=\E[%p1%dM$<1*>, + dl1=\E[M, dsl=\E[>\,\001\001\E[>-\001\001, + ech=\E[%p1%dX, ed=\E[J$<30>, el=\E[K$<3>, el1=\E[1K$<3>, + enacs=\E)0, flash=\E[30h\E\,$<250/>\E[30l, fsl=^A, + home=\E[H, hpa=\E[%i%p1%dG, ich=\E[%p1%d@$<1*>, il=\E[%p1%dL$<2*>, il1=\E[L$<2>, ind=\n$<2>, ip=$<1>, is1=\E[2;4;20;30l\E[?1;10l\E[12h\E[?7;8;25h, - is2=\E>\E(B\E)0\017, is3=\E[m, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdl1=\E[M, kel=\E[K, + is2=\E>\E(B\E)0\017, is3=\E[m, kdl1=\E[M, kel=\E[K, kf1=\E[?5i, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[?3i, kf20=\E[34~, kf21=\E[35~, kf3=\E[2i, kf4=\E[@, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, - khlp=\E[28~, khome=\E[H, kich1=\E[@, kil1=\E[L, knp=\E[6~, - kpp=\E[5~, kprt=\E[?5i, kslt=\E[4~, mc0=\E[0i, mc4=\E[4i, - mc5=\E[5i, rc=\E8, rev=\E[1t\E[7m, ri=\EM$<2>, rmacs=^O, - rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, - rs1=\E[13l\E[3l\E!p, rs2=\E[35h\E[?3l$<80>, rs3=\E[?5l, - sc=\E7, + khlp=\E[28~, kich1=\E[@, kil1=\E[L, knp=\E[6~, kpp=\E[5~, + kprt=\E[?5i, kslt=\E[4~, mc0=\E[0i, rc=\E8, rev=\E[1t\E[7m, + ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, + rmso=\E[m, rmul=\E[m, rs1=\E[13l\E[3l\E!p, + rs2=\E[35h\E[?3l$<80>, rs3=\E[?5l, sc=\E7, sgr=%?%p5%t\E[0t%;%?%p3%p1%|%t\E[1t%;%?%p2%t\E[2t%;%?%p4%t \E[3t%;%?%p1%p2%p3%p4%p5%|%|%|%|%t\E[7m%e\E[m%;%?%p9%t \016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, smkx=\E[?1l\E[?7h\E=, smso=\E[1t\E[7m, smul=\E[2t\E[4m, - tbc=\E[3g, tsl=\E[>\,\001, use=vt220+cvis, - use=vt220+keypad, + tsl=\E[>\,\001, use=ansi+arrows, use=ansi+local, + use=ansi+pp, use=ansi+tabs, use=decid+cpr, + use=vt220+cvis, use=vt220+keypad, # # This terminal description uses the non-hidden attribute mode # (with magic cookie). @@ -12585,38 +12884,33 @@ wy75-wvb|wyse75-wvb|Wyse 75 with visible bell 132 columns, # leave trash on the screen when used without XON/XOFF. # wy85|wyse85|Wyse 85, - am, hs, mc5i, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, wsl#80, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - clear=\E[H\E[J$<110>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH$<1>, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP$<3*>, + hs, mir, xenl, xon, + wsl#80, + clear=\E[H\E[J$<110>, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH$<1>, dch=\E[%p1%dP$<3*>, dch1=\E[P$<3>, dim=\E[2m, dl=\E[%p1%dM$<3*>, dl1=\E[M$<3>, dsl=\E[40l, ech=\E[%p1%dX, ed=\E[J$<110>, el=\E[K$<1>, el1=\E[1K, enacs=\E)0, flash=\E[30h\E\,$<300/>\E[30l, fsl=\E[1;24r\E8, - home=\E[H, ht=\011$<1>, hts=\EH, ich=\E[%p1%d@$<4*>, - il=\E[%p1%dL$<5*>, il1=\E[L$<5>, ind=\n$<3>, invis=\E[8m, - ip=$<3>, is1=\E[62;1"p\E[?5W, + ht=\011$<1>, ich=\E[%p1%d@$<4*>, il=\E[%p1%dL$<5*>, + il1=\E[L$<5>, ind=\n$<3>, ip=$<3>, is1=\E[62;1"p\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h$<16>, - is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf10=\E[21~, kf11=\E[23~, + is3=\E>\E(B\E)0\017\E[m, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, khome=\E[26~, lf1=PF1, lf2=PF2, - lf3=PF3, lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, - rev=\E[7m, ri=\EM$<3>, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E>, rmso=\E[m, rmul=\E[m, rs1=\E[13l\E[3l\E!p, - rs2=\E[35h\E[?3l$<70>, rs3=\E[?5l, sc=\E7, + lf3=PF3, lf4=PF4, mc0=\E[0i, ri=\EM$<3>, rmam=\E[?7l, + rmir=\E[4l, rmkx=\E>, rs1=\E[13l\E[3l\E!p, + rs2=\E[35h\E[?3l$<70>, rs3=\E[?5l, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%? %p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[40h\E7\E[25;%i%p1%dH, use=vt220+vtedit, - use=vt220+cvis, use=vt220+keypad, + sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h, smkx=\E[?1l\E=, + tsl=\E[40h\E7\E[25;%i%p1%dH, use=ansi+arrows, + use=ansi+csr, use=ansi+inittabs, use=ansi+local, + use=ansi+pp, use=ansi+sgrbold, use=decid+cpr, + use=vt100+4bsd, use=vt220+vtedit, use=vt220+cvis, + use=vt220+keypad, # # Wyse 85 with visual bell. wy85-vb|wyse85-vb|Wyse 85 with visible bell, @@ -12642,41 +12936,35 @@ wy85-wvb|wyse85-wvb|Wyse 85 with visible bell 132-columns, # terminfo should reflect the manufacturer's intended behaviour of the terminal # or the actual." wy85-8bit|wyse85-8bit|Wyse 85 in 8-bit mode, - am, hs, mc5i, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, wsl#80, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - clear=\E[H\E[J$<110>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH$<1>, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP$<3*>, + hs, mir, xenl, xon, + wsl#80, + clear=\E[H\E[J$<110>, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH$<1>, dch=\E[%p1%dP$<3*>, dch1=\E[P$<3>, dim=\E[2m, dl=\E[%p1%dM$<3*>, dl1=\E[M$<3>, dsl=\E[40l, ech=\E[%p1%dX, ed=\E[J$<110>, el=\E[K$<1>, el1=\E[1K, enacs=\E)0, flash=\E[30h\E\,$<300/>\E[30l, fsl=\E[1;24r\E8, - home=\E[H, ht=\011$<1>, hts=\EH, ich=\E[%p1%d@$<4*>, - il=\E[%p1%dL$<5*>, il1=\E[L$<5>, ind=\n$<3>, invis=\E[8m, - ip=$<3>, is1=\E[62;1"p\E[?5W, + ht=\011$<1>, ich=\E[%p1%d@$<4*>, il=\E[%p1%dL$<5*>, + il1=\E[L$<5>, ind=\n$<3>, ip=$<3>, is1=\E[62;1"p\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h$<16>, is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, - kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\233D, kcud1=\233B, - kcuf1=\233C, kcuu1=\233A, kdch1=\2333~, kent=\EOM, - kf1=\EOP, kf10=\23321~, kf11=\23323~, kf12=\23324~, - kf13=\23325~, kf14=\23326~, kf15=\23328~, kf16=\23329~, - kf17=\23331~, kf18=\23332~, kf19=\23333~, kf2=\EOQ, - kf20=\23334~, kf3=\EOR, kf4=\EOS, kf6=\23317~, kf7=\23318~, - kf8=\23319~, kf9=\23320~, kfnd=\2331~, khlp=\23328~, - khome=\23326~, kich1=\2332~, knp=\2336~, kpp=\2335~, - kslt=\2334~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, - mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM$<3>, - rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmso=\E[m, - rmul=\E[m, rs1=\E[13l\E[3l\E!p, rs2=\E[35h\E[?3l$<70>, - rs3=\E[?5l, sc=\E7, + kc1=\EOq, kc3=\EOs, kcub1=\233D, kcud1=\233B, kcuf1=\233C, + kcuu1=\233A, kdch1=\2333~, kf10=\23321~, kf11=\23323~, + kf12=\23324~, kf13=\23325~, kf14=\23326~, kf15=\23328~, + kf16=\23329~, kf17=\23331~, kf18=\23332~, kf19=\23333~, + kf20=\23334~, kf6=\23317~, kf7=\23318~, kf8=\23319~, + kf9=\23320~, kfnd=\2331~, khlp=\23328~, khome=\23326~, + kich1=\2332~, knp=\2336~, kpp=\2335~, kslt=\2334~, lf1=PF1, + lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, ri=\EM$<3>, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rs1=\E[13l\E[3l\E!p, + rs2=\E[35h\E[?3l$<70>, rs3=\E[?5l, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%? %p6%t;1%;%?%p7%t;8%;+m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[40h\E7\E[25;%i%p1%dH, use=vt220+cvis, + sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h, smkx=\E[?1l\E=, + tsl=\E[40h\E7\E[25;%i%p1%dH, use=ansi+csr, + use=ansi+inittabs, use=ansi+local, use=ansi+pp, + use=ansi+sgrbold, use=decid+cpr, use=vt100+4bsd, + use=vt100+pfkeys, use=vt220+cvis, # # Wyse 185 emulating a VT320 7 bit mode. # @@ -12689,41 +12977,36 @@ wy85-8bit|wyse85-8bit|Wyse 85 in 8-bit mode, # by set-up. # wy185|wyse185|Wyse 185, - am, hs, km, mc5i, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, wsl#80, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, - clear=\E[H\E[J$<40>, cnorm=\E[34h\E[?25h, cr=\r, - csr=\E[%i%p1%d;%p2%dr$<20>, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + hs, km, mir, xenl, xon, + wsl#80, + civis=\E[?25l, clear=\E[H\E[J$<40>, + cnorm=\E[34h\E[?25h, csr=\E[%i%p1%d;%p2%dr$<20>, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[?25h\E[34l, dch=\E[%p1%dP$<3>, dch1=\E[P$<3>, dim=\E[2m, dl=\E[%p1%dM$<2*>, dl1=\E[M$<2>, dsl=\E7\E[99;0H\E[K\E8, ech=\E[%p1%dX, ed=\E[J$<40>, el=\E[K, el1=\E[1K, enacs=\E)0, flash=\E[30h\E\,$<100/>\E[30l, fsl=\E[1;24r\E8, - home=\E[H, hpa=\E[%i%p1%d`, ht=^I, hts=\EH, - ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, il1=\E[L$<3>, - ind=\n$<2>, invis=\E[8m, ip=$<4>, is1=\E[?5W, + hpa=\E[%i%p1%d`, ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, + il1=\E[L$<3>, ind=\n$<2>, ip=$<4>, is1=\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h, - is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[21~, + is3=\E>\E(B\E)0\017\E[m, kcbt=\E[Z, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, - kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, - kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khlp=\E[28~, khome=\E[26~, lf1=PF1, lf2=PF2, lf3=PF3, - lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, - ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, - rmkx=\E>, rmso=\E[27m, rmul=\E[24m, + kf19=\E[33~, kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, khome=\E[26~, lf1=PF1, + lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, rc=\E8, ri=\EM$<2>, + rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, rmkx=\E>, + rmso=\E[27m, rmul=\E[24m, rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, rs2=\E[35h\E[?3l, rs3=\E[?5l\E[47h\E[40l\E[r, sc=\E7, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%? %p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[ Q, - smir=\E[4h, smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, tsl=\E7\E[99;%i%p1%dH, vpa=\E[%i%p1%dd, - use=vt220+vtedit, use=vt220+keypad, + sgr0=\E[m\017, smam=\E[?7h, smcup=\E[ Q, smir=\E[4h, + smkx=\E[?1l\E=, tsl=\E7\E[99;%i%p1%dH, vpa=\E[%i%p1%dd, + use=ansi+arrows, use=ansi+inittabs, use=ansi+local, + use=ansi+pp, use=ansi+sgrbold, use=decid+cpr, + use=vt100+4bsd, use=vt220+vtedit, use=vt220+keypad, # # Wyse 185 with 24 data lines and top status (terminal status) wy185-24|wyse185-24|Wyse 185 with 24 data lines, @@ -12868,20 +13151,18 @@ wy325-43w-vb|wy325-43wvb|Wyse-325 43 lines wide mode visual bell, # # Bug: The capability resets attributes. wy370-nk|Wyse 370 without function keys, - am, ccc, hs, mc5i, mir, msgr, xenl, xon, - colors#64, cols#80, it#8, lines#24, ncv#48, pairs#64, wsl#80, + am, ccc, hs, mir, msgr, xenl, xon, + colors#64, cols#80, lines#24, ncv#48, pairs#64, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, - clear=\E[H\E[J$<40>, cnorm=\E[34h\E[?25h, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH$<1>, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[?25h\E[34l, dch=\E[%p1%dP$<1*>, dch1=\E[P$<1>, - dclk=\E[31h, dim=\E[2m, dl=\E[%p1%dM$<2*>, dl1=\E[M$<2>, - dsl=\E[40l, ech=\E[%p1%dX$<.1*>, ed=\E[J$<40>, - el=\E[K$<10>, el1=\E[1K$<12>, enacs=\E)0, + bel=^G, civis=\E[?25l, clear=\E[H\E[J$<40>, + cnorm=\E[34h\E[?25h, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH$<1>, cvvis=\E[?25h\E[34l, + dch=\E[%p1%dP$<1*>, dch1=\E[P$<1>, dclk=\E[31h, + dim=\E[2m, dl=\E[%p1%dM$<2*>, dl1=\E[M$<2>, dsl=\E[40l, + ech=\E[%p1%dX$<.1*>, ed=\E[J$<40>, el=\E[K$<10>, + el1=\E[1K$<12>, enacs=\E)0, flash=\E[30h\E\,$<300/>\E[30l, fsl=\E[1;24r\E8, - home=\E[H, hpa=\E[%i%p1%d`, ht=\011$<1>, hts=\EH, + home=\E[H, hpa=\E[%i%p1%d`, ht=\011$<1>, ich=\E[%p1%d@$<1*>, il=\E[%p1%dL$<2*>, il1=\E[L$<2>, ind=\n$<2>, initc=\E[66;%p1%d;%?%p2%{250}%<%t%{0}%e%p2%{500}%<%t%{16}%e @@ -12889,57 +13170,56 @@ wy370-nk|Wyse 370 without function keys, %{500}%<%t%{4}%e%p3%{750}%<%t%{8}%e%{12}%;%?%p4%{250} %<%t%{0}%e%p4%{500}%<%t%{1}%e%p4%{750}%<%t%{2}%e%{3}%; %{1}%+%+%+%dw, - invis=\E[8m, ip=$<1>, is1=\E[90;1"p\E[?5W$<6>, + ip=$<1>, is1=\E[90;1"p\E[?5W$<6>, is2=\E[2;4;20;30;40l\E[?1;10;16l\E[12h\E[?7;8;25h, - is3=\E>\017\E)0\E(B\E[63;0w\E[m, mc0=\E[0i, mc4=\E[4i, - mc5=\E[5i, + is3=\E>\017\E)0\E(B\E[63;0w\E[m, mc0=\E[0i, oc=\E[60w\E[63;0w\E[66;1;4w\E[66;2;13w\E[66;3;16w\E[66;4;49w \E[66;5;51w\E[66;6;61w\E[66;7;64w, - op=\E[m, rc=\E8, rev=\E[7m, ri=\EM$<2>, rmacs=^O, - rmam=\E[?7l, rmclk=\E[31l, rmcup=\E[ R, rmir=\E[4l, - rmkx=\E>, rmso=\E[27m, rmul=\E[24m, - rs1=\E[13l\E[3l\E!p\E[?4i, rs2=\E[35h\E[?3l$<8>, - rs3=\E[?5l, sc=\E7, setb=\E[62;%p1%dw, setf=\E[61;%p1%dw, + op=\E[m, ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmclk=\E[31l, + rmcup=\E[ R, rmir=\E[4l, rmkx=\E>, rmso=\E[27m, + rmul=\E[24m, rs1=\E[13l\E[3l\E!p\E[?4i, + rs2=\E[35h\E[?3l$<8>, rs3=\E[?5l, setb=\E[62;%p1%dw, + setf=\E[61;%p1%dw, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%? %p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[ Q, - smir=\E[4h, smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, tsl=\E[40l\E[40h\E7\E[99;%i%p1%dH, - u0=\E[?38h\E8, u1=\E[?38l\E)0, u2=\E[92;52"p, u3=\E~B, - u4=\E[92;76"p, u5=\E%!1\E[90;1"p, vpa=\E[%i%p1%dd, + smir=\E[4h, smkx=\E[?1l\E=, + tsl=\E[40l\E[40h\E7\E[99;%i%p1%dH, u0=\E[?38h\E8, + u1=\E[?38l\E)0, u2=\E[92;52"p, u3=\E~B, u4=\E[92;76"p, + u5=\E%!1\E[90;1"p, vpa=\E[%i%p1%dd, use=ansi+csr, + use=ansi+inittabs, use=ansi+local, use=ansi+pp, + use=ansi+sgrbold, use=decid+cpr, # # Function key set for the ASCII (wy-50 compatible) keyboard # This is the default 370. # wy370|wyse370|wy370-101k|Wyse 370 with 101 key keyboard, - kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=\EOQ, kdl1=\EOQ, kent=\EOM, kf1=\E[?4i, + kcbt=\E[Z, kdch1=\EOQ, kdl1=\EOQ, kent=\EOM, kf1=\E[?4i, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf2=\E[?3i, kf3=\E[2i, kf4=\E[@, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, khome=\E[H, kich1=\EOP, kil1=\EOP, - knp=\E[U, kpp=\E[V, use=wy370-nk, + kf8=\E[19~, kf9=\E[20~, kich1=\EOP, kil1=\EOP, knp=\E[U, + kpp=\E[V, use=ansi+arrows, use=wy370-nk, # # Function key set for the VT-320 (and wy85) compatible keyboard # wy370-105k|Wyse 370 with 105 key keyboard, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, lf1=PF1, lf2=PF2, lf3=PF3, - lf4=PF4, use=vt220+vtedit, use=wy370-nk, + lf4=PF4, use=ansi+arrows, use=vt220+vtedit, use=wy370-nk, use=vt220+keypad, # # Function key set for the PC compatible keyboard # wy370-EPC|Wyse 370 with 102 key keyboard, - kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kend=\E[1~, kent=\EOM, kf1=\EOP, kf10=\E[21~, + kcbt=\E[Z, kend=\E[1~, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[H, kich1=\E[2~, knp=\E[U, kpp=\E[V, use=wy370-nk, + kich1=\E[2~, knp=\E[U, kpp=\E[V, use=ansi+arrows, + use=wy370-nk, # # Wyse 370 with visual bell. wy370-vb|Wyse 370 with visible bell, @@ -13031,39 +13311,36 @@ wy370-tek|Wyse 370 Tektronix 4010/4014 emulator, # with SCO applications. # wy520|wyse520|Wyse 520, - am, hs, km, mc5i, mir, xenl, xon, + am, hs, km, mir, xenl, xon, cols#80, it#8, lines#24, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, - clear=\E[H\E[J$<40>, cnorm=\E[34h\E[?25h, cr=\r, - csr=\E[%i%p1%d;%p2%dr$<20>, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + bel=^G, civis=\E[?25l, clear=\E[H\E[J$<40>, + cnorm=\E[34h\E[?25h, cr=\r, csr=\E[%i%p1%d;%p2%dr$<20>, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[?25h\E[34l, dch=\E[%p1%dP$<3>, dch1=\E[P$<30>, dim=\E[2m, dl=\E[%p1%dM$<2*>, dl1=\E[M$<2>, dsl=\E[0$~, ech=\E[%p1%dX, ed=\E[J$<40>, el=\E[K, el1=\E[1K, - enacs=\E)0, fsl=\E[0$}, home=\E[H, hpa=\E[%i%p1%d`, ht=^I, - hts=\EH, ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, - il1=\E[L$<3>, ind=\n$<2>, invis=\E[8m, ip=$<4>, is1=\E[?5W, + enacs=\E)0, fsl=\E[0$}, home=\E[H, hpa=\E[%i%p1%d`, + ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, il1=\E[L$<3>, + ind=\n$<2>, ip=$<4>, is1=\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25;67h, - is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, ked=\E[1~, kel=\E[4~, - kent=\EOM, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, - kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khlp=\E[28~, khome=\E[26~, lf1=PF1, lf2=PF2, lf3=PF3, - lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, + is3=\E>\E(B\E)0\017\E[m, kcbt=\E[Z, ked=\E[1~, kel=\E[4~, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, + kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, + kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, + khome=\E[26~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, - rmso=\E[m, rmul=\E[24m, - rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, rs2=\E[35h\E[?3l, - rs3=\E[?5l\E[47h\E[40l\E[r, sc=\E7, + rmul=\E[24m, rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, + rs2=\E[35h\E[?3l, rs3=\E[?5l\E[47h\E[40l\E[r, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%? %p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, - smcup=\E[ Q\E[?67;8h, smir=\E[4h, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, tsl=\E[2$~\E[1$}\E[%i%p1%d`, - vpa=\E[%i%p1%dd, use=vt220+vtedit, use=vt220+keypad, + smcup=\E[ Q\E[?67;8h, smir=\E[4h, + tsl=\E[2$~\E[1$}\E[%i%p1%d`, vpa=\E[%i%p1%dd, + use=ansi+arrows, use=ansi+csr, use=ansi+local, + use=ansi+pp, use=ansi+sgrbold, use=ansi+tabs, + use=decid+cpr, use=vt220+vtedit, use=vt220+keypad, # # Wyse 520 with 24 data lines and status (terminal status) wy520-24|wyse520-24|Wyse 520 with 24 data lines, @@ -13143,7 +13420,7 @@ wy520-36w|wyse520-36w|Wyse 520 with 132 columns and 36 data lines, use=wy520-36, # # Wyse 520 in 132-column, 48 lines -wy520-48w|wyse520-48w|Wyse 520 with 48 data lines, +wy520-48w|wyse520-48w|Wyse 520 with 48 data lines (132 column), cols#132, wsl#132, rs2=\E[?3h, rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r\E[132$|, @@ -13165,14 +13442,14 @@ wy520-48pc|wyse520-48pc|Wyse 520 with 48 data lines and EPC keyboard, use=wy520-epc, # # Wyse 520 in 132-column, 36 lines with EPC keyboard -wy520-36wpc|wyse520-36wpc|Wyse 520 with 36 data lines and EPC keyboard, +wy520-36wpc|wyse520-36wpc|Wyse 520 with 36 data lines and EPC keyboard (132 column), cols#132, wsl#132, rs2=\E[?3h, rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r\E[132$|, use=wy520-36pc, # # Wyse 520 in 132-column, 48 lines with EPC keyboard -wy520-48wpc|wyse520-48wpc|Wyse 520 with 48 data lines and EPC keyboard, +wy520-48wpc|wyse520-48wpc|Wyse 520 with 48 data lines and EPC keyboard (132 column), cols#132, wsl#132, rs2=\E[?3h, rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r\E[132$|, @@ -13246,9 +13523,8 @@ pckermit|pckermit12|UCB IBMPC Kermit 1.2, # Does not use :am: because autowrap is lost when kermit dropped and restarted. # From: greg small 12-19-84 pckermit120|UCB IBMPC Kermit 1.20, - it#8, lines#24, - cud1=\EB, cvvis=\EO\Eq\EEK3, dch1=\EN, dl1=\EM, ht=^I, - il1=\EL, + it#8, + cvvis=\EO\Eq\EEK3, dch1=\EN, dl1=\EM, ht=^I, il1=\EL, is2=\EO\Eq\EJ\EY7\sK3\sUCB\sIBMPC\sKermit\s1.20\s\s12-19-84 \n, rmir@, rmso=\Eq, smir@, smso=\Ep, use=kermit, @@ -13297,31 +13573,30 @@ msk22714|mskermit22714|UCB MS-DOS Kermit 2.27 UCB 227.14 IBM PC, # Please send changes with explanations to bug-gnu-emacs@prep.ai.mit.edu. # (vt320-k3: I added / based on the init string -- esr) vt320-k3|MS-Kermit 3.00's VT320 emulation, - am, eslok, hs, km, mir, msgr, xenl, + am, km, mir, msgr, xenl, cols#80, it#8, lines#49, pb#9600, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cmdch=\E, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - dsl=\E[0$~, ech=\E[%p1%dX, ed=\E[J, el=\E[K, + bel=^G, blink=\E[5m, bold=\E[1m, cmdch=\E, cr=\r, cub1=^H, + cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l\E[?5h$<100/>\E[?5l\E[?5h$<100/>\E[ ?5l, - fsl=\E[0$}, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, - ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, - is2=\E>\E F\E[?1h\E[?7h\E[r\E[2$~, kbs=^H, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdl1=\E[3~, kf0=\E[21~, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, nel=\r\n, rc=\E8, - rev=\E[7m, ri=\EM, rin=\E[%p1%dL, rmacs=\E(B, rmam=\E[?7l, - rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, + home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, + ind=\n, is2=\E>\E F\E[?1h\E[?7h\E[r\E[2$~, kbs=^H, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdl1=\E[3~, + kf0=\E[21~, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kich1=\E[2~, knp=\E[6~, kpp=\E[5~, mc0=\E[0i, mc4=\E[4i, + mc5=\E[5i, nel=\r\n, rev=\E[7m, ri=\EM, rin=\E[%p1%dL, + rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[27m, rmul=\E[24m, rs1=\E(B\E)B\E>\E\sF\E[4;20l\E[12h\E[?1;5;6;38;42l\E[?7;25h \E[4i\E[?4i\E[m\E[r\E[2$~, - sc=\E7, sgr0=\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, + sgr0=\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[1$}\r\E[K, vpa=\E[%i%p1%dd, use=vt220+cvis, + tsl=\E[1$}\r\E[K, vpa=\E[%i%p1%dd, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+local, use=dec+sl, + use=vt220+cvis, # From: Joseph Gil 13 Dec 1991 # ACS capabilities from Philippe De Muyter 30 May 1996 @@ -13331,25 +13606,21 @@ vt320-k311|DEC VT320 series as defined by kermit 3.11, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - dsl=\E[2$~\r\E[1$}\E[K\E[$}, ed=\E[J, el=\E[K, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, + dch1=\E[P, dsl=\E[2$~\r\E[1$}\E[K\E[$}, ed=\E[J, el=\E[K, flash=\E[?5h$<100/>\E[?5l, fsl=\E[$}, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L$<3/>, - ind=\ED, + hts=\EH, ich=\E[%p1%d@, il1=\E[L$<3/>, ind=\ED, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, - lf3=pf3, lf4=pf4, nel=\r\ED, rc=\E8, rev=\E[7m, + lf3=pf3, lf4=pf4, nel=\r\ED, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, - rmul=\E[24m, rs1=\E[?3l, sc=\E7, sgr0=\E[m, smacs=^N, - smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}\E[1;%dH, - use=vt220+cvis, + rmul=\E[24m, rs1=\E[?3l, sgr0=\E[m, smacs=^N, smam=\E[?7h, + smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + tbc=\E[3g, tsl=\E[2$~\E[1$}\E[1;%dH, use=ansi+csr, + use=ansi+idl, use=ansi+local, use=vt220+cvis, ######## NON-ANSI TERMINAL EMULATIONS # @@ -13444,27 +13715,28 @@ rbcomm|IBM PC with RBcomm and EMACS keybindings, am, bw, mir, msgr, xenl, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=^L, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^C, cuf1=^B, + cub1=^H, cud1=^C, cuf1=^B, cup=\037%p2%{32}%+%c%p1%{32}%+%c, cuu1=^^, dch1=^W, dl=\E[%p1%dM, dl1=^Z, ech=\E[%p1%dX, ed=^F5, el=^P^P, ht=^I, il=\E[%p1%dL, il1=^K, ind=\ED, invis=\E[8m, is2=\017\035\E(B\E)0\E[?7h\E[?3l\E[>8g, kbs=^H, kcub1=^B, kcud1=^N, kcuf1=^F, kcuu1=^P, khome=^A, nel=\r\ED, - rc=\E8, rep=\030%p1%c%p2%c, rev=^R, ri=\EM, rmcup=, rmdc=, - rmir=^], rmkx=\E>, rmso=^U, rmul=^U, - rs1=\017\E(B\E)0\025\E[?3l\E[>8g, sc=\E7, sgr0=\E[m, - smcup=, smdc=, smir=^\, smkx=\E=, smso=^R, smul=^T, + rep=\030%p1%c%p2%c, rev=^R, ri=\EM, rmcup=, rmdc=, rmir=^], + rmkx=\E>, rmso=^U, rmul=^U, + rs1=\017\E(B\E)0\025\E[?3l\E[>8g, sgr0=\E[m, smcup=, + smdc=, smir=^\, smkx=\E=, smso=^R, smul=^T, use=ansi+csr, use=vt220+cvis, + rbcomm-nam|IBM PC with RBcomm without autowrap, am@, - bel=^G, cr=\r, cud1=\n, ht=^I, ind=\n, - is2=\017\035\E(B\E)0\E[?7l\E[?3l\E[>8g, kbs=^H, - kcub1=^H, kcud1=\n, nel=\r\n, use=rbcomm, + cud1=\n, ind=\n, + is2=\017\035\E(B\E)0\E[?7l\E[?3l\E[>8g, kcub1=^H, + kcud1=\n, nel=\r\n, use=rbcomm, rbcomm-w|IBM PC with RBcomm in 132 column mode, cols#132, - bel=^G, cr=\r, cud1=\n, ht=^I, ind=\n, - is2=\017\035\E(B\E)0\E[?7h\E[?3h\E[>8g, kbs=^H, - kcub1=^H, kcud1=\n, nel=\r\n, use=rbcomm, + cud1=\n, ind=\n, + is2=\017\035\E(B\E)0\E[?7h\E[?3h\E[>8g, kcub1=^H, + kcud1=\n, nel=\r\n, use=rbcomm, ######## LCD DISPLAYS # @@ -13523,20 +13795,18 @@ MtxOrb162|16x2 Matrix Orbital LCD display, att2300|sv80|AT&T 2300 Video Information Terminal 80 column mode, am, eo, mir, msgr, xon, cols#80, it#8, lines#24, - bel=^G, clear=\E[H\E[J, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^H, kcbt=\E[Z, kclr=\E[J, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, + bel=^G, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, el1=\E[1K, home=\E[H, ht=^I, + ich=\E[%p1%d@, ind=\n, kcbt=\E[Z, kclr=\E[J, kdch1=\E[P, kdl1=\E[M, kf1=\E[1r, kf10=\E[10r, kf11=\E[11r, kf12=\E[12r, kf13=\E[13r, kf14=\E[14r, kf15=\E[15r, kf16=\E[16r, kf2=\E[2r, kf3=\E[3r, kf4=\E[4r, kf5=\E[5r, - kf6=\E[6r, kf7=\E[7r, kf8=\E[8r, kf9=\E[9r, khome=\E[H, - kich1=\E[@, kil1=\E[L, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, - rev=\E[7m, rmir=\E[4l, rmso=\E[m, sgr0=\E[m, smir=\E[4h, - smso=\E[7m, + kf6=\E[6r, kf7=\E[7r, kf8=\E[8r, kf9=\E[9r, kich1=\E[@, + kil1=\E[L, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rev=\E[7m, + rmir=\E[4l, rmso=\E[m, sgr0=\E[m, smir=\E[4h, smso=\E[7m, + use=ansi+arrows, use=ansi+cpr, use=ansi+erase, + use=ansi+idl, use=ansi+local, + att2350|AT&T 2350 Video Information Terminal 80 column mode, mc0@, mc4@, mc5@, use=att2300, @@ -13556,11 +13826,10 @@ att5410v1|att4410v1|tty5410v1|AT&T 4410/5410 80 columns - version 1, cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, wsl#80, acsc=++\,\,--..00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyz z{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[2;7m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dim=\E[2m, - dl1=\E[M, ed=\E[J, el=\E[K, fsl=\E8, home=\E[H, ht=^I, - ich1=\E[@, il1=\E[L, ind=\n, invis=\E[8m, is1=\E[?3l\E)0, + bel=^G, bold=\E[2;7m, cr=\r, cub1=^H, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dim=\E[2m, dl1=\E[M, + fsl=\E8, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, ind=\n, + is1=\E[?3l\E)0, is3=\E[1;03q\s\s\sf1\s\s\s\s\s\s\s\s\s\s\s\EOP\E[2;03q\s\s \sf2\s\s\s\s\s\s\s\s\s\s\s\EOQ\E[3;03q\s\s\sf3\s\s\s\s \s\s\s\s\s\s\s\EOR\E[4;03q\s\s\sf4\s\s\s\s\s\s\s\s\s\s @@ -13568,19 +13837,18 @@ att5410v1|att4410v1|tty5410v1|AT&T 4410/5410 80 columns - version 1, \s\s\sf6\s\s\s\s\s\s\s\s\s\s\s\EOU\E[7;03q\s\s\sf7\s\s \s\s\s\s\s\s\s\s\s\EOV\E[8;03q\s\s\sf8\s\s\s\s\s\s\s\s \s\s\s\EOW, - kbs=^H, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, - kf6=\EOU, kf7=\EOV, kf8=\EOW, khome=\E[H, kll=\E[24;1H, - ll=\E[24H, nel=\r\n, + kclr=\E[2J, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, + kf6=\EOU, kf7=\EOV, kf8=\EOW, kll=\E[24;1H, ll=\E[24H, + nel=\r\n, pfx=\E[%p1%1d;%p2%l%2.2dq\s\s\sf%p1%1d\s\s\s\s\s\s\s\s\s\s \s%p2%s, - pln=\E[%p1%d;00q%p2%:-16s, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, - sc=\E7, + pln=\E[%p1%d;00q%p2%:-16s, ri=\EM, rmacs=^O, + rs2=\Ec\E[?3l\E[2;0y, sgr=\E[0%?%p1%p5%|%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smso=\E[7m, smul=\E[4m, - tsl=\E7\E[25;%p1%{1}%+%dH, + sgr0=\E[m\017, smacs=^N, tsl=\E7\E[25;%p1%{1}%+%dH, + use=ansi+arrows, use=ansi+csr, use=ansi+erase, + use=ansi+local1, use=ansi+sgrbold, att4410v1-w|att5410v1-w|tty5410v1-w|AT&T 4410/5410 132 columns - version 1, cols#132, wsl#132, @@ -13602,21 +13870,20 @@ v5410|att5410 in terms of a VT100, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\n, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu1=\E[A$<2>, dch1=\E[P, - dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, - enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ich1=\E[@, - il1=\E[L, ind=\n, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, - rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, - rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - sc=\E7, + clear=\E[H\E[J$<50>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, + cuu1=\E[A$<2>, dch1=\E[P, dl1=\E[M, ed=\E[J$<50>, + el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, + ht=^I, hts=\EH, ich1=\E[@, il1=\E[L, ind=\n, kbs=^H, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, + rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, - use=vt100+fnkeys, + use=ansi+csr, use=decid+cpr, use=vt100+fnkeys, # # Teletype Model 5420 -- A souped up 5410, with multiple windows, @@ -13656,15 +13923,12 @@ v5410|att5410 in terms of a VT100, # when pressed in SYS PF mode. # (att4415: I added / based on the init string -- esr) att4415|tty5420|att5420|AT&T 4415/5420 80 cols, - OTbs, db, mir, xon, - lh#2, lm#78, lw#8, nlab#8, wsl#55, - cbt=\E[Z, clear=\E[x\E[J, cnorm=\E[11;0j, cub=\E[%p1%dD, - cud=\E[%p1%dB, cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dx, - cuu=\E[%p1%dA, cvvis=\E[11;1j, dch=\E[%p1%dP, - dl=\E[%p1%dM, ech=\E[%p1%ds\E[%p1%dD, - flash=\E[?5h$<200>\E[?5l, home=\E[x, - hpa=\E[%p1%{1}%+%dG, hts=\EH, ich=\E[%p1%d@, ich1@, - il=\E[%p1%dL, indn=\E[%p1%dE, is1=\E[?3l$<100>, + db, + lm#78, wsl#55, + clear=\E[x\E[J, cnorm=\E[11;0j, cub1=^H, + cup=\E[%i%p1%d;%p2%dx, cvvis=\E[11;1j, + ech=\E[%p1%ds\E[%p1%dD, flash=\E[?5h$<200>\E[?5l, + home=\E[x, ich1@, indn=\E[%p1%dE, is1=\E[?3l$<100>, is2=\E[m\017\E[1;2;3;4;6l\E[12;13;14;20l\E[?6;97;99l\E[?7h \E[4i\Ex\E[21;1j\212, is3=\E[?5l, kbeg=\Et, kcbt=\E[Z, kdch1=\E[P, kdl1=\E[M, @@ -13676,14 +13940,14 @@ att4415|tty5420|att5420|AT&T 4415/5420 80 cols, mc5=\E[?4i, mrcup=\E[%i%p1%d;%p2%dt, pfx=\E[%p1%d;%p2%l%02dq F%p1%d %p2%s, pln=\E[%p1%d;0;0;0q%p2%:-16.16s, prot=\EV, - rin=\E[%p1%dF, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E[19;0j\E[21;1j\212, rmln=\E|, + rin=\E[%p1%dF, rmam=\E[?7l, rmkx=\E[19;0j\E[21;1j\212, + rmln=\E|, sgr=\E[0%?%p1%p5%|%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%p6%|%t;7%;%?%p7%t;8%;m%?%p8%t\EV%;%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h, - smkx=\E[19;1j\E[21;4j\Eent, smln=\E~, tbc=\E[3g, - tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd, - use=att4410, + sgr0=\E[m\017, smam=\E[?7h, smkx=\E[19;1j\E[21;4j\Eent, + smln=\E~, tsl=\E7\E[25;%p1%{8}%+%dH, use=ansi+idc, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+rca, use=att4410, att4415-w|tty5420-w|att5420-w|AT&T 4415/5420 132 cols, cols#132, lm#54, wsl#97, @@ -13724,40 +13988,38 @@ att4415-w-rv-n|tty5420-w-rv-n|att5420-w-rv-n|AT&T 4415/5420 132 cols reverse wit att5420_2|AT&T 5420 model 2 80 cols, am, db, hs, mir, msgr, xon, - cols#80, it#8, lh#2, lines#24, lm#78, lw#8, nlab#8, wsl#55, + cols#80, lh#2, lines#24, lm#78, lw#8, nlab#8, wsl#55, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - blink=\E[5m, cbt=\E[1Z, clear=\EH\EJ, cnorm=\E[11;0j, - cr=\EG, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A, - cvvis=\E[11;1j, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J, - el=\E[0K, el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8, - home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, - indn=\E[%p1%dE, invis=\E[8m, + cbt=\E[1Z, clear=\EH\EJ, cnorm=\E[11;0j, cr=\EG, cub1=^H, + cud1=\E[1B, cuf1=\E[1C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[1A, cvvis=\E[11;1j, dch=\E[%p1%dP, dch1=\E[P, + ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J, el=\E[0K, el1=\E[1K, + flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H, + hpa=\E[%p1%{1}%+%dG, ich=\E[%p1%d@, ich1=\E[@, ind=\n, + indn=\E[%p1%dE, is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;0j\E[6;0j\E[7;0j \E[8;0j\E[9;1j\E[10;0j\E[15;0j\E[16;1j\E[19;0j\E[20;1j \E[29;0j\E[1;24r, - kbeg=\Et, kbs=^H, kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M, + kbeg=\Et, kcbt=\E[Z, kclr=\E[2J, kdch1=\E[P, kdl1=\E[M, kel=\E[2K, kend=\Ez, kent=\n, kf1=\EOc, kf2=\EOd, kf3=\EOe, - kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, khome=\E[H, + kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kich1=\E[4h, kil1=\E[L, kind=\E[T, kll=\Eu, knp=\E[U, kpp=\E[V, kri=\E[S, lf1=F1, lf2=F2, lf3=F3, lf4=F4, lf5=F5, lf6=F6, lf7=F7, lf8=F8, ll=\Ew, mc0=\E[?;2i, mc4=\E[4i, mc5=\E[5i, mrcup=\E[%i%p1%d;%p2%dt, nel=\r\n, pfx=\E[%p1%d;%p2%l%02dq\s\s\sF%p1%d\s\s\s\s\s\s\s\s\s\s\s%p2 %s\E~, - pln=\E[%p1%d;0;0;0q%p2%:-16.16s\E~, prot=\EV, rc=\E8, - rev=\E[7m, ri=\EM, rin=\E[%p1%dF, rmacs=^O, rmkx=\E[19;0j, - rmln=\E|, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, - sc=\E7, + pln=\E[%p1%d;0;0;0q%p2%:-16.16s\E~, prot=\EV, ri=\EM, + rin=\E[%p1%dF, rmacs=^O, rmkx=\E[19;0j, rmln=\E|, + rs2=\Ec\E[?3l\E[2;0y, sgr=\E[0%?%p1%p5%|%t;2%;%?%p2%p6%|%t;4%;%?%p4%t;5%;%?%p3%p1 %|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;%?%p8%t\EV%;, sgr0=\E[m\017, smacs=^N, smkx=\E[19;1j, smln=\E~, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd, + use=ansi+arrows, use=ansi+csr, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, use=ansi+sgrdim, + use=decid+cpr, + att5420_2-w|AT&T 5420 model 2 in 132 column mode, cols#132, is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;1j\E[6;0j\E[7;0j @@ -13769,20 +14031,20 @@ att4418|att5418|AT&T 5418 80 cols, am, xon, cols#80, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, clear=\E[H\E[2J, cr=\r, cub=\E[%p1%dD, - cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[1P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[0K, home=\E[H, - ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L, ind=\n, - is1=\E[?3l, is2=\E)0\E?6l\E?5l, kclr=\E[%%, kcub1=\E@, - kcud1=\EU, kcuf1=\EA, kcuu1=\ES, kent=\E[, kf1=\E[h, - kf10=\E[m, kf11=\E[n, kf12=\E[o, kf13=\E[H, kf14=\E[I, - kf15=\E[J, kf18=\E[K, kf19=\E[L, kf2=\E[i, kf20=\E[E, - kf21=\E[_, kf22=\E[M, kf23=\E[N, kf24=\E[O, kf3=\E[j, - kf6=\E[k, kf7=\E[l, kf8=\E[f, kf9=\E[w, khome=\Ec, rc=\E8, - rev=\E[7m, rmacs=^O, rmso=\E[m, rmul=\E[m, sc=\E7, - sgr0=\E[m\017, smacs=^N, smso=\E[7m, smul=\E[4m, + bel=^G, blink=\E[5m, clear=\E[H\E[2J, cr=\r, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[1P, + dim=\E[2m, ed=\E[0J, el=\E[0K, home=\E[H, ich=\E[%p1%d@, + ich1=\E[1@, il1=\E[1L, ind=\n, is1=\E[?3l, + is2=\E)0\E?6l\E?5l, kclr=\E[%%, kcub1=\E@, kcud1=\EU, + kcuf1=\EA, kcuu1=\ES, kent=\E[, kf1=\E[h, kf10=\E[m, + kf11=\E[n, kf12=\E[o, kf13=\E[H, kf14=\E[I, kf15=\E[J, + kf18=\E[K, kf19=\E[L, kf2=\E[i, kf20=\E[E, kf21=\E[_, + kf22=\E[M, kf23=\E[N, kf24=\E[O, kf3=\E[j, kf6=\E[k, + kf7=\E[l, kf8=\E[f, kf9=\E[w, khome=\Ec, rc=\E8, rev=\E[7m, + rmacs=^O, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m\017, + smacs=^N, smso=\E[7m, smul=\E[4m, use=ansi+idl, + use=ansi+local, + att4418-w|att5418-w|AT&T 5418 132 cols, cols#132, is1=\E[?3h, use=att5418, @@ -13793,11 +14055,10 @@ att4420|tty4420|Teletype 4420, bel=^G, clear=\EH\EJ, cr=\EG, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\Ez, home=\EH, il1=\EL, ind=\EH\EM\EY7\s, - kcbt=\EO, kclr=\EJ, kcub1=^H, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=\EP, kdl1=\EM, kf0=\EU, kf3=\E@, khome=\EH, - kich1=\E\^, kil1=\EL, kind=\ES, kri=\ET, + kcbt=\EO, kclr=\EJ, kcub1=^H, kdch1=\EP, kdl1=\EM, kf0=\EU, + kf3=\E@, khome=\EH, kich1=\E\^, kil1=\EL, kind=\ES, kri=\ET, lf0=segment advance, lf3=cursor tab, rmdc@, rmso=\E~, - rmul=\EZ, smdc@, smso=\E}, smul=\E\\, + rmul=\EZ, smdc@, smso=\E}, smul=\E\\, use=vt52+arrows, # The following is a terminfo entry for the Teletype 4424 # asynchronous keyboard-display terminal. It supports @@ -13819,20 +14080,17 @@ att4424|tty4424|Teletype 4424, cols#80, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E3, bold=\E3, cbt=\EO, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\EB, cuf=\E[%p1%dC, cuf1=\EC, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EA, - dch=\E[%p1%dP, dch1=\EP, dim=\EW, dl=\E[%p1%dM, dl1=\EM, - ed=\EJ, el=\Ez, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - ich1=\E\^, il=\E[%p1%dL, il1=\EL, ind=\n, is2=\E[20l\E[?7h, - kbs=^H, kclr=\EJ, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - khome=\E[H, nel=\EE, rev=\E}, ri=\ET, rmacs=\E(B, rmso=\E~, - rmul=\EZ, + csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\EB, cuf1=\EC, + cup=\E[%i%p1%d;%p2%dH, cuu1=\EA, dch=\E[%p1%dP, dch1=\EP, + dim=\EW, dl=\E[%p1%dM, dl1=\EM, ed=\EJ, el=\Ez, home=\E[H, + ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E\^, il=\E[%p1%dL, + il1=\EL, ind=\n, is2=\E[20l\E[?7h, kclr=\EJ, kf1=\EOP, + kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\EE, rev=\E}, ri=\ET, + rmacs=\E(B, rmso=\E~, rmul=\EZ, sgr=\EX\E~\EZ\E4\E(B%?%p1%p3%|%t\E}%;%?%p2%t\E\\%;%?%p4%p6%| %t\E3%;%?%p5%t\EW%;%?%p9%t\E(0%;, sgr0=\EX\E~\EZ\E4\E(B, smacs=\E(0, smso=\E}, smul=\E\\, - tbc=\EF, + tbc=\EF, use=ansi+arrows, use=ansi+local, att4424-1|tty4424-1|Teletype 4424 in display function group I, kclr@, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome@, @@ -13850,10 +14108,9 @@ att4424m|tty4424m|Teletype 4424M, bel=^G, clear=\E[2;H\E[J, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH\E[B, cuu1=\E[A, dch1=\EP, dl1=\EM, el=\E[K, ht=^I, ich1=\E\^, il1=\EL, ind=\n, ip=$<2/>, - is2=\E[m\E[2;24r, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, khome=\E[H, nel=\r\n, ri=\ET, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smso=\E[7m, smul=\E[4m, + is2=\E[m\E[2;24r, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + nel=\r\n, ri=\ET, rmso=\E[m, rmul=\E[m, sgr0=\E[m, + smso=\E[7m, smul=\E[4m, use=ansi+arrows, # The Teletype 5425 is really version 2 of the Teletype 5420. It # is quite similar, except for some minor differences. No page @@ -13865,41 +14122,33 @@ att4424m|tty4424m|Teletype 4424M, # # (att5425: added / based on the init string -- esr) att5425|tty5425|att4425|AT&T 4425/5425, - am, da, db, hs, mir, msgr, xenl, xon, - cols#80, it#8, lh#2, lines#24, lm#78, lw#8, nlab#8, wsl#55, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z, - clear=\E[H\E[J, cnorm=\E[12;0j, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[12;1j, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[J, - el=\E[K, el1=\E[1K, enacs=\E(B\E)0, - flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H, - hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, indn=\E[%p1%dE, - invis=\E[8m, is1=\E<\E[?3l$<100>, + da, db, hs, mir, xenl, xon, + lh#2, lm#78, lw#8, nlab#8, wsl#55, + bold=\E[2;7m, cnorm=\E[12;0j, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E[12;1j, dch=\E[%p1%dP, + dch1=\E[P, dim=\E[2m, ech=\E[%p1%ds\E[%p1%dD, el1=\E[1K, + flash=\E[?5h$<200>\E[?5l, fsl=\E8, hpa=\E[%p1%{1}%+%dG, + ich=\E[%p1%d@, indn=\E[%p1%dE, is1=\E<\E[?3l$<100>, is2=\E[m\017\E[1;2;3;4;6l\E[12;13;14;20l\E[?6;97;99l\E[?7h \E[4i\Ex\E[25;1j\212, - is3=\E[?5l, kbeg=\Et, kbs=^H, kcbt=\E[Z, kclr=\E[J, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, + is3=\E[?5l, kbeg=\Et, kcbt=\E[Z, kclr=\E[J, kdch1=\E[P, kdl1=\E[M, kel=\E[2K, kend=\Ez, kent=\Eent, kf1=\EOc, kf2=\EOd, kf3=\EOe, kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, - kf8=\EOj, khome=\E[H, kich1=\E[4h, kil1=\E[L, kind=\E[T, - kri=\E[S, ll=\E[24H, mc0=\E[?2i, mc4=\E[?9i, mc5=\E[?4i, - nel=\r\n, + kf8=\EOj, kich1=\E[4h, kil1=\E[L, kind=\E[T, kri=\E[S, + ll=\E[24H, mc0=\E[?2i, mc4=\E[?9i, mc5=\E[?4i, nel=\r\n, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, - pln=\E[%p1%d;0;0;0q%p2%:-16.16s, prot=\EV, rc=\E8, - rev=\E[7m, ri=\EM, rin=\E[%p1%dF, rmacs=^O, rmam=\E[?7l, - rmir=\E[4l, rmkx=\E[21;0j\E[25;1j\212, rmln=\E|, - rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, sc=\E7, + pln=\E[%p1%d;0;0;0q%p2%:-16.16s, prot=\EV, ri=\EM, + rin=\E[%p1%dF, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E[21;0j\E[25;1j\212, rmln=\E|, + rs2=\Ec\E[?3l\E[2;0y, sgr=\E[0%?%p5%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6 %|%t;7%;%?%p7%t;8%;m%?%p8%t\EV%;%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smkx=\E[21;1j\E[25;4j\Eent\E~, smln=\E~, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, tsl=\E7\E[25;%p1%{8}%+%dH, - vpa=\E[%p1%{1}%+%dd, + sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h, + smkx=\E[21;1j\E[25;4j\Eent\E~, smln=\E~, + tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd, + use=ansi+arrows, use=ansi+csr, use=ansi+erase, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+sgrbold, use=decid+cpr, use=vt100+4bsd, att5425-nl|tty5425-nl|att4425-nl|AT&T 4425/5425 80 columns no labels, smkx=\E[21;1j\E[25;4j\Eent, use=att4425, @@ -13915,20 +14164,17 @@ att4426|tty4426|Teletype 4426S, cols#80, lines#24, lm#48, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[5m, clear=\E[H\E[2J\E[1U\E[H\E[2J\E[1V, - cr=\r, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EP, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[0K, home=\E[H, - hpa=\E[%p1%dG, ht=^I, hts=\E1, ich=\E[%p1%d@, ich1=\E\^, - il=\E[%p1%dL, il1=\EL, ind=\n, is1=\Ec\E[?7h, - is2=\E[m\E[1;24r, kbs=^H, kcbt=\EO, kclr=\E[2J, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf1=\EOP, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, - khome=\E[H, kll=\E[24;1H, ll=\E[24H, nel=\r\n, rc=\E8, - rev=\E[7m, ri=\ET, rmacs=\E(B, rmam=\E[?7l, rmso=\E[m, - rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, sc=\E7, sgr0=\E[m\E(B, - smacs=\E(0, smam=\E[?7h, smso=\E[5m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%p1%dd, use=ecma+index, + cr=\r, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\EP, + ed=\E[J, el=\E[0K, home=\E[H, hpa=\E[%p1%dG, ht=^I, hts=\E1, + ich=\E[%p1%d@, ich1=\E\^, il1=\EL, ind=\n, is1=\Ec\E[?7h, + is2=\E[m\E[1;24r, kbs=^H, kcbt=\EO, kclr=\E[2J, kf1=\EOP, + kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, + kf8=\EOW, khome=\E[H, kll=\E[24;1H, ll=\E[24H, nel=\r\n, + rc=\E8, rev=\E[7m, ri=\ET, rmacs=\E(B, rmam=\E[?7l, + rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, sc=\E7, + sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smso=\E[5m, + smul=\E[4m, tbc=\E[3g, vpa=\E[%p1%dd, use=ansi+idl, + use=ansi+local, use=ecma+index, use=vt52+arrows, # Terminfo entry for the AT&T 510 A Personal Terminal # Function keys 9 - 16 are available only after the @@ -13942,26 +14188,25 @@ att510a|bct510a|AT&T 510A Personal Terminal, am, mir, msgr, xenl, xon, cols#80, lh#2, lines#24, lw#7, nlab#8, acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z, - civis=\E[11;0|, clear=\E[H\E[J, cnorm=\E[11;3|, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP, - dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, - el=\E[0K, el1=\E[1K, enacs=\E(B\E)1, ff=^L, home=\E[H, ht=^I, - hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=\n, is1=\E(B\E)1\E[2l, - is3=\E[21;1|\212, kLFT=\E[u, kRIT=\E[v, kbs=^H, kcbt=\E[Z, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOm, - kf10=\EOd, kf11=\EOe, kf12=\EOf, kf13=\EOg, kf14=\EOh, - kf15=\EOi, kf16=\EOj, kf2=\EOV, kf3=\EOu, kf4=\ENj, kf5=\ENe, - kf6=\ENf, kf7=\ENh, kf8=\E[H, kf9=\EOc, kind=\E[S, kri=\E[T, - mc0=\E[0i, mc4=\E[?8i, mc5=\E[?4i, nel=\EE, - pln=\E[%p1%dp%p2%:-16s, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmkx=\E[19;0|, rmso=\E[m, rmul=\E[m, sc=\E7, + bel=^G, blink=\E[5m, bold=\E[2;7m, civis=\E[11;0|, + clear=\E[H\E[J, cnorm=\E[11;3|, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E[11;2|, dch=\E[%p1%dP, + dch1=\E[P, dim=\E[2m, ed=\E[0J, el=\E[0K, el1=\E[1K, + enacs=\E(B\E)1, ff=^L, home=\E[H, ind=\n, + is1=\E(B\E)1\E[2l, is3=\E[21;1|\212, kLFT=\E[u, + kRIT=\E[v, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kf1=\EOm, kf10=\EOd, kf11=\EOe, + kf12=\EOf, kf13=\EOg, kf14=\EOh, kf15=\EOi, kf16=\EOj, + kf2=\EOV, kf3=\EOu, kf4=\ENj, kf5=\ENe, kf6=\ENf, kf7=\ENh, + kf8=\E[H, kf9=\EOc, kind=\E[S, kri=\E[T, mc0=\E[0i, + mc4=\E[?8i, mc5=\E[?4i, nel=\EE, pln=\E[%p1%dp%p2%:-16s, + rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmkx=\E[19;0|, + rmso=\E[m, rmul=\E[m, sc=\E7, sgr=\E[0%?%p5%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6 %|%t;7%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smkx=\E[19;1|, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, + smul=\E[4m, use=ansi+cpr, use=ansi+idl, use=ansi+local, + use=ansi+tabs, # Terminfo entry for the AT&T 510 D Personal Terminal # Function keys 9 through 16 are accessed by bringing up the @@ -13976,15 +14221,11 @@ att510d|bct510d|AT&T 510D Personal Terminal, am, da, db, mir, msgr, xenl, xon, cols#80, lh#2, lines#24, lm#48, lw#7, nlab#8, acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z, - clear=\E[H\E[J, cnorm=\E[11;3|, cr=\r, cub=\E[%p1%dD, - cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP, dch1=\E[P, - dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[0K, + bel=^G, bold=\E[2;7m, clear=\E[H\E[J, cnorm=\E[11;3|, + cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[11;2|, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ed=\E[0J, el=\E[0K, el1=\E[1K, enacs=\E(B\E)1, ff=^L, home=\E[H, - hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, + hpa=\E[%p1%{1}%+%dG, ich=\E[%p1%d@, ind=\n, is1=\E(B\E)1\E[5;0|, is3=\E[21;1|\212, kLFT=\E[u, kRIT=\E[v, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOm, kf10=\EOd, kf11=\EOe, @@ -13992,44 +14233,40 @@ att510d|bct510d|AT&T 510D Personal Terminal, kf2=\EOV, kf3=\EOu, kf4=\ENj, kf5=\ENe, kf6=\ENf, kf7=\ENh, kf8=\E[H, kf9=\EOc, kind=\E[S, kri=\E[T, ll=\E#2, mc0=\E[0i, mc4=\E[?8i, mc5=\E[?4i, mgc=\E:, nel=\EE, - pln=\E[%p1%dp%p2%:-16s, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmir=\E[4l, rmkx=\E[19;0|, rmln=\E<, rmso=\E[m, - rmul=\E[m, rmxon=\E[29;1|, rs2=\E[5;0|, sc=\E7, + pln=\E[%p1%dp%p2%:-16s, rc=\E8, ri=\EM, rmacs=^O, + rmir=\E[4l, rmkx=\E[19;0|, rmln=\E<, rmxon=\E[29;1|, + rs2=\E[5;0|, sc=\E7, sgr=\E[0%?%p5%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6 %|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smgl=\E4, smgr=\E5, smir=\E[4h, - smkx=\E[19;1|, smln=\E?, smso=\E[7m, smul=\E[4m, - smxon=\E[29;0|, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, - use=ansi+rep, use=ecma+index, + smkx=\E[19;1|, smln=\E?, smxon=\E[29;0|, + vpa=\E[%p1%{1}%+%dd, use=ansi+cpr, use=ansi+idl, + use=ansi+local, use=ansi+rep, use=ansi+sgrbold, + use=ansi+tabs, use=ecma+index, # (att500: I merged this with the att513 entry, att500 just used att513 -- esr) att500|att513|AT&T 513 using page mode, am, chts, mir, msgr, xenl, xon, cols#80, lh#2, lines#24, lw#8, nlab#8, acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z, - clear=\E[H\E[J, cnorm=\E[11;0|, cr=\r, - csr=%i\E[%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[11;1|, dch=\E[%p1%dP, dch1=\E[P$<1>, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)1, home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=^I, - hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, - indn=\E[%p1%dE, invis=\E[8m, + bel=^G, bold=\E[2;7m, cnorm=\E[11;0|, cr=\r, + csr=%i\E[%p1%d;%p2%dr, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E[11;1|, dch=\E[%p1%dP, + dch1=\E[P$<1>, dim=\E[2m, el1=\E[1K, enacs=\E(B\E)1, + home=\E[H, hpa=\E[%p1%{1}%+%dG, ich=\E[%p1%d@, ind=\n, + indn=\E[%p1%dE, is1=\E?\E[3;3|\E[10;0|\E[21;1|\212\E[6;1|\E[1{\E[?99l, kBEG=\ENB, kCAN=\EOW, kCMD=\EOU, kCPY=\END, kCRT=\EON, kDC=\ENF, kDL=\ENE, kEND=\ENN, kEOL=\EOA, kEXT=\EOK, kFND=\EOX, kHLP=\EOM, kHOM=\ENM, kIC=\ENJ, kLFT=\ENK, kMOV=\ENC, kMSG=\EOL, kNXT=\ENH, kOPT=\EOR, kPRT=\EOZ, kPRV=\ENG, kRDO=\EOT, kRES=\EOQ, kRIT=\ENL, kRPL=\EOY, - kSAV=\EOO, kSPD=\EOP, kUND=\EOS, kbeg=\E9, kbs=^H, kcan=\EOw, + kSAV=\EOO, kSPD=\EOP, kUND=\EOS, kbeg=\E9, kcan=\EOw, kcbt=\E[Z, kclo=\EOV, kclr=\E[J, kcmd=\EOu, kcpy=\ENd, - kcrt=\EOn, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\ENf, kdl1=\ENe, kel=\EOa, kend=\E0, kent=\Eent, - kext=\EOk, kf1=\EOc, kf2=\EOd, kf3=\EOe, kf4=\EOf, kf5=\EOg, - kf6=\EOh, kf7=\EOi, kf8=\EOj, kfnd=\EOx, khlp=\EOm, - khome=\E[H, kich1=\ENj, kind=\E[S, kmov=\ENc, kmrk=\ENi, + kcrt=\EOn, kdch1=\ENf, kdl1=\ENe, kel=\EOa, kend=\E0, + kent=\Eent, kext=\EOk, kf1=\EOc, kf2=\EOd, kf3=\EOe, + kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kfnd=\EOx, + khlp=\EOm, kich1=\ENj, kind=\E[S, kmov=\ENc, kmrk=\ENi, kmsg=\EOl, knp=\E[U, knxt=\ENh, kopn=\EOv, kopt=\EOr, kpp=\E[V, kprt=\EOz, kprv=\ENg, krdo=\EOt, kref=\EOb, kres=\EOq, krfr=\ENa, kri=\E[T, krpl=\EOy, krst=\EOB, @@ -14041,20 +14278,21 @@ att500|att513|AT&T 513 using page mode, pfloc=\E[%p1%d;%p2%l%d;2;0p\s\s\sF%p1%d\s\s\s\s\s\s\s\s\s\s \s%p2%s, pfx=\E[%p1%d;%p2%l%d;1;0p F%p1%d %p2%s, - pln=\E[%p1%dp%p2%:-16s, rc=\E8, rev=\E[7m, ri=\EM, - rin=\E[%p1%dF, rmacs=^O, rmir=\E[4l, - rmkx=\E[19;0|\E[21;1|\212, rmln=\E<, rmso=\E[m, - rmul=\E[m, + pln=\E[%p1%dp%p2%:-16s, rc=\E8, ri=\EM, rin=\E[%p1%dF, + rmacs=^O, rmir=\E[4l, rmkx=\E[19;0|\E[21;1|\212, + rmln=\E<, rs1=\E?\E[3;3|\E[10;0|\E[21;1|\212\E[6;1|\E[1{\E[?99l\E[2;0| \E[6;1|\E[8;0|\E[19;0|\E[1{\E[?99l, rs2=\E[5;0|, sc=\E7, sgr=\E[0%?%p1%p5%|%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smir=\E[4h, - smkx=\E[19;1|\E[21;4|\Eent, smln=\E?, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, use=ansi+rep, + smkx=\E[19;1|\E[21;4|\Eent, smln=\E?, + vpa=\E[%p1%{1}%+%dd, use=ansi+arrows, use=ansi+erase, + use=ansi+idl, use=ansi+local, use=ansi+rep, + use=ansi+sgrbold, use=ansi+tabs, use=decid+cpr, -# 01-07-88 +# 01-07-88: # printer must be set to EMUL ANSI to accept ESC codes # stops at top margin # sets cpi 10,lpi 6,form 66,left 1,right 132,top 1,bottom 66,font @@ -14102,13 +14340,12 @@ att5310|att5320|AT&T Model 53210 or 5320 matrix printer, att5620-1|tty5620-1|dmd1|Teletype 5620 with old ROMs, am, xon, cols#88, it#8, lines#70, vt#3, - bel=^G, clear=\E[H\E[J, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, - dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\n, kbs=^H, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kll=\E[70;1H, nel=\r\n, - rc=\E8, ri=\E[T, rs1=\Ec, sc=\E7, use=ecma+index, + bel=^G, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, home=\E[H, ht=^I, ich=\E[%p1%d@, + ich1=\E[@, ind=\n, kclr=\E[2J, kll=\E[70;1H, nel=\r\n, + rc=\E8, ri=\E[T, rs1=\Ec, sc=\E7, use=ansi+arrows, + use=ansi+erase, use=ansi+idl, use=ansi+local1, + use=ecma+index, # 5620 terminfo (2.0 or later ROMS with char attributes) # The following SET-UP modes are assumed for normal operation: @@ -14125,16 +14362,15 @@ att5620-1|tty5620-1|dmd1|Teletype 5620 with old ROMs, att5620|dmd|tty5620|ttydmd|5620|AT&T 5620 terminal 88 columns, OTbs, am, msgr, npc, xon, cols#88, it#8, lines#70, - bel=^G, bold=\E[2m, clear=\E[H\E[J, cr=\r, cub1=^H, - cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, kbs=^H, - kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - khome=\E[H, kll=\E[70;1H, nel=\n, - pfx=\E[%p1%d;%p2%l%dq%p2%s, rc=\E8, rev=\E[7m, ri=\E[T, - rmso=\E[0m, rmul=\E[0m, rs1=\Ec, sc=\E7, sgr0=\E[0m, - smso=\E[7m, smul=\E[4m, use=ecma+index, + bel=^G, bold=\E[2m, cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, home=\E[H, ht=^I, + ich=\E[%p1%d@, ich1=\E[@, ind=\E[S, kclr=\E[2J, + kll=\E[70;1H, nel=\n, pfx=\E[%p1%d;%p2%l%dq%p2%s, rc=\E8, + rev=\E[7m, ri=\E[T, rmso=\E[0m, rmul=\E[0m, rs1=\Ec, sc=\E7, + sgr0=\E[0m, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+erase, use=ansi+idl, use=ansi+local1, + use=ecma+index, + att5620-24|tty5620-24|dmd-24|Teletype dmd 5620 in a 24x80 layer, lines#24, use=att5620, att5620-34|tty5620-34|dmd-34|Teletype dmd 5620 in a 34x80 layer, @@ -14145,9 +14381,8 @@ att5620-s|tty5620-s|layer|vitty|AT&T 5620 S layer, cols#80, it#8, lines#72, bel=^G, clear=^L, cr=\r, cub1=^H, cud1=\n, cup=\EY%p2%{32}%+%c%p1%{32}%+%c, cuu1=^K, dl1=\ED, - el=\EK, flash=\E^G, ht=^I, il1=\EI, ind=\n, kbs=^H, kclr=\E[2J, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, - kll=\E[70;1H, + el=\EK, flash=\E^G, ht=^I, il1=\EI, ind=\n, kclr=\E[2J, + khome=\E[H, kll=\E[70;1H, use=ansi+arrows, # Entries for thru refer to the shifted system pf keys. # @@ -14157,15 +14392,11 @@ att605|AT&T 605 80 column 102key keyboard, am, eo, xon, cols#80, lines#24, lw#8, nlab#8, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, - dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, fsl=\E8, ht=^I, ich=\E[%p1%d@, ich1=\E[@, - il1=\E[L, ind=\n, invis=\E[8m, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, + el1=\E[1K, fsl=\E8, ht=^I, il1=\E[L, ind=\n, invis=\E[8m, is1=\E[8;0|\E[?\E[13;20l\E[?\E[12h, is2=\E[m\017, - kLFT=\E[ A, kRIT=\E[ @, kbs=^H, kcbt=\E[Z, kclr=\E[2J, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, + kLFT=\E[ A, kRIT=\E[ @, kcbt=\E[Z, kclr=\E[2J, kdch1=\E[P, kdl1=\E[M, kend=\E[24;1H, kf1=\EOc, kf10=\ENp, kf11=\ENq, kf12=\ENr, kf13=\ENs, kf14=\ENt, kf15=\EOC, kf16=\EOD, kf17=\EOE, kf18=\EOF, kf19=\EOG, kf2=\EOd, kf20=\EOH, @@ -14175,26 +14406,24 @@ att605|AT&T 605 80 column 102key keyboard, kf35=\EOy, kf36=\EOm, kf37=\EOt, kf38=\EOu, kf39=\EOv, kf4=\EOf, kf40=\EOl, kf41=\EOq, kf42=\EOr, kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, kf5=\EOg, kf6=\EOh, - kf7=\EOi, kf8=\EOj, kf9=\ENo, khome=\E[H, kich1=\E[@, - kil1=\E[L, kind=\E[S, knp=\E[U, kpp=\E[V, ll=\E[24H, - mc4=\E[?4i, mc5=\E[?5i, nel=\EE, + kf7=\EOi, kf8=\EOj, kf9=\ENo, kich1=\E[@, kil1=\E[L, + kind=\E[S, knp=\E[U, kpp=\E[V, ll=\E[24H, mc4=\E[?4i, + mc5=\E[?5i, nel=\EE, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, pln=\E[%p1%d;0;0;0q%p2%:-16.16s, rc=\E8, rev=\E[7m, - rmacs=^O, rmir=\E[4l, rmln=\E[2p, rmso=\E[m, rmul=\E[m, - rs2=\Ec\E[?3l, sc=\E7, sgr0=\E[m\017, smacs=\E)0\016, - smir=\E[4h, smln=\E[p, smso=\E[7m, smul=\E[4m, - tsl=\E7\E[25;%i%p1%dx, + rmacs=^O, rmln=\E[2p, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l, + sc=\E7, sgr0=\E[m\017, smacs=\E)0\016, smln=\E[p, + smso=\E[7m, smul=\E[4m, tsl=\E7\E[25;%i%p1%dx, + use=ansi+arrows, use=ansi+cpr, use=ansi+erase, + use=ansi+idc, use=ansi+local1, + att605-pc|AT&T 605 in pc term mode, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x \263, - cbt=\E[Z, cub1=\E[D, cud1=\E[B, cuf1=\E[C, cuu1=\E[A, - dch1=\E[P, dl1=\E[M, ich1=\E[@, il1=\E[L, kcbt=\E[Z, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, - kdl1=\E[M, kend=\E[F, kf1=\E[M, kf10=\E[V, kf2=\E[N, + cub1=\E[D, kend=\E[F, kf1=\E[M, kf10=\E[V, kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, - kf9=\E[U, khome=\E[H, kich1=\E[@, knp=\E[G, kpp=\E[I, - rmsc=\E[50;0|$<400>, smsc=\E[?11l\E[50;1|$<250>, - xoffc=g, xonc=e, use=att605, + kf9=\E[U, knp=\E[G, kpp=\E[I, rmsc=\E[50;0|$<400>, + smsc=\E[?11l\E[50;1|$<250>, xoffc=g, xonc=e, use=att605, att605-w|AT&T 605-w 132 column 102 key keyboard, cols#132, wsl#132, is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h\E(B\E)0, use=att605, @@ -14206,32 +14435,28 @@ att610|AT&T 610; 80 column; 98key keyboard, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H, ht=^I, - ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, - invis=\E[8m, + bel=^G, cbt=\E[Z, cr=\r, cub1=^H, cvvis=\E[?12;25h, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, el1=\E[1K, + flash=\E[?5h$<200>\E[?5l, fsl=\E8, ht=^I, ich=\E[%p1%d@, + ind=\ED, is1=\E[8;0|\E[?3;4;5;13;15l\E[13;20l\E[?7h\E[12h\E(B\E)0, - is2=\E[m\017, is3=\E(B\E)0, kLFT=\E[ @, kRIT=\E[ A, kbs=^H, - kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOc, kf10=\ENp, kf11=\ENq, kf12=\ENr, - kf13=\ENs, kf14=\ENt, kf2=\EOd, kf3=\EOe, kf4=\EOf, kf5=\EOg, - kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\ENo, khome=\E[H, + is2=\E[m\017, is3=\E(B\E)0, kLFT=\E[ @, kRIT=\E[ A, + kcbt=\E[Z, kclr=\E[2J, kf1=\EOc, kf10=\ENp, kf11=\ENq, + kf12=\ENr, kf13=\ENs, kf14=\ENt, kf2=\EOd, kf3=\EOe, + kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\ENo, kind=\E[S, kri=\E[T, ll=\E[24H, mc4=\E[?4i, mc5=\E[?5i, nel=\EE, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, - pln=\E[%p1%d;0;0;0q%p2%:-16.16s, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmln=\E[2p, - rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l, sc=\E7, + pln=\E[%p1%d;0;0;0q%p2%:-16.16s, ri=\EM, rmacs=^O, + rmam=\E[?7l, rmir=\E[4l, rmln=\E[2p, rs2=\Ec\E[?3l, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smln=\E[p, smso=\E[7m, smul=\E[4m, tsl=\E7\E[25;%i%p1%dx, - use=ecma+index, use=att610+cvis0, + smln=\E[p, tsl=\E7\E[25;%i%p1%dx, use=ansi+arrows, + use=ansi+csr, use=ansi+cup, use=ansi+erase, use=ansi+idl, + use=ansi+local, use=ansi+sgrbold, use=decid+cpr, + use=ecma+index, use=att610+cvis, + att610-w|AT&T 610; 132 column; 98key keyboard, cols#132, wsl#132, is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, @@ -14281,39 +14506,36 @@ att620|AT&T 620; 80 column; 98key keyboard, am, eslok, hs, mir, msgr, xenl, xon, cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H, ht=^I, - ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, - invis=\E[8m, + bel=^G, cbt=\E[Z, cr=\r, cub1=^H, cvvis=\E[?12;25h, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, el1=\E[1K, + flash=\E[?5h$<200>\E[?5l, fsl=\E8, ht=^I, ich=\E[%p1%d@, + ind=\ED, is1=\E[8;0|\E[?3;4;5;13;15l\E[13;20l\E[?7h\E[12h, - is2=\E[m\017, is3=\E(B\E)0, kLFT=\E[ A, kRIT=\E[ @, kbs=^H, - kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOc, kf10=\ENp, kf11=\ENq, kf12=\ENr, - kf13=\ENs, kf14=\ENt, kf15=\EOC, kf16=\EOD, kf17=\EOE, - kf18=\EOF, kf19=\EOG, kf2=\EOd, kf20=\EOH, kf21=\EOI, - kf22=\EOJ, kf23=\ENO, kf24=\ENP, kf25=\ENQ, kf26=\ENR, - kf27=\ENS, kf28=\ENT, kf29=\EOP, kf3=\EOe, kf30=\EOQ, - kf31=\EOR, kf32=\EOS, kf33=\EOw, kf34=\EOx, kf35=\EOy, - kf36=\EOm, kf37=\EOt, kf38=\EOu, kf39=\EOv, kf4=\EOf, - kf40=\EOl, kf41=\EOq, kf42=\EOr, kf43=\EOs, kf44=\EOp, - kf45=\EOn, kf46=\EOM, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, - kf9=\ENo, khome=\E[H, kind=\E[S, kri=\E[T, ll=\E[24H, + is2=\E[m\017, is3=\E(B\E)0, kLFT=\E[ A, kRIT=\E[ @, + kcbt=\E[Z, kclr=\E[2J, kf1=\EOc, kf10=\ENp, kf11=\ENq, + kf12=\ENr, kf13=\ENs, kf14=\ENt, kf15=\EOC, kf16=\EOD, + kf17=\EOE, kf18=\EOF, kf19=\EOG, kf2=\EOd, kf20=\EOH, + kf21=\EOI, kf22=\EOJ, kf23=\ENO, kf24=\ENP, kf25=\ENQ, + kf26=\ENR, kf27=\ENS, kf28=\ENT, kf29=\EOP, kf3=\EOe, + kf30=\EOQ, kf31=\EOR, kf32=\EOS, kf33=\EOw, kf34=\EOx, + kf35=\EOy, kf36=\EOm, kf37=\EOt, kf38=\EOu, kf39=\EOv, + kf4=\EOf, kf40=\EOl, kf41=\EOq, kf42=\EOr, kf43=\EOs, + kf44=\EOp, kf45=\EOn, kf46=\EOM, kf5=\EOg, kf6=\EOh, + kf7=\EOi, kf8=\EOj, kf9=\ENo, kind=\E[S, kri=\E[T, ll=\E[24H, mc4=\E[?4i, mc5=\E[?5i, nel=\EE, pfx=\E[%p1%d;%p2%l%02dq F%p1%1d %p2%s, - pln=\E[%p1%d;0;0;0q%p2%:-16.16s, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=\E(B\017, rmam=\E[?7l, rmir=\E[4l, - rmln=\E[2p, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l, sc=\E7, + pln=\E[%p1%d;0;0;0q%p2%:-16.16s, ri=\EM, + rmacs=\E(B\017, rmam=\E[?7l, rmir=\E[4l, rmln=\E[2p, + rs2=\Ec\E[?3l, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%t;7%;%?%p7%t;8%;m%?%p9%t\E)0\016%e\E(B\017%;, sgr0=\E[m\E(B\017, smacs=\E)0\016, smam=\E[?7h, - smir=\E[4h, smln=\E[p, smso=\E[7m, smul=\E[4m, - tsl=\E7\E[25;%i%p1%dx, use=ecma+index, - use=att610+cvis0, + smir=\E[4h, smln=\E[p, tsl=\E7\E[25;%i%p1%dx, + use=ansi+arrows, use=ansi+csr, use=ansi+cup, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ansi+sgrbold, use=decid+cpr, use=ecma+index, + use=att610+cvis, + att620-w|AT&T 620; 132 column; 98key keyboard, cols#132, wsl#132, is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, @@ -14354,25 +14576,22 @@ att620-103k-w|AT&T 620; 132 column; 103key keyboard, att630|AT&T 630 windowing terminal, OTbs, am, da, db, mir, msgr, npc, xon, cols#80, it#8, lines#60, lm#0, - bel=^G, blink=\E[5m, cbt=\E[Z, clear=\E[H\E[J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, - el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=\ED, is2=\E[m, kbs=^H, kcbt=\E[Z, - kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[P, kdl1=\E[M, kent=\r, kf10=\ENp, kf11=\ENq, - kf12=\ENr, kf13=\ENs, kf14=\ENt, kf15=\ENu, kf16=\ENv, - kf17=\ENw, kf18=\ENx, kf19=\ENy, kf20=\ENz, kf21=\EN{, - kf22=\EN|, kf23=\EN}, kf24=\EN~, kf9=\ENo, khome=\E[H, - kich1=\E[@, kil1=\E[L, mc4=\E[?4i, mc5=\E[?5i, nel=\r\n, + bel=^G, blink=\E[5m, cbt=\E[Z, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dim=\E[2m, el1=\E[1K, home=\E[H, + ht=^I, ind=\ED, is2=\E[m, kcbt=\E[Z, kclr=\E[2J, kdch1=\E[P, + kdl1=\E[M, kent=\r, kf10=\ENp, kf11=\ENq, kf12=\ENr, + kf13=\ENs, kf14=\ENt, kf15=\ENu, kf16=\ENv, kf17=\ENw, + kf18=\ENx, kf19=\ENy, kf20=\ENz, kf21=\EN{, kf22=\EN|, + kf23=\EN}, kf24=\EN~, kf9=\ENo, kich1=\E[@, kil1=\E[L, + mc4=\E[?4i, mc5=\E[?5i, nel=\r\n, pfx=\E[%p1%d;%p2%l%dq%p2%s, rc=\E8, rev=\E[7m, ri=\EM, - rmir=\E[4l, rmso=\E[m, rmul=\E[m, rs2=\Ec, sc=\E7, + rmso=\E[m, rmul=\E[m, rs2=\Ec, sc=\E7, sgr=\E[0%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%p4%|%t;7 %;m, - sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m, - use=ecma+index, + sgr0=\E[m, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+cpr, use=ansi+erase, use=ansi+idc, use=ansi+idl, + use=ansi+local, use=ecma+index, + att630-24|5630-24|5630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines, lines#24, use=att630, @@ -14455,44 +14674,39 @@ att630-24|5630-24|5630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines, # att700|AT&T 700 24x80 column display w/102key keyboard, am, eslok, hs, mir, msgr, xenl, xon, - cols#80, it#8, lh#2, lines#24, lw#8, nlab#8, wsl#80, + cols#80, lh#2, lines#24, lw#8, nlab#8, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + bel=^G, cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)0, flash=\E[?5h$<200>\E[?5l, fln=4\,4, - fsl=\E8, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - il=\E[%p1%dL, il1=\E[L, ind=\ED, invis=\E[8m, + el1=\E[1K, enacs=\E(B\E)0, flash=\E[?5h$<200>\E[?5l, + fln=4\,4, fsl=\E8, home=\E[H, ich=\E[%p1%d@, ind=\ED, is2=\E[50;4|\E[53;0|\E[8;0|\E[?4;13;15l\E[13;20l\E[?7h\E[12h \E(B\E)0\E[?31l\E[0m\017, - is3=\E(B\E)0, kLFT=\E[ A, kRIT=\E[ @, kbs=^H, kcbt=\E[Z, - kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[P, kdl1=\E[M, kend=\E[24;1H, kf1=\EOc, kf10=\ENp, - kf11=\ENq, kf12=\ENr, kf13=\ENs, kf14=\ENt, kf15=\EOC, - kf16=\EOD, kf17=\EOE, kf18=\EOF, kf19=\EOG, kf2=\EOd, - kf20=\EOH, kf21=\EOI, kf22=\EOJ, kf23=\ENO, kf24=\ENP, - kf25=\ENQ, kf26=\ENR, kf27=\ENS, kf28=\ENT, kf29=\EOq, - kf3=\EOe, kf30=\EOr, kf31=\EOs, kf32=\EOt, kf33=\EOu, - kf34=\EOv, kf35=\EOw, kf36=\EOx, kf37=\EOy, kf38=\EOu, - kf39=\EOv, kf4=\EOf, kf40=\EOl, kf41=\EOq, kf42=\EOr, - kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, kf5=\EOg, - kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\ENo, khome=\E[H, - kich1=\E[@, kil1=\E[L, knp=\E[U, kpp=\E[V, ll=\E[24H, - mc0=\E[i, mc4=\E[?4i, mc5=\E[?5i, nel=\EE, + is3=\E(B\E)0, kLFT=\E[ A, kRIT=\E[ @, kcbt=\E[Z, + kclr=\E[2J, kdch1=\E[P, kdl1=\E[M, kend=\E[24;1H, kf1=\EOc, + kf10=\ENp, kf11=\ENq, kf12=\ENr, kf13=\ENs, kf14=\ENt, + kf15=\EOC, kf16=\EOD, kf17=\EOE, kf18=\EOF, kf19=\EOG, + kf2=\EOd, kf20=\EOH, kf21=\EOI, kf22=\EOJ, kf23=\ENO, + kf24=\ENP, kf25=\ENQ, kf26=\ENR, kf27=\ENS, kf28=\ENT, + kf29=\EOq, kf3=\EOe, kf30=\EOr, kf31=\EOs, kf32=\EOt, + kf33=\EOu, kf34=\EOv, kf35=\EOw, kf36=\EOx, kf37=\EOy, + kf38=\EOu, kf39=\EOv, kf4=\EOf, kf40=\EOl, kf41=\EOq, + kf42=\EOr, kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, + kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\ENo, kich1=\E[@, + kil1=\E[L, knp=\E[U, kpp=\E[V, ll=\E[24H, nel=\EE, pfx=\E[%p1%d;%p2%l%02dq%?%p1%{9}%<%t\s\s\sF%p1%1d\s\s\s\s\s \s\s\s\s\s\s%;%p2%s, - pln=\E[%p1%d;0;0;0q%p2%:-16.16s, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=^O, rmir=\E[4l, rmln=\E[2p, rmso=\E[27m, - rmul=\E[24m, rmxon=\E[53;3|, rs1=\Ec\E[?3;5l\E[56;0|, - sc=\E7, + pln=\E[%p1%d;0;0;0q%p2%:-16.16s, ri=\EM, rmacs=^O, + rmir=\E[4l, rmln=\E[2p, rmso=\E[27m, rmul=\E[24m, + rmxon=\E[53;3|, rs1=\Ec\E[?3;5l\E[56;0|, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, smln=\E[p, smso=\E[7m, - smul=\E[4m, smxon=\E[53;0|, tbc=\E[3g, - tsl=\E7\E[99;%i%p1%dx, use=ansi+rep, use=att610+cvis0, + sgr0=\E[m\017, smacs=^N, smir=\E[4h, smln=\E[p, + smxon=\E[53;0|, tsl=\E7\E[99;%i%p1%dx, use=ansi+arrows, + use=ansi+csr, use=ansi+erase, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, use=ansi+rep, + use=ansi+sgrbold, use=decid+cpr, use=dec+pp, + use=att610+cvis0, # This entry was modified 3/13/90 by JWE. # fixes include additions of , correcting , and modification @@ -14511,53 +14725,49 @@ att730|AT&T 730 windowing terminal, am, da, db, eslok, hs, mir, msgr, npc, xenl, xon, cols#80, it#8, lh#2, lines#60, lm#0, lw#8, nlab#24, wsl#80, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, - enacs=\E(B\E)0, flash=\E[?5h$<200>\E[?5l, fsl=\E8, - home=\E[H, ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\ED, invis=\E[8m, + bel=^G, cbt=\E[Z, cr=\r, cub1=^H, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, el1=\E[1K, enacs=\E(B\E)0, + flash=\E[?5h$<200>\E[?5l, fsl=\E8, ht=^I, ich=\E[%p1%d@, + ind=\ED, is1=\E[8;0|\E[?3;4;5;13;15l\E[13;20l\E[?7h\E[12h\E(B\E)B, - is2=\E[m\017, is3=\E(B\E)0, kLFT=\E[ @, kRIT=\E[ A, kbs=^H, - kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOc, kf10=\ENp, kf11=\ENq, kf12=\ENr, - kf13=\ENs, kf14=\ENt, kf15=\ENu, kf16=\ENv, kf17=\ENw, - kf18=\ENx, kf19=\ENy, kf2=\EOd, kf20=\ENz, kf21=\EN{, - kf22=\EN|, kf23=\EN}, kf24=\EN~, kf25=\EOC, kf26=\EOD, - kf27=\EOE, kf28=\EOF, kf29=\EOG, kf3=\EOe, kf30=\EOH, - kf31=\EOI, kf32=\EOJ, kf33=\ENO, kf34=\ENP, kf35=\ENQ, - kf36=\ENR, kf37=\ENS, kf38=\ENT, kf39=\EOU, kf4=\EOf, - kf40=\EOV, kf41=\EOW, kf42=\EOX, kf43=\EOY, kf44=\EOZ, - kf45=\EO[, kf46=\EO\s, kf47=\EO], kf48=\EO\^, kf5=\EOg, - kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\ENo, khome=\E[H, - kich1=\E[@, kil1=\E[L, kind=\E[S, kri=\E[T, - mc0=\E[?19h\E[0i, mc4=\E[?4i, mc5=\E[?5i, nel=\EE, + is2=\E[m\017, is3=\E(B\E)0, kLFT=\E[ @, kRIT=\E[ A, + kcbt=\E[Z, kclr=\E[2J, kf1=\EOc, kf10=\ENp, kf11=\ENq, + kf12=\ENr, kf13=\ENs, kf14=\ENt, kf15=\ENu, kf16=\ENv, + kf17=\ENw, kf18=\ENx, kf19=\ENy, kf2=\EOd, kf20=\ENz, + kf21=\EN{, kf22=\EN|, kf23=\EN}, kf24=\EN~, kf25=\EOC, + kf26=\EOD, kf27=\EOE, kf28=\EOF, kf29=\EOG, kf3=\EOe, + kf30=\EOH, kf31=\EOI, kf32=\EOJ, kf33=\ENO, kf34=\ENP, + kf35=\ENQ, kf36=\ENR, kf37=\ENS, kf38=\ENT, kf39=\EOU, + kf4=\EOf, kf40=\EOV, kf41=\EOW, kf42=\EOX, kf43=\EOY, + kf44=\EOZ, kf45=\EO[, kf46=\EO\s, kf47=\EO], kf48=\EO\^, + kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\ENo, kich1=\E[@, + kil1=\E[L, kind=\E[S, kri=\E[T, mc0=\E[?19h\E[0i, nel=\EE, pfx=\E[%?%p1%{25}%<%t%p1%e%p1%{24}%-%;%d;%p2%l%02d%?%p1%{25} %<%tq\s\s\sSYS\s\s\s\s\sF%p1%:-2d\s\s%e;0;3q%;%p2%s, pfxl=\E[%p1%d;%p2%l%02d;0;0q%p3%:-16.16s%p2%s, - pln=\E[%p1%d;0;0;0q%p2%:-16.16s, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmln=\E[?13h, - rmso=\E[27m, rmul=\E[24m, rmxon=\E[?21l, rs2=\Ec\E[?3l, - sc=\E7, + pln=\E[%p1%d;0;0;0q%p2%:-16.16s, ri=\EM, rmacs=^O, + rmam=\E[?7l, rmir=\E[4l, rmln=\E[?13h, rmso=\E[27m, + rmul=\E[24m, rmxon=\E[?21l, rs2=\Ec\E[?3l, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1 %|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, - smln=\E[?13l, smso=\E[7m, smul=\E[4m, smxon=\E[?21h, - swidm=\E#6, tsl=\E7\E[;%i%p1%dx, use=ansi+rep, - use=att610+cvis0, -att730-41|730MTG-41|AT&T 730-41 windowing terminal Version, + smln=\E[?13l, smxon=\E[?21h, swidm=\E#6, + tsl=\E7\E[;%i%p1%dx, use=ansi+arrows, use=ansi+csr, + use=ansi+cup, use=ansi+erase, use=ansi+idl, + use=ansi+local, use=ansi+rep, use=ansi+sgrbold, + use=decid+cpr, use=dec+pp, use=att610+cvis, + +# "MGT" is "Multi-Tasking Graphics Terminal" +att730-41|730MTG-41|AT&T 730-41 windowing terminal, lines#41, use=att730, -att730-24|730MTG-24|AT&T 730-24 windowing terminal Version, +att730-24|730MTG-24|AT&T 730-24 windowing terminal, lines#24, use=att730, -att730r|730MTGr|AT&T 730 rev video windowing terminal Version, +att730r|730MTGr|AT&T 730 rev video windowing terminal, flash=\E[?5l$<200>\E[?5h, is1=\E[8;0|\E[?3;4;13;15l\E[?5h\E[13;20l\E[?7h\E[12h\E(B\E)B, use=att730, -att730r-41|730MTG-41r|AT&T 730r-41 rev video windowing terminal Version, +att730r-41|730MTG-41r|AT&T 730r-41 rev video windowing terminal, lines#41, use=att730r, -att730r-24|730MTGr-24|AT&T 730r-24 rev video windowing terminal Version, +att730r-24|730MTGr-24|AT&T 730r-24 rev video windowing terminal, lines#24, use=att730r, # The following represents the screen layout along with the associated @@ -14727,12 +14937,9 @@ att505|pt505|att5430|gs5430|AT&T Personal Terminal 505 or 5430 GETSET terminal, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[2J\E[H, - cnorm=\E[>l, cr=\r, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[>h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[0J, el=\E[0K, el1=\E[2K, home=\E[H, ht=^I, - il=\E[%p1%dL, il1=\E[L, ind=\n, + cnorm=\E[>l, cr=\r, cup=\E[%p1%d;%p2%dH, cvvis=\E[>h, + dch=\E[%p1%dP, dch1=\E[P, ed=\E[0J, el=\E[0K, el1=\E[2K, + home=\E[H, ht=^I, ind=\n, is1=\EPr\\E[0u\E[2J\E[0;0H\E[m\E[3l\E[l\E[=l\E[?l, kbs=^H, kcmd=\E!, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[00s, kf1=\E[01s, kf18=\E[18s, @@ -14743,13 +14950,14 @@ att505|pt505|att5430|gs5430|AT&T Personal Terminal 505 or 5430 GETSET terminal, rmacs=\E[10m, rmam=\E[11;1j, rmir=\E[4l, rmso=\E[m, rmul=\E[m, rs1=\Ec, sc=\E7, sgr0=\E[m, smacs=\E[11m, smam=\E[11;0j, smir=\E[4h, smso=\E[1m, smul=\E[4m, + use=ansi+cpr, use=ansi+idl, use=ansi+local, # The following Terminfo entry describes functions which are supported by # the AT&T 5430/pt505 terminal software version 1. att505-24|pt505-24|gs5430-24|AT&T PT505 or 5430 GETSET version 1 24 lines, lines#24, mc4@, mc5@, rc@, rmam@, sc@, smam@, use=att505, -tt505-22|pt505-22|gs5430-22|AT&T PT505 or 5430 GETSET version 1 22 lines, +att505-22|pt505-22|gs5430-22|AT&T PT505 or 5430 GETSET version 1 22 lines, lines#22, use=att505, # #### ------------------ TERMINFO FILE CAN BE SPLIT HERE --------------------- @@ -14828,9 +15036,9 @@ ampex219|ampex-219|amp219|Ampex with automargins, rmso=\E[m$<2>, rmul=\E[m$<2>, sgr0=\E[m$<2>, smam=\E[?7h, smkx=\E=, smso=\E[7m$<2>, smul=\E[4m$<2>, ampex219w|ampex-219w|amp219w|Ampex 132 cols, - cols#132, lines#24, - bel=^G, cr=\r, cud1=\n, ind=\n, - is2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h, use=ampex219, + cols#132, + cud1=\n, is2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h, + use=ampex219, # (ampex232: removed , no file and no --esr) ampex232|ampex-232|Ampex Model 232, am, @@ -14845,7 +15053,7 @@ ampex232|ampex-232|Ampex Model 232, kf9=^AI\r, khome=^^, use=adm+sgr, # (ampex: removed , no file and no -- esr) ampex232w|Ampex Model 232 / 132 columns, - cols#132, lines#24, + cols#132, is2=\E\034Eg\El, use=ampex232, #### Ann Arbor (aa) @@ -15004,34 +15212,31 @@ aas1901|Ann Arbor K4080 w/S1901 mod, # The generic Ann Arbor entry is the only one that uses this. aaa+unk|aaa-unk|Ann Arbor Ambassador (internal - don't use this directly), OTbs, am, km, mc5i, mir, xon, - cols#80, it#8, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - clear=\E[H\E[J$<156>, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=^K, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K$<5>, home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=^I, - hts=\EH, ich=\E[%p1%d@$<4*>, ich1=\E[@$<4>, il=\E[%p1%dL, - il1=\E[L$<3>, ind=^K, invis=\E[8m, is1=\E[m\E7\E[H\E9\E8, - is3=\E[1Q\E[>20;30l\EP`+x~M\E\\, kbs=^H, kcbt=\E[Z, - kclr=\E[J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + cols#80, + bel=^G, clear=\E[H\E[J$<156>, cr=\r, cub1=^H, cud1=^K, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, ed=\E[J, + el=\E[K$<5>, home=\E[H, hpa=\E[%p1%{1}%+%dG, + ich=\E[%p1%d@$<4*>, ich1=\E[@$<4>, il1=\E[L$<3>, ind=^K, + is1=\E[m\E7\E[H\E9\E8, + is3=\E[1Q\E[>20;30l\EP`+x~M\E\\, kcbt=\E[Z, kclr=\E[J, kdch1=\E[P, kdl1=\E[M, kf1=\EOA, kf10=\EOJ, kf11=\EOK, kf12=\EOL, kf13=\EOM, kf14=\EON, kf15=\EOO, kf16=\EOP, kf17=\EOQ, kf18=\EOR, kf19=\EOS, kf2=\EOB, kf20=\EOT, kf21=\EOU, kf22=\EOV, kf23=\EOW, kf24=\EOX, kf3=\EOC, kf4=\EOD, kf5=\EOE, kf6=\EOF, kf7=\EOG, kf8=\EOH, kf9=\EOI, - khome=\E[H, kich1=\E[@, kil1=\E[L, krmir=\E6, mc0=\E[0i, - mc4=^C, mc5=\E[v, mc5p=\E[%p1%dv, rc=\E8, rev=\E[7m, + kich1=\E[@, kil1=\E[L, krmir=\E6, mc0=\E[0i, mc4=^C, + mc5=\E[v, mc5p=\E[%p1%dv, rc=\E8, rmkx=\EP`>y~[[J`8xy~[[A`4xy~[[D`6xy~[[C`2xy~[[B\E \\, - rmm=\E[>52l, rmso=\E[m, rmul=\E[m, sc=\E7, + rmm=\E[>52l, sc=\E7, sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1; %;%?%p7%t8;%;m, sgr0=\E[m, smkx=\EP`>z~[[J`8xz~[[A`4xz~[[D`6xz~[[C`2xz~[[B\E \\, - smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%p1%{1}%+%dd, use=ansi+rep, + smm=\E[>52h, vpa=\E[%p1%{1}%+%dd, use=ansi+arrows, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+rep, use=ansi+sgrbold, aaa+rv|Ann Arbor Ambassador in reverse video, blink=\E[5;7m, bold=\E[1;7m, invis=\E[7;8m, @@ -15409,24 +15614,26 @@ adds980|a980|ADDS Consul 980, cit80|cit-80|citoh 80, OTbs, am, cols#80, lines#24, - clear=\E[H\EJ, cr=\r, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\EJ, el=\EK, ff=^L, - ind=\n, is2=\E>, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=, + clear=\E[H\EJ, cr=\r, cub1=^H, cup=\E[%i%p1%2d;%p2%2dH, + ed=\EJ, el=\EK, ff=^L, ind=\n, is2=\E>, kcub1=\EOD, kcud1=\EOB, + kcuf1=\EOC, kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=, + use=ansi+local1, + # From: Tim Wood Fri Sep 27 09:39:12 PDT 1985 # (cit101: added / based on init string, merged this with c101 -- esr) cit101|citc|C. Itoh fast VT100, OTbs, am, xenl, cols#80, lines#24, - bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - cvvis=\E7\E[U, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, - flash=\E[?5h$<200/>\E[?5l, ich1=\E[@, il1=\E[L, + bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E7\E[U, dch1=\E[P, + dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5h$<200/>\E[?5l, + ich1=\E[@, il1=\E[L, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, + smul=\E[4m, use=ansi+local1, + # CIE Terminals CIT-101e from Geoff Kuenning via BRL # The following termcap entry was created from the Callan cd100 entry. The # last two lines (with the capabilities in caps) are used by RM-cobol to allow @@ -15437,15 +15644,16 @@ cit101|citc|C. Itoh fast VT100, cit101e|C. Itoh CIT-101e, OTbs, OTpt, am, mir, msgr, cols#80, it#8, lines#24, - acsc=, clear=\E[H\E[J, cnorm=, csr=\E[%i%p1%2d;%p2%2dr, - cub1=\E[D, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, - cuu1=\E[A, cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M, - ed=\E[J, el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\EOT, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOm, kf6=\EOl, - kf7=\EOM, kf8=\EOn, rc=\E8, ri=\EM, rmacs=^O, rmir=\E[4l, - rmkx=\E>, rmso=\E[m, rmul=\E[m, sc=\E7, smacs=^N, smir=\E[4h, - smkx=\E=, smso=\E[7m, smul=\E[4m, + acsc=, cnorm=, csr=\E[%i%p1%2d;%p2%2dr, + cup=\E[%i%p1%2d;%p2%2dH, cvvis=\E[?1l\E[?4l\E[?7h, + dch1=\E[P, dl1=\E[M, if=/usr/share/tabset/vt100, + il1=\E[L, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kf0=\EOT, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOm, + kf6=\EOl, kf7=\EOM, kf8=\EOn, rc=\E8, ri=\EM, rmacs=^O, + rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, sc=\E7, smacs=^N, + smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, + use=ansi+erase, use=ansi+local1, + # From: David S. Lawyer, June 1997: # The CIT 101-e was made in Japan in 1983-4 and imported by CIE # Terminals in Irvine, CA. It was part of CITOH Electronics. In the @@ -15465,25 +15673,22 @@ cit101e|C. Itoh CIT-101e, # (cit101e-rv: added empty to suppress a tic warning. --esr) cit101e-rv|C. Itoh CIT-101e (sets reverse video), am, eo, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, - OTnl=\EM, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - civis=\E[1v, clear=\E[H\E[J, cnorm=\E[0;3;4v, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[3;5v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5l$<200/>\E[?5h, - home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, + cols#80, lines#24, + OTnl=\EM, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[1v, + cnorm=\E[0;3;4v, cr=\r, cub1=^H, cup=\E[%i%p1%d;%p2%dH, + cvvis=\E[3;5v, flash=\E[?5l$<200/>\E[?5h, home=\E[H, + hpa=\E[%i%p1%dG, ind=\n, is2=\E<\E>\E[?1l\E[?3l\E[?4l\E[?5h\E[?7h\E[?8h\E[3g\E[>5g\E( B\E[m\E[20l\E[1;24r\E[24;1H, kbs=^?, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\EE, rc=\E8, - rev=\E[7m, ri=\EM, rmcup=, rmir=\E[4l, rmso=\E[m, rmul=\E[m, - rs1=\Ec\E[?7h\E[>5g, sc=\E7, sgr0=\E[m, - smcup=\E[>5g\E[?7h\E[?5h, smir=\E[4h, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, u6=\E[%i%p1%d;%p2%dR, u7=\E[6n, - u8=\E[?6c, u9=\E[c, use=ecma+index, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\EE, rev=\E[7m, + ri=\EM, rmcup=, rmso=\E[m, rmul=\E[m, rs1=\Ec\E[?7h\E[>5g, + sgr0=\E[m, smcup=\E[>5g\E[?7h\E[?5h, smso=\E[7m, + smul=\E[4m, u6=\E[%i%p1%d;%p2%dR, u8=\E[?6c, + use=ansi+enq, use=ansi+csr, use=ansi+erase, use=ansi+idc, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ecma+index, + cit101e-n|CIT-101e w/o am, am@, cvvis=\E[?1l\E[?4l\E[?7l, kbs=^H, kcub1=^H, kcud1=\n, @@ -15509,25 +15714,22 @@ cit101e-n132|CIT-101e with 132 cols w/o am, # (cit500: I added / based on the init string -- esr) cit500|CIE Terminals CIT-500, OTbs, OTpt, mir, msgr, xon, - OTkn#10, cols#80, it#8, lines#64, vt#3, - acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\EM, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ed=\EJ, el=\EK, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, - il1=\E[L, ind=\n, is2=\E<\E)0, kbs=^H, kcbt=\E[Z, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[P, kdl1=\E[M, - ked=\EJ, kel=\EK, kf0=\EOP, kf1=\EOQ, kf2=\EOR, kf3=\EOS, - kf4=\EOU, kf5=\EOV, kf6=\EOW, kf7=\EOX, kf8=\EOY, kf9=\EOZ, - khome=\E[H, kich1=\E[4h, kil1=\E[L, krmir=\E[4l, lf0=PF1, - lf1=PF2, lf2=PF3, lf3=PF4, lf4=F15, lf5=F16, lf6=F17, lf7=F18, - lf8=F19, lf9=F20, ll=\E[64H, nel=\EE, rc=\E8, rev=\E[7m, - ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[m, rmul=\E[m, + OTkn#10, cols#80, lines#64, vt#3, + acsc=, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, + cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, + dch1=\E[P, ed=\EJ, el=\EK, home=\E[H, ind=\n, is2=\E<\E)0, + kcbt=\E[Z, kdch1=\E[P, kdl1=\E[M, ked=\EJ, kel=\EK, kf0=\EOP, + kf1=\EOQ, kf2=\EOR, kf3=\EOS, kf4=\EOU, kf5=\EOV, kf6=\EOW, + kf7=\EOX, kf8=\EOY, kf9=\EOZ, khome=\E[H, kich1=\E[4h, + kil1=\E[L, krmir=\E[4l, lf0=PF1, lf1=PF2, lf2=PF3, lf3=PF4, + lf4=F15, lf5=F16, lf6=F17, lf7=F18, lf8=F19, lf9=F20, + ll=\E[64H, nel=\EE, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=\E<\E2\E[20l\E[?6l\E[r\E[m\E[q\E(B\017\E)0\E>, - sc=\E7, sgr0=\E[m, smacs=^N, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, + sgr0=\E[m, smacs=^N, smam=\E[?7h, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + use=ansi+apparrows, use=ansi+csr, use=ansi+idl, + use=ansi+inittabs, use=ansi+local, # C. Itoh printers begin here citoh|ci8510|8510|C. Itoh 8510a, @@ -15665,26 +15867,23 @@ visa50|Geveke VISA 50 terminal in ANSI 80 character mode, cols#80, lines#25, acsc=0_aaffggh jjkkllmmnnooqqssttuuvvwwxx, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dX, dch1=\E[X, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5h$<100/>\E[?5l, - home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m, + csr=\E[%i%p1%d;%p2%dr, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dX, dch1=\E[X, dim=\E[2m, ed=\E[J, el=\E[K, + flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, + ht=^I, ind=\n, invis=\E[8m, is2=\E0;2m\E[1;25r\E[25;1H\E[?3l\E[?7h\E[?8h, - ka1=\E[f, ka3=\EOQ, kb2=\EOP, kbs=^H, kc1=\EOR, kc3=\EOS, - kcub1=\E[D, kcud1=\E[A, kcuf1=\E[C, kcuu1=\E[A, kdch1=^?, + ka1=\E[f, ka3=\EOQ, kb2=\EOP, kc1=\EOR, kc3=\EOS, kdch1=^?, kdl1=\EOS, kf0=\E010, kf1=\E001, kf10=\E011, kf2=\E002, kf3=\E003, kf4=\E004, kf5=\E005, kf6=\E006, kf7=\E007, kf8=\E008, kf9=\E009, khome=\E[f, lf2=A delete char, lf3=A insert line, lf4=A delete line, lf5=A clear, lf6=A ce of/cf gn, lf7=A print, lf8=A on-line, lf9=A funcl0=A send, nel=\r\n, rev=\E[7m, rmacs=\E[3l, - rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmso=\E[0;2m, - rmul=\E[0m, sgr0=\E[0;2m, smacs=\E3h, smam=\E?7h, - smir=\E[4h, smkx=\E=, smso=\E[2;7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%i%p1%dd, + rmam=\E[?7l, rmkx=\E>, rmso=\E[0;2m, rmul=\E[0m, + sgr0=\E[0;2m, smacs=\E3h, smam=\E?7h, smkx=\E=, + smso=\E[2;7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, + use=ansi+arrows, use=ansi+idc, use=ansi+idl, + use=ansi+local, #### Human Designed Systems (Concept) # @@ -15739,13 +15938,13 @@ c108|concept108|c108-8p|concept108-8p|Concept 108 w/8 pages, \Ep\n, rmcup=\Ev \001\177p\Ep\r\n, use=c108-4p, c108-4p|concept108-4p|Concept 108 w/4 pages, - OTbs, eslok, hs, xon, + eslok, hs, xon, pb@, acsc=jEkTl\\mMqLxU, cnorm=\Ew, cr=\r, cup=\Ea%p1%?%p1%{95}%>%t\001%{96}%-%;%{32}%+%c%p2%?%p2%{95} %>%t\001%{96}%-%;%{32}%+%c, cvvis=\EW, dch1=\E 1$<16*>, dsl=\E ;\177, fsl=\Ee\E z\s, - ind=\n, is1=\EK\E!\E F, + is1=\EK\E!\E F, is3=\EU\E z"\Ev\177 !p\E ;"\E z \Ev \001 p\Ep\n, rmacs=\Ej\s, rmcup=\Ev \001 p\Ep\r\n, smacs=\Ej!, smcup=\EU\Ev 8p\Ep\r\E\025, @@ -16070,27 +16269,20 @@ oc100|oconcept|c100-1p|old 1-page Concept 100, # and mc5= should use the \E[?4i and \E[?5i strings instead). hds200|Human Designed Systems HDS200, - am, bw, eslok, hs, km, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, lm#0, + am, bw, eslok, hs, km, mir, msgr, xenl, xon, NQ, + cols#80, lines#24, lm#0, acsc=``aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, - blink=\E[0;5m, bold=\E[0;1m, cbt=\E[Z, civis=\E[6+{, - clear=\E[H\E[J, cnorm=\E[+{, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - dsl=\E[2!w\r\n\E[!w, ed=\E[J, el=\E[K, el1=\E[1K, - fsl=\E[!w, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, - ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, - invis=\E[0;8m, + blink=\E[0;5m, bold=\E[0;1m, civis=\E[6+{, cnorm=\E[+{, + cr=\r, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dsl=\E[2!w\r\n\E[!w, el1=\E[1K, fsl=\E[!w, home=\E[H, + hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ind=\ED, invis=\E[0;8m, is2=\E)0\017\E[m\E[=107;207h\E[90;3u\E[92;3u\E[43;1u\177\E$P \177\E[44;1u\177\E$Q\177\E[45;1u\177\E$R\177\E[46;1u \177\E$S\177\E[200;1u\177\E$A\177\E[201;1u\177\E$B\177 \E[202;1u\177\E$C\177\E[203;1u\177\E$D\177\E[204;1u\177 \E$H\177\E[212;1u\177\E$I\177\E[213;1u\177\E$\010\177\E[ 214;1u"\E$\177"\E[2!w\E[25;25w\E[!w\E[2*w\E[2+x\E[;3+}, - kDC=\E$^?, kHOM=\E$H, kLFT=\E$D, kRIT=\E$C, kbs=^H, - kcbt=\E$I, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kDC=\E$^?, kHOM=\E$H, kLFT=\E$D, kRIT=\E$C, kcbt=\E$I, kdch1=^?, kent=\r, kf1=^\001\r, kf10=^\010\r, kf11=^\011\r, kf12=^\012\r, kf13=\EOP, kf14=\EOQ, kf15=\EOR, kf16=\EOS, kf17=^\017\r, kf18=^\018\r, kf19=^\019\r, kf2=^\002\r, @@ -16102,49 +16294,48 @@ hds200|Human Designed Systems HDS200, kf45=\E$R, kf46=\E$S, kf47=^\047\r, kf48=^\048\r, kf49=^\049\r, kf5=^\005\r, kf50=^\050\r, kf51=^\051\r, kf52=^\052\r, kf53=^\053\r, kf6=^\006\r, kf7=^\007\r, - kf8=^\008\r, kf9=^\009\r, khome=\E[H, kind=\E[T, knp=\E[U, - kpp=\E[V, kri=\E[S, ll=\E[H\E[A, nel=\E[E, rc=\E8, - rev=\E[0;7m, ri=\EM, rmacs=^O, rmir=\E[4l, rmso=\E[m\017, - rmul=\E[m\017, sc=\E7, + kf8=^\008\r, kf9=^\009\r, kind=\E[T, knp=\E[U, kpp=\E[V, + kri=\E[S, ll=\E[H\E[A, nel=\E[E, rev=\E[0;7m, ri=\EM, + rmacs=^O, rmir=\E[4l, rmso=\E[m\017, rmul=\E[m\017, sgr=\E[0%?%p1%p6%O%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%O%t;7 %;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smir=\E[4h, smso=\E[0;1;7m, - smul=\E[0;4m, tbc=\E[3g, tsl=\E[2!w\E[%i%p1%dG, - vpa=\E[%i%p1%dd, use=ansi+pp, + smul=\E[0;4m, tsl=\E[2!w\E[%i%p1%dG, vpa=\E[%i%p1%dd, + use=ansi+arrows, use=ansi+csr, use=ansi+erase, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, + use=ansi+pp, # through included to specify padding needed in raw mode. # (avt-ns: added empty to suppress a tic warning --esr) avt-ns|Concept AVT no status line, OTbs, am, eo, mir, ul, xenl, xon, - cols#80, it#8, lines#24, lm#192, - acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - clear=\E[H\E[J$<38>, cnorm=\E[=119l, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[=119h, dch1=\E[P, dim=\E[1!{, dl=\E[%p1%dM$<4*>, - dl1=\E[M$<4>, ed=\E[J$<96>, el=\E[K$<6>, home=\E[H, - hpa=\E[%p1%{1}%+%dG, ht=\011$<4>, hts=\EH, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL$<4*>, il1=\E[L$<4>, ind=\n$<8>, - invis=\E[8m, ip=$<4>, is1=\E[=103l\E[=205l, + cols#80, lines#24, lm#192, + acsc=, bel=^G, clear=\E[H\E[J$<38>, cnorm=\E[=119l, cr=\r, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cvvis=\E[=119h, + dim=\E[1!{, dl=\E[%p1%dM$<4*>, dl1=\E[M$<4>, + ed=\E[J$<96>, el=\E[K$<6>, home=\E[H, + hpa=\E[%p1%{1}%+%dG, ht=\011$<4>, ich=\E[%p1%d@, + il=\E[%p1%dL$<4*>, il1=\E[L$<4>, ind=\n$<8>, ip=$<4>, + is1=\E[=103l\E[=205l, is2=\E[1*q\E[2!t\E[7!t\E[=4;101;119;122l\E[=107;118;207h\E)1 \E[1Q\EW\E[!y\E[!z\E>\E[0:0:32!r\E[0*w\E[w\E2\r\n\E[2;27 !t, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E\002\r, ked=\E\004\r, kf1=\EOP, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, khome=\E[H, kich1=\E\001\r, kil1=\E\003\r, - ll=\E[24H, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, + kf4=\EOS, kich1=\E\001\r, kil1=\E\003\r, ll=\E[24H, + mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, pfloc=\E[%p1%d;0u#%p2%s#, pfx=\E[%p1%d;1u#%p2%s#, - prot=\E[99m, rc=\E8, rev=\E[7m, ri=\EM$<4>, rmacs=\016$<1>, - rmcup=\E[w\E2\r\n, rmir=\E[4l, rmkx=\E[!z\E[0;2u, - rmso=\E[7!{, rmul=\E[4!{, sc=\E7, + prot=\E[99m, ri=\EM$<4>, rmacs=\016$<1>, + rmcup=\E[w\E2\r\n, rmkx=\E[!z\E[0;2u, rmso=\E[7!{, + rmul=\E[4!{, sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1; %;%?%p7%t8;%;%?%p8%t99;%;m%?%p5%t\E[1!{%;%?%p9%t\017%e \016%;$<1>, sgr0=\E[m\016$<1>, smacs=\017$<1>, - smcup=\E[=4l\E[1;24w\E2\r, smir=\E[4h, - smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%p1%{1}%+%dd, use=ansi+rep, + smcup=\E[=4l\E[1;24w\E2\r, smkx=\E[1!z\E[0;3u, + vpa=\E[%p1%{1}%+%dd, use=ansi+arrows, use=ansi+csr, + use=ansi+idc1, use=ansi+inittabs, use=ansi+local, + use=ansi+rep, use=ansi+sgrbold, + avt-rv-ns|Concept AVT in reverse video mode/no status line, flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h, use=avt-ns, @@ -16307,14 +16498,7 @@ dgkeys+15|Private entry describing 15 DG mode special keys, # u8=^^F}20^^Fi^^F}21, # dgunix+fixed|Fixed color info for DG D430C terminals in DG-UNIX mode, - bce, - colors#16, ncv#53, pairs#0x100, - op=\036Ad\036Bd, - setab=\036B%p1%?%p1%{8}%<%t%{2}%&%?%p1%{1}%&%t%{4}%|%;%?%p1 - %{4}%&%t%{1}%|%;%;%{48}%+%c, - setaf=\036A%p1%?%p1%{8}%<%t%{2}%&%?%p1%{1}%&%t%{4}%|%;%?%p1 - %{4}%&%t%{1}%|%;%;%{48}%+%c, - setb=\036B%p1%{48}%+%c, setf=\036A%p1%{48}%+%c, + ncv#53, use=dgmode+color, dg+fixed|Fixed color info for DG D430C terminals in DG mode, use=dgunix+fixed, @@ -16427,11 +16611,11 @@ dg200|Data General DASHER 200, dg210|dg-ansi|Data General 210/211, am, cols#80, lines#24, - OTnl=\E[B, clear=\E[2J, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, - home=\E[H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - khome=\E[H, nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m, - smso=\E[7;m, smul=\E[4;m, + OTnl=\E[B, clear=\E[2J, cup=\E[%i%p1%d;%p2%dH, ed=\E[J, + el=\E[K, home=\E[H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, khome=\E[H, nel=\r\E[H\E[A\n, rmso=\E[0;m, + rmul=\E[0;m, smso=\E[7;m, smul=\E[4;m, use=ansi+local1, + # From: Peter N. Wan # courtesy of Carlos Rucalde of Vantage Software, Inc. # (dg211: this had ., which was an ancient termcap hangover. @@ -16457,20 +16641,19 @@ dg450|dg6134|Data General 6134, dg460-ansi|Data General Dasher 460 in ANSI-mode, OTbs, am, msgr, ul, cols#80, it#8, lines#24, - OTnl=\ED, blink=\E[5m, clear=\E[2J, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, - dim=\E[2m, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - ich1=\E[@, il1=\E[L, ind=\E[S, is2=^^F@, kbs=\E[D, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf0=\E[001z, kf1=\E[002z, kf2=\E[003z, kf3=\E[004z, - kf4=\E[005z, kf5=\E[006z, kf6=\E[007z, kf7=\E[008z, - kf8=\E[009z, kf9=\E[00:z, khome=\E[H, lf0=f1, lf1=f2, lf2=f3, - lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10, mc0=\E[i, - rev=\E[7m, ri=\E[T, rmso=\E[m, rmul=\E[05, + OTnl=\ED, blink=\E[5m, clear=\E[2J, cub1=^H, + cup=\E[%i%p1%2d;%p2%2dH, dch1=\E[P, dim=\E[2m, dl1=\E[M, + ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, + ind=\E[S, is2=^^F@, kbs=\E[D, kf0=\E[001z, kf1=\E[002z, + kf2=\E[003z, kf3=\E[004z, kf4=\E[005z, kf5=\E[006z, + kf6=\E[007z, kf7=\E[008z, kf8=\E[009z, kf9=\E[00:z, lf0=f1, + lf1=f2, lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10, + mc0=\E[i, rev=\E[7m, ri=\E[T, rmso=\E[m, rmul=\E[05, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%; %?%p1%p3%|%t;7%;m, - sgr0=\E(B\E[m, smso=\E[7m, smul=\E[4m, u6=\E[%d;%dR, - u7=\E[6n, u8=\E[5n, u9=\E[0n, + sgr0=\E(B\E[m, smso=\E[7m, smul=\E[4m, u8=\E[5n, u9=\E[0n, + use=ansi+arrows, use=ansi+cpr, use=ansi+local1, + # From: Wayne Throop (not official) # Data General 605x # Ought to work for a Model 6242, Type D210 as well as a 605x. @@ -16512,14 +16695,13 @@ d210|d214|Data General DASHER D210 series, am, bw, msgr, xon, cols#80, lines#24, bel=^G, blink=\E[5m, bold=\E[4;7m, clear=\E[2J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dim=\E[2m, ed=\E[J, el=\E[K, - el1=\E[1K, home=\E[H, ind=\n, is1=\E[<0;<1;<4l, + cub1=^H, cup=\E[%i%p1%d;%p2%dH, dim=\E[2m, ed=\E[J, + el=\E[K, el1=\E[1K, home=\E[H, ind=\n, is1=\E[<0;<1;<4l, ll=\E[H\E[A, nel=\n, rev=\E[7m, rmso=\E[m, rmul=\E[m, sgr=\E[%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;%?%p1%p3%| %p6%|%t7;%;m, - sgr0=\E[m, smso=\E[2;7m, smul=\E[4m, use=dgkeys+7b, + sgr0=\E[m, smso=\E[2;7m, smul=\E[4m, use=ansi+local, + use=dgkeys+7b, # DASHER D210 series terminals in DG mode. # Like D200, but adds clear to end-of-screen and needs XON/XOFF. @@ -16717,17 +16899,17 @@ d400|d400-dg|d450|d450-dg|Data General DASHER D400/D450 series, # \E)4 - default secondary character set (international) # d410|d411|d460|d461|Data General DASHER D410/D460 series, - mc5i, acsc=j$k"l!m#n)q+t'u&v(w%x*, civis=\E[3;0v, - cnorm=\E[3;2v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, + cnorm=\E[3;2v, dch=\E[%p1%dP, dch1=\E[P, ich=\E[%p1%d@, + ich1=\E[@, is1=\E[<0;<1;<2;<4l\E[5;0v\E[1;1;80w\E[1;6;<2h, - is2=\E[3;2;2;1;1;1v\E(B\E)4\017, mc4=\E[4i, mc5=\E[5i, - ri=\EM, rmacs=\E)4\017, rs1=\Ec\E[<2h, + is2=\E[3;2;2;1;1;1v\E(B\E)4\017, ri=\EM, + rmacs=\E)4\017, rs1=\Ec\E[<2h, rs2=\E[4;0;2;1;1;1v\E(B\E)4, sgr=\E[%?%p1%t2;7%;%?%p3%t7;%;%?%p4%t5;%;%?%p2%t4;%;%?%p1%p5 %|%t2;%;%?%p6%t4;7;%;m\E)%?%p9%t6\016%e4\017%;, sgr0=\E[m\E)4\017, smacs=\E)6\016, use=d211, + use=ansi+idl, use=ansi+pp, # Initialization string 2 sets: # \E[3;2;2;0;1;0v @@ -16990,11 +17172,12 @@ d578-7b|Data General DASHER D578 in 7-bit mode, cs10|colorscan|Datamedia Color Scan 10, msgr, cols#80, lines#24, - bel=^G, clear=\E[H\E[J, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%02d;%p2%02dH, cuu1=\E[A, ed=\E[J, el=\E[K, - ind=\n, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smso=\E[7m, smul=\E[4m, + bel=^G, cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, + cup=\E[%i%p1%02d;%p2%02dH, cuu1=\E[A, ind=\n, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, rmso=\E[m, rmul=\E[m, sgr0=\E[m, + smso=\E[7m, smul=\E[4m, use=ansi+erase, + cs10-w|Datamedia Color Scan 10 with 132 columns, cols#132, cup=\E[%i%p1%02d;%p2%03dH, use=cs10, @@ -17039,12 +17222,10 @@ dm3025|Datamedia 3025a, is2=\EQ\EU\EV, rmdc=\EQ, rmir=\EQ, rmso=\EO0, smdc=\EP, smir=\EP, smso=\EO1, dm3045|Datamedia 3045a, - OTbs, am, eo, km@, ul, xenl, + am, eo, km@, ul, xenl, dch1=\EB$<6>, dl1@, il1@, is2=\EU\EV, kcuf1=\EC, kcuu1=\EA, - kf0=\Ey\r, kf1=\Ep\r, kf2=\Eq\r, kf3=\Er\r, kf4=\Es\r, - kf5=\Et\r, kf6=\Eu\r, kf7=\Ev\r, kf8=\Ew\r, kf9=\Ex\r, - khome=\EH, pad=^?, rmdc@, rmir=\EP, rmso@, smdc@, smso@, - use=dm3025, + kf0=\Ey\r, kf9=\Ex\r, khome=\EH, pad=^?, rmdc@, rmir=\EP, + rmso@, smdc@, smso@, use=dm3025, use=hp+pfk+cr, # Datamedia DT80 soft switches: # 1 0=Jump 1=Smooth # Autorepeat 0=off 1=on @@ -17077,11 +17258,10 @@ dm3045|Datamedia 3045a, # CRT Saver 0=Off 1=On # dm80/1 is a VT100 lookalike, but it doesn't seem to need any padding. dm80|dmdt80|dt80|Datamedia dt80/1, - clear=\E[2J\E[H, cud1=\n, cuf1=\E[C, - cup=%i\E[%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, - home=\E[H, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, ri=\EM, - rmso=\E[m, rmul=\E[m, sgr0=\E[m\017$<2>, smso=\E[7m, - smul=\E[4m, use=vt100+4bsd, + clear=\E[2J\E[H, cuf1=\E[C, cup=%i\E[%p1%d;%p2%dH, + cuu1=\E[A, ed=\E[J, el=\E[K, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, + ri=\EM, rmso=\E[m, rmul=\E[m, sgr0=\E[m\017$<2>, + smso=\E[7m, smul=\E[4m, use=vt100+4bsd, # except in 132 column mode, where it needs a little padding. # This is still less padding than the VT100, and you can always turn on # the ^S/^Q handshaking, so you can use VT100 flavors for things like @@ -17155,35 +17335,26 @@ falco|ts1|ts-1|Falco ts-1, falco-p|ts1p|ts-1p|Falco ts-1 with paging option, OTbs, am, da, db, mir, msgr, ul, cols#80, it#8, lines#24, - bel=^G, cbt=\EI, clear=\E*, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=\E[A, - dch1=\EW, dl1=\ER, ed=\EY, el=\ET\EG0\010\Eg0, ht=^I, - il1=\EE, ind=\n, is2=\EZ\E3\E_c, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, rmcup=\E_b, rmir=\Er, - rmso=\Eg0, rmul=\Eg0, sgr0=\Eg0, smcup=\E_d, smir=\Eq, - smso=\Eg4, smul=\Eg1, + bel=^G, cbt=\EI, clear=\E*, cr=\r, cub1=^H, + cup=\E=%p1%{32}%+%c%p2%{32}%+%c, dch1=\EW, dl1=\ER, + ed=\EY, el=\ET\EG0\010\Eg0, ht=^I, il1=\EE, ind=\n, + is2=\EZ\E3\E_c, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, khome=\E[H, rmcup=\E_b, rmir=\Er, rmso=\Eg0, + rmul=\Eg0, sgr0=\Eg0, smcup=\E_d, smir=\Eq, smso=\Eg4, + smul=\Eg1, use=ansi+local1, + # (ts100: I added / based on the init string -- esr) ts100|ts100-sp|Falco ts100-sp, - am, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, vt#3, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, - cuu1=\E[A$<2>, dch1=\E~W, dl1=\E~R, ed=\E[J$<50>, - el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, - ht=^I, hts=\EH, ich1=\E~Q, il1=\E~E, ind=\n, is1=\E~)\E~ea, - kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, - rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 - %;m%?%p9%t\016%e\017%;$<2>, - sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, - use=vt100+fnkeys, + mir, xenl, xon, + vt#3, + cub1=^H, cud1=\n, cuf1=\E[C$<2>, cuu1=\E[A$<2>, dch1=\E~W, + dl1=\E~R, ich1=\E~Q, il1=\E~E, is1=\E~)\E~ea, kcub1=\EOD, + kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rmam=\E[?7l, + rmkx=\E[?1l\E>, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, smam=\E[?7h, + smkx=\E[?1h\E=, use=ansi+csr, use=ansi+local, + use=decid+cpr, use=vt100+4bsd, use=vt100+fnkeys, + ts100-ctxt|Falco ts-100 saving context, rmcup=\E~_b, smcup=\E~_d\E[2J, use=ts100, @@ -17220,11 +17391,11 @@ beacon|FCG Beacon System, f1720|f1720a|fluke 1720A, xt, cols#80, lines#16, xmc#1, - bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, - el=\E[K, ind=\ED, is2=\E[H\E[2J, kcub1=^_, kcud1=^], - kcuf1=^^, kcuu1=^\, ri=\EM, rmso=\E[m, rmul=\E[m, sgr0=\E[m, - smso=\E[7m, smul=\E[4m, + bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, ind=\ED, + is2=\E[H\E[2J, kcub1=^_, kcud1=^], kcuf1=^^, kcuu1=^\, + ri=\EM, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, + smul=\E[4m, use=ansi+local1, #### Liberty Electronics (Freedom) # @@ -17326,8 +17497,8 @@ f200vi-w|Liberty Freedom 200 - 132 cols for vi, go140|graphon go-140, OTbs, cols#80, it#8, lines#24, - clear=\E[H\E[2J$<10/>, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, + clear=\E[H\E[2J$<10/>, cub1=^H, + cup=\E[%i%p1%2d;%p2%2dH, dch1=\E[P, dl1=\E[M, ed=\E[J$<10/>, el=\E[K, ht=^I, if=/usr/share/tabset/vt100, il1=\E[L, is2=\E<\E=\E[?3l\E[?7l\E(B\E[J\E7\E[;r\E8\E[m\E[q, @@ -17335,7 +17506,8 @@ go140|graphon go-140, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, ri=\EM, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, use=ansi+local1, + go140w|graphon go-140 in 132 column mode, am, cols#132, @@ -17347,18 +17519,17 @@ go140w|graphon go-140 in 132 column mode, go225|go-225|Graphon 225, OTbs, am, mir, xenl, cols#80, it#8, lines#25, vt#3, - blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, + blink=\E[5m, bold=\E[1m, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - ed=\E[J, el=\E[K, home=\E[H, ht=^I, il1=\E[L, ind=\ED, - is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, - kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, rc=\E8, rev=\E[7m, + home=\E[H, ht=^I, il1=\E[L, ind=\ED, + is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, kf1=\EOP, + kf2=\EOQ, kf3=\EOR, kf4=\EOS, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, rmam=\E[?7l, rmcup=\E[!p\E[?7h\E[2;1;1#w, rmir=\E[4l, rmkx=\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[!p\E[?7h\E[2;1;1#w, - sc=\E7, sgr0=\E[m, smam=\E[?7h, smcup=\E[2;0#w\E[1;25r, + sgr0=\E[m, smam=\E[?7h, smcup=\E[2;0#w\E[1;25r, smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, + use=ansi+arrows, use=ansi+csr, use=ansi+erase, #### Harris (Beehive) # @@ -17436,12 +17607,12 @@ sb1|Beehive SuperBee, \s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s \s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s \s\s\s\s\s\EP$<3>\s\EO\ER\EA$<3>, - ind=\n, is2=\EE$<3>\EX\EZ\EO\Eb\Eg\ER, kbs=^_, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdl1=\EM, ked=\EJ, kel=\EK, - kf0=\E2, kf9=\E1, khome=\EH, kich1=\EQ\EO, krmir=\ER, - lf0=TAB CLEAR, lf9=TAB SET, rmcup=, rmir=\ER, rmso=\E_3, - rmul=\E_3, sgr0=\E_3, smcup=\EO, smir=\EQ\EO, smso=\E_1, - smul=\E_0, tbc=\E3, use=hp+pfk-cr, + ind=\n, is2=\EE$<3>\EX\EZ\EO\Eb\Eg\ER, kbs=^_, kdl1=\EM, + ked=\EJ, kel=\EK, kf0=\E2, kf9=\E1, khome=\EH, kich1=\EQ\EO, + krmir=\ER, lf0=TAB CLEAR, lf9=TAB SET, rmcup=, rmir=\ER, + rmso=\E_3, rmul=\E_3, sgr0=\E_3, smcup=\EO, smir=\EQ\EO, + smso=\E_1, smul=\E_0, tbc=\E3, use=hp+pfk-cr, + use=vt52+arrows, sbi|superbee|Beehive SuperBee at Indiana U., xsb, cr=\r$<1>, il1=\EN$<1>\EL$<9>\EQ \EP$<9> \EO\ER\EA, @@ -17456,7 +17627,7 @@ sbi|superbee|Beehive SuperBee at Indiana U., # the other two if you want to try to hit that tiny escape key. # This description is tricky: being able to use cup depends on there being # 2048 bytes of memory and the hairy string. -superbee-xsb|Beehive SuperBee, +superbee-xsb|Beehive SuperBee (improved), am, da, db, xsb, cols#80, it#8, lines#25, clear=\EH\EJ$<3>, cnorm=\n, cr=\r$<1000>, cub1=^H, cud1=\n, @@ -17464,8 +17635,8 @@ superbee-xsb|Beehive SuperBee, dch1=\EP$<3>, dl1=\EM$<100>, ed=\EJ$<3>, el=\EK$<3>, home=\EH, ht=^I, hts=\E1, ind=\n\0\0\0\n\0\0\0\EA\EK\0\0\0\ET\ET, is2=\EH\EJ, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\EH, - rmso=\E_3, sgr0=\E_3, smso=\E_1, tbc=\E3, use=hp+pfk-cr, + khome=\EH, rmso=\E_3, sgr0=\E_3, smso=\E_1, tbc=\E3, + use=hp+pfk-cr, use=vt52+arrows, # This loses on lines > 80 chars long, use at your own risk superbeeic|SuperBee with insert char, ich1=, rmir=\ER, smir=\EQ, use=superbee-xsb, @@ -17492,10 +17663,9 @@ beehive|bee|Harris Beehive, cbt=\E>, clear=\EE, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EF%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, home=\EH, il1=\EL, kbs=^H, kcbt=\E>, - kclr=\EE, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - kdch1=\EP, kdl1=\EM, kel=\EK, khome=\EH, kich1=\EQ, kil1=\EL, - krmir=\E@, rmir=\E@, rmso=\Ed@, rmul=\Ed@, sgr0=\Ed@, - smir=\EQ, smso=\EdP, smul=\Ed`, + kclr=\EE, kdch1=\EP, kdl1=\EM, kel=\EK, khome=\EH, kich1=\EQ, + kil1=\EL, krmir=\E@, rmir=\E@, rmso=\Ed@, rmul=\Ed@, + sgr0=\Ed@, smir=\EQ, smso=\EdP, smul=\Ed`, use=vt52+arrows, # set tab is ^F, clear (one) tab is ^V, no way to clear all tabs. # good grief - does this entry make :sg:/:ug: when it doesn't have to? # look at those spaces in /. Seems strange to me... @@ -17520,9 +17690,9 @@ microb|microbee|Micro Bee series, cols#80, it#8, lines#24, bel=^G, clear=\EE, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, cup=\EF%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, - el=\EK, ht=^I, ind=\n, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf9=\Ex, khome=\EH, rmso=\Ed@, rmul=\Ed@, - sgr0=\Ed@, smso=\s\EdP, smul=\Ed`, use=hp+pfk-cr, + el=\EK, ht=^I, ind=\n, kf9=\Ex, khome=\EH, rmso=\Ed@, + rmul=\Ed@, sgr0=\Ed@, smso=\s\EdP, smul=\Ed`, + use=hp+pfk-cr, use=vt52+arrows, # 8675, 8686, and bee from Cyrus Rahman # (8675: changed k10, k11...k16 to k;, F1...F6 -- esr) @@ -17623,7 +17793,7 @@ hz1520|Hazeltine 1520, rmso=\E^Y, rs1=\E$\E\005\E?\E\031, sgr0=\E^Y, smso=\E^_, # This version works with the escape switch off # (h1520: removed incorrect and overridden ":do=^J:" -- esr) -hz1520-noesc|Hazeltine 1520, +hz1520-noesc|Hazeltine 1520 (no escape), am, hz, cols#80, lines#24, bel=^G, clear=~^\, cr=\r, cub1=^H, cud1=~^K, cuf1=^P, @@ -17685,18 +17855,17 @@ hazel|exec80|h80|he80|Hazeltine Executive 80, OTbs, OTpt, am, cols#80, it#8, lines#24, vt#3, OTnl=\n, bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, - clear=\E[;H\E[2J$<50/>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\n, cuf1=\E[C$<2/>, - cup=\E[%i%p1%d;%p2%dH$<5/>, cuu1=\E[A$<2/>, - ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, ht=^I, - is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, rc=\E8, rev=\E[7m$<2/>, + clear=\E[;H\E[2J$<50/>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2/>, cup=\E[%i%p1%d;%p2%dH$<5/>, + cuu1=\E[A$<2/>, ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, + ht=^I, is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, + kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, rev=\E[7m$<2/>, rf=/usr/share/tabset/vt100, ri=\EM$<5/>, rmkx=\E[?1l\E>, rmso=\E[m$<2/>, rmul=\E[m$<2/>, - rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m$<2/>, smkx=\E[?1h\E=, smso=\E[7m$<2/>, - smul=\E[4m$<2/>, + smul=\E[4m$<2/>, use=ansi+csr, #### IBM # @@ -17710,14 +17879,14 @@ ibm3101|i3101|IBM 3101-10, cols#80, lines#24, bel=^G, clear=\EK, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, - el=\EI, home=\EH, hts=\E0, ind=\n, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, nel=\r\n, tbc=\EH, + el=\EI, home=\EH, hts=\E0, ind=\n, nel=\r\n, tbc=\EH, + use=vt52+arrows, ibm3151|IBM 3151 display, - is2=\E S, rmacs=\E>B, rmcup=\E>B, rs2=\E S, s0ds=\E>B, + is2=\E S, rmacs=\E>B, rs2=\E S, sgr=\E4%{64}%?%p1%t%{65}%|%;%?%p2%t%{66}%|%;%?%p3%t%{65}%|%; %?%p4%t%{68}%|%;%?%p5%t%{64}%|%;%?%p6%t%{72}%|%;%?%p7%t %{80}%|%;%c%?%p9%t\E>A%e\E>B%;, - sgr0=\E4@\E>B, smacs=\E>A, smcup=\E>B, use=ibm3162, + sgr0=\E4@\E>B, smacs=\E>A, use=ibm3162, # From: Mark Easter 29 Oct 1992 # removed kend, knp, kpp -TD # @@ -17735,9 +17904,8 @@ ibm3161|ibm3163|wy60-316X|wyse60-316X|IBM 3161/3163 display, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, dl1=\EO, ed=\EJ, el=\EI, home=\EH, ich1=\EP \010, il1=\EN, ind=\n, invis=\E4P, kbs=^H, kcbt=\E2, - kclr=\EL\r, kctab=\E1, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=\EQ, kdl1=\EO, ked=\EJ, kel=\EI, kf1=\Ea\r, - kf10=\Ej\r, kf11=\Ek\r, kf12=\El\r, kf13=\E!a\r, + kclr=\EL\r, kctab=\E1, kdch1=\EQ, kdl1=\EO, ked=\EJ, kel=\EI, + kf1=\Ea\r, kf10=\Ej\r, kf11=\Ek\r, kf12=\El\r, kf13=\E!a\r, kf14=\E!b\r, kf15=\E!c\r, kf16=\E!d\r, kf17=\E!e\r, kf18=\E!f\r, kf19=\E!g\r, kf2=\Eb\r, kf20=\E!h\r, kf21=\E!i\r, kf22=\E!j\r, kf23=\E!k\r, kf24=\E!l\r, @@ -17749,6 +17917,7 @@ ibm3161|ibm3163|wy60-316X|wyse60-316X|IBM 3161/3163 display, %?%p4%t%{68}%|%;%?%p5%t%{64}%|%;%?%p6%t%{72}%|%;%?%p7%t %{80}%|%;%c%?%p9%t\E>A%e\E<@%;, sgr0=\E4@\E<@, smcup=\E>A, smso=\E4A, smul=\E4B, + use=vt52+arrows, ibm3161-C|IBM 3161-C NLS terminal using cartridge, rmcup=\E>B, s0ds=\E>B, s1ds=\E>A, smcup=\E>B, use=ibm3161, @@ -17777,14 +17946,9 @@ ibm5151|wy60-AT|wyse60-AT|IBM 5151 Monochrome display, cols#80, it#8, lines#25, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x \263, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, - hpa=\E[%i%p1%dG, il=\E[%p1%dL, il1=\E[L, ind=\E[S, - invis=\E[8m, is2=\Ec, kbs=^H, kcbt=\E[Z, kclr=\E[144q, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, + bel=^G, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, + dch1=\E[P, ech=\E[%p1%dX, home=\E[H, hpa=\E[%i%p1%dG, + ind=\E[S, is2=\Ec, kcbt=\E[Z, kclr=\E[144q, kdch1=\E[P, ked=\E[148q, kel=\E[142q, kend=\E[146q, kf1=\E[001q, kf10=\E[010q, kf11=\E[011q, kf12=\E[012q, kf13=\E[013q, kf14=\E[014q, kf15=\E[015q, kf16=\E[016q, kf17=\E[017q, @@ -17794,13 +17958,13 @@ ibm5151|wy60-AT|wyse60-AT|IBM 5151 Monochrome display, kf29=\E[029q, kf3=\E[003q, kf30=\E[030q, kf31=\E[031q, kf32=\E[032q, kf33=\E[033q, kf34=\E[034q, kf35=\E[035q, kf36=\E[036q, kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, - kf7=\E[007q, kf8=\E[008q, kf9=\E[009q, khome=\E[H, - kich1=\E[139q, kil1=\E[140q, kind=\E[151q, knp=\E[154q, - kpp=\E[150q, kri=\E[155q, krmir=\E[4l, rev=\E[7m, ri=\E[T, - rmir=\E[4l, rmso=\E[m, rmul=\E[m, rs2=\Ec, + kf7=\E[007q, kf8=\E[008q, kf9=\E[009q, kich1=\E[139q, + kil1=\E[140q, kind=\E[151q, knp=\E[154q, kpp=\E[150q, + kri=\E[155q, krmir=\E[4l, ri=\E[T, rmir=\E[4l, rs2=\Ec, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1 %;%?%p7%t;8%;m, - sgr0=\E[0m, smir=\E[4h, smso=\E[7m, smul=\E[4m, + smir=\E[4h, use=ansi+arrows, use=ansi+erase, + use=ansi+idl, use=ansi+local, use=ansi+sgrbold, use=ecma+index, ibmaed|IBM Experimental display, @@ -17809,8 +17973,8 @@ ibmaed|IBM Experimental display, clear=\EH\EK, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, dl1=\EO, ed=\EJ, el=\EI, flash=\EG, home=\EH, ht=^I, ich1=\EP, - il1=\EN, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - rmso=\E0, sgr0=\E0, smso=\E0, + il1=\EN, kbs=^H, rmso=\E0, sgr0=\E0, smso=\E0, + use=vt52+arrows, ibm-apl|apl|IBM apl terminal simulator, lines#25, use=dm1520, # (ibmmono: this had an unknown `sb' boolean, I changed it to `bs'. @@ -17825,8 +17989,7 @@ ibmmono|IBM workstation monochrome, sgr0=\Ew\Eq\Ez\EB, smso=\EZ, smul=\EW, tsl=\Ej\EY8%+ \Eo, use=ibm3101, ibmega|IBM Enhanced Color Display, - cr=\r, cud1=\n, ht=^I, ind=\n, kbs=^H, kcub1=^H, kcud1=\n, - nel=\r\n, use=ibmmono, + ht=^I, kcub1=^H, kcud1=\n, use=ibmmono, # This color scheme is assumed in some recent IBM terminal descriptions # (green on black, emulated on a 16-color terminal). ibm+color|IBM color definitions, @@ -17847,18 +18010,16 @@ ibm+16color|IBM aixterm color definitions, setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e %ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m, ibm5154|IBM 5154 Color display, - colors#8, ncv@, pairs#64, + ncv@, bold@, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ibm5151, use=ibm+color, ibmega-c|ibm5154-c|IBM Enhanced Color Display with standout and underline, rmso=\EB, rmul=\EB, smso=\EF\Ef3;, smul=\EF\Ef2;, use=ibmmono, ibmvga-c|IBM VGA display color termcap, - cr=\r, cud1=\n, ht=^I, ind=\n, kbs=^H, kcub1=^H, kcud1=\n, - nel=\r\n, use=ibmega-c, + ht=^I, kcub1=^H, kcud1=\n, use=ibmega-c, ibmvga|IBM VGA display, - cr=\r, cud1=\n, ht=^I, ind=\n, kbs=^H, kcub1=^H, kcud1=\n, - nel=\r\n, use=ibmega, + use=ibmega, # ibmapa* and ibmmono entries come from ACIS 4.3 distribution rtpc|ibmapa16|IBM 6155 Extended Monochrome Graphics Display, lines#32, @@ -17883,50 +18044,38 @@ ibm6153|IBM 6153 Black & White display, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p7%t;8%;%?%p6%t;1 2%;m, sgr0=\E[0;10m, use=ibm5151, -ibm6153-90|IBM 6153 Black & White display, +ibm6153-90|IBM 6153 Black & White display (36-line), cols#90, lines#36, blink@, bold@, use=ibm5151, -ibm6153-40|IBM 6153 Black & White display, +ibm6153-40|IBM 6153 Black & White display (12-line), cols#40, lines#12, use=ibm6153-90, ibm8512|ibm8513|IBM color VGA Terminal, - am, mir, msgr, - cols#80, it#8, lines#25, - acsc=jjkkllmmnnqqttuuvvwwxx, blink=\E[5m, bold=\E[1m, - clear=\E[H\E[J, cub1=\E[D, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, il=\E[%p1%dL, - il1=\E[L, is2=\Eb\E[m\017\E[?7h, kcud1=\E[B, kcuu1=\E[A, - kf0=\E[010q, kf1=\E[001q, kf2=\E[002q, kf3=\E[003q, - kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, - kf8=\E[008q, kf9=\E[009q, khome=\E[H, rc=\E[u, rev=\E[7m, + mir, + cub1=\E[D, is2=\Eb\E[m\017\E[?7h, kf0=\E[010q, rc=\E[u, rmacs=^O, rmam=\E[?7l, rmcup=\E[20h, rmdc=\E[4l, - rmir=\E[4l, rmso=\E[m, rmul=\E[m, rs1=\Eb\E[m\017\E[?7h\E[H\E[J, sc=\E[s, sgr0=\E[m, smacs=^N, smam=\E[?7h, smcup=\E[20;4l\E[?7h\Eb, - smdc=\E[4h, smir=\E[4h, smso=\E[7m, smul=\E[4m, - use=ibm8503, + smdc=\E[4h, use=ibm8503, hft-c|HFT with Color, - colors#8, pairs#64, acsc=jjkkllmmnnqqttuuvvwwxx, s0ds=\E(B, s1ds=\E(0, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0m\E(B, use=ibm5151, use=ibm+color, hft-c-old|HFT with Color PC850, - colors#8, pairs#64, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ibm5151, use=ibm+color, hft-old|AIWS High Function Terminal, am, xon, cols#80, lines#25, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, - ht=^I, ich1=\E[@, il1=\E[L, ind=\n, invis=\E[8m, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\E[001q, kf2=\E[002q, kf3=\E[003q, kf4=\E[004q, - kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, kf8=\E[008q, - kf9=\E[009q, khome=\E[H, knp=\E[153q, kpp=\E[159q, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, + dl1=\E[M, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, ind=\n, + invis=\E[8m, kf1=\E[001q, kf2=\E[002q, kf3=\E[003q, + kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, + kf8=\E[008q, kf9=\E[009q, knp=\E[153q, kpp=\E[159q, ktbc=\E[010q, rev=\E[7m, rmir=\E6, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smir=\E6, smso=\E[7m, smul=\E[4m, use=ibm+color, + sgr0=\E[m, smir=\E6, smso=\E[7m, smul=\E[4m, + use=ansi+arrows, use=ansi+erase, use=ibm+color, + ibm-system1|system1|IBM system/1 computer, am, xt, cols#80, lines#24, @@ -17942,53 +18091,47 @@ lft|lft-pc850|LFT-PC850|IBM LFT PC850 Device, cols#80, it#8, lines#25, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x \263, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[2J, el=\E[0K, - home=\E[H, hpa=\E[%i%p1%dG, ich=\E[%p1%d@, il=\E[%p1%dL, - il1=\E[L, ind=\ED, invis=\E[8m, is2=\Ec, kbs=^H, kcbt=\E[Z, - kclr=\E[144q, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=\E[P, ked=\E[148q, kel=\E[142q, - kend=\E[146q, kf1=\E[001q, kf10=\E[010q, kf11=\E[011q, - kf12=\E[012q, kf13=\E[013q, kf14=\E[014q, kf15=\E[015q, - kf16=\E[016q, kf17=\E[017q, kf18=\E[018q, kf19=\E[019q, - kf2=\E[002q, kf20=\E[020q, kf21=\E[021q, kf22=\E[022q, - kf23=\E[023q, kf24=\E[024q, kf25=\E[025q, kf26=\E[026q, - kf27=\E[027q, kf28=\E[028q, kf29=\E[029q, kf3=\E[003q, - kf30=\E[030q, kf31=\E[031q, kf32=\E[032q, kf33=\E[033q, - kf34=\E[034q, kf35=\E[035q, kf36=\E[036q, kf4=\E[004q, - kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, kf8=\E[008q, - kf9=\E[009q, khome=\E[H, kich1=\E[139q, kil1=\E[140q, + bel=^G, cbt=\E[Z, clear=\E[H\E[J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + ech=\E[%p1%dX, ed=\E[2J, el=\E[0K, home=\E[H, + hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ind=\ED, is2=\Ec, + kcbt=\E[Z, kclr=\E[144q, kdch1=\E[P, ked=\E[148q, + kel=\E[142q, kend=\E[146q, kf1=\E[001q, kf10=\E[010q, + kf11=\E[011q, kf12=\E[012q, kf13=\E[013q, kf14=\E[014q, + kf15=\E[015q, kf16=\E[016q, kf17=\E[017q, kf18=\E[018q, + kf19=\E[019q, kf2=\E[002q, kf20=\E[020q, kf21=\E[021q, + kf22=\E[022q, kf23=\E[023q, kf24=\E[024q, kf25=\E[025q, + kf26=\E[026q, kf27=\E[027q, kf28=\E[028q, kf29=\E[029q, + kf3=\E[003q, kf30=\E[030q, kf31=\E[031q, kf32=\E[032q, + kf33=\E[033q, kf34=\E[034q, kf35=\E[035q, kf36=\E[036q, + kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, + kf8=\E[008q, kf9=\E[009q, kich1=\E[139q, kil1=\E[140q, kind=\E[151q, knp=\E[154q, kpp=\E[150q, kri=\E[155q, - krmir=\E[4l, rev=\E[7m, ri=\EL, rmacs=\E(B, rmir=\E[4l, - rmso=\E[0m, rmul=\E[0m, rs2=\Ec, + krmir=\E[4l, ri=\EL, rmacs=\E(B, rmir=\E[4l, rmso=\E[0m, + rmul=\E[0m, rs2=\Ec, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1 %;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\E[0m, smacs=\E(0, smir=\E[4h, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, use=ecma+index, + smacs=\E(0, smir=\E[4h, tbc=\E[3g, use=ansi+arrows, + use=ansi+idl, use=ansi+local, use=ansi+sgrbold, + use=ecma+index, + # "Megapel" refers to the display adapter, which was used with the IBM RT # aka IBM 6150. ibm5081|hft|IBM Megapel Color display, acsc=jjkkllmmnnqqttuuvvwwxx, blink@, bold@, s0ds=\E(B, s1ds=\E(0, sgr0=\E[0m\E(B, use=ibm5154, ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 Megapel enhanced color display, - eslok, hs, lines#33, - dsl=\Ej\EYA \EI\Ek, fsl=\Ek, tsl=\Ej\EYA%+ \Eo, - use=ibmega-c, + dsl=\Ej\EYA \EI\Ek, tsl=\Ej\EYA%+ \Eo, use=ibmega-c, ibm8503|ibm8507|ibm8604|IBM 8503 B & W VGA display, use=hft-c, ibm8514|IBM 8514/a color VGA display, eslok, hs, dsl=\Ej\EYI \EI\Ek, fsl=\Ek, tsl=\Ej\EYI%+ \Eo, use=hft, ibm8514-c|IBM 8514 color display with standout and underline, - eslok, hs, lines#41, - cr=\r, cud1=\n, dsl=\Ej\EYI \EI\Ek, fsl=\Ek, ht=^I, ind=\n, - kbs=^H, kcub1=^H, kcud1=\n, nel=\r\n, tsl=\Ej\EYI%+ \Eo, - use=ibmega-c, + dsl=\Ej\EYI \EI\Ek, ht=^I, kcub1=^H, kcud1=\n, + tsl=\Ej\EYI%+ \Eo, use=ibmega-c, # # AIX entries. IBM ships these with AIX 3.2.5. @@ -18374,9 +18517,9 @@ intext|Interactive Systems Corporation modified owl 1200, intext2|intextii|INTERACTIVE modified owl 1251, am, bw, ul, cols#80, lines#24, xmc#0, - bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, cub1=\E[D, - cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, + bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=\r, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, ed=\E[J, + el=\E[K, flash=\E[;;;;;;;;;2;;u$<200/>\E[;;;;;;;;;1;;u, hpa=\E[%p1%{1}%+%dG, ht=^I, ich1=\E[@, il1=\E[L, ind=\E[S, kbs=^H, kcub1=\ED\r, kcud1=\EB\r, kcuf1=\EC\r, kcuu1=\EA\r, @@ -18385,7 +18528,7 @@ intext2|intextii|INTERACTIVE modified owl 1251, khome=\ER\r, lf0=REFRSH, lf1=DEL CH, lf2=TABSET, lf3=GOTO, lf4=+PAGE, lf5=+SRCH, lf6=-PAGE, lf7=-SRCH, lf8=LEFT, lf9=RIGHT, ri=\E[T, rmso=\E[2 D, rmul=\E[2 D, smso=\E[6 D, - smul=\E[18 D, + smul=\E[18 D, use=ansi+local1, #### Kimtron (abm, kt) # @@ -18487,13 +18630,13 @@ kt7ix|kimtron model kt-7 or 70 in IX mode, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dim=\EG@, dl1=\ER, dsl=\Ef\r, ed=\EY, el=\ET, fsl=\r, home=^^, ht=^I, ich1=\EQ, il1=\EE, ind=\n, - is2=\EG0\E s\017\E~, kbs=^H, kcbt=\EI, kclr=\E*, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdl1=\ER, - ked=\EY, kel=\ET, kend=\EY, kf0=^AI\r, kf1=^A@\r, kf2=^AA\r, + is2=\EG0\E s\017\E~, kcbt=\EI, kclr=\E*, kdl1=\ER, ked=\EY, + kel=\ET, kend=\EY, kf0=^AI\r, kf1=^A@\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=^^, kich1=\EQ, kil1=\EE, knp=\EJ, nel=\r\n, pulse=\EK, rmacs=\E%%, rmir=, rmso=\EG0, rmul=\EG0, sgr0=\EG0, smacs=\E$, smir=, smso=\EG4, smul=\EG8, tsl=\Ef, + use=ansi+arrows, #### Microdata/MDIS # @@ -18670,31 +18813,27 @@ prism8-w|p8-w|P8-W|MDC Prism-8 in 132 column mode, # prism9|p9|P9|MDC Prism-9 in ANSI mode, am, bw, hs, msgr, xenl, xon, - cols#80, it#8, lines#24, vt#3, wsl#72, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[<4l, - clear=^L, cnorm=\E[<4h, cr=\r, csr=\E[%i%p1%d;%p2%d%%v, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, dsl=\E[%}\024, ech=\E[%p1%dX, - ed=\E[J$<10>, el=\E[K, fsl=^T, home=\E[H, hpa=\E[%i%p1%d`, - ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=\n, - is2=\E[&p\E[<12l\E F, kbs=^H, kclr=^L, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[11~, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, - kf18=\E[32~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[H, nel=\r\n, prot=\E[32%{, rc=\E[%z, - rep=\E[%p2%db%p1%c, rev=\E[7m, ri=\E[L, rmir=\E[4l, - rmso=\E[27m, rmul=\E[24m, + cols#80, lines#24, vt#3, wsl#72, + bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[<4l, clear=^L, + cnorm=\E[<4h, cr=\r, csr=\E[%i%p1%d;%p2%d%%v, cub1=^H, + cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dsl=\E[%}\024, ech=\E[%p1%dX, ed=\E[J$<10>, el=\E[K, + fsl=^T, home=\E[H, hpa=\E[%i%p1%d`, ind=\n, + is2=\E[&p\E[<12l\E F, kclr=^L, kf1=\E[11~, kf10=\E[21~, + kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, + kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, + kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, nel=\r\n, prot=\E[32%{, + rc=\E[%z, rep=\E[%p2%db%p1%c, rev=\E[7m, ri=\E[L, + rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs2=\E[&p\E[<12l\E\sF\E[3g\E[9;17;25;33;41;49;57;65;73 \sN, sc=\E[%y, sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;m%? %p8%t\E[32%%{%;%?%p9%t\016%e\017%;, sgr0=\E[0m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd, + tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd, use=ansi+arrows, + use=ansi+idl, use=ansi+inittabs, use=ansi+local, use=ansi+pp, # p9-w: Prism-9 in 132 column mode @@ -18715,8 +18854,8 @@ prism9-w|p9-w|P9-W|MDC Prism-9 in 132 column mode, # Insertion and deletion operations possible. # prism9-8|p9-8|P9-8|MDC Prism-9 in P8 mode, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, use=p8, + dch=\E[%p1%dP, dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, + use=ansi+idl, use=p8, # p9-8-w: Prism-9 in P8 and 132 column modes # ------------------------------------------ @@ -18724,8 +18863,8 @@ prism9-8|p9-8|P9-8|MDC Prism-9 in P8 mode, # P9 terminal in P8 emulation mode and 132 column mode. # prism9-8-w|p9-8-w|P9-8-W|MDC Prism-9 in Prism 8 emulation and 132 column mode, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, use=p8-w, + dch=\E[%p1%dP, dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, + use=ansi+idl, use=p8-w, # p12: Prism-12 in ANSI mode # --------------------------- @@ -18838,8 +18977,7 @@ act4|microterm|microterm act iv, # The act 5 has hardware tabs, but they are in columns 8, 16, 24, 32, 41 (!)... # (microterm5: removed obsolete ":ma==^Z^P^Xl^Kj:" -- esr) act5|microterm5|microterm act v, - kcub1=^H, kcud1=^K, kcuf1=^X, kcuu1=^Z, ri=\EH$<3>, uc=^H\EA, - use=act4, + ri=\EH$<3>, uc=^H\EA, use=act4, # Mimes using brightness for standout. Half bright is really dim unless # you turn up the brightness so far that lines show up on the screen. mime-fb|full bright mime1, @@ -18875,13 +19013,13 @@ mime2a|mime2a-v|microterm mime2a (emulating an enhanced VT52), bel=^G, clear=\EL, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=^N, dl1=\027$<20*>, ed=\EQ$<20*>, el=\EP, home=\EH, ht=^I, - il1=\001$<20*>, ind=\n, ip=$<2>, is2=^Y, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, ri=\EA, rmir=^Z, rmso=\E9, - rmul=\E5, smir=^O, smso=\E8, smul=\E4, + il1=\001$<20*>, ind=\n, ip=$<2>, is2=^Y, ri=\EA, rmir=^Z, + rmso=\E9, rmul=\E5, smir=^O, smso=\E8, smul=\E4, + use=vt52+arrows, # (mime3a: removed obsolete ":ma=^X ^K^J^Z^P:" -- esr) mime3a|mime1 emulating 3a, am@, - kcub1=^H, kcud1=^K, kcuf1=^X, kcuu1=^Z, use=adm3a, + kcud1=^K, kcuf1=^X, kcuu1=^Z, use=adm3a, mime3ax|mime-3ax|mime1 emulating enhanced 3a, it#8, dl1=\027$<80>, ed=^_, el=^X, ht=\011$<3>, il1=\001$<80>, @@ -18914,23 +19052,19 @@ mm340|mime340|mime 340, mt4520-rv|micro-term 4520 reverse video, am, hs, msgr, xenl, xon, cols#80, it#8, lines#24, wsl#80, - bel=^G, clear=\E[H\E[J, cnorm=\E[0V\E8, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E7\E[0U, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5l$<200/>\E[?5h, - fsl=\E[?5l\E[?5h, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\ED, + bel=^G, cnorm=\E[0V\E8, cr=\r, cup=\E[%i%p1%d;%p2%dH, + cvvis=\E7\E[0U, dch=\E[%p1%dP, dch1=\E[P, + flash=\E[?5l$<200/>\E[?5h, fsl=\E[?5l\E[?5h, home=\E[H, + ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=\ED, is2=\E(B\E[2l\E>\E[20l\E[?3l\E[?5h\E[?7h\E[1;24r\E[24;1H\E[H \E[J, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, - ll=\E[24;1H, nel=\EE, rc=\E8, rf=/usr/share/tabset/vt100, - ri=\EM, rmam=\E[?7l, rmso=\E[0m, rmul=\E[24m, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, ll=\E[24;1H, nel=\EE, + rf=/usr/share/tabset/vt100, ri=\EM, rmam=\E[?7l, + rmso=\E[0m, rmul=\E[24m, rs1=\E(B\E[2l\E>\E[20l\E[?3l\E[?5h\E[?7h\E[H\E[J, - sc=\E7, sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, - tbc=\E[g, tsl=\E[25;1H, + sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[g, + tsl=\E[25;1H, use=ansi+arrows, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+local, # Fri Aug 5 08:11:57 1983 # This entry works for the ergo 4000 with the following setups: @@ -18944,17 +19078,17 @@ mt4520-rv|micro-term 4520 reverse video, ergo4000|microterm ergo 4000, da, db, msgr, cols#80, lines#66, - bel=^G, clear=\E[H\E[2J$<80>, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[1P$<80>, dl1=\E[1M$<5*>, ed=\E[0J$<15>, - el=\E[0K$<13>, ht=^I, il1=\E[1L$<5*>, ind=\ED$<20*>, + bel=^G, clear=\E[H\E[2J$<80>, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[1P$<80>, dl1=\E[1M$<5*>, + ed=\E[0J$<15>, el=\E[0K$<13>, ht=^I, il1=\E[1L$<5*>, + ind=\ED$<20*>, is2=\E<\E=\E[?1l\E[?4l\E[?5l\E[?7h\E[?8h$<300>, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, ri=\EM$<20*>, rmam=\E[?7l, rmir=\E[4l, rmkx=\E=$<4>, rmso=\E[m$<20>, sgr0=\E[m$<20>, smam=\E[?7m, smir=\E[4h$<6>, smkx=\E=$<4>, - smso=\E[7m$<20>, + smso=\E[7m$<20>, use=ansi+local1, #### NCR # @@ -18974,13 +19108,13 @@ ergo4000|microterm ergo 4000, ncr260intan|NCR Intecolor emulation of the 2900/260C with an ANSI keyboard, colors#8, pairs#64, op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, - use=ncr260vt300an, + use=decid+cpr, use=ncr260vt300an, # The Intecolor emulation of the NCR 2900/260C color terminal is basically a # DEC VT200/300 with color capabilities added. -ncr260intwan|NCR Intecolor emulation of the 2900/260C with an ANSI keyboard, +ncr260intwan|NCR Intecolor emulation of the 2900/260C with an ANSI keyboard (132 column), colors#8, pairs#64, op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, - use=ncr260vt300wan, + use=decid+cpr, use=ncr260vt300wan, # The Intecolor emulation of the NCR 2900/260C color terminal is basically a # DEC VT200/300 with color capabilities added. ncr260intpp|NCR Intecolor emulation of the 2900/260C with a PC+ keyboard, @@ -18989,7 +19123,7 @@ ncr260intpp|NCR Intecolor emulation of the 2900/260C with a PC+ keyboard, use=ncr260vt300pp, # The Intecolor emulation of the NCR 2900/260C color terminal is basically a # DEC VT200/300 with color capabilities added. -ncr260intwpp|NCR Intecolor emulation of the 2900/260C with a PC+ keyboard in 132 column mode, +ncr260intwpp|NCR Intecolor emulation of the 2900/260C with a PC+ keyboard (132 column), colors#8, pairs#64, op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ncr260vt300wpp, @@ -19032,7 +19166,7 @@ ncr260vppp|NCR 2900/260 viewpoint, sgr0=\EG0\EH\003, smacs=\EcB1\EH\002, smir=\Eq, smso=\EG4, smul=\EG8, smxon=\Ec21, use=ncr260vp+sl, -ncr260vp+sl|NCR 2900/260 viewpoint, +ncr260vp+sl|NCR 2900/260 viewpoint with status-line, hs, dsl=\E`c, fsl=\r, tsl=\EF, @@ -19049,8 +19183,7 @@ ncr260vt100an|NCR 2900/260 VT100 with ANSI keyboard, am, mir, msgr, xenl, xon, cols#80, lines#24, nlab#32, acsc=``aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, - blink=\E[5m, bold=\E[1m, clear=\E[2J\E[1;1H$<20>, - cr=\r$<1>, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD$<5>, + clear=\E[2J\E[1;1H$<20>, cr=\r$<1>, cub=\E[%p1%dD$<5>, cub1=\E[D$<5>, cud=\E[%p1%dB$<5>, cud1=\E[B$<5>, cuf=\E[%p1%dC$<5>, cuf1=\E[C$<5>, cup=\E[%i%p1%d;%p2%dH$<10>, cuu=\E[%p1%dA$<5>, @@ -19059,22 +19192,23 @@ ncr260vt100an|NCR 2900/260 VT100 with ANSI keyboard, ed=\E[0J$<5>, el=\E[0K$<3>, el1=\E[1K$<3>, home=\E[H$<1>, hpa=\E[%p1%dG$<40>, ht=^I, hts=\EH, ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, ind=\ED$<5>, - indn=\E[%p1%dE$<5>, invis=\E[8m, + indn=\E[%p1%dE$<5>, is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$< 200>, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - khlp=\E[28~, kich1=\E[2~, krdo=\E[29~, nel=\EE$<5>, rc=\E8, - rev=\E[7m, ri=\EM$<5>, rmacs=^O, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[0m, rmul=\E[0m, + khlp=\E[28~, kich1=\E[2~, krdo=\E[29~, nel=\EE$<5>, + ri=\EM$<5>, rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[0m, rmul=\E[0m, rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$< 200>, - sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<20>, sgr0=\E[0m\017$<20>, smacs=^N, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[1;7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%p1%dd$<40>, use=vt220+vtedit, use=vt220+cvis, + smkx=\E[?1h\E=, smso=\E[1;7m, tbc=\E[3g, + vpa=\E[%p1%dd$<40>, use=ansi+csr, use=ansi+sgrbold, + use=decid+cpr, use=vt220+vtedit, use=vt220+cvis, use=vt220+keypad, use=ncr260vt+sl, + ncr260vt+sl|NCR 2900/260 VT100 status line, hs, dsl=\E[0$~\E[1$~, fsl=\E[0$}, tsl=\E[2$~\E[1$}, @@ -19087,15 +19221,11 @@ ncr260vt100wan|NCR 2900/260 VT100 wide mode ANSI keyboard, 200>, use=ncr260vt100an, ncr260vt100pp|NCR 2900/260 VT100 with PC+ keyboard, - is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$< - 200>, ka1=\E[H, ka3=\EOu, kb2=\E[V, kc3=\E[U, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[4~, - kend=\E[5~, khome=\E[2~, kich1=\E[1~, knp=\E[6~, kpp=\E[3~, - lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, rmkx=\E>, - rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$< - 200>, - smkx=\E=, use=ncr260vt100an, + kend=\E[5~, khome=\E[2~, kich1=\E[1~, kpp=\E[3~, lf1=pf1, + lf2=pf2, lf3=pf3, lf4=pf4, rmkx=\E>, smkx=\E=, + use=ncr260vt100an, ncr260vt100wpp|NCR 2900/260 VT100 wide mode PC+ keyboard, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -19108,41 +19238,42 @@ ncr260vt200an|NCR 2900/260 VT200 with ANSI keyboard, am, mir, msgr, xenl, xon, cols#80, lines#24, nlab#32, acsc=``aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, - blink=\E[5m, bold=\E[1m, clear=\E[2J\E[1;1H$<20>, - cr=\r$<1>, csr=\E[%i%p1%d;%p2%dr$<5>, - cub=\E[%p1%dD$<5>, cub1=\E[D$<5>, cud=\E[%p1%dB$<5>, - cud1=\E[B$<5>, cuf=\E[%p1%dC$<5>, cuf1=\E[C$<5>, + clear=\E[2J\E[1;1H$<20>, cr=\r$<1>, + csr=\E[%i%p1%d;%p2%dr$<5>, cub=\E[%p1%dD$<5>, + cub1=\E[D$<5>, cud=\E[%p1%dB$<5>, cud1=\E[B$<5>, + cuf=\E[%p1%dC$<5>, cuf1=\E[C$<5>, cup=\E[%i%p1%d;%p2%dH$<10>, cuu=\E[%p1%dA$<5>, cuu1=\E[A$<5>, dch=\E[%p1%dP$<5>, dch1=\E[1P$<5>, dl=\E[%p1%dM$<5>, dl1=\E[M$<5>, ech=\E[%p1%dX$<5>, ed=\E[0J, el=\E[0K$<5>, el1=\E[1K$<5>, home=\E[H, hpa=\E[%p1%dG$<40>, ht=^I, hts=\EH, ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, ind=\ED$<5>, - indn=\E[%p1%dE$<5>, invis=\E[8m, + indn=\E[%p1%dE$<5>, is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$< 200>, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOy, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, - kf20=\E[34~, kf21=\E[31~, kf22=\E[32~, kf23=\E[33~, - kf24=\E[34~, kf25=\E[35~, kf26=\E[1~, kf27=\E[2~, - kf28=\E[3~, kf29=\E[4~, kf3=\EOR, kf30=\E[5~, kf31=\E[6~, - kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, kf35=\E[10~, kf4=\EOS, - kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khlp=\E[28~, krdo=\E[29~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, - nel=\EE, rc=\E8, rev=\E[7m, ri=\EM$<5>, rmacs=\017$<20>, - rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, - rmul=\E[24m, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, + kf21=\E[31~, kf22=\E[32~, kf23=\E[33~, kf24=\E[34~, + kf25=\E[35~, kf26=\E[1~, kf27=\E[2~, kf28=\E[3~, + kf29=\E[4~, kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, + kf34=\E[9~, kf35=\E[10~, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, krdo=\E[29~, mc0=\E[i, + mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, ri=\EM$<5>, + rmacs=\017$<20>, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[27m, rmul=\E[24m, rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$< 200>, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<20>, sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, vpa=\E[%p1%dd$<40>, use=vt220+vtedit, - use=vt220+cvis, use=vt220+keypad, use=ncr260vt+sl, + smir=\E[4h, smkx=\E[?1h\E=, tbc=\E[3g, + vpa=\E[%p1%dd$<40>, use=ansi+sgrbold, use=decid+cpr, + use=vt220+vtedit, use=vt220+cvis, use=vt220+keypad, + use=ncr260vt+sl, + ncr260vt200wan|NCR 2900/260 VT200 wide mode ANSI keyboard, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -19151,9 +19282,8 @@ ncr260vt200wan|NCR 2900/260 VT200 wide mode ANSI keyboard, ncr260vt200pp|NCR 2900/260 VT200 with PC+ keyboard, ka1=\E[H, ka3=\EOu, kb2=\E[V, kc3=\E[U, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[4~, - kend=\E[1~, khome=\E[H, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, rmkx=\E>, smkx=\E=, - use=ncr260vt200an, + kend=\E[1~, khome=\E[H, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, + rmkx=\E>, smkx=\E=, use=ncr260vt200an, ncr260vt200wpp|NCR 2900/260 VT200 wide mode PC+ keyboard, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -19166,17 +19296,17 @@ ncr260vt300an|NCR 2900/260 VT300 with ANSI keyboard, am, mir, msgr, xenl, xon, cols#80, lines#24, nlab#32, acsc=``aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, - blink=\E[5m, bold=\E[1m, clear=\E[2J\E[1;1H$<20>, - cr=\r$<1>, csr=\E[%i%p1%d;%p2%dr$<5>, - cub=\E[%p1%dD$<5>, cub1=\E[D$<5>, cud=\E[%p1%dB$<5>, - cud1=\E[B$<5>, cuf=\E[%p1%dC$<5>, cuf1=\E[C$<5>, + clear=\E[2J\E[1;1H$<20>, cr=\r$<1>, + csr=\E[%i%p1%d;%p2%dr$<5>, cub=\E[%p1%dD$<5>, + cub1=\E[D$<5>, cud=\E[%p1%dB$<5>, cud1=\E[B$<5>, + cuf=\E[%p1%dC$<5>, cuf1=\E[C$<5>, cup=\E[%i%p1%d;%p2%dH$<10>, cuu=\E[%p1%dA$<5>, cuu1=\E[A$<5>, dch=\E[%p1%dP$<5>, dch1=\E[1P$<5>, dl=\E[%p1%dM$<5>, dl1=\E[M$<5>, ech=\E[%p1%dX$<5>, ed=\E[0J, el=\E[0K$<5>, el1=\E[1K$<5>, home=\E[H, hpa=\E[%p1%dG$<40>, ht=^I, hts=\EH, ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, ind=\ED$<5>, - indn=\E[%p1%dE$<5>, invis=\E[8m, + indn=\E[%p1%dE$<5>, is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1 ;1H\E>$<200>, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, @@ -19188,7 +19318,7 @@ ncr260vt300an|NCR 2900/260 VT300 with ANSI keyboard, kf29=\E[4~, kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, kf35=\E[10~, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, krdo=\E[29~, mc0=\E[i, - mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM$<5>, + mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, ri=\EM$<5>, rmacs=\017$<20>, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1 @@ -19197,9 +19327,11 @@ ncr260vt300an|NCR 2900/260 VT300 with ANSI keyboard, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 %;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<20>, sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, vpa=\E[%p1%dd$<40>, use=vt220+vtedit, - use=vt220+cvis, use=vt220+keypad, use=ncr260vt+sl, + smir=\E[4h, smkx=\E[?1h\E=, tbc=\E[3g, + vpa=\E[%p1%dd$<40>, use=ansi+sgrbold, use=decid+cpr, + use=vt220+vtedit, use=vt220+cvis, use=vt220+keypad, + use=ncr260vt+sl, + ncr260vt300wan|NCR 2900/260 VT300 wide mode ANSI keyboard, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -19211,9 +19343,8 @@ ncr260vt300wan|NCR 2900/260 VT300 wide mode ANSI keyboard, ncr260vt300pp|NCR 2900/260 VT300 with PC+ keyboard, ka1=\E[H, ka3=\EOu, kb2=\E[V, kc3=\E[U, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[4~, - kend=\E[1~, khome=\E[H, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, rmkx=\E>, smkx=\E=, - use=ncr260vt300an, + kend=\E[1~, khome=\E[H, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, + rmkx=\E>, smkx=\E=, use=ncr260vt300an, ncr260vt300wpp|NCR260VT300WPP|NCR 2900/260 VT300 wide mode PC+ keyboard, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -19299,31 +19430,14 @@ ncr260wy325wpp|NCR 2900/260 Wyse 325 wide mode, # have it included, Un-comment it and recompile (using 'tic'). # ncr260wy350pp|NCR 2900/260 Wyse 350, - am, bw, km, mc5i, mir, msgr, xon, - colors#16, cols#80, lines#24, ncv#33, nlab#32, pairs#16, xmc#1, - acsc=07a?h;j5k3l2m1n8q:t4u9v=w0x6, bel=^G, blink=\EG2, - cbt=\EI, civis=\E`0, clear=\E+$<20>, cnorm=\E`1, cr=\r, - cub1=\010$<5>, cud1=\n$<5>, cuf1=\014$<5>, - cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<40>, cuu1=\013$<5>, - cvvis=\E`5, dch1=\EW$<50>, dim=\EGp, dl1=\ER$<5>, - ed=\Ey$<5>, el=\Et$<5>, home=\036$<10>, ht=^I, hts=\E1, - il1=\EE$<5>, ind=\n$<5>, invis=\EG1, + colors#16, ncv#33, pairs#16, + acsc=07a?h;j5k3l2m1n8q:t4u9v=w0x6, cbt=\EI, + cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<40>, ed=\Ey$<5>, + el=\Et$<5>, ht=^I, hts=\E1, is2=\Ee6\Ed/\Ee1\Ed*\Er\EO\E`1\E`:\E`@\E~!\E"\Ee4\Ex@\E`9 \Ee7$<100>, - kDC=\ER, kEND=\EY, kHOM=\E{, kPRT=\E7, kRIT=^L, ka1=^^, kbs=^H, - kc1=\ET, kc3=\EK, kcbt=\EI, kcub1=^H, kcud1=\n, kcuf1=^L, - kcuu1=^K, kdch1=\EW, kend=\ET, kf1=^A@\r, kf10=^AI\r, - kf11=^AJ\r, kf12=^AK\r, kf13=^AL\r, kf14=^AM\r, kf15=^AN\r, - kf16=^AO\r, kf17=^A`\r, kf18=^Aa\r, kf19=^Ab\r, kf2=^AA\r, - kf20=^Ac\r, kf21=^Ad\r, kf22=^Ae\r, kf23=^Af\r, kf24=^Ag\r, - kf25=^Ah\r, kf26=^Ai\r, kf27=^Aj\r, kf28=^Ak\r, kf29=^Al\r, - kf3=^AB\r, kf30=^Am\r, kf31=^An\r, kf32=^Ao\r, kf4=^AC\r, - kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, - khome=^^, kich1=\Eq, knp=\EK, kpp=\EJ, kprt=\EP, - mc0=\EP$<10>, mc4=^T, mc5=^R, mrcup=\Ew@%p1%{48}%+%c%p2%{32}%+%c%p3%{32}%+%c$<20>, - nel=\037$<5>, rev=\EG4, ri=\Ej$<5>, rmacs=\EH\003\EcB0, - rmam=\Ed., rmir=\Er, rmso=\EG0, rmul=\EG0, rmxon=\Ec20, + rmacs=\EH\003\EcB0, rs2=\Ee6\Ed/\Ee1\Ed*\Er\EO\E`1\E`:\E`@\E~!\E"\Ee4\Ex@\E`9 \Ee7$<100>, setb=\s, @@ -19333,9 +19447,8 @@ ncr260wy350pp|NCR 2900/260 Wyse 350, %e%p1%{9}%=%t%{98}%e%p1%{10}%=%t%{99}%e%p1%{11}%=%t %{101}%e%p1%{12}%=%t%{106}%e%p1%{13}%=%t%{110}%e%p1 %{14}%=%t%{111}%e%p1%{15}%=%t%{56}%;\Em0%c$<100>, - sgr0=\EG0\EH\003\EcD, smacs=\EH\002\EcB1, smam=\Ed/, - smir=\Eq, smso=\EGt, smul=\EG8, smxon=\Ec21, tbc=\E0, - use=ncr260vp+sl, + sgr0=\EG0\EH\003\EcD, smacs=\EH\002\EcB1, tbc=\E0, + use=ncr260vp+sl, use=ncr160wy50+pp, ncr260wy350wpp|NCR 2900/260 Wyse 350 wide mode, cols#132, cup=\Ea%i%p1%dR%p2%dC$<30>, @@ -19469,26 +19582,24 @@ ncr160wy60pp|NCR 2900/160 Wyse 60, ncr160wy60wpp|NCR 2900/160 Wyse 60 wide mode, use=ncr260wy60wpp, ncrvt100an|ncrvt100pp|NCR VT100 for the 2900 terminal, - am, hs, mc5i, mir, msgr, xon, - cols#80, it#8, lines#24, nlab#32, + hs, mc5i, mir, xon, + nlab#32, acsc=``aaffgghhiijjkkllmmnnqqttuuvvwwxxyyzz~~, - bel=^G, blink=\E[5m$<30>, bold=\E[1m$<30>, - clear=\E[2J\E[1;1H$<300>, cr=\r, + blink=\E[5m$<30>, bold=\E[1m$<30>, + clear=\E[2J\E[1;1H$<300>, csr=\E[%i%p1%d;%p2%dr$<100>, cub=\E[%p1%dD$<30>, cub1=\E[D$<2>, cud=\E[%p1%dB$<30>, cud1=\E[B$<2>, - cuf=\E[%p1%dC$<30>, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<100>, cuu=\E[%p1%dA$<30>, - cuu1=\E[A$<2>, dch=\E[%p1%dP$<40>, dch1=\E[1P$<10>, - dl=\E[%p1%dM$<70>, dl1=\E[M$<40>, dsl=\E[31l$<25>, - ed=\E[0J$<300>, el=\E[0K$<30>, el1=\E[1K$<30>, - enacs=\E(B\E)0$<40>, fsl=1$<10>, home=\E[H$<2>$<80>, - ht=^I, hts=\EH, il=\E[%p1%dL$<80>, il1=\E[B\E[L$<80>, - ind=\ED, + cuf=\E[%p1%dC$<30>, cup=\E[%i%p1%d;%p2%dH$<100>, + cuu=\E[%p1%dA$<30>, dch=\E[%p1%dP$<40>, + dch1=\E[1P$<10>, dl=\E[%p1%dM$<70>, dl1=\E[M$<40>, + dsl=\E[31l$<25>, ed=\E[0J$<300>, el=\E[0K$<30>, + el1=\E[1K$<30>, enacs=\E(B\E)0$<40>, fsl=1$<10>, + home=\E[H$<2>$<80>, il=\E[%p1%dL$<80>, + il1=\E[B\E[L$<80>, ind=\ED, is2=\E[12h\E[?10l\E%/0n\E[P\031\E[?3l\E(B\E)0$<200>, - kLFT=\E[D, kRIT=\E[C, ka1=\E[H, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kent=\r, kf1=\EOP, - kf2=\EOQ, kf3=\EOR, kf4=\EOS, mc0=\E[i$<100>, nel=\EE, - rc=\E8, rev=\E[7m$<30>, ri=\EM$<50>, rmacs=\017$<90>, + kLFT=\E[D, kRIT=\E[C, ka1=\E[H, kent=\r, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, mc0=\E[i$<100>, nel=\EE, rc=\E8, + rev=\E[7m$<30>, ri=\EM$<50>, rmacs=\017$<90>, rmir=\E[4l$<80>, rmso=\E[0m$<30>, rmul=\E[0m$<30>, rs2=\Ec\E[12;31h\E[?3;4;5;10l\E[?6;7;19;25h\E[33;34l\E[0m\E( B\E)0\E%/0n\E[P\031$<200>, @@ -19497,7 +19608,7 @@ ncrvt100an|ncrvt100pp|NCR VT100 for the 2900 terminal, %p3%|%t;7%;%?%p4%t;5%;m$<120>, sgr0=\017\E[0m$<120>, smacs=\016$<90>, smir=\E[4h$<80>, smso=\E[7m$<30>, smul=\E[4m$<30>, tbc=\E[3g$<40>, - tsl=\E[>+1$<70>, + tsl=\E[>+1$<70>, use=decid+cpr, use=vt100+4bsd, ncrvt100wan|NCRVT100WPP|ncrvt100wpp|NCR VT100 emulation of the 2900 terminal, cols#132, is2=\E[12h\E[?10l\E%/0n\E[P\031\E[?3h\E(B\E)0$<200>, @@ -19577,10 +19688,9 @@ ncr7900iv|NCR 7900 model 4, bel=^G, clear=^L, cr=\r, cub1=^H, cud1=\n, cup=\013%p1%{64}%+%c\E\005%p2%02d, dl1=\E^O, dsl=\Ey1, fsl=\Ek\Ey5, home=\013@\E^E00, il1=\E^N, ind=\n, kbs=^H, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf1=\ES, kf2=\ET, - kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, - khome=\EH, lf6=blue, lf7=red, lf8=white, nel=\r\n, - tsl=\Ej\Ex5\Ex1\EY8%p1%{32}%+%c\Eo, + kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, + kf8=\ER, khome=\EH, lf6=blue, lf7=red, lf8=white, nel=\r\n, + tsl=\Ej\Ex5\Ex1\EY8%p1%{32}%+%c\Eo, use=vt52+arrows, # Warning: This terminal will lock out the keyboard when it receives a CTRL-D. # The user can enter a CTRL-B to get out of this locked state. # In , we want to output the character given by the formula: @@ -19664,7 +19774,7 @@ ndr9500-mc|NDR 9500 with magic cookies (enables underline inverse video invisibl blink=\EG2, invis=\EG1, rev=\EG4, rmso=\EG0, rmul=\EG0, sgr=\E%%\E(%?%p5%p8%|%t\E)%;%?%p9%t\E$%;\EG%{48}%?%p7%t%{1} %+%;%?%p4%t%{2}%+%;%?%p3%p1%|%t%{4}%+%;%?%p2%t%{8}%+%;%c, - sgr0=\EG0\E%%\E(, smso=\EG4, smul=\EG8, use=ndr9500, + smso=\EG4, smul=\EG8, use=ndr9500, ndr9500-25-mc|NDR 500 with 25 lines and magic cookies, lines#25, use=ndr9500-mc, @@ -19747,18 +19857,17 @@ uts30|Sperry UTS30 with cp/m@1R1, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\ER, clear=^L, cnorm=\ES, cr=\r, csr=\EU%p1%{32}%+%c%p2%{32}%+%c, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EM, - dl=\E[%p1%dM, dl1=\EL, ed=\E[J, el=\E[K, fsl=\r, home=\E[H, - ht=^I, ich=\E[%p1%d@, ich1=\EO, il=\E[%p1%dL, il1=\EN, - ind=\n, indn=\E[%p1%dB, is2=\E[U 7\E[24;1H, kbs=^H, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, khome=\E[H, - rc=\EX, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EI, - rin=\E[%p1%dA, rmacs=\Ed, rmam=\E[?7l, rmso=\E[m, - rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - sc=\EW, sgr0=\E[m, smacs=\EF, smam=\E[?7m, smso=\E[7m, - smul=\E[4m, tsl=\E], uc=\EPB, + cub1=^H, cud1=\E[B, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, + dch1=\EM, dl=\E[%p1%dM, dl1=\EL, ed=\E[J, el=\E[K, fsl=\r, + home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\EO, il=\E[%p1%dL, + il1=\EN, ind=\n, indn=\E[%p1%dB, is2=\E[U 7\E[24;1H, + khome=\E[H, rc=\EX, rev=\E[7m, + rf=/usr/share/tabset/vt100, ri=\EI, rin=\E[%p1%dA, + rmacs=\Ed, rmam=\E[?7l, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\EW, + sgr0=\E[m, smacs=\EF, smam=\E[?7m, tsl=\E], uc=\EPB, + use=ansi+apparrows, use=ansi+local, use=ansi+sgrso, + use=ansi+sgrul, #### Tandem # @@ -19795,44 +19904,42 @@ dmterm|deskmate terminal, bel=^G, civis=\EG5, clear=\Ej, cnorm=\EG6, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\ES, dl1=\ER, ed=\EJ, el=\EK, home=\EH, ht=^I, - ich1=\EQ, il1=\EP, ind=\EX, invis@, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, kf0=\E1, kf1=\E2, kf2=\E3, kf3=\E4, - kf4=\E5, kf5=\E6, kf6=\E7, kf7=\E8, kf8=\E9, kf9=\E0, + ich1=\EQ, il1=\EP, ind=\EX, invis@, kf0=\E1, kf1=\E2, kf2=\E3, + kf3=\E4, kf4=\E5, kf5=\E6, kf6=\E7, kf7=\E8, kf8=\E9, kf9=\E0, khome=\EH, lf0=f1, lf1=f2, lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf8=f9, lf9=f10, ll=\EE, rmul@, smul@, - use=adm+sgr, + use=adm+sgr, use=vt52+arrows, dt100|dt-100|Tandy DT-100 terminal, xon, cols#80, lines#24, xmc#1, acsc=jjkkllmmnnqqttuuvvwwxx, bel=^G, clear=\E[H\E[2J, - cr=\r, csr=\E[%p1%2d;%p2%2dr, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - ich1=\E[@, il1=\E[L, ind=\n, is2=\E[?3l\E)0\E(B, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\E[?3i, - kf10=\E[?5i, kf2=\E[2i, kf3=\E[@, kf4=\E[M, kf5=\E[17~, - kf6=\E[18~, kf7=\E[19~, kf8=\E[20~, kf9=\E[21~, khome=\E[H, - knp=\E[29~, kpp=\E[28~, lf1=f1, lf2=f2, lf3=f3, lf4=f4, lf5=f5, - lf6=f6, lf7=f7, lf8=f8, ri=\EM, rmacs=^O, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smacs=^N, smso=\E[7m, smul=\E[4m, - use=vt220+cvis, + cr=\r, csr=\E[%p1%2d;%p2%2dr, cub1=^H, + cup=\010\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, ed=\E[J, + el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, ind=\n, + is2=\E[?3l\E)0\E(B, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, kf1=\E[?3i, kf10=\E[?5i, kf2=\E[2i, kf3=\E[@, + kf4=\E[M, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~, + kf9=\E[21~, khome=\E[H, knp=\E[29~, kpp=\E[28~, lf1=f1, + lf2=f2, lf3=f3, lf4=f4, lf5=f5, lf6=f6, lf7=f7, lf8=f8, ri=\EM, + rmacs=^O, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smacs=^N, + smso=\E[7m, smul=\E[4m, use=ansi+local1, use=vt220+cvis, dt100w|dt-100w|Tandy DT-100 terminal (wide mode), cols#132, use=dt100, dt110|Tandy DT-110 emulating ANSI, xon, cols#80, lines#24, acsc=jjkkllmmnnqqttuuvvwwxx, bel=^G, clear=\E[H\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[0P, dl1=\E[0M, ed=\E[0J, el=\E[0K, enacs=\E(B\E)0, - home=\E[H, ht=^I, ich1=\E[0@, il1=\E[0L, ind=\n, - is2=\E[?3l\E)0\E(B, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kend=\E[K, kf1=\E[1~, kf10=\E[10~, kf2=\E[2~, - kf3=\E[3~, kf4=\E[4~, kf5=\E[5~, kf6=\E[6~, kf7=\E[7~, - kf8=\E[8~, kf9=\E[9~, khome=\E[G, kich1=\E[@, knp=\E[26~, - kpp=\E[25~, lf0=f1, lf1=f2, lf2=f3, lf3=f4, lf4=f5, lf5=f6, - lf6=f7, lf7=f8, lf8=f9, lf9=f10, ri=\EM, rmacs=^O, rmso=\E[m, - rmul=\E[m, sgr0=\E[m, smacs=^N, smso=\E[7m, smul=\E[4m, + cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, + cup=\010\E[%i%p1%d;%p2%dH, dch1=\E[0P, dl1=\E[0M, + ed=\E[0J, el=\E[0K, enacs=\E(B\E)0, home=\E[H, ht=^I, + ich1=\E[0@, il1=\E[0L, ind=\n, is2=\E[?3l\E)0\E(B, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[K, + kf1=\E[1~, kf10=\E[10~, kf2=\E[2~, kf3=\E[3~, kf4=\E[4~, + kf5=\E[5~, kf6=\E[6~, kf7=\E[7~, kf8=\E[8~, kf9=\E[9~, + khome=\E[G, kich1=\E[@, knp=\E[26~, kpp=\E[25~, lf0=f1, + lf1=f2, lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf8=f9, + lf9=f10, ri=\EM, rmacs=^O, rmso=\E[m, rmul=\E[m, sgr0=\E[m, + smacs=^N, smso=\E[7m, smul=\E[4m, use=ansi+local1, use=vt220+cvis, pt210|TRS-80 PT-210 printing terminal, hc, os, @@ -19995,25 +20102,13 @@ tek4105|Tektronix 4105, # (tek4105-30: I added / based on the init string -- esr) tek4105-30|Tektronix 4015 emulating 30 line VT100, - am, mir, msgr, xenl, xon, - cols#80, it#8, lines#30, vt#3, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, - clear=\E[H\E[J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, - cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, - enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=\n, kbs=^H, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, - rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, - rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5 - %;m%?%p9%t\016%e\017%;$<2>, - sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, - use=vt100+fnkeys, + mir, xenl, xon, + lines#30, vt#3, + cub1=^H, cud1=\n, cuf1=\E[C$<2>, cuu1=\E[A$<2>, kcub1=\EOD, + kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rmam=\E[?7l, + rmkx=\E[?1l\E>, rmso=\E[m$<2>, smam=\E[?7h, + smkx=\E[?1h\E=, use=ansi+csr, use=ansi+local, + use=vt100+4bsd, use=vt100+fnkeys, # Tektronix 4105 from BRL # The following setup modes are assumed for normal operation: @@ -20036,32 +20131,28 @@ tek4105-30|Tektronix 4015 emulating 30 line VT100, # delays are specified; use "stty ixon -ixany" to enable DC3/DC1 flow control! # "IC" cannot be used in combination with "im" & "ei". # "tek4105a" is just a guess: -tek4105a|Tektronix 4105, +tek4105a|Tektronix 4105 (BRL), OTbs, OTpt, msgr, xon, - OTkn#8, cols#80, it#8, lines#30, vt#3, - acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - civis=\E%!0\ETD00\E%!1, clear=\E[H\E[J, - cnorm=\E%!0\ETD10\E%!1, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\EM, cvvis=\E%!0\ETD70\E%!1, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\EH, - il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E%!1, kbs=^H, + OTkn#8, cols#80, lines#30, vt#3, + acsc=, bel=^G, blink=\E[5m, bold=\E[1m, + civis=\E%!0\ETD00\E%!1, cnorm=\E%!0\ETD10\E%!1, cr=\r, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, + cvvis=\E%!0\ETD70\E%!1, dch=\E[%p1%dP, dch1=\E[P, + ech=\E[%p1%dX, home=\E[H, ind=\n, is2=\E%!1, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOA, kf1=\EOB, kf2=\EOC, kf3=\EOD, kf4=\EOP, kf5=\EOQ, kf6=\EOR, kf7=\EOS, lf0=F1, lf1=F2, lf2=F3, lf3=F4, lf4=F5, lf5=F6, lf6=F8, - ll=\E[30;H, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, + ll=\E[30;H, nel=\EE, rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E%!0\ELBH=\E%!1, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs2=\030\E%!0\EKC\E\014\EKR0\EKF0\ENM0\ELBH=\ETF8000010F40 \ELI100\ELLA>\ELM0\EKE0\ENF1\EKS0\END0\E%!1\Ec\E[?3;5l \E[?7;8h\E[r\E[m\E>, - sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - use=ecma+index, + sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+inittabs, + use=ansi+local, use=ecma+index, -# # Tektronix 4106/4107/4109 from BRL # The following setup modes are assumed for normal operation: # CODE ansi COLUMNMODE 80 CRLF no @@ -20085,28 +20176,25 @@ tek4105a|Tektronix 4105, # "IC" cannot be used in combination with "im" & "ei". tek4106brl|tek4107brl|tek4109brl|Tektronix 4106 4107 or 4109, msgr, xon, - cols#80, it#8, lines#32, vt#3, - acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, - civis=\E%!0\ETD00\E%!1, clear=\E[H\E[J, - cnorm=\E%!0\ETD10\E%!1, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\EM, cvvis=\E%!0\ETD70\E%!1, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\EH, - il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E%!1, kbs=^H, + cols#80, lines#32, vt#3, + acsc=, bel=^G, blink=\E[5m, bold=\E[1m, + civis=\E%!0\ETD00\E%!1, cnorm=\E%!0\ETD10\E%!1, cr=\r, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, + cvvis=\E%!0\ETD70\E%!1, dch=\E[%p1%dP, dch1=\E[P, + ech=\E[%p1%dX, home=\E[H, ind=\n, is2=\E%!1, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOA, kf1=\EOB, kf2=\EOC, kf3=\EOD, kf4=\EOP, kf5=\EOQ, kf6=\EOR, kf7=\EOS, lf0=F1, lf1=F2, lf2=F3, lf3=F4, lf4=F5, lf5=F6, lf6=F8, - ll=\E[32;H, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, + ll=\E[32;H, nel=\EE, rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E%!0\ELBH=\E%!1, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=\030\E%!0\EKC\E\014\EKR0\EKF0\ENM0\ELBH=\ETF8000010F40 \ELI100\ELLB0\ELM0\EKE0\ENF1\EKS0\END0\ERE0\E%!1\Ec\E[?3 ;5l\E[?7;8h\E[r\E[m\E>, - sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, - smkx=\E[?1h\E=, smso=\E[7;42m, smul=\E[4m, tbc=\E[3g, - use=ecma+index, + sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7;42m, smul=\E[4m, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+inittabs, + use=ansi+local, use=ecma+index, # Refer to: # TEK Programmer's Reference @@ -20134,13 +20222,12 @@ tek4107|tek4109|Tektronix terminals 4107 4109, cub1=^H, cud1=\n, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E%!3, dim=\E%!1\E[<0m$<2>\E%!0, ed=\EJ, el=\EK, ht=^I, ind=\n, - kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - rev=\E%!1\E[7m$<2>\E%!0, ri=\EI, + kbs=^H, rev=\E%!1\E[7m$<2>\E%!0, ri=\EI, rmso=\E%!1\E[m$<2>\E%!0, rmul=\E%!1\E[m$<2>\E%!0, sgr=\E%%!1\E[%?%p1%t;7;5%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%; %?%p5%t<0%;%?%p6%t;1%;m$<2>\E%%!0, sgr0=\E%!1\E[m$<2>\E%!0, smso=\E%!1\E[7;5m$<2>\E%!0, - smul=\E%!1\E[4m$<2>\E%!0, + smul=\E%!1\E[4m$<2>\E%!0, use=vt52+arrows, # Tektronix 4207 with sysline. In the ancestral termcap file this was 4107-s; # see the note attached to tek4207. tek4207-s|Tektronix 4207 with sysline but no memory, @@ -20217,34 +20304,27 @@ otek4115|Tektronix 4115 (old), OTbs, am, da, db, eo, cols#80, it#8, lines#34, cbt=\E[Z, clear=\E[H\E[2J, - cnorm=\E%!0\ELBG8\E%!1\E[34;1H, cub1=\E[D, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - cvvis=\E%!0\ELBB2\E%!1, dch1=\E[P, dl1=\E[M, ed=\E[J, - el=\E[K, home=\E[H, ht=^I, if=/usr/share/tabset/vt100, - il1=\E[L, + cnorm=\E%!0\ELBG8\E%!1\E[34;1H, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E%!0\ELBB2\E%!1, + dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + if=/usr/share/tabset/vt100, il1=\E[L, is2=\E%!0\E%\014\ELV0\EKA1\ELBB2\ENU@=\ELLB2\ELM0\ELV1\EKYA? \E%!1\E[<1l\E[?7h\E[?8h\E[34;1H\E[34B\E[m, kbs=^H, ri=\EM, rmam=\E[?7l, rmcup=\E%!0\ELBG8\E%!1\E[34;1H\E[J, rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smcup=\E%!0\ELBB2\E%!1, smir=\E[4h, smkx=\E=, smso=\E[7m, - smul=\E[4m, + smul=\E[4m, use=ansi+local1, tek4115|Tektronix 4115 entry with more ANSI capabilities (new), am, xon, cols#80, lines#34, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, - cr=\r, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, hpa=\E[%p1%{1}%+%dG, - ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\n, invis=\E[8m, kbs=^H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, rev=\E[7m, - rmam=\E[?7l, rmso=\E[m, rmul=\E[m, - sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1; - %;%?%p7%t8;%;m, - sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - vpa=\E[%p1%{1}%+%dd, use=ansi+rep, + bel=^G, cr=\r, cub1=^H, cud1=\n, dch1=\E[P, ich=\E[%p1%d@, + ich1=\E[@, ind=\n, kcuu1=\E[A, rmam=\E[?7l, sgr0=\E[m, + smam=\E[?7h, use=ansi+arrows, use=ansi+cup, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ansi+rep, use=ansi+rca, use=ansi+sgrbold, + use=ansi+tabs, + # The tek4125 emulates a VT100 incorrectly - the scrolling region # command is ignored. The following entry replaces with the needed # , , and ; removes some cursor pad commands that the tek4125 @@ -20288,15 +20368,15 @@ tek4207|Tektronix 4207 graphics terminal with memory, tek4404|Tektronix 4404, OTbs, cols#80, it#8, lines#32, - blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[1M, - ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\E[2I, il1=\E[1L, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, rc=\E8, + blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cub1=^H, cud1=\n, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, + dl1=\E[1M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\E[2I, + il1=\E[1L, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, rmcup=\E[1;1H\E[0J\E[?6h\E[?1l, rmir=\E[4l, - rmkx=\E[?1h, rmso=\E[27m, rmul=\E[m, sc=\E7, sgr0=\E[m, + rmkx=\E[?1h, rmso=\E[27m, rmul=\E[m, sgr0=\E[m, smcup=\E%\E!1\E[1;32r\E[?6l\E>, smir=\E[4h, - smkx=\E[?1l, smso=\E[7m, smul=\E[4m, + smkx=\E[?1l, smso=\E[7m, smul=\E[4m, use=ansi+csr, + # Some unknown person wrote: # I added the is string - straight Unix has ESC ; in the login # string which sets a ct8500 into monitor mode (aka 4025 snoopy @@ -20329,9 +20409,7 @@ tek4205|Tektronix 4205, colors#8, cols#80, it#8, lines#30, ncv#49, pairs#63, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[=7;<4m, cbt=\E[Z, - clear=\E[2J\E[H, cr=\r, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + clear=\E[2J\E[H, cr=\r, cup=\E[%i%p1%d;%p2%dH, dch1=\E[1P, dim=\E[=1;<6m, dl=\E[%p1%dM, dl1=\E[1M, ech=\E%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, home=\E[H, ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[1L, @@ -20362,7 +20440,7 @@ tek4205|Tektronix 4205, %e1m%;, sgr0=\E[=0;<1m\E[24;25;27m\017, smacs=^N, smcup=\E%%!1\E[?6l\E[2J, smir=\E[4h, smso=\E[=2;<3m, - smul=\E[4m, tbc=\E[1g, + smul=\E[4m, tbc=\E[1g, use=ansi+local, #### Teletype (tty) # @@ -20419,9 +20497,9 @@ scanset|sc410|sc415|Tymshare Scan Set, cols#80, lines#24, acsc=j%k4l, sc=^B, smacs=^N, + use=vt52+arrows, #### Volker-Craig (vc) # @@ -20509,21 +20587,18 @@ ibmpc|wy60-PC|wyse60-PC|IBM PC/XT running PC/IX, cols#80, it#8, lines#24, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x \263, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\Ec, cr=\r, - cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - home=\E[H, hpa=\E[%i%p1%dG, ind=\E[S\E[B, - indn=\E[%p1%dS\E[%p1%dB, invis=\E[30;40m, kbs=^H, - kcbt=^], kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=^?, kend=\E[Y, kf1=\240, kf10=\251, kf2=\241, kf3=\242, - kf4=\243, kf5=\244, kf6=\245, kf7=\246, kf8=\247, kf9=\250, - khome=\E[H, kich1=\E[^H, knp=\E[U, kpp=\E[V, ll=\E[24;1H, - nel=\r, rev=\E[7m, ri=\E[T\E[A, rin=\E[%p1%dT\E[%p1%dA, - rmso=\E[m, rmul=\E[m, + bel=^G, clear=\Ec, cr=\r, cup=\E[%i%p1%d;%p2%dH, + ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, + hpa=\E[%i%p1%dG, ind=\E[S\E[B, indn=\E[%p1%dS\E[%p1%dB, + invis=\E[30;40m, kcbt=^], kdch1=^?, kend=\E[Y, kf1=\240, + kf10=\251, kf2=\241, kf3=\242, kf4=\243, kf5=\244, kf6=\245, + kf7=\246, kf8=\247, kf9=\250, kich1=\E[^H, knp=\E[U, + kpp=\E[V, ll=\E[24;1H, nel=\r, rev=\E[7m, ri=\E[T\E[A, + rin=\E[%p1%dT\E[%p1%dA, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1 %;%?%p7%t30;40%;m, - sgr0=\E[m, smso=\E[7m, smul=\E[4m, + sgr0=\E[m, use=ansi+arrows, use=ansi+local, + use=ansi+sgrbold, #### Apple II # @@ -20564,8 +20639,7 @@ apple2e|Apple //e, # mcvax!vu44!vu45!wilcke uses the "ap" entry together with Ascii Express Pro # 4.20, with incoming and outgoing terminals both on 0, emulation On. apple2e-p|Apple //e via Pascal, - cup=\036%p2%{32}%+%c%p1%{32}%+%c, kbs=^H, kcub1=^H, - kcud1=\n, use=apple2e, + cup=\036%p2%{32}%+%c%p1%{32}%+%c, use=apple2e, # (ASCII Express) MouseTalk "Standard Apple //" emulation from BRL # Enable DC3/DC1 flow control with "stty ixon -ixany". apple-ae|ASCII Express, @@ -20670,9 +20744,9 @@ apple-videx3|vapple|Apple II with 80 col card, cols#80, lines#24, clear=\Ev, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, el=\Ex, - home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!, kf5=\E", kf6=\E#, - kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH, + home=\EH, kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!, + kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH, + use=vt52+arrows, #From: decvax!cbosgd!cbdkc1!mww Mike Warren via BRL aepro|Apple II+ running ASCII Express Pro--vt52, OTbs, @@ -20696,12 +20770,12 @@ lisa|Apple Lisa console display (black on white), OTbs, am, eo, msgr, cols#88, it#8, lines#32, acsc=jdkclfmenbqattuvvuwsx`, civis=\E[5h, clear=^L, - cnorm=\E[5l, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, - is2=\E>\E[m\014, kbs=^H, kcub1=\E[D, kcud1=\E[B, + cnorm=\E[5l, cub1=^H, cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, + dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@, + il1=\E[L, is2=\E>\E[m\014, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, rmacs=\E[10m, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smacs=\E[11m, smso=\E[7m, smul=\E[4m, + use=ansi+local1, liswb|Apple Lisa console display (white on black), is2=\E>\E[0;7m\014, rmso=\E[0;7m, rmul=\E[0;7m, smso=\E[m, smul=\E[4m, use=lisa, @@ -20721,16 +20795,15 @@ lisaterm|Apple Lisa or Lisa/2 running LisaTerm VT100 emulation, OTbs, OTpt, am, xenl, xon, OTkn#4, cols#80, it#8, lines#24, vt#3, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, ed=\E[J, - el=\E[K, home=\E[H, ht=^I, hts=\EH, ind=\n, kbs=^H, kcub1=\EOD, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, + home=\E[H, ht=^I, hts=\EH, ind=\n, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOP, kf1=\EOQ, - kf2=\EOR, kf3=\EOS, lf0=F1, lf1=F2, lf2=F3, lf3=F4, rc=\E8, - rev=\E[7m, ri=\EM, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + kf2=\EOR, kf3=\EOS, lf0=F1, lf1=F2, lf2=F3, lf3=F4, rev=\E[7m, + ri=\EM, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=\E>\E[?1l\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r, - sc=\E7, sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, + sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + tbc=\E[3g, use=ansi+csr, use=ansi+local, + # Lisaterm in 132 column ("wide") mode. lisaterm-w|Apple Lisa with Lisaterm in 132 column mode, cols#132, @@ -20784,11 +20857,11 @@ trs16|trs-80 model 16 console, cnorm=\ERC, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, ich1=\EP, il1=\EL, - ind=\n, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - kf0=^A, kf1=^B, kf2=^D, kf3=^L, kf4=^U, kf5=^P, kf6=^N, kf7=^S, - khome=^W, lf0=f1, lf1=f2, lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, - lf7=f8, mc4=\E]+, mc5=\E]=, rmacs=\ERg, rmso=\ER@, sgr0=\ER@, - smacs=\ERG, smso=\ERD, + ind=\n, kbs=^H, kf0=^A, kf1=^B, kf2=^D, kf3=^L, kf4=^U, kf5=^P, + kf6=^N, kf7=^S, khome=^W, lf0=f1, lf1=f2, lf2=f3, lf3=f4, lf4=f5, + lf5=f6, lf6=f7, lf7=f8, mc4=\E]+, mc5=\E]=, rmacs=\ERg, + rmso=\ER@, sgr0=\ER@, smacs=\ERG, smso=\ERD, + use=vt52+arrows, #### Commodore Business Machines # @@ -20821,18 +20894,16 @@ amiga|Amiga ANSI, OTbs, am, bw, xenl, cols#80, lines#24, acsc=, bel=^G, blink=\E[7;2m, bold=\E[1m, cbt=\E[Z, - civis=\E[0 p, clear=\E[H\E[J, cnorm=\E[ p, cub=\E[%p1%dD, - cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, - invis=\E[8m, is2=\E[20l, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf0=\E[9~, kf1=\E[0~, kf2=\E[1~, - kf3=\E[2~, kf4=\E[3~, kf5=\E[4~, kf6=\E[5~, kf7=\E[6~, - kf8=\E[7~, kf9=\E[8~, rev=\E[7m, ri=\E[T, rmacs=^O, - rmso=\E[m, rmul=\E[m, rs1=\Ec, sgr0=\E[m, smacs=^N, - smso=\E[7m, smul=\E[4m, use=ecma+index, + civis=\E[0 p, cnorm=\E[ p, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, home=\E[H, + ich=\E[%p1%d@, ich1=\E[@, ind=\E[S, invis=\E[8m, + is2=\E[20l, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, kf0=\E[9~, kf1=\E[0~, kf2=\E[1~, kf3=\E[2~, + kf4=\E[3~, kf5=\E[4~, kf6=\E[5~, kf7=\E[6~, kf8=\E[7~, + kf9=\E[8~, rev=\E[7m, ri=\E[T, rmacs=^O, rmso=\E[m, + rmul=\E[m, rs1=\Ec, sgr0=\E[m, smacs=^N, smso=\E[7m, + smul=\E[4m, use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ecma+index, # From: Hans Verkuil , 4 Dec 1995 # (amiga: added empty to suppress a warning. @@ -20875,17 +20946,13 @@ amiga-vnc|Amiga using VNC console (black on light gray), am, da, db, msgr, ndscr, btns#1, colors#16, cols#80, lines#24, lm#0, ncv#0, pairs#0x100, bel=^G, blink=\E[7;2m, bold=\E[1m, civis=\E[0p, - clear=\E[H\E[J, cnorm=\E[p\E[>?6l, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\E[>?6h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[1M, ed=\E[J, el=\E[K, flash=^G, + cnorm=\E[p\E[>?6l, cr=\r, csr=\E[%i%p1%d;%p2%dr, + cup=\E[%i%p1%d;%p2%dH, cvvis=\E[>?6h, dch=\E[%p1%dP, + dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[1M, flash=^G, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[1L, ind=\ED, invis=\E8m, is2=\E[>?2;18l\E[>?26;?6;20;>?15;?7;>?22;>?8h, - kbs=^H, kcbt=\233Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=^?, kf0=\E[9~, kf1=\E[0~, kf2=\E[1~, + kcbt=\233Z, kdch1=^?, kf0=\E[9~, kf1=\E[0~, kf2=\E[1~, kf3=\E[2~, kf4=\E[3~, kf5=\E[4~, kf6=\E[5~, kf7=\E[6~, kf8=\E[7~, kf9=\E[8~, khlp=\E[?~, khome=\E[44~, kll=\E[45~, kmous=\E[M, knp=\E[42~, kpp=\E[41~, nel=\EE, oc=\E[0m, @@ -20895,7 +20962,8 @@ amiga-vnc|Amiga using VNC console (black on light gray), setab=\E[%?%p1%{8}%>%t%'F'%p1%+%d%e4%p1%d%;m, setaf=\E[%?%p1%{8}%>%t%'2'%p1%+%d%e3%p1%d%;m, sgr0=\E[0m\017\E[30;85;>15m, smcup=\E[?7h, smkx=\E[?1h, - smso=\E[1m, smul=\E[4m, use=ecma+index, + smso=\E[1m, smul=\E[4m, use=ansi+arrows, use=ansi+erase, + use=ansi+local, use=ecma+index, # MorphOS on Genesi Pegasos # By Pavel Fedin @@ -21000,6 +21068,7 @@ osexec|Osborne executive, # See # https://web.archive.org/web/20120703021949/http://www.minix3.org/manpages/html4/console.html minix|minix console (v3), + NQ, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j \331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v \301w\302x\263y\363z\362{\343|\330}\234~\376, @@ -21023,36 +21092,23 @@ minix-3.0|minix console (v3.0), # See # https://web.archive.org/web/20030914201935/http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html -# This is the entry provided with minix 1.7.4, with bogus :ri: removed. +# This matches the entry provided with minix 1.7.4, with bogus :ri: removed. minix-1.7|minix console (v1.7), - am, xenl, - cols#80, it#8, lines#25, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, el1=\E[2K, - home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\n, is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U, - kf3=\E[T, kf4=\E[S, kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp, - lf2=PgDn, lf3=Num +, lf4=Num -, lf5=Num 5, nel=\r\n, - rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, - smso=\E[7m, smul=\E[4m, + am, xenl, xon@, + el1=\E[2K, is2=\E[0m, lf0=End, lf1=PgUp, lf2=PgDn, lf3=Num +, + lf4=Num -, lf5=Num 5, use=minix-1.5, # Corrected Jan 14, 1997 by Vincent Broman minix-old|minix-1.5|minix console (v1.5), - xon, + xon, NQ, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, - kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kf0=\E[Y, kf1=\E[V, kf2=\E[U, kf3=\E[T, kf4=\E[S, kf5=\E[G, - khome=\E[H, nel=\r\n, rev=\E[7m, ri=\EM, rmso=\E[0m, + cub1=^H, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + ed=\E[0J, el=\E[K, home=\E[H, ht=^I, ich=\E[%p1%d@, + ich1=\E[@, ind=\n, kf0=\E[Y, kf1=\E[V, kf2=\E[U, kf3=\E[T, + kf4=\E[S, kf5=\E[G, nel=\r\n, rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m, + use=ansi+arrows, use=ansi+idl, use=ansi+local, + # The linewrap option can be specified by editing /usr/include/minix/config.h # before recompiling the minix 1.5 kernel. minix-old-am|minix console with linewrap, @@ -21070,9 +21126,9 @@ pc-coherent|pcz19|coherent|IBM PC console running Coherent, cols#80, it#8, lines#25, bel=^G, clear=\EE, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EN, - ed=\EJ, el=\EK, home=\EH, ht=^I, ind=\n, kbs=^H, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\EH, ri=\EI, rmir=\EO, - rmso=\Eq, sgr0=\Eq, smir=\E@, smso=\Ep, + ed=\EJ, el=\EK, home=\EH, ht=^I, ind=\n, kbs=^H, khome=\EH, + ri=\EI, rmir=\EO, rmso=\Eq, sgr0=\Eq, smir=\E@, smso=\Ep, + use=vt52+arrows, # According to the Venix 1.1 manual, the PC console is similar # to a DEC VT52. Differences seem to be (1) arrow keys send @@ -21104,16 +21160,17 @@ mai|basic4|MAI Basic Four in ANSI mode, am, da, db, mir, msgr, cols#82, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=^]^_, cnorm=\E[?7h, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=^X, - cup=\E[%i%p1%d;%p2%dH, cuu1=^Z, cvvis=\E[?7l, dch1=\E[1P, - dl1=\E[M, ed=^_, el=^^, home=^], ht=^I, - if=/usr/share/tabset/vt100, il1=\E[L, ind=\ED, + cr=\r, cub1=^H, cud1=\n, cuf1=^X, cup=\E[%i%p1%d;%p2%dH, + cuu1=^Z, cvvis=\E[?7l, dch1=\E[1P, dl1=\E[M, ed=^_, el=^^, + home=^], ht=^I, if=/usr/share/tabset/vt100, il1=\E[L, + ind=\ED, is2=\E>\E[?1h\E[?7h\E[?5l\017\E(B\E[m\E[20l\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, - kf7=\EOV, kf8=\EOW, nel=\r\ED, rc=\E8, rev=\E[7m, ri=\E[T, - rmir=\E[4l, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, - smir=\E[4h, smso=\E[7m, smul=\E[4m, + kf7=\EOV, kf8=\EOW, nel=\r\ED, rev=\E[7m, ri=\E[T, + rmir=\E[4l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smir=\E[4h, + smso=\E[7m, smul=\E[4m, use=ansi+csr, + # basis from Peter Harrison, Computer Graphics Lab, San Francisco # ucbvax!ucsfmis!harrison ...uucp / ucbvax!ucsfmis!harrison@BERKELEY ...ARPA # @@ -21132,8 +21189,7 @@ mai|basic4|MAI Basic Four in ANSI mode, # (basis: removed obsolete ":ma=^K^P^R^L^L :nl=5000*^J:" -- esr) basis|BASIS108 computer with terminal translation table active, clear=\E*$<300/>, cud1=\n$<5000/>, ed=\EY, el=\ET, kbs=^H, - kcub1=^H, kcud1=\n, kcuf1=^L, kcuu1=^K, rmso=\E), sgr0=\E), - smso=\E(, use=adm3a, + rmso=\E), sgr0=\E), smso=\E(, use=adm3a, # luna's BMC terminal emulator luna|luna68k|LUNA68K Bitmap console, cols#88, lines#46, use=ansi-mini, @@ -21164,24 +21220,20 @@ m2-nam|minitel|minitel-2|minitel-2-nam|France Telecom Minitel 2 mode te'le'infor OTbs, eslok, hs, xenl, cols#80, it#8, lines#24, wsl#72, xmc#0, acsc=aaffggjjkkllmmnnooqqssttuuvvwwxx, bel=^G, - blink=\E[5m, bold=\E[1m, civis=\E[<1h, clear=\E[H\E[J, - cnorm=\E[<1l, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, flash=^G, fsl=\n, - home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=\n, ip=$<7/>, + blink=\E[5m, bold=\E[1m, civis=\E[<1h, cnorm=\E[<1l, cr=\r, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + flash=^G, fsl=\n, home=\E[H, ht=^I, ind=\n, ip=$<7/>, is1=\E:1}\Ec\E[?4l\E[12h, is2=\Ec\E[12h\E)0, - is3=\E[?3l, kbs=^H, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M, kf0=\EOp, + is3=\E[?3l, kclr=\E[2J, kdch1=\E[P, kdl1=\E[M, kf0=\EOp, kf1=\EOq, kf10=\EOp, kf2=\EOr, kf3=\EOs, kf4=\EOt, kf5=\EOu, - kf6=\EOv, kf7=\EOw, kf8=\EOx, kf9=\EOy, khome=\E[H, - kich1=\E[4h, kil1=\E[4l, knp=\EOn, kpp=\EOR, ll=\E[24;80H, - mc0=\E[i, nel=\r\n, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, - rs1=\Ec\E[?4l\E[12h, rs2=\Ec\E)0, sc=\E7, sgr0=\E[m, - smacs=^N, smir=\E[4h, smso=\E[7m, smul=\E[4m, tsl=^_@A, - u6=\E[%i%d;%dR, u7=\E[6n, + kf6=\EOv, kf7=\EOw, kf8=\EOx, kf9=\EOy, kich1=\E[4h, + kil1=\E[4l, knp=\EOn, kpp=\EOR, ll=\E[24;80H, mc0=\E[i, + nel=\r\n, rev=\E[7m, ri=\EM, rmacs=^O, rmir=\E[4l, + rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E[?4l\E[12h, + rs2=\Ec\E)0, sgr0=\E[m, smacs=^N, smir=\E[4h, smso=\E[7m, + smul=\E[4m, tsl=^_@A, use=ansi+arrows, use=ansi+cpr, + use=ansi+csr, use=ansi+erase, use=ansi+idl, + use=ansi+local, # From: Alexandre Montaron , 18 Jun 1998, updated 19 Sep 2016 # @@ -21227,27 +21279,26 @@ minitel1|minitel 1, \177\,--, minitel1b|minitel 1-bistandard (in 40cols mode), mir, - cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, - cuu=\E[%p1%dA, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el1=\E[1K, il=\E[%p1%dL, il1=\E[L, - is1=\E;iYA\E;jYC, kbs@, kcan@, kclr=\E[2J, kctab=^I, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, - kdl1=\E[M, kent@, kf1=^SD, kf10=^Y0, kf11=^Y1, kf12=^Y/, - kf13=^Y{1, kf14=^Y{2, kf15=^Y{3, kf16=^Y{4, kf17=^Y{5, - kf18=^Y{6, kf19=^Y{7, kf2=^SC, kf20=^Y{8, kf21=^Y{9, - kf22=^Y{0, kf23=^Y{*, kf24=^Y{#, kf3=^SF, kf4=^SA, kf5=^SG, - kf6=^SE, kf7=^Y8, kf8=^Y\,, kf9=^Y., khlp@, khome=\E[H, - kich1=\E[4h, kil1=\E[L, krfr@, lf1=Guide, lf2=Repetition, - lf3=Sommaire, lf4=Envoi, lf5=Correction, lf6=Annulation, - rmir=\E[4l, smir=\E[4h, + cub1=^H, cud1=\n, cuf1=^I, cuu1=^K, dch=\E[%p1%dP, dch1=\E[P, + ed=\E[J, el1=\E[1K, is1=\E;iYA\E;jYC, kbs@, kcan@, + kclr=\E[2J, kctab=^I, kdch1=\E[P, kdl1=\E[M, kent@, kf1=^SD, + kf10=^Y0, kf11=^Y1, kf12=^Y/, kf13=^Y{1, kf14=^Y{2, + kf15=^Y{3, kf16=^Y{4, kf17=^Y{5, kf18=^Y{6, kf19=^Y{7, + kf2=^SC, kf20=^Y{8, kf21=^Y{9, kf22=^Y{0, kf23=^Y{*, + kf24=^Y{#, kf3=^SF, kf4=^SA, kf5=^SG, kf6=^SE, kf7=^Y8, + kf8=^Y\,, kf9=^Y., khlp@, kich1=\E[4h, kil1=\E[L, krfr@, + lf1=Guide, lf2=Repetition, lf3=Sommaire, lf4=Envoi, + lf5=Correction, lf6=Annulation, rmir=\E[4l, smir=\E[4h, u8=\001%[ABCPtuvwxyz0123456789:;<=>?]\004, .ich=\E[%p1%d@, .ich1=\E[@, .kLFT=\E[P, .kRIT=\E[4h, .kb2=^Y{g, .kcbt=^Y{i, .kel=^X, .mc0=\E:|k, .rmkx=\E;jYA, .rs1=\E[4l\E[2l, .smkx=\E;iYA\E;jYC, .u8=^ACu<^D, + use=ansi+arrows, use=ansi+idl, use=ansi+local, use=minitel1, + # rmkx posait des problemes (logout en sortant de vi). minitel1b-80|minitel 1-bistandard (standard teleinformatique), - am@, bw@, eslok@, hz@, msgr, G0, + am@, bw@, eslok@, hz@, msgr, colors@, cols#80, it#8, pairs@, acsc@, blink=\E[5m, bold=\E[1m, civis=\037@A\024\n, clear=\E[H\E[J, cnorm=\037@A\021\n, cuf1=\E[C, @@ -21278,7 +21329,6 @@ minitel1b-80|minitel 1-bistandard (standard teleinformatique), .sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1 ;%;m, .smacs=^N, C0=}#f[j+k+l+m+n+o~q=s_t+u+v+w+x!0\032, - E0=^O, S0=^N, XC=B\016%\017\,\243#\,\247]\,\260[\,\340@\,\347\\\\\,\351{\, \350}\,\371|\,\300A\,\301A\,\302A\,\303A\,\304A\,\305A\, \306E\,\307C\,\310E\,\311E\,\312E\,\313E\,\314I\,\315I\, @@ -21330,10 +21380,9 @@ minitel1b-nb|minitel 1b (40cols) noir & blanc sans couleurs avec bold et dim ... # Fonctionne par exemple avec Midnight Commander (mc). minitel2-80|minitel 2 (80cols) avec filets VT100 (DEC), - G0, acsc=ffggjjkkllmmnnooqqssttuuvvwwxxyyzz||}}, enacs=\E)0, rmacs=^O, smacs=^N, u6=\E[%i%d;%dR, - C0=ffggjjkkllmmnnooqqssttuuvvwwxxyyzz||}}, E0=^O, + C0=ffggjjkkllmmnnooqqssttuuvvwwxxyyzz||}}, S0=\E)0\016, XC=B%\E(B\,\243\E(3}\,\247\E(R[\,\257\E(3v\,\260\E(3f\,\261 \E(3g\,\265\E(3Y\,\267\E(3~\,\274\E(3O\,\275\E(3P\,\276 @@ -21351,7 +21400,6 @@ minitel2-80|minitel 2 (80cols) avec filets VT100 (DEC), use=minitel12-80, minitel12-80|minitel 12 (80cols), - G0, civis=\E[<1h, cnorm=\E[<1l, is2=\E[12h, u6=\E[%i%d;%dH, u7=\E[6n, .acsc=ffggj+k+l+m+n+ovq-swt+u+v+w+xx}}\,m+k.l-j0 @@ -21359,7 +21407,7 @@ minitel12-80|minitel 12 (80cols), .enacs=\E)3, .rmacs=^O, .rs3=\E[?4l, .scs=\E(%p1%c, .smacs=^N, C0=ffggj+k+l+m+n+ovq-swt+u+v+w+xx}}\,m+k.l-j0\177, - E0=^O, S0=\E)3\016, + S0=\E)3\016, XC=B%\E(B\,\243\E(3}\,\247\E(R[\,\257\E(3v\,\260\E(3f\,\261 \E(3g\,\267\E(3~\,\274\E(3O\,\275\E(3P\,\276\E(3Q\,\300A \,\301A\,\302A\,\303A\,\304A\,\305A\,\306E\,\307C\,\310E @@ -21395,8 +21443,8 @@ screen.minitel1|Screen specific for minitel1, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy yzz||}}~~, bel=\007\E\^ \E\\, bold@, csr@, flash=\Eg\E\^ \E\\, kmous@, - rmul@, smul@, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\EZ, - use=xterm+x11mouse, use=screen4, + rmul@, smul@, u8=\E[?1;2c, use=decid+cpr, + use=xterm+x11mouse, use=screen, screen.minitel1b|Screen specific for minitel1b, kclr=\E[2J, kdl1=\E[M, kf13=^Y{1, kf14=^Y{2, kf15=^Y{3, @@ -21413,7 +21461,7 @@ screen.minitel1b-80|screen.minitel2-80|screen.minitel12-80|Screen specific for m screen.minitel1-nb|Screen specific for minitel1-nb, colors@, ncv@, pairs@, - bold=\E[1m, dim=\E[2m, op@, setab@, setaf@, setb@, setf@, + bold=\E[1m, op@, setab@, setaf@, setb@, setf@, use=screen.minitel1, screen.minitel1b-nb|Screen specific for minitel1b-nb, @@ -21425,30 +21473,26 @@ screen.minitel1b-nb|Screen specific for minitel1b-nb, linux-m1|Linux Minitel 1 "like" Couleurs, am, bw@, ccc, mir, msgr, xenl, - colors#8, it#8, ncv#16, pairs#64, + it#8, ncv#16, acsc=a\261f\370g\361h\260j\274k\273l\311m\310n\316q\315t \314u\271v\312w\313x\272y\363z\362{\343|\252~\372, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, - dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, - ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)U, - flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%d`, - ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=\n, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ech=\E[%p1%dX, + el1=\E[1K, enacs=\E)U, flash=\E[?5h$<100/>\E[?5l, + hpa=\E[%i%p1%d`, ht=^I, hts=\EH, ind=\n, initc=\E]P%p1%{15}%&%X%p2%{255}%&%02X%p3%{255}%&%02X%p4 %{255}%&%02X, is2=\E]R\E]P3FFFF80\E[?8c, ka1=\EOw, ka3=\EOy, kb2=\E[G, - kbs=^?, kc1=\EOq, kc3=\EOs, kcbt=\E^I, kclr=\E\r, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdl1=\E\E[A, kent=\EOM, - kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, - kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kil1=\E\E[B, - kmous=\E[M, nel=\EE, oc=\E]R\E]P3FFFF80, op=\E[39;49m, - rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, - rmpch=\E[10m, rmso=\E[27m, rs1=\Ec, rs3=\E[37;40m\E[8], - sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[m, + kbs=^?, kc1=\EOq, kc3=\EOs, kcbt=\E^I, kclr=\E\r, + kdl1=\E\E[A, kent=\EOM, kf1=\E[[A, kf10=\E[21~, + kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, + kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, + kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, + kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, kil1=\E\E[B, kmous=\E[M, nel=\EE, + oc=\E]R\E]P3FFFF80, op=\E[39;49m, rev=\E[7m, ri=\EM, + rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmpch=\E[10m, + rmso=\E[27m, rs1=\Ec, rs3=\E[37;40m\E[8], sgr0=\E[m, smacs=^N, smam=\E[?7h, smir=\E[4h, smpch=\E[11m, smso=\E[7m, tbc=\E[3g, vpa=\E[%i%p1%dd, .VN=\E[?5l, .VR=\E[?5h, .am@, .ich=\E[%p1%d@, .ich1=\E[@, .ll=\E[99H, @@ -21462,7 +21506,10 @@ linux-m1|Linux Minitel 1 "like" Couleurs, \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n, - use=vt220+pcedit, use=vt220+cvis, use=linux+decid, + use=ansi+arrows, use=ansi+csr, use=ansi+cup, + use=ansi+erase, use=ansi+idl, use=ansi+local1, + use=klone+color, use=vt220+pcedit, use=vt220+cvis, + use=linux+decid, # 1. Using double-shapes for VT100 graphical chars (eg: mc). # 2. Native brown color corrected to good yellow color. @@ -21497,8 +21544,7 @@ linux-m2|Linux Minitel 2 "like" Couleurs (Vert/Blanc/Noir+Bleu), 900\E]P600A900\E]P700A900\E]P80000FF\E]P9FFFFFF\E]PAFFFF FF\E]PBFFFFFF\E]PCFFFFFF\E]PDFFFFFF\E]PEFFFFFF\E]PFFFFFF F\E[;37m, - oc@, op@, rmacs=^O, setab=^A, setaf=^A, sgr0=\E[;37m, smacs=^N, - .setab@, .setaf@, + oc@, op@, setab=^A, setaf=^A, sgr0=\E[;37m, .setab@, .setaf@, .smcup=\E]R\E]P100A900\E]P200A900\E]P3FFFFFF\E]P400A900\E]P5 00A900\E]P600A900\E]P700A900\E]P80000FF\E]P9FFFFFF\E] PAFFFFFF\E]PBFFFFFF\E]PCFFFFFF\E]PDFFFFFF\E]PEFFFFFF @@ -21520,10 +21566,10 @@ linux-s|Linux console with added status line at bottom, screen.linux-m1|Linux m1 specific for screen, ncv@, - dim=\E[2m, kbs=^?, kclr=\E\r, kdl1=\E\E[A, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, - kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kil1=\E\E[B, rmul@, - smul@, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\EZ, + kclr=\E\r, kdl1=\E\E[A, kf13=\E[25~, kf14=\E[26~, + kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, + kf19=\E[33~, kf20=\E[34~, kil1=\E\E[B, rmul@, smul@, + u8=\E[?1;2c, E3=\E[99H\E[2J\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n @@ -21532,7 +21578,7 @@ screen.linux-m1|Linux m1 specific for screen, \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n, - use=xterm+x11mouse, use=screen4, + use=decid+cpr, use=xterm+x11mouse, use=screen, screen.linux-m1b|Linux m1b specific for screen, colors@, pairs@, @@ -21546,32 +21592,26 @@ screen.linux-m2|Linux m2 specific for screen, # Putty : putty-m1|Putty Minitel 1 "like" Couleurs, - hs, dim@, kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, rmcup=\E[2J\E[?47l\E8, rmul=\E[24m, - smcup=\E7\E[?47h, smul=\E[4m, .E3=\E[300S, - use=putty+screen, use=xterm+sl-twm, use=ecma+index, - use=linux-m1, + kf5=\E[15~, rmul=\E[24m, smul=\E[4m, .E3=\E[300S, + use=xterm+alt47, use=putty+screen, use=xterm+sl-twm, + use=ecma+index, use=linux-m1, putty-m1b|Putty Minitel 1B "like" Monochrome (Gris/Blanc/Noir), - hs, dim@, kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, rmcup=\E[2J\E[?47l\E8, rmul=\E[24m, - smcup=\E7\E[?47h, smul=\E[4m, .E3=\E[300S, - use=putty+screen, use=xterm+sl-twm, use=ecma+index, - use=linux-m1b, + kf5=\E[15~, rmul=\E[24m, smul=\E[4m, .E3=\E[300S, + use=xterm+alt47, use=putty+screen, use=xterm+sl-twm, + use=ecma+index, use=linux-m1b, putty-m2|Putty Minitel 2 "like" Couleurs (Vert/Blanc/Noir), - hs, acsc=``aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{ {||}}~~, dim@, kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, rmcup=\E[2J\E[?47l\E8, rmul=\E[24m, - smcup=\E7\E[?47h, smul=\E[4m, .E3=\E[300S, - use=putty+screen, use=xterm+sl-twm, use=ecma+index, - use=linux-m2, + kf5=\E[15~, rmul=\E[24m, smul=\E[4m, .E3=\E[300S, + use=xterm+alt47, use=putty+screen, use=xterm+sl-twm, + use=ecma+index, use=linux-m2, -putty+screen|PuTTY with screen resizing extensions, +putty+screen|PuTTY with screen resizing extensions (building-block), .WS=\E[8;%p1%d;%p2%dt, Z0=\E[?3h, Z1=\E[?3l, putty-screen|PuTTY with screen resizing extensions, @@ -21679,8 +21719,8 @@ blit|jerq|blit running teletype rom, cup=\EY%p2%{32}%+%c%p1%{32}%+%c, cuu1=\EA, dch=\Ee%p1%{32}%+%c, dch1=\Ee!, dl=\EE%p1%{32}%+%c, dl1=\EE!, el=\EK, ht=^I, ich=\Ef%p1%{32}%+%c, ich1=\Ef!, - il=\EF%p1%{32}%+%c, il1=\EF!, ind=\n, kbs=^H, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf1=\Ex, kf2=\Ey, kf3=\Ez, + il=\EF%p1%{32}%+%c, il1=\EF!, ind=\n, kbs=^H, kf1=\Ex, + kf2=\Ey, kf3=\Ez, use=vt52+arrows, # (cbblit: here's a BSD termcap that says -- esr) cbblit|fixterm|blit running columbus code, @@ -21737,14 +21777,13 @@ bg2.0rv|bg3.10rv|BBn BitGraph 2.0 (reverse video), bg2.0|bg3.10|BBN BitGraph 2.0 or later (no init), OTbs, xenl, cols#85, lines#64, - bel=^G, clear=\E[H\E[J$<150>, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=%i\E[%p1%d;%p2%dH, cuu1=\E[A, dl1=\E[M$<2*>, - ed=\E[J$<150>, el=\E[K$<2>, ht=^I, il1=\E[L$<2*>, - ind=\n$<280>, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, lf1=PF1, - lf2=PF2, lf3=PF3, lf4=PF4, rc=\E8, rmkx=\E>, rmso=\E[m, sc=\E7, - sgr0=\E[m, smkx=\E=, smso=\E[7m, + bel=^G, clear=\E[H\E[J$<150>, cr=\r, cub1=^H, + cup=%i\E[%p1%d;%p2%dH, dl1=\E[M$<2*>, ed=\E[J$<150>, + el=\E[K$<2>, ht=^I, il1=\E[L$<2*>, ind=\n$<280>, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, + kf2=\EOQ, kf3=\EOR, kf4=\EOS, lf1=PF1, lf2=PF2, lf3=PF3, + lf4=PF4, rmkx=\E>, rmso=\E[m, sgr0=\E[m, smkx=\E=, + smso=\E[7m, use=ansi+csr, use=ansi+local1, bg1.25rv|BBN BitGraph 1.25 (reverse video), flash=\E[?5l$<200/>\E[?5h, is2=\E>\E[?5h\E[?7h, @@ -21755,14 +21794,13 @@ bg1.25nv|BBN BitGraph 1.25 (normal video), # (bg1.25: I added / based on the init string -- esr) bg1.25|BBN BitGraph 1.25, cols#85, lines#64, - bel=^G, clear=\E[H\E[J$<150>, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=%i\E[%p1%d;%p2%dH, cuu1=\E[A, - dl1=\E[M$<2*>, ed=\E[J$<150>, el=\E[K$<2>, ht=^I, - il1=\E[L$<2*>, ind=\n$<280>, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, kf1=\EP, kf2=\EQ, kf3=\ER, kf4=\ES, - lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, ll=\E[64;1H, rmam=\E[?7l, - rmkx=\E>, rmso=\E[m, sgr0=\E[m, smam=\E[?7h, smkx=\E=, - smso=\E[7m, + bel=^G, clear=\E[H\E[J$<150>, cr=\r, cub1=^H, + cup=%i\E[%p1%d;%p2%dH, dl1=\E[M$<2*>, ed=\E[J$<150>, + el=\E[K$<2>, ht=^I, il1=\E[L$<2*>, ind=\n$<280>, kf1=\EP, + kf2=\EQ, kf3=\ER, kf4=\ES, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, + ll=\E[64;1H, rmam=\E[?7l, rmkx=\E>, rmso=\E[m, sgr0=\E[m, + smam=\E[?7h, smkx=\E=, smso=\E[7m, use=ansi+local1, + use=vt52+arrows, #### Bull (bq, dku, vip) # @@ -21833,32 +21871,31 @@ bg1.25|BBN BitGraph 1.25, # dku7102, tws2102, and tws models 2105 to 2112 tws-generic|dku7102|Bull Questar tws terminals, am, eslok, hs, mir, msgr, xenl, xhp@, xon, - cols#80, it#8, lines#24, wsl#80, + cols#80, lines#24, wsl#80, acsc=``aaffggj)k\,l&m#n/ooppq*rrsst'u-v+w.x%yyzz{{||}}~~, - bel=^G, blink=\E[0;5m, cbt=\E[Z, civis=\E[1r, clear=\E[2J, - cnorm=\E[r, cr=\r, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, - cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%df, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dim=\E[0;2m, dl=\E[%p1%dM, dl1=\E[M, - dsl=\EPY99:98\E\\\E[0;98v\E[2J\E[v, ed=\E[J, el=\E[K, - fsl=\E[v, home=\E[H, ht=\E[I, hts=\EH, il=\E[%p1%dL, - il1=\E[L, ind=\n, invis=\E[0;8m, + bel=^G, blink=\E[0;5m, civis=\E[1r, clear=\E[2J, + cnorm=\E[r, cr=\r, cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%df, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[0;2m, + dsl=\EPY99:98\E\\\E[0;98v\E[2J\E[v, fsl=\E[v, + home=\E[H, ht=\E[I, ind=\n, invis=\E[0;8m, is1=\E[?=h\Ec\E`\E[?>h\EPY99:98\E\\, is2=\E[5;>;12;18;?h\EPY99:98\E\\, - smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g, - tsl=\EPY99:98\E\\\E[0;98v\E[2;7m, + smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, + tsl=\EPY99:98\E\\\E[0;98v\E[2;7m, use=ansi+arrows, + use=ansi+erase, use=ansi+idl, use=ansi+inittabs, + use=ansi+local, use=ansi+sgrdim, + tws2102-sna|dku7102-sna|Bull Questar tws2102 for SNA, dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v, use=tws-generic, @@ -21954,39 +21991,33 @@ dku7202|Bull Questar 200 DKU7202 (colour/character attributes), # This entry covers BQ303, BQ306, BQ310, Q303, Q306, Q310 bq300|Bull VT320 ISO Latin 1 80 columns terminal, - am, eo, eslok, hs, km, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, vt#3, wsl#80, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, - dsl=\E[1$}\E[2$~\n\E[0$}, ech=\E[%p1%dX, ed=\E[J, - el=\E[K, el1=\E[1K, enacs=\E(B\E)0, - flash=\E[?5h$<50>\E[?5l, fsl=\E[0$}, home=\E[H, ht=^I, - hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, - is1=\E[63;1"p\E[2h, + eo, km, mir, xenl, xon, + vt#3, wsl#80, + blink=\E[5m, bold=\E[1m, cup=\E[%i%p1%d;%p2%dH, + dch=\E[%p1%dP, dch1=\E[P, dsl=\E[1$}\E[2$~\n\E[0$}, + ech=\E[%p1%dX, el1=\E[1K, flash=\E[?5h$<50>\E[?5l, + ich=\E[%p1%d@, ind=\ED, is1=\E[63;1"p\E[2h, is2=\E[?2h\E[?3l\E[?5l\E[?7h\E[?8h\E>\E[?1l\E\sF\E[?42l\E[?4 l, is3=\E[0$}\E[?25h\E[2l\E[H\E[J, ka1=\EOw, ka3=\EOy, - kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, - kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, - kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, - kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khlp=\E[28~, - krdo=\E[29~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, nel=\EE, - rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l, + kb2=\EOu, kc1=\EOq, kc3=\EOs, kf1=\EOP, kf10=\E[21~, + kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, + kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, + kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khlp=\E[28~, krdo=\E[29~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, + nel=\EE, rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?7h, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[!p, rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0, - sc=\E7, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1 %;m%?%p9%t\E(0%e\E(B%;, sgr0=\E[0m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E[?7l\E[?1l\E(B, smir=\E[4h, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, tsl=\E[1$}\E[2$~, - use=vt220+vtedit, use=ansi+pp, use=vt220+cvis, + smul=\E[4m, tsl=\E[1$}\E[2$~, use=ansi+enq, use=ansi+csr, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ansi+pp, use=dec+sl, use=vt100+4bsd, use=vt220+cvis, + use=vt220+vtedit, + bq300-rv|Bull VT320 reverse 80 columns, flash=\E[?5l$<50>\E[?5h, is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E\sF\E[?42l\E[?4 @@ -22059,28 +22090,26 @@ bq300-w-rv|Bull VT320 reverse mode 132 columns, # and : 22 Bold off, 24 Underline off, 25 Blinking off, 27 Reverse off # (bq300-8: ,,,,, to get under 1024 --esr) bq300-8|Bull VT320 full 8 bits 80 columns, - am, eo, eslok, hs, km, mc5i, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, vt#3, wsl#80, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, blink=\2335m, bold=\2331m, clear=\233H\233J, cr=\r, + eo, eslok, hs, km, mc5i, mir, xenl, xon, + vt#3, wsl#80, + blink=\2335m, bold=\2331m, clear=\233H\233J, csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=\2331D, cud=\233%p1%dB, cud1=\2331B, cuf=\233%p1%dC, cuf1=\2331C, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\2331A, dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM, dl1=\233M, dsl=\2331$}\2332$~\n\2330$}, ech=\233%p1%dX, ed=\233J, - el=\233K, el1=\2331K, enacs=\E(B\E)0, - flash=\233?5h$<50>\233?5l, fsl=\2330$}, home=\233H, - ht=^I, hts=\EH, ich=\233%p1%d@, il=\233%p1%dL, il1=\233L, - ind=\ED, is1=\E[63;2"p\E[2h, + el=\233K, el1=\2331K, flash=\233?5h$<50>\233?5l, + fsl=\2330$}, home=\233H, ich=\233%p1%d@, il=\233%p1%dL, + il1=\233L, ind=\ED, is1=\E[63;2"p\E[2h, is2=\E[?2h\E[?3l\E[?5l\E[?7h\E[?8h\E>\E[?1l\E\sG\E[?42l\E[?4 l, is3=\2330$}\233?25h\2332l\233H\233J, ka1=\217w, - ka3=\217y, kb2=\217u, kbs=^H, kc1=\217q, kc3=\217s, - kcub1=\233D, kcud1=\233B, kcuf1=\233C, kcuu1=\233A, - kdch1=\2333~, kf1=\217P, kf10=\23321~, kf11=\23323~, - kf12=\23324~, kf13=\23325~, kf14=\23326~, kf15=\23328~, - kf16=\23329~, kf17=\23331~, kf18=\23332~, kf19=\23333~, - kf2=\217Q, kf20=\23334~, kf3=\217R, kf4=\217S, kf6=\23317~, + ka3=\217y, kb2=\217u, kc1=\217q, kc3=\217s, kcub1=\233D, + kcud1=\233B, kcuf1=\233C, kcuu1=\233A, kdch1=\2333~, + kf1=\217P, kf10=\23321~, kf11=\23323~, kf12=\23324~, + kf13=\23325~, kf14=\23326~, kf15=\23328~, kf16=\23329~, + kf17=\23331~, kf18=\23332~, kf19=\23333~, kf2=\217Q, + kf20=\23334~, kf3=\217R, kf4=\217S, kf6=\23317~, kf7=\23318~, kf8=\23319~, kf9=\23320~, kfnd=\2331~, khlp=\23328~, kich1=\2332~, knp=\2336~, kpp=\2335~, krdo=\23329~, kslt=\2334~, lf1=pf1, lf2=pf2, lf3=pf3, @@ -22094,7 +22123,7 @@ bq300-8|Bull VT320 full 8 bits 80 columns, sgr0=\2330m\E(B, smacs=\E(0, smam=\233?7h, smcup=\233?7l\233?1l\E(B, smir=\2334h, smso=\2337m, smul=\2334m, tbc=\2333g, tsl=\2331$}\2332$~, - use=vt220+cvis8, + use=vt100+4bsd, use=vt220+cvis8, bq300-8rv|Bull VT320 8-bit reverse mode 80 columns, flash=\233?5l$<50>\233?5h, is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E\sG\E[?42l\E[?4 @@ -22143,13 +22172,12 @@ bq300-pc-w-rv|Questar 303 with PC keyboard reverse mode 132 columns, # 8 bit Control Characters, # 80 columns screen. bq300-8-pc|Q306-8-pc|Questar 303 with PC keyboard in full 8 bits 80 columns, - kbs=^H, kdch1=\2333~, kend=\2334~, kf1=\23317~, - kf10=\23328~, kf11=\23329~, kf12=\23331~, kf13@, kf14@, - kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\23318~, kf20@, - kf3=\23319~, kf4=\23320~, kf5=\23321~, kf6=\23323~, - kf7=\23324~, kf8=\23325~, kf9=\23326~, kfnd@, khlp@, - khome=\2331~, kich1=\2332~, knp=\2336~, kpp=\2335~, krdo@, - kslt@, lf1@, lf2@, lf3@, lf4@, use=bq300-8, + kend=\2334~, kf1=\23317~, kf10=\23328~, kf11=\23329~, + kf12=\23331~, kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, + kf2=\23318~, kf20@, kf3=\23319~, kf4=\23320~, kf5=\23321~, + kf6=\23323~, kf7=\23324~, kf8=\23325~, kf9=\23326~, kfnd@, + khlp@, khome=\2331~, krdo@, kslt@, lf1@, lf2@, lf3@, lf4@, + use=bq300-8, bq300-8-pc-rv|Questar 303 with PC keyboard full 8 bits reverse mode 80 columns, flash=\E[?5l$<50>\E[?5h, is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E\sG\E[?42l\E[?4 @@ -22222,17 +22250,15 @@ bq300-8-pc-w-rv|Questar 303 with PC keyboard full 8 bits reverse 132 columns, # This covers the vip7800 and BQ3155-vip7800 vip|Bull Questar 3155-7800, am, eslok, hs, km, mc5i, msgr, xenl, xon, - cols#80, it#8, lines#24, vt#3, wsl#80, - acsc=0pjdkblamcnkqitgufvhwexj, bel=^G, blink=\EsB, - cbt=\E[Z, clear=\E`, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, - cup=\E[%i%p1%03d%p2%03df, cuu1=\EA, dch1=\E[P, dim=\EsL, - dl1=\E[M, dsl=\Ev, ed=\EJ, el=\EK, - flash=\007$<80>\007$<80>\007, fsl=\EO, home=\EH, ht=^I, - hts=\Ep, ich1=\E[I, ind=\n, invis=\EsH, + vt#3, wsl#80, + acsc=0pjdkblamcnkqitgufvhwexj, blink=\EsB, clear=\E`, + cub1=^H, cud1=\n, cup=\E[%i%p1%03d%p2%03df, dch1=\E[P, + dim=\EsL, dl1=\E[M, dsl=\Ev, + flash=\007$<80>\007$<80>\007, fsl=\EO, hts=\Ep, + ich1=\E[I, invis=\EsH, is2=\E[00u\E[<>001001024080024080u\E[01u, - is3=\Er\E[W\E`, kHOM=\EH, kLFT=\Eo, kRIT=\Eu, kbs=^H, - kcbt=\E[Z, kclr=\E`, kctab=\E[g, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, kdch1=\E[P, kdl1=\E[M, ked=\EJ, + is3=\Er\E[W\E`, kHOM=\EH, kLFT=\Eo, kRIT=\Eu, kcbt=\E[Z, + kclr=\E`, kctab=\E[g, kdch1=\E[P, kdl1=\E[M, ked=\EJ, kel=\EK, kf1=\E0, kf10=\ET, kf11=\E\\, kf12=\E\^, kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\E2, kf20@, kf21=\E1, kf22=\E5, kf23=\E7, kf24=\E9, kf25=\E;, kf26=\E=, kf27=\E?, @@ -22245,7 +22271,8 @@ vip|Bull Questar 3155-7800, ri=\EA\EJ\EH\E[L$<10>, rmacs=\EF, rmir=\E[J, rmso=\EsR, rmul=\EsR, rs1=\Ec, rs2=\E[G, s0ds=\EF, s1ds=\EG, sgr0=\EsR\EsU\EF, smacs=\EG, smir=\E[I, smso=\EsI, - smul=\Es_, tbc=\E[N, tsl=\Ew, + smul=\Es_, tbc=\E[N, tsl=\Ew, use=ansi+inittabs, + use=vt52-basic, # normal screen, 8 bits, 132 columns terminal. vip-w|vip7800-w|Q310-vip-w|Q310-vip-w-am|Questar 3155-vip7800 wide, cols#132, wsl#132, @@ -22424,8 +22451,7 @@ vt50|DEC VT50, cuu1=\EA, ed=\EJ, el=\EK, ht=^I, ind=\n, u8=\E/A, u9=\EZ, vt50h|DEC VT50h, cub1=\ED, cud1=\EB, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, u8=\E/[HJ], - use=vt52+keypad, use=vt50, + u8=\E/[HJ], use=vt52+keypad, use=vt50, use=vt52+arrows, # (vt61: there's a BSD termcap that claims , ) vt61|vt-61|vt61.5|DEC VT61, @@ -22433,24 +22459,21 @@ vt61|vt-61|vt61.5|DEC VT61, bel=^G, clear=\EH\EJ$<120>, cr=\r$<20>, cub1=^H, cud1=\n, cuf1=\EC$<20>, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<20>, cuu1=\EA$<20>, ed=\EJ$<120>, el=\EK$<70>, ht=^I, - ind=\n$<20>, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - ri=\E$<20>I, + ind=\n$<20>, ri=\E$<20>I, use=vt52+arrows, # The gigi does standout with red! # (gigi: I added / based on the init string, corrected cub1 -- esr) gigi|vk100|DEC gigi graphics terminal, OTbs, am, xenl, cols#84, lines#24, - bel=^G, clear=\E[H\E[2J, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, ed=\E[J, - el=\E[K, ht=^I, ind=\n, + bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, ht=^I, ind=\n, is2=\E>\E[?3l\E[?4l\E[?5l\E[?20l\E[?7h\E[?8h, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E[H, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7;31m, - smul=\E[4m, + smul=\E[4m, use=ansi+local, # DEC PRO-350 console (VT220-style). The 350 was DEC's attempt to produce # a PC differentiated from the IBM clones. It was a total, ludicrous, @@ -22463,10 +22486,10 @@ pro350|decpro|DEC pro console, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, clear=\EH\EJ, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, - el=\EK, home=\EH, ht=^I, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf0=\EE, kf1=\EF, kf2=\EG, kf3=\EH, kf4=\EI, - kf5=\EJ, kf6=\Ei, kf7=\Ej, khome=\EH, ri=\EI, rmacs=\EG, - rmso=\E^N, rmul=\E^C, smacs=\EF, smso=\E^H, smul=\E^D, + el=\EK, home=\EH, ht=^I, kf0=\EE, kf1=\EF, kf2=\EG, kf3=\EH, + kf4=\EI, kf5=\EJ, kf6=\Ei, kf7=\Ej, khome=\EH, ri=\EI, + rmacs=\EG, rmso=\E^N, rmul=\E^C, smacs=\EF, smso=\E^H, + smul=\E^D, use=vt52+arrows, dw1|DECwriter I, OTbs, hc, os, @@ -22515,8 +22538,7 @@ ln03|DEC ln03 laser printer, smul=\E[4m, ln03-w|DEC ln03 laser printer 132 cols, cols#132, - bel=^G, cr=\r, cud1=\n, ht=^I, ind=\n, kbs=^H, kcub1=^H, - kcud1=\n, nel=\r\n, use=ln03, + kbs=^H, kcub1=^H, kcud1=\n, use=ln03, #### Delta Data (dd) # @@ -22541,17 +22563,17 @@ ddr|rebus3180|ddr3180|Rebus/DDR 3180 VT100 emulator, OTbs, am, xenl, cols#80, it#8, lines#24, vt#3, blink=\E[5m$<2/>, bold=\E[1m$<2/>, - clear=\E[H\E[2J$<50/>, csr=\E[%i%p1%d;%p2%dr, cub1=^H, - cud1=\n, cuf1=\E[C$<2/>, cup=\E[%i%p1%d;%p2%dH$<5/>, - cuu1=\E[A$<2/>, ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, - ht=^I, ind=\ED$<5/>, is2=\E[1;24r\E[24;1H, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, - kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m$<2/>, + clear=\E[H\E[2J$<50/>, cub1=^H, cud1=\n, cuf1=\E[C$<2/>, + cup=\E[%i%p1%d;%p2%dH$<5/>, cuu1=\E[A$<2/>, + ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, ht=^I, + ind=\ED$<5/>, is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, rev=\E[7m$<2/>, rf=/usr/share/tabset/vt100, ri=\EM$<5/>, rmam=\E[7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m$<2/>, - rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m$<2/>, smam=\E[7l, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m$<2/>, + smul=\E[4m$<2/>, use=ansi+csr, #### Evans & Sutherland # @@ -22657,11 +22679,11 @@ h19|heath|h19-b|heathkit|heath-19|z19|zenith|Heathkit h19, clear=\EE, cnorm=\Ey4, cr=\r, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ex4, dch1=\EN, ed=\EJ, el=\EK, fsl=\Ek\Ey5, home=\EH, ht=^I, ind=\n, - ip=$<1.5/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW, - kf6=\EP, kf7=\EQ, kf8=\ER, khome=\EH, lf6=blue, lf7=red, - lf8=white, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq, smacs=\EF, - smir=\E@, smso=\Ep, tsl=\Ej\Ex5\EY8%p1%{32}%+%c\Eo\Eo, + ip=$<1.5/>, kbs=^H, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, + kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, khome=\EH, lf6=blue, + lf7=red, lf8=white, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq, + smacs=\EF, smir=\E@, smso=\Ep, + tsl=\Ej\Ex5\EY8%p1%{32}%+%c\Eo\Eo, use=vt52+arrows, h19-u|Heathkit with underscore cursor, cnorm@, cvvis@, use=h19-b, h19-g|h19g|Heathkit w/block cursor, @@ -22719,12 +22741,11 @@ z29|zenith29|z29b|Zenith z29b, cvvis=\Ex4, dch1=\EN$<0.1*>, dl1=\EM$<1/>, dsl=\Ey1, ed=\EJ$<14>, el=\EK$<1>, fsl=\Ek\Ey5, home=\EH, ht=^I, ich1=\E<\E[1@\E[?2h$<1>, il1=\EL$<1/>, ind=\n$<2>, - is2=\E<\E[?2h\Ev, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf0=\E~, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, - kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\E0I, khome=\EH, - lf0=home, ri=\EI$<2/>, rmacs=\EF, rmir=\EO, rmso=\Eq, - rmul=\Es0, smacs=\EG, smir=\E@, smso=\Ep, smul=\Es8, - tsl=\Ej\Ex5\Ex1\EY8%+ \Eo, + is2=\E<\E[?2h\Ev, kbs=^H, kf0=\E~, kf1=\ES, kf2=\ET, kf3=\EU, + kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\E0I, + khome=\EH, lf0=home, ri=\EI$<2/>, rmacs=\EF, rmir=\EO, + rmso=\Eq, rmul=\Es0, smacs=\EG, smir=\E@, smso=\Ep, + smul=\Es8, tsl=\Ej\Ex5\Ex1\EY8%+ \Eo, use=vt52+arrows, # z29 in ANSI mode. Assumes that the cursor is in the correct state, and that # the world is stable. causes the terminal to be reset to the state # indicated by the name. kc -> key click, nkc -> no key click, uc -> underscore @@ -22736,22 +22757,20 @@ z29a|z29a-kc-bc|h29a-kc-bc|Heath/Zenith 29 in ANSI mode, OTbs, OTpt, am, eslok, hs, mir, msgr, OTkn#10, cols#80, it#8, lines#24, OTbc=\ED, bel=^G, blink=\E[5m, bold=\E[2m, clear=\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[1P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, dsl=\E[>1l, ed=\E[J, el=\E[K, fsl=\E[u\E[>5l, + cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[1P, + dim=\E[2m, dsl=\E[>1l, ed=\E[J, el=\E[K, fsl=\E[u\E[>5l, home=\E[H, ht=^I, hts=\EH, if=/usr/share/tabset/vt100, - il=\E[%p1%dL, il1=\E[L, ind=\ED, kbs=^H, kclr=\E[J, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, ked=\E[J, - kf0=\E[~, kf1=\EOS, kf2=\EOT, kf3=\EOU, kf4=\EOV, kf5=\EOW, - kf6=\EOP, kf7=\EOQ, kf8=\EOR, kf9=\EOX, khome=\E[H, lf0=help, - mc0=\E#7, nel=\r\ED, rc=\E[r, rev=\E[7m, ri=\EM, - rmcup=\E[?7h, rmso=\E[m, rmul=\E[m, + ind=\ED, kclr=\E[J, ked=\E[J, kf0=\E[~, kf1=\EOS, kf2=\EOT, + kf3=\EOU, kf4=\EOV, kf5=\EOW, kf6=\EOP, kf7=\EOQ, kf8=\EOR, + kf9=\EOX, khome=\E[H, lf0=help, mc0=\E#7, nel=\r\ED, rc=\E[r, + rev=\E[7m, ri=\EM, rmcup=\E[?7h, rmso=\E[m, rmul=\E[m, rs1=\E<\E[1;24r\E[24;1H\E[?7h\E[>4h\E[>1;2;3;5;6;7;8;9l\E[m \E[11m, sc=\E[s, sgr0=\E[m, smcup=\E[?7l, smso=\E[7;2m, smul=\E[4m, tbc=\E[3g, tsl=\E[s\E[>5;1h\E[25;%i%dH\E[1K, + use=ansi+apparrows, use=ansi+idl, use=ansi+local, + z29a-kc-uc|h29a-kc-uc|Zenith z29 ANSI mode with keyclick and underscore cursor, rs1=\E<\E[1;24r\E[24;1H\E[?7h\E[>1;2;3;4;5;6;7;8;9l\E[m\E[11 m, @@ -22766,27 +22785,24 @@ z29a-nkc-uc|h29a-nkc-uc|Zenith z29 ANSI mode with underscore cursor and no keycl use=z29a, # From: Jeff Bartig 31 Mar 1995 z39-a|z39a|zenith39-a|zenith39-ansi|Zenith 39 in ANSI mode, - am, eslok, hs, mc5i, mir, msgr, xon, + am, eslok, hs, mir, msgr, xon, cols#80, lines#24, acsc=0a``aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[1Z, civis=\E[>5h, clear=\E[2J\E[H, cnorm=\E[>5l, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + csr=\E[%i%p1%d;%p2%dr, cub1=^H, cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[1P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[1M, dsl=\E[>1l, ed=\E[0J, el=\E[0K, el1=\E[1K, - fsl=\E[u, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[1L, - ind=\n, is2=\E<\E[>1;3;5;6;7l\E[0m\E[2J, ka1=\EOw, - ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, ked=\E[J, kf1=\EOS, - kf2=\EOT, kf3=\EOU, kf4=\EOV, kf5=\EOW, kf6=\EOP, kf7=\EOQ, - kf8=\EOR, kf9=\EOX, khlp=\E[~, khome=\E[H, ll=\E[24;1H, - mc0=\E[?19h\E[i, mc4=\E[4i, mc5=\E[5i, rc=\E[u, rev=\E[7m, - rmacs=\E(B, rmir=\E[4l, rmkx=\E[>7l, rmso=\E[0m, + fsl=\E[u, home=\E[H, il=\E[%p1%dL, il1=\E[1L, ind=\n, + is2=\E<\E[>1;3;5;6;7l\E[0m\E[2J, ka1=\EOw, ka3=\EOu, + kb2=\EOy, kc1=\EOq, kc3=\EOs, ked=\E[J, kf1=\EOS, kf2=\EOT, + kf3=\EOU, kf4=\EOV, kf5=\EOW, kf6=\EOP, kf7=\EOQ, kf8=\EOR, + kf9=\EOX, khlp=\E[~, ll=\E[24;1H, mc0=\E[?19h\E[i, rc=\E[u, + rev=\E[7m, rmacs=\E(B, rmir=\E[4l, rmkx=\E[>7l, rmso=\E[0m, rmul=\E[0m, rs2=\E<\Ec\0, sc=\E[s, sgr0=\E[0m, smacs=\E(0, - smir=\E[4h, smkx=\E[>7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[s\E[>1h\E[25;%i%p1%dH, + smir=\E[4h, smkx=\E[>7h, smso=\E[7m, smul=\E[4m, + tsl=\E[s\E[>1h\E[25;%i%p1%dH, use=ansi+arrows, + use=ansi+local, use=ansi+pp, use=ansi+tabs, # From: Brad Brahms z100|h100|z110|z-100|h-100|Heath/Zenith z-100 pc with color monitor, @@ -22799,11 +22815,10 @@ z100bw|h100bw|z110bw|z-100bw|h-100bw|Heath/Zenith z-100 pc, clear=\EE$<5*/>, cnorm=\Ey4, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<1*/>, cuu1=\EA, cvvis=\Ex4, dch1=\EN$<1*/>, dl1=\EM$<5*/>, ed=\EJ, el=\EK, - home=\EH, ht=^I, il1=\EL$<5*/>, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, kf0=\EJ, kf1=\ES, kf2=\ET, kf3=\EU, - kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\EOI, - khome=\EH, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq, smacs=\EF, - smir=\E@, smso=\Ep, + home=\EH, ht=^I, il1=\EL$<5*/>, kbs=^H, kf0=\EJ, kf1=\ES, + kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, + kf9=\EOI, khome=\EH, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq, + smacs=\EF, smir=\E@, smso=\Ep, use=vt52+arrows, p19|h19-b with il1/dl1, dl1=\EM$<2*/>, il1=\EL$<2*/>, use=h19-b, # From: @@ -22815,10 +22830,9 @@ ztx|ztx11|zt-1|htx11|ztx-1-a|Heath/Zenith ztx-10 or 11, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, dsl=\Ey1, ed=\EJ, el=\EK, fsl=\Ek\Ey5, home=\EH, ht=^I, il1=\EL, is2=\Ej\EH\Eq\Ek\Ev\Ey1\Ey5\EG\Ey8\Ey9\Ey>, - kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf0=\ES, - kf1=\EB, kf2=\EU, kf3=\EV, kf4=\EW, kf5=\EP, kf6=\EQ, kf7=\ER, - ri=\EI, rmso=\Eq, rmul=\Eq, smso=\Es5, smul=\Es2, - tsl=\Ej\Ex5\Ex1\EY8%+ \Eo, + kbs=^H, kf0=\ES, kf1=\EB, kf2=\EU, kf3=\EV, kf4=\EW, kf5=\EP, + kf6=\EQ, kf7=\ER, ri=\EI, rmso=\Eq, rmul=\Eq, smso=\Es5, + smul=\Es2, tsl=\Ej\Ex5\Ex1\EY8%+ \Eo, use=vt52+arrows, #### IMS International (ims) # @@ -22907,16 +22921,14 @@ graphos|graphos III, am, mir, cols#80, it#8, lines#24, clear=\E[H\E[2J, cnorm=\Ez56;2;0;0z\Ez73z\Ez4;1;1z, - cr=\r, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, - cvvis=\Ez4;2;1z\Ez56;2;80;24z, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, il=\E[%p1%dL, - il1=\E[L, ind=\ED, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, khome=\E[H, nel=\r\ED, rc=\E8, ri=\EM, rmdc=\E[4l, - rmir=\E[4l, rmso=\E[m, sc=\E7, sgr0=\E[m, smdc=\E[4h, - smir=\E[4h, smso=\E[7m, + cr=\r, cub1=^H, cud=\E[%p1%dB, cup=\E[%i%p1%d;%p2%dH, + cvvis=\Ez4;2;1z\Ez56;2;80;24z, dch1=\E[P, ed=\E[J, + el=\E[K, home=\E[H, ht=^I, ind=\ED, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, nel=\r\ED, rc=\E8, ri=\EM, rmdc=\E[4l, + rmir=\E[4l, sc=\E7, sgr0=\E[m, smdc=\E[4h, smir=\E[4h, + use=ansi+arrows, use=ansi+idl, use=ansi+local, + use=ansi+sgrso, + graphos-30|graphos III with 30 lines, lines#30, cvvis=\Ez4;2;1z\Ez56;2;80;30z, use=graphos, @@ -22946,7 +22958,6 @@ graphos-30|graphos III with 30 lines, modgraph|mod24|modgraph terminal emulating VT100, xenl@, - cols#80, lines#24, cvvis=\E\^9;0s\E\^7;1s, is2=\E\^9;0s\E\^7;1s\E[3g\E\^11;9s\E\^11;17s\E\^11;25s\E\^11 ;33s\E\^11;41s\E\^11;49s\E\^11;57s\E\^11;65s\E\^11;73s @@ -22981,15 +22992,15 @@ modgraph48|mod|Modgraph w/48 lines, OTbs, OTpt, am, xenl, cols#80, it#8, lines#48, vt#3, OTnl=\n, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\n, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, + cr=\r, cub1=^H, cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, ed=\E[J, el=\E[K, flash=\E[?5h\E[0q\E[1;2q\E[?5l\E[0q\E[4;3q, home=\E[H, ht=^I, is2=\E<\E[1;48r\E[0q\E[3;4q\E=\E[?1h, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m, - ri=\EM, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - rs1=\E=\E[0q\E>, sc=\E7, sgr0=\E[m, smkx=\E[?1h\E=, - smso=\E[7m, smul=\E[4m, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rev=\E[7m, ri=\EM, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=\E=\E[0q\E>, + sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + use=ansi+csr, #### Morrow Designs # @@ -23070,21 +23081,20 @@ rt6221|Ramtek 6221 80x24, OTbs, OTpt, msgr, xon, OTkn#4, cols#80, it#8, lines#24, vt#3, acsc=, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[>5l, - clear=\E[1;1H\E[J, cnorm=\E[>5h\E[>9h, cr=\r, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=^K, cuf=\E[%p1%dC, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, + clear=\E[1;1H\E[J, cnorm=\E[>5h\E[>9h, cr=\r, cub1=^H, + cud1=^K, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, cvvis=\E[>7h\E[>9l, ed=\E[J, el=\E[K, home=\E[1;1H, ht=^I, hts=\EH, ind=\n, is2=\E)0, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\EOP, kf1=\EOQ, kf2=\EOR, kf3=\EOS, lf0=PF1, lf1=PF2, lf2=PF3, lf3=PF4, ll=\E[24;1H, - nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmkx=\E>, - rmso=\E[m, rmul=\E[m, + nel=\EE, rev=\E[7m, ri=\EM, rmacs=^O, rmkx=\E>, rmso=\E[m, + rmul=\E[m, rs1=\E[1w\E[>37m\E[>39m\E[1v\E[20l\E[?3l\E[?6l\E[>5h\E[>6h \E[>7h\E[>8l\E[>9h\E[>10l\E[1;24r\E[m\E[q\E(B\017\E)0\E# 5\E>, - sc=\E7, sgr0=\E[m, smacs=^N, smkx=\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, + sgr0=\E[m, smacs=^N, smkx=\E=, smso=\E[7m, smul=\E[4m, + tbc=\E[3g, use=ansi+csr, use=ansi+local, + # [TO DO: Check out: short forms of ho/cl and ll; reset (\Ec)]. rt6221-w|Ramtek 6221 160x48, cols#160, lines#48, @@ -23119,21 +23129,20 @@ rca|RCA vp3301/vp3501, hirez100|Selanar HiREZ-100, OTbs, OTpt, mir, msgr, xon, OTkn#4, cols#80, it#8, lines#48, vt#3, - acsc=, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, - cr=\r, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - hts=\EH, il=\E[%p1%dL, il1=\E[L, is2=\E<\E)0, kbs=^H, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOP, - kf1=\EOQ, kf2=\EOR, kf3=\EOS, lf0=PF1, lf1=PF2, lf2=PF3, - lf3=PF4, ll=\E[48H, mc0=\E[i, mc4=\E[4i\E[?4i, - mc5=\E[?5i\E[5i, nel=\EE, rc=\E8, rev=\E[7m, rmacs=^O, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub=\E[%p1%dD, + cub1=^H, cud1=\n, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, + dch=\E[%p1%dP, dch1=\E[P, home=\E[H, ht=^I, hts=\EH, + is2=\E<\E)0, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, kf0=\EOP, kf1=\EOQ, kf2=\EOR, kf3=\EOS, lf0=PF1, + lf1=PF2, lf2=PF3, lf3=PF4, ll=\E[48H, mc0=\E[i, + mc4=\E[4i\E[?4i, mc5=\E[?5i\E[5i, nel=\EE, rc=\E8, + rev=\E[7m, rmacs=^O, rmkx=\E[?1l\E>, rs1=\030\E2\E<\E[4i\E[?4i\E[12h\E[2;4;20l\E[?0;7h\E[?1;3;6;1 9l\E[r\E[m\E(B\017\E)0\E>, - sc=\E7, sgr0=\E[m, smacs=^N, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, + sc=\E7, sgr0=\E[m, smacs=^N, smkx=\E[?1h\E=, tbc=\E[3g, + use=ansi+erase, use=ansi+idl, use=ansi+local, + use=ansi+sgrso, use=ansi+sgrul, + hirez100-w|Selanar HiREZ-100 in 132-column mode, cols#132, use=hirez100, @@ -23172,8 +23181,7 @@ vsc|Signetics Vsc Video driver by RMC, # (soroc120: removed obsolete ":ma=^K^P^R^L^L :" -- esr) soroc120|iq120|soroc|Soroc iq120, - clear=\E*$<2>, cud1=\n, ed=\EY, el=\ET, kcub1=^H, kcud1=\n, - kcuf1=^L, kcuu1=^K, use=adm3a, + clear=\E*$<2>, ed=\EY, el=\ET, use=adm3a, soroc140|iq140|Soroc iq140, OTbs, am, mir, cols#80, lines#24, @@ -23264,14 +23272,20 @@ synertek|ktm|synertek380|Synertek KTM 3/80 tubeless terminal, # sets 80 col mode, normal video, autowrap on (for ). # Seems to be no way to get rid of status line. # The manual for this puppy was dated June 1981. It claims to be VT52- -# compatible but looks more VT100-like. +# compatible but looks more VT100-like -esr +# +# According to +# https://ub.fnwi.uva.nl/computermuseum/tab13215g.html +# This monochrome graphics terminal of TAB Products, California, is a DEC +# VT52/VT100/VT132 compatible alphanumeric terminal (TAB 132/15), +# factory-fitted with additional hardware for Tektronix 4010 emulation. +# Also the terminal understands a selection of Tektronix 4027 commands. tab132|tab|tab132-15|tab 132/15, da, db, - OTdN@, cols#80, lines#24, lm#96, - cud1=\n, cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, - il1=\E[L, is2=\E[?7h\E[?3l\E[?5l, kcub1=\E[D, kcud1=\E[B, - kcuu1=\E[A, rmir=\E[4l, rmkx@, smir=\E[4h, smkx@, - use=vt100+4bsd, + OTdN@, lm#96, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, il1=\E[L, + is2=\E[?7h\E[?3l\E[?5l, rmir=\E[4l, rmkx@, smir=\E[4h, + smkx@, use=decid+cpr, use=vt100+4bsd, tab132-w|tab132 in wide mode, cols#132, is2=\E[?7h\E[?3h\E[?5l, use=tab132, @@ -23349,14 +23363,14 @@ t10|Teleray 10 special, t16|Teleray 16, am, da, db, mir, xhp, xt, cols#80, lines#24, - bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=%i\E[%p1%d;%p2%df, cuu1=\E[A, dch1=\E[P, - dl1=\E[M, ed=\E[0J, el=\E[0K, home=\E[H, ht=^I, il1=\E[L, - ind=\n, kf1=^Z1, kf10=^Z0, kf2=^Z2, kf3=^Z3, kf4=^Z4, kf5=^Z5, - kf6=^Z6, kf7=^Z7, kf8=^Z8, kf9=^Z9, ri=\E[T, - rmcup=\E[V\E[24;1f\E[?38h, rmir=\E[4l, rmso=\E[m, - rmul=\E[m, sgr0=\E[m, smcup=\E[U\E[?38l, smir=\E[4h, - smso=\E[7m, smul=\E[4m, + bel=^G, clear=\E[H\E[2J, cr=\r, cub1=^H, + cup=%i\E[%p1%d;%p2%df, dch1=\E[P, dl1=\E[M, ed=\E[0J, + el=\E[0K, home=\E[H, ht=^I, il1=\E[L, ind=\n, kf1=^Z1, + kf10=^Z0, kf2=^Z2, kf3=^Z3, kf4=^Z4, kf5=^Z5, kf6=^Z6, kf7=^Z7, + kf8=^Z8, kf9=^Z9, ri=\E[T, rmcup=\E[V\E[24;1f\E[?38h, + rmir=\E[4l, rmso=\E[m, rmul=\E[m, sgr0=\E[m, + smcup=\E[U\E[?38l, smir=\E[4h, smso=\E[7m, smul=\E[4m, + use=ansi+local1, #### Texas Instruments (ti) # @@ -23385,7 +23399,7 @@ ti703|ti707|Texas Instruments Silent 703/707, am, xenl, it#8, cuf1=\s, is2=\EPC\\, nel=\r\n, use=ti700, -ti703-w|ti707-w|Texas Instruments Silent 703/707, +ti703-w|ti707-w|Texas Instruments Silent 703/707 (132 column), cols#132, is2=\EPD\\, use=ti703, @@ -23393,12 +23407,10 @@ ti703-w|ti707-w|Texas Instruments Silent 703/707, # Texas Instruments 916 VDT 7 bit control mode # ti916|ti916-220-7|Texas Instruments 916 VDT 8859/1 VT220 mode 7 bit CTRL, - da, db, in, msgr, - cbt=\E[Z, clear=\E[H\E[2J$<6>, cub=\E[%p1%dD, - cud=\E[%p1%dB, cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, dch=\E[%p1%dP$<250>, dch1=\E[P, - dl=\E[%p1%dM, ech=\E[%p1%dX$<20>, ed=\E[J$<6>, el=\E[0K, - el1=\E[1K, enacs=\E(B\E)0, ff=^L, flash=\E[?5h\E[?5l$<6>, + da, db, in, + cbt=\E[Z, clear=\E[H\E[2J$<6>, dch=\E[%p1%dP$<250>, + ech=\E[%p1%dX$<20>, ed=\E[J$<6>, el=\E[0K, + enacs=\E(B\E)0, ff=^L, flash=\E[?5h\E[?5l$<6>, hpa=\E[%p1%{1}%+%dG, hts=\E[0W, ich=\E[%p1%d@$<250>, il=\E[%p1%dL$<36>, ip=$<10>, is2=\E[1;24r\E[24;1H, kcmd=\E[29~, kdch1=\E[P, kent=\n, kf1=\E[17~, kf10=\E[28~, @@ -23406,18 +23418,17 @@ ti916|ti916-220-7|Texas Instruments 916 VDT 8859/1 VT220 mode 7 bit CTRL, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khome=\E[H, kich1=\E[@, knp=\E[S, kpp=\E[T, kprt=^X, prot=\E&, rmacs=\017$<2>, rs2=\E[!p, sgr@, - smacs=\016$<2>, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, - use=vt220, + smacs=\016$<2>, vpa=\E[%p1%{1}%+%dd, use=vt220, # # Texas Instruments 916 VDT 8 bit control mode # ti916-8|ti916-220-8|Texas Instruments 916 VDT 8859/1 8 VT220 mode bit CTRL, kcmd=\23329~, kcub1=\233D, kcud1=\233B, kcuf1=\233C, - kcuu1=\233A, kdch1=\233P, kent=\n, kf1=\23317~, - kf10=\23328~, kf11=\23329~, kf12=\23331~, kf2=\23318~, - kf3=\23319~, kf4=\23320~, kf5=\23321~, kf6=\23323~, - kf7=\23324~, kf8=\23325~, kf9=\23326~, khome=\233H, - kich1=\233@, knp=\233S, kpp=\233T, kprt=^X, use=ti916, + kcuu1=\233A, kdch1=\233P, kf1=\23317~, kf10=\23328~, + kf11=\23329~, kf12=\23331~, kf2=\23318~, kf3=\23319~, + kf4=\23320~, kf5=\23321~, kf6=\23323~, kf7=\23324~, + kf8=\23325~, kf9=\23326~, khome=\233H, kich1=\233@, + knp=\233S, kpp=\233T, use=ti916, # # Texas Instruments 916 VDT 8859/1 7 bit control 132 column mode # @@ -23432,28 +23443,27 @@ ti924|Texas Instruments 924 VDT 8859/1 7 bit CTRL, OTbs, am, xon, cols#80, it#8, lines#24, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[2J\E[H, cr=\r, - csr=%i\E[%p1%d;%p2%dr, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=%i\E[%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E[?31h, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\EH, - il1=\E[L, ind=\ED, kbs=^H, kcub1=\E[D, kcud1=\E[B, + csr=%i\E[%p1%d;%p2%dr, cup=%i\E[%p1%d;%p2%dH, + cvvis=\E[?31h, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + hts=\EH, il1=\E[L, ind=\ED, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[16~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kich1=\E[@, rc=\E8, rev=\E[7m, ri=\EM, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, use=vt220+cvis, + smul=\E[4m, tbc=\E[3g, use=ansi+local1, use=vt220+cvis, ti924-8|Texas Instruments 924 VDT 8859/1 8 bit CTRL, am, xon, cols#80, it#8, lines#24, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[2J\E[H, cr=\r, - csr=%i\E[%p1%d;%p2%dr, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=%i\E[%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E[?31h, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\EH, - il1=\E[L, ind=\ED, kbs=^H, kcub1=\E[D, kcud1=\E[B, + csr=%i\E[%p1%d;%p2%dr, cup=%i\E[%p1%d;%p2%dH, + cvvis=\E[?31h, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + hts=\EH, il1=\E[L, ind=\ED, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\233P, kf1=\217P, kf2=\217Q, kf3=\217R, kf4=\217S, kf5=\23316~, kf6=\23317~, kf7=\23318~, kf8=\23319~, kf9=\23320~, kich1=\233@, rc=\E8, rev=\E[7m, ri=\EM, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt220+cvis, + smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=ansi+local1, + use=vt220+cvis, ti924w|Texas Instruments 924 VDT 7 bit - 132 column mode, cols#132, use=ti924, ti924-8w|Texas Instruments 924 VDT 8 bit - 132 column mode, @@ -23465,11 +23475,11 @@ ti931|Texas Instruments 931 VDT, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, dl1=\EO, ed=\EJ, el=\EI, home=\EH, ich1=\ER\EP\EM, il1=\EN, ind=\Ea, invis=\E4H, - is2=\EGB\E(@B@@\E), kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kdch1=\EQ, kdl1=\EO, kf1=\Ei1, kf2=\Ei2, kf3=\Ei3, - kf4=\Ei4, kf5=\Ei5, kf6=\Ei6, kf7=\Ei7, kf8=\Ei8, kf9=\Ei9, - kich1=\EP, kil1=\EN, rev=\E4B, ri=\Eb, rmso=\E4@, rmul=\E4@, - sgr0=\E4@, smso=\E4A, smul=\E4D, + is2=\EGB\E(@B@@\E), kdch1=\EQ, kdl1=\EO, kf1=\Ei1, + kf2=\Ei2, kf3=\Ei3, kf4=\Ei4, kf5=\Ei5, kf6=\Ei6, kf7=\Ei7, + kf8=\Ei8, kf9=\Ei9, kich1=\EP, kil1=\EN, rev=\E4B, ri=\Eb, + rmso=\E4@, rmul=\E4@, sgr0=\E4@, smso=\E4A, smul=\E4D, + use=vt52+arrows, ti926|Texas Instruments 926 VDT 8859/1 7 bit CTRL, csr@, ind=\E[1S, ri=\E[1T, use=ti924, # (ti926-8: I corrected this from the broken SCO entry -- esr) @@ -23479,16 +23489,14 @@ ti_ansi|basic entry for ti928, am, bce, eo, xenl, xon, colors#8, cols#80, it#8, lines#25, pairs#64, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[2J\E[H, - cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@, - il1=\E[L, ind=\E[S, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kend=\E[F, kf0=\E[V, kf1=\E[M, - kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, - kf8=\E[T, kf9=\E[U, khome=\E[H, knp=\E[G, kpp=\E[I, - op=\E[37;40m, ri=\E[T, rmso=\E[m, rmul=\E[m, + cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, ed=\E[J, + el=\E[K, home=\E[H, ht=^I, ich1=\E[@, il1=\E[L, ind=\E[S, + kend=\E[F, kf0=\E[V, kf1=\E[M, kf2=\E[N, kf3=\E[O, kf4=\E[P, + kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, knp=\E[G, + kpp=\E[I, op=\E[37;40m, ri=\E[T, rmso=\E[m, rmul=\E[m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[m, - smso=\E[7m, smul=\E[4m, + smso=\E[7m, smul=\E[4m, use=ansi+arrows, use=ansi+local1, # # 928 VDT 7 bit control mode # @@ -23545,10 +23553,9 @@ cci|cci1|z8001|zen8001|CCI Custom Zentec 8001, csr=\ER%p1%{32}%+%c%p2%{32}%+%c, cub1=^H, cud1=\n, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\EF\EQ\EM \ER 7, dim=\EM!, ed=\EJ, el=\EK, home=\EH, - invis=\EM(, is2=\EM \EF\ET\EP\ER 7, kbs=^H, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\EH, mc4=^T, mc5=^R, - rev=\EM$, ri=\EI, rmso=\EM\s, rmul=\EM\s, sgr0=\EM\s, - smso=\EM$, smul=\EM0, + invis=\EM(, is2=\EM \EF\ET\EP\ER 7, kbs=^H, khome=\EH, + mc4=^T, mc5=^R, rev=\EM$, ri=\EI, rmso=\EM\s, rmul=\EM\s, + sgr0=\EM\s, smso=\EM$, smul=\EM0, use=vt52+arrows, ######## OBSOLETE UNIX CONSOLES # @@ -23572,12 +23579,15 @@ apollo|Apollo console, # We don't know whether or not the apollo guys replicated DEC's firmware bug # in the VT132 that reversed /. To be on the safe side, disable # both these capabilities. -apollo_15P|Apollo 15 inch display, +apollo+vt132|Apollo console emulating VT132, rmir@, smir@, use=vt132, + +apollo_15P|Apollo 15 inch display, + use=apollo+vt132, apollo_19L|Apollo 19 inch display, - rmir@, smir@, use=vt132, + use=apollo+vt132, apollo_color|Apollo color display, - rmir@, smir@, use=vt132, + use=apollo+vt132, #### AT&T consoles @@ -23586,42 +23596,38 @@ apollo_color|Apollo color display, # From: Eric Raymond Mon Nov 27 19:00:53 EST 1995 att6386|at386|386at|AT&T WGS 6386 console, am, bw, eo, xon, - cols#80, it#8, lines#25, + cols#80, lines#25, acsc=``a1fxgqh0jYk?lZm@nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[=C, - clear=\E[2J\E[H, cnorm=\E[=1C, cr=\r, cub=\E[%p1%dD, - cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[1M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, + bel=^G, civis=\E[=C, clear=\E[2J\E[H, cnorm=\E[=1C, cr=\r, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, dl=\E[%p1%dM, dl1=\E[1M, ech=\E[%p1%dX, ed=\E[J, + el=\E[K, home=\E[H, hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L, ind=\E[S, invis=\E[9m, - is2=\E[0;10;39m, kbs=^H, kcbt=^], kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kend=\E[Y, kf1=\EOP, + is2=\E[0;10;39m, kcbt=^], kdch1=\E[P, kend=\E[Y, kf1=\EOP, kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, - khome=\E[H, kich1=\E[@, knp=\E[U, kpp=\E[V, krmir=\E0, - nel=\r\E[S, rc=\E8, rev=\E[7m, ri=\E[T, rmacs=\E[10m, - rmso=\E[m, rmul=\E[m, sc=\E7, + kich1=\E[@, knp=\E[U, kpp=\E[V, krmir=\E0, nel=\r\E[S, + rc=\E8, ri=\E[T, rmacs=\E[10m, sc=\E7, sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t; 2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m, - sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, vpa=\E[%i%p1%dd, use=ecma+index, - use=klone+color, + sgr0=\E[0;10m, smacs=\E[12m, vpa=\E[%i%p1%dd, + use=ansi+arrows, use=ansi+inittabs, use=ansi+local, + use=ansi+sgrbold, use=ecma+index, use=klone+color, + # (pc6300plus: removed ":KM=/usr/lib/ua/kmap.s5:"; renamed BO/EE/CI/CV -- esr) pc6300plus|AT&T 6300 plus, OTbs, am, xon, cols#80, lines#24, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[=C, - clear=\E[2J\E[H, cnorm=\E[=1C, cr=\r, cub1=^H, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, - dch1=\E[1P, dim=\E[2m, dl1=\E[1M, ed=\E[0J, el=\E[0K, - home=\E[H, hts=\EH, ich1=\E[1@, il1=\E[1L, ind=\n, - invis=\E[9m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf1=\EOc, kf10=\EOu, kf2=\EOd, kf3=\EOe, - kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kf9=\EOk, - nel=\r\n, rev=\E[7m, rmso=\E[m, rmul=\E[m, sgr0=\E[m, - smso=\E[7m, smul=\E[4m, tbc=\E[3g, + clear=\E[2J\E[H, cnorm=\E[=1C, cr=\r, cub1=^H, + cup=\E[%i%p1%2d;%p2%2dH, dch1=\E[1P, dim=\E[2m, + dl1=\E[1M, ed=\E[0J, el=\E[0K, home=\E[H, hts=\EH, + ich1=\E[1@, il1=\E[1L, ind=\n, invis=\E[9m, kbs=^H, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOc, + kf10=\EOu, kf2=\EOd, kf3=\EOe, kf4=\EOf, kf5=\EOg, kf6=\EOh, + kf7=\EOi, kf8=\EOj, kf9=\EOk, nel=\r\n, rev=\E[7m, rmso=\E[m, + rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, tbc=\E[3g, + use=ansi+local1, # From: Benjamin C. W. Sittler # @@ -23744,28 +23750,25 @@ att7300|unixpc|pc7300|3b1|s4|AT&T UNIX PC Model 7300, am, xon, cols#80, it#8, lines#24, bel=^G, blink=\E[9m, bold=\E[1m, cbt=\E^I, civis=\E[=1C, - clear=\E[2J\E[H, cnorm=\E[=0C, cr=\r, cub=\E[%p1%dD, - cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, - cuu1=\E[A, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, - ed=\E[0J, el=\E[0K, home=\E[H, ich1=\E[@, il=\E[%p1%dL, - il1=\E[L, ind=\n, invis=\E[9m, is1=\017\E[=1w, kBEG=\ENB, - kCAN=\EOW, kCPY=\END, kCRT=\EON, kDC=\ENF, kDL=\ENE, - kEND=\ENN, kEOL=\EOA, kFND=\EOX, kHLP=\EOM, kHOM=\ENM, - kIC=\ENJ, kLFT=\ENK, kMOV=\ENC, kNXT=\ENH, kOPT=\EOR, - kPRV=\ENG, kRDO=\EOT, kRIT=\ENL, kRPL=\EOY, kSAV=\EOO, - kUND=\EOS, kbeg=\ENb, kbs=^H, kcan=\EOw, kcbt=\E[Z, - kclo=\EOV, kclr=\E[J, kcmd=\EOu, kcpy=\ENd, kcrt=\EOn, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\ENf, - ked=\E[J, kel=\EOa, kend=\E0, kext=\EOk, kf1=\EOc, kf2=\EOd, - kf3=\EOe, kf4=\EOf, kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, - kfnd=\EOx, khlp=\EOm, khome=\E[H, kich1=\ENj, kind=\E[B, - kmov=\ENc, kmrk=\ENi, knp=\E[U, knxt=\ENh, kopn=\EOv, - kopt=\EOr, kpp=\E[V, kprt=\EOz, kprv=\ENg, krdo=\EOt, - kref=\EOb, krfr=\ENa, kri=\E[A, krpl=\EOy, krst=\EOB, - ksav=\EOo, kslt=\ENI, kund=\EOs, nel=\EE, rev=\E[7m, ri=\EM, - rmso=\E[m, rmul=\E[m, sgr0=\E[0;10m, smso=\E[7m, - smul=\E[4m, + clear=\E[2J\E[H, cnorm=\E[=0C, cr=\r, cub1=^H, + cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dim=\E[2m, ed=\E[0J, + el=\E[0K, home=\E[H, ich1=\E[@, ind=\n, invis=\E[9m, + is1=\017\E[=1w, kBEG=\ENB, kCAN=\EOW, kCPY=\END, kCRT=\EON, + kDC=\ENF, kDL=\ENE, kEND=\ENN, kEOL=\EOA, kFND=\EOX, + kHLP=\EOM, kHOM=\ENM, kIC=\ENJ, kLFT=\ENK, kMOV=\ENC, + kNXT=\ENH, kOPT=\EOR, kPRV=\ENG, kRDO=\EOT, kRIT=\ENL, + kRPL=\EOY, kSAV=\EOO, kUND=\EOS, kbeg=\ENb, kcan=\EOw, + kcbt=\E[Z, kclo=\EOV, kclr=\E[J, kcmd=\EOu, kcpy=\ENd, + kcrt=\EOn, kdch1=\ENf, ked=\E[J, kel=\EOa, kend=\E0, + kext=\EOk, kf1=\EOc, kf2=\EOd, kf3=\EOe, kf4=\EOf, kf5=\EOg, + kf6=\EOh, kf7=\EOi, kf8=\EOj, kfnd=\EOx, khlp=\EOm, + kich1=\ENj, kind=\E[B, kmov=\ENc, kmrk=\ENi, knp=\E[U, + knxt=\ENh, kopn=\EOv, kopt=\EOr, kpp=\E[V, kprt=\EOz, + kprv=\ENg, krdo=\EOt, kref=\EOb, krfr=\ENa, kri=\E[A, + krpl=\EOy, krst=\EOB, ksav=\EOo, kslt=\ENI, kund=\EOs, + nel=\EE, rev=\E[7m, ri=\EM, rmso=\E[m, rmul=\E[m, + sgr0=\E[0;10m, smso=\E[7m, smul=\E[4m, use=ansi+arrows, + use=ansi+idl, use=ansi+local, #### Convergent Technology # @@ -23861,11 +23864,11 @@ fos|fortune|Fortune system, masscomp|masscomp workstation console, OTbs, km, mir, cols#80, it#8, lines#24, - clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - ed=\E[J, el=\E[K, ht=^I, il1=\E[L, is2=\EGc\EGb\EGw, kbs=^H, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rmir=\E[4l, - rmso=\E[m, rmul=\EGau, smir=\E[4h, smso=\E[7m, smul=\EGu, + clear=\E[2J, cub1=^H, cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, + dl1=\E[M, ed=\E[J, el=\E[K, ht=^I, il1=\E[L, + is2=\EGc\EGb\EGw, kbs=^H, kcub1=\EOD, kcud1=\EOB, + kcuf1=\EOC, kcuu1=\EOA, rmir=\E[4l, rmso=\E[m, rmul=\EGau, + smir=\E[4h, smso=\E[7m, smul=\EGu, use=ansi+local1, masscomp1|masscomp large screen version 1, cols#104, lines#36, use=masscomp, masscomp2|masscomp large screen version 2, @@ -23893,10 +23896,9 @@ pmcons|pmconsole|PMAX console, pcix|PC/IX console, am, bw, eo, cols#80, lines#24, - clear=\Ec, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\E[J, el=\E[K, - home=\E[H, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, - smul=\E[4m, + clear=\Ec, cub1=^H, cup=\E[%i%p1%2d;%p2%2dH, ed=\E[J, + el=\E[K, home=\E[H, rmso=\E[m, rmul=\E[m, sgr0=\E[m, + smso=\E[7m, smul=\E[4m, use=ansi+local1, # (ibmpcx: this entry used to be known as ibmx. # It formerly included the following extension capabilities: @@ -23912,12 +23914,11 @@ pcix|PC/IX console, ibmpcx|xenix|ibmx|IBM PC xenix console display, OTbs, am, msgr, cols#80, lines#25, - clear=^L, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - ed=\E[J, el=\E[K, home=\E[H, ich1=\E[@, il1=\E[L, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[d, - kf1=\E[K, kf2=\E[L, kf3=\E[M, kf4=\E[N, khome=\E[Y, knp=\E[e, - kpp=\E[Z, use=klone+acs, use=klone+sgr8, + clear=^L, cub1=^H, cup=\E[%p1%d;%p2%dH, dch1=\E[P, + dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ich1=\E[@, il1=\E[L, + kend=\E[d, kf1=\E[K, kf2=\E[L, kf3=\E[M, kf4=\E[N, + khome=\E[Y, knp=\E[e, kpp=\E[Z, use=ansi+arrows, + use=ansi+local1, use=klone+acs, use=klone+sgr8, ######## OTHER OBSOLETE TYPES # @@ -23965,9 +23966,7 @@ ctrm|C terminal emulator, cup=\E&a%p2%dc%p1%dY, cuu1=\EA, dch1=\EP$<2>, dl1=\EM, ed=\EJ, el=\EK, hpa=\E&a%p1%dC, ht=\011$<2>, hts=\E1, il1=\EL, ind=\n, ip=$<2>, is2=\E&jA\r, kbs=^H, kcub1=\Eu\r, - kcud1=\Ew\r, kcuf1=\Ev\r, kcuu1=\Et\r, kf1=\Ep\r, - kf2=\Eq\r, kf3=\Er\r, kf4=\Es\r, kf5=\Et\r, kf6=\Eu\r, - kf7=\Ev\r, kf8=\Ew\r, khome=\Ep\r, + kcud1=\Ew\r, kcuf1=\Ev\r, kcuu1=\Et\r, khome=\Ep\r, op=\E&bn\E&bB\E&bG\E&bR%{0}%PX%{0}%PY%{0}%PZ%{1}%PW%{1}%PV %{1}%PU, rev=%?%gB%{0}%=%t\E&dB%{1}%PB%;, rmir=\ER, rmkx=\E&jA, @@ -23984,6 +23983,7 @@ ctrm|C terminal emulator, %t\E&dD%;, sgr0=\E&d@%{0}%PA%{0}%PB%{0}%PH, smir=\EQ, smkx=\E&jB, smso=\E&dD, smul=\E&dD, tbc=\E3, vpa=\E&a%p1%dY, + use=hp+pfk+cr, # gs6300 - can't use blue foreground, it clashes with underline; # it's simulated with cyan @@ -23994,19 +23994,17 @@ gs6300|emots|AT&T PC6300 with EMOTS terminal emulator, colors#8, cols#80, it#8, lines#24, pairs#63, acsc=++\,\,--..``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz z{{||}}~~, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=\r, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, - is2=\E[m, kbs=^H, kcbt=^R^I, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf1=\E[0s, kf2=\E[24s, kf3=\E[1s, - kf4=\E[23s, kf5=\E[2s, kf6=\E[22s, kf7=\E[3s, kf8=\E[21s, - khome=\E[H, mc4=\E[4i, mc5=\E[5i, op=\E[?;m, rev=\E[7m, - ri=\E[L, rmacs=\E[10m, rs1=\Ec, setb=\E[?;%p1%dm, + bel=^G, blink=\E[5m, bold=\E[1m, cr=\r, cub1=^H, cud1=\n, + cup=\E[%i%p1%d;%p2%dH, dch=\E[%p1%dP, dch1=\E[P, + home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, ind=\n, is2=\E[m, + kcbt=^R^I, kf1=\E[0s, kf2=\E[24s, kf3=\E[1s, kf4=\E[23s, + kf5=\E[2s, kf6=\E[22s, kf7=\E[3s, kf8=\E[21s, mc4=\E[4i, + mc5=\E[5i, op=\E[?;m, rev=\E[7m, ri=\E[L, rmacs=\E[10m, + rs1=\Ec, setb=\E[?;%p1%dm, setf=\E[?%?%p1%{0}%=%t0%e%p1%{1}%=%t2%e%p1%{1}%-%d%;m, sgr0=\E[m\E[10m, smacs=\E[11m, smso=\E[1m, smul=\E[4m, + use=ansi+arrows, use=ansi+erase, use=ansi+idl, + use=ansi+local, # From: 29 Oct 85 05:40:18 GMT # MS-Kermit with Heath-19 emulation mode enabled @@ -24024,18 +24022,17 @@ versaterm|VersaTerm VT100 emulator for the Macintosh, am, xenl, cols#80, it#8, lines#24, bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, - clear=\E[;H\E[2J$<50/>, cr=\r, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=\n, cuf1=\E[C$<2/>, - cup=\E[%i%p1%d;%p2%dH$<5/>, cuu1=\E[A$<2/>, - dch1=\E[1P$<7/>, dl1=\E[1M$<9/>, ed=\E[J$<50/>, - el=\E[K$<3/>, home=\E[H, ht=^I, ich1=\E[1@$<7/>, - il1=\E[1L$<9/>, is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, nel=\r\n, rc=\E8, rev=\E[7m$<2/>, - rf=/usr/share/tabset/vt100, ri=\EM$<5/>, - rmkx=\E>\E[?1l, rmso=\E[m$<2/>, rmul=\E[m$<2/>, rs1=\E>, - sc=\E7, sgr0=\E[m$<2/>, smkx=\E=\E[?1h, smso=\E[7m$<2/>, - smul=\E[4m$<2/>, + clear=\E[;H\E[2J$<50/>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2/>, cup=\E[%i%p1%d;%p2%dH$<5/>, + cuu1=\E[A$<2/>, dch1=\E[1P$<7/>, dl1=\E[1M$<9/>, + ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, ht=^I, + ich1=\E[1@$<7/>, il1=\E[1L$<9/>, is2=\E[1;24r\E[24;1H, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\r\n, + rev=\E[7m$<2/>, rf=/usr/share/tabset/vt100, + ri=\EM$<5/>, rmkx=\E>\E[?1l, rmso=\E[m$<2/>, + rmul=\E[m$<2/>, rs1=\E>, sgr0=\E[m$<2/>, smkx=\E=\E[?1h, + smso=\E[7m$<2/>, smul=\E[4m$<2/>, use=ansi+csr, # From: Rick Thomas # (xtalk: I added / based on the init string. @@ -24043,9 +24040,8 @@ xtalk|IBM PC with xtalk communication program (versions up to 3.4), am, mir, msgr, xon, cols#80, it#8, lines#24, vt#3, xmc#1, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, clear=\E[H\E[J$<50>, cr=\r, cub=\E[%p1%dD, cub1=^H, - cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C$<2>, - cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, + bel=^G, clear=\E[H\E[J$<50>, cr=\r, cub1=^H, cud1=\n, + cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, cuu1=\E[A$<2>, dl1=\E[M$<99>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, il1=\E[L$<99>, ind=\n, kbs=^H, kcub1=\EOD, kcud1=\EOB, @@ -24053,7 +24049,7 @@ xtalk|IBM PC with xtalk communication program (versions up to 3.4), rmkx=\E[?1l\E>, rmso=\E[m\s, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m\s, - tbc=\E[3g, use=vt100+fnkeys, + tbc=\E[3g, use=ansi+local, use=vt100+fnkeys, # The official PC terminal emulator program of the AT&T Product Centers. # Note - insert mode commented out - doesn't seem to work on AT&T PC. @@ -24218,17 +24214,13 @@ digilog|digilog 333, # The DWK was a terminal manufactured in the Soviet Union c.1986 dwk|dwk-vt|dwk terminal, am, - cols#80, it#8, lines#24, acsc=+\^\,Q-S.M0\177`+a:f'g#h#i#jXkClJmFnNo~qUs_tEuPv\\wKxW~ _, - bel=^G, clear=\EH\EJ, cr=\r, cub1=^H, cud1=\n, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EP, - ed=\EJ, el=\EK, home=\EH, ht=^I, ich1=\EQ, ind=\n, kbs=^?, - kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\Ee, - kf1=\Ef1, kf10=\Ef0, kf2=\Ef2, kf3=\Ef3, kf4=\Ef4, kf5=\Ef5, - kf6=\Ef6, kf7=\Ef7, kf8=\Ef8, kf9=\Ef9, kich1=\Ed, knp=\Eh, - kpp=\Eg, nel=\r\n, rev=\ET, ri=\ES, rmacs=\EG, rmso=\EX, - sgr0=\EX, smacs=\EF, smso=\ET, + clear=\EH\EJ, cub1=^H, cud1=\n, dch1=\EP, ich1=\EQ, kbs=^?, + kdch1=\Ee, kf1=\Ef1, kf10=\Ef0, kf2=\Ef2, kf3=\Ef3, kf4=\Ef4, + kf5=\Ef5, kf6=\Ef6, kf7=\Ef7, kf8=\Ef8, kf9=\Ef9, kich1=\Ed, + knp=\Eh, kpp=\Eg, rev=\ET, ri=\ES, rmacs=\EG, rmso=\EX, + sgr0=\EX, smacs=\EF, smso=\ET, use=vt52-basic, env230|envision230|envision 230 graphics terminal, xenl@, enacs@, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rmacs@, @@ -24277,14 +24269,13 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, is2=\E`:\Ee(\EO\Ee6\Ec41\E~4\Ec21\Ed/\Ezz&\E[A\177\Ezz'\E[B \177\Ezz(\E[D\177\Ezz)\E[C\177\Ezz<\E[Q\177\Ezz`\E[F \177\EA1*\EZH12, - kHOM=\E{, kbs=^H, kcbt=\EI, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\EW, kdl1=\ER, ked=\EY, - kel=\ET, kend=\E[F, kent=\E7, kf1=^A@\r, kf10=^AI\r, - kf11=^AJ\r, kf12=^AK\r, kf13=^AL\r, kf14=^AM\r, kf15=^AN\r, - kf16=^AO\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, - kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=^^, - kich1=\EQ, kil1=\EE, knp=\EK, kpp=\EJ, kprt=\EP, krpl=\Er, - mc0=\EP, mc4=^T, mc5=^R, nel=\r\n$<3>, + kHOM=\E{, kcbt=\EI, kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, + kend=\E[F, kent=\E7, kf1=^A@\r, kf10=^AI\r, kf11=^AJ\r, + kf12=^AK\r, kf13=^AL\r, kf14=^AM\r, kf15=^AN\r, kf16=^AO\r, + kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, + kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=^^, kich1=\EQ, + kil1=\EE, knp=\EK, kpp=\EJ, kprt=\EP, krpl=\Er, mc0=\EP, + mc4=^T, mc5=^R, nel=\r\n$<3>, pfloc=\EZ2%p1%{63}%+%c%p2%s\177, pfx=\EZ1%p1%{63}%+%c%p2%s\177, pln=\Ez%p1%{47}%+%c%p2%s\r, prot=\E), ri=\Ej$<7>, @@ -24298,7 +24289,8 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, smcup=\Ezz&\E[A\177\Ezz'\E[B\177\Ezz(\E[D\177\Ezz)\E[C\177 \Ezz<\E[Q\177, smir=\Eq, smln=\EA10, smxon=\Ec21, tbc=\E0, tsl=\Ez(, - uc=\EG8\EG0, use=adm+sgr, + uc=\EG8\EG0, use=ansi+arrows, use=adm+sgr, + teletec|Teletec Datascreen, OTbs, am, cols#80, lines#24, @@ -24333,15 +24325,14 @@ teletec|Teletec Datascreen, v3220|LANPAR Vision II model 3220/3221/3222, OTbs, am, mir, xenl, cols#80, it#8, lines#24, - clear=\E[H\E[J, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, - ed=\E[J, el=\E[K, ht=^I, il1=\E[L, - is2=\E>\E[?3l\E[?7h\E[?8h\E[p, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kf0=\E[1~, kf1=\E[2~, kf2=\E[3~, - kf3=\E[4~, kf4=\E[5~, kf5=\E[6~, kf6=\E[OP, kf7=\E[OQ, - kf8=\E[OR, kf9=\E[OS, khome=\E[H, ri=\EM, rmam=\E[?7l, - rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, sgr0=\E[m, - smam=\E[?7h, smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, + cub1=^H, cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, ht=^I, + il1=\E[L, is2=\E>\E[?3l\E[?7h\E[?8h\E[p, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[1~, kf1=\E[2~, + kf2=\E[3~, kf3=\E[4~, kf4=\E[5~, kf5=\E[6~, kf6=\E[OP, + kf7=\E[OQ, kf8=\E[OR, kf9=\E[OS, khome=\E[H, ri=\EM, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmso=\E[m, rmul=\E[m, + sgr0=\E[m, smam=\E[?7h, smir=\E[4h, smkx=\E=, smso=\E[7m, + smul=\E[4m, use=ansi+erase, use=ansi+local1, ######## ICH/ICH1 VERSUS RMIR/SMIR # # Some non-curses applications get confused if both ich/ich1 and rmir/smir @@ -25110,7 +25101,7 @@ v3220|LANPAR Vision II model 3220/3221/3222, # differences, noted in # https://invisible-island.net/ncurses/ncurses-netbsd.html # -# ncurses makes explicit checks for a few user-definable capabilities: AX, +# ncurses makes explicit checks for a few user-definable capabilities: AX, E3, # RGB, U8, XM, which are documented in the user_caps(5) manual page. # #### SCREEN Extensions: @@ -25163,6 +25154,19 @@ v3220|LANPAR Vision II model 3220/3221/3222, # #### XTERM Extensions: # +# For a discussion of "xterm", "xterm-256color" as values for TERM, see +# https://invisible-island.net/ncurses/ncurses.faq.html#xterm_generic +# https://invisible-island.net/ncurses/ncurses.faq.html#xterm_256color +# +# For xterm control sequences, see +# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html +# +# For function-keys with modifiers, see +# https://invisible-island.net/ncurses/ncurses.faq.html#modified_keys +# +# For a discussion of "bracketed paste", see +# https://invisible-island.net/xterm/xterm-paste64.html +# # Most of the xterm extensions are for function-keys. Since xterm patch #94 (in # 1999), xterm has supported shift/control/alt/meta modifiers which produce # additional function-key strings. Some other developers copied the feature, @@ -25177,7 +25181,20 @@ v3220|LANPAR Vision II model 3220/3221/3222, # kDC3 kDC4 kDC5 kDC6 kDC7 kDN kDN3 kDN4 kDN5 kDN6 kDN7 kEND3 kEND4 kEND5 kEND6 # kEND7 kHOM3 kHOM4 kHOM5 kHOM6 kHOM7 kIC3 kIC4 kIC5 kIC6 kIC7 kLFT3 kLFT4 # kLFT5 kLFT6 kLFT7 kNXT3 kNXT4 kNXT5 kNXT6 kNXT7 kPRV3 kPRV4 kPRV5 kPRV6 kPRV7 -# kRIT3 kRIT4 kRIT5 kRIT6 kRIT7 kUP kUP3 kUP4 kUP5 kUP6 kUP7 ka2 kb1 kb3 kc2 +# kRIT3 kRIT4 kRIT5 kRIT6 kRIT7 kUP kUP3 kUP4 kUP5 kUP6 kUP7 kxIN kxOUT ka2 kb1 +# kb3 kc2 +# +# Bracketed paste is described with these capabilities in vim: +# +# BE enables bracketed paste +# BD disables bracketed paste +# PS is sent before the pasted text +# PE is sent after the pasted text +# +# vim also uses these names for xterm focus: +# +# fe enables focus events +# fd disables focus events # # Here are the other xterm-related extensions which are used in this file: # @@ -25188,12 +25205,21 @@ v3220|LANPAR Vision II model 3220/3221/3222, # Ms modifies the selection/clipboard. Its parameters are # p1 = the storage unit (clipboard, selection or cut buffer) # p2 = the base64-encoded clipboard content. +# RV requests the terminal to report secondary device attributes (i.e, version). +# rv shows the format of the terminal responses, as a regular expression. # Se resets the cursor style to the terminal power-on default. # Ss is a string capability with one numeric parameter. It is used to set the # cursor style as described by the DECSCUSR function to a block or # underline. # TS is a string capability which acts like "tsl", but uses no parameter and # goes to the first column of the "status line". +# XF is set/true for terminals which support the xterm focus-in/focus-out +# escape sequences sent from the terminal to the host when private mode +# 1004 is set. Those are defined as kxIN and kxOUT, to take advantage of +# ncurses keypad mode to interpret them like a function key. Because the +# 1004 mode is usually combined with other flags to set the mouse protocol, +# this flag provides an application with the information that the focus +# mode is assumed to be set, e.g., in XM. # XM is a string capability which overrides ncurses's built-in string which # enables/disables xterm mouse mode. # xm shows the format of the mouse responses. Parameters: @@ -25207,6 +25233,8 @@ v3220|LANPAR Vision II model 3220/3221/3222, # p8 = x-ordinate ending region # Other extensions, used in xm: # %u = UTF-8 +# XR requests the terminal to report its version as a free-format string. +# xr shows the format of the terminal responses, as a regular expression. # #### Miscellaneous extensions: # @@ -25220,6 +25248,8 @@ v3220|LANPAR Vision II model 3220/3221/3222, # E3 clears the terminal's scrollback buffer. This was implemented in the # Linux 3.0 kernel as a security feature. It matches a feature which was # added in xterm patch #107. +# NQ denotes a terminal which does not support the standard query/response used +# in u6/u7 (cursor position) and u8/u9 (device attributes). # U8 is a numeric capability which denotes a terminal emulator which does not # support VT100 SI/SO when processing UTF-8 encoding. Set this to a nonzero # value to enable it. @@ -25313,7 +25343,7 @@ v3220|LANPAR Vision II model 3220/3221/3222, # * Replaced Qume QVT and Freedom-series entries with purpose-built # terminfo entries. # * Enhanced vt220, tvi910, tvi924, hpterm, hp2645, adm42, tek -# and dg200 entries using caps from from SCO. +# and dg200 entries using caps from SCO. # * Added the usual set of function-key mappings to ANSI entry. # * Corrected xterm's function-key capabilities. # 9.4.5 (Tue Mar 28 14:27:49 EST 1995): @@ -27098,7 +27128,7 @@ v3220|LANPAR Vision II model 3220/3221/3222, # + add/use xterm+keypad in xterm-new (report by Alain D D Williams) -TD # + update terminator entry -TD # + remove hard-tabs from ti703 (report by Robert Clausecker) -# + add Smol/Rmol for tmux, vte-2018 -Nicholas Marriott +# + add Smol/Rmol for mintty, vte-2018 -Nicholas Marriott # # 2019-06-01 # + add rs1 to konsole, mlterm -TD @@ -27320,4 +27350,164 @@ v3220|LANPAR Vision II model 3220/3221/3222, # + fix errata in description fields (report by Eric Lindblad) -TD # + add x10term+sl, aixterm+sl, ncr260vp+sl, ncr260vp+vt, wyse+sl -TD # +# 2022-01-23 +# + update kitty -TD +# +# 2022-03-12 +# + add xterm+acs building-block -TD +# + add xterm-p370, for use in older terminals -TD +# + add dec+sl to xterm-new, per patch #371 -TD +# + add mosh and mosh-256color -TD +# +# 2022-03-19 +# + add xgterm -TD +# + correct setal in mintty/tmux entries, add to vte-2018 (report by +# Robert Lange) +# + add blink to vte-2018 (report by Robert Lange) +# +# 2022-03-26 +# + update teken -TD +# + add teken-16color, teken-vt and teken-sc -TD +# + add a few missing details for vte-2018 (report by Robert Lange) -TD +# +# 2022-03-27 +# + make description-fields distinct -TD +# +# 2022-04-30 +# + modify samples for xterm mouse 1002/1003 modes to use 1006 mode, and +# also provide for focus in/out responses -TD +# +# 2022-05-28 +# + expanded notes for teken/syscons -TD +# +# 2022-06-04 +# + remove u6-u9 from teken-2018 -TD +# + set "xterm-new" to "xterm-p370", add "xterm-p371" -TD +# +# 2022-06-18 +# + revise kon/kon2/jfbterm to undo "linux2.6" change to +# smacs/rmacs/enacs (Debian #1012800) -TD +# + amended note for att610+cvis0, as per documentation for att610, +# att620, att730 -TD +# +# 2022-06-25 +# + correct dsl in dec+sl (report by Rajeev Pillai) -TD +# + add/use ansi+cpr, decid+cpr -TD +# +# 2022-07-03 +# + use NQ to flag entries where the terminal does not support query and +# response -TD +# + use ansi+enq and decid+cpr in cases where the terminal probably +# supported the u6-u9 extension -TD +# + add/use apollo+vt132, xterm+alt47 -TD +# +# 2022-08-27 +# + modify nsterm to use xterm+alt1049 (report by Paul Handly) -TD +# + modify putty to use xterm+alt1049 -TD +# +# 2022-12-24 +# + add/use bracketed+paste to help identify terminals supporting this +# xterm feature (prompted by discussion with Bram Moolenaar) -TD +# +# 2022-12-29 +# + correct PS vs PE names in bracketed+paste (report by Bram Moolenaar) +# -TD +# +# 2023-01-07 +# + add comment to bracketed+paste explaining that vim patch 9.0.1117 is +# needed for use with the updated xterm descriptions (suggested by Bram +# Moolenaar). +# + add RV report+version (suggested by Bram Moolenaar). +# +# 2023-01-14 +# + change RV to XR/xr, to avoid conflict with pre-existing usage in vim, +# to use RV/rv to denote DA2 and its response (discussion with Bram +# Moolenaar) -TD +# + add XF flag to xterm+focus so that termcap applications can be aware +# of terminals which may support focus in/out -TD +# + use xterm+focus in xterm-p370 and tmux -TD +# +# 2023-01-28 +# + document XF, kxIN and kxOUT -TD +# + add note on sun/wscons/cmdtool/shelltool -TD +# +# 2023-04-01 +# + remove DECCOLM+DECSCLM from foot (patch by Daniel Ekloef). +# +# 2023-04-08 +# + add xterm+focus to alacritty+common (patch by Christian Duerr). +# +# 2023-05-08 +# + add mode 1004 to xterm+sm+1006 from xterm #380 -TD +# +# 2023-06-05 +# + add xterm+focus to foot+base (patch by Daniel Ekloef). +# +# 2023-07-08 +# + add linux+kbs for terminals which imitate xterm's behavior with +# Linux -TD +# +# 2023-07-15 +# + mention E3 in regard to user_caps(5) -TD +# +# 2023-08-12 +# + add/use putty+cursor to reflect amending of modified cursor-keys in +# 2021 -TD +# + add ecma+strikeout to putty -TD +# +# 2023-10-21 +# + use oldxterm+sm+1006 in vte-2014 (report by Benno Schulenberg) -TD +# + add ansi+apparrows -TD +# +# 2023-10-28 +# + move xterm focus mode 1004 from xterm+sm+1006 into xterm+focus as +# fe/fd capabilities, like vim (vim-pr #13440). +# +# 2023-11-11 +# + used "infocmp -u" to help trim redundant capabilities -TD +# +# 2023-12-09 +# + remove xterm+sm+1006 from tmux (Debian #1057688). +# + used "infocmp -u" to help trim redundant capabilities -TD +# +# 2023-12-16 +# + used "infocmp -u" to help trim redundant capabilities -TD +# +# 2023-12-30 +# + add ms-vt100-16color, winconsole -TD +# + add rio, rio-direct -TD +# + add mostlike -TD +# + add wezterm, contour -TD +# +# 2024-01-06 +# + use ansi+arrows, ansi+apparrows, ansi+csr, ansi+erase, ansi+idc, +# ansi+idc1, ansi+idl, ansi+idl1, ansi+inittabs to trim -TD +# +# 2024-01-07 +# + restore padding for wy520* and vt320-k311 (report by Sven Joachim). +# +# 2024-01-13 +# + use ansi+local, ansi+local1, ansi+pp, ansi+rca, ansi+rca2, ansi+sgr +# to trim -TD +# +# 2024-01-14 +# + use ansi+sgrbold, ansi+sgrdim, ansi+sgrso, ansi+sgrul, ansi+tabs +# ecma+color, ecma+sgr, vt100+4bsd, vt100+pfkeys, vt220+pcedit +# xterm+256color, xterm+acs, xterm+nopcfkeys, xterm+pcf2 to trim -TD +# +# 2024-01-27 +# + amend change to z39-a (report by Sven Joachim). +# + use xterm+nopcfkeys, vt52-basic, dec+pp, dec+sl, vt52+arrows, +# hp+pfk+cr, klone+acs, klone+color, klone+sgr, ncr160wy50+pp +# to trim -TD +# + NetBSD-related fixes for x68k and wsvt52 (patch by Thomas Klausner) +# +# 2024-02-11 +# + add vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from +# xterm #389 -TD +# +# 2024-03-09 +# + modify xgterm to work around line-drawing bug -TD +# + use CSI 3J in vte-2017 (report by Sven Joachim) +# ######## SHANTIH! SHANTIH! SHANTIH! diff --git a/mk-1st.awk b/mk-1st.awk index 30638c35..6a5eafab 100644 --- a/mk-1st.awk +++ b/mk-1st.awk @@ -1,6 +1,6 @@ -# $Id: mk-1st.awk,v 1.124 2021/10/15 00:50:05 tom Exp $ +# $Id: mk-1st.awk,v 1.125 2023/04/22 15:49:59 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2021,2023 Thomas E. Dickey # # Copyright 1998-2016,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -354,8 +354,7 @@ BEGIN { && ( $1 != "link_test" ) \ && ( $2 == "lib" \ || $2 == "progs" \ - || $2 == "c++" \ - || $2 == "tack" )) + || $2 == "c++" )) { if ( found == 0 ) { diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index aba25fda..ae198df6 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.182 2021/08/19 23:43:40 tom Exp $ +# $Id: Makefile.in,v 1.184 2024/01/19 12:00:00 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2022,2024 Thomas E. Dickey # # Copyright 1998-2017,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -245,13 +245,13 @@ $(DESTDIR)$(libdir) : $(SHELL) -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) "$(TIC_PATH)" "$(INFOCMP_PATH)" $(FALLBACK_LIST) >$@ ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h - $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@ + FGREP="@FGREP@" $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@ init_keytry.h : make_keys$(BUILD_EXEEXT) keys.list ./make_keys$(BUILD_EXEEXT) keys.list > $@ keys.list : $(tinfo)/MKkeys_list.sh - AWK=$(AWK) $(SHELL) $(tinfo)/MKkeys_list.sh $(CAPLIST) | LC_ALL=C sort >$@ + AWK=$(AWK) USE_SIGWINCH=@cf_cv_enable_sigwinch@ $(SHELL) $(tinfo)/MKkeys_list.sh $(CAPLIST) | LC_ALL=C sort >$@ make_keys$(BUILD_EXEEXT) : \ build.priv.h \ @@ -288,7 +288,7 @@ report_offsets$(BUILD_EXEEXT) : \ $(SHELL) -e $(tinfo)/MKuserdefs.sh $(AWK) $(USE_BIG_STRINGS) $(CAPLIST) > $@ ./lib_keyname.c: keys.list $(base)/MKkeyname.awk - $(AWK) -f $(base)/MKkeyname.awk bigstrings=$(USE_BIG_STRINGS) keys.list > $@ + $(AWK) -f $(base)/MKkeyname.awk use_sigwinch=@cf_cv_enable_sigwinch@ bigstrings=$(USE_BIG_STRINGS) keys.list > $@ ./codes.c: $(tinfo)/MKcodes.awk $(AWK) -f $(tinfo)/MKcodes.awk bigstrings=$(USE_BIG_STRINGS) $(CAPLIST) >$@ @@ -333,7 +333,7 @@ realclean :: distclean test_progs : $(TEST_PROGS) ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h - $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@ + FGREP="@FGREP@" $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@ captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS) @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS) diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh index 9dc08557..f0ac0452 100755 --- a/ncurses/base/MKlib_gen.sh +++ b/ncurses/base/MKlib_gen.sh @@ -2,10 +2,10 @@ # # MKlib_gen.sh -- generate sources from curses.h macro definitions # -# ($Id: MKlib_gen.sh,v 1.71 2021/09/26 22:08:53 tom Exp $) +# ($Id: MKlib_gen.sh,v 1.73 2022/10/01 13:14:20 tom Exp $) # ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2021,2022 Thomas E. Dickey # # Copyright 1998-2016,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -83,7 +83,7 @@ USE="$3" # https://gcc.gnu.org/gcc-5/porting_to.html PRG=`echo "$1" | "$AWK" '{ sub(/^[ ]*/,""); sub(/[ ].*$/, ""); print; }' || exit 0` -FSF=`("$PRG" --version 2>/dev/null || exit 0) | fgrep "Free Software Foundation" | head -n 1` +FSF=`("$PRG" --version 2>/dev/null || exit 0) | ${FGREP-grep -F} "Free Software Foundation" | head -n 1` ALL=`"$PRG" -dumpversion 2>/dev/null || exit 0` ONE=`echo "$ALL" | sed -e 's/[^0-9].*$//'` if test -n "$FSF" && test -n "$ALL" && test -n "$ONE" ; then @@ -101,7 +101,8 @@ ED4=sed4_${PID}.sed AW1=awk1_${PID}.awk AW2=awk2_${PID}.awk TMP=gen__${PID}.c -trap "rm -f $ED1 $ED2 $ED3 $ED4 $AW1 $AW2 $TMP" 0 1 2 3 15 +trap "rm -f $ED1 $ED2 $ED3 $ED4 $AW1 $AW2 $TMP; exit 1" 1 2 3 15 +trap "rm -f $ED1 $ED2 $ED3 $ED4 $AW1 $AW2 $TMP" 0 ALL=$USE if test "$USE" = implemented ; then diff --git a/ncurses/base/MKunctrl.awk b/ncurses/base/MKunctrl.awk index 9a2a6db6..e5362bd6 100644 --- a/ncurses/base/MKunctrl.awk +++ b/ncurses/base/MKunctrl.awk @@ -1,6 +1,6 @@ -# $Id: MKunctrl.awk,v 1.29 2020/02/02 23:34:34 tom Exp $ +# $Id: MKunctrl.awk,v 1.30 2024/02/03 21:09:14 tom Exp $ ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2024 Thomas E. Dickey # # Copyright 1998-2012,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -144,7 +144,7 @@ END { print "\tint check = (int) ChCharOf(ch);" print "\tconst char *result;" print "" - print "(void) sp;" + print "\t(void) sp;" print "\tif (check >= 0 && check < (int)SIZEOF(unctrl_table)) {" print "#if NCURSES_EXT_FUNCS" print "\t\tif ((sp != 0)" @@ -155,6 +155,7 @@ END { print "\t\telse" print "\t\tif ((check >= 160)" print "\t\t && (check < 256)" + print "\t\t && !_nc_unicode_locale()" print "\t\t && ((sp != 0)" print "\t\t && ((sp->_legacy_coding > 0)" print "\t\t || (sp->_legacy_coding == 0" diff --git a/ncurses/base/key_defined.c b/ncurses/base/key_defined.c index 25d5a674..147e5fe2 100644 --- a/ncurses/base/key_defined.c +++ b/ncurses/base/key_defined.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2003-2006,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -32,8 +32,9 @@ ****************************************************************************/ #include +#include -MODULE_ID("$Id: key_defined.c,v 1.10 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: key_defined.c,v 1.11 2023/06/24 15:36:32 tom Exp $") static int find_definition(TRIES * tree, const char *str) @@ -41,7 +42,7 @@ find_definition(TRIES * tree, const char *str) TRIES *ptr; int result = OK; - if (str != 0 && *str != '\0') { + if (VALID_STRING(str) && *str != '\0') { for (ptr = tree; ptr != 0; ptr = ptr->sibling) { if (UChar(*str) == UChar(ptr->ch)) { if (str[1] == '\0' && ptr->child != 0) { diff --git a/ncurses/base/lib_addch.c b/ncurses/base/lib_addch.c index a1443289..a14bfd3b 100644 --- a/ncurses/base/lib_addch.c +++ b/ncurses/base/lib_addch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ #include #include -MODULE_ID("$Id: lib_addch.c,v 1.138 2021/06/17 21:11:08 tom Exp $") +MODULE_ID("$Id: lib_addch.c,v 1.141 2022/06/12 15:16:41 tom Exp $") static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT); @@ -321,20 +321,29 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch) int len = _nc_wacs_width(CharOf(ch)); int i; int j; - wchar_t *chars; if (len == 0) { /* non-spacing */ if ((x > 0 && y >= 0) || (win->_maxx >= 0 && win->_cury >= 1)) { - if (x > 0 && y >= 0) - chars = (win->_line[y].text[x - 1].chars); - else - chars = (win->_line[y - 1].text[win->_maxx].chars); + NCURSES_CH_T *dst; + wchar_t *chars; + if (x > 0 && y >= 0) { + for (j = x - 1; j >= 0; --j) { + if (!isWidecExt(win->_line[y].text[j])) { + win->_curx = (NCURSES_SIZE_T) j; + break; + } + } + dst = &(win->_line[y].text[j]); + } else { + dst = &(win->_line[y - 1].text[win->_maxx]); + } + chars = dst->chars; for (i = 0; i < CCHARW_MAX; ++i) { if (chars[i] == 0) { TR(TRACE_VIRTPUT, - ("added non-spacing %d: %x", - x, (int) CharOf(ch))); + ("adding non-spacing %s (level %d)", + _tracech_t(CHREF(ch)), i)); chars[i] = CharOf(ch); break; } @@ -410,9 +419,9 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch) testwrapping: ); - TR(TRACE_VIRTPUT, ("cell (%ld, %ld..%d) = %s", - (long) win->_cury, (long) win->_curx, x - 1, - _tracech_t(CHREF(ch)))); + TR(TRACE_VIRTPUT, ("cell (%d, %d..%d) = %s", + win->_cury, win->_curx, x - 1, + _tracech_t(CHREF(line->text[win->_curx])))); if (x > win->_maxx) { return wrap_to_next_line(win); diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c index a1e8829d..a3753af0 100644 --- a/ncurses/base/lib_addstr.c +++ b/ncurses/base/lib_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -45,7 +45,7 @@ #include -MODULE_ID("$Id: lib_addstr.c,v 1.57 2020/12/05 20:06:19 tom Exp $") +MODULE_ID("$Id: lib_addstr.c,v 1.62 2023/11/21 21:47:23 tom Exp $") NCURSES_EXPORT(int) waddnstr(WINDOW *win, const char *astr, int n) @@ -55,15 +55,18 @@ waddnstr(WINDOW *win, const char *astr, int n) T((T_CALLED("waddnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(astr, n), n)); - if (win && (str != 0)) { + if (win && (str != 0) && (n != 0)) { + bool explicit = (n > 0); + TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(WINDOW_ATTRS(win)))); code = OK; - if (n < 0) - n = INT_MAX; - TR(TRACE_VIRTPUT, ("str is not null, length = %d", n)); - while ((*str != '\0') && (n-- > 0)) { + TR(TRACE_VIRTPUT, ("str is not null, length = %d", + (explicit ? n : (int) strlen(str)))); + if (!explicit) + n = INT_MAX; + while ((n-- > 0) && (*str != '\0')) { NCURSES_CH_T ch; TR(TRACE_VIRTPUT, ("*str = %#o", UChar(*str))); SetChar(ch, UChar(*str++), A_NORMAL); @@ -143,7 +146,7 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n) _nc_viscbuf(astr, n), n)); - if (!win) + if (!win || !astr) returnCode(ERR); y = win->_cury; @@ -227,15 +230,18 @@ waddnwstr(WINDOW *win, const wchar_t *str, int n) T((T_CALLED("waddnwstr(%p,%s,%d)"), (void *) win, _nc_viswbufn(str, n), n)); - if (win && (str != 0)) { + if (win && (str != 0) && (n != 0)) { + bool explicit = (n > 0); + TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(WINDOW_ATTRS(win)))); code = OK; - if (n < 0) - n = INT_MAX; - TR(TRACE_VIRTPUT, ("str is not null, length = %d", n)); - while ((*str != L('\0')) && (n-- > 0)) { + TR(TRACE_VIRTPUT, ("str is not null, length = %d", + (explicit ? n : (int) wcslen(str)))); + if (!explicit) + n = INT_MAX; + while ((n-- > 0) && (*str != L('\0'))) { NCURSES_CH_T ch; TR(TRACE_VIRTPUT, ("*str[0] = %#lx", (unsigned long) *str)); SetChar(ch, *str++, A_NORMAL); diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index e4dc79b5..f001b224 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_color.c,v 1.148 2021/10/02 22:55:48 tom Exp $") +MODULE_ID("$Id: lib_color.c,v 1.150 2023/09/16 16:39:15 tom Exp $") #ifdef USE_TERM_DRIVER #define CanChange InfoOf(SP_PARM).canchange @@ -94,8 +94,6 @@ NCURSES_EXPORT_VAR(int) COLORS = 0; #define DATA(r,g,b) {r,g,b, 0,0,0, 0} -#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts)) - #define MAX_PALETTE 8 #define OkColorHi(n) (((n) < COLORS) && ((n) < maxcolors)) @@ -412,7 +410,7 @@ NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0) if (init_direct_colors(NCURSES_SP_ARG)) { result = OK; } else { - SP_PARM->_color_table = TYPE_CALLOC(color_t, maxcolors); + TYPE_CALLOC(color_t, maxcolors, SP_PARM->_color_table); if (SP_PARM->_color_table != 0) { MakeColorPair(SP_PARM->_color_pairs[0], default_fg(NCURSES_SP_ARG), @@ -529,7 +527,7 @@ _nc_reserve_pairs(SCREEN *sp, int want) have = sp->_pair_limit; if (sp->_color_pairs == 0) { - sp->_color_pairs = TYPE_CALLOC(colorpair_t, have); + TYPE_CALLOC(colorpair_t, have, sp->_color_pairs); } else if (have > sp->_pair_alloc) { #if NCURSES_EXT_COLORS colorpair_t *next; @@ -747,7 +745,7 @@ _nc_init_color(SCREEN *sp, int color, int r, int g, int b) NCURSES_PUTP2("initialize_color", TIPARM_4(initialize_color, color, r, g, b)); #endif - sp->_color_defs = max(color + 1, sp->_color_defs); + sp->_color_defs = Max(color + 1, sp->_color_defs); result = OK; } diff --git a/ncurses/base/lib_delwin.c b/ncurses/base/lib_delwin.c index 1136305a..c96e417a 100644 --- a/ncurses/base/lib_delwin.c +++ b/ncurses/base/lib_delwin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_delwin.c,v 1.24 2021/12/11 23:56:25 tom Exp $") +MODULE_ID("$Id: lib_delwin.c,v 1.25 2023/10/21 11:12:44 tom Exp $") static bool cannot_delete(WINDOW *win) @@ -54,7 +54,7 @@ cannot_delete(WINDOW *win) result = FALSE; } else { WINDOWLIST *p; -#ifdef USE_SP_WINDOWLIST +#if NCURSES_SP_FUNCS && defined(USE_SP_WINDOWLIST) SCREEN *sp = _nc_screen_of(win); #endif diff --git a/ncurses/base/lib_echo.c b/ncurses/base/lib_echo.c index d8f57f29..de7832f4 100644 --- a/ncurses/base/lib_echo.c +++ b/ncurses/base/lib_echo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2000,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -45,7 +45,7 @@ #include -MODULE_ID("$Id: lib_echo.c,v 1.9 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_echo.c,v 1.10 2023/04/29 18:57:12 tom Exp $") NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (NCURSES_SP_DCL0) @@ -53,7 +53,7 @@ NCURSES_SP_NAME(echo) (NCURSES_SP_DCL0) T((T_CALLED("echo(%p)"), (void *) SP_PARM)); if (0 == SP_PARM) returnCode(ERR); - SP_PARM->_echo = TRUE; + IsEcho(SP_PARM) = TRUE; returnCode(OK); } @@ -71,7 +71,7 @@ NCURSES_SP_NAME(noecho) (NCURSES_SP_DCL0) T((T_CALLED("noecho(%p)"), (void *) SP_PARM)); if (0 == SP_PARM) returnCode(ERR); - SP_PARM->_echo = FALSE; + IsEcho(SP_PARM) = FALSE; returnCode(OK); } diff --git a/ncurses/base/lib_endwin.c b/ncurses/base/lib_endwin.c index b8a9e4e6..85d2bdba 100644 --- a/ncurses/base/lib_endwin.c +++ b/ncurses/base/lib_endwin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_endwin.c,v 1.25 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_endwin.c,v 1.28 2023/11/11 21:27:32 tom Exp $") NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0) @@ -52,20 +52,24 @@ NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0) T((T_CALLED("endwin(%p)"), (void *) SP_PARM)); - if (SP_PARM) { + if (SP_PARM != NULL) { + if (SP_PARM->_endwin != ewSuspend) { #ifdef USE_TERM_DRIVER - TERMINAL_CONTROL_BLOCK *TCB = TCBOf(SP_PARM); + TERMINAL_CONTROL_BLOCK *TCB = TCBOf(SP_PARM); - SP_PARM->_endwin = ewSuspend; - if (TCB && TCB->drv && TCB->drv->td_scexit) - TCB->drv->td_scexit(SP_PARM); + SP_PARM->_endwin = ewSuspend; + if (TCB && TCB->drv && TCB->drv->td_scexit) + TCB->drv->td_scexit(SP_PARM); #else - SP_PARM->_endwin = ewSuspend; - SP_PARM->_mouse_wrap(SP_PARM); - _nc_screen_wrap(); - _nc_mvcur_wrap(); /* wrap up cursor addressing */ + SP_PARM->_endwin = ewSuspend; + SP_PARM->_mouse_wrap(SP_PARM); + _nc_screen_wrap(); + _nc_mvcur_wrap(); /* wrap up cursor addressing */ #endif - code = NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_ARG); + code = OK; + } + if (NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_ARG) == ERR) + code = ERR; } returnCode(code); diff --git a/ncurses/base/lib_erase.c b/ncurses/base/lib_erase.c index e190ebd5..aa9437a1 100644 --- a/ncurses/base/lib_erase.c +++ b/ncurses/base/lib_erase.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2009,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,18 +42,18 @@ #include -MODULE_ID("$Id: lib_erase.c,v 1.19 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_erase.c,v 1.20 2022/09/03 21:40:27 tom Exp $") NCURSES_EXPORT(int) werase(WINDOW *win) { int code = ERR; - NCURSES_CH_T blank; NCURSES_CH_T *start; T((T_CALLED("werase(%p)"), (void *) win)); if (win) { + NCURSES_CH_T blank; NCURSES_CH_T *sp; int y; diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index 0d719cfc..8e476791 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -44,7 +44,7 @@ #define NEED_KEY_EVENT #include -MODULE_ID("$Id: lib_getch.c,v 1.143 2021/10/23 17:06:20 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.146 2023/04/29 18:57:12 tom Exp $") #include @@ -298,8 +298,8 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl)) } else #endif #if USE_KLIBC_KBD - if (NC_ISATTY(sp->_ifd) && sp->_cbreak) { - ch = _read_kbd(0, 1, !sp->_raw); + if (NC_ISATTY(sp->_ifd) && IsCbreak(sp)) { + ch = _read_kbd(0, 1, !IsRaw(sp)); n = (ch == -1) ? -1 : 1; sp->_extended_key = (ch == 0); } else @@ -308,20 +308,15 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl)) #if defined(USE_TERM_DRIVER) int buf; # if defined(EXP_WIN32_DRIVER) - if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && sp->_cbreak) { -# if USE_PTHREADS_EINTR - if ((pthread_self) && (pthread_kill) && (pthread_equal)) - _nc_globals.read_thread = pthread_self(); -# endif + if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && IsCbreak(sp)) { + _nc_set_read_thread(TRUE); n = _nc_console_read(sp, _nc_console_handle(sp->_ifd), &buf); -# if USE_PTHREADS_EINTR - _nc_globals.read_thread = 0; -# endif + _nc_set_read_thread(FALSE); } else # elif defined(_NC_WINDOWS) - if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && sp->_cbreak) + if (NC_ISATTY(sp->_ifd) && IsTermInfoOnConsole(sp) && IsCbreak(sp)) n = _nc_mingw_console_read(sp, _nc_get_handle(sp->_ifd), &buf); @@ -334,12 +329,8 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl)) int buf; #endif unsigned char c2 = 0; -#if USE_PTHREADS_EINTR -#if USE_WEAK_SYMBOLS - if ((pthread_self) && (pthread_kill) && (pthread_equal)) -#endif - _nc_globals.read_thread = pthread_self(); -#endif + + _nc_set_read_thread(TRUE); #if defined(EXP_WIN32_DRIVER) n = _nc_console_read(sp, _nc_console_handle(sp->_ifd), @@ -348,9 +339,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl)) #else n = (int) read(sp->_ifd, &c2, (size_t) 1); #endif -#if USE_PTHREADS_EINTR - _nc_globals.read_thread = 0; -#endif + _nc_set_read_thread(FALSE); ch = c2; #endif /* USE_TERM_DRIVER */ } @@ -391,7 +380,17 @@ recur_wrefresh(WINDOW *win) { #ifdef USE_PTHREADS SCREEN *sp = _nc_screen_of(win); - if (_nc_use_pthreads && sp != CURRENT_SCREEN) { + bool same_sp; + + if (_nc_use_pthreads) { + _nc_lock_global(curses); + same_sp = (sp == CURRENT_SCREEN); + _nc_unlock_global(curses); + } else { + same_sp = (sp == CURRENT_SCREEN); + } + + if (_nc_use_pthreads && !same_sp) { SCREEN *save_SP; /* temporarily switch to the window's screen to check/refresh */ @@ -480,8 +479,8 @@ _nc_wgetch(WINDOW *win, */ if (head == -1 && !sp->_notty && - !sp->_raw && - !sp->_cbreak && + !IsRaw(sp) && + !IsCbreak(sp) && !sp->_called_wgetch) { char buf[MAXCOLUMNS], *bufp; @@ -514,13 +513,13 @@ _nc_wgetch(WINDOW *win, recur_wrefresh(win); - if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) { + if (win->_notimeout || (win->_delay >= 0) || (IsCbreak(sp) > 1)) { if (head == -1) { /* fifo is empty */ int delay; TR(TRACE_IEVENT, ("timed delay in wgetch()")); - if (sp->_cbreak > 1) - delay = (sp->_cbreak - 1) * 100; + if (IsCbreak(sp) > 1) + delay = (IsCbreak(sp) - 1) * 100; else delay = win->_delay; @@ -639,7 +638,7 @@ _nc_wgetch(WINDOW *win, * However, we provide the same visual result as Solaris, moving the * cursor to the left. */ - if (sp->_echo && !IS_PAD(win)) { + if (IsEcho(sp) && !IS_PAD(win)) { chtype backup = (chtype) ((ch == KEY_BACKSPACE) ? '\b' : ch); if (backup < KEY_MIN) wechochar(win, backup); @@ -648,7 +647,7 @@ _nc_wgetch(WINDOW *win, /* * Simulate ICRNL mode */ - if ((ch == '\r') && sp->_nl) + if ((ch == '\r') && IsNl(sp)) ch = '\n'; /* Strip 8th-bit if so desired. We do this only for characters that diff --git a/ncurses/base/lib_getstr.c b/ncurses/base/lib_getstr.c index 8ddf7651..cac21fc8 100644 --- a/ncurses/base/lib_getstr.c +++ b/ncurses/base/lib_getstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 1998-2011,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,7 +42,7 @@ #define NEED_KEY_EVENT #include -MODULE_ID("$Id: lib_getstr.c,v 1.38 2021/10/23 19:02:39 tom Exp $") +MODULE_ID("$Id: lib_getstr.c,v 1.39 2023/04/29 19:00:17 tom Exp $") /* * This wipes out the last character, no matter whether it was a tab, control @@ -78,7 +78,7 @@ wgetnstr_events(WINDOW *win, { SCREEN *sp = _nc_screen_of(win); TTY buf; - bool oldnl, oldecho, oldraw, oldcbreak; + TTY_FLAGS save_flags; char erasec; char killc; char *oldstr; @@ -94,13 +94,11 @@ wgetnstr_events(WINDOW *win, NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx &buf); - oldnl = sp->_nl; - oldecho = sp->_echo; - oldraw = sp->_raw; - oldcbreak = sp->_cbreak; + save_flags = sp->_tty_flags; NCURSES_SP_NAME(nl) (NCURSES_SP_ARG); NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG); - NCURSES_SP_NAME(raw) (NCURSES_SP_ARG); + if (!save_flags._raw) + NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG); erasec = NCURSES_SP_NAME(erasechar) (NCURSES_SP_ARG); killc = NCURSES_SP_NAME(killchar) (NCURSES_SP_ARG); @@ -122,7 +120,7 @@ wgetnstr_events(WINDOW *win, || ch == '\r' || ch == KEY_DOWN || ch == KEY_ENTER) { - if (oldecho == TRUE + if (save_flags._echo == TRUE && win->_cury == win->_maxy && win->_scroll) wechochar(win, (chtype) '\n'); @@ -138,18 +136,18 @@ wgetnstr_events(WINDOW *win, #endif if (ch == erasec || ch == KEY_LEFT || ch == KEY_BACKSPACE) { if (str > oldstr) { - str = WipeOut(win, y, x, oldstr, str, oldecho); + str = WipeOut(win, y, x, oldstr, str, save_flags._echo); } } else if (ch == killc) { while (str > oldstr) { - str = WipeOut(win, y, x, oldstr, str, oldecho); + str = WipeOut(win, y, x, oldstr, str, save_flags._echo); } } else if (ch >= KEY_MIN || (str - oldstr >= maxlen)) { NCURSES_SP_NAME(beep) (NCURSES_SP_ARG); } else { *str++ = (char) ch; - if (oldecho == TRUE) { + if (save_flags._echo == TRUE) { int oldy = win->_cury; if (waddch(win, (chtype) ch) == ERR) { /* @@ -159,7 +157,7 @@ wgetnstr_events(WINDOW *win, */ win->_flags &= ~_WRAPPED; waddch(win, (chtype) ' '); - str = WipeOut(win, y, x, oldstr, str, oldecho); + str = WipeOut(win, y, x, oldstr, str, save_flags._echo); continue; } else if (IS_WRAPPED(win)) { /* @@ -190,11 +188,7 @@ wgetnstr_events(WINDOW *win, /* Restore with a single I/O call, to fix minor asymmetry between * raw/noraw, etc. */ - sp->_nl = oldnl; - sp->_echo = oldecho; - sp->_raw = oldraw; - sp->_cbreak = oldcbreak; - + sp->_tty_flags = save_flags; NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); *str = '\0'; diff --git a/ncurses/base/lib_insnstr.c b/ncurses/base/lib_insnstr.c index ff1ae573..caec48e8 100644 --- a/ncurses/base/lib_insnstr.c +++ b/ncurses/base/lib_insnstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2004-2009,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -41,7 +41,7 @@ #include #include -MODULE_ID("$Id: lib_insnstr.c,v 1.7 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_insnstr.c,v 1.10 2023/11/21 21:58:03 tom Exp $") NCURSES_EXPORT(int) winsnstr(WINDOW *win, const char *s, int n) @@ -51,7 +51,7 @@ winsnstr(WINDOW *win, const char *s, int n) T((T_CALLED("winsnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(s, n), n)); - if (win != 0 && str != 0) { + if (win != 0 && str != 0 && n != 0) { SCREEN *sp = _nc_screen_of(win); #if USE_WIDEC_SUPPORT /* @@ -70,6 +70,7 @@ winsnstr(WINDOW *win, const char *s, int n) init_mb(state); n3 = mbstowcs(buffer, s, nn); if (n3 != (size_t) (-1)) { + buffer[n3] = '\0'; code = wins_nwstr(win, buffer, (int) n3); } free(buffer); @@ -82,7 +83,7 @@ winsnstr(WINDOW *win, const char *s, int n) NCURSES_SIZE_T ox = win->_curx; const unsigned char *cp; - for (cp = str; (n <= 0 || (cp - str) < n) && *cp; cp++) { + for (cp = str; (n < 0 || (cp - str) < n) && *cp; cp++) { _nc_insert_ch(sp, win, (chtype) UChar(*cp)); } win->_curx = ox; diff --git a/ncurses/base/lib_instr.c b/ncurses/base/lib_instr.c index b9874b7c..221ebd29 100644 --- a/ncurses/base/lib_instr.c +++ b/ncurses/base/lib_instr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: lib_instr.c,v 1.25 2021/04/03 22:24:18 tom Exp $") +MODULE_ID("$Id: lib_instr.c,v 1.26 2023/06/03 12:37:04 tom Exp $") NCURSES_EXPORT(int) winnstr(WINDOW *win, char *str, int n) @@ -83,7 +83,7 @@ winnstr(WINDOW *win, char *str, int n) init_mb(state); n3 = wcstombs(0, wch, (size_t) 0); - if (!isEILSEQ(n3) && (n3 != 0)) { + if (!isEILSEQ(n3) && (n3 != 0) && (n3 <= MB_LEN_MAX)) { size_t need = n3 + 10 + (size_t) i; int have = (int) n3 + i; diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index b2330c02..a03d8b8e 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2021,2022 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -85,7 +85,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mouse.c,v 1.194 2022/01/16 01:15:47 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.200 2024/02/17 21:13:01 tom Exp $") #include @@ -380,7 +380,7 @@ handle_sysmouse(int sig GCC_UNUSED) } #endif /* USE_SYSMOUSE */ -#ifndef USE_TERM_DRIVER +#if !defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER) #define xterm_kmous "\033[M" static void @@ -442,6 +442,9 @@ init_xterm_mouse(SCREEN *sp) static void enable_xterm_mouse(SCREEN *sp, int enable) { + TPUTS_TRACE(enable + ? "xterm mouse initialization" + : "xterm mouse deinitialization"); #if USE_EMX_MOUSE sp->_emxmouse_activated = enable; #else @@ -450,6 +453,18 @@ enable_xterm_mouse(SCREEN *sp, int enable) sp->_mouse_active = enable; } +#if defined(USE_TERM_DRIVER) +static void +enable_win32_mouse(SCREEN *sp, int enable) +{ +#if defined(EXP_WIN32_DRIVER) + enable_xterm_mouse(sp, enable); +#else + sp->_mouse_active = enable; +#endif +} +#endif + #if USE_GPM_SUPPORT static bool allow_gpm_mouse(SCREEN *sp GCC_UNUSED) @@ -741,7 +756,8 @@ initialize_mousetype(SCREEN *sp) #ifdef USE_TERM_DRIVER CallDriver(sp, td_initmouse); -#else +#endif +#if !defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER) /* we know how to recognize mouse events under "xterm" */ if (NonEmpty(key_mouse)) { init_xterm_mouse(sp); @@ -760,13 +776,15 @@ _nc_mouse_init(SCREEN *sp) { bool result = FALSE; + T((T_CALLED("_nc_mouse_init(%p)"), (void *) sp)); + if (sp != 0) { if (!sp->_mouse_initialized) { int i; sp->_mouse_initialized = TRUE; - TR(MY_TRACE, ("_nc_mouse_init() called")); + TR(MY_TRACE, ("set _mouse_initialized")); sp->_mouse_eventp = FirstEV(sp); for (i = 0; i < EV_MAX; i++) @@ -774,11 +792,11 @@ _nc_mouse_init(SCREEN *sp) initialize_mousetype(sp); - T(("_nc_mouse_init() set mousetype to %d", sp->_mouse_type)); + T(("set _mouse_type to %d", sp->_mouse_type)); } result = sp->_mouse_initialized; } - return result; + returnCode(result); } /* @@ -969,6 +987,17 @@ handle_wheel(SCREEN *sp, MEVENT * eventp, int button, int wheel) PRESS_POSITION(3); break; default: + /* + * case 3 is sent when the mouse buttons are released. + * + * If the terminal uses xterm mode 1003, a continuous series of + * button-release events is sent as the mouse moves around the screen, + * or as the wheel mouse is rotated. + * + * Return false in this case, so that when running in X10 mode, we will + * recalculate bstate. + */ + eventp->bstate = REPORT_MOUSE_POSITION; result = FALSE; break; } @@ -1074,12 +1103,7 @@ decode_xterm_X10(SCREEN *sp, MEVENT * eventp) int res; bool result; -# if USE_PTHREADS_EINTR -# if USE_WEAK_SYMBOLS - if ((pthread_self) && (pthread_kill) && (pthread_equal)) -# endif - _nc_globals.read_thread = pthread_self(); -# endif + _nc_set_read_thread(TRUE); for (grabbed = 0; grabbed < MAX_KBUF; grabbed += (size_t) res) { /* For VIO mouse we add extra bit 64 to disambiguate button-up. */ @@ -1093,9 +1117,7 @@ decode_xterm_X10(SCREEN *sp, MEVENT * eventp) if (res == -1) break; } -#if USE_PTHREADS_EINTR - _nc_globals.read_thread = 0; -#endif + _nc_set_read_thread(FALSE); kbuf[MAX_KBUF] = '\0'; TR(TRACE_IEVENT, @@ -1129,12 +1151,7 @@ decode_xterm_1005(SCREEN *sp, MEVENT * eventp) coords[0] = 0; coords[1] = 0; -# if USE_PTHREADS_EINTR -# if USE_WEAK_SYMBOLS - if ((pthread_self) && (pthread_kill) && (pthread_equal)) -# endif - _nc_globals.read_thread = pthread_self(); -# endif + _nc_set_read_thread(TRUE); for (grabbed = 0; grabbed < limit;) { int res; @@ -1167,9 +1184,7 @@ decode_xterm_1005(SCREEN *sp, MEVENT * eventp) break; } } -#if USE_PTHREADS_EINTR - _nc_globals.read_thread = 0; -#endif + _nc_set_read_thread(FALSE); TR(TRACE_IEVENT, ("_nc_mouse_inline sees the following xterm data: %s", @@ -1213,12 +1228,7 @@ read_SGR(SCREEN *sp, SGR_DATA * result) int marker = 1; memset(result, 0, sizeof(*result)); -# if USE_PTHREADS_EINTR -# if USE_WEAK_SYMBOLS - if ((pthread_self) && (pthread_kill) && (pthread_equal)) -# endif - _nc_globals.read_thread = pthread_self(); -# endif + _nc_set_read_thread(TRUE); do { int res; @@ -1283,9 +1293,7 @@ read_SGR(SCREEN *sp, SGR_DATA * result) } ++grabbed; } while (!isFinal(ch)); -#if USE_PTHREADS_EINTR - _nc_globals.read_thread = 0; -#endif + _nc_set_read_thread(FALSE); kbuf[++grabbed] = 0; TR(TRACE_IEVENT, @@ -1398,11 +1406,14 @@ _nc_mouse_inline(SCREEN *sp) static void mouse_activate(SCREEN *sp, int on) { + T((T_CALLED("mouse_activate(%p,%s)"), + (void *) SP_PARM, on ? "on" : "off")); + if (!on && !sp->_mouse_initialized) - return; + returnVoid; if (!_nc_mouse_init(sp)) - return; + returnVoid; if (on) { sp->_mouse_bstate = 0; @@ -1411,7 +1422,6 @@ mouse_activate(SCREEN *sp, int on) #if NCURSES_EXT_FUNCS NCURSES_SP_NAME(keyok) (NCURSES_SP_ARGx KEY_MOUSE, on); #endif - TPUTS_TRACE("xterm mouse initialization"); enable_xterm_mouse(sp, 1); break; #if USE_GPM_SUPPORT @@ -1430,25 +1440,28 @@ mouse_activate(SCREEN *sp, int on) #endif #ifdef USE_TERM_DRIVER case M_TERM_DRIVER: - sp->_mouse_active = TRUE; + enable_win32_mouse(sp, TRUE); break; #endif case M_NONE: - return; + returnVoid; + default: + T(("unexpected mouse mode")); + break; } /* Make runtime binding to cut down on object size of applications that * do not use the mouse (e.g., 'clear'). */ - sp->_mouse_event = _nc_mouse_event; + /* *INDENT-EQLS* */ + sp->_mouse_event = _nc_mouse_event; sp->_mouse_inline = _nc_mouse_inline; - sp->_mouse_parse = _nc_mouse_parse; + sp->_mouse_parse = _nc_mouse_parse; sp->_mouse_resume = _nc_mouse_resume; - sp->_mouse_wrap = _nc_mouse_wrap; + sp->_mouse_wrap = _nc_mouse_wrap; } else { switch (sp->_mouse_type) { case M_XTERM: - TPUTS_TRACE("xterm mouse deinitialization"); enable_xterm_mouse(sp, 0); break; #if USE_GPM_SUPPORT @@ -1464,14 +1477,18 @@ mouse_activate(SCREEN *sp, int on) #endif #ifdef USE_TERM_DRIVER case M_TERM_DRIVER: - sp->_mouse_active = FALSE; + enable_win32_mouse(sp, FALSE); break; #endif case M_NONE: - return; + returnVoid; + default: + T(("unexpected mouse mode")); + break; } } NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG); + returnVoid; } /************************************************************************** @@ -1973,10 +1990,24 @@ wenclose(const WINDOW *win, int y, int x) if (win != 0) { y -= win->_yoffset; - result = ((win->_begy <= y && - win->_begx <= x && - (win->_begx + win->_maxx) >= x && - (win->_begy + win->_maxy) >= y) ? TRUE : FALSE); + if (IS_PAD(win)) { + if (win->_pad._pad_y >= 0 && + win->_pad._pad_x >= 0 && + win->_pad._pad_top >= 0 && + win->_pad._pad_left >= 0 && + win->_pad._pad_right >= 0 && + win->_pad._pad_bottom >= 0) { + result = ((win->_pad._pad_top <= y && + win->_pad._pad_left <= x && + win->_pad._pad_right >= x && + win->_pad._pad_bottom >= y) ? TRUE : FALSE); + } + } else { + result = ((win->_begy <= y && + win->_begx <= x && + (win->_begx + win->_maxx) >= x && + (win->_begy + win->_maxy) >= y) ? TRUE : FALSE); + } } returnBool(result); } @@ -2045,6 +2076,7 @@ wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen) int y = *pY; int x = *pX; + T(("transform input %d,%d", y, x)); if (to_screen) { y += win->_begy + win->_yoffset; x += win->_begx; @@ -2060,6 +2092,7 @@ wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen) if (result) { *pX = x; *pY = y; + T(("output transform %d,%d", y, x)); } } returnBool(result); diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index bba97ba1..15d05a31 100644 --- a/ncurses/base/lib_newterm.c +++ b/ncurses/base/lib_newterm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #include -MODULE_ID("$Id: lib_newterm.c,v 1.103 2020/09/05 21:34:04 tom Exp $") +MODULE_ID("$Id: lib_newterm.c,v 1.104 2022/07/09 18:58:58 tom Exp $") #ifdef USE_TERM_DRIVER #define NumLabels InfoOf(SP_PARM).numlabels @@ -362,11 +362,14 @@ NCURSES_EXPORT(SCREEN *) newterm(const char *name, FILE *ofp, FILE *ifp) { SCREEN *rc; + + _nc_init_pthreads(); _nc_lock_global(prescreen); START_TRACE(); rc = NCURSES_SP_NAME(newterm) (CURRENT_SCREEN_PRE, name, ofp, ifp); _nc_forget_prescr(); _nc_unlock_global(prescreen); + return rc; } #endif diff --git a/ncurses/base/lib_nl.c b/ncurses/base/lib_nl.c index df07349f..417b257d 100644 --- a/ncurses/base/lib_nl.c +++ b/ncurses/base/lib_nl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2000,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -45,7 +45,7 @@ #include -MODULE_ID("$Id: lib_nl.c,v 1.13 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_nl.c,v 1.14 2023/04/29 18:51:49 tom Exp $") #ifdef __EMX__ #include @@ -57,7 +57,7 @@ NCURSES_SP_NAME(nl) (NCURSES_SP_DCL0) T((T_CALLED("nl(%p)"), (void *) SP_PARM)); if (0 == SP_PARM) returnCode(ERR); - SP_PARM->_nl = TRUE; + IsNl(SP_PARM) = TRUE; #ifdef __EMX__ _nc_flush(); _fsetmode(NC_OUTPUT(SP_PARM), "t"); @@ -79,7 +79,7 @@ NCURSES_SP_NAME(nonl) (NCURSES_SP_DCL0) T((T_CALLED("nonl(%p)"), (void *) SP_PARM)); if (0 == SP_PARM) returnCode(ERR); - SP_PARM->_nl = FALSE; + IsNl(SP_PARM) = FALSE; #ifdef __EMX__ _nc_flush(); _fsetmode(NC_OUTPUT(SP_PARM), "b"); diff --git a/ncurses/base/lib_overlay.c b/ncurses/base/lib_overlay.c index 6d451d04..6d21c761 100644 --- a/ncurses/base/lib_overlay.c +++ b/ncurses/base/lib_overlay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2013,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -41,7 +41,7 @@ #include -MODULE_ID("$Id: lib_overlay.c,v 1.33 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_overlay.c,v 1.34 2023/09/16 16:39:07 tom Exp $") static int overlap(const WINDOW *const src, WINDOW *const dst, int const flag) @@ -78,12 +78,12 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag) dy2 = dy1 + dst->_maxy; if (dx2 >= sx1 && dx1 <= sx2 && dy2 >= sy1 && dy1 <= sy2) { - int sminrow = max(sy1, dy1) - sy1; - int smincol = max(sx1, dx1) - sx1; - int dminrow = max(sy1, dy1) - dy1; - int dmincol = max(sx1, dx1) - dx1; - int dmaxrow = min(sy2, dy2) - dy1; - int dmaxcol = min(sx2, dx2) - dx1; + int sminrow = Max(sy1, dy1) - sy1; + int smincol = Max(sx1, dx1) - sx1; + int dminrow = Max(sy1, dy1) - dy1; + int dmincol = Max(sx1, dx1) - dx1; + int dmaxrow = Min(sy2, dy2) - dy1; + int dmaxcol = Min(sx2, dx2) - dx1; rc = copywin(src, dst, sminrow, smincol, diff --git a/ncurses/base/lib_refresh.c b/ncurses/base/lib_refresh.c index 4579cbf8..bcaa4624 100644 --- a/ncurses/base/lib_refresh.c +++ b/ncurses/base/lib_refresh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2010,2011 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_refresh.c,v 1.47 2021/11/06 22:22:03 tom Exp $") +MODULE_ID("$Id: lib_refresh.c,v 1.48 2023/05/27 20:13:10 tom Exp $") NCURSES_EXPORT(int) wrefresh(WINDOW *win) @@ -208,7 +208,6 @@ wnoutrefresh(WINDOW *win) }); if_WIDEC({ - static cchar_t blank = BLANK; int last_dst = begx + ((last_src < win->_maxx) ? last_src : win->_maxx); @@ -254,6 +253,7 @@ wnoutrefresh(WINDOW *win) */ if (fix_left < dst_col || fix_right > last_dst) { for (j = fix_left; j <= fix_right; ++j) { + static cchar_t blank = BLANK; nline->text[j] = blank; CHANGED_CELL(nline, j); } diff --git a/ncurses/base/lib_restart.c b/ncurses/base/lib_restart.c index 81eb3688..0c61cb7e 100644 --- a/ncurses/base/lib_restart.c +++ b/ncurses/base/lib_restart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2012,2015 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: lib_restart.c,v 1.17 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_restart.c,v 1.18 2023/04/29 19:01:25 tom Exp $") NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx @@ -65,31 +65,28 @@ NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx if (TINFO_SETUP_TERM(&new_term, termp, filenum, errret, FALSE) != OK) { result = ERR; } else if (SP_PARM != 0) { - int saveecho = SP_PARM->_echo; - int savecbreak = SP_PARM->_cbreak; - int saveraw = SP_PARM->_raw; - int savenl = SP_PARM->_nl; + TTY_FLAGS save_flags = SP_PARM->_tty_flags; #ifdef USE_TERM_DRIVER SP_PARM->_term = new_term; #endif - if (saveecho) { + if (save_flags._echo) { NCURSES_SP_NAME(echo) (NCURSES_SP_ARG); } else { NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG); } - if (savecbreak) { + if (save_flags._cbreak) { NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG); NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG); - } else if (saveraw) { + } else if (save_flags._raw) { NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG); NCURSES_SP_NAME(raw) (NCURSES_SP_ARG); } else { NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG); NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG); } - if (savenl) { + if (save_flags._nl) { NCURSES_SP_NAME(nl) (NCURSES_SP_ARG); } else { NCURSES_SP_NAME(nonl) (NCURSES_SP_ARG); diff --git a/ncurses/base/lib_screen.c b/ncurses/base/lib_screen.c index 70cf6fd8..e2647b54 100644 --- a/ncurses/base/lib_screen.c +++ b/ncurses/base/lib_screen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2023 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,7 +42,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_screen.c,v 1.104 2021/10/23 17:12:16 tom Exp $") +MODULE_ID("$Id: lib_screen.c,v 1.105 2023/04/28 20:58:54 tom Exp $") #define MAX_SIZE 0x3fff /* 16k is big enough for a window or pad */ @@ -90,7 +90,6 @@ typedef struct { typedef struct { const char name[17]; PARAM_TYPE type; - size_t size; size_t offset; } SCR_PARAMS; @@ -120,8 +119,7 @@ static const SCR_ATTRS scr_attrs[] = }; #undef DATA -#define sizeof2(type,name) sizeof(((type *)0)->name) -#define DATA(name, type) { { #name }, type, sizeof2(WINDOW, name), offsetof(WINDOW, name) } +#define DATA(name, type) { { #name }, type, offsetof(WINDOW, name) } static const SCR_PARAMS scr_params[] = { diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index 264fb98e..78de8592 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -41,8 +41,11 @@ ** */ +#define NEW_PAIR_INTERNAL 1 + #include #include +#include #if USE_GPM_SUPPORT #ifdef HAVE_LIBDL @@ -54,7 +57,7 @@ #undef CUR #define CUR SP_TERMTYPE -MODULE_ID("$Id: lib_set_term.c,v 1.179 2021/05/08 21:48:34 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.184 2022/12/10 21:34:12 tom Exp $") #ifdef USE_TERM_DRIVER #define MaxColors InfoOf(sp).maxcolors @@ -146,6 +149,9 @@ delscreen(SCREEN *sp) _nc_lock_global(curses); if (delink_screen(sp)) { + WINDOWLIST *wl; + bool is_current = (sp == CURRENT_SCREEN); + #ifdef USE_SP_RIPOFF if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) { ripoff_t *rop; @@ -160,9 +166,13 @@ delscreen(SCREEN *sp) } #endif - (void) _nc_freewin(CurScreen(sp)); - (void) _nc_freewin(NewScreen(sp)); - (void) _nc_freewin(StdScreen(sp)); + /* delete all of the windows in this screen */ + rescan: + for (each_window(sp, wl)) { + if (_nc_freewin(&(wl->win)) == OK) { + goto rescan; + } + } if (sp->_slk != 0) { @@ -187,6 +197,7 @@ delscreen(SCREEN *sp) FreeIfNeeded(sp->_current_attr); + _nc_free_ordered_pairs(sp); FreeIfNeeded(sp->_color_table); FreeIfNeeded(sp->_color_pairs); @@ -219,7 +230,7 @@ delscreen(SCREEN *sp) * application might try to use (except cur_term, which may have * multiple references in different screens). */ - if (sp == CURRENT_SCREEN) { + if (is_current) { #if !USE_REENTRANT curscr = 0; newscr = 0; @@ -234,6 +245,8 @@ delscreen(SCREEN *sp) _nc_wacs = 0; } #endif + } else { + set_term(CURRENT_SCREEN); } } _nc_unlock_global(curses); @@ -738,6 +751,7 @@ NCURSES_SP_NAME(_nc_setupscreen) ( } T(("creating stdscr")); + (void) bottom_stolen; assert((sp->_lines_avail + sp->_topstolen + bottom_stolen) == slines); if ((StdScreen(sp) = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx sp->_lines_avail, @@ -819,10 +833,13 @@ NCURSES_EXPORT(int) _nc_ripoffline(int line, int (*init) (WINDOW *, int)) { int rc; + + _nc_init_pthreads(); _nc_lock_global(prescreen); START_TRACE(); rc = NCURSES_SP_NAME(_nc_ripoffline) (CURRENT_SCREEN_PRE, line, init); _nc_unlock_global(prescreen); + return rc; } #endif @@ -843,10 +860,13 @@ NCURSES_EXPORT(int) ripoffline(int line, int (*init) (WINDOW *, int)) { int rc; + + _nc_init_pthreads(); _nc_lock_global(prescreen); START_TRACE(); rc = NCURSES_SP_NAME(ripoffline) (CURRENT_SCREEN_PRE, line, init); _nc_unlock_global(prescreen); + return rc; } #endif diff --git a/ncurses/base/lib_slk.c b/ncurses/base/lib_slk.c index f4b3ce6d..47e57e0b 100644 --- a/ncurses/base/lib_slk.c +++ b/ncurses/base/lib_slk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2010,2011 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_slk.c,v 1.49 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_slk.c,v 1.50 2022/08/20 18:29:22 tom Exp $") #ifdef USE_TERM_DRIVER #define NumLabels InfoOf(SP_PARM).numlabels @@ -187,8 +187,10 @@ _nc_slk_initialize(WINDOW *stwin, int cols) || SP_PARM->_slk->labcnt <= 0 || (SP_PARM->_slk->ent = typeCalloc(slk_ent, (size_t) SP_PARM->_slk->labcnt)) - == NULL) + == NULL) { + free(SP_PARM->_slk->ent); returnCode(slk_failed(NCURSES_SP_ARG)); + } max_length = (size_t) SP_PARM->_slk->maxlen; for (i = 0; i < SP_PARM->_slk->labcnt; i++) { diff --git a/ncurses/base/lib_slkinit.c b/ncurses/base/lib_slkinit.c index e1602abc..318077fc 100644 --- a/ncurses/base/lib_slkinit.c +++ b/ncurses/base/lib_slkinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2009,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -41,7 +41,7 @@ */ #include -MODULE_ID("$Id: lib_slkinit.c,v 1.15 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_slkinit.c,v 1.16 2022/07/09 18:58:58 tom Exp $") #ifdef USE_SP_RIPOFF #define SoftkeyFormat SP_PARM->slk_format @@ -77,10 +77,13 @@ NCURSES_EXPORT(int) slk_init(int format) { int rc; + + _nc_init_pthreads(); _nc_lock_global(prescreen); START_TRACE(); rc = NCURSES_SP_NAME(slk_init) (CURRENT_SCREEN_PRE, format); _nc_unlock_global(prescreen); + return rc; } #endif diff --git a/ncurses/base/lib_wattron.c b/ncurses/base/lib_wattron.c index c589f104..906021d3 100644 --- a/ncurses/base/lib_wattron.c +++ b/ncurses/base/lib_wattron.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include #include -MODULE_ID("$Id: lib_wattron.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_wattron.c,v 1.13 2022/04/15 22:34:38 tom Exp $") NCURSES_EXPORT(int) wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED) @@ -55,8 +55,10 @@ wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED) GET_WINDOW_PAIR(win))); if_EXT_COLORS({ - if (at & A_COLOR) + if (at & A_COLOR) { win->_color = PairNumber(at); + set_extended_pair(opts, win->_color); + } }); toggle_attr_on(WINDOW_ATTRS(win), at); returnCode(OK); diff --git a/ncurses/base/resizeterm.c b/ncurses/base/resizeterm.c index b25cf908..1a2ddb36 100644 --- a/ncurses/base/resizeterm.c +++ b/ncurses/base/resizeterm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2024 Thomas E. Dickey * * Copyright 1998-2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -46,7 +46,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: resizeterm.c,v 1.52 2021/10/23 17:12:33 tom Exp $") +MODULE_ID("$Id: resizeterm.c,v 1.53 2024/04/20 21:54:14 tom Exp $") /* * If we're trying to be reentrant, do not want any local statics. @@ -409,8 +409,8 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols) #ifdef USE_TERM_DRIVER CallDriver_2(SP_PARM, td_setsize, ToLines, ToCols); #else - lines = (NCURSES_SIZE_T) ToLines; - columns = (NCURSES_SIZE_T) ToCols; + lines = (NCURSES_INT2) ToLines; + columns = (NCURSES_INT2) ToCols; #endif SP_PARM->_lines_avail = (NCURSES_SIZE_T) (ToLines - was_stolen); diff --git a/ncurses/base/safe_sprintf.c b/ncurses/base/safe_sprintf.c index 3fff2e83..8816e58c 100644 --- a/ncurses/base/safe_sprintf.c +++ b/ncurses/base/safe_sprintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 1998-2012,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -34,7 +34,7 @@ #include #include -MODULE_ID("$Id: safe_sprintf.c,v 1.35 2021/10/03 00:25:09 tom Exp $") +MODULE_ID("$Id: safe_sprintf.c,v 1.37 2023/09/30 10:42:42 tom Exp $") #if USE_SAFE_SPRINTF @@ -264,11 +264,18 @@ NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_DCLx # if HAVE_VSNPRINTF /* SUSv2, 1997 */ int used; - while ((used = vsnprintf(my_buffer, my_length, fmt, ap)) - >= (int) my_length) { + + do { + va_list ap2; + + begin_va_copy(ap2, ap); + used = vsnprintf(my_buffer, my_length, fmt, ap2); + end_va_copy(ap2); + if (used < (int) my_length) + break; my_length = (size_t) ((3 * used) / 2); my_buffer = typeRealloc(char, my_length, my_buffer); - } + } while (my_buffer != NULL); # else /* ISO/ANSI C, 1989 */ vsprintf(my_buffer, fmt, ap); diff --git a/ncurses/base/tries.c b/ncurses/base/tries.c index 0f309c21..0f8c0516 100644 --- a/ncurses/base/tries.c +++ b/ncurses/base/tries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -39,8 +39,9 @@ */ #include +#include -MODULE_ID("$Id: tries.c,v 1.31 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: tries.c,v 1.32 2023/06/24 15:36:23 tom Exp $") /* * Expand a keycode into the string that it corresponds to, returning null if @@ -124,7 +125,7 @@ _nc_remove_string(TRIES ** tree, const char *string) { T((T_CALLED("_nc_remove_string(%p,%s)"), (void *) tree, _nc_visbuf(string))); - if (string == 0 || *string == 0) + if (!VALID_STRING(string) || *string == 0) returnCode(FALSE); while (*tree != 0) { diff --git a/ncurses/base/vsscanf.c b/ncurses/base/vsscanf.c index ef524250..40ee8bb1 100644 --- a/ncurses/base/vsscanf.c +++ b/ncurses/base/vsscanf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2004,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -39,15 +39,12 @@ #if !HAVE_VSSCANF -MODULE_ID("$Id: vsscanf.c,v 1.21 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: vsscanf.c,v 1.22 2023/09/23 18:48:57 tom Exp $") #if !(HAVE_VFSCANF || HAVE__DOSCAN) #include -#define L_SQUARE '[' -#define R_SQUARE ']' - typedef enum { cUnknown ,cError /* anything that isn't ANSI */ @@ -243,7 +240,7 @@ vsscanf(const char *str, const char *format, va_list ap) case sPercent: if (format[n] == '%') { state = sUnknown; - } else if (format[n] == L_SQUARE) { + } else if (format[n] == L_BLOCK) { state = sLeft; } else { state = sNormal; @@ -258,7 +255,7 @@ vsscanf(const char *str, const char *format, va_list ap) } break; case sRange: - if (format[n] == R_SQUARE) { + if (format[n] == R_BLOCK) { state = sFinal; chunk = cRange; } diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c index 5eb6a304..6d5589e2 100644 --- a/ncurses/base/wresize.c +++ b/ncurses/base/wresize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2023 Thomas E. Dickey * * Copyright 1998-2010,2011 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -34,7 +34,7 @@ #include -MODULE_ID("$Id: wresize.c,v 1.42 2021/10/23 18:54:16 tom Exp $") +MODULE_ID("$Id: wresize.c,v 1.43 2023/10/21 11:13:03 tom Exp $") static int cleanup_lines(struct ldat *data, int length) @@ -55,7 +55,7 @@ repair_subwindows(WINDOW *cmp) WINDOWLIST *wp; struct ldat *pline = cmp->_line; int row; -#ifdef USE_SP_WINDOWLIST +#if NCURSES_SP_FUNCS && defined(USE_SP_WINDOWLIST) SCREEN *sp = _nc_screen_of(cmp); #endif diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index a72555c1..74d54d4d 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.647 2021/10/23 16:13:16 tom Exp $ + * $Id: curses.priv.h,v 1.686 2024/04/13 18:59:05 tom Exp $ * * curses.priv.h * @@ -72,12 +72,6 @@ extern "C" { #include #endif -#if HAVE_LIMITS_H -# include -#elif HAVE_SYS_PARAM_H -# include -#endif - #include #include @@ -89,16 +83,6 @@ extern "C" { # endif #endif -#ifndef PATH_MAX -# if defined(_POSIX_PATH_MAX) -# define PATH_MAX _POSIX_PATH_MAX -# elif defined(MAXPATHLEN) -# define PATH_MAX MAXPATHLEN -# else -# define PATH_MAX 255 /* the Posix minimum path-size */ -# endif -#endif - #if DECL_ERRNO extern int errno; #endif @@ -141,6 +125,19 @@ extern int errno; # endif #endif +#if (defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0) && (defined(__GNUC__) && (__GNUC__ < 12)) +# undef PRIxPTR /* gcc bug fixed in 12.x */ +# define PRIxPTR "lX" +# define CASTxPTR(n) (unsigned long)(intptr_t)(void*)(n) +#else +# define CASTxPTR(n) (intptr_t)(n) +#endif + +#ifndef PRIxPTR +# define PRIxPTR "lx" +# define CASTxPTR(n) (long)(void*)(n) +#endif + /* include signal.h before curses.h to work-around defect in glibc 2.1.3 */ #include @@ -206,6 +203,24 @@ extern int errno; # define NCURSES_PATHSEP ';' #endif +/* + * When the standard handles have been redirected (such as inside a text editor + * or the less utility), keystrokes must be read from the console rather than + * the redirected handle. The standard output handle suffers from a similar + * problem. Both handles are not closed once opened. The console shall be + * considered reachable throughout the process. + */ +#if defined(_NC_WINDOWS) +#define GetDirectHandle(fileName, shareMode) \ + CreateFile(TEXT(fileName), \ + GENERIC_READ | GENERIC_WRITE, \ + shareMode, \ + 0, \ + OPEN_EXISTING, \ + 0, \ + 0) +#endif + /* * Not all platforms have memmove; some have an equivalent bcopy. (Some may * have neither). @@ -281,7 +296,6 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); #define NO_TERMINAL "unknown" #define USE_SP_RIPOFF 1 #define USE_SP_TERMTYPE 1 -#define USE_SP_WINDOWLIST 1 #else #define NO_TERMINAL 0 #endif @@ -292,6 +306,12 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); : no_terminal), \ NonEmpty(term_env)) +/* + * Originally a terminal-driver option, the window-list is per-screen to allow + * freeing memory used for windows when a screen is deleted. + */ +#define USE_SP_WINDOWLIST 1 + /* * Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only * when we're throwing control codes at the screen at high volume. To see @@ -314,6 +334,11 @@ typedef TRIES { */ #define StringOf(ch) {ch, 0} +#define CSI_CHR 0x9b +#define ESC_CHR 0x1b + +#define L_BLOCK '[' +#define R_BLOCK ']' #define L_BRACE '{' #define R_BRACE '}' #define S_QUOTE '\'' @@ -543,10 +568,10 @@ extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *); #define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p) #if USE_REENTRANT || NCURSES_SP_FUNCS -NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); -NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); -NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); -NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); +extern NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); +extern NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); +extern NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); +extern NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); #endif #if USE_REENTRANT @@ -672,9 +697,14 @@ extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *); #define _nc_lock_global(name) /* nothing */ #define _nc_try_global(name) 0 #define _nc_unlock_global(name) /* nothing */ - #endif /* USE_PTHREADS */ +#if USE_PTHREADS_EINTR +extern NCURSES_EXPORT(void) _nc_set_read_thread(bool); +#else +#define _nc_set_read_thread(enable) /* nothing */ +#endif + /* * When using sp-funcs, locks are targeted to SCREEN-level granularity. * So the locking is done in the non-sp-func (which calls the sp-func) rather @@ -705,9 +735,18 @@ extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *); #endif -#if HAVE_GETTIMEOFDAY +#if HAVE_CLOCK_GETTIME # define PRECISE_GETTIME 1 +# define GetClockTime(t) clock_gettime(CLOCK_REALTIME, t) +# define TimeType struct timespec +# define TimeScale 1000000000L /* 1e9 */ +# define sub_secs tv_nsec +#elif HAVE_GETTIMEOFDAY +# define PRECISE_GETTIME 1 +# define GetClockTime(t) gettimeofday(t, 0) # define TimeType struct timeval +# define TimeScale 1000000L /* 1e6 */ +# define sub_secs tv_usec #else # define PRECISE_GETTIME 0 # define TimeType time_t @@ -830,6 +869,12 @@ typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *); #endif /* HAVE_LIBDL */ #endif /* USE_GPM_SUPPORT */ +/* + * Limit delay-times to 30 seconds, which is consistent with signed 16-bit + * numbers in legacy terminfo. + */ +#define MAX_DELAY_MSECS 30000 + /* * When converting from terminfo to termcap, check for cases where we can trim * octal escapes down to 2-character form. It is useful for terminfo format @@ -860,6 +905,7 @@ typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *); * string is less than 80 columns, but this buffer size is an absolute * limit. */ +#define TRACECHR_BUF 40 #define TRACEMSE_MAX (80 + (5 * 10) + (32 * 15)) #define TRACEMSE_FMT "id %2d at (%2d, %2d, %2d) state %4lx = {" /* } */ @@ -895,11 +941,25 @@ extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals; extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen; typedef enum { - ewInitial = 0, + ewUnknown = 0, + ewInitial, ewRunning, ewSuspend } ENDWIN; +typedef struct { + int _nl; /* True if NL -> CR/NL is on */ + int _raw; /* True if in raw mode */ + int _cbreak; /* 1 if in cbreak mode */ + /* > 1 if in halfdelay mode */ + int _echo; /* True if echo on */ +} TTY_FLAGS; + +#define IsNl(sp) (sp)->_tty_flags._nl +#define IsRaw(sp) (sp)->_tty_flags._raw +#define IsCbreak(sp) (sp)->_tty_flags._cbreak +#define IsEcho(sp) (sp)->_tty_flags._echo + /* * The SCREEN structure. */ @@ -950,11 +1010,7 @@ typedef struct screen { int _cursrow; /* physical cursor row */ int _curscol; /* physical cursor column */ bool _notty; /* true if we cannot switch non-tty */ - int _nl; /* True if NL -> CR/NL is on */ - int _raw; /* True if in raw mode */ - int _cbreak; /* 1 if in cbreak mode */ - /* > 1 if in halfdelay mode */ - int _echo; /* True if echo on */ + TTY_FLAGS _tty_flags; int _use_meta; /* use the meta key? */ struct _SLK *_slk; /* ptr to soft key struct / NULL */ int slk_format; /* selected format for this screen */ @@ -1180,7 +1236,7 @@ typedef struct screen { #endif #ifdef TRACE - char tracechr_buf[40]; + char tracechr_buf[TRACECHR_BUF]; char tracemse_buf[TRACEMSE_MAX]; #if USE_REENTRANT long _outchars; @@ -1214,18 +1270,18 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #endif #define SP_PRE_INIT(sp) \ - sp->_cursrow = -1; \ - sp->_curscol = -1; \ - sp->_nl = TRUE; \ - sp->_raw = FALSE; \ - sp->_cbreak = 0; \ - sp->_echo = TRUE; \ - sp->_fifohead = -1; \ - sp->_endwin = ewSuspend; \ - sp->_cursor = -1; \ + sp->_cursrow = -1; \ + sp->_curscol = -1; \ + IsNl(sp) = TRUE; \ + IsRaw(sp) = FALSE; \ + IsCbreak(sp) = 0; \ + IsEcho(sp) = TRUE; \ + sp->_fifohead = -1; \ + sp->_endwin = ewSuspend; \ + sp->_cursor = -1; \ SP_INIT_WINDOWLIST(sp); \ - sp->_outch = NCURSES_OUTC_FUNC; \ - sp->jump = 0 \ + sp->_outch = NCURSES_OUTC_FUNC; \ + sp->jump = 0 \ /* usually in */ #ifndef UCHAR_MAX @@ -1238,12 +1294,12 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; /* Checks for isprint() should be done on 8-bit characters (non-wide) */ #define is8bits(c) ((unsigned)(c) <= UCHAR_MAX) -#ifndef min -#define min(a,b) ((a) > (b) ? (b) : (a)) +#ifndef Min +#define Min(a,b) ((a) > (b) ? (b) : (a)) #endif -#ifndef max -#define max(a,b) ((a) < (b) ? (b) : (a)) +#ifndef Max +#define Max(a,b) ((a) < (b) ? (b) : (a)) #endif /* usually in */ @@ -1307,11 +1363,8 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define TR_PUTC(c) TR(TRACE_CHARPUT, ("PUTC %#x", UChar(c))) -#ifndef MB_LEN_MAX -#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */ -#endif - #if USE_WIDEC_SUPPORT /* { */ +/* true if the status/errno indicate an illegal multibyte sequence */ #define isEILSEQ(status) (((size_t)status == (size_t)-1) && (errno == EILSEQ)) #define init_mb(state) memset(&(state), 0, sizeof(state)) @@ -1322,7 +1375,20 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define NulColor /* nothing */ #endif -#define NulChar 0,0,0,0 /* FIXME: see CCHARW_MAX */ +#if CCHARW_MAX > 6 +#define NulChar 0,0,0,0,0 +#elif CCHARW_MAX > 5 +#define NulChar 0,0,0,0 /* ncurses7 */ +#elif CCHARW_MAX > 4 +#define NulChar 0,0,0 /* ncurses6 */ +#elif CCHARW_MAX > 3 +#define NulChar 0,0 +#elif CCHARW_MAX > 2 +#define NulChar 0 +#else +#define NulChar /* nothing */ +#endif + #define CharOf(c) ((c).chars[0]) #define AttrOf(c) ((c).attr) @@ -1333,16 +1399,12 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define NewChar2(c,a) { a, { c, NulChar } NulColor } #define NewChar(ch) NewChar2(ChCharOf(ch), ChAttrOf(ch)) -#if CCHARW_MAX == 5 +#if CCHARW_MAX > 1 #define CharEq(a,b) (((a).attr == (b).attr) \ - && (a).chars[0] == (b).chars[0] \ - && (a).chars[1] == (b).chars[1] \ - && (a).chars[2] == (b).chars[2] \ - && (a).chars[3] == (b).chars[3] \ - && (a).chars[4] == (b).chars[4] \ + && !memcmp((a).chars, \ + (b).chars, \ + CCHARW_MAX * sizeof((b).chars[0])) \ if_EXT_COLORS(&& (a).ext_color == (b).ext_color)) -#elif CCHARW_MAX > 0 -#error Inconsistent values for CCHARW_MAX #else #define CharEq(a,b) (!memcmp(&(a), &(b), sizeof(a))) #endif @@ -1443,7 +1505,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define isWidecExt(ch) (0) #define if_WIDEC(code) /* nothing */ -#define Charable(ch) ((ch) >= ' ' && (ch) <= '~') +#define Charable(ch) (CharOf(ch) >= ' ' && CharOf(ch) <= '~') #define L(ch) ch #endif /* } */ @@ -1485,6 +1547,9 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define SIZEOF(v) (sizeof(v)/sizeof(v[0])) +#include +#include + #define FreeIfNeeded(p) if ((p) != 0) free(p) /* FreeAndNull() is not a comma-separated expression because some compilers @@ -1492,8 +1557,18 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; */ #define FreeAndNull(p) do { free(p); p = 0; } while (0) -#include -#include +#ifdef EXP_OOM_TESTING +extern NCURSES_EXPORT(void *) _nc_oom_malloc(size_t size); +extern NCURSES_EXPORT(void *) _nc_oom_calloc(size_t nmemb, size_t size); +extern NCURSES_EXPORT(void *) _nc_oom_realloc(void *ptr, size_t size); +extern NCURSES_EXPORT(void) _nc_oom_free(void *ptr); +extern NCURSES_EXPORT(char *) _nc_oom_strdup(const char *ptr); +#define malloc(size) _nc_oom_malloc(size) +#define calloc(nmemb, size) _nc_oom_calloc(nmemb, size) +#define realloc(ptr, size) _nc_oom_realloc(ptr, size) +#define free(ptr) _nc_oom_free(ptr) +#define strdup(ptr) _nc_oom_strdup(ptr) +#endif /* * Use these for tic/infocmp malloc failures. Generally the ncurses library @@ -1506,6 +1581,13 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; _nc_err_abort(MSG_NO_MEMORY); \ } while (0) +#define TYPE_CALLOC(type, size, name) \ + do { \ + name = typeCalloc(type, size); \ + if (name == 0) \ + _nc_err_abort(MSG_NO_MEMORY); \ + } while (0) + #define TYPE_REALLOC(type, size, name) \ do { \ name = typeRealloc(type, size, name); \ @@ -1614,11 +1696,13 @@ typedef void VoidFunc(void); #define returnMMask(code) TRACE_RETURN_SP(code,mmask_t) #define returnPtr(code) TRACE_RETURN1(code,ptr) #define returnSP(code) TRACE_RETURN1(code,sp) -#define returnVoid T((T_RETURN(""))); return +#define returnVoid { T((T_RETURN(""))); return; } #define returnVoidPtr(code) TRACE_RETURN1(code,void_ptr) #define returnWin(code) TRACE_RETURN1(code,win) #define returnDB(rc) do { TR(TRACE_DATABASE,(T_RETURN("code %d"), (rc))); return (rc); } while (0) +#define returnPtrDB(rc) do { TR(TRACE_DATABASE,(T_RETURN("%p"), (rc))); return (rc); } while (0) +#define returnVoidDB do { TR(TRACE_DATABASE,(T_RETURN(""))); return; } while (0) extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (int); extern NCURSES_EXPORT(NCURSES_CONST void *) _nc_retrace_cvoid_ptr (NCURSES_CONST void *); @@ -1693,6 +1777,8 @@ extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int); #define returnWin(code) return code #define returnDB(code) return code +#define returnPtrDB(rc) return rc +#define returnVoidDB return #endif /* TRACE/!TRACE */ @@ -1898,11 +1984,11 @@ extern NCURSES_EXPORT(void) _nc_linedump (void); /* lib_acs.c */ extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */ -extern NCURSES_EXPORT(int) _nc_msec_cost (const char *const, int); /* used by 'tack' program */ +extern NCURSES_EXPORT(int) _nc_msec_cost (const char *const, int); /* lib_addch.c */ #if USE_WIDEC_SUPPORT -NCURSES_EXPORT(int) _nc_build_wch(WINDOW *win, ARG_CH_T ch); +extern NCURSES_EXPORT(int) _nc_build_wch(WINDOW *win, ARG_CH_T ch); #endif /* lib_addstr.c */ @@ -2015,7 +2101,7 @@ typedef struct { /* strings.c */ extern NCURSES_EXPORT(string_desc *) _nc_str_init (string_desc *, char *, size_t); extern NCURSES_EXPORT(string_desc *) _nc_str_null (string_desc *, size_t); -extern NCURSES_EXPORT(string_desc *) _nc_str_copy (string_desc *, string_desc *); +extern NCURSES_EXPORT(string_desc *) _nc_str_copy (string_desc *, const string_desc *); extern NCURSES_EXPORT(bool) _nc_safe_strcat (string_desc *, const char *); extern NCURSES_EXPORT(bool) _nc_safe_strcpy (string_desc *, const char *); @@ -2056,6 +2142,7 @@ extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE2 extern NCURSES_EXPORT(int) _nc_setup_tinfo(const char *, TERMTYPE2 *); extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, int, int); extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *)); +extern NCURSES_EXPORT(int) _nc_trans_string (char *, const char *); extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE2 *const); extern NCURSES_EXPORT(void) _nc_do_color (int, int, int, NCURSES_OUTC); extern NCURSES_EXPORT(void) _nc_flush (void); @@ -2065,6 +2152,7 @@ extern NCURSES_EXPORT(void) _nc_hash_map (void); extern NCURSES_EXPORT(void) _nc_init_keytry (SCREEN *); extern NCURSES_EXPORT(void) _nc_keep_tic_dir (const char *); extern NCURSES_EXPORT(void) _nc_make_oldhash (int i); +extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *); extern NCURSES_EXPORT(void) _nc_scroll_oldhash (int n, int top, int bot); extern NCURSES_EXPORT(void) _nc_scroll_optimize (void); extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, int); @@ -2079,6 +2167,8 @@ extern NCURSES_EXPORT(const TERMTYPE2 *) _nc_fallback2 (const char *); #define _nc_fallback2(tp) _nc_fallback(tp) #endif +extern NCURSES_EXPORT(void) _nc_copy_termtype(TERMTYPE *, const TERMTYPE *); + #if NCURSES_EXT_NUMBERS extern NCURSES_EXPORT(void) _nc_copy_termtype2 (TERMTYPE2 *, const TERMTYPE2 *); extern NCURSES_EXPORT(void) _nc_export_termtype2(TERMTYPE *, const TERMTYPE2 *); @@ -2101,7 +2191,7 @@ extern NCURSES_EXPORT(void) _nc_comp_userdefs_leaks(void); extern NCURSES_EXPORT(void) _nc_db_iterator_leaks(void); extern NCURSES_EXPORT(void) _nc_keyname_leaks(void); extern NCURSES_EXPORT(void) _nc_names_leaks(void); -extern NCURSES_EXPORT(void) _nc_tgetent_leak(TERMINAL *); +extern NCURSES_EXPORT(void) _nc_tgetent_leak(const TERMINAL *); extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void); #endif @@ -2157,6 +2247,12 @@ extern int __MINGW_NOTHROW _nc_mblen(const char *, size_t); #endif /* _NC_WINDOWS && !_NC_MSC */ +#if defined(_NC_WINDOWS) || defined(_NC_MINGW) +/* see wcwidth.c */ +extern NCURSES_EXPORT(int) mk_wcwidth(wchar_t); +#define wcwidth(ucs) _nc_wcwidth(ucs) +#endif + #if HAVE_MBTOWC && HAVE_MBLEN #define reset_mbytes(state) IGNORE_RC(mblen(NULL, (size_t) 0)), IGNORE_RC(mbtowc(NULL, NULL, (size_t) 0)) #define count_mbytes(buffer,length,state) mblen(buffer,length) @@ -2434,6 +2530,14 @@ extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER; #define NC_ISATTY(fd) isatty(fd) #endif +/* + * Perhaps not "real" but possibly not "fake". + */ +#define IsRealTty(fd,value) \ + (NC_ISATTY(fd) \ + && (value = ttyname(fd)) != NULL \ + && strncmp(value, "/dev/pts/", 9)) + #ifdef USE_TERM_DRIVER # define IsTermInfo(sp) ((TCBOf(sp) != 0) && ((TCBOf(sp)->drv->isTerminfo))) # define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp)) @@ -2545,8 +2649,8 @@ extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype); #endif #ifdef EXP_XTERM_1005 -NCURSES_EXPORT(int) _nc_conv_to_utf8(unsigned char *, unsigned, unsigned); -NCURSES_EXPORT(int) _nc_conv_to_utf32(unsigned *, const char *, unsigned); +extern NCURSES_EXPORT(int) _nc_conv_to_utf8(unsigned char *, unsigned, unsigned); +extern NCURSES_EXPORT(int) _nc_conv_to_utf32(unsigned *, const char *, unsigned); #endif #ifdef __cplusplus diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses index c0adc1ef..5069c222 100644 --- a/ncurses/llib-lncurses +++ b/ncurses/llib-lncurses @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -3025,6 +3025,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_user_definable NCURSES_BOOL _nc_user_definable; @@ -3406,6 +3411,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef ttytype @@ -3626,6 +3667,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -3646,6 +3692,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -4096,7 +4157,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat @@ -4322,7 +4383,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-lncursest b/ncurses/llib-lncursest index 7c54b32c..7c8bac9c 100644 --- a/ncurses/llib-lncursest +++ b/ncurses/llib-lncursest @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2008-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -3039,6 +3039,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_user_definable NCURSES_BOOL _nc_user_definable; @@ -3461,6 +3466,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef _nc_ttytype @@ -3711,6 +3752,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -3731,6 +3777,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -4217,7 +4278,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat @@ -4443,7 +4504,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-lncursestw b/ncurses/llib-lncursestw index d553e5c5..3aa57eee 100644 --- a/ncurses/llib-lncursestw +++ b/ncurses/llib-lncursestw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2009-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -3995,6 +3995,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_free_termtype2 void _nc_free_termtype2( TERMTYPE2 *ptr) @@ -4422,6 +4427,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef _nc_ttytype @@ -4672,6 +4713,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -4692,6 +4738,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -5196,7 +5257,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat @@ -5444,7 +5505,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw index 0f41959c..dbf535db 100644 --- a/ncurses/llib-lncursesw +++ b/ncurses/llib-lncursesw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2001-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -3981,6 +3981,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_free_termtype2 void _nc_free_termtype2( TERMTYPE2 *ptr) @@ -4367,6 +4372,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef ttytype @@ -4587,6 +4628,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -4607,6 +4653,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -5075,7 +5136,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat @@ -5323,7 +5384,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-ltic b/ncurses/llib-ltic index 0037884d..9e87aaea 100644 --- a/ncurses/llib-ltic +++ b/ncurses/llib-ltic @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 2012-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -150,7 +150,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-ltict b/ncurses/llib-ltict index b9895bcb..db9090b9 100644 --- a/ncurses/llib-ltict +++ b/ncurses/llib-ltict @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 2013-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -150,7 +150,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-ltictw b/ncurses/llib-ltictw index 2e407fd0..85db89bc 100644 --- a/ncurses/llib-ltictw +++ b/ncurses/llib-ltictw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 2012-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -150,7 +150,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-lticw b/ncurses/llib-lticw index 2e407fd0..85db89bc 100644 --- a/ncurses/llib-lticw +++ b/ncurses/llib-lticw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 2012-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -150,7 +150,7 @@ int _nc_get_token( #undef _nc_trans_string int _nc_trans_string( char *ptr, - char *last) + const char *const last) { return(*(int *)0); } #undef _nc_push_token diff --git a/ncurses/llib-ltinfo b/ncurses/llib-ltinfo index 5dabf894..5cfa111a 100644 --- a/ncurses/llib-ltinfo +++ b/ncurses/llib-ltinfo @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2012-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -296,6 +296,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_user_definable NCURSES_BOOL _nc_user_definable; @@ -677,6 +682,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef ttytype @@ -897,6 +938,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -917,6 +963,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -1365,7 +1426,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat diff --git a/ncurses/llib-ltinfot b/ncurses/llib-ltinfot index 7d5dcf0c..94ca9a7f 100644 --- a/ncurses/llib-ltinfot +++ b/ncurses/llib-ltinfot @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2013-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -301,6 +301,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_user_definable NCURSES_BOOL _nc_user_definable; @@ -723,6 +728,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef _nc_ttytype @@ -973,6 +1014,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -993,6 +1039,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -1477,7 +1538,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat diff --git a/ncurses/llib-ltinfotw b/ncurses/llib-ltinfotw index 0fd8d287..3b21b876 100644 --- a/ncurses/llib-ltinfotw +++ b/ncurses/llib-ltinfotw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2012-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -318,6 +318,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_free_termtype2 void _nc_free_termtype2( TERMTYPE2 *ptr) @@ -745,6 +750,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef _nc_ttytype @@ -995,6 +1036,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -1015,6 +1061,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -1517,7 +1578,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat diff --git a/ncurses/llib-ltinfow b/ncurses/llib-ltinfow index 93c9274e..fd308180 100644 --- a/ncurses/llib-ltinfow +++ b/ncurses/llib-ltinfow @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2012-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -313,6 +313,11 @@ void _nc_free_termtype( TERMTYPE *ptr) { /* void */ } +#undef _nc_free_termtype1 +void _nc_free_termtype1( + TERMTYPE *ptr) + { /* void */ } + #undef _nc_free_termtype2 void _nc_free_termtype2( TERMTYPE2 *ptr) @@ -699,6 +704,42 @@ int intrflush( NCURSES_BOOL flag) { return(*(int *)0); } +#undef is_nl_sp +int is_nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_raw_sp +int is_raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_cbreak_sp +int is_cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_echo_sp +int is_echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef is_nl +int is_nl(void) + { return(*(int *)0); } + +#undef is_raw +int is_raw(void) + { return(*(int *)0); } + +#undef is_cbreak +int is_cbreak(void) + { return(*(int *)0); } + +#undef is_echo +int is_echo(void) + { return(*(int *)0); } + /* ./tinfo/lib_setup.c */ #undef ttytype @@ -919,6 +960,11 @@ char *tigetstr( #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_free_tparm +void _nc_free_tparm( + TERMINAL *termp) + { /* void */ } + #undef _nc_tparm_analyze int _nc_tparm_analyze( TERMINAL *term, @@ -939,6 +985,21 @@ char *tiparm( ...) { return(*(char **)0); } +#undef tiparm_s +char *tiparm_s( + int num_expected, + int tparm_type, + const char *string, + ...) + { return(*(char **)0); } + +#undef tiscan_s +int tiscan_s( + int *num_expected, + int *tparm_type, + const char *string) + { return(*(int *)0); } + #undef _nc_tiparm char *_nc_tiparm( int expected, @@ -1405,7 +1466,7 @@ string_desc *_nc_str_null( #undef _nc_str_copy string_desc *_nc_str_copy( string_desc *dst, - string_desc *src) + const string_desc *const src) { return(*(string_desc **)0); } #undef _nc_safe_strcat diff --git a/ncurses/report_offsets.c b/ncurses/report_offsets.c index 83f6f381..0f82dcf3 100644 --- a/ncurses/report_offsets.c +++ b/ncurses/report_offsets.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,14 +31,17 @@ * Author: Thomas E. Dickey * ****************************************************************************/ +#define NEW_PAIR_INTERNAL 1 #include -MODULE_ID("$Id: report_offsets.c,v 1.22 2021/08/19 19:51:33 tom Exp $") +MODULE_ID("$Id: report_offsets.c,v 1.28 2024/02/24 15:59:09 tom Exp $") #define show_size(type) \ flag = 0; \ last = 0; \ printf("%5lu " #type "\n", (unsigned long)sizeof(type)) +#define show_name(name) \ + printf("%5lu " #name "\n", (unsigned long)(name)) #define show_offset(type,member) \ next = (unsigned long)offsetof(type,member); \ if (last > next) \ @@ -65,12 +68,7 @@ MODULE_ID("$Id: report_offsets.c,v 1.22 2021/08/19 19:51:33 tom Exp $") #define show_MLEAKS(type,member) /* nothing */ #endif -#ifdef USE_TERM_DRIVER -#define show_NORMAL(type,member) /* nothing */ -#else #define show_NORMAL(type,member) { flag = "n"; show_offset(type,member); } -#endif - #define show_OPTION(type,member) { flag = "+"; show_offset(type,member); } #if USE_REENTRANT @@ -116,9 +114,28 @@ main(void) #if USE_WIDEC_SUPPORT show_size(cchar_t); #endif + show_size(color_t); + show_size(colorpair_t); show_size(mmask_t); + show_size(rgb_bits_t); show_size(MEVENT); show_size(NCURSES_BOOL); + show_size(TRIES); + + printf("\n"); + printf("Sizes of buffers/arrays:\n"); +#if USE_WIDEC_SUPPORT + show_name(CCHARW_MAX); +#endif + show_name(EV_MAX); + show_name(FIFO_SIZE); + show_name(NAMESIZE); + show_name(MB_LEN_MAX); + show_name(PATH_MAX); +#ifdef TRACE + show_name(TRACECHR_BUF); + show_name(TRACEMSE_MAX); +#endif printf("\n"); show_size(SCREEN); @@ -160,7 +177,9 @@ main(void) #if USE_SIZECHANGE show_OPTION(SCREEN, _resize); #endif - show_DRIVER(SCREEN, _windowlist); +#ifdef USE_SP_WINDOWLIST + show_NORMAL(SCREEN, _windowlist); +#endif show_REENTR(SCREEN, _ttytype); show_SPFUNC(SCREEN, use_tioctl); show_WIDECH(SCREEN, _screen_acs_fix); @@ -210,7 +229,9 @@ main(void) show_offset(NCURSES_GLOBALS, cached_tparm); #endif show_DRIVER(NCURSES_GLOBALS, term_driver); +#ifndef USE_SP_WINDOWLIST show_NORMAL(NCURSES_GLOBALS, _nc_windowlist); +#endif #if USE_HOME_TERMINFO show_OPTION(NCURSES_GLOBALS, home_terminfo); #endif @@ -223,6 +244,7 @@ main(void) #endif show_WIDECH(NCURSES_GLOBALS, key_name); show_TRACES(NCURSES_GLOBALS, trace_opened); + show_TRACES(NCURSES_GLOBALS, trace_level); show_MLEAKS(NCURSES_GLOBALS, leak_checking); printf("\n"); diff --git a/ncurses/term.priv.h b/ncurses/term.priv.h index 03669cb4..1f436b5f 100644 --- a/ncurses/term.priv.h +++ b/ncurses/term.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2021 Thomas E. Dickey * + * Copyright 2021-2023,2024 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,13 +27,12 @@ ****************************************************************************/ /* - * $Id: term.priv.h,v 1.7 2021/11/20 23:33:33 tom Exp $ + * $Id: term.priv.h,v 1.13 2024/03/02 20:43:06 tom Exp $ * * term.priv.h * * Header file for terminfo library objects which are private to * the library. - * */ #ifndef _TERM_PRIV_H @@ -46,11 +45,20 @@ extern "C" { #include +#ifndef __NCURSES_H +#include +#endif + #undef NCURSES_OPAQUE #define NCURSES_INTERNALS 1 #define NCURSES_OPAQUE 0 -#include /* PATH_MAX */ +#if HAVE_LIMITS_H +# include /* PATH_MAX, MB_LEN_MAX, etc */ +#elif HAVE_SYS_PARAM_H +# include +#endif + #include /* sig_atomic_t */ #include /* time_t */ #include /* time_t */ @@ -61,6 +69,28 @@ extern "C" { #endif #endif +/* + * If not properly configured to use the system's limits.h, we get gcc's + * fallback for limits.h which sets MB_LEN_MAX to 1, which is never correct. + */ +#if !HAVE_CONSISTENT_MB_LEN_MAX +#undef MB_LEN_MAX +#endif + +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 16 /* should be >= MB_CUR_MAX, but that may be a function */ +#endif + +#ifndef PATH_MAX +# if defined(_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +# elif defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 255 /* the Posix minimum path-size */ +# endif +#endif + /* * State of tparm(). */ @@ -238,7 +268,6 @@ typedef struct { #ifdef TRACE bool trace_opened; - char trace_fname[PATH_MAX]; int trace_level; FILE * trace_fp; int trace_fd; diff --git a/ncurses/tinfo/MKcaptab.sh b/ncurses/tinfo/MKcaptab.sh index c800023d..5f413502 100644 --- a/ncurses/tinfo/MKcaptab.sh +++ b/ncurses/tinfo/MKcaptab.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright 2019,2020 Thomas E. Dickey # +# Copyright 2019-2020,2023 Thomas E. Dickey # # Copyright 2007-2010,2011 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -27,7 +27,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKcaptab.sh,v 1.19 2020/02/02 23:34:34 tom Exp $ +# $Id: MKcaptab.sh,v 1.20 2023/04/22 15:12:57 tom Exp $ if test $# != 0 then @@ -153,7 +153,6 @@ _nc_get_table(bool termcap) return termcap ? build_names(cap) : build_names(info); } -/* entrypoint used by tack 1.07 */ NCURSES_EXPORT(const HashValue *) _nc_get_hash_table(bool termcap) { diff --git a/ncurses/tinfo/MKfallback.sh b/ncurses/tinfo/MKfallback.sh index 64c65f19..02b36ed7 100644 --- a/ncurses/tinfo/MKfallback.sh +++ b/ncurses/tinfo/MKfallback.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2023 Thomas E. Dickey # # Copyright 1998-2019,2020 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -27,7 +27,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKfallback.sh,v 1.25 2020/08/16 15:58:44 tom Exp $ +# $Id: MKfallback.sh,v 1.26 2023/04/22 15:12:57 tom Exp $ # # MKfallback.sh -- create fallback table for entry reads # @@ -146,9 +146,6 @@ cat <$data cat <= 19) +#include +#define USE_GETAUXVAL 1 +#else +#define USE_GETAUXVAL 0 +#endif + #include -MODULE_ID("$Id: access.c,v 1.31 2021/08/29 10:35:17 tom Exp $") +MODULE_ID("$Id: access.c,v 1.37 2023/06/24 21:55:09 tom Exp $") #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c)) @@ -63,8 +70,8 @@ _nc_rootname(char *path) static char *temp; char *s; - temp = strdup(result); - result = temp; + if ((temp = strdup(result)) != 0) + result = temp; #if !MIXEDCASE_FILENAMES for (s = result; *s != '\0'; ++s) { *s = (char) LOWERCASE(*s); @@ -177,14 +184,25 @@ _nc_is_file_path(const char *path) return result; } +#if HAVE_GETEUID && HAVE_GETEGID +#define is_posix_elevated() \ + (getuid() != geteuid() \ + || getgid() != getegid()) +#else +#define is_posix_elevated() FALSE +#endif + #if HAVE_ISSETUGID #define is_elevated() issetugid() -#elif HAVE_GETEUID && HAVE_GETEGID +#elif USE_GETAUXVAL && defined(AT_SECURE) #define is_elevated() \ - (getuid() != geteuid() \ - || getgid() != getegid()) + (getauxval(AT_SECURE) \ + ? TRUE \ + : (errno != ENOENT \ + ? FALSE \ + : is_posix_elevated())) #else -#define is_elevated() FALSE +#define is_elevated() is_posix_elevated() #endif #if HAVE_SETFSUID @@ -203,24 +221,30 @@ _nc_is_file_path(const char *path) #define resume_elevation() /* nothing */ #endif -#ifndef USE_ROOT_ENVIRON /* - * Returns true if we allow application to use environment variables that are - * used for searching lists of directories, etc. + * Returns true if not running as root or setuid. We use this check to allow + * applications to use environment variables that are used for searching lists + * of directories, etc. */ NCURSES_EXPORT(int) _nc_env_access(void) { int result = TRUE; +#if HAVE_GETUID && HAVE_GETEUID +#if !defined(USE_SETUID_ENVIRON) if (is_elevated()) { result = FALSE; - } else if ((getuid() == ROOT_UID) || (geteuid() == ROOT_UID)) { + } +#endif +#if !defined(USE_ROOT_ENVIRON) + if ((getuid() == ROOT_UID) || (geteuid() == ROOT_UID)) { result = FALSE; } +#endif +#endif /* HAVE_GETUID && HAVE_GETEUID */ return result; } -#endif /* USE_ROOT_ENVIRON */ #ifndef USE_ROOT_ACCESS /* @@ -257,4 +281,4 @@ _nc_safe_open3(const char *path, int flags, mode_t mode) #endif return result; } -#endif /* USE_ROOT_ENVIRON */ +#endif /* USE_ROOT_ACCESS */ diff --git a/ncurses/tinfo/add_tries.c b/ncurses/tinfo/add_tries.c index d41f4883..9d215575 100644 --- a/ncurses/tinfo/add_tries.c +++ b/ncurses/tinfo/add_tries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2023 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -39,8 +39,9 @@ */ #include +#include -MODULE_ID("$Id: add_tries.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: add_tries.c,v 1.13 2023/06/24 15:36:13 tom Exp $") #define SET_TRY(dst,src) if ((dst->ch = *src++) == 128) dst->ch = '\0' #define CMP_TRY(a,b) ((a)? (a == b) : (b == 128)) @@ -53,7 +54,7 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code) T((T_CALLED("_nc_add_to_try(%p, %s, %u)"), (void *) *tree, _nc_visbuf(str), code)); - if (txt == 0 || *txt == '\0' || code == 0) + if (!VALID_STRING(str) || *txt == '\0' || code == 0) returnCode(ERR); if ((*tree) != 0) { diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c index c13f86ee..6280ad4a 100644 --- a/ncurses/tinfo/alloc_entry.c +++ b/ncurses/tinfo/alloc_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,13 +48,11 @@ #include -MODULE_ID("$Id: alloc_entry.c,v 1.66 2021/08/08 00:09:37 tom Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.79 2023/09/15 08:16:12 tom Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 -#define MAX_STRTAB 4096 /* documented maximum entry size */ - static char *stringbuf; /* buffer for string capabilities */ static size_t next_free; /* next free character in stringbuf */ @@ -62,33 +60,44 @@ NCURSES_EXPORT(void) _nc_init_entry(ENTRY * const tp) /* initialize a terminal type data block */ { + DEBUG(2, (T_CALLED("_nc_init_entry(tp=%p)"), (void *) tp)); + + if (tp == NULL) { #if NO_LEAKS - if (tp == 0) { - if (stringbuf != 0) { + if (stringbuf != NULL) { FreeAndNull(stringbuf); } return; - } +#else + _nc_err_abort("_nc_init_entry called without initialization"); #endif + } - if (stringbuf == 0) - TYPE_MALLOC(char, (size_t) MAX_STRTAB, stringbuf); + if (stringbuf == NULL) + TYPE_CALLOC(char, (size_t) MAX_ENTRY_SIZE, stringbuf); next_free = 0; _nc_init_termtype(&(tp->tterm)); + + DEBUG(2, (T_RETURN(""))); } NCURSES_EXPORT(ENTRY *) _nc_copy_entry(ENTRY * oldp) { - ENTRY *newp = typeCalloc(ENTRY, 1); + ENTRY *newp; - if (newp != 0) { + DEBUG(2, (T_CALLED("_nc_copy_entry(oldp=%p)"), (void *) oldp)); + + newp = typeCalloc(ENTRY, 1); + if (newp != NULL) { *newp = *oldp; _nc_copy_termtype2(&(newp->tterm), &(oldp->tterm)); } - return newp; + + DEBUG(2, (T_RETURN("%p"), (void *) newp)); + return (newp); } /* save a copy of string in the string buffer */ @@ -97,28 +106,31 @@ _nc_save_str(const char *string) { char *result = 0; size_t old_next_free = next_free; - size_t len; - - if (!VALID_STRING(string)) - string = ""; - len = strlen(string) + 1; - - if (len == 1 && next_free != 0) { - /* - * Cheat a little by making an empty string point to the end of the - * previous string. - */ - if (next_free < MAX_STRTAB) { - result = (stringbuf + next_free - 1); + + if (stringbuf != NULL) { + size_t len; + + if (!VALID_STRING(string)) + string = ""; + len = strlen(string) + 1; + + if (len == 1 && next_free != 0) { + /* + * Cheat a little by making an empty string point to the end of the + * previous string. + */ + if (next_free < MAX_ENTRY_SIZE) { + result = (stringbuf + next_free - 1); + } + } else if (next_free + len < MAX_ENTRY_SIZE) { + _nc_STRCPY(&stringbuf[next_free], string, MAX_ENTRY_SIZE); + DEBUG(7, ("Saved string %s", _nc_visbuf(string))); + DEBUG(7, ("at location %d", (int) next_free)); + next_free += len; + result = (stringbuf + old_next_free); + } else { + _nc_warning("Too much data, some is lost: %s", string); } - } else if (next_free + len < MAX_STRTAB) { - _nc_STRCPY(&stringbuf[next_free], string, MAX_STRTAB); - DEBUG(7, ("Saved string %s", _nc_visbuf(string))); - DEBUG(7, ("at location %d", (int) next_free)); - next_free += len; - result = (stringbuf + old_next_free); - } else { - _nc_warning("Too much data, some is lost: %s", string); } return result; } @@ -130,17 +142,23 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) int offsets[MAX_ENTRY_SIZE / sizeof(short)]; int useoffsets[MAX_USES]; unsigned i, n; - unsigned nuses = ep->nuses; - TERMTYPE2 *tp = &(ep->tterm); + unsigned nuses; + TERMTYPE2 *tp; + + DEBUG(2, (T_CALLED("_nc_wrap_entry(ep=%p, copy_strings=%d)"), (void *) + ep, copy_strings)); + if (ep == NULL || stringbuf == NULL) + _nc_err_abort("_nc_wrap_entry called without initialization"); + nuses = ep->nuses; + tp = &(ep->tterm); if (copy_strings) { next_free = 0; /* clear static storage */ /* copy term_names, Strings, uses */ tp->term_names = _nc_save_str(tp->term_names); for_each_string(i, tp) { - if (tp->Strings[i] != ABSENT_STRING && - tp->Strings[i] != CANCELLED_STRING) { + if (VALID_STRING(tp->Strings[i])) { tp->Strings[i] = _nc_save_str(tp->Strings[i]); } } @@ -215,11 +233,13 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) #endif for (i = 0; i < nuses; i++) { - if (useoffsets[i] == ABSENT_OFFSET) + if (useoffsets[i] == ABSENT_OFFSET) { ep->uses[i].name = 0; - else - ep->uses[i].name = (tp->str_table + useoffsets[i]); + } else { + ep->uses[i].name = strdup(tp->str_table + useoffsets[i]); + } } + DEBUG(2, (T_RETURN(""))); } NCURSES_EXPORT(void) @@ -230,6 +250,8 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source) TERMTYPE2 *from = &(source->tterm); #if NCURSES_XNAMES TERMTYPE2 copy; + size_t str_size, copy_size; + char *str_table; #endif unsigned i; @@ -240,6 +262,99 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source) _nc_copy_termtype2(©, from); from = © _nc_align_termtype(to, from); + /* + * compute the maximum size of the string-table. + */ + str_size = strlen(to->term_names) + 1; + for_each_string(i, from) { + if (VALID_STRING(from->Strings[i])) + str_size += strlen(from->Strings[i]) + 1; + } + for_each_string(i, to) { + if (VALID_STRING(to->Strings[i])) + str_size += strlen(to->Strings[i]) + 1; + } + /* allocate a string-table large enough for both source/target, and + * copy all of the strings into that table. In the merge, we will + * select from the original source/target lists to construct a new + * target list. + */ + if (str_size != 0) { + char *str_copied; + if ((str_table = malloc(str_size)) == NULL) + _nc_err_abort(MSG_NO_MEMORY); + str_copied = str_table; + _nc_STRCPY(str_copied, to->term_names, str_size); + to->term_names = str_copied; + copy_size = strlen(str_copied) + 1; + str_copied += copy_size; + str_size -= copy_size; + for_each_string(i, from) { + if (VALID_STRING(from->Strings[i])) { + _nc_STRCPY(str_copied, from->Strings[i], str_size); + from->Strings[i] = str_copied; + copy_size = strlen(str_copied) + 1; + str_copied += copy_size; + str_size -= copy_size; + } + } + for_each_string(i, to) { + if (VALID_STRING(to->Strings[i])) { + _nc_STRCPY(str_copied, to->Strings[i], str_size); + to->Strings[i] = str_copied; + copy_size = strlen(str_copied) + 1; + str_copied += copy_size; + str_size -= copy_size; + } + } + free(to->str_table); + to->str_table = str_table; + free(from->str_table); + } + /* + * Do the same for the extended-strings (i.e., lists of capabilities). + */ + str_size = 0; + for (i = 0; i < NUM_EXT_NAMES(from); ++i) { + if (VALID_STRING(from->ext_Names[i])) + str_size += strlen(from->ext_Names[i]) + 1; + } + for (i = 0; i < NUM_EXT_NAMES(to); ++i) { + if (VALID_STRING(to->ext_Names[i])) + str_size += strlen(to->ext_Names[i]) + 1; + } + /* allocate a string-table large enough for both source/target, and + * copy all of the strings into that table. In the merge, we will + * select from the original source/target lists to construct a new + * target list. + */ + if (str_size != 0) { + char *str_copied; + if ((str_table = malloc(str_size)) == NULL) + _nc_err_abort(MSG_NO_MEMORY); + str_copied = str_table; + for (i = 0; i < NUM_EXT_NAMES(from); ++i) { + if (VALID_STRING(from->ext_Names[i])) { + _nc_STRCPY(str_copied, from->ext_Names[i], str_size); + from->ext_Names[i] = str_copied; + copy_size = strlen(str_copied) + 1; + str_copied += copy_size; + str_size -= copy_size; + } + } + for (i = 0; i < NUM_EXT_NAMES(to); ++i) { + if (VALID_STRING(to->ext_Names[i])) { + _nc_STRCPY(str_copied, to->ext_Names[i], str_size); + to->ext_Names[i] = str_copied; + copy_size = strlen(str_copied) + 1; + str_copied += copy_size; + str_size -= copy_size; + } + } + free(to->ext_str_table); + to->ext_str_table = str_table; + free(from->ext_str_table); + } #endif for_each_boolean(i, from) { if (to->Booleans[i] != (NCURSES_SBOOL) CANCELLED_BOOLEAN) { @@ -279,10 +394,7 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source) } } #if NCURSES_XNAMES - /* Discard the data allocated in _nc_copy_termtype2, but do not use - * _nc_free_termtype2 because that frees the string-table (which is - * not allocated by _nc_copy_termtype2). - */ + /* cleanup */ free(copy.Booleans); free(copy.Numbers); free(copy.Strings); @@ -294,7 +406,7 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source) NCURSES_EXPORT(void) _nc_alloc_entry_leaks(void) { - if (stringbuf != 0) { + if (stringbuf != NULL) { FreeAndNull(stringbuf); } next_free = 0; diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c index cb824112..304c1b62 100644 --- a/ncurses/tinfo/alloc_ttype.c +++ b/ncurses/tinfo/alloc_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1999-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: alloc_ttype.c,v 1.35 2021/06/17 21:11:08 tom Exp $") +MODULE_ID("$Id: alloc_ttype.c,v 1.51 2023/09/09 23:15:53 tom Exp $") #if NCURSES_XNAMES /* @@ -377,6 +377,9 @@ adjust_cancels(TERMTYPE2 *to, TERMTYPE2 *from) int last = first + to->ext_Strings; int j, k; + DEBUG(3, (T_CALLED("adjust_cancels(%s), from(%s)"), + NonNull(to->term_names), + NonNull(from->term_names))); for (j = first; j < last;) { char *name = to->ext_Names[j]; int j_str = to->num_Strings - first - to->ext_Strings; @@ -413,6 +416,7 @@ adjust_cancels(TERMTYPE2 *to, TERMTYPE2 *from) j++; } } + DEBUG(3, (T_RETURN(""))); } NCURSES_EXPORT(void) @@ -425,7 +429,7 @@ _nc_align_termtype(TERMTYPE2 *to, TERMTYPE2 *from) na = to ? ((int) NUM_EXT_NAMES(to)) : 0; nb = from ? ((int) NUM_EXT_NAMES(from)) : 0; - DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", + DEBUG(2, (T_CALLED("_nc_align_termtype to(%d:%s), from(%d:%s)"), na, to ? NonNull(to->term_names) : "?", nb, from ? NonNull(from->term_names) : "?")); @@ -446,8 +450,10 @@ _nc_align_termtype(TERMTYPE2 *to, TERMTYPE2 *from) break; } } - if (same) + if (same) { + DEBUG(2, (T_RETURN(""))); return; + } } /* * This is where we pay for having a simple extension representation. @@ -507,6 +513,7 @@ _nc_align_termtype(TERMTYPE2 *to, TERMTYPE2 *from) if (!used_ext_Names) free(ext_Names); } + DEBUG(2, (T_RETURN(""))); } #endif @@ -520,15 +527,17 @@ _nc_align_termtype(TERMTYPE2 *to, TERMTYPE2 *from) static void copy_termtype(TERMTYPE2 *dst, const TERMTYPE2 *src, int mode) { -#if NCURSES_XNAMES || NCURSES_EXT_NUMBERS unsigned i; -#endif + int pass; + char *new_table; + size_t new_table_size; #if NCURSES_EXT_NUMBERS short *oldptr = 0; int *newptr = 0; #endif - DEBUG(2, ("copy_termtype")); + DEBUG(2, (T_CALLED("copy_termtype(dst=%p, src=%p, mode=%d)"), (void *) + dst, (const void *) src, mode)); *dst = *src; /* ...to copy the sizes and string-tables */ TYPE_MALLOC(NCURSES_SBOOL, NUM_BOOLEANS(dst), dst->Booleans); @@ -541,6 +550,40 @@ copy_termtype(TERMTYPE2 *dst, const TERMTYPE2 *src, int mode) src->Strings, NUM_STRINGS(dst) * sizeof(dst->Strings[0])); + new_table = NULL; + new_table_size = 0; + for (pass = 0; pass < 2; ++pass) { + size_t str_size = 0; + if (src->term_names != NULL) { + if (pass) { + dst->term_names = new_table + str_size; + _nc_STRCPY(dst->term_names + str_size, + src->term_names, + new_table_size - str_size); + } + str_size += strlen(src->term_names) + 1; + } + for_each_string(i, src) { + if (VALID_STRING(src->Strings[i])) { + if (pass) { + _nc_STRCPY(new_table + str_size, + src->Strings[i], + new_table_size - str_size); + dst->Strings[i] = new_table + str_size; + } + str_size += strlen(src->Strings[i]) + 1; + } + } + if (pass) { + dst->str_table = new_table; + } else { + ++str_size; + if ((new_table = malloc(str_size)) == NULL) + _nc_err_abort(MSG_NO_MEMORY); + new_table_size = str_size; + } + } + #if NCURSES_EXT_NUMBERS if ((mode & dstINT) == 0) { DEBUG(2, ("...convert int ->short")); @@ -584,36 +627,75 @@ copy_termtype(TERMTYPE2 *dst, const TERMTYPE2 *src, int mode) NUM_NUMBERS(dst) * sizeof(dst->Numbers[0])); #endif - /* FIXME: we probably should also copy str_table and ext_str_table, - * but tic and infocmp are not written to exploit that (yet). - */ - #if NCURSES_XNAMES if ((i = NUM_EXT_NAMES(src)) != 0) { TYPE_MALLOC(char *, i, dst->ext_Names); memcpy(dst->ext_Names, src->ext_Names, i * sizeof(char *)); + + new_table = NULL; + new_table_size = 0; + for (pass = 0; pass < 2; ++pass) { + size_t str_size = 0; + char *raw_data = src->ext_str_table; + if (raw_data != NULL) { + for (i = 0; i < src->ext_Strings; ++i) { + size_t skip = strlen(raw_data) + 1; + if (skip != 1) { + if (pass) { + _nc_STRCPY(new_table + str_size, + raw_data, + new_table_size - str_size); + } + str_size += skip; + raw_data += skip; + } + } + } + for (i = 0; i < NUM_EXT_NAMES(dst); ++i) { + if (VALID_STRING(src->ext_Names[i])) { + if (pass) { + _nc_STRCPY(new_table + str_size, + src->ext_Names[i], + new_table_size - str_size); + dst->ext_Names[i] = new_table + str_size; + } + str_size += strlen(src->ext_Names[i]) + 1; + } + } + if (pass) { + dst->ext_str_table = new_table; + } else { + ++str_size; + if ((new_table = calloc(str_size, 1)) == NULL) + _nc_err_abort(MSG_NO_MEMORY); + new_table_size = str_size; + } + } } else { dst->ext_Names = 0; } #endif + (void) new_table_size; + DEBUG(2, (T_RETURN(""))); } -/* - * This entrypoint is used by tack 1.07 - */ NCURSES_EXPORT(void) _nc_copy_termtype(TERMTYPE *dst, const TERMTYPE *src) { - DEBUG(2, ("_nc_copy_termtype...")); + DEBUG(2, (T_CALLED("_nc_copy_termtype(dst=%p, src=%p)"), (void *) dst, + (const void *) src)); copy_termtype((TERMTYPE2 *) dst, (const TERMTYPE2 *) src, 0); + DEBUG(2, (T_RETURN(""))); } #if NCURSES_EXT_NUMBERS NCURSES_EXPORT(void) _nc_copy_termtype2(TERMTYPE2 *dst, const TERMTYPE2 *src) { - DEBUG(2, ("_nc_copy_termtype2...")); + DEBUG(2, (T_CALLED("_nc_copy_termtype2(dst=%p, src=%p)"), (void *) dst, + (const void *) src)); copy_termtype(dst, src, srcINT | dstINT); + DEBUG(2, (T_RETURN(""))); } /* @@ -623,7 +705,9 @@ _nc_copy_termtype2(TERMTYPE2 *dst, const TERMTYPE2 *src) NCURSES_EXPORT(void) _nc_export_termtype2(TERMTYPE *dst, const TERMTYPE2 *src) { - DEBUG(2, ("_nc_export_termtype2...")); + DEBUG(2, (T_CALLED("_nc_export_termtype2(dst=%p, src=%p)"), (void *) + dst, (const void *) src)); copy_termtype((TERMTYPE2 *) dst, src, srcINT); + DEBUG(2, (T_RETURN(""))); } #endif /* NCURSES_EXT_NUMBERS */ diff --git a/ncurses/tinfo/comp_error.c b/ncurses/tinfo/comp_error.c index 48f48784..3e6b4022 100644 --- a/ncurses/tinfo/comp_error.c +++ b/ncurses/tinfo/comp_error.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2023 Thomas E. Dickey * * Copyright 1998-2012,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: comp_error.c,v 1.40 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: comp_error.c,v 1.44 2023/06/15 20:27:02 tom Exp $") NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE; NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */ @@ -60,8 +60,15 @@ _nc_get_source(void) NCURSES_EXPORT(void) _nc_set_source(const char *const name) { - FreeIfNeeded(SourceName); - SourceName = strdup(name); + if (name == NULL) { + free(SourceName); + SourceName = NULL; + } else if (SourceName == NULL) { + SourceName = strdup(name); + } else if (strcmp(name, SourceName)) { + free(SourceName); + SourceName = strdup(name); + } } NCURSES_EXPORT(void) @@ -95,9 +102,9 @@ static NCURSES_INLINE void where_is_problem(void) { fprintf(stderr, "\"%s\"", SourceName ? SourceName : "?"); - if (_nc_curr_line >= 0) + if (_nc_curr_line > 0) fprintf(stderr, ", line %d", _nc_curr_line); - if (_nc_curr_col >= 0) + if (_nc_curr_col > 0) fprintf(stderr, ", col %d", _nc_curr_col); if (TermType != 0 && TermType[0] != '\0') fprintf(stderr, ", terminal '%s'", TermType); @@ -148,9 +155,7 @@ _nc_syserr_abort(const char *const fmt, ...) /* If we're debugging, try to show where the problem occurred - this * will dump core. */ -#ifndef USE_ROOT_ENVIRON - if (getuid() != ROOT_UID) -#endif + if (_nc_env_access()) abort(); #endif /* Dumping core in production code is not a good idea. diff --git a/ncurses/tinfo/comp_expand.c b/ncurses/tinfo/comp_expand.c index 724283ce..e971384f 100644 --- a/ncurses/tinfo/comp_expand.c +++ b/ncurses/tinfo/comp_expand.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -36,7 +36,7 @@ #include #include -MODULE_ID("$Id: comp_expand.c,v 1.34 2021/09/04 10:29:15 tom Exp $") +MODULE_ID("$Id: comp_expand.c,v 1.35 2023/04/28 20:59:06 tom Exp $") #if 0 #define DEBUG_THIS(p) DEBUG(9, p) @@ -129,7 +129,6 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers) if (dst != 0 && *dst == R_BRACE && value < 127 - && value != '\\' /* FIXME */ && isprint((int) value)) { ch = (int) value; buffer[bufp++] = S_QUOTE; diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c index 80755f22..4b081afa 100644 --- a/ncurses/tinfo/comp_hash.c +++ b/ncurses/tinfo/comp_hash.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2023 Thomas E. Dickey * * Copyright 1998-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -45,13 +45,12 @@ #include #include -MODULE_ID("$Id: comp_hash.c,v 1.53 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: comp_hash.c,v 1.55 2023/06/24 13:29:43 tom Exp $") /* * Finds the entry for the given string in the hash table if present. * Returns a pointer to the entry in the table or 0 if not found. */ -/* entrypoint used by tack 1.07 */ NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry(const char *string, const HashValue * hash_table) @@ -104,14 +103,16 @@ _nc_find_type_entry(const char *string, && data->table_data[hashvalue] >= 0) { const struct name_table_entry *const table = _nc_get_table(termcap); - ptr = table + data->table_data[hashvalue]; - while (ptr->nte_type != type - || !data->compare_names(ptr->nte_name, string)) { - if (ptr->nte_link < 0) { - ptr = 0; - break; + if (table != NULL) { + ptr = table + data->table_data[hashvalue]; + while (ptr->nte_type != type + || !data->compare_names(ptr->nte_name, string)) { + if (ptr->nte_link < 0) { + ptr = 0; + break; + } + ptr = table + (ptr->nte_link + data->table_data[data->table_size]); } - ptr = table + (ptr->nte_link + data->table_data[data->table_size]); } } diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index 2bc94853..dec4b925 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: comp_parse.c,v 1.113 2021/05/08 15:03:42 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.134 2024/02/10 15:52:11 tom Exp $") static void sanity_check2(TERMTYPE2 *, bool); NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; @@ -59,8 +59,11 @@ static void enqueue(ENTRY * ep) /* add an entry to the in-core list */ { - ENTRY *newp = _nc_copy_entry(ep); + ENTRY *newp; + DEBUG(2, (T_CALLED("enqueue(ep=%p)"), (void *) ep)); + + newp = _nc_copy_entry(ep); if (newp == 0) _nc_err_abort(MSG_NO_MEMORY); @@ -70,6 +73,7 @@ enqueue(ENTRY * ep) newp->next = 0; if (newp->last) newp->last->next = newp; + DEBUG(2, (T_RETURN(""))); } #define NAMEBUFFER_SIZE (MAX_NAME_SIZE + 2) @@ -217,6 +221,12 @@ _nc_read_entry_source(FILE *fp, char *buf, bool oldsuppress = _nc_suppress_warnings; int immediate = 0; + DEBUG(2, + (T_CALLED("_nc_read_entry_source(" + "file=%p, buf=%p, literal=%d, silent=%d, hook=%#" + PRIxPTR ")"), + (void *) fp, buf, literal, silent, CASTxPTR(hook))); + if (silent) _nc_suppress_warnings = TRUE; /* shut the lexer up, too */ @@ -244,29 +254,33 @@ _nc_read_entry_source(FILE *fp, char *buf, FreeIfNeeded(thisentry.tterm.Booleans); FreeIfNeeded(thisentry.tterm.Numbers); FreeIfNeeded(thisentry.tterm.Strings); + FreeIfNeeded(thisentry.tterm.str_table); #if NCURSES_XNAMES FreeIfNeeded(thisentry.tterm.ext_Names); + FreeIfNeeded(thisentry.tterm.ext_str_table); #endif } } if (_nc_tail) { /* set up the head pointer */ - for (_nc_head = _nc_tail; _nc_head->last; _nc_head = _nc_head->last) - continue; + for (_nc_head = _nc_tail; _nc_head->last; _nc_head = _nc_head->last) { + /* EMPTY */ ; + } - DEBUG(1, ("head = %s", _nc_head->tterm.term_names)); - DEBUG(1, ("tail = %s", _nc_tail->tterm.term_names)); + DEBUG(2, ("head = %s", _nc_head->tterm.term_names)); + DEBUG(2, ("tail = %s", _nc_tail->tterm.term_names)); } #ifdef TRACE else if (!immediate) - DEBUG(1, ("no entries parsed")); + DEBUG(2, ("no entries parsed")); #endif _nc_suppress_warnings = oldsuppress; + DEBUG(2, (T_RETURN(""))); } -#if NCURSES_XNAMES +#if 0 && NCURSES_XNAMES static unsigned find_capname(TERMTYPE2 *p, const char *name) { @@ -298,7 +312,9 @@ extended_captype(TERMTYPE2 *p, unsigned which) } else { limit += p->ext_Strings; if (limit != 0 && which < limit) { - result = STRING; + result = ((p->Strings[STRCOUNT + which] != CANCELLED_STRING) + ? STRING + : CANCEL); } else if (which >= limit) { result = CANCEL; } @@ -354,24 +370,19 @@ invalid_merge(TERMTYPE2 *to, TERMTYPE2 *from) && tf <= STRING && (tt == STRING) != (tf == STRING)) { if (from_name != 0 && strcmp(to_name, from_name)) { - DEBUG(2, - ("merge of %s to %s changes type of %s from %s to %s", - from_name, - to_name, - from->ext_Names[n], - name_of_captype(tf), - name_of_captype(tt))); + _nc_warning("merge of %s to %s changes type of %s from %s to %s", + from_name, + to_name, + from->ext_Names[n], + name_of_captype(tf), + name_of_captype(tt)); } else { - DEBUG(2, ("merge of %s changes type of %s from %s to %s", - to_name, - from->ext_Names[n], - name_of_captype(tf), - name_of_captype(tt))); + _nc_warning("merge of %s changes type of %s from %s to %s", + to_name, + from->ext_Names[n], + name_of_captype(tf), + name_of_captype(tt)); } - _nc_warning("merge changes type of %s from %s to %s", - from->ext_Names[n], - name_of_captype(tf), - name_of_captype(tt)); rc = TRUE; } } @@ -393,9 +404,9 @@ _nc_resolve_uses2(bool fullresolve, bool literal) ENTRY *qp, *rp, *lastread = 0; bool keepgoing; unsigned i, j; - int unresolved, total_unresolved, multiples; + int total_unresolved, multiples; - DEBUG(2, ("RESOLUTION BEGINNING")); + DEBUG(2, (T_CALLED("_nc_resolve_uses2"))); /* * Check for multiple occurrences of the same name. @@ -404,7 +415,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal) for_entry_list(qp) { int matchcount = 0; - for_entry_list(rp) { + for_entry_list2(rp, qp->next) { if (qp > rp && check_collisions(qp->tterm.term_names, rp->tterm.term_names, @@ -420,8 +431,10 @@ _nc_resolve_uses2(bool fullresolve, bool literal) } } } - if (multiples > 0) + if (multiples > 0) { + DEBUG(2, (T_RETURN("false"))); return (FALSE); + } DEBUG(2, ("NO MULTIPLE NAME OCCURRENCES")); @@ -431,7 +444,6 @@ _nc_resolve_uses2(bool fullresolve, bool literal) total_unresolved = 0; _nc_curr_col = -1; for_entry_list(qp) { - unresolved = 0; for (i = 0; i < qp->nuses; i++) { bool foundit; char *child = _nc_first_name(qp->tterm.term_names); @@ -449,8 +461,8 @@ _nc_resolve_uses2(bool fullresolve, bool literal) for_entry_list(rp) { if (rp != qp && _nc_name_match(rp->tterm.term_names, lookfor, "|")) { - DEBUG(2, ("%s: resolving use=%s (in core)", - child, lookfor)); + DEBUG(2, ("%s: resolving use=%s %p (in core)", + child, lookfor, lookfor)); qp->uses[i].link = rp; foundit = TRUE; @@ -500,7 +512,6 @@ _nc_resolve_uses2(bool fullresolve, bool literal) /* no good, mark this one unresolvable and complain */ if (!foundit) { - unresolved++; total_unresolved++; _nc_curr_line = (int) lookline; @@ -512,6 +523,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal) if (total_unresolved) { /* free entries read in off disk */ _nc_free_entries(lastread); + DEBUG(2, (T_RETURN("false"))); return (FALSE); } @@ -530,20 +542,22 @@ _nc_resolve_uses2(bool fullresolve, bool literal) for_entry_list(qp) { if (qp->nuses > 0) { - DEBUG(2, ("%s: attempting merge", - _nc_first_name(qp->tterm.term_names))); + DEBUG(2, ("%s: attempting merge of %d entries", + _nc_first_name(qp->tterm.term_names), + qp->nuses)); /* * If any of the use entries we're looking for is * incomplete, punt. We'll catch this entry on a * subsequent pass. */ - for (i = 0; i < qp->nuses; i++) + for (i = 0; i < qp->nuses; i++) { if (qp->uses[i].link && qp->uses[i].link->nuses) { DEBUG(2, ("%s: use entry %d unresolved", _nc_first_name(qp->tterm.term_names), i)); goto incomplete; } + } /* * First, make sure there is no garbage in the @@ -558,10 +572,10 @@ _nc_resolve_uses2(bool fullresolve, bool literal) * (reverse) order. */ for (; qp->nuses; qp->nuses--) { - validate_merge(&merged, - qp->uses[qp->nuses - 1].link); - _nc_merge_entry(&merged, - qp->uses[qp->nuses - 1].link); + int n = (int) (qp->nuses - 1); + validate_merge(&merged, qp->uses[n].link); + _nc_merge_entry(&merged, qp->uses[n].link); + free(qp->uses[n].name); } /* @@ -576,8 +590,10 @@ _nc_resolve_uses2(bool fullresolve, bool literal) FreeIfNeeded(qp->tterm.Booleans); FreeIfNeeded(qp->tterm.Numbers); FreeIfNeeded(qp->tterm.Strings); + FreeIfNeeded(qp->tterm.str_table); #if NCURSES_XNAMES FreeIfNeeded(qp->tterm.ext_Names); + FreeIfNeeded(qp->tterm.ext_str_table); #endif qp->tterm = merged.tterm; _nc_wrap_entry(qp, TRUE); @@ -597,13 +613,6 @@ _nc_resolve_uses2(bool fullresolve, bool literal) DEBUG(2, ("MERGES COMPLETED OK")); } - /* - * We'd like to free entries read in off disk at this point, but can't. - * The merge_entry() code doesn't copy the strings in the use entries, - * it just aliases them. If this ever changes, do a - * free_entries(lastread) here. - */ - DEBUG(2, ("RESOLUTION FINISHED")); if (fullresolve) { @@ -634,6 +643,14 @@ _nc_resolve_uses2(bool fullresolve, bool literal) _nc_check_termtype2(&qp->tterm, literal); + /* + * Checking calls tparm, which can allocate memory. Fix leaks. + */ +#define TPS(name) fake_tm.tparm_state.name + FreeAndNull(TPS(out_buff)); + FreeAndNull(TPS(fmt_buff)); +#undef TPS + _nc_set_screen(save_SP); set_curterm(save_tm); } else { @@ -643,6 +660,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal) DEBUG(2, ("SANITY CHECK FINISHED")); } + DEBUG(2, (T_RETURN("true"))); return (TRUE); } @@ -729,7 +747,7 @@ sanity_check2(TERMTYPE2 *tp, bool literal) NCURSES_EXPORT(void) _nc_leaks_tic(void) { - T((T_CALLED("_nc_free_tic()"))); + T((T_CALLED("_nc_leaks_tic()"))); _nc_globals.leak_checking = TRUE; _nc_alloc_entry_leaks(); _nc_captoinfo_leaks(); @@ -739,11 +757,13 @@ _nc_leaks_tic(void) _nc_codes_leaks(); #endif _nc_tic_expand(0, FALSE, 0); + T((T_RETURN(""))); } NCURSES_EXPORT(void) _nc_free_tic(int code) { + T((T_CALLED("_nc_free_tic(%d)"), code)); _nc_leaks_tic(); exit_terminfo(code); } diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 08e0e7e6..3ba0835e 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * +,* Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -51,7 +51,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.112 2021/10/04 23:56:28 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.122 2023/05/27 20:13:10 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -112,6 +112,9 @@ static FILE *yyin; /* scanner's input file descriptor */ NCURSES_EXPORT(void) _nc_reset_input(FILE *fp, char *buf) { + TR(TRACE_DATABASE, + (T_CALLED("_nc_reset_input(fp=%p, buf=%p)"), (void *) fp, buf)); + pushtype = NO_PUSHBACK; if (pushname != 0) pushname[0] = '\0'; @@ -121,6 +124,8 @@ _nc_reset_input(FILE *fp, char *buf) if (fp != 0) _nc_curr_line = 0; _nc_curr_col = 0; + + returnVoidDB; } /* @@ -144,6 +149,32 @@ last_char(int from_end) return result; } +/* + * Read, like fgets(), but error-out if the input contains nulls. + */ +static int +get_text(char *buffer, int length) +{ + int count = 0; + int limit = length - 1; + + while (limit-- > 0) { + int ch = fgetc(yyin); + + if (ch == '\0') { + _nc_err_abort("This is not a text-file"); + } else if (ch == EOF) { + break; + } + ++count; + *buffer++ = (char) ch; + if (ch == '\n') + break; + } + *buffer = '\0'; + return count; +} + /* * int next_char() * @@ -209,7 +240,7 @@ next_char(void) if (used == 0) _nc_curr_file_pos = ftell(yyin); - if (fgets(result + used, (int) (allocated - used), yyin) != 0) { + if (get_text(result + used, (int) (allocated - used))) { bufstart = result; if (used == 0) { if (_nc_curr_line == 0 @@ -271,7 +302,7 @@ push_back(int c) /* push a character back onto the input stream */ { if (bufptr == bufstart) - _nc_syserr_abort("Can't backspace off beginning of line"); + _nc_syserr_abort("cannot backspace off beginning of line"); *--bufptr = (char) c; _nc_curr_col--; } @@ -280,14 +311,16 @@ static long stream_pos(void) /* return our current character position in the input stream */ { - return (yyin ? ftell(yyin) : (bufptr ? bufptr - bufstart : 0)); + return (yyin ? ftell(yyin) : (bufptr ? (long) (bufptr - bufstart) : 0)); } static bool end_of_stream(void) /* are we at end of input? */ { - return ((yyin ? feof(yyin) : (bufptr && *bufptr == '\0')) + return ((yyin + ? (feof(yyin) && (bufptr == NULL || *bufptr == '\0')) + : (bufptr && *bufptr == '\0')) ? TRUE : FALSE); } @@ -295,9 +328,11 @@ end_of_stream(void) static NCURSES_INLINE int eat_escaped_newline(int ch) { - if (ch == '\\') - while ((ch = next_char()) == '\n' || iswhite(ch)) - continue; + if (ch == '\\') { + while ((ch = next_char()) == '\n' || iswhite(ch)) { + /* EMPTY */ ; + } + } return ch; } @@ -367,6 +402,8 @@ _nc_get_token(bool silent) int old_col; #endif + DEBUG(3, (T_CALLED("_nc_get_token(silent=%d)"), silent)); + if (pushtype != NO_PUSHBACK) { int retval = pushtype; @@ -379,6 +416,7 @@ _nc_get_token(bool silent) pushname[0] = '\0'; /* currtok wasn't altered by _nc_push_token() */ + DEBUG(3, (T_RETURN("%d"), retval)); return (retval); } @@ -389,6 +427,7 @@ _nc_get_token(bool silent) if (_nc_curr_token.tk_name == tok_buf) _nc_curr_token.tk_name = 0; } + DEBUG(3, (T_RETURN("%d"), EOF)); return (EOF); } @@ -397,7 +436,6 @@ _nc_get_token(bool silent) while ((ch = next_char()) == '\n' || iswhite(ch)) { if (ch == '\n') had_newline = TRUE; - continue; } ch = eat_escaped_newline(ch); @@ -422,8 +460,9 @@ _nc_get_token(bool silent) dot_flag = TRUE; DEBUG(8, ("dot-flag set")); - while ((ch = next_char()) == '.' || iswhite(ch)) - continue; + while ((ch = next_char()) == '.' || iswhite(ch)) { + /* EMPTY */ ; + } } if (ch == EOF) { @@ -564,8 +603,9 @@ _nc_get_token(bool silent) /* throw away trailing /, *$/ */ for (--tok_ptr; iswhite(*tok_ptr) || *tok_ptr == ','; - tok_ptr--) - continue; + tok_ptr--) { + /* EMPTY */ ; + } tok_ptr[1] = '\0'; } @@ -595,7 +635,7 @@ _nc_get_token(bool silent) } } else { after_list = tok_buf + strlen(tok_buf); - DEBUG(1, ("missing description")); + DEBUG(2, ("missing description")); } /* @@ -770,6 +810,7 @@ _nc_get_token(bool silent) : ""), type)); + DEBUG(3, (T_RETURN("%d"), type)); return (type); } @@ -793,7 +834,7 @@ _nc_get_token(bool silent) */ NCURSES_EXPORT(int) -_nc_trans_string(char *ptr, char *last) +_nc_trans_string(char *ptr, const char *const last) { int count = 0; int number = 0; diff --git a/ncurses/tinfo/db_iterator.c b/ncurses/tinfo/db_iterator.c index f0726682..db3872e3 100644 --- a/ncurses/tinfo/db_iterator.c +++ b/ncurses/tinfo/db_iterator.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2006-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -44,7 +44,7 @@ #include #endif -MODULE_ID("$Id: db_iterator.c,v 1.48 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: db_iterator.c,v 1.50 2023/06/24 21:52:32 tom Exp $") #define HaveTicDirectory _nc_globals.have_tic_directory #define KeepTicDirectory _nc_globals.keep_tic_directory @@ -202,6 +202,13 @@ free_cache(void) FreeAndNull(my_list); } +static void +update_tic_dir(const char *update) +{ + free((char *) TicDirectory); + TicDirectory = update; +} + /* * Record the "official" location of the terminfo directory, according to * the place where we're writing to, or the normal default, if not. @@ -211,8 +218,9 @@ _nc_tic_dir(const char *path) { T(("_nc_tic_dir %s", NonNull(path))); if (!KeepTicDirectory) { - if (path != 0) { - TicDirectory = path; + if (path != NULL) { + if (path != TicDirectory) + update_tic_dir(strdup(path)); HaveTicDirectory = TRUE; } else if (HaveTicDirectory == 0) { if (use_terminfo_vars()) { @@ -375,8 +383,11 @@ _nc_first_db(DBDIRS * state, int *offset) */ for (j = 0; my_list[j] != 0; ++j) { #ifdef TERMINFO - if (*my_list[j] == '\0') - my_list[j] = strdup(TERMINFO); + if (*my_list[j] == '\0') { + char *my_copy = strdup(TERMINFO); + if (my_copy != 0) + my_list[j] = my_copy; + } #endif trim_formatting(my_list[j]); for (k = 0; k < j; ++k) { @@ -444,5 +455,6 @@ _nc_db_iterator_leaks(void) FreeIfNeeded(my_vars[which].value); my_vars[which].value = 0; } + update_tic_dir(NULL); } #endif diff --git a/ncurses/tinfo/entries.c b/ncurses/tinfo/entries.c index c928f7ec..f47fd3fe 100644 --- a/ncurses/tinfo/entries.c +++ b/ncurses/tinfo/entries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2006-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include -MODULE_ID("$Id: entries.c,v 1.32 2021/11/20 23:40:57 tom Exp $") +MODULE_ID("$Id: entries.c,v 1.35 2023/05/27 20:13:10 tom Exp $") /**************************************************************************** * @@ -65,7 +65,7 @@ NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0; NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0; static ENTRY * -_nc_delink_entry(ENTRY * headp, TERMTYPE2 *tterm) +_nc_delink_entry(ENTRY * headp, const TERMTYPE2 *const tterm) /* delink the allocated storage for the given list entry */ { ENTRY *ep, *last; @@ -119,12 +119,28 @@ _nc_leaks_tinfo(void) char *s; #endif - T((T_CALLED("_nc_free_tinfo()"))); + T((T_CALLED("_nc_leaks_tinfo()"))); #if NO_LEAKS _nc_globals.leak_checking = TRUE; _nc_free_tparm(cur_term); _nc_tgetent_leaks(); +#ifdef USE_PTHREADS + /* + * Discard any prescreen data which is not used for the current screen. + */ + _nc_lock_global(screen); + { + PRESCREEN_LIST *p; + pthread_t id = GetThreadID(); + for (p = _nc_prescreen.allocated; p != 0; p = p->next) { + if (p->id == id && p->sp != CURRENT_SCREEN) { + FreeAndNull(p->sp); + } + } + } + _nc_unlock_global(screen); +#endif if (TerminalOf(CURRENT_SCREEN) != 0) { del_curterm(TerminalOf(CURRENT_SCREEN)); } @@ -161,6 +177,7 @@ _nc_leaks_tinfo(void) NCURSES_EXPORT(void) _nc_free_tinfo(int code) { + T((T_CALLED("_nc_free_tinfo(%d)"), code)); _nc_leaks_tinfo(); exit(code); } @@ -169,6 +186,7 @@ _nc_free_tinfo(int code) NCURSES_EXPORT(void) exit_terminfo(int code) { + T((T_CALLED("exit_terminfo(%d)"), code)); #if NO_LEAKS _nc_leaks_tinfo(); #endif diff --git a/ncurses/tinfo/free_ttype.c b/ncurses/tinfo/free_ttype.c index 7f0fbcc3..7935152a 100644 --- a/ncurses/tinfo/free_ttype.c +++ b/ncurses/tinfo/free_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 1999-2011,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,12 +43,12 @@ #include -MODULE_ID("$Id: free_ttype.c,v 1.19 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: free_ttype.c,v 1.22 2023/04/22 15:12:57 tom Exp $") static void really_free_termtype(TERMTYPE2 *ptr, bool freeStrings) { - T(("_nc_free_termtype(%s)", ptr->term_names)); + T(("really_free_termtype(%s) %d", ptr->term_names, freeStrings)); if (freeStrings) { FreeIfNeeded(ptr->str_table); @@ -66,15 +66,21 @@ really_free_termtype(TERMTYPE2 *ptr, bool freeStrings) _nc_free_entry(_nc_head, ptr); } -/* - * This entrypoint is used by tack 1.07 - */ NCURSES_EXPORT(void) _nc_free_termtype(TERMTYPE *ptr) { really_free_termtype((TERMTYPE2 *) ptr, !NCURSES_EXT_NUMBERS); } +/* + * These similar entrypoints are not used outside of ncurses. + */ +NCURSES_EXPORT(void) +_nc_free_termtype1(TERMTYPE *ptr) +{ + really_free_termtype((TERMTYPE2 *) ptr, TRUE); +} + #if NCURSES_EXT_NUMBERS NCURSES_EXPORT(void) _nc_free_termtype2(TERMTYPE2 *ptr) diff --git a/ncurses/tinfo/init_keytry.c b/ncurses/tinfo/init_keytry.c index 1669c641..ef20dfb1 100644 --- a/ncurses/tinfo/init_keytry.c +++ b/ncurses/tinfo/init_keytry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1999-2010,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ #include #include /* struct tinfo_fkeys */ -MODULE_ID("$Id: init_keytry.c,v 1.19 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: init_keytry.c,v 1.20 2023/09/16 12:55:01 tom Exp $") /* ** _nc_init_keytry() @@ -67,6 +67,8 @@ _nc_tinfo_fkeysf(void) NCURSES_EXPORT(void) _nc_init_keytry(SCREEN *sp) { + T(("_nc_init_keytry(%p)", (void *) sp)); + /* The sp->_keytry value is initialized in newterm(), where the sp * structure is created, because we can not tell where keypad() or * mouse_activate() (which will call keyok()) are first called. @@ -95,7 +97,7 @@ _nc_init_keytry(SCREEN *sp) char *value = tp->Strings[n]; if (name != 0 && *name == 'k' - && value != 0 + && VALID_STRING(value) && NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx value) == 0) { (void) _nc_add_to_try(&(sp->_keytry), diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c index 6ef62cb2..1f8db2c1 100644 --- a/ncurses/tinfo/lib_cur_term.c +++ b/ncurses/tinfo/lib_cur_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * +,* Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -41,7 +41,7 @@ #include /* ospeed */ #include /* VALID_STRING */ -MODULE_ID("$Id: lib_cur_term.c,v 1.45 2021/11/20 23:19:41 tom Exp $") +MODULE_ID("$Id: lib_cur_term.c,v 1.49 2022/05/28 17:56:55 tom Exp $") #undef CUR #define CUR TerminalType(termp). @@ -147,7 +147,11 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL *termp) ); #if NCURSES_EXT_NUMBERS - _nc_free_termtype(&termp->type); +#if NCURSES_EXT_COLORS + _nc_free_termtype1(&termp->type); +#else + _nc_free_termtype2(&termp->type); +#endif #endif _nc_free_termtype2(&TerminalType(termp)); if (termp == cur) diff --git a/ncurses/tinfo/lib_data.c b/ncurses/tinfo/lib_data.c index baaa67be..b817f49b 100644 --- a/ncurses/tinfo/lib_data.c +++ b/ncurses/tinfo/lib_data.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_data.c,v 1.86 2021/11/20 23:14:34 tom Exp $") +MODULE_ID("$Id: lib_data.c,v 1.89 2024/02/24 18:11:38 tom Exp $") /* * OS/2's native linker complains if we don't initialize public data when @@ -196,7 +196,6 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = { #endif #ifdef TRACE FALSE, /* trace_opened */ - CHARS_0s, /* trace_fname */ 0, /* trace_level */ NULL, /* trace_fp */ -1, /* trace_fd */ @@ -363,25 +362,28 @@ _nc_mutex_init(pthread_mutex_t * obj) NCURSES_EXPORT(int) _nc_mutex_lock(pthread_mutex_t * obj) { - if (_nc_use_pthreads == 0) - return 0; - return pthread_mutex_lock(obj); + int rc = 0; + if (_nc_use_pthreads != 0) + rc = pthread_mutex_lock(obj); + return rc; } NCURSES_EXPORT(int) _nc_mutex_trylock(pthread_mutex_t * obj) { - if (_nc_use_pthreads == 0) - return 0; - return pthread_mutex_trylock(obj); + int rc = 0; + if (_nc_use_pthreads != 0) + rc = pthread_mutex_trylock(obj); + return rc; } NCURSES_EXPORT(int) _nc_mutex_unlock(pthread_mutex_t * obj) { - if (_nc_use_pthreads == 0) - return 0; - return pthread_mutex_unlock(obj); + int rc = 0; + if (_nc_use_pthreads != 0) + rc = pthread_mutex_unlock(obj); + return rc; } #endif /* USE_PTHREADS */ diff --git a/ncurses/tinfo/lib_kernel.c b/ncurses/tinfo/lib_kernel.c index d5b021b8..46f652b0 100644 --- a/ncurses/tinfo/lib_kernel.c +++ b/ncurses/tinfo/lib_kernel.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #include -MODULE_ID("$Id: lib_kernel.c,v 1.34 2020/11/21 22:05:58 tom Exp $") +MODULE_ID("$Id: lib_kernel.c,v 1.36 2023/06/10 13:29:06 tom Exp $") #ifdef TERMIOS static int @@ -59,7 +59,7 @@ _nc_vdisable(void) #if defined(_POSIX_VDISABLE) && HAVE_UNISTD_H value = _POSIX_VDISABLE; #endif -#if defined(_PC_VDISABLE) +#if defined(_PC_VDISABLE) && HAVE_FPATHCONF if (value == -1) { value = (int) fpathconf(0, _PC_VDISABLE); if (value == -1) { @@ -148,34 +148,40 @@ killchar(void) } #endif +static void +flush_input(int fd) +{ +#ifdef TERMIOS + tcflush(fd, TCIFLUSH); +#else /* !TERMIOS */ + errno = 0; + do { +#if defined(EXP_WIN32_DRIVER) + _nc_console_flush(_nc_console_fd2handle(fd)); +#else + ioctl(fd, TIOCFLUSH, 0); +#endif + } while + (errno == EINTR); +#endif +} + /* * flushinp() * - * Flush any input on cur_term->Filedes - * + * Flush any input on tty */ NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (NCURSES_SP_DCL0) { - TERMINAL *termp = TerminalOf(SP_PARM); - T((T_CALLED("flushinp(%p)"), (void *) SP_PARM)); - if (termp != 0) { -#ifdef TERMIOS - tcflush(termp->Filedes, TCIFLUSH); -#else - errno = 0; - do { -#if defined(EXP_WIN32_DRIVER) - _nc_console_flush(_nc_console_fd2handle(termp->Filedes)); -#else - ioctl(termp->Filedes, TIOCFLUSH, 0); -#endif - } while - (errno == EINTR); -#endif + if (SP_PARM != 0) { + if (NC_ISATTY(SP_PARM->_ifd)) + flush_input(SP_PARM->_ifd); + else if (NC_ISATTY(SP_PARM->_ofd)) + flush_input(SP_PARM->_ofd); if (SP_PARM) { SP_PARM->_fifohead = -1; SP_PARM->_fifotail = 0; diff --git a/ncurses/tinfo/lib_napms.c b/ncurses/tinfo/lib_napms.c index 3a9fc316..1b89a54c 100644 --- a/ncurses/tinfo/lib_napms.c +++ b/ncurses/tinfo/lib_napms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -52,13 +52,16 @@ #endif #endif -MODULE_ID("$Id: lib_napms.c,v 1.27 2020/08/15 19:45:23 tom Exp $") +MODULE_ID("$Id: lib_napms.c,v 1.28 2023/09/16 16:09:33 tom Exp $") NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms) { T((T_CALLED("napms(%d)"), ms)); + if (ms > MAX_DELAY_MSECS) + ms = MAX_DELAY_MSECS; + #ifdef USE_TERM_DRIVER CallDriver_1(SP_PARM, td_nap, ms); #else /* !USE_TERM_DRIVER */ diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index 017a34aa..6a8bb394 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -47,7 +47,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_options.c,v 1.82 2021/02/14 00:17:35 tom Exp $") +MODULE_ID("$Id: lib_options.c,v 1.83 2023/04/29 18:56:12 tom Exp $") NCURSES_EXPORT(int) idlok(WINDOW *win, bool flag) @@ -92,7 +92,7 @@ NCURSES_SP_NAME(halfdelay) (NCURSES_SP_DCLx int t) returnCode(ERR); NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG); - SP_PARM->_cbreak = t + 1; + IsCbreak(SP_PARM) = t + 1; returnCode(OK); } diff --git a/ncurses/tinfo/lib_print.c b/ncurses/tinfo/lib_print.c index aa65041c..e7d8535e 100644 --- a/ncurses/tinfo/lib_print.c +++ b/ncurses/tinfo/lib_print.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 1998-2011,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_print.c,v 1.30 2021/04/18 14:58:57 tom Exp $") +MODULE_ID("$Id: lib_print.c,v 1.31 2023/06/10 12:44:41 tom Exp $") NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len) @@ -90,7 +90,7 @@ NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len) * data has actually been shipped to the terminal. If the write(2) * operation is truly atomic we're protected from this. */ - result = (int) write(TerminalOf(SP_PARM)->Filedes, mybuf, need); + result = (int) write(SP_PARM->_ofd, mybuf, need); /* * By giving up our scheduler slot here we increase the odds that the diff --git a/ncurses/tinfo/lib_raw.c b/ncurses/tinfo/lib_raw.c index 1e47f3b6..fda6dead 100644 --- a/ncurses/tinfo/lib_raw.c +++ b/ncurses/tinfo/lib_raw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -50,7 +50,7 @@ #include -MODULE_ID("$Id: lib_raw.c,v 1.26 2020/11/21 22:07:48 tom Exp $") +MODULE_ID("$Id: lib_raw.c,v 1.30 2024/03/30 15:54:17 tom Exp $") #if HAVE_SYS_TERMIO_H #include /* needed for ISC */ @@ -116,8 +116,8 @@ NCURSES_SP_NAME(raw) (NCURSES_SP_DCL0) KbdSetStatus(&kbdinfo, 0); #endif if (SP_PARM) { - SP_PARM->_raw = TRUE; - SP_PARM->_cbreak = 1; + IsRaw(SP_PARM) = TRUE; + IsCbreak(SP_PARM) = 1; } termp->Nttyb = buf; } @@ -151,7 +151,6 @@ NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0) #ifdef TERMIOS buf.c_lflag &= (unsigned) ~ICANON; buf.c_iflag &= (unsigned) ~ICRNL; - buf.c_lflag |= ISIG; buf.c_cc[VMIN] = 1; buf.c_cc[VTIME] = 0; #elif defined(EXP_WIN32_DRIVER) @@ -163,7 +162,7 @@ NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0) result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); if (result == OK) { if (SP_PARM) { - SP_PARM->_cbreak = 1; + IsCbreak(SP_PARM) = 1; } termp->Nttyb = buf; } @@ -255,8 +254,8 @@ NCURSES_SP_NAME(noraw) (NCURSES_SP_DCL0) KbdSetStatus(&kbdinfo, 0); #endif if (SP_PARM) { - SP_PARM->_raw = FALSE; - SP_PARM->_cbreak = 0; + IsRaw(SP_PARM) = FALSE; + IsCbreak(SP_PARM) = 0; } termp->Nttyb = buf; } @@ -298,7 +297,7 @@ NCURSES_SP_NAME(nocbreak) (NCURSES_SP_DCL0) result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); if (result == OK) { if (SP_PARM) { - SP_PARM->_cbreak = 0; + IsCbreak(SP_PARM) = 0; } termp->Nttyb = buf; } @@ -395,3 +394,46 @@ intrflush(WINDOW *win GCC_UNUSED, bool flag) return NCURSES_SP_NAME(intrflush) (CURRENT_SCREEN, win, flag); } #endif + +#if NCURSES_EXT_FUNCS +/* *INDENT-OFF* */ + +/* + * SCREEN is always opaque, but nl/raw/cbreak/echo set properties in it. + * As an extension, provide a way to query the properties. + * + * There are other properties which could be queried, e.g., filter, keypad, + * use_env, use_meta, but these particular properties are saved/restored within + * the wgetnstr() and wgetn_wstr() functions, which requires that the higher + * level curses library knows about the internal state of the lower level + * terminfo library. + */ + +#define is_TEST(show,what) \ + NCURSES_EXPORT(int) \ + NCURSES_SP_NAME(show) (NCURSES_SP_DCL0) \ + { \ + return ((SP_PARM != NULL) ? (what(SP_PARM) ? 1 : 0) : -1); \ + } + +is_TEST(is_nl, IsNl) +is_TEST(is_raw, IsRaw) +is_TEST(is_cbreak, IsCbreak) +is_TEST(is_echo, IsEcho) + +#if NCURSES_SP_FUNCS +#undef is_TEST +#define is_TEST(show) \ + NCURSES_EXPORT(int) \ + show(void) \ + { \ + return NCURSES_SP_NAME(show) (CURRENT_SCREEN); \ + } +is_TEST(is_nl) +is_TEST(is_raw) +is_TEST(is_cbreak) +is_TEST(is_echo) +#endif + +/* *INDENT-ON* */ +#endif /* extensions */ diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 434d5633..99097f00 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #include #endif -MODULE_ID("$Id: lib_setup.c,v 1.215 2021/11/20 23:11:31 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.240 2024/04/20 17:04:05 tom Exp $") /**************************************************************************** * @@ -272,6 +272,191 @@ use_tioctl(bool f) } #endif +#if !(defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER)) +static void +_nc_default_screensize(TERMINAL *termp, int *linep, int *colp) +{ + /* if we can't get dynamic info about the size, use static */ + if (*linep <= 0) { + *linep = (int) lines; + } + if (*colp <= 0) { + *colp = (int) columns; + } + + /* the ultimate fallback, assume fixed 24x80 size */ + if (*linep <= 0) { + *linep = 24; + } + if (*colp <= 0) { + *colp = 80; + } +} + +#if defined(USE_CHECK_SIZE) && defined(user6) && defined(user7) +static const char * +skip_csi(const char *value) +{ + if (UChar(*value) == CSI_CHR) { + ++value; + } else if (*value == ESC_CHR && value[1] == L_BLOCK) { + value += 2; + } + return value; +} + +static bool +is_expected(const char *value, const char *expected) +{ + bool result = FALSE; + if (VALID_STRING(value)) { + const char *skipped = skip_csi(value); + if (skipped != value) { + if (!strcmp(skipped, expected)) + result = TRUE; + } + } + return result; +} + +static bool +get_position(TERMINAL *termp, int fd, int *row, int *col) +{ + bool result = FALSE; + size_t need = strlen(user7); + int have; + + have = (int) write(fd, user7, need); + + if (have == (int) need) { + int y, x; + char buf[20]; + char *s; + char cc; + const char *skipped; + int scanned; + + s = memset(buf, '\0', sizeof(buf)); + do { + size_t ask = (sizeof(buf) - 1 - (size_t) (s - buf)); + int got = (int) read(fd, s, ask); + if (got == 0) + break; + s += got; + *s = '\0'; + } while (strchr(buf, 'R') == NULL && (size_t) (s + 1 - buf) < sizeof(buf)); + T(("CPR response %s", _nc_visbuf(buf))); + skipped = skip_csi(buf); + cc = '\0'; + if (skipped != buf + && *skipped != '\0' + && (scanned = sscanf(skip_csi(buf), "%d;%d%c", &y, &x, &cc)) == 3 + && (cc == 'R')) { + *row = y; + *col = x; + result = TRUE; + } + } + T(("get_position %s %d,%d", result ? "OK" : "ERR", *row, *col)); + return result; +} + +static bool +set_position(NCURSES_SP_DCLx TERMINAL *termp, int row, int col) +{ + bool result; + char *actual = TIPARM_2(cursor_address, row, col); + T((T_CALLED("set_position %d,%d)"), row, col)); +#if NCURSES_SP_FUNCS + result = (NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "set_position", + actual) == OK); + NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG); +#else + /* This does not support padding because without sp-funcs, we have only + * the interface using stdio, but we are not guaranteed that Filedes + * is the same as fileno(stdout). + */ + result = FALSE; + if (actual != NULL) { + size_t want = strlen(actual); + int have = (int) write(termp->Filedes, actual, want); + result = ((int) want == have); + } +#endif + returnBool(result); +} + +/* + * This is a little more complicated than one might expect, because we do this + * before setting up the terminal modes, etc., and cannot use the timeout or + * buffering functions. + * + * We check if the terminal description has the ECMA-48 CPR (cursor position + * report) in u7 and the response in u6. The two variations of is_expected() + * cover the termcap style and terminfo style, and are equivalent as far as we + * are concerned. For analyzing the response, we wait (a short time) for 'R' + * to be echoed, and then check if we received two integers in the response. + * + * In principle, this could run on "any" ECMA-48 terminal, but in practice, + * there is a scenario using GNU screen where it uses ncurses with a partially + * configured pseudo-terminal, and the CPR response goes to the wrong place. + * So we do a simple check to exclude pseudo-terminals. + */ +static void +_nc_check_screensize(SCREEN *sp, TERMINAL *termp, int *linep, int *colp) +{ + int fd = termp->Filedes; + TTY saved; + const char *name = NULL; + + if (IsRealTty(fd, name) + && VALID_STRING(cursor_address) + && is_expected(user7, "6n") + && (is_expected(user6, "%i%d;%dR") || + is_expected(user6, "%i%p1%d;%p2%dR")) + && GET_TTY(fd, &saved) == OK) { + int current_y = -1, current_x = -1; + int updated_y = -1, updated_x = -1; + TTY alter = saved; + +#if NCURSES_SP_FUNCS + if (sp == NULL) { + sp = new_prescr(); + sp->_term = termp; + NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); + } +#else + (void) sp; +#endif + + T(("trying CPR (u7/u6) with %s", name)); + alter.c_lflag &= (unsigned) ~(ECHO | ICANON | ISIG | IEXTEN); + alter.c_iflag &= (unsigned) ~(IXON | BRKINT | PARMRK); + alter.c_cc[VMIN] = 0; + alter.c_cc[VTIME] = 1; + SET_TTY(fd, &alter); + + if (get_position(termp, fd, ¤t_y, ¤t_x) + && set_position(NCURSES_SP_ARGx termp, 9999, 9999) + && get_position(termp, fd, &updated_y, &updated_x)) { + *linep = updated_y; + *colp = updated_x; + set_position(NCURSES_SP_ARGx termp, current_y, current_x); + } + /* restore tty modes */ + SET_TTY(fd, &saved); + } else { + T(("NOT trying CPR with fd %d (%s): %s", + fd, NonNull(name), NC_ISATTY(fd) ? "tty" : "not a tty")); + } + + _nc_default_screensize(termp, linep, colp); +} +#else /* !USE_CHECK_SIZE */ +#define _nc_check_screensize(sp, termp, linep, colp) /* nothing */ +#endif +#endif /* !(defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER)) */ + NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *sp, #ifdef USE_TERM_DRIVER @@ -305,6 +490,7 @@ _nc_get_screensize(SCREEN *sp, bool useEnv = _nc_prescreen.use_env; bool useTioctl = _nc_prescreen.use_tioctl; + T((T_CALLED("_nc_get_screensize (%p)"), (void *) sp)); #ifdef EXP_WIN32_DRIVER /* If we are here, then Windows console is used in terminfo mode. We need to figure out the size using the console API @@ -326,6 +512,7 @@ _nc_get_screensize(SCREEN *sp, } #endif + T(("useEnv:%d useTioctl:%d", useEnv, useTioctl)); if (useEnv || useTioctl) { #ifdef __EMX__ { @@ -389,22 +576,10 @@ _nc_get_screensize(SCREEN *sp, *colp = value; T(("screen size: environment COLUMNS = %d", *colp)); } - } - /* if we can't get dynamic info about the size, use static */ - if (*linep <= 0) { - *linep = (int) lines; - } - if (*colp <= 0) { - *colp = (int) columns; - } - - /* the ultimate fallback, assume fixed 24x80 size */ - if (*linep <= 0) { - *linep = 24; - } - if (*colp <= 0) { - *colp = 80; + _nc_default_screensize(termp, linep, colp); + } else { + _nc_check_screensize(sp, termp, linep, colp); } /* @@ -419,6 +594,8 @@ _nc_get_screensize(SCREEN *sp, OldNumber(termp, lines) = (short) (*linep); OldNumber(termp, columns) = (short) (*colp); #endif + } else { + _nc_check_screensize(sp, termp, linep, colp); } T(("screen size is %dx%d", *linep, *colp)); @@ -435,6 +612,7 @@ _nc_get_screensize(SCREEN *sp, TABSIZE = my_tabsize; #endif T(("TABSIZE = %d", TABSIZE)); + returnVoid; #endif /* USE_TERM_DRIVER */ } @@ -503,6 +681,7 @@ _nc_setup_tinfo(const char *const tn, TERMTYPE2 *const tp) */ if (status == TGETENT_YES) { unsigned n; + T(("_nc_setup_tinfo - resetting invalid booleans/strings")); for_each_boolean(n, tp) { if (!VALID_BOOLEAN(tp->Booleans[n])) tp->Booleans[n] = FALSE; @@ -517,9 +696,9 @@ _nc_setup_tinfo(const char *const tn, TERMTYPE2 *const tp) #endif /* -** Take the real command character out of the CC environment variable -** and substitute it in for the prototype given in 'command_character'. -*/ + * Take the real command character out of the CC environment variable + * and substitute it in for the prototype given in 'command_character'. + */ void _nc_tinfo_cmdch(TERMINAL *termp, int proto) { @@ -535,9 +714,12 @@ _nc_tinfo_cmdch(TERMINAL *termp, int proto) char CC = *tmp; for_each_string(i, &(termp->type)) { - for (tmp = termp->type.Strings[i]; tmp && *tmp; tmp++) { - if (UChar(*tmp) == proto) - *tmp = CC; + tmp = termp->type.Strings[i]; + if (VALID_STRING(tmp)) { + for (; *tmp; ++tmp) { + if (UChar(*tmp) == proto) + *tmp = CC; + } } } } @@ -573,22 +755,27 @@ _nc_get_locale(void) NCURSES_EXPORT(int) _nc_unicode_locale(void) { - int result = 0; + static bool initialized = FALSE; + static int result = 0; + + if (!initialized) { #if defined(_NC_WINDOWS) && USE_WIDEC_SUPPORT - result = 1; + result = 1; #elif HAVE_LANGINFO_CODESET - char *env = nl_langinfo(CODESET); - result = !strcmp(env, "UTF-8"); - T(("_nc_unicode_locale(%s) ->%d", env, result)); + char *env = nl_langinfo(CODESET); + result = !strcmp(env, "UTF-8"); + T(("_nc_unicode_locale(%s) ->%d", env, result)); #else - char *env = _nc_get_locale(); - if (env != 0) { - if (strstr(env, ".UTF-8") != 0) { - result = 1; - T(("_nc_unicode_locale(%s) ->%d", env, result)); + char *env = _nc_get_locale(); + if (env != 0) { + if (strstr(env, ".UTF-8") != 0) { + result = 1; + T(("_nc_unicode_locale(%s) ->%d", env, result)); + } } - } #endif + initialized = TRUE; + } return result; } @@ -679,10 +866,9 @@ TINFO_SETUP_TERM(TERMINAL **tp, #endif } myname = strdup(tname); - - if (strlen(myname) > MAX_NAME_SIZE) { + if (myname == NULL || strlen(myname) > MAX_NAME_SIZE) { ret_error(TGETENT_ERR, - "TERM environment must be <= %d characters.\n", + "TERM environment must be 1..%d characters.\n", MAX_NAME_SIZE, free(myname)); } @@ -764,10 +950,14 @@ TINFO_SETUP_TERM(TERMINAL **tp, #ifdef USE_TERM_DRIVER INIT_TERM_DRIVER(); + /* + * _nc_get_driver() will call td_CanHandle() for each driver, and win_driver + * needs file descriptor to do the test, so set it before calling. + */ + termp->Filedes = (short) Filedes; TCB = (TERMINAL_CONTROL_BLOCK *) termp; code = _nc_globals.term_driver(TCB, myname, errret); if (code == OK) { - termp->Filedes = (short) Filedes; termp->_termname = strdup(myname); } else { ret_error1(errret ? *errret : TGETENT_ERR, @@ -819,7 +1009,7 @@ TINFO_SETUP_TERM(TERMINAL **tp, set_curterm(termp); - if (command_character) + if (VALID_STRING(command_character)) _nc_tinfo_cmdch(termp, UChar(*command_character)); /* @@ -831,7 +1021,7 @@ TINFO_SETUP_TERM(TERMINAL **tp, if (NC_ISATTY(Filedes)) { NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG); NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG); - baudrate(); + NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); } code = OK; #endif @@ -908,6 +1098,7 @@ _nc_forget_prescr(void) { PRESCREEN_LIST *p, *q; pthread_t id = GetThreadID(); + _nc_lock_global(screen); for (p = _nc_prescreen.allocated, q = 0; p != 0; q = p, p = p->next) { if (p->id == id) { if (q) { @@ -919,6 +1110,7 @@ _nc_forget_prescr(void) break; } } + _nc_unlock_global(screen); } #endif /* USE_PTHREADS */ @@ -990,6 +1182,7 @@ _nc_setupterm(const char *tname, int rc = ERR; TERMINAL *termp = 0; + _nc_init_pthreads(); _nc_lock_global(prescreen); START_TRACE(); if (TINFO_SETUP_TERM(&termp, tname, Filedes, errret, reuse) == OK) { @@ -999,6 +1192,7 @@ _nc_setupterm(const char *tname, } } _nc_unlock_global(prescreen); + return rc; } #endif diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c index 5ce43a3c..2ece9859 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_termcap.c,v 1.88 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.89 2023/05/27 20:13:10 tom Exp $") NCURSES_EXPORT_VAR(char *) UP = 0; NCURSES_EXPORT_VAR(char *) BC = 0; @@ -399,7 +399,7 @@ tgetstr(const char *id, char **area) #undef CacheInx #define CacheInx num NCURSES_EXPORT(void) -_nc_tgetent_leak(TERMINAL *termp) +_nc_tgetent_leak(const TERMINAL *const termp) { if (termp != 0) { int num; diff --git a/ncurses/tinfo/lib_tgoto.c b/ncurses/tinfo/lib_tgoto.c index 9cf5e100..58b561fa 100644 --- a/ncurses/tinfo/lib_tgoto.c +++ b/ncurses/tinfo/lib_tgoto.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2000-2008,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -36,7 +36,7 @@ #include #include -MODULE_ID("$Id: lib_tgoto.c,v 1.21 2020/05/27 23:55:56 tom Exp $") +MODULE_ID("$Id: lib_tgoto.c,v 1.23 2023/04/16 17:19:40 tom Exp $") #if !PURE_TERMINFO static bool @@ -207,6 +207,16 @@ tgoto(const char *string, int x, int y) result = tgoto_internal(string, x, y); else #endif - result = TIPARM_2(string, y, x); + if ((result = TIPARM_2(string, y, x)) == NULL) { + /* + * Because termcap did not provide a more general solution such as + * tparm(), it was necessary to handle single-parameter capabilities + * using tgoto(). The internal _nc_tiparm() function returns a NULL + * for that case; retry for the single-parameter case. + */ + if ((result = TIPARM_1(string, y)) == NULL) { + result = TIPARM_0(string); + } + } returnPtr(result); } diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c index d9bdfd8f..5666b27b 100644 --- a/ncurses/tinfo/lib_tparm.c +++ b/ncurses/tinfo/lib_tparm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -53,7 +53,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.137 2021/11/20 23:29:15 tom Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.153 2023/11/04 19:28:41 tom Exp $") /* * char * @@ -177,19 +177,21 @@ _nc_free_tparm(TERMINAL *termp) #if HAVE_TSEARCH if (MyCount != 0) { delete_tparm = typeCalloc(TPARM_DATA *, MyCount); - which_tparm = 0; - twalk(MyCache, visit_nodes); - for (which_tparm = 0; which_tparm < MyCount; ++which_tparm) { - TPARM_DATA *ptr = delete_tparm[which_tparm]; - if (ptr != NULL) { - tdelete(ptr, &MyCache, cmp_format); - free((char *) ptr->format); - free(ptr); + if (delete_tparm != NULL) { + which_tparm = 0; + twalk(MyCache, visit_nodes); + for (which_tparm = 0; which_tparm < MyCount; ++which_tparm) { + TPARM_DATA *ptr = delete_tparm[which_tparm]; + if (ptr != NULL) { + tdelete(ptr, &MyCache, cmp_format); + free((char *) ptr->format); + free(ptr); + } } + which_tparm = 0; + twalk(MyCache, visit_nodes); + FreeAndNull(delete_tparm); } - which_tparm = 0; - twalk(MyCache, visit_nodes); - FreeAndNull(delete_tparm); MyCount = 0; which_tparm = 0; } @@ -605,8 +607,8 @@ tparm_setup(TERMINAL *term, const char *string, TPARM_DATA *result) TPS(out_used) = 0; memset(result, 0, sizeof(*result)); - if (string == NULL) { - TR(TRACE_CALLS, ("%s: format is null", TPS(tname))); + if (!VALID_STRING(string)) { + TR(TRACE_CALLS, ("%s: format is invalid", TPS(tname))); rc = ERR; } else { #if HAVE_TSEARCH @@ -645,7 +647,7 @@ tparm_setup(TERMINAL *term, const char *string, TPARM_DATA *result) result->num_parsed = NUM_PARM; if (result->num_popped > NUM_PARM) result->num_popped = NUM_PARM; - result->num_actual = max(result->num_popped, result->num_parsed); + result->num_actual = Max(result->num_popped, result->num_parsed); for (n = 0; n < result->num_actual; ++n) { if (result->p_is_s[n]) @@ -796,6 +798,11 @@ tparam_internal(TPARM_STATE *tps, const char *string, TPARM_DATA *data) tparm_trace_call(tps, string, data); + if (TPS(fmt_buff) == NULL) { + T((T_RETURN(""))); + return NULL; + } + while ((cp - string) < (int) len2) { if (*cp != '%') { save_char(tps, UChar(*cp)); @@ -1086,6 +1093,67 @@ tparam_internal(TPARM_STATE *tps, const char *string, TPARM_DATA *data) return (TPS(out_buff)); } +#ifdef CUR +/* + * Only a few standard capabilities accept string parameters. The others that + * are parameterized accept only numeric parameters. + */ +static bool +check_string_caps(TPARM_DATA *data, const char *string) +{ + bool result = FALSE; + +#define CHECK_CAP(name) (VALID_STRING(name) && !strcmp(name, string)) + + /* + * Disallow string parameters unless we can check them against a terminal + * description. + */ + if (cur_term != NULL) { + int want_type = 0; + + if (CHECK_CAP(pkey_key)) + want_type = 2; /* function key #1, type string #2 */ + else if (CHECK_CAP(pkey_local)) + want_type = 2; /* function key #1, execute string #2 */ + else if (CHECK_CAP(pkey_xmit)) + want_type = 2; /* function key #1, transmit string #2 */ + else if (CHECK_CAP(plab_norm)) + want_type = 2; /* label #1, show string #2 */ +#ifdef pkey_plab + else if (CHECK_CAP(pkey_plab)) + want_type = 6; /* function key #1, type string #2, show string #3 */ +#endif +#if NCURSES_XNAMES + else { + char *check; + + check = tigetstr("Cs"); + if (CHECK_CAP(check)) + want_type = 1; /* style #1 */ + + check = tigetstr("Ms"); + if (CHECK_CAP(check)) + want_type = 3; /* storage unit #1, content #2 */ + } +#endif + + if (want_type == data->tparm_type) { + result = TRUE; + } else { + T(("unexpected string-parameter")); + } + } + return result; +} + +#define ValidCap(allow_strings) (myData.tparm_type == 0 || \ + (allow_strings && \ + check_string_caps(&myData, string))) +#else +#define ValidCap(allow_strings) 1 +#endif + #if NCURSES_TPARM_VARARGS NCURSES_EXPORT(char *) @@ -1100,7 +1168,7 @@ tparm(const char *string, ...) tps->tname = "tparm"; #endif /* TRACE */ - if (tparm_setup(cur_term, string, &myData) == OK) { + if (tparm_setup(cur_term, string, &myData) == OK && ValidCap(TRUE)) { va_list ap; va_start(ap, string); @@ -1135,7 +1203,9 @@ tparm(const char *string, tps->tname = "tparm"; #endif /* TRACE */ - if (tparm_setup(cur_term, string, &myData) == OK) { +#define string_ok (sizeof(char*) <= sizeof(TPARM_ARG)) + + if (tparm_setup(cur_term, string, &myData) == OK && ValidCap(string_ok)) { myData.param[0] = a1; myData.param[1] = a2; @@ -1166,7 +1236,7 @@ tiparm(const char *string, ...) tps->tname = "tiparm"; #endif /* TRACE */ - if (tparm_setup(cur_term, string, &myData) == OK) { + if (tparm_setup(cur_term, string, &myData) == OK && ValidCap(TRUE)) { va_list ap; va_start(ap, string); @@ -1179,10 +1249,11 @@ tiparm(const char *string, ...) } /* - * The internal-use flavor ensures that the parameters are numbers, not strings + * Use tparm if the formatting string matches the expected number of parameters + * counting string-parameters. */ NCURSES_EXPORT(char *) -_nc_tiparm(int expected, const char *string, ...) +tiparm_s(int num_expected, int tparm_type, const char *string, ...) { TPARM_STATE *tps = get_tparm_state(cur_term); TPARM_DATA myData; @@ -1190,12 +1261,15 @@ _nc_tiparm(int expected, const char *string, ...) _nc_tparm_err = 0; #ifdef TRACE - tps->tname = "_nc_tiparm"; + tps->tname = "tiparm_s"; #endif /* TRACE */ - - if (tparm_setup(cur_term, string, &myData) == OK - && myData.num_actual <= expected - && myData.tparm_type == 0) { + if (num_expected >= 0 && + num_expected <= 9 && + tparm_type >= 0 && + tparm_type < 7 && /* limit to 2 string parameters */ + tparm_setup(cur_term, string, &myData) == OK && + myData.tparm_type == tparm_type && + myData.num_actual == num_expected) { va_list ap; va_start(ap, string); @@ -1207,6 +1281,121 @@ _nc_tiparm(int expected, const char *string, ...) return result; } +/* + * Analyze the formatting string, return the analysis. + */ +NCURSES_EXPORT(int) +tiscan_s(int *num_expected, int *tparm_type, const char *string) +{ + TPARM_DATA myData; + int result = ERR; + +#ifdef TRACE + TPARM_STATE *tps = get_tparm_state(cur_term); + tps->tname = "tiscan_s"; +#endif /* TRACE */ + + if (tparm_setup(cur_term, string, &myData) == OK) { + *num_expected = myData.num_actual; + *tparm_type = myData.tparm_type; + result = OK; + } + return result; +} + +/* + * The internal-use flavor ensures that parameters are numbers, not strings. + * In addition to ensuring that they are numbers, it ensures that the parameter + * count is consistent with intended usage. + * + * Unlike the general-purpose tparm/tiparm, these internal calls are fairly + * well defined: + * + * expected == 0 - not applicable + * expected == 1 - set color, or vertical/horizontal addressing + * expected == 2 - cursor addressing + * expected == 4 - initialize color or color pair + * expected == 9 - set attributes + * + * Only for the last case (set attributes) should a parameter be optional. + * Also, a capability which calls for more parameters than expected should be + * ignored. + * + * Return a null if the parameter-checks fail. Otherwise, return a pointer to + * the formatted capability string. + */ +NCURSES_EXPORT(char *) +_nc_tiparm(int expected, const char *string, ...) +{ + TPARM_STATE *tps = get_tparm_state(cur_term); + TPARM_DATA myData; + char *result = NULL; + + _nc_tparm_err = 0; + T((T_CALLED("_nc_tiparm(%d, %s, ...)"), expected, _nc_visbuf(string))); +#ifdef TRACE + tps->tname = "_nc_tiparm"; +#endif /* TRACE */ + + if (tparm_setup(cur_term, string, &myData) == OK && ValidCap(FALSE)) { +#ifdef CUR + if (myData.num_actual != expected && cur_term != NULL) { + int needed = expected; + if (CHECK_CAP(to_status_line)) { + needed = 0; /* allow for xterm's status line */ + } else if (CHECK_CAP(set_a_background)) { + needed = 0; /* allow for monochrome fakers */ + } else if (CHECK_CAP(set_a_foreground)) { + needed = 0; + } else if (CHECK_CAP(set_background)) { + needed = 0; + } else if (CHECK_CAP(set_foreground)) { + needed = 0; + } +#if NCURSES_XNAMES + else { + char *check; + + check = tigetstr("xm"); + if (CHECK_CAP(check)) { + needed = 3; + } + check = tigetstr("S0"); + if (CHECK_CAP(check)) { + needed = 0; /* used in screen-base */ + } + } +#endif + if (myData.num_actual >= needed && myData.num_actual <= expected) + expected = myData.num_actual; + } +#endif + if (myData.num_actual == 0 && expected) { + T(("missing parameter%s, expected %s%d", + expected > 1 ? "s" : "", + expected == 9 ? "up to " : "", + expected)); + } else if (myData.num_actual > expected) { + T(("too many parameters, have %d, expected %d", + myData.num_actual, + expected)); + } else if (expected != 9 && myData.num_actual != expected) { + T(("expected %d parameters, have %d", + myData.num_actual, + expected)); + } else { + va_list ap; + + va_start(ap, string); + tparm_copy_valist(&myData, FALSE, ap); + va_end(ap); + + result = tparam_internal(tps, string, &myData); + } + } + returnPtr(result); +} + /* * Improve tic's checks by resetting the terminfo "static variables" before * calling functions which may update them. diff --git a/ncurses/tinfo/lib_tputs.c b/ncurses/tinfo/lib_tputs.c index b9ca41cc..f834532c 100644 --- a/ncurses/tinfo/lib_tputs.c +++ b/ncurses/tinfo/lib_tputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -52,12 +52,12 @@ #include /* ospeed */ #include -MODULE_ID("$Id: lib_tputs.c,v 1.108 2021/05/08 23:27:40 tom Exp $") +MODULE_ID("$Id: lib_tputs.c,v 1.111 2023/09/16 16:05:15 tom Exp $") NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ -NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */ +NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; #if NCURSES_NO_PADDING NCURSES_EXPORT(void) @@ -89,6 +89,9 @@ NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms) { T((T_CALLED("delay_output(%p,%d)"), (void *) SP_PARM, ms)); + if (ms > MAX_DELAY_MSECS) + ms = MAX_DELAY_MSECS; + if (!HasTInfoTerminal(SP_PARM)) returnCode(ERR); @@ -128,9 +131,8 @@ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0) SP_PARM->out_buffer)); if (SP_PARM->out_inuse) { char *buf = SP_PARM->out_buffer; - size_t amount = SP->out_inuse; + size_t amount = SP_PARM->out_inuse; - SP->out_inuse = 0; TR(TRACE_CHARPUT, ("flushing %ld/%ld bytes", (unsigned long) amount, _nc_outchars)); while (amount) { @@ -155,6 +157,8 @@ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0) TR(TRACE_CHARPUT, ("flushing stdout")); fflush(stdout); } + if (SP_PARM != 0) + SP_PARM->out_inuse = 0; returnVoid; } diff --git a/ncurses/tinfo/lib_win32con.c b/ncurses/tinfo/lib_win32con.c index 2bcea39a..2d6857ae 100644 --- a/ncurses/tinfo/lib_win32con.c +++ b/ncurses/tinfo/lib_win32con.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include -MODULE_ID("$Id: lib_win32con.c,v 1.7 2021/09/04 10:54:35 tom Exp $") +MODULE_ID("$Id: lib_win32con.c,v 1.14 2023/08/05 20:44:38 tom Exp $") #ifdef _NC_WINDOWS @@ -58,19 +58,7 @@ MODULE_ID("$Id: lib_win32con.c,v 1.7 2021/09/04 10:54:35 tom Exp $") #define read_screen ReadConsoleOutput #endif -static BOOL IsConsoleHandle(HANDLE hdl); -static bool save_original_screen(void); -static bool restore_original_screen(void) GCC_UNUSED; static bool read_screen_data(void); -static int Adjust(int milliseconds, int diff); -static int decode_mouse(SCREEN *sp, int mask); -static bool handle_mouse(SCREEN *sp, MOUSE_EVENT_RECORD mer); -static int rkeycompare(const void *el1, const void *el2); -static int keycompare(const void *el1, const void *el2); -static int MapKey(WORD vKey); -static int AnsiKey(WORD vKey); - -static ULONGLONG tdiff(FILETIME fstart, FILETIME fend); #define GenMap(vKey,key) MAKELONG(key, vKey) static const LONG keylist[] = @@ -136,32 +124,32 @@ _nc_console_vt_supported(void) osvi.dwMinorVersion, osvi.dwBuildNumber)); if (osvi.dwMajorVersion >= REQUIRED_MAX_V) { - if (osvi.dwMajorVersion == REQUIRED_MAX_V) { - if (((osvi.dwMinorVersion == REQUIRED_MIN_V) && - (osvi.dwBuildNumber >= REQUIRED_BUILD)) || - ((osvi.dwMinorVersion > REQUIRED_MIN_V))) - res = 1; - } else - res = 1; + if (osvi.dwMajorVersion == REQUIRED_MAX_V) { + if (((osvi.dwMinorVersion == REQUIRED_MIN_V) && + (osvi.dwBuildNumber >= REQUIRED_BUILD)) || + ((osvi.dwMinorVersion > REQUIRED_MIN_V))) + res = 1; + } else + res = 1; } returnCode(res); } NCURSES_EXPORT(void) -_nc_console_size(int* Lines, int* Cols) +_nc_console_size(int *Lines, int *Cols) { - EnsureInit(); - if (Lines != NULL && Cols != NULL) { - if (WINCONSOLE.buffered) { - *Lines = (int) (WINCONSOLE.SBI.dwSize.Y); - *Cols = (int) (WINCONSOLE.SBI.dwSize.X); - } else { - *Lines = (int) (WINCONSOLE.SBI.srWindow.Bottom + 1 - - WINCONSOLE.SBI.srWindow.Top); - *Cols = (int) (WINCONSOLE.SBI.srWindow.Right + 1 - - WINCONSOLE.SBI.srWindow.Left); - } - } + EnsureInit(); + if (Lines != NULL && Cols != NULL) { + if (WINCONSOLE.buffered) { + *Lines = (int) (WINCONSOLE.SBI.dwSize.Y); + *Cols = (int) (WINCONSOLE.SBI.dwSize.X); + } else { + *Lines = (int) (WINCONSOLE.SBI.srWindow.Bottom + 1 - + WINCONSOLE.SBI.srWindow.Top); + *Cols = (int) (WINCONSOLE.SBI.srWindow.Right + 1 - + WINCONSOLE.SBI.srWindow.Left); + } + } } /* Convert a file descriptor into a HANDLE @@ -188,9 +176,9 @@ IsConsoleHandle(HANDLE hdl) EnsureInit(); if (!GetConsoleMode(hdl, &dwFlag)) { - T(("GetConsoleMode failed")); + T(("GetConsoleMode failed")); } else { - result = TRUE; + result = TRUE; } returnBool(result); @@ -219,8 +207,8 @@ NCURSES_EXPORT(void) _nc_console_selectActiveHandle(void) { if (WINCONSOLE.lastOut != WINCONSOLE.hdl) { - WINCONSOLE.lastOut = WINCONSOLE.hdl; - SetConsoleActiveScreenBuffer(WINCONSOLE.lastOut); + WINCONSOLE.lastOut = WINCONSOLE.hdl; + SetConsoleActiveScreenBuffer(WINCONSOLE.lastOut); } } @@ -228,32 +216,32 @@ NCURSES_EXPORT(HANDLE) _nc_console_fd2handle(int fd) { HANDLE hdl = _nc_console_handle(fd); - if (hdl==WINCONSOLE.inp) { - T(("lib_win32con:validateHandle %d -> WINCONSOLE.inp", fd)); - } else if (hdl==WINCONSOLE.hdl) { - T(("lib_win32con:validateHandle %d -> WINCONSOLE.hdl", fd)); - } else if (hdl==WINCONSOLE.out) { - T(("lib_win32con:validateHandle %d -> WINCONSOLE.out", fd)); + if (hdl == WINCONSOLE.inp) { + T(("lib_win32con:validateHandle %d -> WINCONSOLE.inp", fd)); + } else if (hdl == WINCONSOLE.hdl) { + T(("lib_win32con:validateHandle %d -> WINCONSOLE.hdl", fd)); + } else if (hdl == WINCONSOLE.out) { + T(("lib_win32con:validateHandle %d -> WINCONSOLE.out", fd)); } else { - T(("lib_win32con:validateHandle %d maps to unknown HANDLE", fd)); - hdl = INVALID_HANDLE_VALUE; + T(("lib_win32con:validateHandle %d maps to unknown HANDLE", fd)); + hdl = INVALID_HANDLE_VALUE; } #if 1 assert(hdl != INVALID_HANDLE_VALUE); #endif if (hdl != INVALID_HANDLE_VALUE) { - if (hdl != WINCONSOLE.inp && (!WINCONSOLE.isTermInfoConsole && WINCONSOLE.progMode)) { - if (hdl==WINCONSOLE.out && hdl!=WINCONSOLE.hdl) { - T(("lib_win32con:validateHandle forcing WINCONSOLE.out -> WINCONSOLE.hdl")); - hdl = WINCONSOLE.hdl; - } - } + if (hdl != WINCONSOLE.inp && (!WINCONSOLE.isTermInfoConsole && WINCONSOLE.progMode)) { + if (hdl == WINCONSOLE.out && hdl != WINCONSOLE.hdl) { + T(("lib_win32con:validateHandle forcing WINCONSOLE.out -> WINCONSOLE.hdl")); + hdl = WINCONSOLE.hdl; + } + } } return hdl; } NCURSES_EXPORT(int) -_nc_console_setmode(HANDLE hdl, const TTY *arg) +_nc_console_setmode(HANDLE hdl, const TTY * arg) { DWORD dwFlag = 0; int code = ERR; @@ -261,86 +249,86 @@ _nc_console_setmode(HANDLE hdl, const TTY *arg) if (arg) { #ifdef TRACE - TTY TRCTTY; + TTY TRCTTY; #define TRCTTYOUT(flag) TRCTTY.dwFlagOut = flag #define TRCTTYIN(flag) TRCTTY.dwFlagIn = flag #else #define TRCTTYOUT(flag) #define TRCTTYIN(flag) #endif - T(("lib_win32con:_nc_console_setmode %s", _nc_trace_ttymode(arg))); - if (hdl==WINCONSOLE.inp) { - dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT | VT_FLAG_IN; - if (WINCONSOLE.isTermInfoConsole) - dwFlag |= (VT_FLAG_IN); - else - dwFlag &= (DWORD) ~(VT_FLAG_IN); - TRCTTYIN(dwFlag); - SetConsoleMode(hdl, dwFlag); - - alt = OutHandle(); - dwFlag = arg->dwFlagOut; - if (WINCONSOLE.isTermInfoConsole) - dwFlag |= (VT_FLAG_OUT); - else - dwFlag |= (VT_FLAG_OUT); - TRCTTYOUT(dwFlag); - SetConsoleMode(alt, dwFlag); - } else { - dwFlag = arg->dwFlagOut; - if (WINCONSOLE.isTermInfoConsole) - dwFlag |= (VT_FLAG_OUT); - else - dwFlag |= (VT_FLAG_OUT); - TRCTTYOUT(dwFlag); - SetConsoleMode(hdl, dwFlag); - - alt = WINCONSOLE.inp; - dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT; - if (WINCONSOLE.isTermInfoConsole) - dwFlag |= (VT_FLAG_IN); - else - dwFlag &= (DWORD) ~(VT_FLAG_IN); - TRCTTYIN(dwFlag); - SetConsoleMode(alt, dwFlag); - T(("effective mode set %s", _nc_trace_ttymode(&TRCTTY))); - } - code = OK; + T(("lib_win32con:_nc_console_setmode %s", _nc_trace_ttymode(arg))); + if (hdl == WINCONSOLE.inp) { + dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT | VT_FLAG_IN; + if (WINCONSOLE.isTermInfoConsole) + dwFlag |= (VT_FLAG_IN); + else + dwFlag &= (DWORD) ~ (VT_FLAG_IN); + TRCTTYIN(dwFlag); + SetConsoleMode(hdl, dwFlag); + + alt = OutHandle(); + dwFlag = arg->dwFlagOut; + if (WINCONSOLE.isTermInfoConsole) + dwFlag |= (VT_FLAG_OUT); + else + dwFlag |= (VT_FLAG_OUT); + TRCTTYOUT(dwFlag); + SetConsoleMode(alt, dwFlag); + } else { + dwFlag = arg->dwFlagOut; + if (WINCONSOLE.isTermInfoConsole) + dwFlag |= (VT_FLAG_OUT); + else + dwFlag |= (VT_FLAG_OUT); + TRCTTYOUT(dwFlag); + SetConsoleMode(hdl, dwFlag); + + alt = WINCONSOLE.inp; + dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT; + if (WINCONSOLE.isTermInfoConsole) + dwFlag |= (VT_FLAG_IN); + else + dwFlag &= (DWORD) ~ (VT_FLAG_IN); + TRCTTYIN(dwFlag); + SetConsoleMode(alt, dwFlag); + T(("effective mode set %s", _nc_trace_ttymode(&TRCTTY))); + } + code = OK; } - return(code); + return (code); } NCURSES_EXPORT(int) -_nc_console_getmode(HANDLE hdl, TTY *arg) +_nc_console_getmode(HANDLE hdl, TTY * arg) { int code = ERR; if (arg) { - DWORD dwFlag = 0; - HANDLE alt; - - if (hdl==WINCONSOLE.inp) { - if(GetConsoleMode(hdl, &dwFlag)) { - arg->dwFlagIn = dwFlag; - alt = OutHandle(); - if (GetConsoleMode(alt, &dwFlag)) { - arg->dwFlagOut = dwFlag; - code = OK; - } - } - } else { - if (GetConsoleMode(hdl, &dwFlag)) { - arg->dwFlagOut = dwFlag; - alt = WINCONSOLE.inp; - if (GetConsoleMode(alt, &dwFlag)) { - arg->dwFlagIn = dwFlag; - code = OK; - } - } - } + DWORD dwFlag = 0; + HANDLE alt; + + if (hdl == WINCONSOLE.inp) { + if (GetConsoleMode(hdl, &dwFlag)) { + arg->dwFlagIn = dwFlag; + alt = OutHandle(); + if (GetConsoleMode(alt, &dwFlag)) { + arg->dwFlagOut = dwFlag; + code = OK; + } + } + } else { + if (GetConsoleMode(hdl, &dwFlag)) { + arg->dwFlagOut = dwFlag; + alt = WINCONSOLE.inp; + if (GetConsoleMode(alt, &dwFlag)) { + arg->dwFlagIn = dwFlag; + code = OK; + } + } + } } T(("lib_win32con:_nc_console_getmode %s", _nc_trace_ttymode(arg))); - return(code); + return (code); } NCURSES_EXPORT(int) @@ -351,15 +339,15 @@ _nc_console_flush(HANDLE hdl) T((T_CALLED("lib_win32con::_nc_console_flush(hdl=%p"), hdl)); if (hdl != INVALID_HANDLE_VALUE) { - if (hdl == WINCONSOLE.hdl || - hdl == WINCONSOLE.inp || - hdl == WINCONSOLE.out) { - if (!FlushConsoleInputBuffer(WINCONSOLE.inp)) - code = ERR; - } else { - code = ERR; - T(("_nc_console_flush not requesting a handle owned by console.")); - } + if (hdl == WINCONSOLE.hdl || + hdl == WINCONSOLE.inp || + hdl == WINCONSOLE.out) { + if (!FlushConsoleInputBuffer(WINCONSOLE.inp)) + code = ERR; + } else { + code = ERR; + T(("_nc_console_flush not requesting a handle owned by console.")); + } } returnCode(code); } @@ -368,18 +356,17 @@ NCURSES_EXPORT(WORD) _nc_console_MapColor(bool fore, int color) { static const int _cmap[] = - {0, 4, 2, 6, 1, 5, 3, 7}; + {0, 4, 2, 6, 1, 5, 3, 7}; int a; if (color < 0 || color > 7) - a = fore ? 7 : 0; + a = fore ? 7 : 0; else - a = _cmap[color]; + a = _cmap[color]; if (!fore) - a = a << 4; + a = a << 4; return (WORD) a; } - /* * Attempt to save the screen contents. PDCurses does this if * PDC_RESTORE_SCREEN is set, giving the same visual appearance on @@ -398,25 +385,26 @@ save_original_screen(void) WINCONSOLE.save_region.Right = (SHORT) (WINCONSOLE.SBI.dwSize.X - 1); if (read_screen_data()) { - result = TRUE; + result = TRUE; } else { - WINCONSOLE.save_region.Top = WINCONSOLE.SBI.srWindow.Top; - WINCONSOLE.save_region.Left = WINCONSOLE.SBI.srWindow.Left; - WINCONSOLE.save_region.Bottom = WINCONSOLE.SBI.srWindow.Bottom; - WINCONSOLE.save_region.Right = WINCONSOLE.SBI.srWindow.Right; + WINCONSOLE.save_region.Top = WINCONSOLE.SBI.srWindow.Top; + WINCONSOLE.save_region.Left = WINCONSOLE.SBI.srWindow.Left; + WINCONSOLE.save_region.Bottom = WINCONSOLE.SBI.srWindow.Bottom; + WINCONSOLE.save_region.Right = WINCONSOLE.SBI.srWindow.Right; - WINCONSOLE.window_only = TRUE; + WINCONSOLE.window_only = TRUE; - if (read_screen_data()) { - result = TRUE; - } + if (read_screen_data()) { + result = TRUE; + } } T(("... save original screen contents %s", result ? "ok" : "err")); return result; } +#if 0 static bool restore_original_screen(void) { @@ -428,29 +416,30 @@ restore_original_screen(void) WINCONSOLE.window_only ? "window" : "entire buffer")); bufferCoord.X = (SHORT) (WINCONSOLE.window_only ? - WINCONSOLE.SBI.srWindow.Left : 0); + WINCONSOLE.SBI.srWindow.Left : 0); bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ? - WINCONSOLE.SBI.srWindow.Top : 0); + WINCONSOLE.SBI.srWindow.Top : 0); if (write_screen(WINCONSOLE.hdl, - WINCONSOLE.save_screen, - WINCONSOLE.save_size, - bufferCoord, - &save_region)) { - result = TRUE; - mvcur(-1, -1, LINES - 2, 0); - T(("... restore original screen contents ok %dx%d (%d,%d - %d,%d)", - WINCONSOLE.save_size.Y, - WINCONSOLE.save_size.X, - save_region.Top, - save_region.Left, - save_region.Bottom, - save_region.Right)); + WINCONSOLE.save_screen, + WINCONSOLE.save_size, + bufferCoord, + &save_region)) { + result = TRUE; + mvcur(-1, -1, LINES - 2, 0); + T(("... restore original screen contents ok %dx%d (%d,%d - %d,%d)", + WINCONSOLE.save_size.Y, + WINCONSOLE.save_size.X, + save_region.Top, + save_region.Left, + save_region.Bottom, + save_region.Right)); } else { - T(("... restore original screen contents err")); + T(("... restore original screen contents err")); } return result; } +#endif static bool read_screen_data(void) @@ -460,38 +449,38 @@ read_screen_data(void) size_t want; WINCONSOLE.save_size.X = (SHORT) (WINCONSOLE.save_region.Right - - WINCONSOLE.save_region.Left + 1); + - WINCONSOLE.save_region.Left + 1); WINCONSOLE.save_size.Y = (SHORT) (WINCONSOLE.save_region.Bottom - - WINCONSOLE.save_region.Top + 1); + - WINCONSOLE.save_region.Top + 1); want = (size_t) (WINCONSOLE.save_size.X * WINCONSOLE.save_size.Y); if ((WINCONSOLE.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) { - bufferCoord.X = (SHORT) (WINCONSOLE.window_only ? - WINCONSOLE.SBI.srWindow.Left : 0); - bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ? - WINCONSOLE.SBI.srWindow.Top : 0); - - T(("... reading console %s %dx%d into %d,%d - %d,%d at %d,%d", - WINCONSOLE.window_only ? "window" : "buffer", - WINCONSOLE.save_size.Y, WINCONSOLE.save_size.X, - WINCONSOLE.save_region.Top, - WINCONSOLE.save_region.Left, - WINCONSOLE.save_region.Bottom, - WINCONSOLE.save_region.Right, - bufferCoord.Y, - bufferCoord.X)); - - if (read_screen(WINCONSOLE.hdl, - WINCONSOLE.save_screen, - WINCONSOLE.save_size, - bufferCoord, - &WINCONSOLE.save_region)) { - result = TRUE; - } else { - T((" error %#lx", (unsigned long) GetLastError())); - FreeAndNull(WINCONSOLE.save_screen); - } + bufferCoord.X = (SHORT) (WINCONSOLE.window_only ? + WINCONSOLE.SBI.srWindow.Left : 0); + bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ? + WINCONSOLE.SBI.srWindow.Top : 0); + + T(("... reading console %s %dx%d into %d,%d - %d,%d at %d,%d", + WINCONSOLE.window_only ? "window" : "buffer", + WINCONSOLE.save_size.Y, WINCONSOLE.save_size.X, + WINCONSOLE.save_region.Top, + WINCONSOLE.save_region.Left, + WINCONSOLE.save_region.Bottom, + WINCONSOLE.save_region.Right, + bufferCoord.Y, + bufferCoord.X)); + + if (read_screen(WINCONSOLE.hdl, + WINCONSOLE.save_screen, + WINCONSOLE.save_size, + bufferCoord, + &WINCONSOLE.save_region)) { + result = TRUE; + } else { + T((" error %#lx", (unsigned long) GetLastError())); + FreeAndNull(WINCONSOLE.save_screen); + } } return result; @@ -502,31 +491,31 @@ _nc_console_get_SBI(void) { bool rc = FALSE; if (GetConsoleScreenBufferInfo(WINCONSOLE.hdl, &(WINCONSOLE.SBI))) { - T(("GetConsoleScreenBufferInfo")); - T(("... buffer(X:%d Y:%d)", - WINCONSOLE.SBI.dwSize.X, - WINCONSOLE.SBI.dwSize.Y)); - T(("... window(X:%d Y:%d)", - WINCONSOLE.SBI.dwMaximumWindowSize.X, - WINCONSOLE.SBI.dwMaximumWindowSize.Y)); - T(("... cursor(X:%d Y:%d)", - WINCONSOLE.SBI.dwCursorPosition.X, - WINCONSOLE.SBI.dwCursorPosition.Y)); - T(("... display(Top:%d Bottom:%d Left:%d Right:%d)", - WINCONSOLE.SBI.srWindow.Top, - WINCONSOLE.SBI.srWindow.Bottom, - WINCONSOLE.SBI.srWindow.Left, - WINCONSOLE.SBI.srWindow.Right)); - if (WINCONSOLE.buffered) { - WINCONSOLE.origin.X = 0; - WINCONSOLE.origin.Y = 0; - } else { - WINCONSOLE.origin.X = WINCONSOLE.SBI.srWindow.Left; - WINCONSOLE.origin.Y = WINCONSOLE.SBI.srWindow.Top; - } - rc = TRUE; + T(("GetConsoleScreenBufferInfo")); + T(("... buffer(X:%d Y:%d)", + WINCONSOLE.SBI.dwSize.X, + WINCONSOLE.SBI.dwSize.Y)); + T(("... window(X:%d Y:%d)", + WINCONSOLE.SBI.dwMaximumWindowSize.X, + WINCONSOLE.SBI.dwMaximumWindowSize.Y)); + T(("... cursor(X:%d Y:%d)", + WINCONSOLE.SBI.dwCursorPosition.X, + WINCONSOLE.SBI.dwCursorPosition.Y)); + T(("... display(Top:%d Bottom:%d Left:%d Right:%d)", + WINCONSOLE.SBI.srWindow.Top, + WINCONSOLE.SBI.srWindow.Bottom, + WINCONSOLE.SBI.srWindow.Left, + WINCONSOLE.SBI.srWindow.Right)); + if (WINCONSOLE.buffered) { + WINCONSOLE.origin.X = 0; + WINCONSOLE.origin.Y = 0; + } else { + WINCONSOLE.origin.X = WINCONSOLE.SBI.srWindow.Left; + WINCONSOLE.origin.Y = WINCONSOLE.SBI.srWindow.Top; + } + rc = TRUE; } else { - T(("GetConsoleScreenBufferInfo ERR")); + T(("GetConsoleScreenBufferInfo ERR")); } return rc; } @@ -546,8 +535,8 @@ _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info) T((T_CALLED("lib_win32con::_nc_console_set_scrollback(%s)"), (normal - ? "normal" - : "application"))); + ? "normal" + : "application"))); T(("... SBI.srWindow %d,%d .. %d,%d", info->srWindow.Top, @@ -559,52 +548,52 @@ _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info) info->dwSize.X)); if (normal) { - rect = info->srWindow; - coord = info->dwSize; - if (memcmp(info, &WINCONSOLE.SBI, sizeof(*info)) != 0) { - changed = TRUE; - WINCONSOLE.SBI = *info; - } + rect = info->srWindow; + coord = info->dwSize; + if (memcmp(info, &WINCONSOLE.SBI, sizeof(*info)) != 0) { + changed = TRUE; + WINCONSOLE.SBI = *info; + } } else { - int high = info->srWindow.Bottom - info->srWindow.Top + 1; - int wide = info->srWindow.Right - info->srWindow.Left + 1; - - if (high < MIN_HIGH) { - T(("... height %d < %d", high, MIN_HIGH)); - high = MIN_HIGH; - changed = TRUE; - } - if (wide < MIN_WIDE) { - T(("... width %d < %d", wide, MIN_WIDE)); - wide = MIN_WIDE; - changed = TRUE; - } - - rect.Left = - rect.Top = 0; - rect.Right = (SHORT) (wide - 1); - rect.Bottom = (SHORT) (high - 1); - - coord.X = (SHORT) wide; - coord.Y = (SHORT) high; - - if (info->dwSize.Y != high || - info->dwSize.X != wide || - info->srWindow.Top != 0 || - info->srWindow.Left != 0) { - changed = TRUE; - } + int high = info->srWindow.Bottom - info->srWindow.Top + 1; + int wide = info->srWindow.Right - info->srWindow.Left + 1; + + if (high < MIN_HIGH) { + T(("... height %d < %d", high, MIN_HIGH)); + high = MIN_HIGH; + changed = TRUE; + } + if (wide < MIN_WIDE) { + T(("... width %d < %d", wide, MIN_WIDE)); + wide = MIN_WIDE; + changed = TRUE; + } + + rect.Left = + rect.Top = 0; + rect.Right = (SHORT) (wide - 1); + rect.Bottom = (SHORT) (high - 1); + + coord.X = (SHORT) wide; + coord.Y = (SHORT) high; + + if (info->dwSize.Y != high || + info->dwSize.X != wide || + info->srWindow.Top != 0 || + info->srWindow.Left != 0) { + changed = TRUE; + } } if (changed) { - T(("... coord %d,%d", coord.Y, coord.X)); - T(("... rect %d,%d - %d,%d", - rect.Top, rect.Left, - rect.Bottom, rect.Right)); - SetConsoleScreenBufferSize(WINCONSOLE.hdl, coord); /* dwSize */ - SetConsoleWindowInfo(WINCONSOLE.hdl, TRUE, &rect); /* srWindow */ - _nc_console_get_SBI(); + T(("... coord %d,%d", coord.Y, coord.X)); + T(("... rect %d,%d - %d,%d", + rect.Top, rect.Left, + rect.Bottom, rect.Right)); + SetConsoleScreenBufferSize(WINCONSOLE.hdl, coord); /* dwSize */ + SetConsoleWindowInfo(WINCONSOLE.hdl, TRUE, &rect); /* srWindow */ + _nc_console_get_SBI(); } returnVoid; } @@ -629,9 +618,9 @@ static int Adjust(int milliseconds, int diff) { if (milliseconds != INFINITY) { - milliseconds -= diff; - if (milliseconds < 0) - milliseconds = 0; + milliseconds -= diff; + if (milliseconds < 0) + milliseconds = 0; } return milliseconds; } @@ -642,38 +631,38 @@ Adjust(int milliseconds, int diff) FROM_LEFT_4TH_BUTTON_PRESSED | \ RIGHTMOST_BUTTON_PRESSED) -static int +static mmask_t decode_mouse(SCREEN *sp, int mask) { - int result = 0; + mmask_t result = 0; (void) sp; assert(sp && console_initialized); if (mask & FROM_LEFT_1ST_BUTTON_PRESSED) - result |= BUTTON1_PRESSED; + result |= BUTTON1_PRESSED; if (mask & FROM_LEFT_2ND_BUTTON_PRESSED) - result |= BUTTON2_PRESSED; + result |= BUTTON2_PRESSED; if (mask & FROM_LEFT_3RD_BUTTON_PRESSED) - result |= BUTTON3_PRESSED; + result |= BUTTON3_PRESSED; if (mask & FROM_LEFT_4TH_BUTTON_PRESSED) - result |= BUTTON4_PRESSED; + result |= BUTTON4_PRESSED; if (mask & RIGHTMOST_BUTTON_PRESSED) { - switch (WINCONSOLE.numButtons) { - case 1: - result |= BUTTON1_PRESSED; - break; - case 2: - result |= BUTTON2_PRESSED; - break; - case 3: - result |= BUTTON3_PRESSED; - break; - case 4: - result |= BUTTON4_PRESSED; - break; - } + switch (WINCONSOLE.numButtons) { + case 1: + result |= BUTTON1_PRESSED; + break; + case 2: + result |= BUTTON2_PRESSED; + break; + case 3: + result |= BUTTON3_PRESSED; + break; + case 4: + result |= BUTTON4_PRESSED; + break; + } } return result; @@ -697,26 +686,22 @@ handle_mouse(SCREEN *sp, MOUSE_EVENT_RECORD mer) * FIXME: implement continuous event-tracking. */ if (sp->_drv_mouse_new_buttons != sp->_drv_mouse_old_buttons) { - memset(&work, 0, sizeof(work)); - - if (sp->_drv_mouse_new_buttons) { - work.bstate |= - (mmask_t) decode_mouse(sp, - sp->_drv_mouse_new_buttons); - } else { - /* cf: BUTTON_PRESSED, BUTTON_RELEASED */ - work.bstate |= - (mmask_t) (decode_mouse(sp, - sp->_drv_mouse_old_buttons) - >> 1); - result = TRUE; - } - - work.x = mer.dwMousePosition.X; - work.y = mer.dwMousePosition.Y - AdjustY(); - - sp->_drv_mouse_fifo[sp->_drv_mouse_tail] = work; - sp->_drv_mouse_tail += 1; + memset(&work, 0, sizeof(work)); + + if (sp->_drv_mouse_new_buttons) { + work.bstate |= decode_mouse(sp, sp->_drv_mouse_new_buttons); + } else { + /* cf: BUTTON_PRESSED, BUTTON_RELEASED */ + work.bstate |= (decode_mouse(sp, sp->_drv_mouse_old_buttons) + >> 1); + result = TRUE; + } + + work.x = mer.dwMousePosition.X; + work.y = mer.dwMousePosition.Y - AdjustY(); + + sp->_drv_mouse_fifo[sp->_drv_mouse_tail] = work; + sp->_drv_mouse_tail += 1; } return result; } @@ -730,7 +715,6 @@ rkeycompare(const void *el1, const void *el2) return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1)); } - static int keycompare(const void *el1, const void *el2) { @@ -746,22 +730,22 @@ MapKey(WORD vKey) int code = -1; if (!WINCONSOLE.isTermInfoConsole) { - WORD nKey = 0; - void *res; - LONG key = GenMap(vKey, 0); - - res = bsearch(&key, - WINCONSOLE.map, - (size_t) (N_INI + FKEYS), - sizeof(keylist[0]), - keycompare); - if (res) { - key = *((LONG *) res); - nKey = LOWORD(key); - code = (int) (nKey & 0x7fff); - if (nKey & 0x8000) - code = -code; - } + WORD nKey = 0; + void *res; + LONG key = GenMap(vKey, 0); + + res = bsearch(&key, + WINCONSOLE.map, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + keycompare); + if (res) { + key = *((LONG *) res); + nKey = LOWORD(key); + code = (int) (nKey & 0x7fff); + if (nKey & 0x8000) + code = -code; + } } return code; } @@ -772,22 +756,22 @@ AnsiKey(WORD vKey) int code = -1; if (!WINCONSOLE.isTermInfoConsole) { - WORD nKey = 0; - void *res; - LONG key = GenMap(vKey, 0); - - res = bsearch(&key, - WINCONSOLE.ansi_map, - (size_t) (N_INI + FKEYS), - sizeof(keylist[0]), - keycompare); - if (res) { - key = *((LONG *) res); - nKey = LOWORD(key); - code = (int) (nKey & 0x7fff); - if (nKey & 0x8000) - code = -code; - } + WORD nKey = 0; + void *res; + LONG key = GenMap(vKey, 0); + + res = bsearch(&key, + WINCONSOLE.ansi_map, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + keycompare); + if (res) { + key = *((LONG *) res); + nKey = LOWORD(key); + code = (int) (nKey & 0x7fff); + if (nKey & 0x8000) + code = -code; + } } return code; } @@ -804,17 +788,17 @@ _nc_console_keyok(int keycode, int flag) T((T_CALLED("lib_win32con::_nc_console_keyok(%d, %d)"), keycode, flag)); res = bsearch(&key, - WINCONSOLE.rmap, - (size_t) (N_INI + FKEYS), - sizeof(keylist[0]), - rkeycompare); + WINCONSOLE.rmap, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + rkeycompare); if (res) { - key = *((LONG *) res); - vKey = HIWORD(key); - nKey = (LOWORD(key)) & 0x7fff; - if (!flag) - nKey |= 0x8000; - *(LONG *) res = GenMap(vKey, nKey); + key = *((LONG *) res); + vKey = HIWORD(key); + nKey = (LOWORD(key)) & 0x7fff; + if (!flag) + nKey |= 0x8000; + *(LONG *) res = GenMap(vKey, nKey); } returnCode(code); } @@ -829,27 +813,27 @@ _nc_console_keyExist(int keycode) T((T_CALLED("lib_win32con::_nc_console_keyExist(%d)"), keycode)); res = bsearch(&key, - WINCONSOLE.rmap, - (size_t) (N_INI + FKEYS), - sizeof(keylist[0]), - rkeycompare); + WINCONSOLE.rmap, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + rkeycompare); if (res) { - key = *((LONG *) res); - nKey = LOWORD(key); - if (!(nKey & 0x8000)) - found = TRUE; + key = *((LONG *) res); + nKey = LOWORD(key); + if (!(nKey & 0x8000)) + found = TRUE; } returnCode(found); } NCURSES_EXPORT(int) _nc_console_twait( - SCREEN *sp, - HANDLE hdl, - int mode, - int milliseconds, - int *timeleft - EVENTLIST_2nd(_nc_eventlist * evl)) + SCREEN *sp, + HANDLE hdl, + int mode, + int milliseconds, + int *timeleft + EVENTLIST_2nd(_nc_eventlist * evl)) { INPUT_RECORD inp_rec; BOOL b; @@ -861,7 +845,7 @@ _nc_console_twait( bool isNoDelay = (milliseconds == 0); #ifdef NCURSES_WGETCH_EVENTS - (void) evl; /* TODO: implement wgetch-events */ + (void) evl; /* TODO: implement wgetch-events */ #endif #define IGNORE_CTRL_KEYS (SHIFT_PRESSED|LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED| \ @@ -871,174 +855,174 @@ _nc_console_twait( assert(sp); TR(TRACE_IEVENT, ("start twait: hdl=%p, %d milliseconds, mode: %d", - hdl, milliseconds, mode)); + hdl, milliseconds, mode)); if (milliseconds < 0) - milliseconds = INFINITY; + milliseconds = INFINITY; memset(&inp_rec, 0, sizeof(inp_rec)); while (true) { - if (!isNoDelay) { - GetSystemTimeAsFileTime(&fstart); - rc = WaitForSingleObject(hdl, (DWORD) milliseconds); - GetSystemTimeAsFileTime(&fend); - diff = (int) tdiff(fstart, fend); - milliseconds = Adjust(milliseconds, diff); - if (milliseconds< 0) - break; - } - - if (isNoDelay || (rc == WAIT_OBJECT_0)) { - if (mode) { - nRead = 0; - b = GetNumberOfConsoleInputEvents(hdl, &nRead); - if (!b) { - T(("twait:err GetNumberOfConsoleInputEvents")); - } - if (isNoDelay && b) { - T(("twait: Events Available: %ld", nRead)); - if (nRead==0) { - code = 0; - goto end; - } else { - DWORD n = 0; - INPUT_RECORD* pInpRec = - TypeAlloca(INPUT_RECORD, nRead); - if (pInpRec != NULL) { - DWORD i; - BOOL f; - memset(pInpRec, 0, sizeof(INPUT_RECORD)*nRead); - f = PeekConsoleInput(hdl, pInpRec, nRead, &n); - if (f) { - for(i = 0; i < n; i++) { - if (pInpRec[i].EventType==KEY_EVENT) { - if(pInpRec[i].Event.KeyEvent.bKeyDown) { - DWORD ctrlMask = - (pInpRec[i].Event.KeyEvent.dwControlKeyState & - IGNORE_CTRL_KEYS); - if (!ctrlMask) { - code = TW_INPUT; - goto end; - } - } - } - } - } else { - T(("twait:err PeekConsoleInput")); - } - code = 0; - goto end; - } else { - T(("twait:err could not alloca input records")); - } - } - } - if (b && nRead > 0) { - b = PeekConsoleInput(hdl, &inp_rec, 1, &nRead); - if (!b) { - T(("twait:err PeekConsoleInput")); - } - if (b && nRead > 0) { - switch (inp_rec.EventType) { - case KEY_EVENT: - if (mode & TW_INPUT) { - WORD vk = - inp_rec.Event.KeyEvent.wVirtualKeyCode; - char ch = - inp_rec.Event.KeyEvent.uChar.AsciiChar; - T(("twait:event KEY_EVENT")); - T(("twait vk=%d, ch=%d, keydown=%d", - vk, ch, inp_rec.Event.KeyEvent.bKeyDown)); - if (inp_rec.Event.KeyEvent.bKeyDown) { - T(("twait:event KeyDown")); - if (!WINCONSOLE.isTermInfoConsole && - (0 == ch)) { - int nKey = MapKey(vk); - if (nKey < 0) { - CONSUME(); - continue; - } - } - code = TW_INPUT; - goto end; - } else { - CONSUME(); - } - } - continue; - case MOUSE_EVENT: - T(("twait:event MOUSE_EVENT")); - if (decode_mouse(sp, - (inp_rec.Event.MouseEvent.dwButtonState - & BUTTON_MASK)) == 0) { - CONSUME(); - } else if (mode & TW_MOUSE) { - code = TW_MOUSE; - goto end; - } - continue; - /* e.g., FOCUS_EVENT */ - default: - T(("twait:event Tyoe %d", inp_rec.EventType)); - CONSUME(); - _nc_console_selectActiveHandle(); - continue; - } - } - } - } - continue; - } else { - if (rc != WAIT_TIMEOUT) { - code = -1; - break; - } else { - code = 0; - break; - } - } + if (!isNoDelay) { + GetSystemTimeAsFileTime(&fstart); + rc = WaitForSingleObject(hdl, (DWORD) milliseconds); + GetSystemTimeAsFileTime(&fend); + diff = (int) tdiff(fstart, fend); + milliseconds = Adjust(milliseconds, diff); + if (milliseconds < 0) + break; + } + + if (isNoDelay || (rc == WAIT_OBJECT_0)) { + if (mode) { + nRead = 0; + b = GetNumberOfConsoleInputEvents(hdl, &nRead); + if (!b) { + T(("twait:err GetNumberOfConsoleInputEvents")); + } + if (isNoDelay && b) { + T(("twait: Events Available: %ld", nRead)); + if (nRead == 0) { + code = 0; + goto end; + } else { + DWORD n = 0; + INPUT_RECORD *pInpRec = + TypeAlloca(INPUT_RECORD, nRead); + if (pInpRec != NULL) { + DWORD i; + BOOL f; + memset(pInpRec, 0, sizeof(INPUT_RECORD) * nRead); + f = PeekConsoleInput(hdl, pInpRec, nRead, &n); + if (f) { + for (i = 0; i < n; i++) { + if (pInpRec[i].EventType == KEY_EVENT) { + if (pInpRec[i].Event.KeyEvent.bKeyDown) { + DWORD ctrlMask = + (pInpRec[i].Event.KeyEvent.dwControlKeyState & + IGNORE_CTRL_KEYS); + if (!ctrlMask) { + code = TW_INPUT; + goto end; + } + } + } + } + } else { + T(("twait:err PeekConsoleInput")); + } + code = 0; + goto end; + } else { + T(("twait:err could not alloca input records")); + } + } + } + if (b && nRead > 0) { + b = PeekConsoleInput(hdl, &inp_rec, 1, &nRead); + if (!b) { + T(("twait:err PeekConsoleInput")); + } + if (b && nRead > 0) { + switch (inp_rec.EventType) { + case KEY_EVENT: + if (mode & TW_INPUT) { + WORD vk = + inp_rec.Event.KeyEvent.wVirtualKeyCode; + char ch = + inp_rec.Event.KeyEvent.uChar.AsciiChar; + T(("twait:event KEY_EVENT")); + T(("twait vk=%d, ch=%d, keydown=%d", + vk, ch, inp_rec.Event.KeyEvent.bKeyDown)); + if (inp_rec.Event.KeyEvent.bKeyDown) { + T(("twait:event KeyDown")); + if (!WINCONSOLE.isTermInfoConsole && + (0 == ch)) { + int nKey = MapKey(vk); + if (nKey < 0) { + CONSUME(); + continue; + } + } + code = TW_INPUT; + goto end; + } else { + CONSUME(); + } + } + continue; + case MOUSE_EVENT: + T(("twait:event MOUSE_EVENT")); + if (decode_mouse(sp, + (inp_rec.Event.MouseEvent.dwButtonState + & BUTTON_MASK)) == 0) { + CONSUME(); + } else if (mode & TW_MOUSE) { + code = TW_MOUSE; + goto end; + } + continue; + /* e.g., FOCUS_EVENT */ + default: + T(("twait:event Tyoe %d", inp_rec.EventType)); + CONSUME(); + _nc_console_selectActiveHandle(); + continue; + } + } + } + } + continue; + } else { + if (rc != WAIT_TIMEOUT) { + code = -1; + break; + } else { + code = 0; + break; + } + } } -end: + end: TR(TRACE_IEVENT, ("end twait: returned %d (%lu), remaining time %d msec", - code, GetLastError(), milliseconds)); + code, GetLastError(), milliseconds)); if (timeleft) - *timeleft = milliseconds; + *timeleft = milliseconds; return code; } NCURSES_EXPORT(int) _nc_console_testmouse( - SCREEN *sp, - HANDLE hdl, - int delay - EVENTLIST_2nd(_nc_eventlist * evl)) + SCREEN *sp, + HANDLE hdl, + int delay + EVENTLIST_2nd(_nc_eventlist * evl)) { int rc = 0; assert(sp); if (sp->_drv_mouse_head < sp->_drv_mouse_tail) { - rc = TW_MOUSE; + rc = TW_MOUSE; } else { - rc = _nc_console_twait(sp, - hdl, - TWAIT_MASK, - delay, - (int *) 0 - EVENTLIST_2nd(evl)); + rc = _nc_console_twait(sp, + hdl, + TWAIT_MASK, + delay, + (int *) 0 + EVENTLIST_2nd(evl)); } return rc; } NCURSES_EXPORT(int) _nc_console_read( - SCREEN *sp, - HANDLE hdl, - int *buf) + SCREEN *sp, + HANDLE hdl, + int *buf) { int rc = -1; INPUT_RECORD inp_rec; @@ -1054,47 +1038,47 @@ _nc_console_read( T((T_CALLED("lib_win32con::_nc_console_read(%p)"), sp)); while ((b = ReadConsoleInput(hdl, &inp_rec, 1, &nRead))) { - if (b && nRead > 0) { - if (rc < 0) - rc = 0; - rc = rc + (int) nRead; - if (inp_rec.EventType == KEY_EVENT) { - if (!inp_rec.Event.KeyEvent.bKeyDown) - continue; - *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar; - vk = inp_rec.Event.KeyEvent.wVirtualKeyCode; - /* - * There are 24 virtual function-keys, and typically - * 12 function-keys on a keyboard. Use the shift-modifier - * to provide the remaining 12 keys. - */ - if (vk >= VK_F1 && vk <= VK_F12) { - if (inp_rec.Event.KeyEvent.dwControlKeyState & - SHIFT_PRESSED) { - vk = (WORD) (vk + 12); - } - } - if (*buf == 0) { - int key = MapKey(vk); - if (key < 0) - continue; - if (sp->_keypad_on) { - *buf = key; - } else { - ungetch('\0'); - *buf = AnsiKey(vk); - } - } - break; - } else if (inp_rec.EventType == MOUSE_EVENT) { - if (handle_mouse(sp, - inp_rec.Event.MouseEvent)) { - *buf = KEY_MOUSE; - break; - } - } - continue; - } + if (b && nRead > 0) { + if (rc < 0) + rc = 0; + rc = rc + (int) nRead; + if (inp_rec.EventType == KEY_EVENT) { + if (!inp_rec.Event.KeyEvent.bKeyDown) + continue; + *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar; + vk = inp_rec.Event.KeyEvent.wVirtualKeyCode; + /* + * There are 24 virtual function-keys, and typically + * 12 function-keys on a keyboard. Use the shift-modifier + * to provide the remaining 12 keys. + */ + if (vk >= VK_F1 && vk <= VK_F12) { + if (inp_rec.Event.KeyEvent.dwControlKeyState & + SHIFT_PRESSED) { + vk = (WORD) (vk + 12); + } + } + if (*buf == 0) { + int key = MapKey(vk); + if (key < 0) + continue; + if (sp->_keypad_on) { + *buf = key; + } else { + ungetch('\0'); + *buf = AnsiKey(vk); + } + } + break; + } else if (inp_rec.EventType == MOUSE_EVENT) { + if (handle_mouse(sp, + inp_rec.Event.MouseEvent)) { + *buf = KEY_MOUSE; + break; + } + } + continue; + } } returnCode(rc); } @@ -1115,16 +1099,17 @@ _nc_console_isatty(int fd) T((T_CALLED("lib_win32con::_nc_console_isatty(%d"), fd)); if (_isatty(fd)) - result = 1; + result = 1; #ifdef _NC_CHECK_MINTTY else { - if (_nc_console_checkmintty(fd, NULL)) { - result = 2; - fprintf(stderr, "ncurses on Windows must run in a Windows console.\n"); - fprintf(stderr, "On newer versions of Windows, the calling program should create a PTY-like.\n"); - fprintf(stderr, "device using the CreatePseudoConsole Windows API call.\n"); - exit(EXIT_FAILURE); - } + if (_nc_console_checkmintty(fd, NULL)) { + result = 2; + fprintf(stderr, + "ncurses on Windows must run in a Windows console.\n" + "On newer versions of Windows, the calling program should create a PTY-like.\n" + "device using the CreatePseudoConsole Windows API call.\n"); + exit(EXIT_FAILURE); + } } #endif returnCode(result); @@ -1139,116 +1124,127 @@ _nc_console_checkinit(bool initFlag, bool assumeTermInfo) initFlag, assumeTermInfo)); if (!initFlag) { - res = console_initialized; + res = console_initialized; } else { - /* initialize once, or not at all */ - if (!console_initialized) { - int i; - DWORD num_buttons; - WORD a; - BOOL buffered = FALSE; - BOOL b; - - START_TRACE(); - WINCONSOLE.isTermInfoConsole = assumeTermInfo; - - WINCONSOLE.map = (LPDWORD)malloc(sizeof(DWORD)*MAPSIZE); - WINCONSOLE.rmap = (LPDWORD)malloc(sizeof(DWORD)*MAPSIZE); - WINCONSOLE.ansi_map = (LPDWORD)malloc(sizeof(DWORD)*MAPSIZE); - - for (i = 0; i < (N_INI + FKEYS); i++) { - if (i < N_INI) { - WINCONSOLE.rmap[i] = WINCONSOLE.map[i] = - (DWORD) keylist[i]; - WINCONSOLE.ansi_map[i] = (DWORD) ansi_keys[i]; - } else { - WINCONSOLE.rmap[i] = WINCONSOLE.map[i] = - (DWORD) GenMap((VK_F1 + (i - N_INI)), - (KEY_F(1) + (i - N_INI))); - WINCONSOLE.ansi_map[i] = - (DWORD) GenMap((VK_F1 + (i - N_INI)), - (';' + (i - N_INI))); - } - } - qsort(WINCONSOLE.ansi_map, - (size_t) (MAPSIZE), - sizeof(keylist[0]), - keycompare); - qsort(WINCONSOLE.map, - (size_t) (MAPSIZE), - sizeof(keylist[0]), - keycompare); - qsort(WINCONSOLE.rmap, - (size_t) (MAPSIZE), - sizeof(keylist[0]), - rkeycompare); - - if (GetNumberOfConsoleMouseButtons(&num_buttons)) { - WINCONSOLE.numButtons = (int) num_buttons; - } else { - WINCONSOLE.numButtons = 1; - } - - a = _nc_console_MapColor(true, COLOR_WHITE) | - _nc_console_MapColor(false, COLOR_BLACK); - for (i = 0; i < CON_NUMPAIRS; i++) - WINCONSOLE.pairs[i] = a; - - WINCONSOLE.inp = GetStdHandle(STD_INPUT_HANDLE); - WINCONSOLE.out = GetStdHandle(STD_OUTPUT_HANDLE); - WINCONSOLE.hdl = WINCONSOLE.out; - - GetConsoleMode(WINCONSOLE.inp, &WINCONSOLE.originalMode.dwFlagIn); - GetConsoleMode(WINCONSOLE.out, &WINCONSOLE.originalMode.dwFlagOut); - - if (!WINCONSOLE.isTermInfoConsole) { - b = AllocConsole(); - - if (!b) - b = AttachConsole(ATTACH_PARENT_PROCESS); - - if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) { - T(("... will not buffer console")); - } else { - T(("... creating console buffer")); - WINCONSOLE.hdl = - CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - CONSOLE_TEXTMODE_BUFFER, - NULL); - buffered = TRUE; - } - } - - /* We set binary I/O even when using the console - driver to cover the situation, that the - TERM variable is set to #win32con, but actually - Windows supports virtual terminal processing. - So if terminfo functions are used in this setup, - they actually may work. - */ - _setmode(fileno(stdin), _O_BINARY); - _setmode(fileno(stdout), _O_BINARY); - - if (WINCONSOLE.hdl != INVALID_HANDLE_VALUE) { - WINCONSOLE.buffered = buffered; - _nc_console_get_SBI(); - WINCONSOLE.save_SBI = WINCONSOLE.SBI; - if (!buffered) { - save_original_screen(); - _nc_console_set_scrollback(FALSE, &WINCONSOLE.SBI); - } - GetConsoleCursorInfo(WINCONSOLE.hdl, &WINCONSOLE.save_CI); - T(("... initial cursor is %svisible, %d%%", - (WINCONSOLE.save_CI.bVisible ? "" : "not-"), - (int) WINCONSOLE.save_CI.dwSize)); - } - - WINCONSOLE.initialized = TRUE; - console_initialized = TRUE; - } - res = (WINCONSOLE.hdl != INVALID_HANDLE_VALUE); + /* initialize once, or not at all */ + if (!console_initialized) { + int i; + DWORD num_buttons; + WORD a; + BOOL buffered = FALSE; + BOOL b; + + START_TRACE(); + WINCONSOLE.isTermInfoConsole = assumeTermInfo; + + WINCONSOLE.map = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE); + WINCONSOLE.rmap = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE); + WINCONSOLE.ansi_map = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE); + + for (i = 0; i < (N_INI + FKEYS); i++) { + if (i < N_INI) { + WINCONSOLE.rmap[i] = WINCONSOLE.map[i] = + (DWORD) keylist[i]; + WINCONSOLE.ansi_map[i] = (DWORD) ansi_keys[i]; + } else { + WINCONSOLE.rmap[i] = WINCONSOLE.map[i] = + (DWORD) GenMap((VK_F1 + (i - N_INI)), + (KEY_F(1) + (i - N_INI))); + WINCONSOLE.ansi_map[i] = + (DWORD) GenMap((VK_F1 + (i - N_INI)), + (';' + (i - N_INI))); + } + } + qsort(WINCONSOLE.ansi_map, + (size_t) (MAPSIZE), + sizeof(keylist[0]), + keycompare); + qsort(WINCONSOLE.map, + (size_t) (MAPSIZE), + sizeof(keylist[0]), + keycompare); + qsort(WINCONSOLE.rmap, + (size_t) (MAPSIZE), + sizeof(keylist[0]), + rkeycompare); + + if (GetNumberOfConsoleMouseButtons(&num_buttons)) { + WINCONSOLE.numButtons = (int) num_buttons; + } else { + WINCONSOLE.numButtons = 1; + } + + a = _nc_console_MapColor(true, COLOR_WHITE) | + _nc_console_MapColor(false, COLOR_BLACK); + for (i = 0; i < CON_NUMPAIRS; i++) + WINCONSOLE.pairs[i] = a; + +#define SaveConsoleMode(handle, value) \ + GetConsoleMode(WINCONSOLE.handle, &WINCONSOLE.originalMode.value) + + if (WINCONSOLE.isTermInfoConsole) { + WINCONSOLE.inp = GetStdHandle(STD_INPUT_HANDLE); + WINCONSOLE.out = GetStdHandle(STD_OUTPUT_HANDLE); + WINCONSOLE.hdl = WINCONSOLE.out; + + SaveConsoleMode(inp, dwFlagIn); + SaveConsoleMode(out, dwFlagOut); + + } else { + b = AllocConsole(); + + if (!b) + b = AttachConsole(ATTACH_PARENT_PROCESS); + + WINCONSOLE.inp = GetDirectHandle("CONIN$", FILE_SHARE_READ); + WINCONSOLE.out = GetDirectHandle("CONOUT$", FILE_SHARE_WRITE); + + SaveConsoleMode(inp, dwFlagIn); + SaveConsoleMode(out, dwFlagOut); + + if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) { + WINCONSOLE.hdl = WINCONSOLE.out; + T(("... will not buffer console")); + } else { + T(("... creating console buffer")); + WINCONSOLE.hdl = + CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + CONSOLE_TEXTMODE_BUFFER, + NULL); + buffered = TRUE; + } + } + + /* We set binary I/O even when using the console + driver to cover the situation, that the + TERM variable is set to #win32con, but actually + Windows supports virtual terminal processing. + So if terminfo functions are used in this setup, + they actually may work. + */ + _setmode(fileno(stdin), _O_BINARY); + _setmode(fileno(stdout), _O_BINARY); + + if (WINCONSOLE.hdl != INVALID_HANDLE_VALUE) { + WINCONSOLE.buffered = buffered; + _nc_console_get_SBI(); + WINCONSOLE.save_SBI = WINCONSOLE.SBI; + if (!buffered) { + save_original_screen(); + _nc_console_set_scrollback(FALSE, &WINCONSOLE.SBI); + } + GetConsoleCursorInfo(WINCONSOLE.hdl, &WINCONSOLE.save_CI); + T(("... initial cursor is %svisible, %d%%", + (WINCONSOLE.save_CI.bVisible ? "" : "not-"), + (int) WINCONSOLE.save_CI.dwSize)); + } + + WINCONSOLE.initialized = TRUE; + console_initialized = TRUE; + } + res = (WINCONSOLE.hdl != INVALID_HANDLE_VALUE); } returnBool(res); } diff --git a/ncurses/tinfo/lib_win32util.c b/ncurses/tinfo/lib_win32util.c index 1482916d..c67c8ceb 100644 --- a/ncurses/tinfo/lib_win32util.c +++ b/ncurses/tinfo/lib_win32util.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -34,7 +34,7 @@ #include -MODULE_ID("$Id: lib_win32util.c,v 1.2 2021/09/04 10:54:35 tom Exp $") +MODULE_ID("$Id: lib_win32util.c,v 1.4 2023/06/17 17:19:06 tom Exp $") #ifdef _NC_WINDOWS #include @@ -54,7 +54,7 @@ MODULE_ID("$Id: lib_win32util.c,v 1.2 2021/09/04 10:54:35 tom Exp $") Pipe and can query the server side of the pipe, looking whether or not this is mintty. For now we terminate the program if we discover that situation. - Althogh in theory it would be possible, to remotely manipulate + Although in theory it would be possible, to remotely manipulate the terminal state of mintty, this is out of scope for now and not worth the significant effort. */ @@ -68,10 +68,10 @@ _nc_console_checkmintty(int fd, LPHANDLE pMinTTY) T((T_CALLED("lib_winhelper::_nc_console_checkmintty(%d, %p)"), fd, pMinTTY)); if (handle != INVALID_HANDLE_VALUE) { - dw = GetFileType(handle); + dw = GetFileType(handle); if (dw == FILE_TYPE_PIPE) { if (GetNamedPipeInfo(handle, 0, 0, 0, 0)) { - ULONG pPid; + ULONG pPid; /* Requires NT6 */ if (GetNamedPipeServerProcessId(handle, &pPid)) { TCHAR buf[MAX_PATH]; @@ -79,8 +79,7 @@ _nc_console_checkmintty(int fd, LPHANDLE pMinTTY) /* These security attributes may allow us to create a remote thread in mintty to manipulate the terminal state remotely */ - HANDLE pHandle = OpenProcess( - PROCESS_CREATE_THREAD + HANDLE pHandle = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE @@ -88,20 +87,19 @@ _nc_console_checkmintty(int fd, LPHANDLE pMinTTY) FALSE, pPid); if (pMinTTY) - *pMinTTY = INVALID_HANDLE_VALUE; + *pMinTTY = INVALID_HANDLE_VALUE; if (pHandle != INVALID_HANDLE_VALUE) { - if ((len = GetProcessImageFileName( - pHandle, + if ((len = GetProcessImageFileName(pHandle, buf, (DWORD) array_length(buf)))) { TCHAR *pos = _tcsrchr(buf, _T('\\')); if (pos) { - pos++; + pos++; if (_tcsnicmp(pos, _TEXT("mintty.exe"), 10) == 0) { if (pMinTTY) - *pMinTTY = pHandle; + *pMinTTY = pHandle; code = 1; } } @@ -114,7 +112,8 @@ _nc_console_checkmintty(int fd, LPHANDLE pMinTTY) returnCode(code); } #endif /* _NC_CHECK_MINTTY */ - + +#if HAVE_GETTIMEOFDAY == 2 #define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ NCURSES_EXPORT(int) @@ -130,5 +129,6 @@ _nc_gettimeofday(struct timeval *tv, void *tz GCC_UNUSED) tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL); return (0); } +#endif // HAVE_GETTIMEOFDAY == 2 #endif // _NC_WINDOWS diff --git a/ncurses/tinfo/make_hash.c b/ncurses/tinfo/make_hash.c index 9980279b..78a684cc 100644 --- a/ncurses/tinfo/make_hash.c +++ b/ncurses/tinfo/make_hash.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2024 Thomas E. Dickey * * Copyright 2009-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -44,7 +44,7 @@ #include -MODULE_ID("$Id: make_hash.c,v 1.33 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: make_hash.c,v 1.34 2024/03/02 19:35:40 tom Exp $") /* * _nc_make_hash_table() @@ -250,7 +250,7 @@ main(int argc, char **argv) struct user_table_entry *name_table = typeCalloc(struct user_table_entry, tablesize); HashValue *hash_table = typeCalloc(HashValue, HASHTABSIZE); - const char *root_name = ""; + const char *root_name; int column = 0; int bigstring = 0; unsigned n; diff --git a/ncurses/tinfo/obsolete.c b/ncurses/tinfo/obsolete.c index 972a9a18..cc62f18c 100644 --- a/ncurses/tinfo/obsolete.c +++ b/ncurses/tinfo/obsolete.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2013-2014,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ #include -MODULE_ID("$Id: obsolete.c,v 1.6 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: obsolete.c,v 1.11 2023/10/21 15:38:47 tom Exp $") /* * Obsolete entrypoint retained for binary compatibility. @@ -238,3 +238,98 @@ _nc_conv_to_utf32(unsigned *target, const char *source, unsigned limit) #undef CH } #endif /* EXP_XTERM_1005 */ + +#ifdef EXP_OOM_TESTING +/* + * Out-of-memory testing, suitable for checking if initialization (and limited + * running) recovers from errors due to insufficient memory. In practice, this + * is unlikely except with artificially constructed tests (or poorly behaved + * applications). + */ +#undef malloc +#undef calloc +#undef realloc +#undef free +#undef strdup + +#define TR_OOM(stmt) T(stmt) + +static long oom_limit = -1; +static long oom_count = 0; + +static bool +oom_check(void) +{ + static bool initialized = FALSE; + static bool triggered = FALSE; + bool result = FALSE; + + if (!initialized) { + char *env = getenv("NCURSES_OOM_TESTING"); + initialized = TRUE; + if (env != NULL) { + char *check; + oom_limit = strtol(env, &check, 0); + if (check != NULL && *check != '\0') + oom_limit = 0; + } + } + ++oom_count; + if (oom_limit >= 0) { + result = (oom_count > oom_limit); + if (result && !triggered) { + triggered = TRUE; + TR_OOM(("out-of-memory")); + } + } + return result; +} + +NCURSES_EXPORT(void *) +_nc_oom_malloc(size_t size) +{ + char *result = (oom_check() + ? NULL + : malloc(size)); + TR_OOM(("oom #%ld malloc(%ld) %p", oom_count, size, result)); + return result; +} + +NCURSES_EXPORT(void *) +_nc_oom_calloc(size_t nmemb, size_t size) +{ + char *result = (oom_check() + ? NULL + : calloc(nmemb, size)); + TR_OOM(("oom #%ld calloc(%ld, %ld) %p", oom_count, nmemb, size, result)); + return result; +} + +NCURSES_EXPORT(void *) +_nc_oom_realloc(void *ptr, size_t size) +{ + char *result = (oom_check() + ? NULL + : realloc(ptr, size)); + TR_OOM(("oom #%ld realloc(%p, %ld) %p", oom_count, ptr, size, result)); + return result; +} + +NCURSES_EXPORT(void) +_nc_oom_free(void *ptr) +{ + ++oom_count; + TR_OOM(("oom #%ld free(%p)", oom_count, ptr)); + free(ptr); +} + +NCURSES_EXPORT(char *) +_nc_oom_strdup(const char *ptr) +{ + char *result = (oom_check() + ? NULL + : strdup(ptr)); + TR_OOM(("oom #%ld strdup(%p) %p", oom_count, ptr, result)); + return result; +} +#endif /* EXP_OOM_TESTING */ diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c index a77cd0b2..13fef495 100644 --- a/ncurses/tinfo/parse_entry.c +++ b/ncurses/tinfo/parse_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: parse_entry.c,v 1.102 2021/09/04 10:54:35 tom Exp $") +MODULE_ID("$Id: parse_entry.c,v 1.108 2023/04/24 22:32:33 tom Exp $") #ifdef LINT static short const parametrized[] = @@ -110,7 +110,7 @@ _nc_extend_names(ENTRY * entryp, const char *name, int token_type) /* Well, we are given a cancel for a name that we don't recognize */ return _nc_extend_names(entryp, name, STRING); default: - return 0; + return NULL; } /* Adjust the 'offset' (insertion-point) to keep the lists of extended @@ -142,6 +142,11 @@ _nc_extend_names(ENTRY * entryp, const char *name, int token_type) for (last = (unsigned) (max - 1); last > tindex; last--) if (!found) { + char *saved; + + if ((saved = _nc_save_str(name)) == NULL) + return NULL; + switch (token_type) { case BOOLEAN: tp->ext_Booleans++; @@ -169,7 +174,7 @@ _nc_extend_names(ENTRY * entryp, const char *name, int token_type) TYPE_REALLOC(char *, actual, tp->ext_Names); while (--actual > offset) tp->ext_Names[actual] = tp->ext_Names[actual - 1]; - tp->ext_Names[offset] = _nc_save_str(name); + tp->ext_Names[offset] = saved; } temp.nte_name = tp->ext_Names[offset]; @@ -214,16 +219,39 @@ expected_type(const char *name, int token_type, bool silent) } #endif /* NCURSES_XNAMES */ +/* + * A valid entry name uses characters from the "portable character set" + * (more commonly referred to as US-ASCII), and disallows some of the + * punctuation characters: + * + * '/' is a pathname separator + * '\' may be a pathname separator, but more important, is an escape + * '|' delimits names and description + * '#' denotes a numeric value + * '=' denotes a string value + * '@' denotes a cancelled symbol + * ',' separates terminfo capabilities + * ':' separates termcap capabilities + * + * Termcap capability names may begin with a '#' or '@' (since they have + * exactly two characters). + */ static bool valid_entryname(const char *name) { bool result = TRUE; + bool first = TRUE; int ch; while ((ch = UChar(*name++)) != '\0') { - if (ch <= ' ' || ch > '~' || ch == '/') { + if (ch <= ' ' || ch > '~' || strchr("/\\|=,:", ch) != NULL) { + result = FALSE; + break; + } + if (!first && strchr("#@", ch) != NULL) { result = FALSE; break; } + first = FALSE; } return result; } @@ -262,10 +290,14 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent) const char *name; bool bad_tc_usage = FALSE; + TR(TRACE_DATABASE, + (T_CALLED("_nc_parse_entry(entry=%p, literal=%d, silent=%d)"), + (void *) entryp, literal, silent)); + token_type = _nc_get_token(silent); if (token_type == EOF) - return (EOF); + returnDB(EOF); if (token_type != NAMES) _nc_err_abort("Entry does not start with terminal names in column one"); @@ -301,9 +333,9 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent) entryp->tterm.str_table = entryp->tterm.term_names = _nc_save_str(ptr); if (entryp->tterm.str_table == 0) - return (ERR); + returnDB(ERR); - DEBUG(1, ("Starting '%s'", ptr)); + DEBUG(2, ("Starting '%s'", ptr)); /* * We do this because the one-token lookahead in the parse loop @@ -337,6 +369,8 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent) bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0); bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0); if (is_use || is_tc) { + char *saved; + if (!VALID_STRING(_nc_curr_token.tk_valstring) || _nc_curr_token.tk_valstring[0] == '\0') { _nc_warning("missing name for use-clause"); @@ -350,11 +384,13 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent) _nc_curr_token.tk_valstring); continue; } - entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring); - entryp->uses[entryp->nuses].line = _nc_curr_line; - entryp->nuses++; - if (entryp->nuses > 1 && is_tc) { - BAD_TC_USAGE + if ((saved = _nc_save_str(_nc_curr_token.tk_valstring)) != NULL) { + entryp->uses[entryp->nuses].name = saved; + entryp->uses[entryp->nuses].line = _nc_curr_line; + entryp->nuses++; + if (entryp->nuses > 1 && is_tc) { + BAD_TC_USAGE + } } } else { /* normal token lookup */ @@ -605,7 +641,7 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent) } _nc_wrap_entry(entryp, FALSE); - return (OK); + returnDB(OK); } NCURSES_EXPORT(int) @@ -737,6 +773,10 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base) char buf[MAX_LINE * 2 + 2]; string_desc result; + TR(TRACE_DATABASE, + (T_CALLED("postprocess_termcap(tp=%p, has_base=%d)"), + (void *) tp, has_base)); + /* * TERMCAP DEFAULTS AND OBSOLETE-CAPABILITY TRANSLATIONS * @@ -1023,11 +1063,16 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base) && PRESENT(exit_alt_charset_mode)) { acs_chars = _nc_save_str(VT_ACSC); } + returnVoidDB; } static void postprocess_terminfo(TERMTYPE2 *tp) { + TR(TRACE_DATABASE, + (T_CALLED("postprocess_terminfo(tp=%p)"), + (void *) tp)); + /* * TERMINFO-TO-TERMINFO MAPPINGS FOR SOURCE TRANSLATION * ---------------------------------------------------------------------- @@ -1064,6 +1109,7 @@ postprocess_terminfo(TERMTYPE2 *tp) /* * ---------------------------------------------------------------------- */ + returnVoidDB; } /* diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c index 41ef0d0a..b0f360ec 100644 --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,9 +42,7 @@ #include -MODULE_ID("$Id: read_entry.c,v 1.161 2021/06/26 19:43:17 tom Exp $") - -#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts)) +MODULE_ID("$Id: read_entry.c,v 1.171 2023/09/16 16:30:34 tom Exp $") #define MyNumber(n) (short) LOW_MSB(n) @@ -140,11 +138,13 @@ convert_16bits(char *buf, NCURSES_INT2 *Numbers, int count) } #endif -static void -convert_strings(char *buf, char **Strings, int count, int size, char *table) +static bool +convert_strings(char *buf, char **Strings, int count, int size, + char *table, bool always) { int i; char *p; + bool success = TRUE; for (i = 0; i < count; i++) { if (IS_NEG1(buf + 2 * i)) { @@ -154,8 +154,17 @@ convert_strings(char *buf, char **Strings, int count, int size, char *table) } else if (MyNumber(buf + 2 * i) > size) { Strings[i] = ABSENT_STRING; } else { - Strings[i] = (MyNumber(buf + 2 * i) + table); - TR(TRACE_DATABASE, ("Strings[%d] = %s", i, _nc_visbuf(Strings[i]))); + int nn = MyNumber(buf + 2 * i); + if (nn >= 0 && nn < size) { + Strings[i] = (nn + table); + TR(TRACE_DATABASE, ("Strings[%d] = %s", i, + _nc_visbuf(Strings[i]))); + } else { + TR(TRACE_DATABASE, + ("found out-of-range index %d to Strings[%d]", nn, i)); + success = FALSE; + break; + } } /* make sure all strings are NUL terminated */ @@ -164,10 +173,25 @@ convert_strings(char *buf, char **Strings, int count, int size, char *table) if (*p == '\0') break; /* if there is no NUL, ignore the string */ - if (p >= table + size) + if (p >= table + size) { Strings[i] = ABSENT_STRING; + } else if (p == Strings[i] && always) { + TR(TRACE_DATABASE, + ("found empty but required Strings[%d]", i)); + success = FALSE; + break; + } + } else if (always) { /* names are always needed */ + TR(TRACE_DATABASE, + ("found invalid but required Strings[%d]", i)); + success = FALSE; + break; } } + if (!success) { + _nc_warning("corrupt data found in convert_strings"); + } + return success; } static int @@ -203,6 +227,8 @@ _nc_init_termtype(TERMTYPE2 *const tp) { unsigned i; + DEBUG(2, (T_CALLED("_nc_init_termtype(tp=%p)"), (void *) tp)); + #if NCURSES_XNAMES tp->num_Booleans = BOOLCOUNT; tp->num_Numbers = NUMCOUNT; @@ -226,6 +252,8 @@ _nc_init_termtype(TERMTYPE2 *const tp) for_each_string(i, tp) tp->Strings[i] = ABSENT_STRING; + + DEBUG(2, (T_RETURN(""))); } #if NCURSES_USE_DATABASE @@ -308,6 +336,9 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) || bool_count < 0 || num_count < 0 || str_count < 0 + || bool_count > BOOLCOUNT + || num_count > NUMCOUNT + || str_count > STRCOUNT || str_size < 0) { returnDB(TGETENT_NO); } @@ -320,7 +351,7 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) } /* grab the name (a null-terminated string) */ - want = min(MAX_NAME_SIZE, (unsigned) name_size); + want = Min(MAX_NAME_SIZE, (unsigned) name_size); ptr->str_table = string_table; ptr->term_names = string_table; if ((have = (unsigned) Read(ptr->term_names, want)) != want) { @@ -333,9 +364,8 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) offset = (int) (have - MAX_NAME_SIZE); /* grab the booleans */ - if ((ptr->Booleans = TYPE_CALLOC(NCURSES_SBOOL, - max(BOOLCOUNT, bool_count))) == 0 - || Read(ptr->Booleans, (unsigned) bool_count) < bool_count) { + TYPE_CALLOC(NCURSES_SBOOL, Max(BOOLCOUNT, bool_count), ptr->Booleans); + if (Read(ptr->Booleans, (unsigned) bool_count) < bool_count) { returnDB(TGETENT_NO); } @@ -348,15 +378,13 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) even_boundary(name_size + bool_count); /* grab the numbers */ - if (!(ptr->Numbers = TYPE_CALLOC(NCURSES_INT2, max(NUMCOUNT, num_count))) - || !read_numbers(buf, num_count)) { + TYPE_CALLOC(NCURSES_INT2, Max(NUMCOUNT, num_count), ptr->Numbers); + if (!read_numbers(buf, num_count)) { returnDB(TGETENT_NO); } convert_numbers(buf, ptr->Numbers, num_count); - if ((ptr->Strings = TYPE_CALLOC(char *, max(STRCOUNT, str_count))) == 0) { - returnDB(TGETENT_NO); - } + TYPE_CALLOC(char *, Max(STRCOUNT, str_count), ptr->Strings); if (str_count) { /* grab the string offsets */ @@ -367,7 +395,10 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) if (Read(string_table, (unsigned) str_size) != str_size) { returnDB(TGETENT_NO); } - convert_strings(buf, ptr->Strings, str_count, str_size, string_table); + if (!convert_strings(buf, ptr->Strings, str_count, str_size, + string_table, FALSE)) { + returnDB(TGETENT_NO); + } } #if NCURSES_XNAMES @@ -468,8 +499,10 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) ("Before computing extended-string capabilities " "str_count=%d, ext_str_count=%d", str_count, ext_str_count)); - convert_strings(buf, ptr->Strings + str_count, ext_str_count, - ext_str_limit, ptr->ext_str_table); + if (!convert_strings(buf, ptr->Strings + str_count, ext_str_count, + ext_str_limit, ptr->ext_str_table, FALSE)) { + returnDB(TGETENT_NO); + } for (i = ext_str_count - 1; i >= 0; i--) { TR(TRACE_DATABASE, ("MOVE from [%d:%d] %s", i, i + str_count, @@ -497,16 +530,17 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) if (ext_str_count >= (max_entry_size / 2)) { returnDB(TGETENT_NO); } - if ((ptr->ext_Names = TYPE_CALLOC(char *, need)) == 0) { - returnDB(TGETENT_NO); - } + TYPE_CALLOC(char *, need, ptr->ext_Names); TR(TRACE_DATABASE, ("ext_NAMES starting @%d in extended_strings, first = %s", base, _nc_visbuf(ptr->ext_str_table + base))); - convert_strings(buf + (2 * ext_str_count), - ptr->ext_Names, - (int) need, - ext_str_limit, ptr->ext_str_table + base); + if (!convert_strings(buf + (2 * ext_str_count), + ptr->ext_Names, + (int) need, + ext_str_limit, ptr->ext_str_table + base, + TRUE)) { + returnDB(TGETENT_NO); + } } TR(TRACE_DATABASE, @@ -559,13 +593,17 @@ _nc_read_file_entry(const char *const filename, TERMTYPE2 *ptr) int limit; char buffer[MAX_ENTRY_SIZE + 1]; - if ((limit = (int) fread(buffer, sizeof(char), sizeof(buffer), fp)) - > 0) { + limit = (int) fread(buffer, sizeof(char), sizeof(buffer), fp); + if (limit > 0) { + const char *old_source = _nc_get_source(); TR(TRACE_DATABASE, ("read terminfo %s", filename)); + if (old_source == NULL) + _nc_set_source(filename); if ((code = _nc_read_termtype(ptr, buffer, limit)) == TGETENT_NO) { _nc_free_termtype2(ptr); } + _nc_set_source(old_source); } else { code = TGETENT_NO; } @@ -765,6 +803,9 @@ _nc_read_tic_entry(char *filename, int reccnt = 0; char *save = strdup(name); + if (save == 0) + returnDB(code); + memset(&key, 0, sizeof(key)); key.data = save; key.size = strlen(save); @@ -879,9 +920,6 @@ _nc_read_entry2(const char *const name, char *const filename, TERMTYPE2 *const t } #if NCURSES_EXT_NUMBERS -/* - * This entrypoint is used by tack 1.07 - */ NCURSES_EXPORT(int) _nc_read_entry(const char *const name, char *const filename, TERMTYPE *const tp) { diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c index c9696b70..1a294848 100644 --- a/ncurses/tinfo/read_termcap.c +++ b/ncurses/tinfo/read_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -57,7 +57,7 @@ #include #include -MODULE_ID("$Id: read_termcap.c,v 1.102 2021/09/04 10:29:15 tom Exp $") +MODULE_ID("$Id: read_termcap.c,v 1.104 2023/06/24 21:53:16 tom Exp $") #if !PURE_TERMINFO @@ -324,7 +324,7 @@ _nc_getent( if (fd >= 0) { (void) lseek(fd, (off_t) 0, SEEK_SET); } else if ((_nc_access(db_array[current], R_OK) < 0) - || (fd = open(db_array[current], O_RDONLY, 0)) < 0) { + || (fd = safe_open2(db_array[current], O_RDONLY)) < 0) { /* No error on unfound file. */ if (errno == ENOENT) continue; @@ -1055,15 +1055,15 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp) if (normal) { /* normal case */ char envhome[PATH_MAX], *h; - copied = strdup(get_termpath()); - for (cp = copied; *cp; cp++) { - if (*cp == NCURSES_PATHSEP) - *cp = '\0'; - else if (cp == copied || cp[-1] == '\0') { - ADD_TC(cp, filecount); + if ((copied = strdup(get_termpath())) != 0) { + for (cp = copied; *cp; cp++) { + if (*cp == NCURSES_PATHSEP) + *cp = '\0'; + else if (cp == copied || cp[-1] == '\0') { + ADD_TC(cp, filecount); + } } } - #define PRIVATE_CAP "%.*s/.termcap" if (use_terminfo_vars() && (h = getenv("HOME")) != NULL && *h != '\0' diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c index a1d8beb6..03f59c24 100644 --- a/ncurses/tinfo/strings.c +++ b/ncurses/tinfo/strings.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2000-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include #include -MODULE_ID("$Id: strings.c,v 1.10 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: strings.c,v 1.11 2023/05/27 20:13:10 tom Exp $") /**************************************************************************** * Useful string functions (especially for mvcur) @@ -95,7 +95,7 @@ _nc_str_null(string_desc * dst, size_t len) * Copy a descriptor */ NCURSES_EXPORT(string_desc *) -_nc_str_copy(string_desc * dst, string_desc * src) +_nc_str_copy(string_desc * dst, const string_desc * const src) { *dst = *src; return dst; diff --git a/ncurses/tinfo/tinfo_driver.c b/ncurses/tinfo/tinfo_driver.c index fb6496f0..fd993b82 100644 --- a/ncurses/tinfo/tinfo_driver.c +++ b/ncurses/tinfo/tinfo_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2008-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -52,7 +52,7 @@ # endif #endif -MODULE_ID("$Id: tinfo_driver.c,v 1.72 2021/06/17 21:30:22 tom Exp $") +MODULE_ID("$Id: tinfo_driver.c,v 1.74 2023/09/16 10:44:33 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -206,8 +206,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret) save_ttytype(termp); #endif - if (command_character) - _nc_tinfo_cmdch(termp, *command_character); + if (VALID_STRING(command_character)) + _nc_tinfo_cmdch(termp, UChar(*command_character)); /* * If an application calls setupterm() rather than initscr() or @@ -1282,10 +1282,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf) assert(buf); SetSP(); -# if USE_PTHREADS_EINTR - if ((pthread_self) && (pthread_kill) && (pthread_equal)) - _nc_globals.read_thread = pthread_self(); -# endif + _nc_set_read_thread(TRUE); #ifdef EXP_WIN32_DRIVER n = _nc_console_read(sp, _nc_console_handle(sp->_ifd), @@ -1293,9 +1290,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf) #else n = (int) read(sp->_ifd, &c2, (size_t) 1); #endif -#if USE_PTHREADS_EINTR - _nc_globals.read_thread = 0; -#endif + _nc_set_read_thread(FALSE); #ifndef EXP_WIN32_DRIVER *buf = (int) c2; #endif diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c index 22bc82ff..177dcd87 100644 --- a/ncurses/tinfo/trim_sgr0.c +++ b/ncurses/tinfo/trim_sgr0.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2023 Thomas E. Dickey * * Copyright 2005-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,15 +37,11 @@ #include -MODULE_ID("$Id: trim_sgr0.c,v 1.21 2021/06/17 21:20:30 tom Exp $") +MODULE_ID("$Id: trim_sgr0.c,v 1.22 2023/09/23 18:47:56 tom Exp $") #undef CUR #define CUR tp-> -#define CSI 233 -#define ESC 033 /* ^[ */ -#define L_BRACK '[' - static char * set_attribute_9(TERMTYPE2 *tp, int flag) { @@ -65,9 +61,9 @@ is_csi(const char *s) { int result = 0; if (s != 0) { - if (UChar(s[0]) == CSI) + if (UChar(s[0]) == CSI_CHR) result = 1; - else if (s[0] == ESC && s[1] == L_BRACK) + else if (s[0] == ESC_CHR && s[1] == L_BLOCK) result = 2; } return result; diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index cab47570..8ccca9ec 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,6 +42,8 @@ #include +MODULE_ID("$Id: write_entry.c,v 1.132 2024/04/20 17:58:51 tom Exp $") + #if 1 #define TRACE_OUT(p) DEBUG(2, p) #define TRACE_NUM(n) if (VALID_NUMERIC(Numbers[n])) { \ @@ -51,7 +53,15 @@ #define TRACE_NUM(n) /* nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.118 2021/08/15 20:07:11 tom Exp $") +/* + * FIXME: special case to work around Cygwin bug in link(), which updates + * the target file's timestamp. + */ +#if HAVE_LINK && !USE_SYMLINKS && !MIXEDCASE_FILENAMES && defined(__CYGWIN__) +#define LINK_TOUCHES 1 +#else +#define LINK_TOUCHES 0 +#endif static int total_written; static int total_parts; @@ -77,7 +87,7 @@ write_file(char *filename, TERMTYPE2 *tp) if (fp == 0) { perror(filename); - _nc_syserr_abort("can't open %s/%s", _nc_tic_dir(0), filename); + _nc_syserr_abort("cannot open %s/%s", _nc_tic_dir(0), filename); } actual = fwrite(buffer, sizeof(char), (size_t) offset, fp); @@ -85,12 +95,12 @@ write_file(char *filename, TERMTYPE2 *tp) int myerr = ferror(fp) ? errno : 0; if (myerr) { _nc_syserr_abort("error writing %s/%s: %s", - _nc_tic_dir(0), + _nc_tic_dir(NULL), filename, strerror(myerr)); } else { _nc_syserr_abort("error writing %s/%s: %u bytes vs actual %lu", - _nc_tic_dir(0), + _nc_tic_dir(NULL), filename, offset, (unsigned long) actual); @@ -118,18 +128,16 @@ check_writeable(int code) char dir[sizeof(LEAF_FMT)]; char *s = 0; - if (code == 0 || (s = (strchr) (dirnames, code)) == 0) + if (code == 0 || (s = (strchr) (dirnames, code)) == 0) { _nc_err_abort("Illegal terminfo subdirectory \"" LEAF_FMT "\"", code); - - if (verified[s - dirnames]) - return; - - _nc_SPRINTF(dir, _nc_SLIMIT(sizeof(dir)) LEAF_FMT, code); - if (make_db_root(dir) < 0) { - _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir); + } else if (!verified[s - dirnames]) { + _nc_SPRINTF(dir, _nc_SLIMIT(sizeof(dir)) LEAF_FMT, code); + if (make_db_root(dir) < 0) { + _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(NULL), dir); + } else { + verified[s - dirnames] = TRUE; + } } - - verified[s - dirnames] = TRUE; } #endif /* !USE_HASHED_DB */ @@ -137,7 +145,7 @@ static int make_db_path(char *dst, const char *src, size_t limit) { int rc = -1; - const char *top = _nc_tic_dir(0); + const char *top = _nc_tic_dir(NULL); if (src == top || _nc_is_abs_path(src)) { if (strlen(src) + 1 <= limit) { @@ -145,7 +153,7 @@ make_db_path(char *dst, const char *src, size_t limit) rc = 0; } } else { - if (strlen(top) + strlen(src) + 2 <= limit) { + if ((strlen(top) + strlen(src) + 6) <= limit) { _nc_SPRINTF(dst, _nc_SLIMIT(limit) "%s/%s", top, src); rc = 0; } @@ -214,26 +222,30 @@ _nc_set_writedir(const char *dir) { const char *destination; char actual[PATH_MAX]; + bool specific = (dir != NULL); - if (dir == 0 -#ifndef USE_ROOT_ENVIRON - && use_terminfo_vars() -#endif - ) + if (!specific && use_terminfo_vars()) dir = getenv("TERMINFO"); - if (dir != 0) + if (dir != NULL) (void) _nc_tic_dir(dir); - destination = _nc_tic_dir(0); + destination = _nc_tic_dir(NULL); if (make_db_root(destination) < 0) { - char *home = _nc_home_terminfo(); + bool success = FALSE; + + if (!specific) { + char *home = _nc_home_terminfo(); - if (home != 0) { - destination = home; - if (make_db_root(destination) < 0) - _nc_err_abort("%s: permission denied (errno %d)", - destination, errno); + if (home != NULL) { + destination = home; + if (make_db_root(destination) == 0) + success = TRUE; + } + } + if (!success) { + _nc_err_abort("%s: permission denied (errno %d)", + destination, errno); } } @@ -245,10 +257,10 @@ _nc_set_writedir(const char *dir) make_db_path(actual, destination, sizeof(actual)); #else if (chdir(_nc_tic_dir(destination)) < 0 - || getcwd(actual, sizeof(actual)) == 0) + || getcwd(actual, sizeof(actual)) == NULL) _nc_err_abort("%s: not a directory", destination); #endif - _nc_keep_tic_dir(strdup(actual)); + _nc_keep_tic_dir(actual); } /* @@ -327,8 +339,9 @@ _nc_write_entry(TERMTYPE2 *const tp) if (ptr != name_list) { *ptr = '\0'; - for (ptr = name_list; *ptr != '\0' && *ptr != '|'; ptr++) - continue; + for (ptr = name_list; *ptr != '\0' && *ptr != '|'; ptr++) { + /* EMPTY */ ; + } if (*ptr == '\0') other_names = ptr; @@ -345,10 +358,10 @@ _nc_write_entry(TERMTYPE2 *const tp) #if USE_HASHED_DB if (_nc_write_object(tp, buffer + 1, &offset, limit - 1) != ERR) { - DB *capdb = _nc_db_open(_nc_tic_dir(0), TRUE); + DB *capdb = _nc_db_open(_nc_tic_dir(NULL), TRUE); DBT key, data; - if (capdb != 0) { + if (capdb != NULL) { buffer[0] = 0; memset(&key, 0, sizeof(key)); @@ -371,7 +384,7 @@ _nc_write_entry(TERMTYPE2 *const tp) sizeof(buffer) - 1); data.size = name_size + 1; - total_size += data.size; + total_size += (int) data.size; total_parts++; _nc_db_put(capdb, &key, &data); @@ -387,7 +400,7 @@ _nc_write_entry(TERMTYPE2 *const tp) key.data = ptr; key.size = strlen(ptr); - total_size += data.size; + total_size += (int) data.size; total_parts++; _nc_db_put(capdb, &key, &data); } @@ -445,7 +458,7 @@ _nc_write_entry(TERMTYPE2 *const tp) if (stat(filename, &statbuf) == -1 || (start_time = statbuf.st_mtime) == 0) { _nc_syserr_abort("error obtaining time from %s/%s", - _nc_tic_dir(0), filename); + _nc_tic_dir(NULL), filename); } } while (*other_names != '\0') { @@ -460,7 +473,7 @@ _nc_write_entry(TERMTYPE2 *const tp) _nc_warning("terminal alias %s too long.", ptr); continue; } - if (strchr(ptr, '/') != 0) { + if (strchr(ptr, '/') != NULL) { _nc_warning("cannot link alias %s.", ptr); continue; } @@ -472,10 +485,14 @@ _nc_write_entry(TERMTYPE2 *const tp) if (strcmp(filename, linkname) == 0) { _nc_warning("self-synonym ignored"); - } else if (stat(linkname, &statbuf) >= 0 && - statbuf.st_mtime < start_time) { + } +#if !LINK_TOUCHES + else if (stat(linkname, &statbuf) >= 0 && + statbuf.st_mtime < start_time) { _nc_warning("alias %s multiply defined.", ptr); - } else if (_nc_access(linkname, W_OK) == 0) + } +#endif + else if (_nc_access(linkname, W_OK) == 0) #if HAVE_LINK { int code; @@ -514,9 +531,9 @@ _nc_write_entry(TERMTYPE2 *const tp) write_file(linkname, tp); else { #if MIXEDCASE_FILENAMES - _nc_syserr_abort("can't link %s to %s", filename, linkname); + _nc_syserr_abort("cannot link %s to %s", filename, linkname); #else - _nc_warning("can't link %s to %s (errno=%d)", filename, + _nc_warning("cannot link %s to %s (errno=%d)", filename, linkname, errno); #endif } @@ -712,7 +729,7 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit) unsigned last_str = STRWRITE; #if NCURSES_EXT_NUMBERS bool need_ints = FALSE; - size_t (*convert_numbers) (unsigned char *, NCURSES_INT2 *, size_t) = convert_32bit; + size_t (*convert_numbers) (unsigned char *, NCURSES_INT2 *, size_t); #else #define convert_numbers convert_shorts #endif @@ -773,7 +790,8 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit) #else LITTLE_ENDIAN(buf, MAGIC); #endif - LITTLE_ENDIAN(buf + 2, min(namelen, MAX_NAME_SIZE + 1)); + namelen = Min(namelen, MAX_NAME_SIZE + 1); + LITTLE_ENDIAN(buf + 2, namelen); LITTLE_ENDIAN(buf + 4, boolmax); LITTLE_ENDIAN(buf + 6, nummax); LITTLE_ENDIAN(buf + 8, strmax); diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c index 9acbd471..0904c132 100644 --- a/ncurses/trace/lib_trace.c +++ b/ncurses/trace/lib_trace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: lib_trace.c,v 1.99 2021/06/26 20:44:59 tom Exp $") +MODULE_ID("$Id: lib_trace.c,v 1.106 2024/02/24 18:28:19 tom Exp $") NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */ @@ -89,43 +89,71 @@ NCURSES_EXPORT_VAR(long) _nc_outchars = 0; #define MyFP _nc_globals.trace_fp #define MyFD _nc_globals.trace_fd #define MyInit _nc_globals.trace_opened -#define MyPath _nc_globals.trace_fname #define MyLevel _nc_globals.trace_level #define MyNested _nc_globals.nested_tracef #endif /* TRACE */ +#if USE_REENTRANT +#define Locked(statement) \ + do { \ + _nc_lock_global(tst_tracef); \ + statement; \ + _nc_unlock_global(tst_tracef); \ + } while (0) +#else +#define Locked(statement) statement +#endif + NCURSES_EXPORT(unsigned) curses_trace(unsigned tracelevel) { unsigned result; + #if defined(TRACE) - result = _nc_tracing; + int bit; + +#define DATA(name) { name, #name } + static struct { + unsigned mask; + const char *name; + } trace_names[] = { + DATA(TRACE_TIMES), + DATA(TRACE_TPUTS), + DATA(TRACE_UPDATE), + DATA(TRACE_MOVE), + DATA(TRACE_CHARPUT), + DATA(TRACE_CALLS), + DATA(TRACE_VIRTPUT), + DATA(TRACE_IEVENT), + DATA(TRACE_BITS), + DATA(TRACE_ICALLS), + DATA(TRACE_CCALLS), + DATA(TRACE_DATABASE), + DATA(TRACE_ATTRS) + }; +#undef DATA + + Locked(result = _nc_tracing); + if ((MyFP == 0) && tracelevel) { MyInit = TRUE; if (MyFD >= 0) { MyFP = fdopen(MyFD, BIN_W); } else { - if (MyPath[0] == '\0') { - size_t size = sizeof(MyPath) - 12; - if (getcwd(MyPath, size) == 0) { - perror("curses: Can't get working directory"); - exit(EXIT_FAILURE); - } - MyPath[size] = '\0'; - assert(strlen(MyPath) <= size); - _nc_STRCAT(MyPath, "/trace", sizeof(MyPath)); - if (_nc_is_dir_path(MyPath)) { - _nc_STRCAT(MyPath, ".log", sizeof(MyPath)); - } + char myFile[80]; + + _nc_STRCPY(myFile, "trace", sizeof(myFile)); + if (_nc_is_dir_path(myFile)) { + _nc_STRCAT(myFile, ".log", sizeof(myFile)); } #define SAFE_MODE (O_CREAT | O_EXCL | O_RDWR) - if (_nc_access(MyPath, W_OK) < 0 - || (MyFD = safe_open3(MyPath, SAFE_MODE, 0600)) < 0 + if (_nc_access(myFile, W_OK) < 0 + || (MyFD = safe_open3(myFile, SAFE_MODE, 0600)) < 0 || (MyFP = fdopen(MyFD, BIN_W)) == 0) { ; /* EMPTY */ } } - _nc_tracing = tracelevel; + Locked(_nc_tracing = tracelevel); /* Try to set line-buffered mode, or (failing that) unbuffered, * so that the trace-output gets flushed automatically at the * end of each line. This is useful in case the program dies. @@ -141,15 +169,33 @@ curses_trace(unsigned tracelevel) NCURSES_VERSION, NCURSES_VERSION_PATCH, tracelevel); + +#define SPECIAL_MASK(mask) \ + if ((tracelevel & mask) == mask) \ + _tracef("- %s (%u)", #mask, mask) + + for (bit = 0; bit < TRACE_SHIFT; ++bit) { + unsigned mask = (1U << bit) & tracelevel; + if ((mask & trace_names[bit].mask) != 0) { + _tracef("- %s (%u)", trace_names[bit].name, mask); + } + } + SPECIAL_MASK(TRACE_MAXIMUM); + else + SPECIAL_MASK(TRACE_ORDINARY); + + if (tracelevel > TRACE_MAXIMUM) { + _tracef("- DEBUG_LEVEL(%u)", tracelevel >> TRACE_SHIFT); + } } else if (tracelevel == 0) { if (MyFP != 0) { MyFD = dup(MyFD); /* allow reopen of same file */ fclose(MyFP); MyFP = 0; } - _nc_tracing = tracelevel; + Locked(_nc_tracing = tracelevel); } else if (_nc_tracing != tracelevel) { - _nc_tracing = tracelevel; + Locked(_nc_tracing = tracelevel); _tracef("tracelevel=%#x", tracelevel); } #else @@ -214,11 +260,13 @@ _nc_va_tracef(const char *fmt, va_list ap) # if USE_WEAK_SYMBOLS if ((pthread_self)) # endif + fprintf(fp, "%#" PRIxPTR ":", #ifdef _NC_WINDOWS - fprintf(fp, "%#lx:", (long) (intptr_t) pthread_self().p); + CASTxPTR(pthread_self().p) #else - fprintf(fp, "%#lx:", (long) (intptr_t) pthread_self()); + CASTxPTR(pthread_self()) #endif + ); #endif if (before || after) { int n; diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c index 94026275..b3628625 100644 --- a/ncurses/trace/lib_traceatr.c +++ b/ncurses/trace/lib_traceatr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2024 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -44,7 +44,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_traceatr.c,v 1.94 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_traceatr.c,v 1.96 2024/02/04 00:11:35 tom Exp $") #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name)) @@ -343,6 +343,7 @@ _tracecchar_t2(int bufnum, const cchar_t *ch) } else { PUTC_DATA; int n; + int assume_unicode = _nc_unicode_locale()? 128 : 255; (void) _nc_trace_bufcat(bufnum, "{ "); for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) { @@ -362,21 +363,22 @@ _tracecchar_t2(int bufnum, const cchar_t *ch) UChar(ch->chars[PUTC_i]))); } break; - } else if (ch->chars[PUTC_i] > 255) { + } else if (ch->chars[PUTC_i] > assume_unicode) { char temp[80]; _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) - "{%d:\\u%lx}", + "{%d:\\u%04lx}", _nc_wacs_width(ch->chars[PUTC_i]), (unsigned long) ch->chars[PUTC_i]); (void) _nc_trace_bufcat(bufnum, temp); - break; - } - for (n = 0; n < PUTC_n; n++) { - if (n) - (void) _nc_trace_bufcat(bufnum, ", "); - (void) _nc_trace_bufcat(bufnum, - _nc_tracechar(CURRENT_SCREEN, - UChar(PUTC_buf[n]))); + attr &= ~A_CHARTEXT; /* ignore WidecExt(ch) */ + } else { + for (n = 0; n < PUTC_n; n++) { + if (n) + (void) _nc_trace_bufcat(bufnum, ", "); + (void) _nc_trace_bufcat(bufnum, + _nc_tracechar(CURRENT_SCREEN, + UChar(PUTC_buf[n]))); + } } } (void) _nc_trace_bufcat(bufnum, " }"); diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c index 36158d6f..9c879dc6 100644 --- a/ncurses/trace/lib_tracechr.c +++ b/ncurses/trace/lib_tracechr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2024 Thomas E. Dickey * * Copyright 1998-2009,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_tracechr.c,v 1.23 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_tracechr.c,v 1.24 2024/02/04 00:11:35 tom Exp $") #ifdef TRACE @@ -54,26 +54,28 @@ _nc_tracechar(SCREEN *sp, int ch) ? sp->tracechr_buf : _nc_globals.tracechr_buf); - if (ch > KEY_MIN || ch < 0) { + if ((ch > KEY_MIN && !_nc_unicode_locale()) || ch < 0) { name = safe_keyname(SP_PARM, ch); if (name == 0 || *name == '\0') name = "NULL"; _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize) - "'%.30s' = %#03o", name, ch); - } else if (!is8bits(ch) || !isprint(UChar(ch))) { + "'%.30s' = \\x%02x", name, ch); + } else if (!is8bits(ch) + || (_nc_unicode_locale() && !is7bits(ch)) + || !isprint(UChar(ch))) { /* * workaround for glibc bug: * sprintf changes the result from unctrl() to an empty string if it * does not correspond to a valid multibyte sequence. */ _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize) - "%#03o", ch); + "\\x%02x", ch); } else { name = safe_unctrl(SP_PARM, (chtype) ch); if (name == 0 || *name == 0) name = "null"; /* shouldn't happen */ _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize) - "'%.30s' = %#03o", name, ch); + "'%.30s' = \\x%02x", name, ch); } return (MyBuffer); } diff --git a/ncurses/trace/lib_tracedmp.c b/ncurses/trace/lib_tracedmp.c index 3b7ea074..529148bb 100644 --- a/ncurses/trace/lib_tracedmp.c +++ b/ncurses/trace/lib_tracedmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2012,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include #include -MODULE_ID("$Id: lib_tracedmp.c,v 1.36 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_tracedmp.c,v 1.37 2023/06/24 15:49:45 tom Exp $") #ifdef TRACE @@ -71,9 +71,9 @@ _tracedump(const char *name, WINDOW *win) if (++width + 1 > (int) my_length) { my_length = (unsigned) (2 * (width + 1)); my_buffer = typeRealloc(char, my_length, my_buffer); - if (my_buffer == 0) - return; } + if (my_buffer == 0) + return; for (n = 0; n <= win->_maxy; ++n) { char *ep = my_buffer; diff --git a/ncurses/trace/trace_buf.c b/ncurses/trace/trace_buf.c index 7e6384b5..91b12e45 100644 --- a/ncurses/trace/trace_buf.c +++ b/ncurses/trace/trace_buf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 1998-2011,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: trace_buf.c,v 1.21 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: trace_buf.c,v 1.22 2023/06/24 13:37:25 tom Exp $") #ifdef TRACE @@ -104,7 +104,11 @@ _nc_trace_buf(int bufnum, size_t want) NCURSES_EXPORT(char *) _nc_trace_bufcat(int bufnum, const char *value) { - char *buffer = _nc_trace_alloc(bufnum, (size_t) 0); + char *buffer; + + if (value == NULL) + value = ""; + buffer = _nc_trace_alloc(bufnum, (size_t) 0); if (buffer != 0) { size_t have = strlen(buffer); size_t need = strlen(value) + have; diff --git a/ncurses/trace/varargs.c b/ncurses/trace/varargs.c index 9be5fc25..7b9533bd 100644 --- a/ncurses/trace/varargs.c +++ b/ncurses/trace/varargs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2001-2008,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ #include -MODULE_ID("$Id: varargs.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: varargs.c,v 1.13 2023/06/24 13:41:46 tom Exp $") #ifdef TRACE @@ -59,18 +59,16 @@ typedef enum { NCURSES_EXPORT(char *) _nc_varargs(const char *fmt, va_list ap) { - static char dummy[] = ""; - char buffer[BUFSIZ]; const char *param; int n; if (fmt == 0 || *fmt == '\0') - return dummy; + return NULL; if (MyLength == 0) MyBuffer = typeMalloc(char, MyLength = BUFSIZ); if (MyBuffer == 0) - return dummy; + return NULL; *MyBuffer = '\0'; while (*fmt != '\0') { @@ -185,7 +183,7 @@ _nc_varargs(const char *fmt, va_list ap) } } - return (MyBuffer ? MyBuffer : dummy); + return (MyBuffer ? MyBuffer : NULL); } #else EMPTY_MODULE(_nc_varargs) diff --git a/ncurses/trace/visbuf.c b/ncurses/trace/visbuf.c index aca8affc..590e4230 100644 --- a/ncurses/trace/visbuf.c +++ b/ncurses/trace/visbuf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2023 Thomas E. Dickey * * Copyright 2001-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include #include -MODULE_ID("$Id: visbuf.c,v 1.53 2021/02/27 20:07:57 tom Exp $") +MODULE_ID("$Id: visbuf.c,v 1.54 2023/05/27 20:13:10 tom Exp $") #define NUM_VISBUFS 4 @@ -67,7 +67,9 @@ static const char r_brace[] = StringOf(R_BRACE); static char * _nc_vischar(char *tp, unsigned c LIMIT_ARG) { - if (c == '"' || c == '\\') { + if (tp == NULL) { + return NULL; + } else if (c == '"' || c == '\\') { *tp++ = '\\'; *tp++ = (char) c; } else if (is7bits((int) c) && (isgraph((int) c) || c == ' ')) { diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh index 77f06f28..0072be2c 100755 --- a/ncurses/tty/MKexpanded.sh +++ b/ncurses/tty/MKexpanded.sh @@ -30,7 +30,7 @@ # # Author: Thomas E. Dickey, 1997-on # -# $Id: MKexpanded.sh,v 1.23 2021/06/17 21:26:02 tom Exp $ +# $Id: MKexpanded.sh,v 1.24 2022/02/05 17:27:18 tom Exp $ # # Script to generate 'expanded.c', a dummy source that contains functions # corresponding to complex macros used in this library. By making functions, @@ -49,7 +49,8 @@ else fi TMP=gen$$.c -trap "rm -f $TMP" EXIT INT QUIT TERM HUP +trap "rm -f $TMP; exit 1" 1 2 3 15 +trap "rm -f $TMP" 0 cat < -MODULE_ID("$Id: hardscroll.c,v 1.54 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: hardscroll.c,v 1.58 2023/09/09 16:04:08 Nicholas.Marriott Exp $") #if defined(SCROLLDEBUG) || defined(HASHDEBUG) @@ -204,13 +204,19 @@ NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_DCL0) int *new_oldnums = typeRealloc(int, (size_t) need_lines, oldnums(SP_PARM)); - if (!new_oldnums) + if (!new_oldnums) { + TR(TRACE_ICALLS, (T_RETURN(""))); return; + } oldnums(SP_PARM) = new_oldnums; OLDNUM_SIZE(SP_PARM) = need_lines; } /* calculate the indices */ NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_ARG); + if (SP_PARM->hashtab_len < screen_lines(SP_PARM)) { + TR(TRACE_ICALLS, (T_RETURN(""))); + return; + } #endif #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */ @@ -301,20 +307,27 @@ NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_DCL0) /* dump the state of the real and virtual oldnum fields */ { - char *buf = 0; - size_t want = ((size_t) screen_lines(SP_PARM) + 1) * 4; - (void) SP_PARM; - - if ((buf = typeMalloc(char, want)) != 0) { - int n; - - *buf = '\0'; - for (n = 0; n < screen_lines(SP_PARM); n++) - _nc_SPRINTF(buf + strlen(buf), - _nc_SLIMIT(want - strlen(buf)) - " %02d", OLDNUM(SP_PARM, n)); - TR(TRACE_UPDATE | TRACE_MOVE, ("virt %s", buf)); - free(buf); + if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) { + char *buf = 0; + size_t want = ((size_t) screen_lines(SP_PARM) + 1) * 4; + (void) SP_PARM; + + if ((buf = typeMalloc(char, want)) != 0) { + int n; + + *buf = '\0'; + for (n = 0; n < screen_lines(SP_PARM); n++) { + int number = OLDNUM(SP_PARM, n); + if (number >= -99 && number < 999) { + _nc_SPRINTF(buf + strlen(buf), + _nc_SLIMIT(want - strlen(buf)) + " %02d", number); + } else { + _nc_STRCAT(buf, " ??", want - strlen(buf)); + } + } + free(buf); + } } } diff --git a/ncurses/tty/hashmap.c b/ncurses/tty/hashmap.c index 3f124c96..e50b6384 100644 --- a/ncurses/tty/hashmap.c +++ b/ncurses/tty/hashmap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2023 Thomas E. Dickey * * Copyright 1998-2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -74,7 +74,7 @@ AUTHOR #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: hashmap.c,v 1.69 2020/05/31 17:50:48 tom Exp $") +MODULE_ID("$Id: hashmap.c,v 1.71 2023/09/16 16:28:53 tom Exp $") #ifdef HASHDEBUG @@ -318,8 +318,11 @@ NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_DCL0) if (newhash(SP_PARM) == 0) newhash(SP_PARM) = typeCalloc(unsigned long, (size_t) screen_lines(SP_PARM)); - if (!oldhash(SP_PARM) || !newhash(SP_PARM)) + if (!oldhash(SP_PARM) || !newhash(SP_PARM)) { + FreeAndNull(oldhash(SP_PARM)); + FreeAndNull(newhash(SP_PARM)); return; /* malloc failure */ + } for (i = 0; i < screen_lines(SP_PARM); i++) { newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, i)); oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i)); @@ -403,7 +406,7 @@ NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_DCL0) && OLDNUM(SP_PARM, i) - i == shift) i++; size = i - start; - if (size < 3 || size + min(size / 8, 2) < abs(shift)) { + if (size < 3 || size + Min(size / 8, 2) < abs(shift)) { while (start < i) { OLDNUM(SP_PARM, start) = _NEWINDEX; start++; diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 79592271..8fad93c7 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -160,7 +160,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mvcur.c,v 1.156 2021/09/04 10:29:15 tom Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.161 2023/09/16 16:29:02 tom Exp $") #define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x] /* desired state */ @@ -232,14 +232,33 @@ NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_DCLx const char *const cap, int affcn /* extract padding, either mandatory or required */ if (cp[0] == '$' && cp[1] == '<' && strchr(cp, '>')) { float number = 0.0; + int state = 0; for (cp += 2; *cp != '>'; cp++) { - if (isdigit(UChar(*cp))) - number = number * 10 + (float) (*cp - '0'); - else if (*cp == '*') - number *= (float) affcnt; - else if (*cp == '.' && (*++cp != '>') && isdigit(UChar(*cp))) - number += (float) ((*cp - '0') / 10.0); + if (isdigit(UChar(*cp))) { + switch (state) { + case 0: + number = number * 10 + (float) (*cp - '0'); + break; + case 2: + number += (float) ((*cp - '0') / 10.0); + ++state; + break; + } + } else if (*cp == '*') { + /* padding is always a suffix */ + if (state < 4) { + number *= (float) affcnt; + state = 4; + } + } else if (*cp == '.') { + /* a single decimal point is allowed */ + state = (state == 0) ? 2 : 3; + } + if (number > MAX_DELAY_MSECS) { + number = MAX_DELAY_MSECS; + break; + } } #if NCURSES_NO_PADDING @@ -432,8 +451,8 @@ NCURSES_SP_NAME(_nc_mvcur_init) (NCURSES_SP_DCL0) 1); SP_PARM->_hpa_ch_cost = NormalizedCost(TIPARM_1(column_address, 23), 1); SP_PARM->_cuf_ch_cost = NormalizedCost(TIPARM_1(parm_right_cursor, 23), 1); - SP_PARM->_inline_cost = min(SP_PARM->_cup_ch_cost, - min(SP_PARM->_hpa_ch_cost, + SP_PARM->_inline_cost = Min(SP_PARM->_cup_ch_cost, + Min(SP_PARM->_hpa_ch_cost, SP_PARM->_cuf_ch_cost)); /* @@ -470,12 +489,12 @@ NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_wrap) (NCURSES_SP_DCL0) /* wrap up cursor-addressing mode */ { - /* leave cursor at screen bottom */ - TINFO_MVCUR(NCURSES_SP_ARGx -1, -1, screen_lines(SP_PARM) - 1, 0); - if (!SP_PARM || !IsTermInfo(SP_PARM)) return; + /* leave cursor at screen bottom */ + TINFO_MVCUR(NCURSES_SP_ARGx -1, -1, screen_lines(SP_PARM) - 1, 0); + /* set cursor to normal mode */ if (SP_PARM->_cursor != -1) { int cursor = SP_PARM->_cursor; @@ -675,7 +694,7 @@ relative_move(NCURSES_SP_DCLx * and the time the structure WANT_CHAR would access has been * updated. */ - if (ovw) { + if (ovw && to_y >= 0) { int i; for (i = 0; i < n; i++) { @@ -690,7 +709,7 @@ relative_move(NCURSES_SP_DCLx } } } - if (ovw) { + if (ovw && to_y >= 0) { int i; for (i = 0; i < n; i++) diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index a20e72a9..dd925c7e 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_tstp.c,v 1.51 2021/09/04 10:54:35 tom Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.54 2022/12/24 22:22:10 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -283,7 +283,25 @@ handle_SIGINT(int sig) _exit(EXIT_FAILURE); } +# ifndef _nc_set_read_thread +NCURSES_EXPORT(void) +_nc_set_read_thread(bool enable) +{ + _nc_lock_global(curses); + if (enable) { +# if USE_WEAK_SYMBOLS + if ((pthread_self) && (pthread_kill) && (pthread_equal)) +# endif + _nc_globals.read_thread = pthread_self(); + } else { + _nc_globals.read_thread = 0; + } + _nc_unlock_global(curses); +} +# endif + #if USE_SIGWINCH + static void handle_SIGWINCH(int sig GCC_UNUSED) { diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c index a7604b3e..6fa73eed 100644 --- a/ncurses/tty/lib_twait.c +++ b/ncurses/tty/lib_twait.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 1998-2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -76,8 +76,11 @@ #endif #undef CUR -MODULE_ID("$Id: lib_twait.c,v 1.75 2020/02/29 15:46:00 anonymous.maarten Exp $") +MODULE_ID("$Id: lib_twait.c,v 1.81 2023/09/16 16:30:40 tom Exp $") +/* + * Returns an elapsed time, in milliseconds (if possible). + */ static long _nc_gettime(TimeType * t0, int first) { @@ -85,18 +88,20 @@ _nc_gettime(TimeType * t0, int first) #if PRECISE_GETTIME TimeType t1; - gettimeofday(&t1, (struct timezone *) 0); - if (first) { + if (GetClockTime(&t1) == -1) { + *t0 = t1; + res = first ? 0 : 1; + } else if (first) { *t0 = t1; res = 0; } else { /* .tv_sec and .tv_usec are unsigned, be careful when subtracting */ - if (t0->tv_usec > t1.tv_usec) { - t1.tv_usec += 1000000; /* Convert 1s in 1e6 microsecs */ + if (t0->sub_secs > t1.sub_secs) { + t1.sub_secs += TimeScale; t1.tv_sec--; } - res = (t1.tv_sec - t0->tv_sec) * 1000 - + (t1.tv_usec - t0->tv_usec) / 1000; + res = (long) ((t1.tv_sec - t0->tv_sec) * 1000L + + (t1.sub_secs - t0->sub_secs) / (TimeScale / 1000L)); } #else time_t t1 = time((time_t *) 0); @@ -355,7 +360,7 @@ _nc_timed_wait(SCREEN *sp MAYBE_UNUSED, if ((mode & TW_MOUSE) && (fd = sp->_mouse_fd) >= 0) { FD_SET(fd, &set); - count = max(fd, count) + 1; + count = Max(fd, count) + 1; } #ifdef NCURSES_WGETCH_EVENTS if ((mode & TW_EVENT) && evl) { @@ -365,7 +370,7 @@ _nc_timed_wait(SCREEN *sp MAYBE_UNUSED, if (ev->type == _NC_EVENT_FILE && (ev->data.fev.flags & _NC_EVENT_FILE_READABLE)) { FD_SET(ev->data.fev.fd, &set); - count = max(ev->data.fev.fd + 1, count); + count = Max(ev->data.fev.fd + 1, count); } } } diff --git a/ncurses/tty/lib_vidattr.c b/ncurses/tty/lib_vidattr.c index 15e7397d..2c7a0b27 100644 --- a/ncurses/tty/lib_vidattr.c +++ b/ncurses/tty/lib_vidattr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -70,7 +70,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_vidattr.c,v 1.78 2020/05/27 23:56:32 tom Exp $") +MODULE_ID("$Id: lib_vidattr.c,v 1.79 2023/04/28 20:59:26 tom Exp $") #define doPut(mode) \ TPUTS_TRACE(#mode); \ @@ -249,6 +249,7 @@ NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx TurnOff(A_ITALIC, exit_italics_mode); } #endif + (void) turn_off; } PreviousAttr &= ALL_BUT_COLOR; } @@ -278,6 +279,7 @@ NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx } else if (turn_off & A_ITALIC) { TurnOff(A_ITALIC, exit_italics_mode); } + (void) turn_off; } #endif SetColorsIf((pair != 0) || fix_pair0, PreviousAttr); diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index bdd673be..0427024c 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -85,7 +85,7 @@ #include -MODULE_ID("$Id: tty_update.c,v 1.312 2021/09/04 10:29:59 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.316 2024/02/04 00:09:34 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -256,6 +256,7 @@ PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch) * not checked. */ if (is8bits(CharOf(CHDEREF(ch))) + && (!is7bits(CharOf(CHDEREF(ch))) && _nc_unicode_locale()) && (isprint(CharOf(CHDEREF(ch))) || (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160) || (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128) @@ -757,14 +758,20 @@ TINFO_DOUPDATE(NCURSES_SP_DCL0) * We do not allow applications to assign new values in the reentrant * model. */ +#if NCURSES_SP_FUNCS + if (SP_PARM == CURRENT_SCREEN) { +#endif #define SyncScreens(internal,exported) \ if (internal == 0) internal = exported; \ if (internal != exported) exported = internal - SyncScreens(CurScreen(SP_PARM), curscr); - SyncScreens(NewScreen(SP_PARM), newscr); - SyncScreens(StdScreen(SP_PARM), stdscr); + SyncScreens(CurScreen(SP_PARM), curscr); + SyncScreens(NewScreen(SP_PARM), newscr); + SyncScreens(StdScreen(SP_PARM), stdscr); +#if NCURSES_SP_FUNCS + } #endif +#endif /* !USE_REENTRANT */ if (CurScreen(SP_PARM) == 0 || NewScreen(SP_PARM) == 0 @@ -998,7 +1005,7 @@ TINFO_DOUPDATE(NCURSES_SP_DCL0) if (check_pending(NCURSES_SP_ARG)) goto cleanup; - nonempty = min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1); + nonempty = Min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1); if (SP_PARM->_scrolling) { NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_ARG); @@ -1128,7 +1135,7 @@ ClrUpdate(NCURSES_SP_DCL0) if (0 != SP_PARM) { int i; NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM)); - int nonempty = min(screen_lines(SP_PARM), + int nonempty = Min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1); ClearScreen(NCURSES_SP_ARGx blank); @@ -1227,7 +1234,7 @@ static int ClrBottom(NCURSES_SP_DCLx int total) { int top = total; - int last = min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1); + int last = Min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1); NCURSES_CH_T blank = NewScreen(SP_PARM)->_line[total - 1].text[last - 1]; if (clr_eos && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) { @@ -1287,7 +1294,7 @@ ClrBottom(NCURSES_SP_DCLx int total) ** nLastChar = position of last different character in new line ** ** move to firstChar -** overwrite chars up to min(oLastChar, nLastChar) +** overwrite chars up to Min(oLastChar, nLastChar) ** if oLastChar < nLastChar ** insert newLine[oLastChar+1..nLastChar] ** else @@ -1525,7 +1532,7 @@ TransformLine(NCURSES_SP_DCLx int const lineno) } ClrToEOL(NCURSES_SP_ARGx blank, FALSE); } else { - n = max(nLastChar, oLastChar); + n = Max(nLastChar, oLastChar); PutRange(NCURSES_SP_ARGx oldLine, newLine, @@ -1550,7 +1557,7 @@ TransformLine(NCURSES_SP_DCLx int const lineno) break; } - n = min(oLastChar, nLastChar); + n = Min(oLastChar, nLastChar); if (n >= firstChar) { GoTo(NCURSES_SP_ARGx lineno, firstChar); PutRange(NCURSES_SP_ARGx @@ -1562,7 +1569,7 @@ TransformLine(NCURSES_SP_DCLx int const lineno) } if (oLastChar < nLastChar) { - int m = max(nLastNonblank, oLastNonblank); + int m = Max(nLastNonblank, oLastNonblank); #if USE_WIDEC_SUPPORT if (n) { while (isWidecExt(newLine[n + 1]) && n) { diff --git a/ncurses/widechar/lib_add_wch.c b/ncurses/widechar/lib_add_wch.c index b817647c..be1bbb05 100644 --- a/ncurses/widechar/lib_add_wch.c +++ b/ncurses/widechar/lib_add_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2023 Thomas E. Dickey * * Copyright 2004-2011,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include #endif -MODULE_ID("$Id: lib_add_wch.c,v 1.17 2021/06/17 21:26:02 tom Exp $") +MODULE_ID("$Id: lib_add_wch.c,v 1.18 2023/07/15 17:34:12 tom Exp $") /* clone/adapt lib_addch.c */ static const cchar_t blankchar = NewChar(BLANK_TEXT); @@ -204,10 +204,16 @@ wadd_wch_literal(WINDOW *win, cchar_t ch) if (len == 0) { /* non-spacing */ if ((x > 0 && y >= 0) || (win->_maxx >= 0 && win->_cury >= 1)) { - if (x > 0 && y >= 0) - chars = (win->_line[y].text[x - 1].chars); - else + if (x > 0 && y >= 0) { + for (j = x - 1; j > 0; --j) { + if (!isWidecExt(win->_line[y].text[j])) { + break; + } + } + chars = (win->_line[y].text[j].chars); + } else { chars = (win->_line[y - 1].text[win->_maxx].chars); + } for (i = 0; i < CCHARW_MAX; ++i) { if (chars[i] == 0) { TR(TRACE_VIRTPUT, diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c index 714be3b5..451c5dcb 100644 --- a/ncurses/widechar/lib_cchar.c +++ b/ncurses/widechar/lib_cchar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 2001-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ #include #include -MODULE_ID("$Id: lib_cchar.c,v 1.37 2021/06/17 21:11:08 tom Exp $") +MODULE_ID("$Id: lib_cchar.c,v 1.38 2022/07/27 08:03:16 tom Exp $") /* * The SuSv2 description leaves some room for interpretation. We'll assume wch @@ -122,10 +122,13 @@ getcchar(const cchar_t *wcval, wchar_t *wp; int len; +#if HAVE_WMEMCHR len = ((wp = wmemchr(wcval->chars, L'\0', (size_t) CCHARW_MAX)) ? (int) (wp - wcval->chars) : CCHARW_MAX); - +#else + len = wcsnlen(wcval->chars, CCHARW_MAX); +#endif if (wch == NULL) { /* * If the value is a null, set the length to 1. diff --git a/ncurses/widechar/lib_get_wstr.c b/ncurses/widechar/lib_get_wstr.c index c4dec5c7..3b3bd522 100644 --- a/ncurses/widechar/lib_get_wstr.c +++ b/ncurses/widechar/lib_get_wstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 2002-2009,2011 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_get_wstr.c,v 1.20 2021/10/23 19:02:59 tom Exp $") +MODULE_ID("$Id: lib_get_wstr.c,v 1.21 2023/04/29 19:02:03 tom Exp $") static int wadd_wint(WINDOW *win, wint_t *src) @@ -88,7 +88,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) { SCREEN *sp = _nc_screen_of(win); TTY buf; - bool oldnl, oldecho, oldraw, oldcbreak; + TTY_FLAGS save_flags; wchar_t erasec = 0; wchar_t killc = 0; wint_t *oldstr = str; @@ -105,13 +105,11 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) _nc_get_tty_mode(&buf); - oldnl = sp->_nl; - oldecho = sp->_echo; - oldraw = sp->_raw; - oldcbreak = sp->_cbreak; + save_flags = sp->_tty_flags; NCURSES_SP_NAME(nl) (NCURSES_SP_ARG); NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG); - NCURSES_SP_NAME(raw) (NCURSES_SP_ARG); + if (!save_flags._raw) + NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG); NCURSES_SP_NAME(erasewchar) (NCURSES_SP_ARGx &erasec); NCURSES_SP_NAME(killwchar) (NCURSES_SP_ARGx &killc); @@ -149,7 +147,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) * *getn_wstr() with \n should work either way. */ if (ch == KEY_DOWN || ch == KEY_ENTER) { - if (oldecho == TRUE + if (save_flags._echo == TRUE && win->_cury == win->_maxy && win->_scroll) wechochar(win, (chtype) '\n'); @@ -157,11 +155,11 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) } if (ch == KEY_LEFT || ch == KEY_BACKSPACE) { if (tmpstr > oldstr) { - tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho); + tmpstr = WipeOut(win, y, x, oldstr, tmpstr, save_flags._echo); } } else if (ch == KEY_EOL) { while (tmpstr > oldstr) { - tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho); + tmpstr = WipeOut(win, y, x, oldstr, tmpstr, save_flags._echo); } } else { beep(); @@ -171,7 +169,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) } else { *tmpstr++ = ch; *tmpstr = 0; - if (oldecho == TRUE) { + if (save_flags._echo == TRUE) { int oldy = win->_cury; if (wadd_wint(win, tmpstr - 1) == ERR) { @@ -181,7 +179,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) */ win->_flags &= ~_WRAPPED; waddch(win, (chtype) ' '); - tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho); + tmpstr = WipeOut(win, y, x, oldstr, tmpstr, save_flags._echo); continue; } else if (IS_WRAPPED(win)) { /* @@ -211,11 +209,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen) /* Restore with a single I/O call, to fix minor asymmetry between * raw/noraw, etc. */ - sp->_nl = oldnl; - sp->_echo = oldecho; - sp->_raw = oldraw; - sp->_cbreak = oldcbreak; - + sp->_tty_flags = save_flags; (void) _nc_set_tty_mode(&buf); *tmpstr = 0; diff --git a/ncurses/widechar/lib_ins_wch.c b/ncurses/widechar/lib_ins_wch.c index f7536108..ecaabcc9 100644 --- a/ncurses/widechar/lib_ins_wch.c +++ b/ncurses/widechar/lib_ins_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2023 Thomas E. Dickey * * Copyright 2002-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_ins_wch.c,v 1.25 2020/12/05 20:04:59 tom Exp $") +MODULE_ID("$Id: lib_ins_wch.c,v 1.29 2023/11/21 21:53:28 tom Exp $") /* * Insert the given character, updating the current location to simplify @@ -109,9 +109,12 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n) (void *) win, _nc_viswbufn(wstr, n), n)); if (win != 0 - && wstr != 0) { - if (n < 1) + && wstr != 0 + && n != 0) { + + if (n < 0) { n = INT_MAX; + } code = OK; if (n > 0) { @@ -120,7 +123,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n) NCURSES_SIZE_T oy = win->_cury; NCURSES_SIZE_T ox = win->_curx; - for (cp = wstr; (*cp != L'\0') && ((cp - wstr) < n); cp++) { + for (cp = wstr; ((cp - wstr) < n) && (*cp != L'\0'); cp++) { int len = _nc_wacs_width(*cp); if ((len >= 0 && len != 1) || !is7bits(*cp)) { diff --git a/ncurses/widechar/lib_key_name.c b/ncurses/widechar/lib_key_name.c index 8acfe7a2..379bdc2d 100644 --- a/ncurses/widechar/lib_key_name.c +++ b/ncurses/widechar/lib_key_name.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2007-2008,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: lib_key_name.c,v 1.5 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_key_name.c,v 1.6 2023/06/03 12:15:34 tom Exp $") #define MyData _nc_globals.key_name @@ -46,17 +46,22 @@ key_name(wchar_t c) cchar_t my_cchar; wchar_t *my_wchars; size_t len; + NCURSES_CONST char *result = NULL; memset(&my_cchar, 0, sizeof(my_cchar)); my_cchar.chars[0] = c; my_cchar.chars[1] = L'\0'; my_wchars = wunctrl(&my_cchar); + /* + * wunctrl() could return a wide character rather than just a "printable" + * representation. Check for that and return a corresponding multibyte + * character string. + */ len = wcstombs(MyData, my_wchars, sizeof(MyData) - 1); - if (isEILSEQ(len) || (len == 0)) { - return 0; + if (!isEILSEQ(len) && (len != 0) && (len <= MB_LEN_MAX)) { + MyData[len] = '\0'; + result = MyData; } - - MyData[len] = '\0'; - return MyData; + return result; } diff --git a/ncurses/widechar/lib_unget_wch.c b/ncurses/widechar/lib_unget_wch.c index 4ea26b60..1a81fecc 100644 --- a/ncurses/widechar/lib_unget_wch.c +++ b/ncurses/widechar/lib_unget_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2002-2011,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_unget_wch.c,v 1.17 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_unget_wch.c,v 1.18 2023/06/03 12:50:52 tom Exp $") /* * Wrapper for wcrtomb() which obtains the length needed for the given @@ -60,7 +60,7 @@ _nc_wcrtomb(char *target, wchar_t source, mbstate_t * state) } else { result = (int) wcrtomb(target, source, state); } - if (!isEILSEQ(result) && (result == 0)) + if (!isEILSEQ(result) && ((result == 0) || (result > MB_LEN_MAX))) result = 1; return (size_t) result; } diff --git a/ncurses/widechar/lib_vid_attr.c b/ncurses/widechar/lib_vid_attr.c index 2d9531f1..f108b307 100644 --- a/ncurses/widechar/lib_vid_attr.c +++ b/ncurses/widechar/lib_vid_attr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2002-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_vid_attr.c,v 1.30 2020/05/27 23:54:31 tom Exp $") +MODULE_ID("$Id: lib_vid_attr.c,v 1.31 2023/04/28 20:59:34 tom Exp $") #define doPut(mode) \ TPUTS_TRACE(#mode); \ @@ -181,6 +181,7 @@ NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx TurnOff(A_ITALIC, exit_italics_mode); } #endif + (void) turn_off; } previous_attr &= ALL_BUT_COLOR; previous_pair = 0; @@ -212,6 +213,7 @@ NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx } else if (turn_off & A_ITALIC) { TurnOff(A_ITALIC, exit_italics_mode); } + (void) turn_off; } #endif SetColorsIf((color_pair != 0) || fix_pair0, previous_attr, previous_pair); diff --git a/ncurses/win32con/gettimeofday.c b/ncurses/win32con/gettimeofday.c index 94be7b56..603a6f46 100644 --- a/ncurses/win32con/gettimeofday.c +++ b/ncurses/win32con/gettimeofday.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2008-2010,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -36,8 +36,9 @@ #include -MODULE_ID("$Id: gettimeofday.c,v 1.6 2020/07/11 21:03:53 tom Exp $") +MODULE_ID("$Id: gettimeofday.c,v 1.7 2023/02/25 20:05:36 tom Exp $") +#if HAVE_GETTIMEOFDAY == 2 #define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ NCURSES_EXPORT(int) @@ -53,3 +54,4 @@ gettimeofday(struct timeval *tv, void *tz GCC_UNUSED) tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL); return (0); } +#endif // HAVE_GETTIMEOFDAY == 2 diff --git a/ncurses/win32con/win32_driver.c b/ncurses/win32con/win32_driver.c index 45aadf2f..0a43588b 100644 --- a/ncurses/win32con/win32_driver.c +++ b/ncurses/win32con/win32_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2008-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #define CUR TerminalType(my_term). -MODULE_ID("$Id: win32_driver.c,v 1.2 2020/11/21 23:35:56 tom Exp $") +MODULE_ID("$Id: win32_driver.c,v 1.4 2023/09/16 16:29:24 tom Exp $") #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE) #define EXP_OPTIMIZE 0 @@ -393,7 +393,7 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) Width = screen_columns(sp); Height = screen_lines(sp); - nonempty = min(Height, NewScreen(sp)->_maxy + 1); + nonempty = Min(Height, NewScreen(sp)->_maxy + 1); T(("... %dx%d clear cur:%d new:%d", Height, Width, @@ -924,11 +924,14 @@ wcon_initmouse(TERMINAL_CONTROL_BLOCK * TCB) { SCREEN *sp; + T((T_CALLED("win32con::wcon_initmouse(%p)"), TCB)); + if (validateConsoleHandle()) { SetSP(); sp->_mouse_type = M_TERM_DRIVER; } + returnVoid; } static int @@ -939,6 +942,7 @@ wcon_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int rc = 0; SCREEN *sp; + T((T_CALLED("win32con::wcon_testmouse(%p)"), TCB)); if (validateConsoleHandle()) { SetSP(); @@ -953,7 +957,7 @@ wcon_testmouse(TERMINAL_CONTROL_BLOCK * TCB, } } - return rc; + returnCode(rc); } static int diff --git a/ncurses/win32con/win_driver.c b/ncurses/win32con/win_driver.c index ad9e629a..2425b3a4 100644 --- a/ncurses/win32con/win_driver.c +++ b/ncurses/win32con/win_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2023 Thomas E. Dickey * * Copyright 2008-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -55,7 +55,9 @@ #define CUR TerminalType(my_term). -MODULE_ID("$Id: win_driver.c,v 1.67 2021/09/04 10:54:35 tom Exp $") +#define CONTROL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) + +MODULE_ID("$Id: win_driver.c,v 1.74 2023/09/16 16:27:44 tom Exp $") #define TypeAlloca(type,count) (type*) _alloca(sizeof(type) * (size_t) (count)) @@ -82,33 +84,34 @@ static bool okConsoleHandle(TERMINAL_CONTROL_BLOCK *); #define write_screen WriteConsoleOutput #define read_screen ReadConsoleOutput #endif - +/* *INDENT-OFF* */ static const LONG keylist[] = { - GenMap(VK_PRIOR, KEY_PPAGE), - GenMap(VK_NEXT, KEY_NPAGE), - GenMap(VK_END, KEY_END), - GenMap(VK_HOME, KEY_HOME), - GenMap(VK_LEFT, KEY_LEFT), - GenMap(VK_UP, KEY_UP), - GenMap(VK_RIGHT, KEY_RIGHT), - GenMap(VK_DOWN, KEY_DOWN), + GenMap(VK_PRIOR, KEY_PPAGE), + GenMap(VK_NEXT, KEY_NPAGE), + GenMap(VK_END, KEY_END), + GenMap(VK_HOME, KEY_HOME), + GenMap(VK_LEFT, KEY_LEFT), + GenMap(VK_UP, KEY_UP), + GenMap(VK_RIGHT, KEY_RIGHT), + GenMap(VK_DOWN, KEY_DOWN), GenMap(VK_DELETE, KEY_DC), GenMap(VK_INSERT, KEY_IC) }; static const LONG ansi_keys[] = { - GenMap(VK_PRIOR, 'I'), - GenMap(VK_NEXT, 'Q'), - GenMap(VK_END, 'O'), - GenMap(VK_HOME, 'H'), - GenMap(VK_LEFT, 'K'), - GenMap(VK_UP, 'H'), - GenMap(VK_RIGHT, 'M'), - GenMap(VK_DOWN, 'P'), + GenMap(VK_PRIOR, 'I'), + GenMap(VK_NEXT, 'Q'), + GenMap(VK_END, 'O'), + GenMap(VK_HOME, 'H'), + GenMap(VK_LEFT, 'K'), + GenMap(VK_UP, 'H'), + GenMap(VK_RIGHT, 'M'), + GenMap(VK_DOWN, 'P'), GenMap(VK_DELETE, 'S'), GenMap(VK_INSERT, 'R') }; +/* *INDENT-ON* */ #define N_INI ((int)array_length(keylist)) #define FKEYS 24 #define MAPSIZE (FKEYS + N_INI) @@ -123,7 +126,6 @@ static struct { BOOL buffered; BOOL window_only; BOOL progMode; - BOOL isMinTTY; BOOL isTermInfoConsole; HANDLE out; HANDLE inp; @@ -486,7 +488,7 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) Width = screen_columns(sp); Height = screen_lines(sp); - nonempty = min(Height, NewScreen(sp)->_maxy + 1); + nonempty = Min(Height, NewScreen(sp)->_maxy + 1); T(("... %dx%d clear cur:%d new:%d", Height, Width, @@ -610,6 +612,12 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) returnCode(result); } +#ifdef __MING32__ +#define SysISATTY(fd) _isatty(fd) +#else +#define SysISATTY(fd) isatty(fd) +#endif + static bool wcon_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, @@ -641,6 +649,8 @@ wcon_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, } } else if (tname != 0 && stricmp(tname, "unknown") == 0) { code = TRUE; + } else if (SysISATTY(TCB->term.Filedes)) { + code = TRUE; } /* @@ -1476,10 +1486,10 @@ Adjust(int milliseconds, int diff) FROM_LEFT_4TH_BUTTON_PRESSED | \ RIGHTMOST_BUTTON_PRESSED) -static int +static mmask_t decode_mouse(SCREEN *sp, int mask) { - int result = 0; + mmask_t result = 0; (void) sp; assert(sp && console_initialized); @@ -1668,14 +1678,14 @@ handle_mouse(SCREEN *sp, MOUSE_EVENT_RECORD mer) if (sp->_drv_mouse_new_buttons) { - work.bstate |= (mmask_t) decode_mouse(sp, sp->_drv_mouse_new_buttons); + work.bstate |= decode_mouse(sp, sp->_drv_mouse_new_buttons); } else { /* cf: BUTTON_PRESSED, BUTTON_RELEASED */ - work.bstate |= (mmask_t) (decode_mouse(sp, - sp->_drv_mouse_old_buttons) - >> 1); + work.bstate |= (decode_mouse(sp, + sp->_drv_mouse_old_buttons) + >> 1); result = TRUE; } @@ -1957,11 +1967,6 @@ _nc_mingw_isatty(int fd) { int result = 0; -#ifdef __MING32__ -#define SysISATTY(fd) _isatty(fd) -#else -#define SysISATTY(fd) isatty(fd) -#endif if (SysISATTY(fd)) { result = 1; } else { @@ -2126,9 +2131,9 @@ _nc_mingw_console_read( *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar; vk = inp_rec.Event.KeyEvent.wVirtualKeyCode; /* - * There are 24 virtual function-keys, and typically - * 12 function-keys on a keyboard. Use the shift-modifier - * to provide the remaining 12 keys. + * There are 24 virtual function-keys (defined in winuser.h), + * and typically 12 function-keys on a keyboard. Use the + * shift-modifier to provide the remaining keys. */ if (vk >= VK_F1 && vk <= VK_F12) { if (inp_rec.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED) { @@ -2145,6 +2150,11 @@ _nc_mingw_console_read( ungetch('\0'); *buf = AnsiKey(vk); } + } else if (vk == VK_BACK) { + if (!(inp_rec.Event.KeyEvent.dwControlKeyState + & (SHIFT_PRESSED | CONTROL_PRESSED))) { + *buf = KEY_BACKSPACE; + } } break; } else if (inp_rec.EventType == MOUSE_EVENT) { @@ -2172,9 +2182,6 @@ InitConsole(void) BOOL b; START_TRACE(); - if (_nc_mingw_isatty(0)) { - CON.isMinTTY = TRUE; - } for (i = 0; i < (N_INI + FKEYS); i++) { if (i < N_INI) { @@ -2213,14 +2220,14 @@ InitConsole(void) for (i = 0; i < NUMPAIRS; i++) CON.pairs[i] = a; - CON.inp = GetStdHandle(STD_INPUT_HANDLE); - CON.out = GetStdHandle(STD_OUTPUT_HANDLE); - b = AllocConsole(); if (!b) b = AttachConsole(ATTACH_PARENT_PROCESS); + CON.inp = GetDirectHandle("CONIN$", FILE_SHARE_READ); + CON.out = GetDirectHandle("CONOUT$", FILE_SHARE_WRITE); + if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) { T(("... will not buffer console")); buffered = FALSE; @@ -2228,7 +2235,7 @@ InitConsole(void) } else { T(("... creating console buffer")); CON.hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, - 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index fe0a86fc..929b0a97 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,10 +1,10 @@ -ncurses6 (6.3+20220115) unstable; urgency=low +ncurses6 (6.4+20240420) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 15 Jan 2022 09:00:23 -0500 + -- Thomas E. Dickey Sat, 20 Apr 2024 06:17:21 -0400 -ncurses6 (5.9-20131005) unstable; urgency=low +ncurses6 (5.9+20131005) unstable; urgency=low * initial release diff --git a/package/debian-mingw/compat b/package/debian-mingw/compat index f599e28b..48082f72 100644 --- a/package/debian-mingw/compat +++ b/package/debian-mingw/compat @@ -1 +1 @@ -10 +12 diff --git a/package/debian-mingw/control b/package/debian-mingw/control index 7ad33dcc..6fb213fd 100644 --- a/package/debian-mingw/control +++ b/package/debian-mingw/control @@ -3,8 +3,11 @@ Section: libdevel Priority: optional Maintainer: Thomas E. Dickey Homepage: https://invisible-island.net/ncurses/ -Build-Depends: debhelper (>= 7) -Standards-Version: 3.8.2 +Build-Depends: debhelper (>= 7), + gcc-mingw-w64-i686, + g++-mingw-w64-i686, + binutils-mingw-w64-i686 +Standards-Version: 4.6.1.0 Package: mingw32-ncurses6 Architecture: any diff --git a/package/debian-mingw/copyright b/package/debian-mingw/copyright index b531d84a..32396640 100644 --- a/package/debian-mingw/copyright +++ b/package/debian-mingw/copyright @@ -5,17 +5,17 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 by Thomas E. Dickey +Copyright: 2017-2023,2024 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 1996-2020,2021 by Thomas E. Dickey -Licence: X11 +Copyright: 1996-2023,2024 by Thomas E. Dickey +License: X11 Files: doc/html/NCURSES-Programming-HOWTO.html Copyright: 2001 by Pradeep Padala -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -44,7 +44,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/package/debian-mingw/rules b/package/debian-mingw/rules index 4aa7cb95..8c266a93 100755 --- a/package/debian-mingw/rules +++ b/package/debian-mingw/rules @@ -49,7 +49,7 @@ CONFIG_OPTIONS = \ --with-abi-version=$(MY_ABI) \ --with-cxx-shared \ --with-develop \ - --with-fallbacks=unknown,rxvt \ + --with-fallbacks=unknown,ms-terminal,xterm-256color \ --with-tic-path=/usr/bin/tic$(MY_ABI) \ --with-infocmp-path=/usr/bin/infocmp$(MY_ABI) \ --with-shared \ @@ -111,7 +111,7 @@ install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs $(verbose) $(MAKE) install.libs DESTDIR=$(MINGW_TMP) diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index fe0a86fc..929b0a97 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,10 +1,10 @@ -ncurses6 (6.3+20220115) unstable; urgency=low +ncurses6 (6.4+20240420) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 15 Jan 2022 09:00:23 -0500 + -- Thomas E. Dickey Sat, 20 Apr 2024 06:17:21 -0400 -ncurses6 (5.9-20131005) unstable; urgency=low +ncurses6 (5.9+20131005) unstable; urgency=low * initial release diff --git a/package/debian-mingw64/compat b/package/debian-mingw64/compat index f599e28b..48082f72 100644 --- a/package/debian-mingw64/compat +++ b/package/debian-mingw64/compat @@ -1 +1 @@ -10 +12 diff --git a/package/debian-mingw64/control b/package/debian-mingw64/control index fa1bd716..74e8136a 100644 --- a/package/debian-mingw64/control +++ b/package/debian-mingw64/control @@ -3,8 +3,11 @@ Section: libdevel Priority: optional Maintainer: Thomas E. Dickey Homepage: https://invisible-island.net/ncurses/ -Build-Depends: debhelper (>= 7) -Standards-Version: 3.8.2 +Build-Depends: debhelper (>= 7), + gcc-mingw-w64-x86-64, + g++-mingw-w64-x86-64, + binutils-mingw-w64-x86-64 +Standards-Version: 4.6.1.0 Package: mingw64-ncurses6 Architecture: any diff --git a/package/debian-mingw64/copyright b/package/debian-mingw64/copyright index b531d84a..32396640 100644 --- a/package/debian-mingw64/copyright +++ b/package/debian-mingw64/copyright @@ -5,17 +5,17 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 by Thomas E. Dickey +Copyright: 2017-2023,2024 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 1996-2020,2021 by Thomas E. Dickey -Licence: X11 +Copyright: 1996-2023,2024 by Thomas E. Dickey +License: X11 Files: doc/html/NCURSES-Programming-HOWTO.html Copyright: 2001 by Pradeep Padala -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -44,7 +44,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/package/debian-mingw64/rules b/package/debian-mingw64/rules index b2ebb883..3a79517c 100755 --- a/package/debian-mingw64/rules +++ b/package/debian-mingw64/rules @@ -49,7 +49,7 @@ CONFIG_OPTIONS = \ --with-abi-version=$(MY_ABI) \ --with-cxx-shared \ --with-develop \ - --with-fallbacks=unknown,rxvt \ + --with-fallbacks=unknown,ms-terminal,xterm-256color \ --with-tic-path=/usr/bin/tic$(MY_ABI) \ --with-infocmp-path=/usr/bin/infocmp$(MY_ABI) \ --with-shared \ @@ -111,7 +111,7 @@ install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs $(verbose) $(MAKE) install.libs DESTDIR=$(MINGW_TMP) diff --git a/package/debian/changelog b/package/debian/changelog index 544bcdb1..a32ccc5b 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,10 +1,10 @@ -ncurses6 (6.3+20220115) unstable; urgency=low +ncurses6 (6.4+20240420) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 15 Jan 2022 09:00:23 -0500 + -- Thomas E. Dickey Sat, 20 Apr 2024 06:17:21 -0400 -ncurses6 (5.9-20120608) unstable; urgency=low +ncurses6 (5.9+20120608) unstable; urgency=low * initial release diff --git a/package/debian/compat b/package/debian/compat index f599e28b..48082f72 100644 --- a/package/debian/compat +++ b/package/debian/compat @@ -1 +1 @@ -10 +12 diff --git a/package/debian/control b/package/debian/control index 8ad90658..35921910 100644 --- a/package/debian/control +++ b/package/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Thomas E. Dickey Homepage: https://invisible-island.net/ncurses/ Build-Depends: debhelper (>= 8.1.3) -Standards-Version: 3.8.2 +Standards-Version: 4.6.1.0 Package: ncurses6 Architecture: any diff --git a/package/debian/copyright b/package/debian/copyright index b531d84a..32396640 100644 --- a/package/debian/copyright +++ b/package/debian/copyright @@ -5,17 +5,17 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 by Thomas E. Dickey +Copyright: 2017-2023,2024 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 1996-2020,2021 by Thomas E. Dickey -Licence: X11 +Copyright: 1996-2023,2024 by Thomas E. Dickey +License: X11 Files: doc/html/NCURSES-Programming-HOWTO.html Copyright: 2001 by Pradeep Padala -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -44,7 +44,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/package/debian/ncurses6.lintian-overrides b/package/debian/ncurses6.lintian-overrides index 759fa766..8bd49457 100644 --- a/package/debian/ncurses6.lintian-overrides +++ b/package/debian/ncurses6.lintian-overrides @@ -1,15 +1,9 @@ # This is intentional. ncurses6: package-name-doesnt-match-sonames libformw6-6 libmenuw6-6 libncurses++w6-6 libncursesw6-6 libpanelw6-6 libticw6-6 libtinfow6-6 -# This works around a bug in Debian's build-scripts. -ncurses6: latest-debian-changelog-entry-changed-to-native - -ncurses6: hardening-no-fortify-functions usr/lib/libncurses++w6.so.6.1 - # This is intentional. ncurses6: binary-without-manpage ncurses6: non-dev-pkg-with-shlib-symlink -ncurses6: embedded-library usr/lib/libtinfow6.so.6.1: ncurses -ncurses6: postinst-must-call-ldconfig usr/lib/libtinfow6.so.6.1 +ncurses6: embedded-library ncurses [usr/lib/x86_64-linux-gnu/libtinfow6.so.6.4] # vile: confmode diff --git a/package/debian/ncursest6.lintian-overrides b/package/debian/ncursest6.lintian-overrides index e8de0d6a..5a1b83bd 100644 --- a/package/debian/ncursest6.lintian-overrides +++ b/package/debian/ncursest6.lintian-overrides @@ -1,15 +1,9 @@ # This is intentional. ncursest6: package-name-doesnt-match-sonames libformtw6-6 libmenutw6-6 libncurses++tw6-6 libncursestw6-6 libpaneltw6-6 libtictw6-6 libtinfotw6-6 -# This works around a bug in Debian's build-scripts. -ncursest6: latest-debian-changelog-entry-changed-to-native - -ncursest6: hardening-no-fortify-functions usr/lib/libncurses++tw6.so.6.1 - # This is intentional. ncursest6: binary-without-manpage ncursest6: non-dev-pkg-with-shlib-symlink -ncursest6: embedded-library usr/lib/libtinfotw6.so.6.1: ncurses -ncursest6: postinst-must-call-ldconfig usr/lib/libtinfotw6.so.6.1 +ncursest6: embedded-library ncurses [usr/lib/x86_64-linux-gnu/libtinfotw6.so.6.4] # vile: confmode diff --git a/package/debian/rules b/package/debian/rules index 559d617a..648939b2 100755 --- a/package/debian/rules +++ b/package/debian/rules @@ -1,9 +1,16 @@ #!/usr/bin/make -f -# $Id: rules,v 1.42 2021/11/20 15:51:09 tom Exp $ +# $Id: rules,v 1.53 2024/04/08 15:31:32 tom Exp $ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +SHELL = /bin/bash +DPKG_EXPORT_BUILDFLAGS = 1 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +include /usr/share/dpkg/buildflags.mk + # packages PACKAGES.indep = ncurses6-doc ncurses6-doc-html PACKAGES.arch = ncurses6 ncursest6 @@ -25,10 +32,7 @@ MYDATA=/usr/local/ncurses/share/terminfo NORMAL_DIR=$(CURDIR)/debian/ncurses$(MY_ABI) THREAD_DIR=$(CURDIR)/debian/ncursest$(MY_ABI) -CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL) -CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) -CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) -LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) +CFLAGS += $(CC_NORMAL) ifneq ($(MY_DIR),/usr) RPATH_ENV = RPATH_LIST=../lib:$(LIBDIR) @@ -64,7 +68,10 @@ configure = \ --disable-macros \ --disable-overwrite \ --disable-relink \ + --disable-root-access \ + --disable-root-environ \ --disable-termcap \ + --enable-check-size \ --enable-hard-tabs \ --enable-opaque-curses \ --enable-opaque-form \ @@ -93,7 +100,8 @@ configure = \ --with-xterm-kbs=DEL \ --without-ada \ --without-debug \ - --without-manpage-aliases \ + --with-manpage-aliases \ + --with-manpage-symlinks \ --without-normal NCURSES6_DIR = $(CURDIR)/debian/ncurses6 @@ -135,8 +143,8 @@ patch-ncurses6-stamp: -e 's/\.3menu$$/.3menu6/' \ -e 's/\.3panel$$/.3panel6/' \ -e 's/\.\([157]\)$$/6.\1/' \ - man/man_db.renames - diff -u man/man_db.renames.bak man/man_db.renames || true + man/man_db.renames.in + diff -u man/man_db.renames.in.bak man/man_db.renames.in || true touch $@ config-ncurses6-stamp: patch-ncurses6-stamp @@ -212,12 +220,13 @@ install-ncurses6-doc-stamp: build-ncurses6-stamp dh_prep $(verbose) -pncurses6-doc $(MAKE) -C t/ncurses6 install.man DESTDIR=$(NCURSES6_DIR)-doc + find $(NCURSES6_DIR)-doc -name 'ncursesw6-config.*' -print -delete cd $(NCURSES6_DIR)-doc/usr/share/man/man1 && ln -sf tset6.1.gz reset6.1.gz touch $@ -HTML_DESTDIR=$(NCURSES6_DIR)-doc-html/usr/share/ncurses6-doc-html +HTML_DESTDIR=$(NCURSES6_DIR)-doc-html/usr/share/doc/ncurses6-doc-html install-ncurses6-doc-html-stamp: build-ncurses6-stamp dh_testdir dh_testroot @@ -226,6 +235,8 @@ install-ncurses6-doc-html-stamp: build-ncurses6-stamp cd doc/html && find * -type d | sort | xargs -I{} mkdir -p -v $(HTML_DESTDIR)/{} cd doc/html && find * -type f -name '*.html' | sort | xargs -I{} install -m 644 -p -v -T {} $(HTML_DESTDIR)/{} + find $(HTML_DESTDIR) -type d -empty -delete -print + find $(HTML_DESTDIR) -type d -empty -delete -print touch $@ @@ -254,6 +265,13 @@ ifneq ($(PACKAGES.arch),) rm -f $(PACKAGES.arch:%=install-%-stamp) dh_testdir dh_testroot + + version=`set -x; awk 'BEGIN{major=minor=0} /^NCURSES_MAJOR/{major=$$3} /^NCURSES_MINOR/{minor=$$3} END{print major "." minor}' < dist.mk`; \ + sed -i \ + -e "s, usr/lib, usr/lib/$(DEB_HOST_MULTIARCH)," \ + -e "s,6\.1,$${version}," \ + debian/*.lintian-overrides + dh_lintian $(verbose) $(PACKAGES.arch:%=-p%) dh_installdocs $(verbose) $(PACKAGES.arch:%=-p%) dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%) NEWS diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 9f32f25e..9125446d 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.502 2022/01/15 14:00:23 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.643 2024/04/20 10:17:21 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -8,9 +8,9 @@ !define EXENAME "ncurses.exe" !define VERSION_MAJOR "6" -!define VERSION_MINOR "3" -!define VERSION_YYYY "2022" -!define VERSION_MMDD "0115" +!define VERSION_MINOR "4" +!define VERSION_YYYY "2024" +!define VERSION_MMDD "0420" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 49a2883c..b9ab089a 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -2,12 +2,12 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 -Version: 6.3 -Release: 20220115 +Version: 6.4 +Release: 20240420 License: X11 Group: Development/Libraries -Source: ncurses-%{version}-%{release}.tgz -# URL: https://invisible-island.net/ncurses/ +URL: https://invisible-island.net/ncurses/ +Source: https://invisible-island.net/archives/ncurses/ncurses-%{version}-%{release}.tgz BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc @@ -128,9 +128,6 @@ for name in $RPM_BUILD_ROOT%{mingw64_bindir}/*-config; \ done popd -%clean -rm -rf $RPM_BUILD_ROOT - %files -n mingw32-ncurses6 %defattr(-,root,root,-) %{_bindir}/%{mingw32_target}-* @@ -147,6 +144,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Feb 25 2023 Thomas Dickey +- amend URLs per rpmlint + * Sun Jun 30 2019 Thomas E. Dickey - use tic-path and infocmp-path options for fallbacks diff --git a/package/ncurses.map b/package/ncurses.map index 7eb1ed1d..20552d10 100644 --- a/package/ncurses.map +++ b/package/ncurses.map @@ -1,4 +1,4 @@ -# $Id: ncurses.map,v 1.55 2021/10/10 15:22:33 tom Exp $ +# $Id: ncurses.map,v 1.57 2023/08/12 15:33:35 tom Exp $ # script for shared library symbol-versioning using ld # # This file was generated by ncu-mapsyms @@ -1214,6 +1214,20 @@ NCURSES_TINFO_6.2.20211010 { _nc_safe_fopen; _nc_safe_open3; _nc_tiparm; +} NCURSES_TINFO_6.2.20200212; + +NCURSES_TINFO_6.4.current { + global: + is_cbreak; + is_cbreak_sp; + is_echo; + is_echo_sp; + is_nl; + is_nl_sp; + is_raw; + is_raw_sp; + tiparm_s; + tiscan_s; local: _*; -} NCURSES_TINFO_6.2.20200212; +} NCURSES_TINFO_6.2.20211010; diff --git a/package/ncurses.spec b/package/ncurses.spec index 6d2c9ae5..f72b2ad1 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,11 +1,11 @@ Summary: shared libraries for terminal handling Name: ncurses6 -Version: 6.3 -Release: 20220115 +Version: 6.4 +Release: 20240420 License: X11 Group: Development/Libraries -Source: ncurses-%{version}-%{release}.tgz -# URL: https://invisible-island.net/ncurses/ +URL: https://invisible-island.net/ncurses/ +Source: https://invisible-island.net/archives/ncurses/ncurses-%{version}-%{release}.tgz %global MY_ABI 6 @@ -69,15 +69,17 @@ This package is used for testing ABI %{MY_ABI}. --disable-leaks \\\ --disable-macros \\\ --disable-overwrite \\\ - %{_test_relink} \\\ + --disable-root-access \\\ + --disable-root-environ \\\ + --disable-rpath \\\ --disable-termcap \\\ + %{_test_relink} \\\ --enable-hard-tabs \\\ --enable-opaque-curses \\\ --enable-opaque-form \\\ --enable-opaque-menu \\\ --enable-opaque-panel \\\ --enable-pc-files \\\ - --disable-rpath \\\ --enable-stdnoreturn \\\ --enable-warnings \\\ --enable-wgetch-events \\\ @@ -124,14 +126,6 @@ rm -f test/ncurses %endif %endif -%clean -if rm -rf $RPM_BUILD_ROOT; then - echo OK -else - find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1 -fi -exit 0 - %files %defattr(-,root,root,-) %{_bindir}/* @@ -140,6 +134,9 @@ exit 0 %changelog +* Sat Feb 25 2023 Thomas Dickey +- amend URLs per rpmlint + * Sat Oct 16 2021 Thomas Dickey - disable rpath to address QA_RPATHS=1 warning. diff --git a/package/ncurses.sym b/package/ncurses.sym index d2f6fbc1..aaa1621f 100644 --- a/package/ncurses.sym +++ b/package/ncurses.sym @@ -1,4 +1,4 @@ -# $Id: ncurses.sym,v 1.37 2021/08/19 23:50:26 tom Exp $ +# $Id: ncurses.sym,v 1.39 2023/08/12 15:29:01 tom Exp $ # script for shared library symbol-visibility using libtool # # This file was generated by ncu-mapsyms @@ -441,16 +441,24 @@ insstr instr intrflush intrflush_sp +is_cbreak +is_cbreak_sp is_cleared +is_echo +is_echo_sp is_idcok is_idlok is_immedok is_keypad is_leaveok is_linetouched +is_nl +is_nl_sp is_nodelay is_notimeout is_pad +is_raw +is_raw_sp is_scrollok is_subwin is_syncok @@ -782,6 +790,8 @@ tigetstr tigetstr_sp timeout tiparm +tiparm_s +tiscan_s top_panel top_row touchline diff --git a/package/ncursest.map b/package/ncursest.map index 205265de..5642c3b4 100644 --- a/package/ncursest.map +++ b/package/ncursest.map @@ -1,4 +1,4 @@ -# $Id: ncursest.map,v 1.53 2021/10/10 15:22:33 tom Exp $ +# $Id: ncursest.map,v 1.55 2023/08/12 15:33:41 tom Exp $ # script for shared library symbol-versioning using ld # # This file was generated by ncu-mapsyms @@ -493,9 +493,23 @@ NCURSES_TINFO_6.2.20211010 { _nc_safe_fopen; _nc_safe_open3; _nc_tiparm; +} NCURSES_TINFO_6.2.20200212; + +NCURSES_TINFO_6.4.current { + global: + is_cbreak; + is_cbreak_sp; + is_echo; + is_echo_sp; + is_nl; + is_nl_sp; + is_raw; + is_raw_sp; + tiparm_s; + tiscan_s; local: _*; -} NCURSES_TINFO_6.2.20200212; +} NCURSES_TINFO_6.2.20211010; NCURSEST_5.7.20081102 { global: diff --git a/package/ncursest.spec b/package/ncursest.spec index 6dd8b48f..9116cb80 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 -Version: 6.3 -Release: 20220115 +Version: 6.4 +Release: 20240420 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.sym b/package/ncursest.sym index f50ce3d0..9423d379 100644 --- a/package/ncursest.sym +++ b/package/ncursest.sym @@ -1,4 +1,4 @@ -# $Id: ncursest.sym,v 1.41 2021/08/19 23:50:26 tom Exp $ +# $Id: ncursest.sym,v 1.43 2023/08/12 15:28:50 tom Exp $ # script for shared library symbol-visibility using libtool # # This file was generated by ncu-mapsyms @@ -450,16 +450,24 @@ insstr instr intrflush intrflush_sp +is_cbreak +is_cbreak_sp is_cleared +is_echo +is_echo_sp is_idcok is_idlok is_immedok is_keypad is_leaveok is_linetouched +is_nl +is_nl_sp is_nodelay is_notimeout is_pad +is_raw +is_raw_sp is_scrollok is_subwin is_syncok @@ -781,6 +789,8 @@ tigetstr tigetstr_sp timeout tiparm +tiparm_s +tiscan_s top_panel top_row touchline diff --git a/package/ncursestw.map b/package/ncursestw.map index f514b97f..9ffde606 100644 --- a/package/ncursestw.map +++ b/package/ncursestw.map @@ -1,4 +1,4 @@ -# $Id: ncursestw.map,v 1.56 2021/10/10 15:22:33 tom Exp $ +# $Id: ncursestw.map,v 1.58 2023/08/12 15:33:46 tom Exp $ # script for shared library symbol-versioning using ld # # This file was generated by ncu-mapsyms @@ -501,9 +501,23 @@ NCURSES_TINFO_6.2.20211010 { _nc_safe_open3; erasewchar_sp; killwchar_sp; +} NCURSES_TINFO_6.2.20200212; + +NCURSES_TINFO_6.4.current { + global: + is_cbreak; + is_cbreak_sp; + is_echo; + is_echo_sp; + is_nl; + is_nl_sp; + is_raw; + is_raw_sp; + tiparm_s; + tiscan_s; local: _*; -} NCURSES_TINFO_6.2.20200212; +} NCURSES_TINFO_6.2.20211010; NCURSESTW_5.7.20081102 { global: diff --git a/package/ncursestw.sym b/package/ncursestw.sym index 1668f409..b05baecc 100644 --- a/package/ncursestw.sym +++ b/package/ncursestw.sym @@ -1,4 +1,4 @@ -# $Id: ncursestw.sym,v 1.41 2021/08/19 23:50:26 tom Exp $ +# $Id: ncursestw.sym,v 1.43 2023/08/12 15:29:11 tom Exp $ # script for shared library symbol-visibility using libtool # # This file was generated by ncu-mapsyms @@ -486,16 +486,24 @@ instr intrflush intrflush_sp inwstr +is_cbreak +is_cbreak_sp is_cleared +is_echo +is_echo_sp is_idcok is_idlok is_immedok is_keypad is_leaveok is_linetouched +is_nl +is_nl_sp is_nodelay is_notimeout is_pad +is_raw +is_raw_sp is_scrollok is_subwin is_syncok @@ -863,6 +871,8 @@ tigetstr tigetstr_sp timeout tiparm +tiparm_s +tiscan_s top_panel top_row touchline diff --git a/package/ncursesw.map b/package/ncursesw.map index 13e8faf4..5c484e0b 100644 --- a/package/ncursesw.map +++ b/package/ncursesw.map @@ -1,4 +1,4 @@ -# $Id: ncursesw.map,v 1.59 2021/10/10 15:22:33 tom Exp $ +# $Id: ncursesw.map,v 1.61 2023/08/12 15:33:52 tom Exp $ # script for shared library symbol-versioning using ld # # This file was generated by ncu-mapsyms @@ -495,9 +495,23 @@ NCURSES_TINFO_6.2.20211010 { _nc_safe_open3; erasewchar_sp; killwchar_sp; +} NCURSES_TINFO_6.2.20200212; + +NCURSES_TINFO_6.4.current { + global: + is_cbreak; + is_cbreak_sp; + is_echo; + is_echo_sp; + is_nl; + is_nl_sp; + is_raw; + is_raw_sp; + tiparm_s; + tiscan_s; local: _*; -} NCURSES_TINFO_6.2.20200212; +} NCURSES_TINFO_6.2.20211010; NCURSESW_5.1.20000708 { global: diff --git a/package/ncursesw.sym b/package/ncursesw.sym index a17fd794..8ef771f9 100644 --- a/package/ncursesw.sym +++ b/package/ncursesw.sym @@ -1,4 +1,4 @@ -# $Id: ncursesw.sym,v 1.40 2021/08/19 23:50:26 tom Exp $ +# $Id: ncursesw.sym,v 1.42 2023/08/12 15:28:30 tom Exp $ # script for shared library symbol-visibility using libtool # # This file was generated by ncu-mapsyms @@ -474,16 +474,24 @@ instr intrflush intrflush_sp inwstr +is_cbreak +is_cbreak_sp is_cleared +is_echo +is_echo_sp is_idcok is_idlok is_immedok is_keypad is_leaveok is_linetouched +is_nl +is_nl_sp is_nodelay is_notimeout is_pad +is_raw +is_raw_sp is_scrollok is_subwin is_syncok @@ -859,6 +867,8 @@ tigetstr tigetstr_sp timeout tiparm +tiparm_s +tiscan_s top_panel top_row touchline diff --git a/progs/MKtermsort.sh b/progs/MKtermsort.sh old mode 100644 new mode 100755 index ca3232da..4e58c50a --- a/progs/MKtermsort.sh +++ b/progs/MKtermsort.sh @@ -1,10 +1,10 @@ #!/bin/sh -# $Id: MKtermsort.sh,v 1.16 2021/04/18 20:12:50 tom Exp $ +# $Id: MKtermsort.sh,v 1.17 2022/02/05 20:39:41 tom Exp $ # # MKtermsort.sh -- generate indirection vectors for the various sort methods # ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2021,2022 Thomas E. Dickey # # Copyright 1998-2015,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -47,7 +47,7 @@ AWK=${1-awk} DATA=${2-../include/Caps} data=data$$ -trap 'rm -f $data' 1 2 3 15 +trap 'rm -f $data; exit 1' 1 2 3 15 sed -e 's/[ ][ ]*/ /g' < "$DATA" >$data DATA=$data diff --git a/progs/Makefile.in b/progs/Makefile.in index d818af4e..218e64e0 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.111 2021/07/03 15:45:33 tom Exp $ +# $Id: Makefile.in,v 1.115 2024/04/08 18:33:54 tom Exp $ ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2021,2024 Thomas E. Dickey # # Copyright 1998-2016,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -93,7 +93,8 @@ CPP = @CPP@ CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ INCDIR = $(top_srcdir)/include -CPPFLAGS = -DHAVE_CONFIG_H -I../progs @CPPFLAGS@ +NCUDIR = $(top_srcdir)/ncurses +CPPFLAGS = -DHAVE_CONFIG_H -I../progs -I../ncurses -I$(top_srcdir)/ncurses @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) @@ -145,10 +146,24 @@ PROGS = $(PUT_PROGS) $(GET_PROGS) DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ HEADER_DEPS = \ - ../include/curses.h \ + $(INCDIR)/nc_access.h \ + $(INCDIR)/nc_alloc.h \ + $(INCDIR)/nc_panel.h \ + $(INCDIR)/nc_string.h \ + $(INCDIR)/nc_termios.h \ + $(INCDIR)/nc_tparm.h \ $(INCDIR)/term_entry.h \ $(INCDIR)/tic.h \ - $(INCDIR)/nc_alloc.h + $(NCUDIR)/curses.priv.h \ + $(NCUDIR)/new_pair.h \ + $(NCUDIR)/term.priv.h \ + $(srcdir)/progs.priv.h \ + ../include/curses.h \ + ../include/ncurses_cfg.h \ + ../include/ncurses_def.h \ + ../include/ncurses_dll.h \ + ../include/term.h \ + ../include/unctrl.h ################################################################################ diff --git a/progs/capconvert b/progs/capconvert index c73c3687..4b5b321a 100755 --- a/progs/capconvert +++ b/progs/capconvert @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2021,2022 Thomas E. Dickey # # Copyright 1998-2011,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -27,7 +27,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: capconvert,v 1.10 2021/09/04 10:55:04 tom Exp $ +# $Id: capconvert,v 1.12 2022/07/16 21:00:27 tom Exp $ # # capconvert -- automated conversion from termcap to terminfo # @@ -47,7 +47,7 @@ then echo "TERMINFO is already defined in your environment. This means" echo "you already have a local terminfo tree, so you do not need any" echo "conversion." - if test ! -d $TERMINFO ; then + if test ! -d "$TERMINFO" ; then echo "Caution: TERMINFO does not point to a directory!" fi exit; @@ -62,7 +62,7 @@ for p in $TERMINFO \ /usr/local/lib/terminfo \ /usr/local/share/terminfo do - if test -d $p ; then + if test -d "$p" ; then terminfo=yes break fi @@ -111,13 +111,13 @@ TIC= IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" for x in $PATH . do - if test $OPT $x/tic + if test "$OPT" "$x"/tic then TIC=$x/tic break fi done -IFS="$ac_save_ifs" +IFS="$save_ifs" if test -n "$TIC" then @@ -140,7 +140,7 @@ echo ""; # # Make the user a terminfo directory -if test -d $HOME/.terminfo +if test -d "$HOME"/.terminfo then echo "It appears you already have a private terminfo directory" echo "at $HOME/.terminfo; this seems odd, because TERMINFO" @@ -150,7 +150,7 @@ then exit; else echo "I am creating your private terminfo directory at $HOME/.terminfo" - mkdir $HOME/.terminfo + mkdir "$HOME"/.terminfo # Ensure that that's where tic's compilation results. # This isn't strictly necessary with a 1.9.7 or later tic. TERMINFO="$HOME/.terminfo"; export TERMINFO @@ -165,8 +165,8 @@ then else # Ooops...looks like we're running from somewhere other than the # progs directory of an ncurses source tree. - master=`find $HOME -name "*terminfo.src" -print` - mcount=`echo $master | wc -l` + master=`find "$HOME" -name "*terminfo.src" -print` + mcount=`find "$HOME" -name "*terminfo.src" | wc -l` case $mcount in 0) echo "I can not find a terminfo source file anywhere under your home directory." @@ -184,12 +184,12 @@ else ;; 2) echo "I see more than one possible terminfo source. Here they are:" - echo $master | sed "/^/s// /"; + echo "$master" | sed "/^/s// /"; while : do echo "Please tell me which one to use:" read master; - if test -f $master + if test -f "$master" then break else @@ -206,12 +206,13 @@ echo "OK, now I will make your private terminfo tree. This may take a bit..." # # Kluge alert: we compile terminfo.src in two pieces because a lot of machines # with < 16MB RAM choke on tic's core-hog habits. -trap "rm -f tsplit$$.*" EXIT INT QUIT TERM HUP -sed -n $master \ +trap 'rm -f tsplit$$.*; exit 1' 1 2 3 15 +trap 'rm -f tsplit$$.*' 0 +sed -n "$master" \ -e '1,/SPLIT HERE/w 'tsplit$$.01 \ -e '/SPLIT HERE/,$w 'tsplit$$.02 \ 2>/dev/null -for x in tsplit$$.*; do eval $TIC $x; done +for x in tsplit$$.*; do eval $TIC "$x"; done rm tsplit$$.* trap EXIT INT QUIT TERM HUP # @@ -231,22 +232,22 @@ fi # we don't actually know what TERM will be nor even if it always has # the same value for this user) we do the following three steps... -if test -f $HOME/.termcap +if test -f "$HOME"/.termcap then - echo 'I see you have a $HOME/.termcap file. I will compile that.' - eval $TIC $HOME/.termcap + echo "I see you have a \$HOME/.termcap file. I will compile that." + eval $TIC "$HOME"/.termcap echo "Done." echo "Note that editing $HOME/.termcap will no longer change the data curses sees." elif test -f "$TERMCAP" then echo "Your TERMCAP names the file $TERMCAP. I will compile that." - eval $TIC $TERMCAP + eval $TIC "$TERMCAP" echo "Done." echo "Note that editing $TERMCAP will no longer change the data curses sees." else echo "Your TERMCAP value appears to be an entry in termcap format." echo "I will compile it." - echo $TERMCAP >myterm$$ + echo "$TERMCAP" >myterm$$ eval $TIC myterm$$ rm myterm$$ echo "Done." diff --git a/progs/dump_entry.c b/progs/dump_entry.c index 860eccc9..be332d2e 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -40,7 +40,7 @@ #include /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.189 2021/09/04 10:29:59 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.196 2023/05/27 20:13:10 tom Exp $") #define DISCARD(string) string = ABSENT_STRING #define PRINTF (void) printf @@ -859,7 +859,6 @@ fmt_complex(TERMTYPE2 *tterm, const char *capability, char *src, int level) indent_DYN(&tmpbuf, level + 1); strncpy_DYN(&tmpbuf, "%", (size_t) 1); } - params = FALSE; percent = FALSE; break; case ' ': @@ -934,7 +933,7 @@ fmt_entry(TERMTYPE2 *tterm, strcpy_DYN(&outbuf, 0); if (content_only) { - column = indent; /* FIXME: workaround to prevent empty lines */ + column = indent; /* workaround to prevent empty lines */ } else { strcpy_DYN(&outbuf, tterm->term_names); @@ -1312,7 +1311,7 @@ fmt_entry(TERMTYPE2 *tterm, } static bool -kill_string(TERMTYPE2 *tterm, char *cap) +kill_string(TERMTYPE2 *tterm, const char *const cap) { unsigned n; for (n = 0; n < NUM_STRINGS(tterm); ++n) { @@ -1554,6 +1553,7 @@ dump_entry(TERMTYPE2 *tterm, save_sgr = set_attributes; if ((FMT_ENTRY() > critlen) + && TcOutput() && limited) { save_tterm = *tterm; @@ -1652,15 +1652,25 @@ dump_entry(TERMTYPE2 *tterm, } void -dump_uses(const char *name, bool infodump) +dump_uses(const char *value, bool infodump) /* dump "use=" clauses in the appropriate format */ { - char buffer[MAX_TERMINFO_LENGTH]; + char buffer[MAX_TERMINFO_LENGTH + EXTRA_CAP]; + int limit = (VALID_STRING(value) ? (int) strlen(value) : 0); + const char *cap = infodump ? "use" : "tc"; if (TcOutput()) trim_trailing(); + if (limit == 0) { + _nc_warning("empty \"%s\" field", cap); + value = ""; + } else if (limit > MAX_ALIAS) { + _nc_warning("\"%s\" field too long (%d), limit to %d", + cap, limit, MAX_ALIAS); + limit = MAX_ALIAS; + } _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) - "%s%s", infodump ? "use=" : "tc=", name); + "%s=%.*s", cap, limit, value); wrap_concat1(buffer); } @@ -1683,7 +1693,7 @@ show_entry(void) outbuf.used = (size_t) j; } else if (!infodump && ch == '\\') { outbuf.used = (size_t) j; - } else if (ch == delim && (j == 0 || outbuf.text[j - 1] != '\\')) { + } else if (ch == delim && (outbuf.text[j - 1] != '\\')) { outbuf.used = (size_t) (j + 1); } else { break; diff --git a/progs/infocmp.c b/progs/infocmp.c index d98c6760..7932203a 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: infocmp.c,v 1.151 2021/06/17 21:11:08 tom Exp $") +MODULE_ID("$Id: infocmp.c,v 1.163 2023/12/16 17:27:47 tom Exp $") #define MAX_STRING 1024 /* maximum formatted string */ @@ -124,17 +124,19 @@ failed(const char *s) ExitProgram(EXIT_FAILURE); } -static char * -canonical_name(char *ptr, char *buf) +static void +canonical_name(char *source, char *target) /* extract the terminal type's primary name */ { - char *bp; - - _nc_STRCPY(buf, ptr, NAMESIZE); - if ((bp = strchr(buf, '|')) != 0) - *bp = '\0'; + int limit = NAMESIZE; - return (buf); + while (--limit > 0) { + char ch = *source++; + if (ch == '|') + break; + *target++ = ch; + } + *target = '\0'; } static bool @@ -156,7 +158,7 @@ no_numeric(int value) } static bool -no_string(char *value) +no_string(const char *const value) { bool result = (value == ABSENT_STRING); if (!strcmp(s_absent, s_cancel)) @@ -185,10 +187,21 @@ capcmp(PredIdx idx, const char *s, const char *t) return (_nc_capcmp(s, t)); } +/* + * Predicate function to use for "use=" decompilation. + * + * Return value is used in fmt_entry: + * FAIL show nothing for this capability. + * FALSE show cancel for booleans (a compromise) + * TRUE show capability + * + * The only difference between FALSE/TRUE returns is in the treatment of + * booleans. + */ static int use_predicate(unsigned type, PredIdx idx) -/* predicate function to use for use decompilation */ { + int result = FAIL; ENTRY *ep; switch (type) { @@ -207,16 +220,18 @@ use_predicate(unsigned type, PredIdx idx) * unlike numbers and strings, whose cancelled/absent state is * recorded in the terminfo database. */ - for (ep = &entries[1]; ep < entries + termcount; ep++) - if (ep->tterm.Booleans[idx] == TRUE) { - is_set = entries[0].tterm.Booleans[idx]; - break; + if (idx < NUM_BOOLEANS(&(entries[0].tterm))) { + for (ep = &entries[1]; ep < entries + termcount; ep++) { + if (idx < NUM_BOOLEANS(&(ep->tterm)) + && (is_set = ep->tterm.Booleans[idx])) { + break; + } } - if (is_set != entries[0].tterm.Booleans[idx]) - return (!is_set); - else - return (FAIL); + if (is_set != entries[0].tterm.Booleans[idx]) + result = (!is_set); + } } + break; case NUMBER: { @@ -227,45 +242,56 @@ use_predicate(unsigned type, PredIdx idx) * capability gets the first non-default value found * in the sequence of use entries'. */ - for (ep = &entries[1]; ep < entries + termcount; ep++) - if (VALID_NUMERIC(ep->tterm.Numbers[idx])) { - value = ep->tterm.Numbers[idx]; - break; - } + if (idx < NUM_NUMBERS(&(entries[0].tterm))) { + for (ep = &entries[1]; ep < entries + termcount; ep++) + if (idx < NUM_NUMBERS(&(ep->tterm)) + && VALID_NUMERIC(ep->tterm.Numbers[idx])) { + value = ep->tterm.Numbers[idx]; + break; + } - if (value != entries[0].tterm.Numbers[idx]) - return (value != ABSENT_NUMERIC); - else - return (FAIL); + if (value != entries[0].tterm.Numbers[idx]) + result = (value != ABSENT_NUMERIC); + } } + break; case STRING: { - char *termstr, *usestr = ABSENT_STRING; - - termstr = entries[0].tterm.Strings[idx]; + char *termstr = entries[0].tterm.Strings[idx]; + char *usestr = ABSENT_STRING; /* * We take the semantics of multiple uses to be 'each * capability gets the first non-default value found * in the sequence of use entries'. */ - for (ep = &entries[1]; ep < entries + termcount; ep++) - if (ep->tterm.Strings[idx]) { - usestr = ep->tterm.Strings[idx]; - break; - } + if (idx < NUM_STRINGS(&(entries[0].tterm))) { + for (ep = &entries[1]; ep < entries + termcount; ep++) + if (idx < NUM_STRINGS(&(ep->tterm)) + && ep->tterm.Strings[idx]) { + usestr = ep->tterm.Strings[idx]; + break; + } - if (usestr == ABSENT_STRING && termstr == ABSENT_STRING) - return (FAIL); - else if (!usestr || !termstr || capcmp(idx, usestr, termstr)) - return (TRUE); - else - return (FAIL); + if (usestr == CANCELLED_STRING && termstr == ABSENT_STRING) + result = (FAIL); + else if (usestr == CANCELLED_STRING && termstr == CANCELLED_STRING) + result = (TRUE); + else if (usestr == ABSENT_STRING && termstr == ABSENT_STRING) + result = (FAIL); + else if (!usestr || !termstr || capcmp(idx, usestr, termstr)) + result = (TRUE); + } } + break; + + default: + result = FALSE; + break; } - return (FALSE); /* pacify compiler */ + return (result); } static bool @@ -903,7 +929,6 @@ analyze_string(const char *name, const char *cap, TERMTYPE2 *tp) sizeof(buf2)); _nc_STRNCPY(buf3, sp + csi, len); buf3[len] = '\0'; - len += (size_t) csi + 1; expansion = lookup_params(std_modes, buf2, buf3); } @@ -924,7 +949,6 @@ analyze_string(const char *name, const char *cap, TERMTYPE2 *tp) sizeof(buf2)); _nc_STRNCPY(buf3, sp + csi + 1, len); buf3[len] = '\0'; - len += (size_t) csi + 2; expansion = lookup_params(private_modes, buf2, buf3); } @@ -1132,8 +1156,8 @@ file_comparison(int argc, char *argv[]) if (entryeq(&qp->tterm, &rp->tterm) && useeq(qp, rp)) { char name1[NAMESIZE], name2[NAMESIZE]; - (void) canonical_name(qp->tterm.term_names, name1); - (void) canonical_name(rp->tterm.term_names, name2); + canonical_name(qp->tterm.term_names, name1); + canonical_name(rp->tterm.term_names, name2); (void) printf("%s = %s\n", name1, name2); } @@ -1161,8 +1185,8 @@ file_comparison(int argc, char *argv[]) entries[0] = *qp; entries[1] = *rp; - (void) canonical_name(qp->tterm.term_names, name1); - (void) canonical_name(rp->tterm.term_names, name2); + canonical_name(qp->tterm.term_names, name1); + canonical_name(rp->tterm.term_names, name2); switch (compare) { case C_DIFFERENCE: @@ -1725,7 +1749,7 @@ main(int argc, char *argv[]) case 'v': itrace = (unsigned) optarg_to_number(); - set_trace_level(itrace); + use_verbosity(itrace); break; case 'W': @@ -1858,8 +1882,16 @@ main(int argc, char *argv[]) } #if NCURSES_XNAMES - if (termcount > 1) - _nc_align_termtype(&entries[0].tterm, &entries[1].tterm); + if (termcount > 1) { + /* + * User-defined capabilities in different terminal descriptions + * may have the same name/type but different indices. Line up + * the names to use comparable indices. We may have more than two + * entries to compare when processing the "-u" option. + */ + for (c = 1; c < termcount; ++c) + _nc_align_termtype(&entries[c].tterm, &entries[0].tterm); + } #endif /* dump as C initializer for the terminal type */ diff --git a/progs/progs.priv.h b/progs/progs.priv.h index 32f4e4e8..fea18b8d 100644 --- a/progs/progs.priv.h +++ b/progs/progs.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2024 Thomas E. Dickey * * Copyright 1998-2015,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * Author: Thomas E. Dickey 1997-on * ****************************************************************************/ /* - * $Id: progs.priv.h,v 1.53 2021/06/26 20:43:19 tom Exp $ + * $Id: progs.priv.h,v 1.62 2024/04/08 17:28:28 tom Exp $ * * progs.priv.h * @@ -41,28 +41,9 @@ #ifndef PROGS_PRIV_H #define PROGS_PRIV_H 1 -#include +#include -#if USE_RCS_IDS -#define MODULE_ID(id) static const char Ident[] = id; -#else -#define MODULE_ID(id) /*nothing */ -#endif - -#include #include -#include -#include - -#if HAVE_UNISTD_H -#include -#endif - -#if HAVE_LIMITS_H -# include -#elif HAVE_SYS_PARAM_H -# include -#endif #if HAVE_DIRENT_H # include @@ -90,21 +71,6 @@ # endif #endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif - -#include -#include - -#if DECL_ERRNO -extern int errno; -#endif - #if HAVE_GETOPT_H #include #elif !defined(HAVE_GETOPT_HEADER) @@ -115,28 +81,7 @@ extern char *optarg; extern int optind; #endif /* HAVE_GETOPT_H */ -#undef _NC_WINDOWS -#if (defined(_WIN32) || defined(_WIN64)) -#define _NC_WINDOWS 1 -#endif - -#define NCURSES_INTERNALS 1 -#define NCURSES_OPAQUE 0 - -#include - -#if !(defined(NCURSES_WGETCH_EVENTS) && defined(NEED_KEY_EVENT)) -#undef KEY_EVENT /* reduce compiler-warnings with Visual C++ */ -#endif - -#include -#include #include -#include - -#include -#include -#include #if HAVE_NC_FREEALL #undef ExitProgram @@ -147,77 +92,12 @@ extern int optind; #endif #endif -#define VtoTrace(opt) (unsigned) ((opt > 0) ? opt : (opt == 0)) - /* error-returns for tput */ #define ErrUsage 2 #define ErrTermType 3 #define ErrCapName 4 #define ErrSystem(n) (4 + (n)) -#if defined(__GNUC__) && defined(_FORTIFY_SOURCE) -#define IGNORE_RC(func) errno = (int) func -#else -#define IGNORE_RC(func) (void) func -#endif /* gcc workarounds */ - -/* usually in */ -#ifndef STDIN_FILENO -#define STDIN_FILENO 0 -#endif - -#ifndef STDOUT_FILENO -#define STDOUT_FILENO 1 -#endif - -#ifndef STDERR_FILENO -#define STDERR_FILENO 2 -#endif - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif - -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#ifndef R_OK -#define R_OK 4 /* Test for readable. */ -#endif - -#ifndef W_OK -#define W_OK 2 /* Test for writable. */ -#endif - -#ifndef X_OK -#define X_OK 1 /* Test for executable. */ -#endif - -#ifndef F_OK -#define F_OK 0 /* Test for existence. */ -#endif - -/* usually in */ -#ifndef STDOUT_FILENO -#define STDOUT_FILENO 1 -#endif - -#ifndef STDERR_FILENO -#define STDERR_FILENO 2 -#endif - -/* may be in limits.h, included from various places */ -#ifndef PATH_MAX -# if defined(_POSIX_PATH_MAX) -# define PATH_MAX _POSIX_PATH_MAX -# elif defined(MAXPATHLEN) -# define PATH_MAX MAXPATHLEN -# else -# define PATH_MAX 255 /* the Posix minimum pathsize */ -# endif -#endif - /* We use isascii only to guard against use of 7-bit ctype tables in the * isprint test in infocmp. */ @@ -230,16 +110,28 @@ extern int optind; # endif #endif -#define UChar(c) ((unsigned char)(c)) - -#define SIZEOF(v) (sizeof(v)/sizeof(v[0])) - -#define NCURSES_EXT_NUMBERS (NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR) +#define VtoTrace(opt) (unsigned) ((opt > 0) ? opt : (opt == 0)) -#if NCURSES_EXT_NUMBERS +/* + * If configured for tracing, the debug- and trace-output are merged together + * in the trace file for "upper" levels of the verbose option. + */ +#ifdef TRACE +#define use_verbosity(level) do { \ + set_trace_level(level); \ + if (_nc_tracing > DEBUG_LEVEL(2)) \ + _nc_tracing |= TRACE_MAXIMUM; \ + else if (_nc_tracing == DEBUG_LEVEL(2)) \ + _nc_tracing |= TRACE_ORDINARY; \ + if (level >= 2) \ + curses_trace(_nc_tracing); \ + } while (0) #else -#define _nc_free_termtype2(t) _nc_free_termtype(t) -#define _nc_read_entry2(n,f,t) _nc_read_entry(n,f,t) +#define use_verbosity(level) do { set_trace_level(level); } while (0) +#endif + +#ifndef CUR +#define CUR ((TERMTYPE *)(cur_term))-> #endif #endif /* PROGS_PRIV_H */ diff --git a/progs/reset_cmd.c b/progs/reset_cmd.c index eff3af72..6ae3b673 100644 --- a/progs/reset_cmd.c +++ b/progs/reset_cmd.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2023,2024 Thomas E. Dickey * * Copyright 2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -53,7 +53,7 @@ #include #endif -MODULE_ID("$Id: reset_cmd.c,v 1.28 2021/10/02 18:08:44 tom Exp $") +MODULE_ID("$Id: reset_cmd.c,v 1.37 2024/04/08 17:29:34 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -75,6 +75,9 @@ MODULE_ID("$Id: reset_cmd.c,v 1.28 2021/10/02 18:08:44 tom Exp $") # endif #endif +#define set_flags(target, mask) target |= mask +#define clear_flags(target, mask) target &= ~((unsigned)(mask)) + static FILE *my_file; static bool use_reset = FALSE; /* invoked as reset */ @@ -188,6 +191,79 @@ out_char(int c) #define reset_char(item, value) \ tty_settings->c_cc[item] = CHK(tty_settings->c_cc[item], value) +/* + * Simplify ifdefs + */ +#ifndef BSDLY +#define BSDLY 0 +#endif +#ifndef CRDLY +#define CRDLY 0 +#endif +#ifndef ECHOCTL +#define ECHOCTL 0 +#endif +#ifndef ECHOKE +#define ECHOKE 0 +#endif +#ifndef ECHOPRT +#define ECHOPRT 0 +#endif +#ifndef FFDLY +#define FFDLY 0 +#endif +#ifndef IMAXBEL +#define IMAXBEL 0 +#endif +#ifndef IUCLC +#define IUCLC 0 +#endif +#ifndef IXANY +#define IXANY 0 +#endif +#ifndef NLDLY +#define NLDLY 0 +#endif +#ifndef OCRNL +#define OCRNL 0 +#endif +#ifndef OFDEL +#define OFDEL 0 +#endif +#ifndef OFILL +#define OFILL 0 +#endif +#ifndef OLCUC +#define OLCUC 0 +#endif +#ifndef ONLCR +#define ONLCR 0 +#endif +#ifndef ONLRET +#define ONLRET 0 +#endif +#ifndef ONOCR +#define ONOCR 0 +#endif +#ifndef OXTABS +#define OXTABS 0 +#endif +#ifndef TAB3 +#define TAB3 0 +#endif +#ifndef TABDLY +#define TABDLY 0 +#endif +#ifndef TOSTOP +#define TOSTOP 0 +#endif +#ifndef VTDLY +#define VTDLY 0 +#endif +#ifndef XCASE +#define XCASE 0 +#endif + /* * Reset the terminal mode bits to a sensible state. Very useful after * a child program dies in raw mode. @@ -195,6 +271,11 @@ out_char(int c) void reset_tty_settings(int fd, TTY * tty_settings, int noset) { + unsigned mask; +#ifdef TIOCMGET + int modem_bits; +#endif + GET_TTY(fd, tty_settings); #ifdef TERMIOS @@ -203,6 +284,9 @@ reset_tty_settings(int fd, TTY * tty_settings, int noset) #endif reset_char(VEOF, CEOF); reset_char(VERASE, CERASE); +#if defined(VERASE2) && defined(CERASE2) + reset_char(VERASE2, CERASE2); +#endif #if defined(VFLUSH) && defined(CFLUSH) reset_char(VFLUSH, CFLUSH); #endif @@ -228,106 +312,65 @@ reset_tty_settings(int fd, TTY * tty_settings, int noset) reset_char(VWERASE, CWERASE); #endif - tty_settings->c_iflag &= ~((unsigned) (IGNBRK - | PARMRK - | INPCK - | ISTRIP - | INLCR - | IGNCR -#ifdef IUCLC - | IUCLC -#endif -#ifdef IXANY - | IXANY -#endif - | IXOFF)); - - tty_settings->c_iflag |= (BRKINT - | IGNPAR - | ICRNL - | IXON -#ifdef IMAXBEL - | IMAXBEL -#endif - ); - - tty_settings->c_oflag &= ~((unsigned) (0 -#ifdef OLCUC - | OLCUC -#endif -#ifdef OCRNL - | OCRNL -#endif -#ifdef ONOCR - | ONOCR -#endif -#ifdef ONLRET - | ONLRET -#endif -#ifdef OFILL - | OFILL -#endif -#ifdef OFDEL - | OFDEL -#endif -#ifdef NLDLY - | NLDLY -#endif -#ifdef CRDLY - | CRDLY -#endif -#ifdef TABDLY - | TABDLY -#endif -#ifdef BSDLY - | BSDLY -#endif -#ifdef VTDLY - | VTDLY -#endif -#ifdef FFDLY - | FFDLY -#endif - )); - - tty_settings->c_oflag |= (OPOST -#ifdef ONLCR - | ONLCR -#endif - ); - - tty_settings->c_cflag &= ~((unsigned) (CSIZE - | CSTOPB - | PARENB - | PARODD - | CLOCAL)); - tty_settings->c_cflag |= (CS8 | CREAD); - tty_settings->c_lflag &= ~((unsigned) (ECHONL - | NOFLSH -#ifdef TOSTOP - | TOSTOP -#endif -#ifdef ECHOPTR - | ECHOPRT -#endif -#ifdef XCASE - | XCASE -#endif - )); - - tty_settings->c_lflag |= (ISIG - | ICANON - | ECHO - | ECHOE - | ECHOK -#ifdef ECHOCTL - | ECHOCTL -#endif -#ifdef ECHOKE - | ECHOKE -#endif - ); -#endif + clear_flags(tty_settings->c_iflag, (IGNBRK + | PARMRK + | INPCK + | ISTRIP + | INLCR + | IGNCR + | IUCLC + | IXANY + | IXOFF)); + + set_flags(tty_settings->c_iflag, (BRKINT + | IGNPAR + | ICRNL + | IXON + | IMAXBEL)); + + clear_flags(tty_settings->c_oflag, (0 + | OLCUC + | OCRNL + | ONOCR + | ONLRET + | OFILL + | OFDEL + | NLDLY + | CRDLY + | TABDLY + | BSDLY + | VTDLY + | FFDLY)); + + set_flags(tty_settings->c_oflag, (OPOST + | ONLCR)); + + mask = (CSIZE | CSTOPB | PARENB | PARODD); +#ifdef TIOCMGET + /* leave clocal alone if this appears to use a modem */ + if (ioctl(fd, TIOCMGET, &modem_bits) == -1) + mask |= CLOCAL; +#else + /* cannot check - use the behavior from tset */ + mask |= CLOCAL; +#endif + clear_flags(tty_settings->c_cflag, mask); + + set_flags(tty_settings->c_cflag, (CS8 | CREAD)); + clear_flags(tty_settings->c_lflag, (ECHONL + | NOFLSH + | TOSTOP + | ECHOPRT + | XCASE)); + + set_flags(tty_settings->c_lflag, (ISIG + | ICANON + | ECHO + | ECHOE + | ECHOK + | ECHOCTL + | ECHOKE)); +#endif /* TERMIOS */ if (!noset) { SET_TTY(fd, tty_settings); @@ -402,29 +445,23 @@ set_conversions(TTY * tty_settings) #if defined(EXP_WIN32_DRIVER) /* FIXME */ #else -#ifdef ONLCR - tty_settings->c_oflag |= ONLCR; -#endif - tty_settings->c_iflag |= ICRNL; - tty_settings->c_lflag |= ECHO; -#ifdef OXTABS - tty_settings->c_oflag |= OXTABS; -#endif /* OXTABS */ + set_flags(tty_settings->c_oflag, ONLCR); + set_flags(tty_settings->c_iflag, ICRNL); + set_flags(tty_settings->c_lflag, ECHO); + set_flags(tty_settings->c_oflag, OXTABS); /* test used to be tgetflag("NL") */ if (VALID_STRING(newline) && newline[0] == '\n' && !newline[1]) { /* Newline, not linefeed. */ -#ifdef ONLCR - tty_settings->c_oflag &= ~((unsigned) ONLCR); -#endif - tty_settings->c_iflag &= ~((unsigned) ICRNL); + clear_flags(tty_settings->c_oflag, ONLCR); + clear_flags(tty_settings->c_iflag, ICRNL); } -#ifdef OXTABS +#if OXTABS /* test used to be tgetflag("pt") */ if (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs)) - tty_settings->c_oflag &= ~OXTABS; + clear_flags(tty_settings->c_oflag, OXTABS); #endif /* OXTABS */ - tty_settings->c_lflag |= (ECHOE | ECHOK); + set_flags(tty_settings->c_lflag, (ECHOE | ECHOK)); #endif } @@ -490,7 +527,7 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings) bool need_flush = FALSE; (void) old_settings; -#ifdef TAB3 +#if TAB3 if (old_settings != 0 && old_settings->c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) { old_settings->c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET); @@ -512,22 +549,22 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings) if (VALID_STRING(clear_margins)) { need_flush |= sent_string(clear_margins); - } else + } #if defined(set_lr_margin) - if (VALID_STRING(set_lr_margin)) { + else if (VALID_STRING(set_lr_margin)) { need_flush |= sent_string(TIPARM_2(set_lr_margin, 0, columns - 1)); - } else + } #endif #if defined(set_left_margin_parm) && defined(set_right_margin_parm) - if (VALID_STRING(set_left_margin_parm) - && VALID_STRING(set_right_margin_parm)) { + else if (VALID_STRING(set_left_margin_parm) + && VALID_STRING(set_right_margin_parm)) { need_flush |= sent_string(TIPARM_1(set_left_margin_parm, 0)); need_flush |= sent_string(TIPARM_1(set_right_margin_parm, columns - 1)); - } else + } #endif - if (VALID_STRING(set_left_margin) - && VALID_STRING(set_right_margin)) { + else if (VALID_STRING(set_left_margin) + && VALID_STRING(set_right_margin)) { need_flush |= to_left_margin(); need_flush |= sent_string(set_left_margin); if (VALID_STRING(parm_right_cursor)) { @@ -640,7 +677,7 @@ print_tty_chars(TTY * old_settings, TTY * new_settings) * size was set. */ void -set_window_size(int fd, short *high, short *wide) +set_window_size(int fd, NCURSES_INT2 *high, NCURSES_INT2 *wide) { STRUCT_WINSIZE win; (void) ioctl(fd, IOCTL_GET_WINSIZE, &win); diff --git a/progs/reset_cmd.h b/progs/reset_cmd.h index 91a637c7..43aee28f 100644 --- a/progs/reset_cmd.h +++ b/progs/reset_cmd.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2024 Thomas E. Dickey * * Copyright 2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -32,7 +32,7 @@ ****************************************************************************/ /* - * $Id: reset_cmd.h,v 1.9 2021/10/02 20:58:58 tom Exp $ + * $Id: reset_cmd.h,v 1.11 2024/04/08 17:29:34 tom Exp $ * * Utility functions for resetting terminal. */ @@ -56,7 +56,7 @@ extern void set_control_chars(TTY * /* tty_settings */, int /* erase */, int /* extern void set_conversions(TTY * /* tty_settings */); #if HAVE_SIZECHANGE -extern void set_window_size(int /* fd */, short * /* high */, short * /* wide */); +extern void set_window_size(int /* fd */, NCURSES_INT2 * /* high */, NCURSES_INT2 * /* wide */); #endif extern const char *_nc_progname; diff --git a/progs/tabs.c b/progs/tabs.c index 02de31c6..a630b044 100644 --- a/progs/tabs.c +++ b/progs/tabs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 2008-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -39,7 +39,7 @@ #include #include -MODULE_ID("$Id: tabs.c,v 1.50 2021/10/10 00:54:41 tom Exp $") +MODULE_ID("$Id: tabs.c,v 1.53 2023/11/04 20:46:09 tom Exp $") static GCC_NORETURN void usage(void); @@ -128,7 +128,7 @@ decode_tabs(const char *tab_list, int margin) int prior = 0; int ch; - if (result == 0) + if (result == NULL) failed("decode_tabs"); if (margin < 0) @@ -138,6 +138,8 @@ decode_tabs(const char *tab_list, int margin) if (isdigit(UChar(ch))) { value *= 10; value += (ch - '0'); + if (value > max_cols) + value = max_cols; } else if (ch == ',') { result[n] = value + prior + margin; if (n > 0 && result[n] <= result[n - 1]) { @@ -181,7 +183,7 @@ decode_tabs(const char *tab_list, int margin) } static void -print_ruler(int *tab_list, const char *new_line) +print_ruler(const int *const tab_list, const char *new_line) { int last = 0; int n; @@ -368,7 +370,9 @@ do_set_margin(int margin, bool no_op) } tputs(set_left_margin, 1, putch); } - } else if (VALID_STRING(set_left_margin_parm)) { + } +#if defined(set_left_margin_parm) && defined(set_right_margin_parm) + else if (VALID_STRING(set_left_margin_parm)) { result = TRUE; if (!no_op) { if (VALID_STRING(set_right_margin_parm)) { @@ -377,12 +381,16 @@ do_set_margin(int margin, bool no_op) tputs(TIPARM_2(set_left_margin_parm, margin, max_cols), 1, putch); } } - } else if (VALID_STRING(set_lr_margin)) { + } +#endif +#if defined(set_lr_margin) + else if (VALID_STRING(set_lr_margin)) { result = TRUE; if (!no_op) { tputs(TIPARM_2(set_lr_margin, margin, max_cols), 1, putch); } } +#endif return result; } @@ -647,7 +655,7 @@ main(int argc, char *argv[]) /* set tty modes to -ocrnl to allow \r */ if (isatty(STDOUT_FILENO)) { TTY new_settings = tty_settings; - new_settings.c_oflag &= (unsigned)~OCRNL; + new_settings.c_oflag &= (unsigned) ~OCRNL; update_tty_settings(&tty_settings, &new_settings); change_tty = TRUE; new_line = "\r\n"; diff --git a/progs/tic.c b/progs/tic.c index bd83ac23..fc77b344 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.308 2021/12/12 00:00:33 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.325 2024/03/02 19:33:22 tom Exp $") #define STDIN_NAME "" @@ -459,17 +459,20 @@ open_input(const char *filename, char *alt_file) if (!strcmp(filename, "-")) { fp = copy_input(stdin, STDIN_NAME, alt_file); } else if (stat(filename, &sb) == -1) { - fprintf(stderr, "%s: %s %s\n", _nc_progname, filename, strerror(errno)); + fprintf(stderr, "%s: cannot open '%s': %s\n", _nc_progname, + filename, strerror(errno)); ExitProgram(EXIT_FAILURE); } else if ((mode = (sb.st_mode & S_IFMT)) == S_IFDIR || (mode != S_IFREG && mode != S_IFCHR && mode != S_IFIFO)) { - fprintf(stderr, "%s: %s is not a file\n", _nc_progname, filename); + fprintf(stderr, "%s: cannot open '%s'; it is not a file\n", + _nc_progname, filename); ExitProgram(EXIT_FAILURE); } else { fp = safe_fopen(filename, "r"); if (fp == NULL) { - fprintf(stderr, "%s: Can't open %s\n", _nc_progname, filename); + fprintf(stderr, "%s: cannot open '%s': %s\n", _nc_progname, + filename, strerror(errno)); ExitProgram(EXIT_FAILURE); } if (mode != S_IFREG) { @@ -477,7 +480,8 @@ open_input(const char *filename, char *alt_file) FILE *fp2 = copy_input(fp, filename, alt_file); fp = fp2; } else { - fprintf(stderr, "%s: %s is not a file\n", _nc_progname, filename); + fprintf(stderr, "%s: cannot open '%s'; it is not a" + " file\n", _nc_progname, filename); ExitProgram(EXIT_FAILURE); } } @@ -644,7 +648,7 @@ show_databases(const char *outdir) const char *tried = 0; if (outdir == NULL) { - outdir = _nc_tic_dir(0); + outdir = _nc_tic_dir(NULL); } if ((result = valid_db_path(outdir)) != 0) { printf("%s\n", result); @@ -700,7 +704,7 @@ main(int argc, char *argv[]) bool forceresolve = FALSE; /* force resolution */ bool limited = TRUE; char *tversion = (char *) NULL; - const char *source_file = "terminfo"; + const char *source_file; char *outdir = (char *) NULL; bool check_only = FALSE; bool suppress_untranslatable = FALSE; @@ -722,7 +726,8 @@ main(int argc, char *argv[]) sortmode = S_TERMCAP; } #if NCURSES_XNAMES - use_extended_names(FALSE); + /* set this directly to avoid interaction with -v and -D options */ + _nc_user_definable = FALSE; #endif _nc_strict_bsd = 0; @@ -775,7 +780,7 @@ main(int argc, char *argv[]) break; case 'D': debug_level = VtoTrace(v_opt); - set_trace_level(debug_level); + use_verbosity(debug_level); show_databases(outdir); ExitProgram(EXIT_SUCCESS); break; @@ -853,7 +858,6 @@ main(int argc, char *argv[]) _nc_disable_period = TRUE; /* FALLTHRU */ case 'x': - use_extended_names(TRUE); using_extensions = TRUE; break; #endif @@ -863,8 +867,23 @@ main(int argc, char *argv[]) last_opt = this_opt; } + /* + * If the -v option is set, it may override the $NCURSES_TRACE environment + * variable, e.g., for -v3 and up. + */ debug_level = VtoTrace(v_opt); - set_trace_level(debug_level); + use_verbosity(debug_level); + + /* + * Do this after setting debug_level, since the function calls START_TRACE, + * which uses the $NCURSES_TRACE environment variable if _nc_tracing bits + * for tracing are zero. + */ +#if NCURSES_XNAMES + if (using_extensions) { + use_extended_names(TRUE); + } +#endif if (_nc_tracing) { save_check_termtype = _nc_check_termtype2; @@ -1081,7 +1100,7 @@ main(int argc, char *argv[]) if (total != 0) fprintf(log_fp, "%d entries written to %s\n", total, - _nc_tic_dir((char *) 0)); + _nc_tic_dir(NULL)); else fprintf(log_fp, "No entries written\n"); } @@ -1154,6 +1173,7 @@ check_acs(TERMTYPE2 *tp) char *q; memset(mapped, 0, sizeof(mapped)); + memset(missing, 0, sizeof(missing)); for (p = acs_chars; *p != '\0'; p += 2) { if (p[1] == '\0') { _nc_warning("acsc has odd number of characters"); @@ -1335,8 +1355,7 @@ check_ansi_cursor(char *list[4]) for (j = 0; j < 4; ++j) { skip[j] = FALSE; for (k = 0; k < j; ++k) { - if (j != k - && !strcmp(list[j], list[k])) { + if (!strcmp(list[j], list[k])) { char *value = _nc_tic_expand(list[k], TRUE, 0); _nc_warning("repeated cursor control %s", value); repeated = TRUE; @@ -1741,6 +1760,8 @@ check_screen(TERMTYPE2 *tp) } else if (have_XT && screen_base) { _nc_warning("screen's \"screen\" entries should not have XT set"); } else if (have_XT) { + char *s; + if (!have_kmouse && is_screen) { if (VALID_STRING(key_mouse)) { _nc_warning("value of kmous inconsistent with screen's usage"); @@ -1756,7 +1777,9 @@ check_screen(TERMTYPE2 *tp) "to have 39/49 parameters", name_39_49); } } - if (VALID_STRING(to_status_line)) + if (VALID_STRING(to_status_line) + && (s = strchr(to_status_line, ';')) != NULL + && *++s == '\0') _nc_warning("\"tsl\" capability is redundant, given XT"); } else { if (have_kmouse @@ -2251,9 +2274,15 @@ check_1_infotocap(const char *name, NCURSES_CONST char *value, int count) _nc_reset_tparm(NULL); switch (actual) { + case Str: + result = TPARM_1(value, strings[1]); + break; case Num_Str: result = TPARM_2(value, numbers[1], strings[2]); break; + case Str_Str: + result = TPARM_2(value, strings[1], strings[2]); + break; case Num_Str_Str: result = TPARM_3(value, numbers[1], strings[2], strings[3]); break; @@ -2415,60 +2444,63 @@ static void check_infotocap(TERMTYPE2 *tp, int i, const char *value) { const char *name = ExtStrname(tp, i, strnames); - int params = ((i < (int) SIZEOF(parametrized)) - ? parametrized[i] - : ((*value == 'k') - ? 0 - : has_params(value, FALSE))); char *ti_value = NULL; - char *tc_value; - bool embedded; assert(SIZEOF(parametrized) == STRCOUNT); if (!VALID_STRING(value) || (ti_value = strdup(value)) == NULL) { _nc_warning("tic-expansion of %s failed", name); - } else if ((tc_value = _nc_infotocap(name, ti_value, params)) == ABSENT_STRING) { - _nc_warning("tic-conversion of %s failed", name); - } else if (params > 0) { - int limit = 5; - int count; - bool first = TRUE; - - if (!strcmp(name, "setf") - || !strcmp(name, "setb") - || !strcmp(name, "setaf") - || !strcmp(name, "setab")) { - if ((limit = max_colors) > 256) - limit = 256; - } - for (count = 0; count < limit; ++count) { - char *ti_check = check_1_infotocap(name, ti_value, count); - char *tc_check = check_1_infotocap(name, tc_value, count); - - if (strcmp(ti_check, tc_check)) { - if (first) { - fprintf(stderr, "check_infotocap(%s)\n", name); - fprintf(stderr, "...ti '%s'\n", _nc_visbuf2(0, ti_value)); - fprintf(stderr, "...tc '%s'\n", _nc_visbuf2(0, tc_value)); - first = FALSE; + } else { + char *tc_value; + bool embedded; + int params = ((i < (int) SIZEOF(parametrized)) + ? parametrized[i] + : ((*value == 'k') + ? 0 + : has_params(value, FALSE))); + + if ((tc_value = _nc_infotocap(name, ti_value, params)) == ABSENT_STRING) { + _nc_warning("tic-conversion of %s failed", name); + } else if (params > 0) { + int limit = 5; + int count; + bool first = TRUE; + + if (!strcmp(name, "setf") + || !strcmp(name, "setb") + || !strcmp(name, "setaf") + || !strcmp(name, "setab")) { + if ((limit = max_colors) > 256) + limit = 256; + } + for (count = 0; count < limit; ++count) { + char *ti_check = check_1_infotocap(name, ti_value, count); + char *tc_check = check_1_infotocap(name, tc_value, count); + + if (strcmp(ti_check, tc_check)) { + if (first) { + fprintf(stderr, "check_infotocap(%s)\n", name); + fprintf(stderr, "...ti '%s'\n", _nc_visbuf2(0, ti_value)); + fprintf(stderr, "...tc '%s'\n", _nc_visbuf2(0, tc_value)); + first = FALSE; + } + _nc_warning("tparm-conversion of %s(%d) differs between\n\tterminfo %s\n\ttermcap %s", + name, count, + _nc_visbuf2(0, ti_check), + _nc_visbuf2(1, tc_check)); } - _nc_warning("tparm-conversion of %s(%d) differs between\n\tterminfo %s\n\ttermcap %s", - name, count, - _nc_visbuf2(0, ti_check), - _nc_visbuf2(1, tc_check)); + free(ti_check); + free(tc_check); + } + } else if (params == 0 && !same_ti_tc(ti_value, tc_value, &embedded)) { + if (embedded) { + _nc_warning("termcap equivalent of %s cannot use embedded delay", name); + } else { + _nc_warning("tic-conversion of %s changed value\n\tfrom %s\n\tto %s", + name, ti_value, tc_value); } - free(ti_check); - free(tc_check); - } - } else if (params == 0 && !same_ti_tc(ti_value, tc_value, &embedded)) { - if (embedded) { - _nc_warning("termcap equivalent of %s cannot use embedded delay", name); - } else { - _nc_warning("tic-conversion of %s changed value\n\tfrom %s\n\tto %s", - name, ti_value, tc_value); } + free(ti_value); } - free(ti_value); } static char * @@ -2973,6 +3005,190 @@ check_user_capability_type(const char *name, int actual) } #endif +#define IN_DELAY "0123456789*/." + +static bool +check_ANSI_cap(const char *value, int nparams, char final) +{ + bool result = FALSE; + if (VALID_STRING(value) && csi_length(value) > 0) { + char *p_is_s[NUM_PARM]; + int popcount; + int analyzed = _nc_tparm_analyze(NULL, value, p_is_s, &popcount); + if (analyzed < popcount) { + analyzed = popcount; + } + if (analyzed == nparams) { + bool numbers = TRUE; + int p; + for (p = 0; p < nparams; ++p) { + if (p_is_s[p]) { + numbers = FALSE; + break; + } + } + if (numbers) { + int in_delay = 0; + p = (int) strlen(value); + while (p-- > 0) { + char ch = value[p]; + if (ch == final) { + result = TRUE; + break; + } + switch (in_delay) { + case 0: + if (ch == '>') + in_delay = 1; + break; + case 1: + if (strchr(IN_DELAY, value[p]) != NULL) + break; + if (ch != '<') + p = 0; + in_delay = 2; + break; + case 2: + if (ch != '$') + p = 0; + in_delay = 0; + break; + } + } + } + } + } + return result; +} + +static const char * +skip_Delay(const char *value) +{ + const char *result = value; + + if (*value == '$') { + ++result; + if (*result++ == '<') { + while (strchr(IN_DELAY, *result) != NULL) + ++result; + if (*result++ != '>') { + result = value; + } + } else { + result = value; + } + } + return result; +} + +static bool +isValidString(const char *value, const char *expect) +{ + bool result = FALSE; + if (VALID_STRING(value)) { + if (!strcmp(value, expect)) + result = TRUE; + } + return result; +} + +static bool +isValidEscape(const char *value, const char *expect) +{ + bool result = FALSE; + if (VALID_STRING(value)) { + if (*value == '\033') { + size_t need = strlen(expect); + size_t have = strlen(value) - 1; + if (have >= need && !strncmp(value + 1, expect, need)) { + if (*skip_Delay(value + need + 1) == '\0') { + result = TRUE; + } + } + } + } + return result; +} + +static int +guess_ANSI_VTxx(TERMTYPE2 *tp) +{ + int result = -1; + int checks = 0; + + /* VT100s have scrolling region, but ANSI (ECMA-48) does not specify */ + if (check_ANSI_cap(change_scroll_region, 2, 'r') && + (isValidEscape(scroll_forward, "D") || + isValidString(scroll_forward, "\n") || + isValidEscape(scroll_forward, "6")) && + (isValidEscape(scroll_reverse, "M") || + isValidEscape(scroll_reverse, "9"))) { + checks |= 2; + } + if (check_ANSI_cap(cursor_address, 2, 'H') && + check_ANSI_cap(cursor_up, 0, 'A') && + (check_ANSI_cap(cursor_down, 0, 'B') || + isValidString(cursor_down, "\n")) && + check_ANSI_cap(cursor_right, 0, 'C') && + (check_ANSI_cap(cursor_left, 0, 'D') || + isValidString(cursor_left, "\b")) && + check_ANSI_cap(clr_eos, 0, 'J') && + check_ANSI_cap(clr_bol, 0, 'K') && + check_ANSI_cap(clr_eol, 0, 'K')) { + checks |= 1; + } + if (checks == 3) + result = 1; + if (checks == 1) + result = 0; + return result; +} + +/* + * u6/u7 and u8/u9 are query/response extensions which most terminals support. + * In particular, any ECMA-48 terminal should support these, though the details + * for u9 are implementation dependent. + */ +#if defined(user6) && defined(user7) && defined(user8) && defined(user9) +static void +check_user_6789(TERMTYPE2 *tp) +{ + /* + * Check if the terminal is known to not + */ +#define NO_QUERY(longname,shortname) \ + if (PRESENT(longname)) _nc_warning(#shortname " is not supported") + if (tigetflag("NQ") > 0) { + NO_QUERY(user6, u6); + NO_QUERY(user7, u7); + NO_QUERY(user8, u8); + NO_QUERY(user9, u9); + return; + } + + PAIRED(user6, user7); + PAIRED(user8, user9); + + if (strchr(tp->term_names, '+') != NULL) + return; + + switch (guess_ANSI_VTxx(tp)) { + case 1: + if (!PRESENT(user8)) { + _nc_warning("expected u8/u9 for device-attributes"); + } + /* FALLTHRU */ + case 0: + if (!PRESENT(user6)) { + _nc_warning("expected u6/u7 for cursor-position"); + } + break; + } +} +#else +#define check_user_6789(tp) /* nothing */ +#endif + /* other sanity-checks (things that we don't want in the normal * logic that reads a terminfo entry) */ @@ -3021,6 +3237,7 @@ check_termtype(TERMTYPE2 *tp, bool literal) check_keypad(tp); check_printer(tp); check_screen(tp); + check_user_6789(tp); /* * These are probably both or none. diff --git a/progs/toe.c b/progs/toe.c index 92819c19..ecbfd53b 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -45,7 +45,7 @@ #include #endif -MODULE_ID("$Id: toe.c,v 1.86 2021/10/10 00:55:32 tom Exp $") +MODULE_ID("$Id: toe.c,v 1.89 2023/07/01 17:04:46 tom Exp $") #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) @@ -572,7 +572,7 @@ typelist(int eargc, char *eargv[], break; if (*buffer == '#') continue; - if (isspace(*buffer)) + if (isspace(UChar(*buffer))) continue; show_termcap(i, eargc, buffer, hook); } @@ -658,7 +658,7 @@ main(int argc, char *argv[]) usage(); } } - set_trace_level(v_opt); + use_verbosity(v_opt); if (report_file != 0) { if (freopen(report_file, "r", stdin) == 0) { diff --git a/progs/tparm_type.c b/progs/tparm_type.c index 3da4a077..4fed96a5 100644 --- a/progs/tparm_type.c +++ b/progs/tparm_type.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2014,2015 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -33,7 +33,7 @@ #include -MODULE_ID("$Id: tparm_type.c,v 1.4 2020/10/24 17:30:32 tom Exp $") +MODULE_ID("$Id: tparm_type.c,v 1.5 2023/04/08 15:57:01 tom Exp $") /* * Lookup the type of call we should make to tparm(). This ignores the actual @@ -47,6 +47,7 @@ tparm_type(const char *name) {code, {longname} }, \ {code, {ti} }, \ {code, {tc} } +#define XD(code, onlyname) TD(code, onlyname, onlyname, onlyname) TParams result = Numbers; /* *INDENT-OFF* */ static const struct { @@ -58,6 +59,10 @@ tparm_type(const char *name) TD(Num_Str, "pkey_xmit", "pfx", "px"), TD(Num_Str, "plab_norm", "pln", "pn"), TD(Num_Str_Str, "pkey_plab", "pfxl", "xl"), +#if NCURSES_XNAMES + XD(Str, "Cs"), + XD(Str_Str, "Ms"), +#endif }; /* *INDENT-ON* */ @@ -80,12 +85,16 @@ guess_tparm_type(int nparam, char **p_is_s) case 1: if (!p_is_s[0]) result = Numbers; + if (p_is_s[0]) + result = Str; break; case 2: if (!p_is_s[0] && !p_is_s[1]) result = Numbers; if (!p_is_s[0] && p_is_s[1]) result = Num_Str; + if (p_is_s[0] && p_is_s[1]) + result = Str_Str; break; case 3: if (!p_is_s[0] && !p_is_s[1] && !p_is_s[2]) diff --git a/progs/tparm_type.h b/progs/tparm_type.h index 7c102a30..2f7bd077 100644 --- a/progs/tparm_type.h +++ b/progs/tparm_type.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2023 Thomas E. Dickey * * Copyright 2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -32,7 +32,7 @@ ****************************************************************************/ /* - * $Id: tparm_type.h,v 1.3 2020/10/24 17:11:33 tom Exp $ + * $Id: tparm_type.h,v 1.4 2023/04/08 15:41:20 tom Exp $ * * determine expected/actual number of parameters to setup for tparm */ @@ -45,8 +45,10 @@ typedef enum { Other = -1 ,Numbers = 0 + ,Str ,Num_Str ,Num_Str_Str + ,Str_Str } TParams; extern TParams tparm_type(const char *name); diff --git a/progs/tput.c b/progs/tput.c index 8ac478e6..f9321b60 100644 --- a/progs/tput.c +++ b/progs/tput.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -47,12 +47,15 @@ #include #include -MODULE_ID("$Id: tput.c,v 1.97 2021/10/02 18:09:23 tom Exp $") +MODULE_ID("$Id: tput.c,v 1.104 2024/04/20 22:20:51 tom Exp $") #define PUTS(s) fputs(s, stdout) const char *_nc_progname = "tput"; +static bool opt_v = FALSE; /* quiet, do not show warnings */ +static bool opt_x = FALSE; /* clear scrollback if possible */ + static bool is_init = FALSE; static bool is_reset = FALSE; static bool is_clear = FALSE; @@ -81,6 +84,7 @@ usage(const char *optstring) KEEP(" -S << read commands from standard input") KEEP(" -T TERM use this instead of $TERM") KEEP(" -V print curses-version") + KEEP(" -v verbose, show warnings") KEEP(" -x do not try to clear scrollback") KEEP("") KEEP("Commands:") @@ -148,7 +152,7 @@ exit_code(int token, int value) * Returns nonzero on error. */ static int -tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) +tput_cmd(int fd, TTY * settings, int argc, char **argv, int *used) { NCURSES_CONST char *name; char *s; @@ -160,7 +164,7 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) name = check_aliases(argv[0], FALSE); *used = 1; if (is_reset || is_init) { - TTY oldmode; + TTY oldmode = *settings; int terasechar = -1; /* new erase character */ int intrchar = -1; /* new interrupt character */ @@ -174,12 +178,19 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) } #if HAVE_SIZECHANGE - set_window_size(fd, &lines, &columns); + { + NCURSES_INT2 my_rows = lines; + NCURSES_INT2 my_cols = columns; + set_window_size(fd, &my_rows, &my_cols); + lines = my_rows; + columns = my_cols; + } #else (void) fd; #endif set_control_chars(settings, terasechar, intrchar, tkillchar); set_conversions(settings); + if (send_init_strings(fd, &oldmode)) { reset_flush(); } @@ -230,7 +241,9 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) } else if (VALID_STRING(s)) { if (argc > 1) { int k; + int narg; int analyzed; + int provided; int popcount; long numbers[1 + NUM_PARM]; char *strings[1 + NUM_PARM]; @@ -270,14 +283,45 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) popcount = 0; _nc_reset_tparm(NULL); + /* + * Count the number of numeric parameters which are provided. + */ + provided = 0; + for (narg = 1; narg < argc; ++narg) { + char *ending = NULL; + long check = strtol(argv[narg], &ending, 0); + if (check < 0 || ending == argv[narg] || *ending != '\0') + break; + provided = narg; + } switch (paramType) { + case Str: + s = TPARM_1(s, strings[1]); + analyzed = 1; + if (provided == 0 && argc >= 1) + provided++; + break; + case Str_Str: + s = TPARM_2(s, strings[1], strings[2]); + analyzed = 2; + if (provided == 0 && argc >= 1) + provided++; + if (provided == 1 && argc >= 2) + provided++; + break; case Num_Str: s = TPARM_2(s, numbers[1], strings[2]); analyzed = 2; + if (provided == 1 && argc >= 2) + provided++; break; case Num_Str_Str: s = TPARM_3(s, numbers[1], strings[2], strings[3]); analyzed = 3; + if (provided == 1 && argc >= 2) + provided++; + if (provided == 2 && argc >= 3) + provided++; break; case Numbers: analyzed = _nc_tparm_analyze(NULL, s, p_is_s, &popcount); @@ -315,7 +359,13 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) if (analyzed < popcount) { analyzed = popcount; } - *used += analyzed; + if (opt_v && (analyzed != provided)) { + fprintf(stderr, "%s: %s parameters for \"%s\"\n", + _nc_progname, + (analyzed < provided ? "extra" : "missing"), + argv[0]); + } + *used += provided; } /* use putp() in order to perform padding */ @@ -336,8 +386,8 @@ main(int argc, char **argv) int result = 0; int fd; int used; + TTY old_settings; TTY tty_settings; - bool opt_x = FALSE; /* clear scrollback if possible */ bool is_alias; bool need_tty; @@ -346,7 +396,7 @@ main(int argc, char **argv) term = getenv("TERM"); - while ((c = getopt(argc, argv, is_alias ? "T:Vx" : "ST:Vx")) != -1) { + while ((c = getopt(argc, argv, is_alias ? "T:Vvx" : "ST:Vvx")) != -1) { switch (c) { case 'S': cmdline = FALSE; @@ -359,6 +409,9 @@ main(int argc, char **argv) case 'V': puts(curses_version()); ExitProgram(EXIT_SUCCESS); + case 'v': /* verbose */ + opt_v = TRUE; + break; case 'x': /* do not try to clear scrollback */ opt_x = TRUE; break; @@ -391,6 +444,7 @@ main(int argc, char **argv) quit(ErrUsage, "No value for $TERM and no -T specified"); fd = save_tty_settings(&tty_settings, need_tty); + old_settings = tty_settings; if (setupterm(term, fd, &errret) != OK && errret <= 0) quit(ErrTermType, "unknown terminal \"%s\"", term); @@ -400,7 +454,8 @@ main(int argc, char **argv) if ((argc <= 0) && !is_alias) usage(NULL); while (argc > 0) { - code = tput_cmd(fd, &tty_settings, opt_x, argc, argv, &used); + tty_settings = old_settings; + code = tput_cmd(fd, &tty_settings, argc, argv, &used); if (code != 0) break; argc -= used; @@ -433,7 +488,9 @@ main(int argc, char **argv) argnow = argvec; while (argnum > 0) { - int code = tput_cmd(fd, &tty_settings, opt_x, argnum, argnow, &used); + int code; + tty_settings = old_settings; + code = tput_cmd(fd, &tty_settings, argnum, argnow, &used); if (code != 0) { if (result == 0) result = ErrSystem(0); /* will return value >4 */ diff --git a/progs/tset.c b/progs/tset.c index 0ba522cb..69f4aba8 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2024 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -98,7 +98,7 @@ char *ttyname(int fd); #endif -MODULE_ID("$Id: tset.c,v 1.131 2021/12/04 23:02:13 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.135 2024/04/20 22:20:41 tom Exp $") #ifndef environ extern char **environ; @@ -869,7 +869,11 @@ main(int argc, char **argv) if (!noset) { #if HAVE_SIZECHANGE if (opt_w) { - set_window_size(my_fd, &lines, &columns); + NCURSES_INT2 my_rows = lines; + NCURSES_INT2 my_cols = columns; + set_window_size(my_fd, &my_rows, &my_cols); + lines = my_rows; + columns = my_cols; } #endif if (opt_c) { @@ -878,9 +882,13 @@ main(int argc, char **argv) if (!noinit) { if (send_init_strings(my_fd, &oldmode)) { + const char *name; + (void) putc('\r', stderr); (void) fflush(stderr); - (void) napms(1000); /* Settle the terminal. */ + if (IsRealTty(my_fd, name)) { + (void) napms(1000); /* Settle the terminal. */ + } } } diff --git a/test/README b/test/README index 09633462..300f9e61 100644 --- a/test/README +++ b/test/README @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2018-2020,2021 Thomas E. Dickey -- +-- Copyright 2018-2022,2023 Thomas E. Dickey -- -- Copyright 1998-2017,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README,v 1.73 2021/03/07 00:08:58 tom Exp $ +-- $Id: README,v 1.80 2023/11/25 21:17:30 tom Exp $ ------------------------------------------------------------------------------- The programs in this directory are used to test and demonstrate ncurses. @@ -86,12 +86,12 @@ TYPE_REGEXP test: demo_forms current_field test: demo_forms dup_field edit_field move_field ncurses data_ahead test: demo_forms data_behind test: demo_forms -dup_field - +dup_field test: dup_field dynamic_field_info test: demo_forms field_arg test: demo_forms field_back test: demo_forms edit_field field_buffer test: cardfile demo_forms ncurses -field_count test: demo_forms move_field +field_count test: demo_forms dup_field move_field field_fore test: demo_forms field_index test: demo_forms field_info test: edit_field ncurses @@ -107,7 +107,7 @@ field_type test: demo_forms field_userptr test: dup_field edit_field move_field ncurses form_driver test: cardfile demo_forms dup_field edit_field move_field ncurses form_driver_w test: form_driver_w -form_fields test: cardfile demo_forms move_field +form_fields test: cardfile demo_forms dup_field move_field form_init - form_opts - form_opts_off - @@ -147,7 +147,7 @@ set_field_type test: demo_forms dup_field move_field ncurses set_field_userptr test: edit_field ncurses set_fieldtype_arg - set_fieldtype_choice - -set_form_fields test: move_field +set_form_fields test: dup_field move_field set_form_init - set_form_opts - set_form_page - @@ -163,7 +163,7 @@ unpost_form test: cardfile demo_forms dup_field form_driver_w move_field ncurs libmenu: ------- current_item test: demo_menus ncurses -free_item test: ncurses +free_item test: demo_menus ncurses free_menu test: demo_menus ncurses item_count test: demo_menus item_description - @@ -234,16 +234,16 @@ BC test: demo_termcap COLORS test: color_content demo_new_pair dots_curses dots_xcurses echochar ncurses pair_content picsmap savescreen xmas COLOR_PAIR test: background blue bs cardfile clip_printw demo_forms demo_menus demo_panels dots_curses dup_field echochar filter firework gdc hanoi ins_wide insdelln inserts knight move_field ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas COLOR_PAIRS test: demo_new_pair dots_curses dots_xcurses echochar ncurses newdemo pair_content -COLS test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar filter firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm +COLS test: cardfile combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar filter firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm ESCDELAY test: test_opaque -LINES test: cardfile demo_defkey demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest move_field movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas +LINES test: cardfile combine demo_defkey demo_keyok demo_menus demo_panels demo_tabs ditto dots_curses dots_xcurses echochar firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest move_field movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas PAIR_NUMBER test: dump_window ncurses PC test: demo_termcap SP lib: form TABSIZE test: test_opaque UP test: demo_termcap acs_map test: back_ground background gdc ins_wide inserts knight movewindow ncurses newdemo savescreen test_add_wchstr test_addchstr test_addstr test_addwstr testcurs -add_wch test: demo_new_pair demo_panels ncurses picsmap savescreen test_add_wchstr test_addwstr +add_wch test: combine demo_new_pair demo_panels ncurses picsmap savescreen test_add_wchstr test_addwstr add_wchnstr test: test_add_wchstr add_wchstr test: test_add_wchstr view addch test: back_ground background blue bs color_content demo_tabs dots_curses echochar hashtest ncurses padview pair_content picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm @@ -252,14 +252,14 @@ addchstr test: test_addchstr addnstr test: test_addstr addnwstr test: dots_xcurses ncurses test_addwstr addstr test: blue bs cardfile filter gdc hanoi lrtest ncurses test_addstr -addwstr test: blue test_addwstr +addwstr test: blue combine test_addwstr alloc_pair test: demo_new_pair dots_xcurses alloc_pair_sp - assume_default_colors test: back_ground background ncurses assume_default_colors_sp - attr_get - -attr_off test: dots_xcurses ncurses -attr_on test: dots_xcurses ncurses +attr_off test: combine dots_xcurses ncurses +attr_on test: combine dots_xcurses ncurses attr_set test: ncurses attroff test: blue dots_curses echochar filter gdc ncurses tclock attron test: blue bs dots_curses echochar filter gdc ncurses @@ -277,17 +277,17 @@ boolfnames test: demo_terminfo test_arrays progs: dump_entry boolnames test: demo_terminfo test_arrays progs: dump_entry infocmp border - border_set - -box test: cardfile chgat clip_printw demo_forms demo_menus demo_panels ditto inch_wide inchs ins_wide insdelln inserts lrtest ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs +box test: cardfile chgat clip_printw demo_forms demo_menus demo_panels ditto inch_wide inchs ins_wide insdelln inserts lrtest ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs box_set test: ncurses can_change_color test: color_content extended_color ncurses can_change_color_sp test: extended_color -cbreak test: back_ground background blue bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas +cbreak test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs view worm xmas cbreak_sp test: sp_tinfo chgat test: chgat clear test: blue bs filter gdc ncurses padview testcurs xmas clearok test: bs knight clrtobot test: demo_menus move_field ncurses view -clrtoeol test: blue bs demo_altkeys filter foldkeys form_driver_w hanoi hashtest movewindow ncurses padview view +clrtoeol test: blue bs demo_altkeys filter foldkeys form_driver_w hanoi hashtest movewindow ncurses padview test_mouse view color_content test: color_content ncurses picsmap color_content_sp - color_set test: color_set dots_xcurses extended_color ncurses @@ -296,8 +296,8 @@ cur_term test: demo_termcap demo_terminfo dots dots_mvcur filter list_keys lrt curs_set test: demo_new_pair echochar firework gdc hanoi lrtest ncurses newdemo picsmap rain savescreen tclock testcurs worm xmas curs_set_sp test: sp_tinfo curscr test: demo_panels knight lrtest ncurses popup_msg savescreen tclock -curses_trace test: demo_menus hashtest lrtest ncurses padview redraw test_sgr test_termattrs test_vid_puts test_vidputs testcurs view worm -curses_version test: ncurses progs: clear infocmp tabs tic toe tput tset +curses_trace test: demo_menus hashtest lrtest ncurses padview redraw test_sgr test_termattrs test_vid_puts test_vidputs testcurs view worm progs: infocmp tic toe +curses_version test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs demo_termcap demo_terminfo ditto dots dots_curses dots_mvcur dots_termcap dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight list_keys lrtest move_field movewindow ncurses newdemo padview pair_content picsmap railroad rain redraw savescreen sp_tinfo tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_arrays test_delwin test_endwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_setupterm test_sgr test_termattrs test_tparm test_unget_wch test_vid_puts test_vidputs testaddch testcurs testscanw view worm xmas progs: clear infocmp tabs tic toe tput tset def_prog_mode test: bs ncurses def_prog_mode_sp test: sp_tinfo def_shell_mode - @@ -310,9 +310,9 @@ delay_output test: newdemo delay_output_sp test: sp_tinfo delch - deleteln test: insdelln -delscreen test: ditto dots_mvcur -delwin test: cardfile chgat clip_printw demo_forms demo_panels dup_field inch_wide inchs ins_wide insdelln inserts move_field ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view -derwin test: cardfile chgat clip_printw demo_forms demo_menus ditto inch_wide inchs ins_wide insdelln inserts movewindow ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque +delscreen test: ditto dots_mvcur test_delwin +delwin test: cardfile chgat clip_printw demo_forms demo_panels dup_field inch_wide inchs ins_wide insdelln inserts move_field ncurses newdemo padview popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view +derwin test: cardfile chgat clip_printw demo_forms demo_menus ditto inch_wide inchs ins_wide insdelln inserts movewindow ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque doupdate test: cardfile demo_menus demo_panels ditto ins_wide inserts knight movewindow ncurses padview popup_msg redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr doupdate_sp lib: ncurses dupwin test: popup_msg @@ -320,14 +320,15 @@ echo test: bs hanoi ncurses test_get_wstr test_getstr testcurs testscanw echo_sp lib: ncurses echo_wchar test: ncurses echochar test: echochar ncurses -endwin test: back_ground background blue bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_mvcur dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas +endwin test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_mvcur dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_endwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testaddch testcurs testscanw view worm xmas endwin_sp lib: ncurses erase test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses picsmap tclock test_opaque testcurs erasechar test: ncurses erasechar_sp test: sp_tinfo erasewchar test: ncurses -exit_curses test: back_ground background blue bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs demo_termcap demo_terminfo ditto dots dots_curses dots_mvcur dots_termcap dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight list_keys lrtest move_field movewindow ncurses newdemo padview pair_content picsmap railroad rain redraw savescreen sp_tinfo tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_arrays test_get_wstr test_getstr test_instr test_inwstr test_opaque test_setupterm test_sgr test_termattrs test_tparm test_vid_puts test_vidputs testaddch testcurs testscanw view worm xmas -exit_terminfo lib: ncurses +erasewchar_sp lib: ncurses +exit_curses test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dots_curses dots_xcurses dup_field echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_endwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_setupterm test_termattrs test_unget_wch testaddch testcurs testscanw view worm xmas +exit_terminfo test: demo_termcap demo_terminfo dots dots_mvcur dots_termcap list_keys railroad sp_tinfo test_arrays test_sgr test_tparm test_vid_puts test_vidputs extended_color_content test: color_content extended_color extended_color_content_sp test: extended_color extended_pair_content test: extended_color pair_content @@ -346,7 +347,7 @@ free_pair test: demo_new_pair free_pair_sp - get_escdelay - get_escdelay_sp - -get_wch test: form_driver_w +get_wch test: form_driver_w test_unget_wch get_wstr test: test_get_wstr getattrs - getbegx test: chgat clip_printw demo_menus demo_panels dump_window insdelln move_field movewindow ncurses newdemo redraw testcurs @@ -354,12 +355,12 @@ getbegy test: chgat clip_printw demo_menus demo_panels dump_window insdelln m getbkgd test: ncurses getbkgrnd test: ncurses getcchar test: demo_new_pair ncurses savescreen view -getch test: back_ground background blue bs chgat color_content color_set demo_altkeys demo_new_pair demo_tabs extended_color filter firework firstlast foldkeys hanoi hashtest insdelln lrtest padview pair_content picsmap savescreen tclock test_opaque testaddch testcurs view xmas -getcurx test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels dump_window extended_color filter firstlast foldkeys insdelln move_field movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs view -getcury test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels dump_window extended_color filter firstlast foldkeys insdelln move_field movewindow ncurses popup_msg redraw savescreen test_opaque testcurs view +getch test: back_ground background blue bs chgat color_content color_set combine demo_altkeys demo_new_pair demo_tabs extended_color filter firework firstlast foldkeys hanoi hashtest insdelln lrtest padview pair_content picsmap savescreen tclock test_endwin test_mouse test_opaque test_unget_wch testaddch testcurs view xmas +getcurx test: bs chgat clip_printw combine demo_altkeys demo_defkey demo_panels dump_window extended_color filter firstlast foldkeys insdelln move_field movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs view +getcury test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels dump_window extended_color filter firstlast foldkeys insdelln move_field movewindow ncurses popup_msg redraw savescreen test_mouse test_opaque testcurs view getmaxx test: chgat clip_printw demo_panels dump_window firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs -getmaxy test: chgat clip_printw demo_forms demo_panels dump_window firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs -getmouse test: bs demo_menus knight movewindow ncurses testcurs +getmaxy test: chgat clip_printw demo_forms demo_panels dump_window firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque testcurs +getmouse test: bs demo_menus knight movewindow ncurses test_mouse testcurs getmouse_sp - getn_wstr test: test_get_wstr getnstr test: filter ncurses test_getstr @@ -398,8 +399,8 @@ init_extended_color_sp test: extended_color init_extended_pair test: extended_color ncurses pair_content picsmap init_extended_pair_sp test: extended_color init_pair test: back_ground background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses dup_field echochar filter firework gdc hanoi ins_wide insdelln inserts knight move_field ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas -init_pair_sp - -initscr test: back_ground background blue bs cardfile chgat clip_printw color_content color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs dots_curses dots_xcurses dup_field echochar filter firework firstlast form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas +init_pair_sp lib: ncurses +initscr test: back_ground background blue bs cardfile chgat clip_printw color_content color_set combine demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs dots_curses dots_xcurses dup_field echochar filter firework firstlast form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_endwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testaddch testcurs testscanw view worm xmas innstr test: test_instr innwstr test: test_inwstr ins_nwstr test: ins_wide @@ -414,16 +415,24 @@ instr test: test_instr intrflush test: demo_forms dup_field move_field movewindow intrflush_sp test: sp_tinfo inwstr test: test_inwstr +is_cbreak - +is_cbreak_sp - is_cleared test: test_opaque +is_echo - +is_echo_sp - is_idcok test: test_opaque is_idlok test: test_opaque is_immedok test: test_opaque is_keypad test: ncurses test_opaque is_leaveok test: test_opaque is_linetouched lib: form +is_nl - +is_nl_sp - is_nodelay test: test_opaque is_notimeout test: test_opaque is_pad test: test_opaque +is_raw - +is_raw_sp - is_scrollok test: ncurses test_opaque is_subwin test: test_opaque is_syncok test: test_opaque @@ -434,17 +443,18 @@ isendwin - isendwin_sp - key_defined test: demo_defkey foldkeys key_defined_sp test: sp_tinfo -key_name test: key_names ncurses +key_name test: key_names ncurses test_unget_wch keybound test: demo_altkeys demo_defkey keybound_sp test: sp_tinfo -keyname test: demo_altkeys demo_defkey demo_keyok demo_menus dup_field edit_field foldkeys keynames move_field movewindow ncurses padview redraw test_getstr testcurs view progs: tic +keyname test: combine demo_altkeys demo_defkey demo_keyok demo_menus dup_field edit_field foldkeys keynames move_field movewindow ncurses padview redraw test_getstr test_unget_wch testcurs view progs: tic keyname_sp test: sp_tinfo keyok test: demo_keyok foldkeys keyok_sp test: sp_tinfo -keypad test: bs cardfile chgat clip_printw demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto dup_field filter firework foldkeys form_driver_w hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses padview popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view +keypad test: bs cardfile chgat clip_printw combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto dup_field filter firework foldkeys form_driver_w hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses padview popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs testscanw view killchar test: ncurses killchar_sp test: sp_tinfo killwchar test: ncurses +killwchar_sp lib: ncurses leaveok test: hanoi test_opaque longname test: ncurses testcurs progs: tput longname_sp test: sp_tinfo @@ -452,11 +462,11 @@ mcprint - mcprint_sp - meta test: key_names keynames ncurses mouse_trafo lib: form -mouseinterval - +mouseinterval test: test_mouse mouseinterval_sp - -mousemask test: bs demo_forms demo_menus knight movewindow ncurses testcurs +mousemask test: bs demo_forms demo_menus knight movewindow ncurses test_mouse testcurs mousemask_sp - -move test: blue bs cardfile chgat demo_altkeys demo_menus demo_new_pair demo_tabs dots_curses dots_xcurses echochar filter foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest move_field movewindow ncurses picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testscanw view xmas +move test: blue bs cardfile chgat combine demo_altkeys demo_menus demo_new_pair demo_tabs dots_curses dots_xcurses echochar filter foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest move_field movewindow ncurses picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testscanw view xmas mvadd_wch test: ncurses test_add_wchstr test_addwstr mvadd_wchnstr test: test_add_wchstr mvadd_wchstr test: test_add_wchstr @@ -537,30 +547,30 @@ mvwinsnstr test: inserts mvwinsstr test: inserts testcurs mvwinstr test: test_instr mvwinwstr test: test_inwstr -mvwprintw test: demo_menus demo_panels inch_wide inchs ncurses test_instr test_inwstr testcurs +mvwprintw test: demo_menus demo_panels inch_wide inchs ncurses test_delwin test_instr test_inwstr testcurs mvwscanw test: testcurs mvwvline test: ins_wide inserts movewindow ncurses test_add_wchstr test_addchstr test_addstr test_addwstr mvwvline_set - -napms test: demo_panels ditto dots dots_curses dots_mvcur dots_xcurses echochar extended_color firework firstlast gdc hanoi lrtest ncurses padview picsmap railroad rain tclock test_opaque testcurs view worm xmas progs: tset +napms test: demo_panels ditto dots dots_curses dots_mvcur dots_termcap dots_xcurses echochar extended_color firework firstlast gdc hanoi lrtest ncurses padview picsmap railroad rain tclock test_opaque testcurs view worm xmas progs: tset napms_sp test: sp_tinfo new_prescr test: sp_tinfo newpad test: ncurses padview popup_msg testcurs newpad_sp lib: ncurses newscr lib: ncurses -newterm test: demo_altkeys demo_new_pair ditto dots_mvcur extended_color filter foldkeys gdc key_names keynames redraw test_setupterm test_termattrs +newterm test: demo_altkeys demo_new_pair ditto dots_mvcur extended_color filter foldkeys gdc key_names keynames redraw test_delwin test_endwin test_setupterm test_termattrs newterm_sp - -newwin test: cardfile chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firstlast inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas +newwin test: cardfile chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firstlast inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas newwin_sp lib: ncurses nl test: demo_forms dup_field move_field ncurses rain testcurs nl_sp lib: ncurses nocbreak test: testcurs nocbreak_sp test: sp_tinfo nodelay test: demo_new_pair ditto extended_color firework gdc lrtest ncurses newdemo padview rain tclock test_opaque view worm xmas -noecho test: back_ground background bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas +noecho test: back_ground background bs cardfile chgat clip_printw color_content color_set combine demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels demo_tabs ditto dup_field extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs view worm xmas noecho_sp lib: ncurses nofilter - nofilter_sp - -nonl test: bs demo_forms dup_field hashtest move_field movewindow ncurses padview view worm xmas +nonl test: bs demo_forms dup_field hashtest move_field movewindow ncurses padview test_mouse view worm xmas nonl_sp lib: ncurses noqiflush - noqiflush_sp test: sp_tinfo @@ -579,16 +589,16 @@ pecho_wchar - pechochar - pnoutrefresh test: ncurses padview popup_msg prefresh test: testcurs -printw test: back_ground background blue bs color_content color_set demo_altkeys demo_defkey demo_keyok demo_tabs extended_color filter foldkeys ncurses pair_content savescreen testcurs testscanw view -putp test: filter test_sgr progs: tput +printw test: back_ground background blue bs color_content color_set combine demo_altkeys demo_defkey demo_keyok demo_tabs extended_color filter foldkeys ncurses pair_content savescreen test_delwin test_unget_wch testcurs testscanw view +putp test: filter test_mouse test_sgr progs: tput putp_sp test: sp_tinfo putwin test: ncurses qiflush - qiflush_sp test: sp_tinfo raw test: demo_forms dup_field move_field ncurses redraw testcurs raw_sp test: sp_tinfo -redrawwin test: padview redraw view -refresh test: blue bs color_content demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs dots_curses dots_mvcur dots_xcurses dup_field echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest move_field movewindow ncurses pair_content picsmap savescreen tclock testcurs view xmas +redrawwin test: combine padview redraw view +refresh test: blue bs color_content demo_defkey demo_forms demo_keyok demo_menus demo_panels demo_tabs dots_curses dots_mvcur dots_xcurses dup_field echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest move_field movewindow ncurses pair_content picsmap savescreen tclock test_delwin test_endwin test_mouse testcurs view xmas reset_color_pairs test: picsmap reset_color_pairs_sp - reset_prog_mode test: filter ncurses @@ -608,7 +618,7 @@ ripoffline_sp - savetty - savetty_sp test: sp_tinfo scanw test: testcurs testscanw -scr_dump test: savescreen +scr_dump test: combine savescreen scr_init test: savescreen scr_init_sp - scr_restore test: savescreen @@ -617,7 +627,7 @@ scr_set test: savescreen scr_set_sp - scrl test: view scroll test: testcurs -scrollok test: clip_printw color_content demo_altkeys demo_defkey demo_keyok demo_new_pair demo_panels ditto foldkeys hashtest knight ncurses pair_content picsmap redraw test_opaque testcurs testscanw view +scrollok test: clip_printw color_content demo_altkeys demo_defkey demo_keyok demo_new_pair demo_panels ditto foldkeys hashtest knight ncurses pair_content picsmap redraw test_delwin test_opaque test_unget_wch testcurs testscanw view set_curterm test: list_keys sp_tinfo set_curterm_sp test: sp_tinfo set_escdelay test: test_opaque @@ -625,9 +635,9 @@ set_escdelay_sp lib: ncurses set_tabsize test: demo_tabs test_opaque set_tabsize_sp test: sp_tinfo set_term lib: ncurses -setcchar test: back_ground demo_new_pair demo_panels ins_wide ncurses picsmap savescreen test_add_wchstr test_addwstr +setcchar test: back_ground combine demo_new_pair demo_panels ins_wide ncurses picsmap savescreen test_add_wchstr test_addwstr setscrreg test: view -setupterm test: demo_terminfo dots list_keys sp_tinfo test_setupterm test_sgr test_termattrs test_tparm test_vid_puts test_vidputs progs: clear tabs tput tset +setupterm test: demo_terminfo dots list_keys sp_tinfo test_mouse test_setupterm test_sgr test_termattrs test_tparm test_vid_puts test_vidputs progs: clear tabs tput tset slk_attr - slk_attr_off - slk_attr_on - @@ -663,7 +673,7 @@ standend test: blue gdc ncurses standout test: blue ncurses start_color test: back_ground background blue bs cardfile chgat clip_printw color_content color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses dup_field echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight move_field ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas start_color_sp - -stdscr test: back_ground background bs chgat clip_printw color_content demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto dup_field edit_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas +stdscr test: back_ground background bs chgat clip_printw color_content combine demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto dup_field edit_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest move_field movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque test_unget_wch testcurs testscanw view worm xmas strcodes test: demo_termcap test_arrays progs: dump_entry strfnames test: demo_terminfo list_keys test_arrays progs: dump_entry strnames test: demo_terminfo foldkeys list_keys test_arrays test_tparm progs: dump_entry infocmp tic @@ -684,17 +694,19 @@ tgetnum test: demo_termcap dots_termcap railroad tgetnum_sp test: sp_tinfo tgetstr test: demo_termcap dots_termcap railroad tgetstr_sp test: sp_tinfo -tgoto test: dots_termcap railroad progs: tic +tgoto test: dots_termcap railroad test_mouse progs: tic tigetflag test: demo_terminfo savescreen progs: tic tput tigetflag_sp test: sp_tinfo tigetnum test: demo_tabs demo_terminfo dots dots_mvcur ncurses savescreen progs: tput tigetnum_sp test: sp_tinfo -tigetstr test: blue demo_defkey demo_new_pair demo_terminfo foldkeys list_keys savescreen test_sgr test_tparm testcurs progs: clear_cmd tic tput +tigetstr test: blue demo_defkey demo_new_pair demo_terminfo foldkeys list_keys savescreen test_mouse test_sgr test_tparm testcurs progs: clear_cmd tic tput tigetstr_sp test: sp_tinfo timeout test: filter rain savescreen -tiparm - +tiparm test: test_tparm +tiparm_s test: test_tparm +tiscan_s test: test_tparm touchline test: chgat clip_printw insdelln -touchwin test: chgat clip_printw demo_menus filter firstlast inch_wide inchs ins_wide insdelln inserts movewindow ncurses popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas +touchwin test: chgat clip_printw demo_menus filter firstlast inch_wide inchs ins_wide insdelln inserts movewindow ncurses popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas tparm test: dots dots_mvcur test_sgr test_tparm progs: tic tput tputs test: dots dots_mvcur dots_termcap railroad test_tparm test_vid_puts test_vidputs progs: clear_cmd reset_cmd tabs tputs_sp test: sp_tinfo @@ -702,11 +714,11 @@ trace - ttytype test: demo_terminfo test_sgr typeahead test: testcurs typeahead_sp test: sp_tinfo -unctrl test: ncurses redraw test_add_wchstr test_addchstr testcurs +unctrl test: ncurses redraw test_add_wchstr test_addchstr test_mouse testcurs unctrl_sp test: sp_tinfo -unget_wch - +unget_wch test: test_unget_wch unget_wch_sp - -ungetch test: bs knight +ungetch test: bs knight test_unget_wch ungetch_sp lib: ncurses ungetmouse lib: menu ungetmouse_sp - @@ -732,7 +744,7 @@ vidputs test: test_vidputs vidputs_sp - vline test: gdc ncurses vline_set - -vw_printw test: clip_printw movewindow +vw_printw test: clip_printw movewindow test_mouse vw_scanw - vwprintw - vwscanw - @@ -750,8 +762,8 @@ wattr_get test: ncurses wattr_off lib: ncurses wattr_on lib: ncurses wattr_set test: ncurses -wattroff test: demo_forms ncurses testcurs xmas -wattron test: testcurs xmas +wattroff test: clip_printw demo_forms ncurses testcurs xmas +wattron test: clip_printw testcurs xmas wattrset test: clip_printw demo_forms insdelln ncurses newdemo padview test_get_wstr test_getstr testcurs xmas wbkgd test: cardfile demo_forms demo_menus ncurses newdemo padview testcurs wbkgdset test: demo_panels ins_wide inserts ncurses test_add_wchstr test_addchstr test_addstr test_addwstr @@ -761,7 +773,7 @@ wborder test: ncurses wborder_set test: ncurses wchgat test: chgat test_get_wstr test_getstr view wclear test: ncurses test_opaque testcurs -wclrtobot test: firstlast inch_wide inchs ncurses test_instr test_inwstr testcurs +wclrtobot test: firstlast inch_wide inchs ncurses test_delwin test_instr test_inwstr testcurs wclrtoeol test: chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels firstlast inch_wide inchs ins_wide insdelln inserts knight ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_instr test_inwstr testcurs wcolor_set lib: ncurses wcursyncup lib: form @@ -774,7 +786,7 @@ werase test: cardfile demo_forms demo_menus demo_panels dup_field firstlast k wget_wch test: ins_wide ncurses test_add_wchstr test_addwstr wget_wstr test: test_get_wstr wgetbkgrnd lib: ncurses -wgetch test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto dump_window dup_field edit_field gdc insdelln inserts knight move_field movewindow ncurses newdemo popup_msg rain redraw test_addchstr test_addstr test_opaque testcurs worm +wgetch test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto dump_window dup_field edit_field gdc insdelln inserts knight move_field movewindow ncurses newdemo popup_msg rain redraw test_addchstr test_addstr test_delwin test_opaque testcurs worm wgetdelay test: test_opaque wgetn_wstr test: ncurses test_get_wstr wgetnstr test: ncurses test_getstr @@ -802,15 +814,15 @@ winsstr test: inserts winstr test: test_instr winwstr test: test_inwstr wmouse_trafo test: ncurses -wmove test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels dump_window extended_color firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo padview picsmap redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm +wmove test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels dump_window extended_color firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo padview picsmap redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque testcurs view worm wnoutrefresh test: demo_menus ditto inch_wide inchs ins_wide inserts knight movewindow ncurses padview popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque -wprintw test: chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels inch_wide inchs ins_wide insdelln inserts knight ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs +wprintw test: chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels inch_wide inchs ins_wide insdelln inserts knight ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_mouse test_opaque testcurs wredrawln test: redraw -wrefresh test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels dup_field firstlast ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs worm xmas +wrefresh test: chgat clip_printw demo_forms demo_keyok demo_menus demo_panels dup_field firstlast ins_wide insdelln inserts knight lrtest move_field movewindow ncurses newdemo popup_msg redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_delwin testcurs worm xmas wresize test: cardfile demo_menus ncurses wscanw test: testcurs wscrl test: ncurses testcurs -wsetscrreg test: ncurses testcurs +wsetscrreg test: ncurses test_delwin testcurs wstandend test: ncurses test_opaque xmas wstandout test: ncurses test_opaque xmas wsyncdown test: movewindow diff --git a/test/aclocal.m4 b/test/aclocal.m4 index 6836f438..fdab359a 100644 --- a/test/aclocal.m4 +++ b/test/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 2003-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ dnl sale, use or other dealings in this Software without prior written * dnl authorization. * dnl*************************************************************************** dnl -dnl $Id: aclocal.m4,v 1.202 2021/10/11 00:18:09 tom Exp $ +dnl $Id: aclocal.m4,v 1.221 2024/01/19 18:27:20 tom Exp $ dnl dnl Author: Thomas E. Dickey dnl @@ -43,7 +43,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_LANGINFO_CODESET version: 6 updated: 2021/01/01 16:53:59 +dnl AM_LANGINFO_CODESET version: 7 updated: 2023/01/11 04:05:23 dnl ------------------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -55,7 +55,9 @@ dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, - [AC_TRY_LINK([#include ], + [AC_TRY_LINK([ +$ac_includes_default +#include ], [char* cs = nl_langinfo(CODESET); (void)cs], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) @@ -409,7 +411,7 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23 +dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25 dnl --------------- AC_DEFUN([CF_C11_NORETURN], [ @@ -423,8 +425,7 @@ AC_MSG_RESULT($enable_stdnoreturn) if test $enable_stdnoreturn = yes; then AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, [AC_TRY_COMPILE([ -#include -#include +$ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } ], @@ -448,7 +449,7 @@ AC_SUBST(HAVE_STDNORETURN_H) AC_SUBST(STDC_NORETURN) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20 +dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -489,7 +490,7 @@ case "$CC" in AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -628,7 +629,7 @@ if test "$cf_have_curses_lib" = no; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04 +dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does @@ -650,7 +651,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes ],[]) @@ -696,7 +697,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17 +dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. @@ -731,6 +732,7 @@ AC_TRY_COMPILE( AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( [ +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include @@ -939,7 +941,7 @@ if (foo + 1234L > 5678L) done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_HEADER version: 5 updated: 2015/04/23 20:35:30 +dnl CF_CURSES_HEADER version: 6 updated: 2022/12/02 20:06:52 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. @@ -953,7 +955,7 @@ for cf_header in \ curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h]) do AC_TRY_COMPILE([#include <${cf_header}>], - [initscr(); tgoto("?", 0,0)], + [initscr(); endwin()], [cf_cv_ncurses_header=$cf_header; break],[]) done ]) @@ -966,7 +968,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 44 updated: 2021/01/02 09:31:20 +dnl CF_CURSES_LIBS version: 45 updated: 2022/12/02 20:06:52 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -975,7 +977,7 @@ AC_DEFUN([CF_CURSES_LIBS],[ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_MSG_CHECKING(if we have identified curses libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr(); tgoto("?", 0,0)], + [initscr(); endwin()], cf_result=yes, cf_result=no) AC_MSG_RESULT($cf_result) @@ -1076,7 +1078,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr(); tgoto((char *)0, 0, 0);], + [initscr(); endwin();], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" @@ -1096,7 +1098,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 15 updated: 2021/01/02 09:31:20 +dnl CF_CURSES_TERM_H version: 16 updated: 2024/01/07 06:34:16 dnl ---------------- dnl SVr4 curses should have term.h as well (where it puts the definitions of dnl the low-level interface). This may not be true in old/broken implementations, @@ -1142,7 +1144,7 @@ case "$cf_cv_term_header" in #ifdef NCURSES_VERSION #include <${cf_header}> #else -make an error +#error expected NCURSES_VERSION to be defined #endif], [WINDOW *x; (void)x], [cf_cv_term_header=$cf_header @@ -1618,7 +1620,7 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FIX_WARNINGS version: 3 updated: 2020/12/31 18:40:20 +dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31 dnl --------------- dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's dnl "-Werror" flags can interfere with configure-checks. Those go into @@ -1630,11 +1632,13 @@ if test "$GCC" = yes || test "$GXX" = yes then case [$]$1 in (*-Werror=*) - CF_VERBOSE(repairing $1: [$]$1) cf_temp_flags= for cf_temp_scan in [$]$1 do case "x$cf_temp_scan" in + (x-Werror=format*) + CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan) + ;; (x-Werror=*) CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan) ;; @@ -1643,16 +1647,20 @@ then ;; esac done - $1="$cf_temp_flags" - CF_VERBOSE(... fixed [$]$1) - CF_VERBOSE(... extra $EXTRA_CFLAGS) + if test "x[$]$1" != "x$cf_temp_flags" + then + CF_VERBOSE(repairing $1: [$]$1) + $1="$cf_temp_flags" + CF_VERBOSE(... fixed [$]$1) + CF_VERBOSE(... extra $EXTRA_CFLAGS) + fi ;; esac fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_CURSES_VERSION version: 8 updated: 2021/01/02 09:31:20 +dnl CF_FUNC_CURSES_VERSION version: 9 updated: 2023/01/05 18:06:10 dnl ---------------------- dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS. dnl It's a character string "SVR4", not documented. @@ -1660,11 +1668,14 @@ AC_DEFUN([CF_FUNC_CURSES_VERSION], [ AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[ AC_TRY_RUN([ +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> + int main(void) { char temp[1024]; - sprintf(temp, "%s\\n", curses_version()); + sprintf(temp, "%.999s\\n", curses_version()); ${cf_cv_main_return:-return}(0); }] ,[cf_cv_func_curses_version=yes] @@ -1674,7 +1685,34 @@ rm -f core]) test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION,1,[Define to 1 if we have curses_version function]) ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_OPENPTY version: 6 updated: 2021/01/01 13:31:04 +dnl CF_FUNC_GETTIME version: 2 updated: 2023/02/25 08:45:56 +dnl --------------- +dnl Check for gettimeofday or clock_gettime. In 2023, the former is still more +dnl widely supported, but "deprecated" (2008), so we will use the latter if it +dnl is available, to reduce compiler warnings. +AC_DEFUN([CF_FUNC_GETTIME],[ +AC_CACHE_CHECK(for clock_gettime,cf_cv_func_clock_gettime,[ + AC_TRY_LINK([#include ], + [struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts], + [cf_cv_func_clock_gettime=yes], + [cf_cv_func_clock_gettime=no]) +]) + +if test "$cf_cv_func_clock_gettime" = yes +then + AC_DEFINE(HAVE_CLOCK_GETTIME,1,[Define to 1 if we have clock_gettime function]) +else +AC_CHECK_FUNC(gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ + +AC_CHECK_LIB(bsd, gettimeofday, + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) + CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FUNC_OPENPTY version: 7 updated: 2023/12/03 09:21:34 dnl --------------- dnl Check for openpty() function, along with header. It may need the dnl "util" library as well. @@ -1691,6 +1729,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ ],[ int x = openpty((int *)0, (int *)0, (char *)0, (struct termios *)0, (struct winsize *)0); + (void)x; ],[ cf_cv_func_openpty=$cf_header break @@ -1732,6 +1771,7 @@ then AC_CHECKING([for $CC __attribute__ directives]) cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -1814,7 +1854,7 @@ rm -rf ./conftest* fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_VERSION version: 8 updated: 2019/09/07 13:38:36 +dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Find version of gcc, and (because icc/clang pretend to be gcc without being dnl compatible), attempt to determine if icc/clang is actually used. @@ -1823,7 +1863,7 @@ AC_REQUIRE([AC_PROG_CC]) GCC_VERSION=none if test "$GCC" = yes ; then AC_MSG_CHECKING(version of $CC) - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown AC_MSG_RESULT($GCC_VERSION) fi @@ -2144,7 +2184,7 @@ AC_DEFUN([CF_INHERIT_SCRIPT], test -f $1 || ( test -f ../$1 && cp ../$1 ./ ) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INSTALL_OPTS version: 2 updated: 2018/08/18 12:19:21 +dnl CF_INSTALL_OPTS version: 3 updated: 2023/06/03 15:17:30 dnl --------------- dnl prompt for/fill-in useful install-program options AC_DEFUN([CF_INSTALL_OPTS], @@ -2152,6 +2192,7 @@ AC_DEFUN([CF_INSTALL_OPTS], CF_INSTALL_OPT_S CF_INSTALL_OPT_P CF_INSTALL_OPT_O +CF_INSTALL_OPT_STRIP_PROG ])dnl dnl --------------------------------------------------------------------------- dnl CF_INSTALL_OPT_O version: 3 updated: 2020/12/31 20:19:42 @@ -2238,7 +2279,73 @@ fi AC_SUBST(INSTALL_OPT_S) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59 +dnl CF_INSTALL_OPT_STRIP_PROG version: 1 updated: 2023/06/03 15:17:30 +dnl ------------------------- +dnl Provide an option for overriding the strip program used in install "-s" +dnl +dnl coreutils install provides a --strip-program option +dnl FreeBSD uses STRIPBIN environment variable, while NetBSD and OpenBSD use +dnl STRIP environment variable. Other versions of install do not support this. +AC_DEFUN([CF_INSTALL_OPT_STRIP_PROG], +[ +AC_REQUIRE([CF_INSTALL_OPT_S]) +if test -n "$INSTALL_OPT_S" +then + AC_MSG_CHECKING(if you want to specify strip-program) + AC_ARG_WITH(strip-program, + [ --with-strip-program=XX specify program to use when stripping in install], + [with_strip_program=$withval], + [with_strip_program=no]) + AC_MSG_RESULT($with_strip_program) + if test "$with_strip_program" != no + then + AC_MSG_CHECKING(if strip-program is supported with this installer) + cf_install_program=`echo "$INSTALL" | sed -e 's%[[ ]]*[[ ]]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable[$]" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + AC_MSG_RESULT($check_install_strip) + case "$check_install_strip" in + (no) + AC_MSG_WARN($cf_install_program does not support strip program option) + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "[$]@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + CF_VERBOSE(created $INSTALL) + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi +AC_SUBST(INSTALL_OPT_S) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch @@ -2264,7 +2371,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_TRY_COMPILE([],[ #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -2482,7 +2589,7 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MATH_LIB version: 10 updated: 2020/12/31 18:40:20 +dnl CF_MATH_LIB version: 11 updated: 2022/07/27 19:01:48 dnl ----------- dnl Checks for libraries. At least one UNIX system, Apple Macintosh dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler @@ -2492,18 +2599,42 @@ AC_DEFUN([CF_MATH_LIB], AC_CACHE_CHECK(if -lm needed for math functions, cf_cv_need_libm,[ AC_TRY_LINK([ - #include - #include - #include + #include + #include + #include ], [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)], [cf_cv_need_libm=no], [cf_cv_need_libm=yes])]) + if test "$cf_cv_need_libm" = yes then -ifelse($1,,[ - CF_ADD_LIB(m) -],[$1=-lm]) + + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_CACHE_CHECK(if -lm is available for math functions, + cf_cv_have_libm,[ + AC_TRY_LINK([ + #include + #include + #include + ], + [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)], + [cf_cv_have_libm=yes], + [cf_cv_have_libm=no])]) + LIBS="$cf_save_LIBS" + + if test "$cf_cv_have_libm" = yes + then + ifelse($1,,[CF_ADD_LIB(m)],[$1=-lm]) + fi +else + cf_cv_have_libm=yes +fi + +if test "$cf_cv_have_libm" = yes +then + AC_DEFINE(HAVE_MATH_FUNCS,1,[Define to 1 if math functions are available]) fi ]) dnl --------------------------------------------------------------------------- @@ -2545,7 +2676,7 @@ AC_DEFUN([CF_MSG_LOG],[ echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CC_CHECK version: 5 updated: 2020/12/31 20:19:42 +dnl CF_NCURSES_CC_CHECK version: 6 updated: 2023/02/18 17:47:58 dnl ------------------- dnl Check if we can compile with ncurses' header file dnl $1 is the cache variable to set @@ -2562,7 +2693,7 @@ AC_DEFUN([CF_NCURSES_CC_CHECK],[ #ifdef NCURSES_VERSION ]ifelse($3,ncursesw,[ #ifndef WACS_BSSB - make an error + #error WACS_BSSB is not defined #endif ])[ printf("%s\\n", NCURSES_VERSION); @@ -2570,7 +2701,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif ] @@ -2943,7 +3074,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 16 updated: 2020/12/31 20:19:42 +dnl CF_NCURSES_VERSION version: 18 updated: 2024/01/07 06:34:16 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -2956,8 +3087,10 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ cf_tempfile=out$$ rm -f "$cf_tempfile" AC_TRY_RUN([ +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -2971,7 +3104,7 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); @@ -3181,7 +3314,7 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 12 updated: 2021/10/10 20:18:09 +dnl CF_PKG_CONFIG version: 13 updated: 2023/10/28 11:59:01 dnl ------------- dnl Check for the package-config program, unless disabled by command-line. dnl @@ -3190,7 +3323,7 @@ AC_DEFUN([CF_PKG_CONFIG], [ AC_MSG_CHECKING(if you want to use pkg-config) AC_ARG_WITH(pkg-config, - [ --with-pkg-config{=path} enable/disable use of pkg-config], + [[ --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]], [cf_pkg_config=$withval], [cf_pkg_config=yes]) AC_MSG_RESULT($cf_pkg_config) @@ -3219,7 +3352,7 @@ fi AC_SUBST(PKG_CONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 +dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -3250,7 +3383,7 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[ CF_MSG_LOG(if the symbol is already defined go no further) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif], [cf_cv_posix_c_source=no], [cf_want_posix_source=no @@ -3269,7 +3402,7 @@ make an error if test "$cf_want_posix_source" = yes ; then AC_TRY_COMPILE([#include ],[ #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif],[], cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE") fi @@ -3280,7 +3413,7 @@ make an error CF_MSG_LOG(if the second compile does not leave our definition intact error) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif],, [cf_cv_posix_c_source=no]) CFLAGS="$cf_save_CFLAGS" @@ -3384,7 +3517,7 @@ case $INSTALL in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_LINT version: 4 updated: 2019/11/20 18:55:37 +dnl CF_PROG_LINT version: 5 updated: 2022/08/20 15:44:13 dnl ------------ AC_DEFUN([CF_PROG_LINT], [ @@ -3395,6 +3528,7 @@ case "x$LINT" in ;; esac AC_SUBST(LINT_OPTS) +AC_SUBST(LINT_LIBS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_REMOVE_CFLAGS version: 3 updated: 2021/09/05 17:25:40 @@ -3586,7 +3720,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SIGWINCH version: 6 updated: 2021/01/01 13:31:04 +dnl CF_SIGWINCH version: 7 updated: 2023/02/18 17:41:25 dnl ----------- dnl Use this macro after CF_XOPEN_SOURCE, but do not require it (not all dnl programs need this test). @@ -3629,7 +3763,7 @@ do #include ],[ #if SIGWINCH != $cf_sigwinch -make an error +#error SIGWINCH is not $cf_sigwinch #endif int x = SIGWINCH; (void)x], [cf_cv_fixup_sigwinch=$cf_sigwinch @@ -3871,34 +4005,20 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TRY_XOPEN_SOURCE version: 3 updated: 2021/08/28 15:20:37 +dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, [cf_cv_xopen_source=no], [cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE) - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" ]) ]) @@ -3919,7 +4039,7 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTF8_LIB version: 9 updated: 2021/05/19 19:35:25 +dnl CF_UTF8_LIB version: 10 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for multibyte support, and if not found, utf8 compatibility library AC_DEFUN([CF_UTF8_LIB], @@ -3928,8 +4048,7 @@ AC_HAVE_HEADERS(wchar.h) AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ cf_save_LIBS="$LIBS" AC_TRY_LINK([ -#include -#include +$ac_includes_default #ifdef HAVE_WCHAR_H #include #endif @@ -3959,7 +4078,7 @@ AC_DEFUN([CF_VERBOSE], CF_MSG_LOG([$1]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WCHAR_TYPE version: 4 updated: 2012/10/06 16:39:58 +dnl CF_WCHAR_TYPE version: 5 updated: 2023/12/03 09:21:34 dnl ------------- dnl Check if type wide-character type $1 is declared, and if so, which header dnl file is needed. The second parameter is used to set a shell variable when @@ -3976,7 +4095,7 @@ AC_TRY_COMPILE([ #ifdef HAVE_LIBUTF8_H #include #endif], - [$1 state], + [$1 state; (void)state], [cf_cv_$1=no], [AC_TRY_COMPILE([ #include @@ -3986,7 +4105,7 @@ AC_TRY_COMPILE([ #ifdef HAVE_LIBUTF8_H #include #endif], - [$1 value], + [$1 value; (void) value], [cf_cv_$1=yes], [cf_cv_$1=unknown])])]) @@ -4063,7 +4182,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIB_BASENAME version: 1 updated: 2020/03/07 20:05:14 +dnl CF_WITH_LIB_BASENAME version: 2 updated: 2023/11/22 20:48:30 dnl -------------------- dnl Allow for overriding the basename of a library, i.e., the part to which dnl prefixes/suffixes are attached. @@ -4075,7 +4194,7 @@ AC_DEFUN([CF_WITH_LIB_BASENAME], [ AC_MSG_CHECKING(for desired basename for $2 library) AC_ARG_WITH($2-libname, - [ --with-$2-libname=XXX override ifelse($3,,$2,$3) basename of library], + [[ --with-$2-libname[=XXX] override ifelse($3,,$2,$3) basename of library]], [with_lib_basename=$withval], [with_lib_basename=ifelse($3,,$2,$3)]) $1="$with_lib_basename" @@ -4092,7 +4211,7 @@ AC_MSG_RESULT([$]$1) AC_SUBST($1) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_NCURSES_ETC version: 5 updated: 2016/02/20 19:23:20 +dnl CF_WITH_NCURSES_ETC version: 6 updated: 2023/01/16 10:10:06 dnl ------------------- dnl Use this macro for programs which use any variant of "curses", e.g., dnl "ncurses", and "PDCurses". Programs that can use curses and some unrelated @@ -4152,6 +4271,7 @@ case $cf_cv_screen in esac CF_NCURSES_PTHREADS($cf_cv_screen) +AC_SUBST(cf_cv_screen) ])dnl dnl --------------------------------------------------------------------------- @@ -4180,7 +4300,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_X11_RGB version: 2 updated: 2019/12/31 08:53:54 +dnl CF_WITH_X11_RGB version: 3 updated: 2023/10/28 11:59:01 dnl --------------- dnl Handle configure option "--with-x11-rgb", setting these shell dnl variables: @@ -4220,7 +4340,7 @@ dnl /usr/X11/lib/X11/rgb.txt AC_DEFUN([CF_WITH_X11_RGB],[ AC_MSG_CHECKING(for X11 rgb file) AC_ARG_WITH(x11-rgb, - [ --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)], + [ --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)], [RGB_PATH=$withval], [RGB_PATH=auto]) @@ -4266,7 +4386,7 @@ fi AC_SUBST(no_x11_rgb) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_CURSES version: 17 updated: 2021/07/10 12:22:27 +dnl CF_XOPEN_CURSES version: 20 updated: 2024/01/07 06:54:12 dnl --------------- dnl Test if we should define X/Open source for curses, needed on Digital Unix dnl 4.x, to see the extended functions, but breaks on IRIX 6.x. @@ -4279,19 +4399,20 @@ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(definition to turn on extended curses functions,cf_cv_need_xopen_extension,[ cf_cv_need_xopen_extension=unknown AC_TRY_LINK([ -#include +$ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}>],[ #if defined(NCURSES_VERSION_PATCH) #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) - make an error + #error disallow ncurses versions between 2020/04/03 and 2010/05/01 #endif #endif #ifdef NCURSES_WIDECHAR -make an error /* prefer to fall-through on the second checks */ +#error prefer to fall-through on the second checks #endif + static char dummy[10]; cchar_t check; int check2 = curs_set((int)sizeof(check)); - long x = winnstr(stdscr, "", 0); + long x = winnstr(stdscr, dummy, 5); int x1, y1; (void)check2; getbegyx(stdscr, y1, x1); @@ -4305,11 +4426,12 @@ make an error /* prefer to fall-through on the second checks */ do AC_TRY_LINK([ #define $cf_try_xopen_extension 1 -#include +$ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}>],[ + static char dummy[10]; cchar_t check; int check2 = curs_set((int)sizeof(check)); - long x = winnstr(stdscr, "", 0); + long x = winnstr(stdscr, dummy, 5); int x1, y1; getbegyx(stdscr, y1, x1); (void)check2; @@ -4330,7 +4452,7 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 59 updated: 2021/08/28 15:20:37 +dnl CF_XOPEN_SOURCE version: 67 updated: 2023/09/06 18:55:27 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -4339,6 +4461,18 @@ dnl dnl Parameters: dnl $1 is the nominal value for _XOPEN_SOURCE dnl $2 is the nominal value for _POSIX_C_SOURCE +dnl +dnl The default case prefers _XOPEN_SOURCE over _POSIX_C_SOURCE if the +dnl implementation predefines it, because X/Open and most implementations agree +dnl that the latter is a legacy or "aligned" value. +dnl +dnl Because _XOPEN_SOURCE is preferred, if defining _POSIX_C_SOURCE turns +dnl that off, then refrain from setting _POSIX_C_SOURCE explicitly. +dnl +dnl References: +dnl https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html +dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html +dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html AC_DEFUN([CF_XOPEN_SOURCE],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([CF_POSIX_VISIBLE]) @@ -4353,9 +4487,6 @@ case "$host_os" in (aix[[4-7]]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(msys) - cf_XOPEN_SOURCE=600 - ;; (darwin[[0-8]].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -4381,7 +4512,7 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) CF_GNU_SOURCE($cf_XOPEN_SOURCE) ;; (minix*) @@ -4430,7 +4561,15 @@ case "$host_os" in ;; (*) CF_TRY_XOPEN_SOURCE + cf_save_xopen_cppflags="$CPPFLAGS" CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) + # Some of these niche implementations use copy/paste, double-check... + if test "$cf_cv_xopen_source" = no ; then + CF_VERBOSE(checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE) + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[ + AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable) + CPPFLAGS="$cf_save_xopen_cppflags"]) + fi ;; esac @@ -4445,7 +4584,7 @@ if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) AC_TRY_COMPILE([#include ],[ #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif], [cf_XOPEN_SOURCE_set=yes], [cf_XOPEN_SOURCE_set=no]) @@ -4454,7 +4593,7 @@ make an error then AC_TRY_COMPILE([#include ],[ #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif], [cf_XOPEN_SOURCE_set_ok=yes], [cf_XOPEN_SOURCE_set_ok=no]) @@ -4469,7 +4608,7 @@ fi fi # cf_cv_posix_visible ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA version: 24 updated: 2020/03/10 18:53:47 +dnl CF_X_ATHENA version: 25 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for Xaw (Athena) libraries dnl @@ -4543,6 +4682,7 @@ if test "$PKG_CONFIG" != none ; then AC_CACHE_CHECK(for usable $cf_x_athena/Xmu package,cf_cv_xaw_compat,[ AC_TRY_LINK([ +$ac_includes_default #include ],[ int check = XmuCompareISOLatin1("big", "small"); @@ -4629,7 +4769,7 @@ elif test "$cf_x_athena_inc" != default ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA_LIBS version: 13 updated: 2020/01/11 18:16:10 +dnl CF_X_ATHENA_LIBS version: 14 updated: 2023/01/11 04:05:23 dnl ---------------- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. @@ -4662,6 +4802,7 @@ do CF_ADD_LIBS($cf_libs) AC_MSG_CHECKING(for $cf_test in $cf_libs) AC_TRY_LINK([ +$ac_includes_default #include #include ],[ @@ -4698,7 +4839,7 @@ CF_TRY_PKG_CONFIG(Xext,,[ [CF_ADD_LIB(Xext)])]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_X_TOOLKIT version: 26 updated: 2021/01/02 09:31:20 +dnl CF_X_TOOLKIT version: 27 updated: 2023/01/11 04:05:23 dnl ------------ dnl Check for X Toolkit libraries AC_DEFUN([CF_X_TOOLKIT], @@ -4733,6 +4874,7 @@ CF_TRY_PKG_CONFIG(xt,[ # we have an "xt" package, but it may omit Xt's dependency on X11 AC_CACHE_CHECK(for usable X dependency,cf_cv_xt_x11_compat,[ AC_TRY_LINK([ +$ac_includes_default #include ],[ int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0); @@ -4751,6 +4893,7 @@ AC_TRY_LINK([ AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_ice_compat,[ AC_TRY_LINK([ +$ac_includes_default #include ],[int num = IceConnectionNumber(0); (void) num ],[cf_cv_xt_ice_compat=yes],[cf_cv_xt_ice_compat=no])]) @@ -4836,3 +4979,21 @@ char * XCursesProgramName = "test"; #endif #endif ]) +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl body of test when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_BODY], +[ +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif +]) +dnl --------------------------------------------------------------------------- +dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25 +dnl --------------------- +dnl headers to include when test-compiling for _XOPEN_SOURCE check +define([CF__XOPEN_SOURCE_HEAD], +[ +$ac_includes_default +]) diff --git a/test/back_ground.c b/test/back_ground.c index 10028246..c53c2a36 100644 --- a/test/back_ground.c +++ b/test/back_ground.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2021 Thomas E. Dickey * + * Copyright 2021,2022 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: back_ground.c,v 1.5 2021/02/20 12:23:21 tom Exp $ + * $Id: back_ground.c,v 1.9 2022/12/10 22:28:50 tom Exp $ */ #include @@ -170,12 +170,13 @@ test_background(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: background [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_ASSUME_DEFAULT_COLORS ," -a invoke assume_default_colors, repeat to use in init_pair" @@ -194,11 +195,14 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { #if HAVE_ASSUME_DEFAULT_COLORS int a_option = 0; @@ -206,12 +210,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #if HAVE_USE_DEFAULT_COLORS int d_option = 0; #endif - int n; + int ch; setlocale(LC_ALL, ""); - while ((n = getopt(argc, argv, "ab:df:l:wW:")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "ab:df:l:wW:")) != -1) { + switch (ch) { #if HAVE_ASSUME_DEFAULT_COLORS case 'a': ++a_option; @@ -230,7 +234,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) break; case 'l': if (!open_dump(optarg)) - usage(); + usage(FALSE); break; case 'w': wide_fill = L'\u2591'; @@ -238,8 +242,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'W': wide_fill = decode_wchar(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } #if HAVE_USE_DEFAULT_COLORS && HAVE_ASSUME_DEFAULT_COLORS diff --git a/test/background.c b/test/background.c index 649ffced..5942debb 100644 --- a/test/background.c +++ b/test/background.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 2003-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: background.c,v 1.20 2021/02/13 20:54:08 tom Exp $ + * $Id: background.c,v 1.24 2022/12/10 22:28:50 tom Exp $ */ #define NEED_COLOR_CODE 1 @@ -129,12 +129,13 @@ test_background(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: background [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_ASSUME_DEFAULT_COLORS ," -a invoke assume_default_colors, repeat to use in init_pair" @@ -151,11 +152,14 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { #if HAVE_ASSUME_DEFAULT_COLORS int a_option = 0; @@ -163,12 +167,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #if HAVE_USE_DEFAULT_COLORS int d_option = 0; #endif - int n; + int ch; setlocale(LC_ALL, ""); - while ((n = getopt(argc, argv, "ab:df:l:")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "ab:df:l:")) != -1) { + switch (ch) { #if HAVE_ASSUME_DEFAULT_COLORS case 'a': ++a_option; @@ -187,10 +191,14 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) break; case 'l': if (!open_dump(optarg)) - usage(); + usage(FALSE); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } #if HAVE_USE_DEFAULT_COLORS && HAVE_ASSUME_DEFAULT_COLORS diff --git a/test/blue.c b/test/blue.c index 71b758a0..90f240b6 100644 --- a/test/blue.c +++ b/test/blue.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ *****************************************************************************/ /* - * $Id: blue.c,v 1.54 2021/03/20 16:06:15 tom Exp $ + * $Id: blue.c,v 1.55 2022/12/10 23:31:31 tom Exp $ */ #include @@ -465,9 +465,44 @@ use_pc_display(void) #define use_pc_display() /* nothing */ #endif /* HAVE_LANGINFO_CODESET */ +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: blue [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + setlocale(LC_ALL, ""); use_pc_display(); diff --git a/test/bs.6 b/test/bs.6 index 3bb1f10b..12295a31 100644 --- a/test/bs.6 +++ b/test/bs.6 @@ -27,8 +27,8 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: bs.6,v 1.4 2021/06/17 21:20:30 tom Exp $ -.TH BATTLESHIPS 6 "Aug 23, 1989" +.\" $Id: bs.6,v 1.5 2021/06/17 21:20:30 tom Exp $ +.TH BATTLESHIPS 6 2021-06-17 ncurses-examples Games .SH NAME bs \- battleships game .SH SYNOPSIS diff --git a/test/bs.c b/test/bs.c index 0a074bb0..c7569cf2 100644 --- a/test/bs.c +++ b/test/bs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ * v2.0 featuring strict ANSI/POSIX conformance, November 1993. * v2.1 with ncurses mouse support, September 1995 * - * $Id: bs.c,v 1.77 2021/06/17 21:11:08 tom Exp $ + * $Id: bs.c,v 1.79 2023/05/27 20:13:10 tom Exp $ */ #include @@ -898,8 +898,9 @@ sgetc(const char *s) ch = toupper(ch); if (is_QUIT(ch)) uninitgame(0); - for (s1 = s; *s1 && ch != *s1; ++s1) - continue; + for (s1 = s; *s1 && ch != *s1; ++s1) { + /* EMPTY */ ; + } if (*s1) { AddCh(ch); (void) refresh(); @@ -1162,55 +1163,6 @@ playagain(void) return (sgetc("YN") == 'Y'); } -static void -do_options(int c, char *op[]) -{ - if (c > 1) { - int i; - - for (i = 1; i < c; i++) { - switch (op[i][0]) { - default: - case '?': - (void) fprintf(stderr, "Usage: bs [-s | -b] [-c]\n"); - (void) fprintf(stderr, "\tWhere the options are:\n"); - (void) fprintf(stderr, "\t-s : play a salvo game\n"); - (void) fprintf(stderr, "\t-b : play a blitz game\n"); - (void) fprintf(stderr, "\t-c : ships may be adjacent\n"); - ExitProgram(EXIT_FAILURE); - break; - case '-': - switch (op[i][1]) { - case 'b': - blitz = 1; - if (salvo == 1) { - (void) fprintf(stderr, - "Bad Arg: -b and -s are mutually exclusive\n"); - ExitProgram(EXIT_FAILURE); - } - break; - case 's': - salvo = 1; - if (blitz == 1) { - (void) fprintf(stderr, - "Bad Arg: -s and -b are mutually exclusive\n"); - ExitProgram(EXIT_FAILURE); - } - break; - case 'c': - closepack = 1; - break; - default: - (void) fprintf(stderr, - "Bad arg: type \"%s ?\" for usage message\n", - op[0]); - ExitProgram(EXIT_FAILURE); - } - } - } - } -} - static int scount(int who) { @@ -1231,12 +1183,68 @@ scount(int who) return (shots); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: bs [options]" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -b play a blitz game" + ," -c ships may be adjacent" + ," -s play a salvo game" + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { - setlocale(LC_ALL, ""); + int ch; - do_options(argc, argv); + while ((ch = getopt(argc, argv, OPTS_COMMON "bcs")) != -1) { + switch (ch) { + case 'b': + blitz = 1; + if (salvo == 1) { + (void) fprintf(stderr, + "Bad Arg: -b and -s are mutually exclusive\n"); + ExitProgram(EXIT_FAILURE); + } + break; + case 's': + salvo = 1; + if (blitz == 1) { + (void) fprintf(stderr, + "Bad Arg: -s and -b are mutually exclusive\n"); + ExitProgram(EXIT_FAILURE); + } + break; + case 'c': + closepack = 1; + break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + + setlocale(LC_ALL, ""); intro(); do { @@ -1263,8 +1271,9 @@ main(int argc, char *argv[]) } } } else - while ((turn ? cputurn() : plyturn()) && awinna() == -1) - continue; + while ((turn ? cputurn() : plyturn()) && awinna() == -1) { + /* EMPTY */ ; + } turn = OTHER; } } while diff --git a/test/cardfile.c b/test/cardfile.c index 78b659b3..092483b0 100644 --- a/test/cardfile.c +++ b/test/cardfile.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 1999-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: cardfile.c,v 1.48 2021/03/20 18:23:14 tom Exp $ + * $Id: cardfile.c,v 1.51 2022/12/04 00:40:11 tom Exp $ * * File format: text beginning in column 1 is a title; other text is content. */ @@ -550,37 +550,45 @@ cardfile(char *fname) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: cardfile [options] file" ,"" + ,USAGE_COMMON ,"Options:" ," -c use color if terminal supports it" }; size_t n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } /*******************************************************************************/ +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int n; + int ch; setlocale(LC_ALL, ""); - while ((n = getopt(argc, argv, "c")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "c")) != -1) { + switch (ch) { case 'c': try_color = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -600,6 +608,7 @@ main(int argc, char *argv[]) } if (optind + 1 == argc) { + int n; for (n = 1; n < argc; n++) read_data(argv[n]); if (count_cards() == 0) diff --git a/test/chgat.c b/test/chgat.c index a5bcbea2..2c2b5391 100644 --- a/test/chgat.c +++ b/test/chgat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2006-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: chgat.c,v 1.19 2020/02/02 23:34:34 tom Exp $ + * $Id: chgat.c,v 1.20 2022/12/10 23:31:31 tom Exp $ * * test-driver for chgat/wchgat/mvchgat/mvwchgat */ @@ -348,9 +348,44 @@ test_chgat(void) } while ((st.ch = getch()) != ERR); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: chgat [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + initscr(); cbreak(); noecho(); diff --git a/test/clip_printw.c b/test/clip_printw.c index a4242e84..c34a1e09 100644 --- a/test/clip_printw.c +++ b/test/clip_printw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2008-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,9 +27,9 @@ * authorization. * ****************************************************************************/ /* - * $Id: clip_printw.c,v 1.19 2020/05/10 00:40:23 tom Exp $ + * $Id: clip_printw.c,v 1.23 2023/09/30 19:57:44 tom Exp $ * - * demonstrate how to use printw without wrapping. + * demonstrate how to use printw with/without wrapping. */ #include @@ -40,9 +40,15 @@ #define SHOW(n) ((n) == ERR ? "ERR" : "OK") #define COLOR_DEFAULT (-1) +#define X_BASE 0 +#define Y_BASE 1 +#define MARGIN 1 +#define Y_TOP (Y_BASE + MARGIN) + typedef struct { unsigned c; unsigned v; + bool single; int status; int pair; attr_t attr; @@ -57,21 +63,29 @@ typedef struct { } STATUS; static int -clip_wprintw(WINDOW *win, NCURSES_CONST char *fmt, ...) +clip_wprintw(WINDOW *win, bool single, NCURSES_CONST char *fmt, ...) { int y0, x0, y1, x1, width; WINDOW *sub; va_list ap; int rc; - /* - * Allocate a single-line derived window extending from the current - * cursor position to the end of the current line in the given window. - * Disable scrolling in the derived window. - */ getyx(win, y0, x0); width = getmaxx(win) - x0; - sub = derwin(win, 1, width, y0, x0); + if (single) { + /* + * Allocate a single-line derived window extending from the current + * cursor position to the end of the current line in the given window. + * Disable scrolling in the derived window. + */ + sub = derwin(win, 1, width, y0, x0); + } else { + /* + * Allow printw to wrap through the entire window. + */ + sub = derwin(win, getmaxy(win), getmaxx(win), 0, 0); + wmove(sub, y0, x0); + } scrollok(sub, FALSE); /* @@ -84,7 +98,11 @@ clip_wprintw(WINDOW *win, NCURSES_CONST char *fmt, ...) getyx(sub, y1, x1); delwin(sub); - wmove(win, y1 + y0, x1 + x0); + if (single) { + wmove(win, y1 + y0, x1 + x0); + } else { + wmove(win, y1, x1); + } return rc; } @@ -156,11 +174,12 @@ video_params(unsigned state, attr_t *attr) static void fill_window(WINDOW *win) { + int y_top = (win == stdscr) ? Y_BASE : MARGIN; int y, x; int y0 = -1, x0 = -1; getyx(win, y, x); - wmove(win, 0, 0); + wmove(win, y_top, 0); while (waddstr(win, "0123456789 abcdefghijklmnopqrstuvwxyz ") != ERR) { int y1, x1; getyx(win, y1, x1); @@ -178,25 +197,34 @@ show_status(WINDOW *win, STATUS * sp) int y, x; getyx(win, y, x); + wattron(win, A_REVERSE); wmove(win, 0, 0); - wprintw(win, "Count %d", sp->count); + wprintw(win, "Clip %s", sp->single ? "line" : "window"); + wprintw(win, " Count %d", sp->count); if (sp->v_msg != 0) wprintw(win, " Video %s", sp->v_msg); if (sp->c_msg != 0) wprintw(win, " Color %s", sp->c_msg); wprintw(win, " (%d)", sp->status); wclrtoeol(win); + wattroff(win, A_REVERSE); wmove(win, y, x); } static void do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *)) { - WINDOW *win1 = newwin(sp->y_max - 2, sp->x_max - 2, - sp->y_beg + 1, sp->x_beg + 1); + WINDOW *win1 = newwin(sp->y_max - (2 * MARGIN), + sp->x_max - (2 * MARGIN), + sp->y_beg + MARGIN, + sp->x_beg + MARGIN); if (win1 != 0 && sp->y_max > 4 && sp->x_max > 4) { - WINDOW *win2 = derwin(win1, sp->y_max - 4, sp->x_max - 4, 1, 1); + WINDOW *win2 = derwin(win1, + sp->y_max - (2 * MARGIN) - 2, + sp->x_max - (2 * MARGIN) - 2, + (win == stdscr) ? Y_BASE : Y_BASE, + MARGIN); if (win2 != 0) { box(win1, 0, 0); @@ -216,10 +244,14 @@ do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *)) } } +/* + * The status line is within the same window as the test-data. + */ static void init_status(WINDOW *win, STATUS * sp) { memset(sp, 0, sizeof(*sp)); + sp->single = TRUE; sp->c = 99; sp->v = 99; sp->ch = ' '; @@ -229,6 +261,8 @@ init_status(WINDOW *win, STATUS * sp) getbegyx(win, sp->y_beg, sp->x_beg); getmaxyx(win, sp->y_max, sp->x_max); + + wmove(win, sp->y_val = Y_BASE, sp->x_val = 0); } static void @@ -242,7 +276,10 @@ show_help(WINDOW *win) ,"" ,"Other commands:" ,"space toggles through the set of video attributes and colors." + ,"q exit subwindow, quit if last window." + ,"s toggles single-line updates versus entire windows." ,"t touches (forces repaint) of the current line." + ,"w create subwindow." ,". calls vw_printw at the current position with the given count." ,"= resets count to zero." ,"? shows this help-window" @@ -255,6 +292,8 @@ show_help(WINDOW *win) static void update_status(WINDOW *win, STATUS * sp) { + int margin = 0; + switch (sp->ch) { case ' ': /* next test-iteration */ if (has_colors()) { @@ -272,24 +311,40 @@ update_status(WINDOW *win, STATUS * sp) sp->count = 0; show_status(win, sp); break; + case KEY_HOME: + case '^': + wmove(win, sp->y_val, sp->x_val = margin); + break; + case KEY_END: + case '$': + wmove(win, sp->y_val, sp->x_val = (sp->x_max - margin - 1)); + break; + case KEY_PPAGE: + case CTRL('B'): + wmove(win, sp->y_val = Y_BASE, sp->x_val); + break; + case KEY_NPAGE: + case CTRL('F'): + wmove(win, sp->y_val = (sp->y_max - margin - 1), sp->x_val); + break; case KEY_LEFT: case 'h': - if (sp->x_val > 0) + if (sp->x_val > margin) wmove(win, sp->y_val, --(sp->x_val)); break; case KEY_DOWN: case 'j': - if (sp->y_val < sp->y_max) + if (sp->y_val < (sp->y_max - margin)) wmove(win, ++(sp->y_val), sp->x_val); break; case KEY_UP: case 'k': - if (sp->y_val > 0) + if (sp->y_val > Y_BASE) wmove(win, --(sp->y_val), sp->x_val); break; case KEY_RIGHT: case 'l': - if (sp->x_val < sp->x_max) + if (sp->x_val < (sp->x_max - margin)) wmove(win, sp->y_val, ++(sp->x_val)); break; case 't': @@ -299,6 +354,10 @@ update_status(WINDOW *win, STATUS * sp) sp->count = 0; show_status(win, sp); break; + case 's': + sp->single = !sp->single; + show_status(win, sp); + break; case HELP_KEY_1: show_help(win); break; @@ -342,7 +401,7 @@ test_clipping(WINDOW *win) buffer[j] = (char) ('A' + (j % 26)); } buffer[need - 1] = '\0'; - st.status = clip_wprintw(win, fmt, '[', buffer, ']'); + st.status = clip_wprintw(win, st.single, fmt, '[', buffer, ']'); free(buffer); } break; @@ -358,9 +417,45 @@ test_clipping(WINDOW *win) } while ((st.ch = wgetch(win)) != ERR); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: clip_printw [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + + setlocale(LC_ALL, ""); initscr(); cbreak(); noecho(); diff --git a/test/color_content.c b/test/color_content.c index 0f619f66..d08dffb0 100644 --- a/test/color_content.c +++ b/test/color_content.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_content.c,v 1.12 2020/02/02 23:34:34 tom Exp $ + * $Id: color_content.c,v 1.19 2023/02/25 16:48:02 tom Exp $ */ #define NEED_TIME_H @@ -58,10 +58,8 @@ static int x_opt; static MYCOLOR *expected; -#if HAVE_GETTIMEOFDAY -static struct timeval initial_time; -static struct timeval finish_time; -#endif +static TimeType initial_time; +static TimeType finish_time; static void failed(const char *msg) @@ -118,6 +116,7 @@ random_color(void) static void setup_test(void) { + setlocale(LC_ALL, ""); initscr(); cbreak(); noecho(); @@ -174,9 +173,7 @@ setup_test(void) } else { failed("This demo requires a color terminal"); } -#if HAVE_GETTIMEOFDAY - gettimeofday(&initial_time, 0); -#endif + GetClockTime(&initial_time); } static void @@ -212,23 +209,14 @@ finish_test(void) endwin(); } -#if HAVE_GETTIMEOFDAY -static double -seconds(struct timeval *mark) -{ - double result = (double) mark->tv_sec; - result += ((double) mark->tv_usec / 1e6); - return result; -} -#endif - static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: color_content [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -f COLOR first color value to test (default: 0)" ," -i interactive, showing test-progress" @@ -244,26 +232,29 @@ usage(void) size_t n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { - int i; + int ch; - while ((i = getopt(argc, argv, "f:il:npr:sx")) != -1) { - switch (i) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:il:npr:sx")) != -1) { + switch (ch) { case 'f': if ((f_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 'i': i_opt = 1; break; case 'l': if ((l_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 'n': n_opt = 1; @@ -273,7 +264,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) break; case 'r': if ((r_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 's': s_opt = 1; @@ -283,17 +274,22 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) x_opt = 1; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); if (r_opt <= 0) r_opt = 1; setup_test(); if (p_opt) { + int i; endwin(); for (i = 0; i < COLORS; ++i) { my_color_t r, g, b; @@ -318,14 +314,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) addch('\n'); } printw("DONE: "); -#if HAVE_GETTIMEOFDAY - gettimeofday(&finish_time, 0); - printw("%.03f seconds", - seconds(&finish_time) - - seconds(&initial_time)); -#endif + GetClockTime(&finish_time); + printw("%.03f seconds", ElapsedSeconds(&finish_time, &initial_time)); finish_test(); } + free(expected); ExitProgram(EXIT_SUCCESS); } diff --git a/test/color_set.c b/test/color_set.c index 016b9933..5510a0fd 100644 --- a/test/color_set.c +++ b/test/color_set.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2020,2020,2022 Thomas E. Dickey * * Copyright 2003-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_set.c,v 1.10 2020/02/02 23:34:34 tom Exp $ + * $Id: color_set.c,v 1.12 2022/12/10 23:36:59 tom Exp $ */ #include @@ -36,11 +36,46 @@ #define SHOW(n) ((n) == ERR ? "ERR" : "OK") +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: color_set [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { NCURSES_COLOR_T f, b; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + setlocale(LC_ALL, ""); initscr(); cbreak(); noecho(); diff --git a/test/combine.c b/test/combine.c index 1025c9f2..eca72b80 100644 --- a/test/combine.c +++ b/test/combine.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2021 Thomas E. Dickey * + * Copyright 2021,2022 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,13 +26,14 @@ * authorization. * ****************************************************************************/ /* - * $Id: combine.c,v 1.17 2021/12/18 21:04:00 tom Exp $ + * $Id: combine.c,v 1.23 2022/12/10 22:28:50 tom Exp $ */ #include #if USE_WIDEC_SUPPORT +#include #include #include @@ -180,52 +181,59 @@ show_help(WINDOW *current) } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: combine [options]", - "", - "Demonstrate combining-characters.", - "", - "Options:", - " -c use cchar_t data rather than wchar_t string", - " -l FILE log window-dumps to this file", - " -r draw even-numbered rows in reverse-video", + "Usage: combine [options]" + ,"" + ,USAGE_COMMON + ,"Demonstrate combining-characters." + ,"" + ,"Options:" + ," -c use cchar_t data rather than wchar_t string" + ," -l FILE log window-dumps to this file" + ," -r draw even-numbered rows in reverse-video" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { - int n; + int ch; int left_at = ' '; int over_it = 0; bool done = FALSE; bool log_option = FALSE; const char *dump_log = "combine.log"; - while ((n = getopt(argc, argv, "cl:r")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "cl:r")) != -1) { + switch (ch) { case 'c': c_opt = TRUE; break; case 'l': log_option = TRUE; if (!open_dump(optarg)) - usage(); + usage(FALSE); break; case 'r': r_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -252,8 +260,10 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'd': if (log_option) dump_window(stdscr); +#if HAVE_SCR_DUMP else scr_dump(dump_log); +#endif break; case 'h': if (left_at > ' ') diff --git a/test/configure b/test/configure index 6c68d959..4f155cd7 100755 --- a/test/configure +++ b/test/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52.20210509. +# Generated by Autoconf 2.52.20231210. # -# Copyright 2003-2020,2021 Thomas E. Dickey +# Copyright 2003-2022,2023 Thomas E. Dickey # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -33,9 +33,9 @@ fi as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr + as_expr="expr" else - as_expr=false + as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file @@ -50,7 +50,7 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + as_ln_s='ln' else as_ln_s='cp -p' fi @@ -107,6 +107,42 @@ SHELL=${CONFIG_SHELL-/bin/sh} : "${ac_max_here_lines=38}" ac_unique_file="ncurses.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. ac_init_help= @@ -669,9 +705,10 @@ Optional Packages: General Options: --disable-stripping do not strip (debug info) installed executables + --with-strip-program=XX specify program to use when stripping in install --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics --enable-string-hacks work around bogus compiler/loader warnings - --with-pkg-config{=path} enable/disable use of pkg-config + --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD --disable-echo do not display "compiling" commands Curses Version-dependent Options: --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables @@ -688,10 +725,10 @@ Curses Version-dependent Options: --with-neXtaw link with neXT Athena library --with-XawPlus link with Athena-Plus library --with-x use the X Window System - --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt) - --with-form-libname=XXX override form basename of library - --with-menu-libname=XXX override menu basename of library - --with-panel-libname=XXX override panel basename of library + --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt) + --with-form-libname[=XXX] override ifelse(,,form,) basename of library + --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library + --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library --disable-panel disable checks for panel functions --disable-menu disable checks for menu functions --disable-form disable checks for form functions @@ -758,7 +795,7 @@ test -n "$ac_init_help" && exit 0 if "$ac_init_version"; then cat <<\EOF -Copyright 2003-2020,2021 Thomas E. Dickey +Copyright 2003-2022,2023 Thomas E. Dickey Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -772,7 +809,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52.20210509. Invocation command line was +generated by GNU Autoconf 2.52.20231210. Invocation command line was $ $0 $@ @@ -896,7 +933,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:899: loading site script $ac_site_file" >&5 + { echo "$as_me:936: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" @@ -907,7 +944,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:910: loading cache $cache_file" >&5 + { echo "$as_me:947: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -915,7 +952,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:918: creating cache $cache_file" >&5 + { echo "$as_me:955: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -931,21 +968,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case "$ac_old_set,$ac_new_set" in set,) - { echo "$as_me:934: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:971: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:938: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:975: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:944: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:981: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:946: former value: $ac_old_val" >&5 + { echo "$as_me:983: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:948: current value: $ac_new_val" >&5 + { echo "$as_me:985: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -964,9 +1001,9 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if "$ac_cache_corrupted"; then - { echo "$as_me:967: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:1004: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:969: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:1006: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -995,10 +1032,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:998: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:1035: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:1001: \$? = $ac_status" >&5 + echo "$as_me:1038: \$? = $ac_status" >&5 (exit "$ac_status"); }; then ac_path_separator=';' else @@ -1030,7 +1067,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1033: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1070: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -1040,11 +1077,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1043: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1080: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1047: checking build system type" >&5 +echo "$as_me:1084: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1053,16 +1090,16 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1056: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1093: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` || - { { echo "$as_me:1060: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1097: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1065: result: $ac_cv_build" >&5 +echo "$as_me:1102: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1070,7 +1107,7 @@ build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then - echo "$as_me:1073: checking host system type" >&5 + echo "$as_me:1110: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1079,12 +1116,12 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` || - { { echo "$as_me:1082: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1119: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1087: result: $ac_cv_host" >&5 +echo "$as_me:1124: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1110,13 +1147,13 @@ else fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1113: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1150: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1117: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1154: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 - { { echo "$as_me:1119: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1156: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1134,7 +1171,7 @@ _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed -echo "$as_me:1137: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:1174: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -1154,11 +1191,11 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:1157: result: yes" >&5 + echo "$as_me:1194: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:1161: result: no" >&5 + echo "$as_me:1198: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -1172,7 +1209,7 @@ ac_main_return="return" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1175: checking for $ac_word" >&5 +echo "$as_me:1212: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1187,7 +1224,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1190: found $ac_dir/$ac_word" >&5 +echo "$as_me:1227: found $ac_dir/$ac_word" >&5 break done @@ -1195,10 +1232,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1198: result: $CC" >&5 + echo "$as_me:1235: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1201: result: no" >&5 + echo "$as_me:1238: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1207,7 +1244,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1210: checking for $ac_word" >&5 +echo "$as_me:1247: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1222,7 +1259,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1225: found $ac_dir/$ac_word" >&5 +echo "$as_me:1262: found $ac_dir/$ac_word" >&5 break done @@ -1230,10 +1267,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1233: result: $ac_ct_CC" >&5 + echo "$as_me:1270: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1236: result: no" >&5 + echo "$as_me:1273: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1246,7 +1283,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1249: checking for $ac_word" >&5 +echo "$as_me:1286: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1261,7 +1298,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1264: found $ac_dir/$ac_word" >&5 +echo "$as_me:1301: found $ac_dir/$ac_word" >&5 break done @@ -1269,10 +1306,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1272: result: $CC" >&5 + echo "$as_me:1309: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1275: result: no" >&5 + echo "$as_me:1312: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1281,7 +1318,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1284: checking for $ac_word" >&5 +echo "$as_me:1321: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1296,7 +1333,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1299: found $ac_dir/$ac_word" >&5 +echo "$as_me:1336: found $ac_dir/$ac_word" >&5 break done @@ -1304,10 +1341,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1307: result: $ac_ct_CC" >&5 + echo "$as_me:1344: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1310: result: no" >&5 + echo "$as_me:1347: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1320,7 +1357,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1323: checking for $ac_word" >&5 +echo "$as_me:1360: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1340,7 +1377,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then continue fi ac_cv_prog_CC="cc" -echo "$as_me:1343: found $ac_dir/$ac_word" >&5 +echo "$as_me:1380: found $ac_dir/$ac_word" >&5 break done @@ -1362,10 +1399,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1365: result: $CC" >&5 + echo "$as_me:1402: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1368: result: no" >&5 + echo "$as_me:1405: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1376,7 +1413,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1379: checking for $ac_word" >&5 +echo "$as_me:1416: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1391,7 +1428,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1394: found $ac_dir/$ac_word" >&5 +echo "$as_me:1431: found $ac_dir/$ac_word" >&5 break done @@ -1399,10 +1436,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1402: result: $CC" >&5 + echo "$as_me:1439: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1405: result: no" >&5 + echo "$as_me:1442: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1415,7 +1452,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1418: checking for $ac_word" >&5 +echo "$as_me:1455: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1430,7 +1467,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1433: found $ac_dir/$ac_word" >&5 +echo "$as_me:1470: found $ac_dir/$ac_word" >&5 break done @@ -1438,10 +1475,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1441: result: $ac_ct_CC" >&5 + echo "$as_me:1478: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1444: result: no" >&5 + echo "$as_me:1481: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1453,32 +1490,32 @@ fi fi -test -z "$CC" && { { echo "$as_me:1456: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1493: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1461:" \ +echo "$as_me:1498:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo "$2"` -{ (eval echo "$as_me:1464: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1501: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1467: \$? = $ac_status" >&5 + echo "$as_me:1504: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:1469: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1506: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1472: \$? = $ac_status" >&5 + echo "$as_me:1509: \$? = $ac_status" >&5 (exit "$ac_status"); } -{ (eval echo "$as_me:1474: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1511: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1477: \$? = $ac_status" >&5 + echo "$as_me:1514: \$? = $ac_status" >&5 (exit "$ac_status"); } cat >"conftest.$ac_ext" <<_ACEOF -#line 1481 "configure" +#line 1518 "configure" #include "confdefs.h" int @@ -1494,13 +1531,13 @@ ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1497: checking for C compiler default output" >&5 +echo "$as_me:1534: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'` -if { (eval echo "$as_me:1500: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1537: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1503: \$? = $ac_status" >&5 + echo "$as_me:1540: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1523,34 +1560,34 @@ done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -{ { echo "$as_me:1526: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1563: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1532: result: $ac_file" >&5 +echo "$as_me:1569: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1537: checking whether the C compiler works" >&5 +echo "$as_me:1574: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1543: \"$ac_try\"") >&5 + { (eval echo "$as_me:1580: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1546: \$? = $ac_status" >&5 + echo "$as_me:1583: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1553: error: cannot run C compiled programs. + { { echo "$as_me:1590: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1558,24 +1595,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1561: result: yes" >&5 +echo "$as_me:1598: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe "conftest$ac_cv_exeext" ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1568: checking whether we are cross compiling" >&5 +echo "$as_me:1605: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1570: result: $cross_compiling" >&5 +echo "$as_me:1607: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1573: checking for executable suffix" >&5 +echo "$as_me:1610: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1575: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1612: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1578: \$? = $ac_status" >&5 + echo "$as_me:1615: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1591,25 +1628,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1594: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1631: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest$ac_cv_exeext" -echo "$as_me:1600: result: $ac_cv_exeext" >&5 +echo "$as_me:1637: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f "conftest.$ac_ext" EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1606: checking for object suffix" >&5 +echo "$as_me:1643: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 1612 "configure" +#line 1649 "configure" #include "confdefs.h" int @@ -1621,10 +1658,10 @@ main (void) } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1661: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1627: \$? = $ac_status" >&5 + echo "$as_me:1664: \$? = $ac_status" >&5 (exit "$ac_status"); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1636,24 +1673,24 @@ done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -{ { echo "$as_me:1639: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1676: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext" fi -echo "$as_me:1646: result: $ac_cv_objext" >&5 +echo "$as_me:1683: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1650: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1687: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 1656 "configure" +#line 1693 "configure" #include "confdefs.h" int @@ -1668,16 +1705,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1671: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1708: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1674: \$? = $ac_status" >&5 + echo "$as_me:1711: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1677: \"$ac_try\"") >&5 + { (eval echo "$as_me:1714: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1680: \$? = $ac_status" >&5 + echo "$as_me:1717: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_compiler_gnu=yes else @@ -1689,19 +1726,19 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1692: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1729: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1698: checking whether $CC accepts -g" >&5 +echo "$as_me:1735: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 1704 "configure" +#line 1741 "configure" #include "confdefs.h" int @@ -1713,16 +1750,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1716: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1753: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1719: \$? = $ac_status" >&5 + echo "$as_me:1756: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1722: \"$ac_try\"") >&5 + { (eval echo "$as_me:1759: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1725: \$? = $ac_status" >&5 + echo "$as_me:1762: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_g=yes else @@ -1732,7 +1769,7 @@ ac_cv_prog_cc_g=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:1735: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1772: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1759,16 +1796,16 @@ cat >"conftest.$ac_ext" <<_ACEOF #endif _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1799: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1765: \$? = $ac_status" >&5 + echo "$as_me:1802: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1768: \"$ac_try\"") >&5 + { (eval echo "$as_me:1805: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1771: \$? = $ac_status" >&5 + echo "$as_me:1808: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then for ac_declaration in \ ''\ @@ -1780,7 +1817,7 @@ if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5 'void exit (int);' do cat >"conftest.$ac_ext" <<_ACEOF -#line 1783 "configure" +#line 1820 "configure" #include "confdefs.h" #include $ac_declaration @@ -1793,16 +1830,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1833: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1799: \$? = $ac_status" >&5 + echo "$as_me:1836: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1802: \"$ac_try\"") >&5 + { (eval echo "$as_me:1839: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1805: \$? = $ac_status" >&5 + echo "$as_me:1842: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -1812,7 +1849,7 @@ continue fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF -#line 1815 "configure" +#line 1852 "configure" #include "confdefs.h" $ac_declaration int @@ -1824,16 +1861,16 @@ exit (42); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1827: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1830: \$? = $ac_status" >&5 + echo "$as_me:1867: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1833: \"$ac_try\"") >&5 + { (eval echo "$as_me:1870: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1836: \$? = $ac_status" >&5 + echo "$as_me:1873: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else @@ -1863,11 +1900,11 @@ ac_main_return="return" GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:1866: checking version of $CC" >&5 + echo "$as_me:1903: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" + GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:1870: result: $GCC_VERSION" >&5 + echo "$as_me:1907: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi @@ -1876,12 +1913,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case "$host_os" in (linux*|gnu*) - echo "$as_me:1879: checking if this is really Intel C compiler" >&5 + echo "$as_me:1916: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >"conftest.$ac_ext" <<_ACEOF -#line 1884 "configure" +#line 1921 "configure" #include "confdefs.h" int @@ -1890,7 +1927,7 @@ main (void) #ifdef __INTEL_COMPILER #else -make an error +#error __INTEL_COMPILER is not defined #endif ; @@ -1898,16 +1935,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1938: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1904: \$? = $ac_status" >&5 + echo "$as_me:1941: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1907: \"$ac_try\"") >&5 + { (eval echo "$as_me:1944: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1910: \$? = $ac_status" >&5 + echo "$as_me:1947: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -1918,7 +1955,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" - echo "$as_me:1921: result: $INTEL_COMPILER" >&5 + echo "$as_me:1958: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac @@ -1927,11 +1964,11 @@ fi CLANG_COMPILER=no if test "$GCC" = yes ; then - echo "$as_me:1930: checking if this is really Clang C compiler" >&5 + echo "$as_me:1967: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" cat >"conftest.$ac_ext" <<_ACEOF -#line 1934 "configure" +#line 1971 "configure" #include "confdefs.h" int @@ -1940,7 +1977,7 @@ main (void) #ifdef __clang__ #else -make an error +#error __clang__ is not defined #endif ; @@ -1948,16 +1985,16 @@ make an error } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1954: \$? = $ac_status" >&5 + echo "$as_me:1991: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:1957: \"$ac_try\"") >&5 + { (eval echo "$as_me:1994: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1960: \$? = $ac_status" >&5 + echo "$as_me:1997: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then CLANG_COMPILER=yes @@ -1967,7 +2004,7 @@ cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" - echo "$as_me:1970: result: $CLANG_COMPILER" >&5 + echo "$as_me:2007: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi @@ -1976,30 +2013,30 @@ CLANG_VERSION=none if test "x$CLANG_COMPILER" = "xyes" ; then case "$CC" in (c[1-9][0-9]|*/c[1-9][0-9]) - { echo "$as_me:1979: WARNING: replacing broken compiler alias $CC" >&5 + { echo "$as_me:2016: WARNING: replacing broken compiler alias $CC" >&5 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;} CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`" CC=clang ;; esac - echo "$as_me:1986: checking version of $CC" >&5 + echo "$as_me:2023: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$CLANG_VERSION" && CLANG_VERSION=unknown - echo "$as_me:1990: result: $CLANG_VERSION" >&5 + echo "$as_me:2027: result: $CLANG_VERSION" >&5 echo "${ECHO_T}$CLANG_VERSION" >&6 for cf_clang_opt in \ -Qunused-arguments \ -Wno-error=implicit-function-declaration do - echo "$as_me:1997: checking if option $cf_clang_opt works" >&5 + echo "$as_me:2034: checking if option $cf_clang_opt works" >&5 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $cf_clang_opt" cat >"conftest.$ac_ext" <<_ACEOF -#line 2002 "configure" +#line 2039 "configure" #include "confdefs.h" #include @@ -2013,16 +2050,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:2016: \"$ac_link\"") >&5 +if { (eval echo "$as_me:2053: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2019: \$? = $ac_status" >&5 + echo "$as_me:2056: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:2022: \"$ac_try\"") >&5 + { (eval echo "$as_me:2059: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2025: \$? = $ac_status" >&5 + echo "$as_me:2062: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_clang_optok=yes @@ -2033,13 +2070,13 @@ cat "conftest.$ac_ext" >&5 cf_clang_optok=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:2036: result: $cf_clang_optok" >&5 + echo "$as_me:2073: result: $cf_clang_optok" >&5 echo "${ECHO_T}$cf_clang_optok" >&6 CFLAGS="$cf_save_CFLAGS" if test "$cf_clang_optok" = yes; then test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6 -echo "${as_me:-configure}:2042: testing adding option $cf_clang_opt ..." 1>&5 +echo "${as_me:-configure}:2079: testing adding option $cf_clang_opt ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_clang_opt" @@ -2048,7 +2085,7 @@ echo "${as_me:-configure}:2042: testing adding option $cf_clang_opt ..." 1>&5 done fi -echo "$as_me:2051: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2056,7 +2093,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >"conftest.$ac_ext" <<_ACEOF -#line 2059 "configure" +#line 2096 "configure" #include "confdefs.h" #include #include @@ -2065,9 +2102,7 @@ cat >"conftest.$ac_ext" <<_ACEOF /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2105,16 +2140,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO do CC="$ac_save_CC $ac_arg" rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2108: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2143: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2111: \$? = $ac_status" >&5 + echo "$as_me:2146: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2114: \"$ac_try\"") >&5 + { (eval echo "$as_me:2149: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2117: \$? = $ac_status" >&5 + echo "$as_me:2152: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -2131,10 +2166,10 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:2134: result: none needed" >&5 + echo "$as_me:2169: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:2137: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:2172: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac @@ -2142,13 +2177,13 @@ esac # This should have been defined by AC_PROG_CC : "${CC:=cc}" -echo "$as_me:2145: checking \$CFLAGS variable" >&5 +echo "$as_me:2180: checking \$CFLAGS variable" >&5 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6 case "x$CFLAGS" in (*-[IUD]*) - echo "$as_me:2149: result: broken" >&5 + echo "$as_me:2184: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:2151: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 + { echo "$as_me:2186: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;} cf_flags="$CFLAGS" CFLAGS= @@ -2256,22 +2291,22 @@ fi done ;; (*) - echo "$as_me:2259: result: ok" >&5 + echo "$as_me:2294: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2264: checking \$CC variable" >&5 +echo "$as_me:2299: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in (*[\ \ ]-*) - echo "$as_me:2268: result: broken" >&5 + echo "$as_me:2303: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:2270: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 + { echo "$as_me:2305: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'` + cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do @@ -2384,24 +2419,24 @@ fi done test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 -echo "${as_me:-configure}:2387: testing resulting CC: '$CC' ..." 1>&5 +echo "${as_me:-configure}:2422: testing resulting CC: '$CC' ..." 1>&5 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 -echo "${as_me:-configure}:2391: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 +echo "${as_me:-configure}:2426: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 -echo "${as_me:-configure}:2395: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 +echo "${as_me:-configure}:2430: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 ;; (*) - echo "$as_me:2399: result: ok" >&5 + echo "$as_me:2434: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2404: checking for inline" >&5 +echo "$as_me:2439: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2409,25 +2444,25 @@ else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >"conftest.$ac_ext" <<_ACEOF -#line 2412 "configure" +#line 2447 "configure" #include "confdefs.h" #ifndef __cplusplus -static $ac_kw int static_foo () {return 0; } -$ac_kw int foo () {return 0; } +static $ac_kw int static_foo (void) {return 0; } +$ac_kw int foo (void) {return 0; } #endif _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:2421: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2456: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2424: \$? = $ac_status" >&5 + echo "$as_me:2459: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:2427: \"$ac_try\"") >&5 + { (eval echo "$as_me:2462: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2430: \$? = $ac_status" >&5 + echo "$as_me:2465: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_c_inline=$ac_kw; break else @@ -2438,7 +2473,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:2441: result: $ac_cv_c_inline" >&5 +echo "$as_me:2476: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; @@ -2457,7 +2492,7 @@ for ac_prog in ggrep grep do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2460: checking for $ac_word" >&5 +echo "$as_me:2495: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2472,7 +2507,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_GREP="$ac_prog" -echo "$as_me:2475: found $ac_dir/$ac_word" >&5 +echo "$as_me:2510: found $ac_dir/$ac_word" >&5 break done @@ -2480,10 +2515,10 @@ fi fi GREP=$ac_cv_prog_GREP if test -n "$GREP"; then - echo "$as_me:2483: result: $GREP" >&5 + echo "$as_me:2518: result: $GREP" >&5 echo "${ECHO_T}$GREP" >&6 else - echo "$as_me:2486: result: no" >&5 + echo "$as_me:2521: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2491,7 +2526,7 @@ fi done test -n "$GREP" || GREP=": " -echo "$as_me:2494: checking for egrep" >&5 +echo "$as_me:2529: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2503,7 +2538,7 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2506: checking for $ac_word" >&5 +echo "$as_me:2541: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2520,7 +2555,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_EGREP="$ac_dir/$ac_word" - echo "$as_me:2523: found $ac_dir/$ac_word" >&5 + echo "$as_me:2558: found $ac_dir/$ac_word" >&5 break fi done @@ -2531,10 +2566,10 @@ fi EGREP=$ac_cv_path_EGREP if test -n "$EGREP"; then - echo "$as_me:2534: result: $EGREP" >&5 + echo "$as_me:2569: result: $EGREP" >&5 echo "${ECHO_T}$EGREP" >&6 else - echo "$as_me:2537: result: no" >&5 + echo "$as_me:2572: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2542,12 +2577,12 @@ fi done test -n "$EGREP" || EGREP=": " - test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2545: error: cannot find workable egrep" >&5 + test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2580: error: cannot find workable egrep" >&5 echo "$as_me: error: cannot find workable egrep" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:2550: result: $ac_cv_path_EGREP" >&5 +echo "$as_me:2585: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6 EGREP="$ac_cv_path_EGREP" @@ -2557,7 +2592,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" -echo "$as_me:2560: checking how to run the C preprocessor" >&5 +echo "$as_me:2595: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -2578,18 +2613,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >"conftest.$ac_ext" <<_ACEOF -#line 2581 "configure" +#line 2616 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2586: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2621: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2592: \$? = $ac_status" >&5 + echo "$as_me:2627: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2612,17 +2647,17 @@ rm -f conftest.err "conftest.$ac_ext" # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >"conftest.$ac_ext" <<_ACEOF -#line 2615 "configure" +#line 2650 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2654: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2625: \$? = $ac_status" >&5 + echo "$as_me:2660: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2659,7 +2694,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2662: result: $CPP" >&5 +echo "$as_me:2697: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2669,18 +2704,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >"conftest.$ac_ext" <<_ACEOF -#line 2672 "configure" +#line 2707 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2677: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2712: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2683: \$? = $ac_status" >&5 + echo "$as_me:2718: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2703,17 +2738,17 @@ rm -f conftest.err "conftest.$ac_ext" # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >"conftest.$ac_ext" <<_ACEOF -#line 2706 "configure" +#line 2741 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2710: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:2745: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2716: \$? = $ac_status" >&5 + echo "$as_me:2751: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2741,7 +2776,7 @@ rm -f conftest.err "conftest.$ac_ext" if $ac_preproc_ok; then : else - { { echo "$as_me:2744: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:2779: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2757,7 +2792,7 @@ for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2760: checking for $ac_word" >&5 +echo "$as_me:2795: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2772,7 +2807,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:2775: found $ac_dir/$ac_word" >&5 +echo "$as_me:2810: found $ac_dir/$ac_word" >&5 break done @@ -2780,10 +2815,10 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:2783: result: $AWK" >&5 + echo "$as_me:2818: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2786: result: no" >&5 + echo "$as_me:2821: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2802,7 +2837,7 @@ done # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2805: checking for a BSD compatible install" >&5 +echo "$as_me:2840: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2851,7 +2886,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2854: result: $INSTALL" >&5 +echo "$as_me:2889: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2872,7 +2907,7 @@ case $INSTALL in ;; esac -echo "$as_me:2875: checking if you want to install stripped executables" >&5 +echo "$as_me:2910: checking if you want to install stripped executables" >&5 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6 # Check whether --enable-stripping or --disable-stripping was given. @@ -2889,7 +2924,7 @@ else enable_stripping=yes fi; -echo "$as_me:2892: result: $enable_stripping" >&5 +echo "$as_me:2927: result: $enable_stripping" >&5 echo "${ECHO_T}$enable_stripping" >&6 if test "$enable_stripping" = yes @@ -2900,7 +2935,7 @@ else fi : "${INSTALL:=install}" -echo "$as_me:2903: checking if install accepts -p option" >&5 +echo "$as_me:2938: checking if install accepts -p option" >&5 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6 if test "${cf_cv_install_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2931,10 +2966,10 @@ else rm -rf ./conftest* fi -echo "$as_me:2934: result: $cf_cv_install_p" >&5 +echo "$as_me:2969: result: $cf_cv_install_p" >&5 echo "${ECHO_T}$cf_cv_install_p" >&6 -echo "$as_me:2937: checking if install needs to be told about ownership" >&5 +echo "$as_me:2972: checking if install needs to be told about ownership" >&5 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6 case `$ac_config_guess` in (*minix) @@ -2945,7 +2980,7 @@ case `$ac_config_guess` in ;; esac -echo "$as_me:2948: result: $with_install_o" >&5 +echo "$as_me:2983: result: $with_install_o" >&5 echo "${ECHO_T}$with_install_o" >&6 if test "x$with_install_o" = xyes then @@ -2954,11 +2989,77 @@ else INSTALL_OPT_O= fi +if test -n "$INSTALL_OPT_S" +then + echo "$as_me:2994: checking if you want to specify strip-program" >&5 +echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6 + +# Check whether --with-strip-program or --without-strip-program was given. +if test "${with_strip_program+set}" = set; then + withval="$with_strip_program" + with_strip_program=$withval +else + with_strip_program=no +fi; + echo "$as_me:3004: result: $with_strip_program" >&5 +echo "${ECHO_T}$with_strip_program" >&6 + if test "$with_strip_program" != no + then + echo "$as_me:3008: checking if strip-program is supported with this installer" >&5 +echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6 + cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'` + check_install_strip=no + if test -f "$cf_install_program" + then + check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils` + if test -n "$check_install_version" + then + check_install_strip="option" + else + for check_strip_variable in STRIPBIN STRIP + do + if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null + then + check_install_strip="environ" + break + fi + done + fi + fi + echo "$as_me:3029: result: $check_install_strip" >&5 +echo "${ECHO_T}$check_install_strip" >&6 + case "$check_install_strip" in + (no) + { echo "$as_me:3033: WARNING: $cf_install_program does not support strip program option" >&5 +echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;} + with_strip_program=no + ;; + (environ) + cat >install.tmp <<-CF_EOF + #! $SHELL + STRIPBIN="$with_strip_program" \\ + STRIP="$with_strip_program" \\ + $INSTALL "$@" + CF_EOF + INSTALL="`pwd`/install.tmp" + chmod +x "$INSTALL" + test -n "$verbose" && echo " created $INSTALL" 1>&6 + +echo "${as_me:-configure}:3048: testing created $INSTALL ..." 1>&5 + + ;; + (option) + INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\"" + ;; + esac + fi +fi + for ac_prog in lint cppcheck splint do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2961: checking for $ac_word" >&5 +echo "$as_me:3062: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LINT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2973,7 +3074,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LINT="$ac_prog" -echo "$as_me:2976: found $ac_dir/$ac_word" >&5 +echo "$as_me:3077: found $ac_dir/$ac_word" >&5 break done @@ -2981,10 +3082,10 @@ fi fi LINT=$ac_cv_prog_LINT if test -n "$LINT"; then - echo "$as_me:2984: result: $LINT" >&5 + echo "$as_me:3085: result: $LINT" >&5 echo "${ECHO_T}$LINT" >&6 else - echo "$as_me:2987: result: no" >&5 + echo "$as_me:3088: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2997,7 +3098,7 @@ case "x$LINT" in ;; esac -echo "$as_me:3000: checking for \".PHONY\" make-support" >&5 +echo "$as_me:3101: checking for \".PHONY\" make-support" >&5 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6 if test "${cf_cv_make_PHONY+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3052,14 +3153,14 @@ CF_EOF rm -rf conftest* fi -echo "$as_me:3055: result: $cf_cv_make_PHONY" >&5 +echo "$as_me:3156: result: $cf_cv_make_PHONY" >&5 echo "${ECHO_T}$cf_cv_make_PHONY" >&6 MAKE_NO_PHONY="#" MAKE_PHONY="#" test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY= test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY= -echo "$as_me:3062: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:3163: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3086,7 +3187,7 @@ else fi fi -echo "$as_me:3089: result: $cf_cv_mixedcase" >&5 +echo "$as_me:3190: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -3097,7 +3198,7 @@ for ac_prog in exctags ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:3100: checking for $ac_word" >&5 +echo "$as_me:3201: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CTAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3112,7 +3213,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CTAGS="$ac_prog" -echo "$as_me:3115: found $ac_dir/$ac_word" >&5 +echo "$as_me:3216: found $ac_dir/$ac_word" >&5 break done @@ -3120,10 +3221,10 @@ fi fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then - echo "$as_me:3123: result: $CTAGS" >&5 + echo "$as_me:3224: result: $CTAGS" >&5 echo "${ECHO_T}$CTAGS" >&6 else - echo "$as_me:3126: result: no" >&5 + echo "$as_me:3227: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3134,7 +3235,7 @@ for ac_prog in exetags etags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:3137: checking for $ac_word" >&5 +echo "$as_me:3238: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ETAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3149,7 +3250,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ETAGS="$ac_prog" -echo "$as_me:3152: found $ac_dir/$ac_word" >&5 +echo "$as_me:3253: found $ac_dir/$ac_word" >&5 break done @@ -3157,10 +3258,10 @@ fi fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then - echo "$as_me:3160: result: $ETAGS" >&5 + echo "$as_me:3261: result: $ETAGS" >&5 echo "${ECHO_T}$ETAGS" >&6 else - echo "$as_me:3163: result: no" >&5 + echo "$as_me:3264: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3169,7 +3270,7 @@ done # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args. set dummy ${CTAGS:-ctags}; ac_word=$2 -echo "$as_me:3172: checking for $ac_word" >&5 +echo "$as_me:3273: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3184,7 +3285,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_LOWER_TAGS="yes" -echo "$as_me:3187: found $ac_dir/$ac_word" >&5 +echo "$as_me:3288: found $ac_dir/$ac_word" >&5 break done @@ -3193,17 +3294,17 @@ fi fi MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS if test -n "$MAKE_LOWER_TAGS"; then - echo "$as_me:3196: result: $MAKE_LOWER_TAGS" >&5 + echo "$as_me:3297: result: $MAKE_LOWER_TAGS" >&5 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 else - echo "$as_me:3199: result: no" >&5 + echo "$as_me:3300: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$cf_cv_mixedcase" = yes ; then # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args. set dummy ${ETAGS:-etags}; ac_word=$2 -echo "$as_me:3206: checking for $ac_word" >&5 +echo "$as_me:3307: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3218,7 +3319,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_UPPER_TAGS="yes" -echo "$as_me:3221: found $ac_dir/$ac_word" >&5 +echo "$as_me:3322: found $ac_dir/$ac_word" >&5 break done @@ -3227,10 +3328,10 @@ fi fi MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS if test -n "$MAKE_UPPER_TAGS"; then - echo "$as_me:3230: result: $MAKE_UPPER_TAGS" >&5 + echo "$as_me:3331: result: $MAKE_UPPER_TAGS" >&5 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 else - echo "$as_me:3233: result: no" >&5 + echo "$as_me:3334: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3250,19 +3351,19 @@ else MAKE_LOWER_TAGS="#" fi -echo "$as_me:3253: checking if -lm needed for math functions" >&5 +echo "$as_me:3354: checking if -lm needed for math functions" >&5 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6 if test "${cf_cv_need_libm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3260 "configure" +#line 3361 "configure" #include "confdefs.h" - #include - #include - #include + #include + #include + #include int main (void) @@ -3273,16 +3374,16 @@ double x = rand(); printf("result = %g\\n", pow(sin(x),x)) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:3276: \"$ac_link\"") >&5 +if { (eval echo "$as_me:3377: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3279: \$? = $ac_status" >&5 + echo "$as_me:3380: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:3282: \"$ac_try\"") >&5 + { (eval echo "$as_me:3383: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3285: \$? = $ac_status" >&5 + echo "$as_me:3386: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_need_libm=no else @@ -3292,11 +3393,75 @@ cf_cv_need_libm=yes fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:3295: result: $cf_cv_need_libm" >&5 +echo "$as_me:3396: result: $cf_cv_need_libm" >&5 echo "${ECHO_T}$cf_cv_need_libm" >&6 + if test "$cf_cv_need_libm" = yes then -MATH_LIB=-lm + + cf_save_LIBS="$LIBS" + LIBS="$LIBS -lm" + echo "$as_me:3404: checking if -lm is available for math functions" >&5 +echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6 +if test "${cf_cv_have_libm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >"conftest.$ac_ext" <<_ACEOF +#line 3411 "configure" +#include "confdefs.h" + + #include + #include + #include + +int +main (void) +{ +double x = rand(); printf("result = %g\\n", pow(sin(x),x)) + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:3427: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3430: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:3433: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3436: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_have_libm=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_have_libm=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +fi +echo "$as_me:3446: result: $cf_cv_have_libm" >&5 +echo "${ECHO_T}$cf_cv_have_libm" >&6 + LIBS="$cf_save_LIBS" + + if test "$cf_cv_have_libm" = yes + then + MATH_LIB=-lm + fi +else + cf_cv_have_libm=yes +fi + +if test "$cf_cv_have_libm" = yes +then + +cat >>confdefs.h <<\EOF +#define HAVE_MATH_FUNCS 1 +EOF + fi top_builddir=`pwd` @@ -3333,7 +3498,7 @@ includesubdir="" cf_cv_screen=curses cf_cv_libtype= -echo "$as_me:3336: checking for fgrep" >&5 +echo "$as_me:3501: checking for fgrep" >&5 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3345,7 +3510,7 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:3348: checking for $ac_word" >&5 +echo "$as_me:3513: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3362,7 +3527,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FGREP="$ac_dir/$ac_word" - echo "$as_me:3365: found $ac_dir/$ac_word" >&5 + echo "$as_me:3530: found $ac_dir/$ac_word" >&5 break fi done @@ -3373,10 +3538,10 @@ fi FGREP=$ac_cv_path_FGREP if test -n "$FGREP"; then - echo "$as_me:3376: result: $FGREP" >&5 + echo "$as_me:3541: result: $FGREP" >&5 echo "${ECHO_T}$FGREP" >&6 else - echo "$as_me:3379: result: no" >&5 + echo "$as_me:3544: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3384,16 +3549,16 @@ fi done test -n "$FGREP" || FGREP=": " - test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3387: error: cannot find workable fgrep" >&5 + test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3552: error: cannot find workable fgrep" >&5 echo "$as_me: error: cannot find workable fgrep" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:3392: result: $ac_cv_path_FGREP" >&5 +echo "$as_me:3557: result: $ac_cv_path_FGREP" >&5 echo "${ECHO_T}$ac_cv_path_FGREP" >&6 FGREP="$ac_cv_path_FGREP" -echo "$as_me:3396: checking if you want to use C11 _Noreturn feature" >&5 +echo "$as_me:3561: checking if you want to use C11 _Noreturn feature" >&5 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given. @@ -3410,21 +3575,20 @@ else enable_stdnoreturn=no fi; -echo "$as_me:3413: result: $enable_stdnoreturn" >&5 +echo "$as_me:3578: result: $enable_stdnoreturn" >&5 echo "${ECHO_T}$enable_stdnoreturn" >&6 if test $enable_stdnoreturn = yes; then -echo "$as_me:3417: checking for C11 _Noreturn feature" >&5 +echo "$as_me:3582: checking for C11 _Noreturn feature" >&5 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6 if test "${cf_cv_c11_noreturn+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3423 "configure" +#line 3588 "configure" #include "confdefs.h" -#include -#include +$ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } @@ -3437,16 +3601,16 @@ if (feof(stdin)) giveup() } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3440: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:3604: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3443: \$? = $ac_status" >&5 + echo "$as_me:3607: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3446: \"$ac_try\"") >&5 + { (eval echo "$as_me:3610: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3449: \$? = $ac_status" >&5 + echo "$as_me:3613: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_c11_noreturn=yes else @@ -3457,7 +3621,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:3460: result: $cf_cv_c11_noreturn" >&5 +echo "$as_me:3624: result: $cf_cv_c11_noreturn" >&5 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6 else cf_cv_c11_noreturn=no, @@ -3496,10 +3660,11 @@ cat > conftest.i <&5 + { echo "$as_me:3663: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -3548,12 +3713,12 @@ EOF ;; esac - if { (eval echo "$as_me:3551: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:3716: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3554: \$? = $ac_status" >&5 + echo "$as_me:3719: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:3556: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:3721: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case "$cf_attribute" in @@ -3612,7 +3777,7 @@ fi rm -rf ./conftest* fi -echo "$as_me:3615: checking if you want to work around bogus compiler/loader warnings" >&5 +echo "$as_me:3780: checking if you want to work around bogus compiler/loader warnings" >&5 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6 # Check whether --enable-string-hacks or --disable-string-hacks was given. @@ -3622,7 +3787,7 @@ if test "${enable_string_hacks+set}" = set; then else enable_string_hacks=no fi; -echo "$as_me:3625: result: $enable_string_hacks" >&5 +echo "$as_me:3790: result: $enable_string_hacks" >&5 echo "${ECHO_T}$enable_string_hacks" >&6 if test "x$enable_string_hacks" = "xyes"; then @@ -3631,15 +3796,15 @@ cat >>confdefs.h <<\EOF #define USE_STRING_HACKS 1 EOF - { echo "$as_me:3634: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5 + { echo "$as_me:3799: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;} - echo "$as_me:3636: checking for strlcat" >&5 + echo "$as_me:3801: checking for strlcat" >&5 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6 if test "${ac_cv_func_strlcat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3642 "configure" +#line 3807 "configure" #include "confdefs.h" #define strlcat autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -3670,16 +3835,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:3673: \"$ac_link\"") >&5 +if { (eval echo "$as_me:3838: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3676: \$? = $ac_status" >&5 + echo "$as_me:3841: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:3679: \"$ac_try\"") >&5 + { (eval echo "$as_me:3844: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3682: \$? = $ac_status" >&5 + echo "$as_me:3847: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_strlcat=yes else @@ -3689,7 +3854,7 @@ ac_cv_func_strlcat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:3692: result: $ac_cv_func_strlcat" >&5 +echo "$as_me:3857: result: $ac_cv_func_strlcat" >&5 echo "${ECHO_T}$ac_cv_func_strlcat" >&6 if test "$ac_cv_func_strlcat" = yes; then @@ -3699,7 +3864,7 @@ EOF else - echo "$as_me:3702: checking for strlcat in -lbsd" >&5 + echo "$as_me:3867: checking for strlcat in -lbsd" >&5 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3707,7 +3872,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 3710 "configure" +#line 3875 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3716,7 +3881,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char strlcat (); +char strlcat (void); int main (void) { @@ -3726,16 +3891,16 @@ strlcat (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:3729: \"$ac_link\"") >&5 +if { (eval echo "$as_me:3894: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3732: \$? = $ac_status" >&5 + echo "$as_me:3897: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:3735: \"$ac_try\"") >&5 + { (eval echo "$as_me:3900: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3738: \$? = $ac_status" >&5 + echo "$as_me:3903: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_bsd_strlcat=yes else @@ -3746,7 +3911,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3749: result: $ac_cv_lib_bsd_strlcat" >&5 +echo "$as_me:3914: result: $ac_cv_lib_bsd_strlcat" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6 if test "$ac_cv_lib_bsd_strlcat" = yes; then @@ -3769,23 +3934,23 @@ LIBS="$cf_add_libs" for ac_header in bsd/string.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:3772: checking for $ac_header" >&5 +echo "$as_me:3937: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3778 "configure" +#line 3943 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:3782: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:3947: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3788: \$? = $ac_status" >&5 + echo "$as_me:3953: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3804,7 +3969,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:3807: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:3972: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:3993: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3834 "configure" +#line 3999 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -3862,16 +4027,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:3865: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4030: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3868: \$? = $ac_status" >&5 + echo "$as_me:4033: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:3871: \"$ac_try\"") >&5 + { (eval echo "$as_me:4036: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3874: \$? = $ac_status" >&5 + echo "$as_me:4039: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -3881,7 +4046,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:3884: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:4049: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:4061: checking if the POSIX test-macros are already defined" >&5 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6 if test "${cf_cv_posix_visible+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3903 "configure" +#line 4068 "configure" #include "confdefs.h" #include int @@ -3919,16 +4084,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4087: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3925: \$? = $ac_status" >&5 + echo "$as_me:4090: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:3928: \"$ac_try\"") >&5 + { (eval echo "$as_me:4093: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3931: \$? = $ac_status" >&5 + echo "$as_me:4096: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_visible=no else @@ -3939,7 +4104,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:3942: result: $cf_cv_posix_visible" >&5 +echo "$as_me:4107: result: $cf_cv_posix_visible" >&5 echo "${ECHO_T}$cf_cv_posix_visible" >&6 if test "$cf_cv_posix_visible" = no; then @@ -3952,9 +4117,6 @@ case "$host_os" in (aix[4-7]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(msys) - cf_XOPEN_SOURCE=600 - ;; (darwin[0-8].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -3980,18 +4142,18 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) cf_gnu_xopen_source=$cf_XOPEN_SOURCE -echo "$as_me:3987: checking if this is the GNU C library" >&5 +echo "$as_me:4149: checking if this is the GNU C library" >&5 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6 if test "${cf_cv_gnu_library+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 3994 "configure" +#line 4156 "configure" #include "confdefs.h" #include int @@ -4010,16 +4172,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4013: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4175: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4016: \$? = $ac_status" >&5 + echo "$as_me:4178: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4019: \"$ac_try\"") >&5 + { (eval echo "$as_me:4181: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4022: \$? = $ac_status" >&5 + echo "$as_me:4184: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library=yes else @@ -4030,7 +4192,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:4033: result: $cf_cv_gnu_library" >&5 +echo "$as_me:4195: result: $cf_cv_gnu_library" >&5 echo "${ECHO_T}$cf_cv_gnu_library" >&6 if test x$cf_cv_gnu_library = xyes; then @@ -4038,7 +4200,7 @@ if test x$cf_cv_gnu_library = xyes; then # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE # was changed to help a little. newlib incorporated the change about 4 # years later. - echo "$as_me:4041: checking if _DEFAULT_SOURCE can be used as a basis" >&5 + echo "$as_me:4203: checking if _DEFAULT_SOURCE can be used as a basis" >&5 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6 if test "${cf_cv_gnu_library_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4050,7 +4212,7 @@ else CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 4053 "configure" +#line 4215 "configure" #include "confdefs.h" #include int @@ -4069,16 +4231,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4072: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4234: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4075: \$? = $ac_status" >&5 + echo "$as_me:4237: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4078: \"$ac_try\"") >&5 + { (eval echo "$as_me:4240: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4081: \$? = $ac_status" >&5 + echo "$as_me:4243: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library_219=yes else @@ -4090,12 +4252,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi -echo "$as_me:4093: result: $cf_cv_gnu_library_219" >&5 +echo "$as_me:4255: result: $cf_cv_gnu_library_219" >&5 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6 if test "x$cf_cv_gnu_library_219" = xyes; then cf_save="$CPPFLAGS" - echo "$as_me:4098: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 + echo "$as_me:4260: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4200,7 +4362,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >"conftest.$ac_ext" <<_ACEOF -#line 4203 "configure" +#line 4365 "configure" #include "confdefs.h" #include @@ -4220,16 +4382,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4223: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4385: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4226: \$? = $ac_status" >&5 + echo "$as_me:4388: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4229: \"$ac_try\"") >&5 + { (eval echo "$as_me:4391: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4232: \$? = $ac_status" >&5 + echo "$as_me:4394: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_dftsrc_219=yes else @@ -4240,7 +4402,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:4243: result: $cf_cv_gnu_dftsrc_219" >&5 +echo "$as_me:4405: result: $cf_cv_gnu_dftsrc_219" >&5 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" else @@ -4249,14 +4411,14 @@ echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then - echo "$as_me:4252: checking if we must define _GNU_SOURCE" >&5 + echo "$as_me:4414: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 4259 "configure" +#line 4421 "configure" #include "confdefs.h" #include int @@ -4271,16 +4433,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4436: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4277: \$? = $ac_status" >&5 + echo "$as_me:4439: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4280: \"$ac_try\"") >&5 + { (eval echo "$as_me:4442: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4283: \$? = $ac_status" >&5 + echo "$as_me:4445: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else @@ -4387,7 +4549,7 @@ if test -n "$cf_new_extra_cppflags" ; then fi cat >"conftest.$ac_ext" <<_ACEOF -#line 4390 "configure" +#line 4552 "configure" #include "confdefs.h" #include int @@ -4402,16 +4564,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4405: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4567: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4408: \$? = $ac_status" >&5 + echo "$as_me:4570: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4411: \"$ac_try\"") >&5 + { (eval echo "$as_me:4573: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4414: \$? = $ac_status" >&5 + echo "$as_me:4576: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else @@ -4426,12 +4588,12 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:4429: result: $cf_cv_gnu_source" >&5 +echo "$as_me:4591: result: $cf_cv_gnu_source" >&5 echo "${ECHO_T}$cf_cv_gnu_source" >&6 if test "$cf_cv_gnu_source" = yes then - echo "$as_me:4434: checking if we should also define _DEFAULT_SOURCE" >&5 + echo "$as_me:4596: checking if we should also define _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_default_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4441,7 +4603,7 @@ else CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 4444 "configure" +#line 4606 "configure" #include "confdefs.h" #include int @@ -4456,16 +4618,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4621: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4462: \$? = $ac_status" >&5 + echo "$as_me:4624: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4465: \"$ac_try\"") >&5 + { (eval echo "$as_me:4627: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4468: \$? = $ac_status" >&5 + echo "$as_me:4630: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_default_source=no else @@ -4476,7 +4638,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:4479: result: $cf_cv_default_source" >&5 +echo "$as_me:4641: result: $cf_cv_default_source" >&5 echo "${ECHO_T}$cf_cv_default_source" >&6 if test "$cf_cv_default_source" = yes then @@ -4513,16 +4675,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:4516: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:4678: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:4522: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:4684: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 4525 "configure" +#line 4687 "configure" #include "confdefs.h" #include int @@ -4530,23 +4692,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4702: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4543: \$? = $ac_status" >&5 + echo "$as_me:4705: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4546: \"$ac_try\"") >&5 + { (eval echo "$as_me:4708: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4549: \$? = $ac_status" >&5 + echo "$as_me:4711: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else @@ -4567,7 +4729,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 4570 "configure" +#line 4732 "configure" #include "confdefs.h" #include int @@ -4575,23 +4737,23 @@ main (void) { #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4585: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4747: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4588: \$? = $ac_status" >&5 + echo "$as_me:4750: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4591: \"$ac_try\"") >&5 + { (eval echo "$as_me:4753: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4594: \$? = $ac_status" >&5 + echo "$as_me:4756: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -4602,7 +4764,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "${as_me:-configure}:4605: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:4767: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" @@ -4610,10 +4772,10 @@ echo "${as_me:-configure}:4605: testing ifdef from value $cf_POSIX_C_SOURCE ..." test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" -echo "${as_me:-configure}:4613: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:4775: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 4616 "configure" +#line 4778 "configure" #include "confdefs.h" #include int @@ -4621,23 +4783,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4631: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4634: \$? = $ac_status" >&5 + echo "$as_me:4796: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4637: \"$ac_try\"") >&5 + { (eval echo "$as_me:4799: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4640: \$? = $ac_status" >&5 + echo "$as_me:4802: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -4653,7 +4815,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:4656: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:4818: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -4770,7 +4932,7 @@ fi # cf_cv_posix_visible # OpenBSD 6.x has broken locale support, both compile-time and runtime. # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html # Abusing the conformance level is a workaround. - { echo "$as_me:4773: WARNING: this system does not provide usable locale support" >&5 + { echo "$as_me:4935: WARNING: this system does not provide usable locale support" >&5 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;} cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=700 @@ -4802,42 +4964,41 @@ echo "$as_me: WARNING: this system does not provide usable locale support" >&2;} ;; (*) -echo "$as_me:4805: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:4967: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 4812 "configure" +#line 4974 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4992: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4834: \$? = $ac_status" >&5 + echo "$as_me:4995: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4837: \"$ac_try\"") >&5 + { (eval echo "$as_me:4998: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4840: \$? = $ac_status" >&5 + echo "$as_me:5001: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -4849,35 +5010,34 @@ cf_save="$CPPFLAGS" CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 4852 "configure" +#line 5013 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { -#ifdef _XOPEN_SOURCE -make an error +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:4871: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5031: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4874: \$? = $ac_status" >&5 + echo "$as_me:5034: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:4877: \"$ac_try\"") >&5 + { (eval echo "$as_me:5037: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4880: \$? = $ac_status" >&5 + echo "$as_me:5040: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -4886,13 +5046,13 @@ cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - CPPFLAGS="$cf_save" + CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:4895: result: $cf_cv_xopen_source" >&5 +echo "$as_me:5055: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -5035,6 +5195,8 @@ done fi + cf_save_xopen_cppflags="$CPPFLAGS" + if test "$cf_cv_posix_visible" = no; then cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE @@ -5050,16 +5212,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:5053: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:5215: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:5059: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:5221: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 5062 "configure" +#line 5224 "configure" #include "confdefs.h" #include int @@ -5067,23 +5229,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5077: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5239: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5080: \$? = $ac_status" >&5 + echo "$as_me:5242: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5083: \"$ac_try\"") >&5 + { (eval echo "$as_me:5245: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5086: \$? = $ac_status" >&5 + echo "$as_me:5248: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else @@ -5104,7 +5266,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 5107 "configure" +#line 5269 "configure" #include "confdefs.h" #include int @@ -5112,23 +5274,23 @@ main (void) { #ifdef _POSIX_SOURCE -make an error +#error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5122: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5284: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5125: \$? = $ac_status" >&5 + echo "$as_me:5287: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5128: \"$ac_try\"") >&5 + { (eval echo "$as_me:5290: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5131: \$? = $ac_status" >&5 + echo "$as_me:5293: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -5139,7 +5301,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "${as_me:-configure}:5142: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:5304: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" @@ -5147,10 +5309,10 @@ echo "${as_me:-configure}:5142: testing ifdef from value $cf_POSIX_C_SOURCE ..." test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" -echo "${as_me:-configure}:5150: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:5312: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 5153 "configure" +#line 5315 "configure" #include "confdefs.h" #include int @@ -5158,23 +5320,23 @@ main (void) { #ifndef _POSIX_C_SOURCE -make an error +#error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5168: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5330: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5171: \$? = $ac_status" >&5 + echo "$as_me:5333: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5174: \"$ac_try\"") >&5 + { (eval echo "$as_me:5336: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5177: \$? = $ac_status" >&5 + echo "$as_me:5339: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -5190,7 +5352,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:5193: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:5355: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -5299,6 +5461,53 @@ fi fi # cf_cv_posix_visible + # Some of these niche implementations use copy/paste, double-check... + if test "$cf_cv_xopen_source" = no ; then + test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6 + +echo "${as_me:-configure}:5468: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5 + + cat >"conftest.$ac_ext" <<_ACEOF +#line 5471 "configure" +#include "confdefs.h" + +$ac_includes_default + +int +main (void) +{ + +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined +#endif + + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:5489: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5492: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:5495: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5498: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 + + { echo "$as_me:5505: WARNING: _POSIX_C_SOURCE definition is not usable" >&5 +echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;} + CPPFLAGS="$cf_save_xopen_cppflags" +fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" + fi ;; esac @@ -5316,7 +5525,7 @@ do test "$CFLAGS" != "$cf_old_cflag" || break test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6 -echo "${as_me:-configure}:5319: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5 +echo "${as_me:-configure}:5528: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5 CFLAGS="$cf_old_cflag" done @@ -5328,7 +5537,7 @@ do test "$CPPFLAGS" != "$cf_old_cflag" || break test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6 -echo "${as_me:-configure}:5331: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5 +echo "${as_me:-configure}:5540: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5 CPPFLAGS="$cf_old_cflag" done @@ -5416,7 +5625,7 @@ done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 -echo "${as_me:-configure}:5419: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 +echo "${as_me:-configure}:5628: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" @@ -5426,7 +5635,7 @@ fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 -echo "${as_me:-configure}:5429: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 +echo "${as_me:-configure}:5638: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" @@ -5436,7 +5645,7 @@ fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 -echo "${as_me:-configure}:5439: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 +echo "${as_me:-configure}:5648: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" @@ -5448,10 +5657,10 @@ done fi if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then - echo "$as_me:5451: checking if _XOPEN_SOURCE really is set" >&5 + echo "$as_me:5660: checking if _XOPEN_SOURCE really is set" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 5454 "configure" +#line 5663 "configure" #include "confdefs.h" #include int @@ -5459,23 +5668,23 @@ main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5469: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5678: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5472: \$? = $ac_status" >&5 + echo "$as_me:5681: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5475: \"$ac_try\"") >&5 + { (eval echo "$as_me:5684: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5478: \$? = $ac_status" >&5 + echo "$as_me:5687: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set=yes else @@ -5484,12 +5693,12 @@ cat "conftest.$ac_ext" >&5 cf_XOPEN_SOURCE_set=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:5487: result: $cf_XOPEN_SOURCE_set" >&5 + echo "$as_me:5696: result: $cf_XOPEN_SOURCE_set" >&5 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6 if test "$cf_XOPEN_SOURCE_set" = yes then cat >"conftest.$ac_ext" <<_ACEOF -#line 5492 "configure" +#line 5701 "configure" #include "confdefs.h" #include int @@ -5497,23 +5706,23 @@ main (void) { #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE -make an error +#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5507: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5716: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5510: \$? = $ac_status" >&5 + echo "$as_me:5719: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5513: \"$ac_try\"") >&5 + { (eval echo "$as_me:5722: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5516: \$? = $ac_status" >&5 + echo "$as_me:5725: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set_ok=yes else @@ -5524,47 +5733,46 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_XOPEN_SOURCE_set_ok" = no then - { echo "$as_me:5527: WARNING: _XOPEN_SOURCE is lower than requested" >&5 + { echo "$as_me:5736: WARNING: _XOPEN_SOURCE is lower than requested" >&5 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;} fi else -echo "$as_me:5532: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:5741: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 5539 "configure" +#line 5748 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE -make an error +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5558: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5766: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5561: \$? = $ac_status" >&5 + echo "$as_me:5769: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5564: \"$ac_try\"") >&5 + { (eval echo "$as_me:5772: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5567: \$? = $ac_status" >&5 + echo "$as_me:5775: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -5576,35 +5784,34 @@ cf_save="$CPPFLAGS" CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF -#line 5579 "configure" +#line 5787 "configure" #include "confdefs.h" -#include -#include -#include +$ac_includes_default int main (void) { -#ifdef _XOPEN_SOURCE -make an error +#ifndef _XOPEN_SOURCE +#error _XOPEN_SOURCE is not defined #endif + ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5598: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5601: \$? = $ac_status" >&5 + echo "$as_me:5808: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5604: \"$ac_try\"") >&5 + { (eval echo "$as_me:5811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5607: \$? = $ac_status" >&5 + echo "$as_me:5814: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else @@ -5613,13 +5820,13 @@ cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - CPPFLAGS="$cf_save" + CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:5622: result: $cf_cv_xopen_source" >&5 +echo "$as_me:5829: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -5744,29 +5951,257 @@ if test -n "$cf_new_cflags" ; then fi -if test -n "$cf_new_cppflags" ; then - - test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " - CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" +if test -n "$cf_new_cppflags" ; then + + test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " + CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" + +fi + +if test -n "$cf_new_extra_cppflags" ; then + + test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " + EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" + +fi + +done + +fi + + fi +fi +fi # cf_cv_posix_visible + +echo "$as_me:5976: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 5982 "configure" +#include "confdefs.h" +#include +#include +#include +#include + +_ACEOF +if { (eval echo "$as_me:5990: \"$ac_cpp "conftest.$ac_ext"\"") >&5 + (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + $EGREP -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:5996: \$? = $ac_status" >&5 + (exit "$ac_status"); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat "conftest.$ac_ext" >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err "conftest.$ac_ext" + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >"conftest.$ac_ext" <<_ACEOF +#line 6018 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -rf conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >"conftest.$ac_ext" <<_ACEOF +#line 6036 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -rf conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 6057 "configure" +#include "confdefs.h" +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main (void) +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + $ac_main_return(2); + $ac_main_return (0); +} +_ACEOF +rm -f "conftest$ac_exeext" +if { (eval echo "$as_me:6083: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6086: \$? = $ac_status" >&5 + (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' + { (eval echo "$as_me:6088: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6091: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_header_stdc=no +fi +rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" +fi +fi +fi +echo "$as_me:6104: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF fi -if test -n "$cf_new_extra_cppflags" ; then - - test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " - EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:6120: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 6126 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:6132: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6135: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:6138: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6141: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +eval "$as_ac_Header=no" fi +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:6151: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 +if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_exit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 6167 "configure" +#include "confdefs.h" +$ac_includes_default +int +main (void) +{ +#ifndef exit + (void) exit; +#endif - fi + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" +if { (eval echo "$as_me:6182: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6185: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest.$ac_objext"' + { (eval echo "$as_me:6188: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6191: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_have_decl_exit=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_have_decl_exit=no fi -fi # cf_cv_posix_visible +rm -f "conftest.$ac_objext" "conftest.$ac_ext" +fi +echo "$as_me:6201: result: $ac_cv_have_decl_exit" >&5 +echo "${ECHO_T}$ac_cv_have_decl_exit" >&6 -echo "$as_me:5769: checking for signal global datatype" >&5 +echo "$as_me:6204: checking for signal global datatype" >&5 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 if test "${cf_cv_sig_atomic_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5778,7 +6213,7 @@ else "int" do cat >"conftest.$ac_ext" <<_ACEOF -#line 5781 "configure" +#line 6216 "configure" #include "confdefs.h" #include @@ -5802,16 +6237,16 @@ signal(SIGINT, handler); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6240: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5808: \$? = $ac_status" >&5 + echo "$as_me:6243: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5811: \"$ac_try\"") >&5 + { (eval echo "$as_me:6246: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5814: \$? = $ac_status" >&5 + echo "$as_me:6249: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_sig_atomic_t=$cf_type else @@ -5825,7 +6260,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:5828: result: $cf_cv_sig_atomic_t" >&5 +echo "$as_me:6263: result: $cf_cv_sig_atomic_t" >&5 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <&5 +echo "$as_me:6272: checking if SIGWINCH is defined" >&5 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6 if test "${cf_cv_define_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 5844 "configure" +#line 6279 "configure" #include "confdefs.h" #include @@ -5856,23 +6291,23 @@ int x = SIGWINCH; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5859: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6294: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5862: \$? = $ac_status" >&5 + echo "$as_me:6297: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5865: \"$ac_try\"") >&5 + { (eval echo "$as_me:6300: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5868: \$? = $ac_status" >&5 + echo "$as_me:6303: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_define_sigwinch=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 5875 "configure" +#line 6310 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -5890,16 +6325,16 @@ int x = SIGWINCH; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5893: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6328: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5896: \$? = $ac_status" >&5 + echo "$as_me:6331: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5899: \"$ac_try\"") >&5 + { (eval echo "$as_me:6334: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5902: \$? = $ac_status" >&5 + echo "$as_me:6337: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_define_sigwinch=maybe else @@ -5913,11 +6348,11 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:5916: result: $cf_cv_define_sigwinch" >&5 +echo "$as_me:6351: result: $cf_cv_define_sigwinch" >&5 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6 if test "$cf_cv_define_sigwinch" = maybe ; then -echo "$as_me:5920: checking for actual SIGWINCH definition" >&5 +echo "$as_me:6355: checking for actual SIGWINCH definition" >&5 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6 if test "${cf_cv_fixup_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5928,7 +6363,7 @@ cf_sigwinch=32 while test "$cf_sigwinch" != 1 do cat >"conftest.$ac_ext" <<_ACEOF -#line 5931 "configure" +#line 6366 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -5942,7 +6377,7 @@ main (void) { #if SIGWINCH != $cf_sigwinch -make an error +#error SIGWINCH is not $cf_sigwinch #endif int x = SIGWINCH; (void)x ; @@ -5950,16 +6385,16 @@ int x = SIGWINCH; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:5953: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6388: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5956: \$? = $ac_status" >&5 + echo "$as_me:6391: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:5959: \"$ac_try\"") >&5 + { (eval echo "$as_me:6394: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5962: \$? = $ac_status" >&5 + echo "$as_me:6397: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_fixup_sigwinch=$cf_sigwinch break @@ -5973,7 +6408,7 @@ cf_sigwinch="`expr "$cf_sigwinch" - 1`" done fi -echo "$as_me:5976: result: $cf_cv_fixup_sigwinch" >&5 +echo "$as_me:6411: result: $cf_cv_fixup_sigwinch" >&5 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6 if test "$cf_cv_fixup_sigwinch" != unknown ; then @@ -5983,14 +6418,16 @@ fi # Checks for CODESET support. -echo "$as_me:5986: checking for nl_langinfo and CODESET" >&5 +echo "$as_me:6421: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 5992 "configure" +#line 6427 "configure" #include "confdefs.h" + +$ac_includes_default #include int main (void) @@ -6001,16 +6438,16 @@ char* cs = nl_langinfo(CODESET); (void)cs } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6004: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6441: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6007: \$? = $ac_status" >&5 + echo "$as_me:6444: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6010: \"$ac_try\"") >&5 + { (eval echo "$as_me:6447: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6013: \$? = $ac_status" >&5 + echo "$as_me:6450: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then am_cv_langinfo_codeset=yes else @@ -6021,7 +6458,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:6024: result: $am_cv_langinfo_codeset" >&5 +echo "$as_me:6461: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test "$am_cv_langinfo_codeset" = yes; then @@ -6031,7 +6468,7 @@ EOF fi -echo "$as_me:6034: checking if you want to use pkg-config" >&5 +echo "$as_me:6471: checking if you want to use pkg-config" >&5 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6 # Check whether --with-pkg-config or --without-pkg-config was given. @@ -6041,7 +6478,7 @@ if test "${with_pkg_config+set}" = set; then else cf_pkg_config=yes fi; -echo "$as_me:6044: result: $cf_pkg_config" >&5 +echo "$as_me:6481: result: $cf_pkg_config" >&5 echo "${ECHO_T}$cf_pkg_config" >&6 case "$cf_pkg_config" in @@ -6053,7 +6490,7 @@ case "$cf_pkg_config" in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -echo "$as_me:6056: checking for $ac_word" >&5 +echo "$as_me:6493: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6070,7 +6507,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:6073: found $ac_dir/$ac_word" >&5 + echo "$as_me:6510: found $ac_dir/$ac_word" >&5 break fi done @@ -6081,10 +6518,10 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - echo "$as_me:6084: result: $PKG_CONFIG" >&5 + echo "$as_me:6521: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else - echo "$as_me:6087: result: no" >&5 + echo "$as_me:6524: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -6093,7 +6530,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:6096: checking for $ac_word" >&5 +echo "$as_me:6533: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6110,7 +6547,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word" - echo "$as_me:6113: found $ac_dir/$ac_word" >&5 + echo "$as_me:6550: found $ac_dir/$ac_word" >&5 break fi done @@ -6122,10 +6559,10 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - echo "$as_me:6125: result: $ac_pt_PKG_CONFIG" >&5 + echo "$as_me:6562: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 else - echo "$as_me:6128: result: no" >&5 + echo "$as_me:6565: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -6168,18 +6605,18 @@ case ".$PKG_CONFIG" in PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:6171: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 + { { echo "$as_me:6608: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;} { (exit 1); exit 1; }; } ;; esac elif test "x$cf_pkg_config" != xno ; then - { echo "$as_me:6178: WARNING: pkg-config is not installed" >&5 + { echo "$as_me:6615: WARNING: pkg-config is not installed" >&5 echo "$as_me: WARNING: pkg-config is not installed" >&2;} fi -echo "$as_me:6182: checking if you want to see long compiling messages" >&5 +echo "$as_me:6619: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -6213,10 +6650,10 @@ else ECHO_CC='' fi; -echo "$as_me:6216: result: $enableval" >&5 +echo "$as_me:6653: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 -echo "$as_me:6219: checking for ncurses wrap-prefix" >&5 +echo "$as_me:6656: checking for ncurses wrap-prefix" >&5 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given. @@ -6226,10 +6663,10 @@ if test "${with_ncurses_wrap_prefix+set}" = set; then else NCURSES_WRAP_PREFIX=_nc_ fi; -echo "$as_me:6229: result: $NCURSES_WRAP_PREFIX" >&5 +echo "$as_me:6666: result: $NCURSES_WRAP_PREFIX" >&5 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6 -echo "$as_me:6232: checking if you want to check for wide-character functions" >&5 +echo "$as_me:6669: checking if you want to check for wide-character functions" >&5 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6 # Check whether --enable-widec or --disable-widec was given. @@ -6246,10 +6683,10 @@ else cf_enable_widec=yes fi; -echo "$as_me:6249: result: $cf_enable_widec" >&5 +echo "$as_me:6686: result: $cf_enable_widec" >&5 echo "${ECHO_T}$cf_enable_widec" >&6 -echo "$as_me:6252: checking for specific curses-directory" >&5 +echo "$as_me:6689: checking for specific curses-directory" >&5 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6 # Check whether --with-curses-dir or --without-curses-dir was given. @@ -6259,7 +6696,7 @@ if test "${with_curses_dir+set}" = set; then else cf_cv_curses_dir=no fi; -echo "$as_me:6262: result: $cf_cv_curses_dir" >&5 +echo "$as_me:6699: result: $cf_cv_curses_dir" >&5 echo "${ECHO_T}$cf_cv_curses_dir" >&6 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" @@ -6290,7 +6727,7 @@ case ".$withval" in withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:6293: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:6730: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -6326,7 +6763,7 @@ if test -n "$cf_cv_curses_dir/include" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 6329 "configure" +#line 6766 "configure" #include "confdefs.h" #include int @@ -6338,16 +6775,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:6341: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6778: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6344: \$? = $ac_status" >&5 + echo "$as_me:6781: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:6347: \"$ac_try\"") >&5 + { (eval echo "$as_me:6784: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6350: \$? = $ac_status" >&5 + echo "$as_me:6787: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -6364,7 +6801,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:6367: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:6804: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -6400,7 +6837,7 @@ if test -n "$cf_cv_curses_dir/lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:6403: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:6840: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -6413,7 +6850,7 @@ fi cf_cv_screen=curses -echo "$as_me:6416: checking for specified curses library type" >&5 +echo "$as_me:6853: checking for specified curses library type" >&5 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6 # Check whether --with-screen or --without-screen was given. @@ -6457,13 +6894,13 @@ fi; fi; fi; -echo "$as_me:6460: result: $cf_cv_screen" >&5 +echo "$as_me:6897: result: $cf_cv_screen" >&5 echo "${ECHO_T}$cf_cv_screen" >&6 case $cf_cv_screen in (curses|curses_*) -echo "$as_me:6466: checking for extra include directories" >&5 +echo "$as_me:6903: checking for extra include directories" >&5 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6 if test "${cf_cv_curses_incdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6489,7 +6926,7 @@ case "$host_os" in esac fi -echo "$as_me:6492: result: $cf_cv_curses_incdir" >&5 +echo "$as_me:6929: result: $cf_cv_curses_incdir" >&5 echo "${ECHO_T}$cf_cv_curses_incdir" >&6 if test "$cf_cv_curses_incdir" != no then @@ -6499,7 +6936,7 @@ then fi -echo "$as_me:6502: checking if we have identified curses headers" >&5 +echo "$as_me:6939: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6511,28 +6948,28 @@ for cf_header in \ curses.h ncurses/ncurses.h ncurses/curses.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 6514 "configure" +#line 6951 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6963: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6529: \$? = $ac_status" >&5 + echo "$as_me:6966: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:6532: \"$ac_try\"") >&5 + { (eval echo "$as_me:6969: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6535: \$? = $ac_status" >&5 + echo "$as_me:6972: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else @@ -6543,11 +6980,11 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:6546: result: $cf_cv_ncurses_header" >&5 +echo "$as_me:6983: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then - { { echo "$as_me:6550: error: No curses header-files found" >&5 + { { echo "$as_me:6987: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi @@ -6557,23 +6994,23 @@ fi for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:6560: checking for $ac_header" >&5 +echo "$as_me:6997: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 6566 "configure" +#line 7003 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:6570: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:7007: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:6576: \$? = $ac_status" >&5 + echo "$as_me:7013: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -6592,7 +7029,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:6595: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:7032: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:7042: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6620,7 +7057,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 6623 "configure" +#line 7060 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -6635,16 +7072,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:6638: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7075: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6641: \$? = $ac_status" >&5 + echo "$as_me:7078: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:6644: \"$ac_try\"") >&5 + { (eval echo "$as_me:7081: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6647: \$? = $ac_status" >&5 + echo "$as_me:7084: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -6660,7 +7097,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:6663: result: $cf_cv_term_header" >&5 +echo "$as_me:7100: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -6692,7 +7129,7 @@ EOF ;; esac -echo "$as_me:6695: checking for ncurses version" >&5 +echo "$as_me:7132: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6718,10 +7155,10 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo "$as_me:6721: \"$cf_try\"") >&5 + { (eval echo "$as_me:7158: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:6724: \$? = $ac_status" >&5 + echo "$as_me:7161: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` @@ -6731,11 +7168,13 @@ EOF else cat >"conftest.$ac_ext" <<_ACEOF -#line 6734 "configure" +#line 7171 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -6749,22 +7188,22 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:6759: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7198: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6762: \$? = $ac_status" >&5 + echo "$as_me:7201: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:6764: \"$ac_try\"") >&5 + { (eval echo "$as_me:7203: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6767: \$? = $ac_status" >&5 + echo "$as_me:7206: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -6778,38 +7217,38 @@ fi rm -f "$cf_tempfile" fi -echo "$as_me:6781: result: $cf_cv_ncurses_version" >&5 +echo "$as_me:7220: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF #define NCURSES 1 EOF -echo "$as_me:6788: checking if we have identified curses libraries" >&5 +echo "$as_me:7227: checking if we have identified curses libraries" >&5 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 6791 "configure" +#line 7230 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6803: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7242: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6806: \$? = $ac_status" >&5 + echo "$as_me:7245: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6809: \"$ac_try\"") >&5 + { (eval echo "$as_me:7248: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6812: \$? = $ac_status" >&5 + echo "$as_me:7251: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -6818,13 +7257,13 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" -echo "$as_me:6821: result: $cf_result" >&5 +echo "$as_me:7260: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = no ; then case "$host_os" in (freebsd*) - echo "$as_me:6827: checking for tgoto in -lmytinfo" >&5 + echo "$as_me:7266: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6832,7 +7271,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6835 "configure" +#line 7274 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6841,7 +7280,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -6851,16 +7290,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6854: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7293: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6857: \$? = $ac_status" >&5 + echo "$as_me:7296: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6860: \"$ac_try\"") >&5 + { (eval echo "$as_me:7299: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6863: \$? = $ac_status" >&5 + echo "$as_me:7302: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else @@ -6871,7 +7310,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6874: result: $ac_cv_lib_mytinfo_tgoto" >&5 +echo "$as_me:7313: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then @@ -6901,7 +7340,7 @@ fi # term.h) for cur_colr if test "x$cf_cv_screen" = "xcurses_colr" then - echo "$as_me:6904: checking for initscr in -lcur_colr" >&5 + echo "$as_me:7343: checking for initscr in -lcur_colr" >&5 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6909,7 +7348,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcur_colr $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6912 "configure" +#line 7351 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6918,7 +7357,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -6928,16 +7367,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:6931: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7370: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6934: \$? = $ac_status" >&5 + echo "$as_me:7373: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:6937: \"$ac_try\"") >&5 + { (eval echo "$as_me:7376: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6940: \$? = $ac_status" >&5 + echo "$as_me:7379: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_cur_colr_initscr=yes else @@ -6948,7 +7387,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6951: result: $ac_cv_lib_cur_colr_initscr" >&5 +echo "$as_me:7390: result: $ac_cv_lib_cur_colr_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6 if test "$ac_cv_lib_cur_colr_initscr" = yes; then @@ -6972,7 +7411,7 @@ LIBS="$cf_add_libs" else - echo "$as_me:6975: checking for initscr in -lHcurses" >&5 + echo "$as_me:7414: checking for initscr in -lHcurses" >&5 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6980,7 +7419,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lHcurses $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 6983 "configure" +#line 7422 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -6989,7 +7428,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -6999,16 +7438,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7002: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7441: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7005: \$? = $ac_status" >&5 + echo "$as_me:7444: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7008: \"$ac_try\"") >&5 + { (eval echo "$as_me:7447: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7011: \$? = $ac_status" >&5 + echo "$as_me:7450: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_Hcurses_initscr=yes else @@ -7019,7 +7458,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7022: result: $ac_cv_lib_Hcurses_initscr" >&5 +echo "$as_me:7461: result: $ac_cv_lib_Hcurses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6 if test "$ac_cv_lib_Hcurses_initscr" = yes; then @@ -7077,7 +7516,7 @@ if test -n "/lib64" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:7080: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:7519: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -7106,7 +7545,7 @@ if test -n "/lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:7109: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:7548: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -7137,7 +7576,7 @@ if test -n "/lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:7140: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:7579: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -7172,7 +7611,7 @@ if test -n "/usr/5lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:7175: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:7614: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -7216,13 +7655,13 @@ if test ".$ac_cv_func_initscr" != .yes ; then # because it may be needed to link the test-case for initscr. if test "x$cf_term_lib" = x then - echo "$as_me:7219: checking for tgoto" >&5 + echo "$as_me:7658: checking for tgoto" >&5 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6 if test "${ac_cv_func_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 7225 "configure" +#line 7664 "configure" #include "confdefs.h" #define tgoto autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -7253,16 +7692,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7256: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7695: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7259: \$? = $ac_status" >&5 + echo "$as_me:7698: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7262: \"$ac_try\"") >&5 + { (eval echo "$as_me:7701: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7265: \$? = $ac_status" >&5 + echo "$as_me:7704: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_tgoto=yes else @@ -7272,7 +7711,7 @@ ac_cv_func_tgoto=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:7275: result: $ac_cv_func_tgoto" >&5 +echo "$as_me:7714: result: $ac_cv_func_tgoto" >&5 echo "${ECHO_T}$ac_cv_func_tgoto" >&6 if test "$ac_cv_func_tgoto" = yes; then cf_term_lib=predefined @@ -7281,7 +7720,7 @@ else for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown do as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh` -echo "$as_me:7284: checking for tgoto in -l$cf_term_lib" >&5 +echo "$as_me:7723: checking for tgoto in -l$cf_term_lib" >&5 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7289,7 +7728,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_term_lib $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7292 "configure" +#line 7731 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -7298,7 +7737,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -7308,16 +7747,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7311: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7750: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7314: \$? = $ac_status" >&5 + echo "$as_me:7753: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7317: \"$ac_try\"") >&5 + { (eval echo "$as_me:7756: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7320: \$? = $ac_status" >&5 + echo "$as_me:7759: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else @@ -7328,7 +7767,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7331: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 +echo "$as_me:7770: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then @@ -7351,10 +7790,10 @@ fi do LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then - echo "$as_me:7354: checking if we can link with $cf_curs_lib library" >&5 + echo "$as_me:7793: checking if we can link with $cf_curs_lib library" >&5 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 7357 "configure" +#line 7796 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -7366,16 +7805,16 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7369: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7808: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7372: \$? = $ac_status" >&5 + echo "$as_me:7811: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7375: \"$ac_try\"") >&5 + { (eval echo "$as_me:7814: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7378: \$? = $ac_status" >&5 + echo "$as_me:7817: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -7384,37 +7823,37 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:7387: result: $cf_result" >&5 + echo "$as_me:7826: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 test "$cf_result" = yes && break elif test "$cf_curs_lib" = "$cf_term_lib" ; then cf_result=no elif test "$cf_term_lib" != predefined ; then - echo "$as_me:7393: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 + echo "$as_me:7832: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 7396 "configure" +#line 7835 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { -initscr(); tgoto((char *)0, 0, 0); +initscr(); endwin(); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7408: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7847: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7411: \$? = $ac_status" >&5 + echo "$as_me:7850: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7414: \"$ac_try\"") >&5 + { (eval echo "$as_me:7853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7417: \$? = $ac_status" >&5 + echo "$as_me:7856: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=no else @@ -7423,7 +7862,7 @@ cat "conftest.$ac_ext" >&5 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7426 "configure" +#line 7865 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -7435,16 +7874,16 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7438: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7877: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7441: \$? = $ac_status" >&5 + echo "$as_me:7880: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7444: \"$ac_try\"") >&5 + { (eval echo "$as_me:7883: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7447: \$? = $ac_status" >&5 + echo "$as_me:7886: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -7456,13 +7895,13 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:7459: result: $cf_result" >&5 + echo "$as_me:7898: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 test "$cf_result" != error && break fi done fi - test "$cf_curs_lib" = unknown && { { echo "$as_me:7465: error: no curses library found" >&5 + test "$cf_curs_lib" = unknown && { { echo "$as_me:7904: error: no curses library found" >&5 echo "$as_me: error: no curses library found" >&2;} { (exit 1); exit 1; }; } fi @@ -7474,23 +7913,23 @@ fi for ac_header in wchar.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:7477: checking for $ac_header" >&5 +echo "$as_me:7916: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 7483 "configure" +#line 7922 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:7487: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:7926: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:7493: \$? = $ac_status" >&5 + echo "$as_me:7932: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -7509,7 +7948,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:7512: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:7951: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:7961: checking for multibyte character support" >&5 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6 if test "${cf_cv_utf8_lib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7527,11 +7966,10 @@ else cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7530 "configure" +#line 7969 "configure" #include "confdefs.h" -#include -#include +$ac_includes_default #ifdef HAVE_WCHAR_H #include #endif @@ -7545,16 +7983,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7548: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7986: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7551: \$? = $ac_status" >&5 + echo "$as_me:7989: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7554: \"$ac_try\"") >&5 + { (eval echo "$as_me:7992: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7557: \$? = $ac_status" >&5 + echo "$as_me:7995: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_utf8_lib=yes else @@ -7566,12 +8004,12 @@ cat "conftest.$ac_ext" >&5 cf_cv_header_path_utf8= cf_cv_library_path_utf8= -echo "${as_me:-configure}:7569: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:8007: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7574 "configure" +#line 8012 "configure" #include "confdefs.h" #include @@ -7584,16 +8022,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7587: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8025: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7590: \$? = $ac_status" >&5 + echo "$as_me:8028: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7593: \"$ac_try\"") >&5 + { (eval echo "$as_me:8031: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7596: \$? = $ac_status" >&5 + echo "$as_me:8034: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes @@ -7607,7 +8045,7 @@ cat "conftest.$ac_ext" >&5 LIBS="-lutf8 $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 7610 "configure" +#line 8048 "configure" #include "confdefs.h" #include @@ -7620,16 +8058,16 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7623: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8061: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7626: \$? = $ac_status" >&5 + echo "$as_me:8064: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7629: \"$ac_try\"") >&5 + { (eval echo "$as_me:8067: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7632: \$? = $ac_status" >&5 + echo "$as_me:8070: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes @@ -7646,9 +8084,9 @@ cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6 -echo "${as_me:-configure}:7649: testing find linkage for utf8 library ..." 1>&5 +echo "${as_me:-configure}:8087: testing find linkage for utf8 library ..." 1>&5 -echo "${as_me:-configure}:7651: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:8089: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_CPPFLAGS="$CPPFLAGS" cf_test_CPPFLAGS="$CPPFLAGS" @@ -7739,7 +8177,7 @@ cf_search="$cf_search $cf_header_path_list" if test -d "$cf_cv_header_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6 -echo "${as_me:-configure}:7742: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:8180: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 CPPFLAGS="$cf_save_CPPFLAGS" @@ -7747,7 +8185,7 @@ echo "${as_me:-configure}:7742: testing ... testing $cf_cv_header_path_utf8 ..." CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF -#line 7750 "configure" +#line 8188 "configure" #include "confdefs.h" #include @@ -7760,21 +8198,21 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:7763: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8201: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7766: \$? = $ac_status" >&5 + echo "$as_me:8204: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:7769: \"$ac_try\"") >&5 + { (eval echo "$as_me:8207: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7772: \$? = $ac_status" >&5 + echo "$as_me:8210: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6 -echo "${as_me:-configure}:7777: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:8215: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=maybe cf_test_CPPFLAGS="$CPPFLAGS" @@ -7792,7 +8230,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_cv_find_linkage_utf8" = maybe ; then -echo "${as_me:-configure}:7795: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 +echo "${as_me:-configure}:8233: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cf_save_LDFLAGS="$LDFLAGS" @@ -7867,13 +8305,13 @@ cf_search="$cf_library_path_list $cf_search" if test -d "$cf_cv_library_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6 -echo "${as_me:-configure}:7870: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:8308: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 CPPFLAGS="$cf_test_CPPFLAGS" LIBS="-lutf8 $cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF -#line 7876 "configure" +#line 8314 "configure" #include "confdefs.h" #include @@ -7886,21 +8324,21 @@ putwc(0,0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:7889: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8327: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7892: \$? = $ac_status" >&5 + echo "$as_me:8330: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:7895: \"$ac_try\"") >&5 + { (eval echo "$as_me:8333: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7898: \$? = $ac_status" >&5 + echo "$as_me:8336: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6 -echo "${as_me:-configure}:7903: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 +echo "${as_me:-configure}:8341: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=yes cf_cv_library_file_utf8="-lutf8" @@ -7942,7 +8380,7 @@ fi fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:7945: result: $cf_cv_utf8_lib" >&5 +echo "$as_me:8383: result: $cf_cv_utf8_lib" >&5 echo "${ECHO_T}$cf_cv_utf8_lib" >&6 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between @@ -7980,7 +8418,7 @@ if test -n "$cf_cv_header_path_utf8" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 7983 "configure" +#line 8421 "configure" #include "confdefs.h" #include int @@ -7992,16 +8430,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:7995: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8433: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7998: \$? = $ac_status" >&5 + echo "$as_me:8436: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8001: \"$ac_try\"") >&5 + { (eval echo "$as_me:8439: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8004: \$? = $ac_status" >&5 + echo "$as_me:8442: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -8018,7 +8456,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:8021: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:8459: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -8054,7 +8492,7 @@ if test -n "$cf_cv_library_path_utf8" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me:-configure}:8057: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me:-configure}:8495: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -8084,13 +8522,13 @@ cf_ncuconfig_root=$cf_cv_screen cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:8087: checking pkg-config for $cf_ncuconfig_root" >&5 + echo "$as_me:8525: checking pkg-config for $cf_ncuconfig_root" >&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then - echo "$as_me:8090: result: yes" >&5 + echo "$as_me:8528: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:8093: checking if the $cf_ncuconfig_root package files work" >&5 + echo "$as_me:8531: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown @@ -8223,7 +8661,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 8226 "configure" +#line 8664 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -8235,37 +8673,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:8238: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8676: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8241: \$? = $ac_status" >&5 + echo "$as_me:8679: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:8244: \"$ac_try\"") >&5 + { (eval echo "$as_me:8682: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8247: \$? = $ac_status" >&5 + echo "$as_me:8685: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 8253 "configure" +#line 8691 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:8260: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8698: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8263: \$? = $ac_status" >&5 + echo "$as_me:8701: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:8265: \"$ac_try\"") >&5 + { (eval echo "$as_me:8703: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8268: \$? = $ac_status" >&5 + echo "$as_me:8706: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else @@ -8439,7 +8877,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 8442 "configure" +#line 8880 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -8451,37 +8889,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:8454: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8892: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8457: \$? = $ac_status" >&5 + echo "$as_me:8895: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:8460: \"$ac_try\"") >&5 + { (eval echo "$as_me:8898: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8463: \$? = $ac_status" >&5 + echo "$as_me:8901: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 8469 "configure" +#line 8907 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:8476: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8914: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8479: \$? = $ac_status" >&5 + echo "$as_me:8917: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:8481: \"$ac_try\"") >&5 + { (eval echo "$as_me:8919: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8484: \$? = $ac_status" >&5 + echo "$as_me:8922: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else @@ -8498,7 +8936,7 @@ cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:8501: result: $cf_have_ncuconfig" >&5 + echo "$as_me:8939: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" @@ -8514,7 +8952,7 @@ EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root -echo "$as_me:8517: checking for terminfo header" >&5 +echo "$as_me:8955: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8532,7 +8970,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 8535 "configure" +#line 8973 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -8547,16 +8985,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8550: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8988: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8553: \$? = $ac_status" >&5 + echo "$as_me:8991: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8556: \"$ac_try\"") >&5 + { (eval echo "$as_me:8994: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8559: \$? = $ac_status" >&5 + echo "$as_me:8997: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -8572,7 +9010,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:8575: result: $cf_cv_term_header" >&5 +echo "$as_me:9013: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -8607,7 +9045,7 @@ esac fi else - echo "$as_me:8610: result: no" >&5 + echo "$as_me:9048: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi @@ -8623,7 +9061,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:8626: checking for $ac_word" >&5 +echo "$as_me:9064: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8638,7 +9076,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" -echo "$as_me:8641: found $ac_dir/$ac_word" >&5 +echo "$as_me:9079: found $ac_dir/$ac_word" >&5 break done @@ -8646,10 +9084,10 @@ fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then - echo "$as_me:8649: result: $NCURSES_CONFIG" >&5 + echo "$as_me:9087: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else - echo "$as_me:8652: result: no" >&5 + echo "$as_me:9090: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8662,7 +9100,7 @@ if test -z "$NCURSES_CONFIG"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:8665: checking for $ac_word" >&5 +echo "$as_me:9103: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8677,7 +9115,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" -echo "$as_me:8680: found $ac_dir/$ac_word" >&5 +echo "$as_me:9118: found $ac_dir/$ac_word" >&5 break done @@ -8685,10 +9123,10 @@ fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then - echo "$as_me:8688: result: $ac_ct_NCURSES_CONFIG" >&5 + echo "$as_me:9126: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else - echo "$as_me:8691: result: no" >&5 + echo "$as_me:9129: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -8845,7 +9283,7 @@ LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h -echo "$as_me:8848: checking if we have identified curses headers" >&5 +echo "$as_me:9286: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8857,28 +9295,28 @@ for cf_header in \ curses.h $cf_cv_screen/curses.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 8860 "configure" +#line 9298 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:8872: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9310: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8875: \$? = $ac_status" >&5 + echo "$as_me:9313: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:8878: \"$ac_try\"") >&5 + { (eval echo "$as_me:9316: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8881: \$? = $ac_status" >&5 + echo "$as_me:9319: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else @@ -8889,11 +9327,11 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:8892: result: $cf_cv_ncurses_header" >&5 +echo "$as_me:9330: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then - { { echo "$as_me:8896: error: No curses header-files found" >&5 + { { echo "$as_me:9334: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi @@ -8903,23 +9341,23 @@ fi for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:8906: checking for $ac_header" >&5 +echo "$as_me:9344: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 8912 "configure" +#line 9350 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:8916: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:9354: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:8922: \$? = $ac_status" >&5 + echo "$as_me:9360: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -8938,7 +9376,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:8941: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:9379: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF -#line 8997 "configure" +#line 9435 "configure" #include "confdefs.h" #include int @@ -9006,16 +9444,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9009: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9447: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9012: \$? = $ac_status" >&5 + echo "$as_me:9450: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9015: \"$ac_try\"") >&5 + { (eval echo "$as_me:9453: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9018: \$? = $ac_status" >&5 + echo "$as_me:9456: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -9032,7 +9470,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:9035: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:9473: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -9051,7 +9489,7 @@ fi } -echo "$as_me:9054: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "$as_me:9492: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9063,7 +9501,7 @@ else do cat >"conftest.$ac_ext" <<_ACEOF -#line 9066 "configure" +#line 9504 "configure" #include "confdefs.h" #include <$cf_header> @@ -9078,7 +9516,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -9087,16 +9525,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9090: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9528: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9093: \$? = $ac_status" >&5 + echo "$as_me:9531: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9096: \"$ac_try\"") >&5 + { (eval echo "$as_me:9534: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9099: \$? = $ac_status" >&5 + echo "$as_me:9537: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header @@ -9111,14 +9549,14 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:9114: result: $cf_cv_ncurses_h" >&5 +echo "$as_me:9552: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -echo "$as_me:9121: checking for $cf_ncuhdr_root include-path" >&5 +echo "$as_me:9559: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9239,7 +9677,7 @@ if test -n "$cf_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 9242 "configure" +#line 9680 "configure" #include "confdefs.h" #include int @@ -9251,16 +9689,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9254: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9257: \$? = $ac_status" >&5 + echo "$as_me:9695: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9260: \"$ac_try\"") >&5 + { (eval echo "$as_me:9698: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9263: \$? = $ac_status" >&5 + echo "$as_me:9701: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -9277,7 +9715,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:9280: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:9718: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -9300,7 +9738,7 @@ fi do cat >"conftest.$ac_ext" <<_ACEOF -#line 9303 "configure" +#line 9741 "configure" #include "confdefs.h" #include <$cf_header> @@ -9315,7 +9753,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -9324,16 +9762,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9327: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9765: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9330: \$? = $ac_status" >&5 + echo "$as_me:9768: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9333: \"$ac_try\"") >&5 + { (eval echo "$as_me:9771: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9336: \$? = $ac_status" >&5 + echo "$as_me:9774: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header @@ -9354,12 +9792,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done - test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9357: error: not found" >&5 + test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9795: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:9362: result: $cf_cv_ncurses_h2" >&5 +echo "$as_me:9800: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` @@ -9395,7 +9833,7 @@ if test -n "$cf_1st_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 9398 "configure" +#line 9836 "configure" #include "confdefs.h" #include int @@ -9407,16 +9845,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9410: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9848: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9413: \$? = $ac_status" >&5 + echo "$as_me:9851: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9416: \"$ac_try\"") >&5 + { (eval echo "$as_me:9854: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9419: \$? = $ac_status" >&5 + echo "$as_me:9857: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -9433,7 +9871,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:9436: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:9874: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -9481,7 +9919,7 @@ EOF ;; esac -echo "$as_me:9484: checking for terminfo header" >&5 +echo "$as_me:9922: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9499,7 +9937,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 9502 "configure" +#line 9940 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -9514,16 +9952,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:9517: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9955: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9520: \$? = $ac_status" >&5 + echo "$as_me:9958: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:9523: \"$ac_try\"") >&5 + { (eval echo "$as_me:9961: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9526: \$? = $ac_status" >&5 + echo "$as_me:9964: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -9539,7 +9977,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:9542: result: $cf_cv_term_header" >&5 +echo "$as_me:9980: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -9577,7 +10015,7 @@ cat >>confdefs.h <<\EOF #define NCURSES 1 EOF -echo "$as_me:9580: checking for ncurses version" >&5 +echo "$as_me:10018: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9603,10 +10041,10 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo "$as_me:9606: \"$cf_try\"") >&5 + { (eval echo "$as_me:10044: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:9609: \$? = $ac_status" >&5 + echo "$as_me:10047: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` @@ -9616,11 +10054,13 @@ EOF else cat >"conftest.$ac_ext" <<_ACEOF -#line 9619 "configure" +#line 10057 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -9634,22 +10074,22 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:9644: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10084: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9647: \$? = $ac_status" >&5 + echo "$as_me:10087: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:9649: \"$ac_try\"") >&5 + { (eval echo "$as_me:10089: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9652: \$? = $ac_status" >&5 + echo "$as_me:10092: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -9663,7 +10103,7 @@ fi rm -f "$cf_tempfile" fi -echo "$as_me:9666: result: $cf_cv_ncurses_version" >&5 +echo "$as_me:10106: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF @@ -9676,7 +10116,7 @@ cf_nculib_root=$cf_cv_screen # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" -echo "$as_me:9679: checking for Gpm_Open in -lgpm" >&5 +echo "$as_me:10119: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9684,7 +10124,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 9687 "configure" +#line 10127 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9693,7 +10133,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char Gpm_Open (); +char Gpm_Open (void); int main (void) { @@ -9703,16 +10143,16 @@ Gpm_Open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9706: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10146: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9709: \$? = $ac_status" >&5 + echo "$as_me:10149: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9712: \"$ac_try\"") >&5 + { (eval echo "$as_me:10152: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9715: \$? = $ac_status" >&5 + echo "$as_me:10155: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -9723,10 +10163,10 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9726: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:10166: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then - echo "$as_me:9729: checking for initscr in -lgpm" >&5 + echo "$as_me:10169: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9734,7 +10174,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 9737 "configure" +#line 10177 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9743,7 +10183,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -9753,16 +10193,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9756: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10196: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9759: \$? = $ac_status" >&5 + echo "$as_me:10199: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9762: \"$ac_try\"") >&5 + { (eval echo "$as_me:10202: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9765: \$? = $ac_status" >&5 + echo "$as_me:10205: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else @@ -9773,7 +10213,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9776: result: $ac_cv_lib_gpm_initscr" >&5 +echo "$as_me:10216: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" @@ -9788,7 +10228,7 @@ case "$host_os" in # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then - echo "$as_me:9791: checking for tgoto in -lmytinfo" >&5 + echo "$as_me:10231: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9796,7 +10236,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 9799 "configure" +#line 10239 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9805,7 +10245,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -9815,16 +10255,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9818: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10258: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9821: \$? = $ac_status" >&5 + echo "$as_me:10261: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9824: \"$ac_try\"") >&5 + { (eval echo "$as_me:10264: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9827: \$? = $ac_status" >&5 + echo "$as_me:10267: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else @@ -9835,7 +10275,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9838: result: $ac_cv_lib_mytinfo_tgoto" >&5 +echo "$as_me:10278: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" @@ -9884,13 +10324,13 @@ else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" - echo "$as_me:9887: checking for initscr" >&5 + echo "$as_me:10327: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 9893 "configure" +#line 10333 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -9921,16 +10361,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9924: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10364: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9927: \$? = $ac_status" >&5 + echo "$as_me:10367: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9930: \"$ac_try\"") >&5 + { (eval echo "$as_me:10370: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9933: \$? = $ac_status" >&5 + echo "$as_me:10373: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else @@ -9940,18 +10380,18 @@ ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:9943: result: $ac_cv_func_initscr" >&5 +echo "$as_me:10383: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" - echo "$as_me:9950: checking for initscr in -l$cf_nculib_root" >&5 + echo "$as_me:10390: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 9954 "configure" +#line 10394 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -9963,25 +10403,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:9966: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10406: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9969: \$? = $ac_status" >&5 + echo "$as_me:10409: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:9972: \"$ac_try\"") >&5 + { (eval echo "$as_me:10412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9975: \$? = $ac_status" >&5 + echo "$as_me:10415: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:9977: result: yes" >&5 + echo "$as_me:10417: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:9984: result: no" >&5 +echo "$as_me:10424: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= @@ -10049,11 +10489,11 @@ cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do - echo "$as_me:10052: checking for -l$cf_nculib_root in $cf_libdir" >&5 + echo "$as_me:10492: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 10056 "configure" +#line 10496 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -10065,25 +10505,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:10068: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10508: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10071: \$? = $ac_status" >&5 + echo "$as_me:10511: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:10074: \"$ac_try\"") >&5 + { (eval echo "$as_me:10514: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10077: \$? = $ac_status" >&5 + echo "$as_me:10517: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:10079: result: yes" >&5 + echo "$as_me:10519: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:10086: result: no" >&5 +echo "$as_me:10526: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi @@ -10098,7 +10538,7 @@ fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then - { { echo "$as_me:10101: error: Cannot link $cf_nculib_root library" >&5 + { { echo "$as_me:10541: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi @@ -10106,7 +10546,7 @@ fi fi if test -n "$cf_ncurses_LIBS" ; then - echo "$as_me:10109: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + echo "$as_me:10549: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do @@ -10116,7 +10556,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS.. fi done cat >"conftest.$ac_ext" <<_ACEOF -#line 10119 "configure" +#line 10559 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -10128,23 +10568,23 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:10131: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10571: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10134: \$? = $ac_status" >&5 + echo "$as_me:10574: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:10137: \"$ac_try\"") >&5 + { (eval echo "$as_me:10577: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10140: \$? = $ac_status" >&5 + echo "$as_me:10580: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:10142: result: yes" >&5 + echo "$as_me:10582: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:10147: result: no" >&5 +echo "$as_me:10587: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi @@ -10169,13 +10609,13 @@ cf_ncuconfig_root=$cf_cv_screen cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:10172: checking pkg-config for $cf_ncuconfig_root" >&5 + echo "$as_me:10612: checking pkg-config for $cf_ncuconfig_root" >&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then - echo "$as_me:10175: result: yes" >&5 + echo "$as_me:10615: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:10178: checking if the $cf_ncuconfig_root package files work" >&5 + echo "$as_me:10618: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown @@ -10308,7 +10748,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 10311 "configure" +#line 10751 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -10320,37 +10760,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:10323: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10763: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10326: \$? = $ac_status" >&5 + echo "$as_me:10766: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:10329: \"$ac_try\"") >&5 + { (eval echo "$as_me:10769: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10332: \$? = $ac_status" >&5 + echo "$as_me:10772: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 10338 "configure" +#line 10778 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:10345: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10785: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10348: \$? = $ac_status" >&5 + echo "$as_me:10788: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:10350: \"$ac_try\"") >&5 + { (eval echo "$as_me:10790: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10353: \$? = $ac_status" >&5 + echo "$as_me:10793: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else @@ -10524,7 +10964,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 10527 "configure" +#line 10967 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -10536,37 +10976,37 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:10539: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10979: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10542: \$? = $ac_status" >&5 + echo "$as_me:10982: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:10545: \"$ac_try\"") >&5 + { (eval echo "$as_me:10985: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10548: \$? = $ac_status" >&5 + echo "$as_me:10988: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 10554 "configure" +#line 10994 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:10561: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11001: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10564: \$? = $ac_status" >&5 + echo "$as_me:11004: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:10566: \"$ac_try\"") >&5 + { (eval echo "$as_me:11006: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10569: \$? = $ac_status" >&5 + echo "$as_me:11009: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else @@ -10583,7 +11023,7 @@ cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:10586: result: $cf_have_ncuconfig" >&5 + echo "$as_me:11026: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" @@ -10599,7 +11039,7 @@ EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root -echo "$as_me:10602: checking for terminfo header" >&5 +echo "$as_me:11042: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10617,7 +11057,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 10620 "configure" +#line 11060 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -10632,16 +11072,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10635: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11075: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10638: \$? = $ac_status" >&5 + echo "$as_me:11078: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10641: \"$ac_try\"") >&5 + { (eval echo "$as_me:11081: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10644: \$? = $ac_status" >&5 + echo "$as_me:11084: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -10657,7 +11097,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:10660: result: $cf_cv_term_header" >&5 +echo "$as_me:11100: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -10692,7 +11132,7 @@ esac fi else - echo "$as_me:10695: result: no" >&5 + echo "$as_me:11135: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi @@ -10708,7 +11148,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:10711: checking for $ac_word" >&5 +echo "$as_me:11151: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10723,7 +11163,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" -echo "$as_me:10726: found $ac_dir/$ac_word" >&5 +echo "$as_me:11166: found $ac_dir/$ac_word" >&5 break done @@ -10731,10 +11171,10 @@ fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then - echo "$as_me:10734: result: $NCURSES_CONFIG" >&5 + echo "$as_me:11174: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else - echo "$as_me:10737: result: no" >&5 + echo "$as_me:11177: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -10747,7 +11187,7 @@ if test -z "$NCURSES_CONFIG"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:10750: checking for $ac_word" >&5 +echo "$as_me:11190: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10762,7 +11202,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" -echo "$as_me:10765: found $ac_dir/$ac_word" >&5 +echo "$as_me:11205: found $ac_dir/$ac_word" >&5 break done @@ -10770,10 +11210,10 @@ fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then - echo "$as_me:10773: result: $ac_ct_NCURSES_CONFIG" >&5 + echo "$as_me:11213: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else - echo "$as_me:10776: result: no" >&5 + echo "$as_me:11216: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -10930,7 +11370,7 @@ LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h -echo "$as_me:10933: checking if we have identified curses headers" >&5 +echo "$as_me:11373: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10942,28 +11382,28 @@ for cf_header in \ curses.h $cf_cv_screen/curses.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 10945 "configure" +#line 11385 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { -initscr(); tgoto("?", 0,0) +initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:10957: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11397: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10960: \$? = $ac_status" >&5 + echo "$as_me:11400: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:10963: \"$ac_try\"") >&5 + { (eval echo "$as_me:11403: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10966: \$? = $ac_status" >&5 + echo "$as_me:11406: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else @@ -10974,11 +11414,11 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:10977: result: $cf_cv_ncurses_header" >&5 +echo "$as_me:11417: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then - { { echo "$as_me:10981: error: No curses header-files found" >&5 + { { echo "$as_me:11421: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi @@ -10988,23 +11428,23 @@ fi for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:10991: checking for $ac_header" >&5 +echo "$as_me:11431: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 10997 "configure" +#line 11437 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:11001: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:11441: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:11007: \$? = $ac_status" >&5 + echo "$as_me:11447: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -11023,7 +11463,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:11026: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:11466: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF -#line 11082 "configure" +#line 11522 "configure" #include "confdefs.h" #include int @@ -11091,16 +11531,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11094: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11534: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11097: \$? = $ac_status" >&5 + echo "$as_me:11537: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11100: \"$ac_try\"") >&5 + { (eval echo "$as_me:11540: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11103: \$? = $ac_status" >&5 + echo "$as_me:11543: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -11117,7 +11557,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:11120: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:11560: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -11136,7 +11576,7 @@ fi } -echo "$as_me:11139: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "$as_me:11579: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11148,7 +11588,7 @@ else do cat >"conftest.$ac_ext" <<_ACEOF -#line 11151 "configure" +#line 11591 "configure" #include "confdefs.h" #include <$cf_header> @@ -11163,7 +11603,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -11172,16 +11612,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11175: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11615: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11178: \$? = $ac_status" >&5 + echo "$as_me:11618: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11181: \"$ac_try\"") >&5 + { (eval echo "$as_me:11621: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11184: \$? = $ac_status" >&5 + echo "$as_me:11624: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header @@ -11196,14 +11636,14 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:11199: result: $cf_cv_ncurses_h" >&5 +echo "$as_me:11639: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -echo "$as_me:11206: checking for $cf_ncuhdr_root include-path" >&5 +echo "$as_me:11646: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11324,7 +11764,7 @@ if test -n "$cf_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 11327 "configure" +#line 11767 "configure" #include "confdefs.h" #include int @@ -11336,16 +11776,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11339: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11779: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11342: \$? = $ac_status" >&5 + echo "$as_me:11782: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11345: \"$ac_try\"") >&5 + { (eval echo "$as_me:11785: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11348: \$? = $ac_status" >&5 + echo "$as_me:11788: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -11362,7 +11802,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:11365: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:11805: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -11385,7 +11825,7 @@ fi do cat >"conftest.$ac_ext" <<_ACEOF -#line 11388 "configure" +#line 11828 "configure" #include "confdefs.h" #include <$cf_header> @@ -11400,7 +11840,7 @@ printf("%s\\n", NCURSES_VERSION); #ifdef __NCURSES_H printf("old\\n"); #else - make an error + #error __NCURSES_H is not defined #endif #endif @@ -11409,16 +11849,16 @@ printf("old\\n"); } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11412: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11852: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11415: \$? = $ac_status" >&5 + echo "$as_me:11855: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11418: \"$ac_try\"") >&5 + { (eval echo "$as_me:11858: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11421: \$? = $ac_status" >&5 + echo "$as_me:11861: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header @@ -11439,12 +11879,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done - test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11442: error: not found" >&5 + test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11882: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:11447: result: $cf_cv_ncurses_h2" >&5 +echo "$as_me:11887: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` @@ -11480,7 +11920,7 @@ if test -n "$cf_1st_incdir" ; then CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF -#line 11483 "configure" +#line 11923 "configure" #include "confdefs.h" #include int @@ -11492,16 +11932,16 @@ printf("Hello") } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11495: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11935: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11498: \$? = $ac_status" >&5 + echo "$as_me:11938: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11501: \"$ac_try\"") >&5 + { (eval echo "$as_me:11941: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11504: \$? = $ac_status" >&5 + echo "$as_me:11944: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -11518,7 +11958,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me:-configure}:11521: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me:-configure}:11961: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" @@ -11566,7 +12006,7 @@ EOF ;; esac -echo "$as_me:11569: checking for terminfo header" >&5 +echo "$as_me:12009: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11584,7 +12024,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF -#line 11587 "configure" +#line 12027 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> @@ -11599,16 +12039,16 @@ int x = auto_left_margin; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:11602: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11605: \$? = $ac_status" >&5 + echo "$as_me:12045: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:11608: \"$ac_try\"") >&5 + { (eval echo "$as_me:12048: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11611: \$? = $ac_status" >&5 + echo "$as_me:12051: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" @@ -11624,7 +12064,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:11627: result: $cf_cv_term_header" >&5 +echo "$as_me:12067: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories @@ -11662,7 +12102,7 @@ cat >>confdefs.h <<\EOF #define NCURSES 1 EOF -echo "$as_me:11665: checking for ncurses version" >&5 +echo "$as_me:12105: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11688,10 +12128,10 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo "$as_me:11691: \"$cf_try\"") >&5 + { (eval echo "$as_me:12131: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? - echo "$as_me:11694: \$? = $ac_status" >&5 + echo "$as_me:12134: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` @@ -11701,11 +12141,13 @@ EOF else cat >"conftest.$ac_ext" <<_ACEOF -#line 11704 "configure" +#line 12144 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -11719,22 +12161,22 @@ int main(void) # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else - make an error + #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:11729: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12171: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11732: \$? = $ac_status" >&5 + echo "$as_me:12174: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:11734: \"$ac_try\"") >&5 + { (eval echo "$as_me:12176: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11737: \$? = $ac_status" >&5 + echo "$as_me:12179: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -11748,7 +12190,7 @@ fi rm -f "$cf_tempfile" fi -echo "$as_me:11751: result: $cf_cv_ncurses_version" >&5 +echo "$as_me:12193: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF @@ -11761,7 +12203,7 @@ cf_nculib_root=$cf_cv_screen # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" -echo "$as_me:11764: checking for Gpm_Open in -lgpm" >&5 +echo "$as_me:12206: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11769,7 +12211,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11772 "configure" +#line 12214 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -11778,7 +12220,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char Gpm_Open (); +char Gpm_Open (void); int main (void) { @@ -11788,16 +12230,16 @@ Gpm_Open (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11791: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12233: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11794: \$? = $ac_status" >&5 + echo "$as_me:12236: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11797: \"$ac_try\"") >&5 + { (eval echo "$as_me:12239: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11800: \$? = $ac_status" >&5 + echo "$as_me:12242: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -11808,10 +12250,10 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:11811: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:12253: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then - echo "$as_me:11814: checking for initscr in -lgpm" >&5 + echo "$as_me:12256: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11819,7 +12261,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11822 "configure" +#line 12264 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -11828,7 +12270,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char initscr (); +char initscr (void); int main (void) { @@ -11838,16 +12280,16 @@ initscr (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11841: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12283: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11844: \$? = $ac_status" >&5 + echo "$as_me:12286: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11847: \"$ac_try\"") >&5 + { (eval echo "$as_me:12289: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11850: \$? = $ac_status" >&5 + echo "$as_me:12292: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else @@ -11858,7 +12300,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:11861: result: $ac_cv_lib_gpm_initscr" >&5 +echo "$as_me:12303: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" @@ -11873,7 +12315,7 @@ case "$host_os" in # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then - echo "$as_me:11876: checking for tgoto in -lmytinfo" >&5 + echo "$as_me:12318: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11881,7 +12323,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 11884 "configure" +#line 12326 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -11890,7 +12332,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char tgoto (); +char tgoto (void); int main (void) { @@ -11900,16 +12342,16 @@ tgoto (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:11903: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12345: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11906: \$? = $ac_status" >&5 + echo "$as_me:12348: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:11909: \"$ac_try\"") >&5 + { (eval echo "$as_me:12351: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11912: \$? = $ac_status" >&5 + echo "$as_me:12354: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else @@ -11920,7 +12362,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:11923: result: $ac_cv_lib_mytinfo_tgoto" >&5 +echo "$as_me:12365: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" @@ -11969,13 +12411,13 @@ else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" - echo "$as_me:11972: checking for initscr" >&5 + echo "$as_me:12414: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 11978 "configure" +#line 12420 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -12006,16 +12448,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12009: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12451: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12012: \$? = $ac_status" >&5 + echo "$as_me:12454: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12015: \"$ac_try\"") >&5 + { (eval echo "$as_me:12457: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12018: \$? = $ac_status" >&5 + echo "$as_me:12460: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else @@ -12025,18 +12467,18 @@ ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:12028: result: $ac_cv_func_initscr" >&5 +echo "$as_me:12470: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" - echo "$as_me:12035: checking for initscr in -l$cf_nculib_root" >&5 + echo "$as_me:12477: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12039 "configure" +#line 12481 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -12048,25 +12490,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12051: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12493: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12054: \$? = $ac_status" >&5 + echo "$as_me:12496: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12057: \"$ac_try\"") >&5 + { (eval echo "$as_me:12499: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12060: \$? = $ac_status" >&5 + echo "$as_me:12502: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:12062: result: yes" >&5 + echo "$as_me:12504: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:12069: result: no" >&5 +echo "$as_me:12511: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= @@ -12134,11 +12576,11 @@ cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do - echo "$as_me:12137: checking for -l$cf_nculib_root in $cf_libdir" >&5 + echo "$as_me:12579: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12141 "configure" +#line 12583 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -12150,25 +12592,25 @@ initscr() } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12153: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12595: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12156: \$? = $ac_status" >&5 + echo "$as_me:12598: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12159: \"$ac_try\"") >&5 + { (eval echo "$as_me:12601: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12162: \$? = $ac_status" >&5 + echo "$as_me:12604: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:12164: result: yes" >&5 + echo "$as_me:12606: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:12171: result: no" >&5 +echo "$as_me:12613: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi @@ -12183,7 +12625,7 @@ fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then - { { echo "$as_me:12186: error: Cannot link $cf_nculib_root library" >&5 + { { echo "$as_me:12628: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi @@ -12191,7 +12633,7 @@ fi fi if test -n "$cf_ncurses_LIBS" ; then - echo "$as_me:12194: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + echo "$as_me:12636: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do @@ -12201,7 +12643,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS.. fi done cat >"conftest.$ac_ext" <<_ACEOF -#line 12204 "configure" +#line 12646 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int @@ -12213,23 +12655,23 @@ initscr(); mousemask(0,0); tigetstr((char *)0); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12216: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12658: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12219: \$? = $ac_status" >&5 + echo "$as_me:12661: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12222: \"$ac_try\"") >&5 + { (eval echo "$as_me:12664: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12225: \$? = $ac_status" >&5 + echo "$as_me:12667: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then - echo "$as_me:12227: result: yes" >&5 + echo "$as_me:12669: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:12232: result: no" >&5 +echo "$as_me:12674: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi @@ -12249,7 +12691,7 @@ fi ;; (pdcurses) - echo "$as_me:12252: checking for X" >&5 + echo "$as_me:12694: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. @@ -12353,17 +12795,17 @@ if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >"conftest.$ac_ext" <<_ACEOF -#line 12356 "configure" +#line 12798 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:12360: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:12802: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:12366: \$? = $ac_status" >&5 + echo "$as_me:12808: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -12396,7 +12838,7 @@ if test "$ac_x_libraries" = no; then ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12399 "configure" +#line 12841 "configure" #include "confdefs.h" #include int @@ -12408,16 +12850,16 @@ XtMalloc (0) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12411: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12853: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12414: \$? = $ac_status" >&5 + echo "$as_me:12856: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12417: \"$ac_try\"") >&5 + { (eval echo "$as_me:12859: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12420: \$? = $ac_status" >&5 + echo "$as_me:12862: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. @@ -12455,7 +12897,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:12458: result: $have_x" >&5 + echo "$as_me:12900: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else @@ -12465,7 +12907,7 @@ else # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:12468: result: libraries $x_libraries, headers $x_includes" >&5 + echo "$as_me:12910: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi @@ -12492,11 +12934,11 @@ else # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - echo "$as_me:12495: checking whether -R must be followed by a space" >&5 + echo "$as_me:12937: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >"conftest.$ac_ext" <<_ACEOF -#line 12499 "configure" +#line 12941 "configure" #include "confdefs.h" int @@ -12508,16 +12950,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12511: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12953: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12514: \$? = $ac_status" >&5 + echo "$as_me:12956: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12517: \"$ac_try\"") >&5 + { (eval echo "$as_me:12959: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12520: \$? = $ac_status" >&5 + echo "$as_me:12962: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_R_nospace=yes else @@ -12527,13 +12969,13 @@ ac_R_nospace=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" if test $ac_R_nospace = yes; then - echo "$as_me:12530: result: no" >&5 + echo "$as_me:12972: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >"conftest.$ac_ext" <<_ACEOF -#line 12536 "configure" +#line 12978 "configure" #include "confdefs.h" int @@ -12545,16 +12987,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12548: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12990: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12551: \$? = $ac_status" >&5 + echo "$as_me:12993: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12554: \"$ac_try\"") >&5 + { (eval echo "$as_me:12996: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12557: \$? = $ac_status" >&5 + echo "$as_me:12999: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_R_space=yes else @@ -12564,11 +13006,11 @@ ac_R_space=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" if test $ac_R_space = yes; then - echo "$as_me:12567: result: yes" >&5 + echo "$as_me:13009: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else - echo "$as_me:12571: result: neither works" >&5 + echo "$as_me:13013: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi @@ -12588,7 +13030,7 @@ echo "${ECHO_T}neither works" >&6 # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >"conftest.$ac_ext" <<_ACEOF -#line 12591 "configure" +#line 13033 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -12597,7 +13039,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XOpenDisplay (); +char XOpenDisplay (void); int main (void) { @@ -12607,22 +13049,22 @@ XOpenDisplay (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12610: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13052: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12613: \$? = $ac_status" >&5 + echo "$as_me:13055: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12616: \"$ac_try\"") >&5 + { (eval echo "$as_me:13058: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12619: \$? = $ac_status" >&5 + echo "$as_me:13061: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:12625: checking for dnet_ntoa in -ldnet" >&5 +echo "$as_me:13067: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12630,7 +13072,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12633 "configure" +#line 13075 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -12639,7 +13081,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dnet_ntoa (); +char dnet_ntoa (void); int main (void) { @@ -12649,16 +13091,16 @@ dnet_ntoa (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12652: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13094: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12655: \$? = $ac_status" >&5 + echo "$as_me:13097: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12658: \"$ac_try\"") >&5 + { (eval echo "$as_me:13100: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12661: \$? = $ac_status" >&5 + echo "$as_me:13103: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else @@ -12669,14 +13111,14 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:12672: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "$as_me:13114: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:12679: checking for dnet_ntoa in -ldnet_stub" >&5 + echo "$as_me:13121: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12684,7 +13126,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12687 "configure" +#line 13129 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -12693,7 +13135,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dnet_ntoa (); +char dnet_ntoa (void); int main (void) { @@ -12703,16 +13145,16 @@ dnet_ntoa (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12706: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13148: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12709: \$? = $ac_status" >&5 + echo "$as_me:13151: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12712: \"$ac_try\"") >&5 + { (eval echo "$as_me:13154: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12715: \$? = $ac_status" >&5 + echo "$as_me:13157: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else @@ -12723,7 +13165,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:12726: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "$as_me:13168: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" @@ -12742,13 +13184,13 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:12745: checking for gethostbyname" >&5 + echo "$as_me:13187: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12751 "configure" +#line 13193 "configure" #include "confdefs.h" #define gethostbyname autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -12779,16 +13221,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12782: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13224: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12785: \$? = $ac_status" >&5 + echo "$as_me:13227: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12788: \"$ac_try\"") >&5 + { (eval echo "$as_me:13230: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12791: \$? = $ac_status" >&5 + echo "$as_me:13233: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_gethostbyname=yes else @@ -12798,11 +13240,11 @@ ac_cv_func_gethostbyname=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:12801: result: $ac_cv_func_gethostbyname" >&5 +echo "$as_me:13243: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then - echo "$as_me:12805: checking for gethostbyname in -lnsl" >&5 + echo "$as_me:13247: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12810,7 +13252,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12813 "configure" +#line 13255 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -12819,7 +13261,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char gethostbyname (); +char gethostbyname (void); int main (void) { @@ -12829,16 +13271,16 @@ gethostbyname (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12832: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13274: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12835: \$? = $ac_status" >&5 + echo "$as_me:13277: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12838: \"$ac_try\"") >&5 + { (eval echo "$as_me:13280: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12841: \$? = $ac_status" >&5 + echo "$as_me:13283: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_nsl_gethostbyname=yes else @@ -12849,14 +13291,14 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:12852: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "$as_me:13294: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:12859: checking for gethostbyname in -lbsd" >&5 + echo "$as_me:13301: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12864,7 +13306,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12867 "configure" +#line 13309 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -12873,7 +13315,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char gethostbyname (); +char gethostbyname (void); int main (void) { @@ -12883,16 +13325,16 @@ gethostbyname (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12886: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13328: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12889: \$? = $ac_status" >&5 + echo "$as_me:13331: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12892: \"$ac_try\"") >&5 + { (eval echo "$as_me:13334: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12895: \$? = $ac_status" >&5 + echo "$as_me:13337: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_bsd_gethostbyname=yes else @@ -12903,7 +13345,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:12906: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "$as_me:13348: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" @@ -12919,13 +13361,13 @@ fi # variants that don't use the nameserver (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:12922: checking for connect" >&5 + echo "$as_me:13364: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 12928 "configure" +#line 13370 "configure" #include "confdefs.h" #define connect autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -12956,16 +13398,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:12959: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13401: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12962: \$? = $ac_status" >&5 + echo "$as_me:13404: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:12965: \"$ac_try\"") >&5 + { (eval echo "$as_me:13407: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12968: \$? = $ac_status" >&5 + echo "$as_me:13410: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_connect=yes else @@ -12975,11 +13417,11 @@ ac_cv_func_connect=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:12978: result: $ac_cv_func_connect" >&5 +echo "$as_me:13420: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then - echo "$as_me:12982: checking for connect in -lsocket" >&5 + echo "$as_me:13424: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12987,7 +13429,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 12990 "configure" +#line 13432 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -12996,7 +13438,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char connect (); +char connect (void); int main (void) { @@ -13006,16 +13448,16 @@ connect (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13009: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13451: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13012: \$? = $ac_status" >&5 + echo "$as_me:13454: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13015: \"$ac_try\"") >&5 + { (eval echo "$as_me:13457: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13018: \$? = $ac_status" >&5 + echo "$as_me:13460: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_socket_connect=yes else @@ -13026,7 +13468,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:13029: result: $ac_cv_lib_socket_connect" >&5 +echo "$as_me:13471: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test "$ac_cv_lib_socket_connect" = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" @@ -13035,13 +13477,13 @@ fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:13038: checking for remove" >&5 + echo "$as_me:13480: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13044 "configure" +#line 13486 "configure" #include "confdefs.h" #define remove autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -13072,16 +13514,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13075: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13517: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13078: \$? = $ac_status" >&5 + echo "$as_me:13520: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13081: \"$ac_try\"") >&5 + { (eval echo "$as_me:13523: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13084: \$? = $ac_status" >&5 + echo "$as_me:13526: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_remove=yes else @@ -13091,11 +13533,11 @@ ac_cv_func_remove=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:13094: result: $ac_cv_func_remove" >&5 +echo "$as_me:13536: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then - echo "$as_me:13098: checking for remove in -lposix" >&5 + echo "$as_me:13540: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13103,7 +13545,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 13106 "configure" +#line 13548 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -13112,7 +13554,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char remove (); +char remove (void); int main (void) { @@ -13122,16 +13564,16 @@ remove (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13125: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13567: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13128: \$? = $ac_status" >&5 + echo "$as_me:13570: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13131: \"$ac_try\"") >&5 + { (eval echo "$as_me:13573: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13134: \$? = $ac_status" >&5 + echo "$as_me:13576: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_posix_remove=yes else @@ -13142,7 +13584,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:13145: result: $ac_cv_lib_posix_remove" >&5 +echo "$as_me:13587: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test "$ac_cv_lib_posix_remove" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" @@ -13151,13 +13593,13 @@ fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:13154: checking for shmat" >&5 + echo "$as_me:13596: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13160 "configure" +#line 13602 "configure" #include "confdefs.h" #define shmat autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -13188,16 +13630,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13191: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13633: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13194: \$? = $ac_status" >&5 + echo "$as_me:13636: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13197: \"$ac_try\"") >&5 + { (eval echo "$as_me:13639: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13200: \$? = $ac_status" >&5 + echo "$as_me:13642: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_shmat=yes else @@ -13207,11 +13649,11 @@ ac_cv_func_shmat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:13210: result: $ac_cv_func_shmat" >&5 +echo "$as_me:13652: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then - echo "$as_me:13214: checking for shmat in -lipc" >&5 + echo "$as_me:13656: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13219,7 +13661,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 13222 "configure" +#line 13664 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -13228,7 +13670,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char shmat (); +char shmat (void); int main (void) { @@ -13238,16 +13680,16 @@ shmat (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13241: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13683: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13244: \$? = $ac_status" >&5 + echo "$as_me:13686: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13247: \"$ac_try\"") >&5 + { (eval echo "$as_me:13689: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13250: \$? = $ac_status" >&5 + echo "$as_me:13692: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_ipc_shmat=yes else @@ -13258,7 +13700,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:13261: result: $ac_cv_lib_ipc_shmat" >&5 +echo "$as_me:13703: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test "$ac_cv_lib_ipc_shmat" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" @@ -13276,7 +13718,7 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:13279: checking for IceConnectionNumber in -lICE" >&5 + echo "$as_me:13721: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13284,7 +13726,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 13287 "configure" +#line 13729 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -13293,7 +13735,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char IceConnectionNumber (); +char IceConnectionNumber (void); int main (void) { @@ -13303,16 +13745,16 @@ IceConnectionNumber (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13306: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13748: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13309: \$? = $ac_status" >&5 + echo "$as_me:13751: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13312: \"$ac_try\"") >&5 + { (eval echo "$as_me:13754: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13315: \$? = $ac_status" >&5 + echo "$as_me:13757: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else @@ -13323,7 +13765,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:13326: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "$as_me:13768: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" @@ -13335,7 +13777,7 @@ fi cf_x_athena=${cf_x_athena:-Xaw} -echo "$as_me:13338: checking if you want to link with Xaw 3d library" >&5 +echo "$as_me:13780: checking if you want to link with Xaw 3d library" >&5 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6 withval= @@ -13346,14 +13788,14 @@ if test "${with_Xaw3d+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=Xaw3d - echo "$as_me:13349: result: yes" >&5 + echo "$as_me:13791: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:13352: result: no" >&5 + echo "$as_me:13794: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:13356: checking if you want to link with Xaw 3d xft library" >&5 +echo "$as_me:13798: checking if you want to link with Xaw 3d xft library" >&5 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6 withval= @@ -13364,14 +13806,14 @@ if test "${with_Xaw3dxft+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=Xaw3dxft - echo "$as_me:13367: result: yes" >&5 + echo "$as_me:13809: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:13370: result: no" >&5 + echo "$as_me:13812: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:13374: checking if you want to link with neXT Athena library" >&5 +echo "$as_me:13816: checking if you want to link with neXT Athena library" >&5 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6 withval= @@ -13382,14 +13824,14 @@ if test "${with_neXtaw+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=neXtaw - echo "$as_me:13385: result: yes" >&5 + echo "$as_me:13827: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:13388: result: no" >&5 + echo "$as_me:13830: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:13392: checking if you want to link with Athena-Plus library" >&5 +echo "$as_me:13834: checking if you want to link with Athena-Plus library" >&5 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6 withval= @@ -13400,10 +13842,10 @@ if test "${with_XawPlus+set}" = set; then fi; if test "$withval" = yes ; then cf_x_athena=XawPlus - echo "$as_me:13403: result: yes" >&5 + echo "$as_me:13845: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:13406: result: no" >&5 + echo "$as_me:13848: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -13423,17 +13865,17 @@ if test "$PKG_CONFIG" != none ; then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6 -echo "${as_me:-configure}:13426: testing found package $cf_athena_pkg ..." 1>&5 +echo "${as_me:-configure}:13868: testing found package $cf_athena_pkg ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`" test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:13432: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:13874: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:13436: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:13878: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -13564,22 +14006,23 @@ EOF LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'` test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6 -echo "${as_me:-configure}:13567: testing ..trimmed $LIBS ..." 1>&5 +echo "${as_me:-configure}:14009: testing ..trimmed $LIBS ..." 1>&5 ;; esac done -echo "$as_me:13573: checking for usable $cf_x_athena/Xmu package" >&5 +echo "$as_me:14015: checking for usable $cf_x_athena/Xmu package" >&5 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6 if test "${cf_cv_xaw_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 13580 "configure" +#line 14022 "configure" #include "confdefs.h" +$ac_includes_default #include int @@ -13594,16 +14037,16 @@ int check = XmuCompareISOLatin1("big", "small"); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13597: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14040: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13600: \$? = $ac_status" >&5 + echo "$as_me:14043: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13603: \"$ac_try\"") >&5 + { (eval echo "$as_me:14046: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13606: \$? = $ac_status" >&5 + echo "$as_me:14049: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xaw_compat=yes else @@ -13613,7 +14056,7 @@ cf_cv_xaw_compat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:13616: result: $cf_cv_xaw_compat" >&5 +echo "$as_me:14059: result: $cf_cv_xaw_compat" >&5 echo "${ECHO_T}$cf_cv_xaw_compat" >&6 if test "$cf_cv_xaw_compat" = no @@ -13625,7 +14068,7 @@ echo "${ECHO_T}$cf_cv_xaw_compat" >&6 (*) test -n "$verbose" && echo " work around broken package" 1>&6 -echo "${as_me:-configure}:13628: testing work around broken package ..." 1>&5 +echo "${as_me:-configure}:14071: testing work around broken package ..." 1>&5 cf_save_xmu="$LIBS" cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'` @@ -13633,17 +14076,17 @@ echo "${as_me:-configure}:13628: testing work around broken package ..." 1>&5 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then test -n "$verbose" && echo " found package xmu" 1>&6 -echo "${as_me:-configure}:13636: testing found package xmu ..." 1>&5 +echo "${as_me:-configure}:14079: testing found package xmu ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`" test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:13642: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:14085: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:13646: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:14089: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -13763,12 +14206,12 @@ LIBS="$cf_add_libs" test -n "$verbose" && echo " ...before $LIBS" 1>&6 -echo "${as_me:-configure}:13766: testing ...before $LIBS ..." 1>&5 +echo "${as_me:-configure}:14209: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 -echo "${as_me:-configure}:13771: testing ...after $LIBS ..." 1>&5 +echo "${as_me:-configure}:14214: testing ...after $LIBS ..." 1>&5 else cf_pkgconfig_incs= @@ -13776,12 +14219,12 @@ else test -n "$verbose" && echo " ...before $LIBS" 1>&6 -echo "${as_me:-configure}:13779: testing ...before $LIBS ..." 1>&5 +echo "${as_me:-configure}:14222: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 -echo "${as_me:-configure}:13784: testing ...after $LIBS ..." 1>&5 +echo "${as_me:-configure}:14227: testing ...after $LIBS ..." 1>&5 fi @@ -13792,7 +14235,7 @@ fi LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'` test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6 -echo "${as_me:-configure}:13795: testing ..trimmed $LIBS ..." 1>&5 +echo "${as_me:-configure}:14238: testing ..trimmed $LIBS ..." 1>&5 ;; esac @@ -13817,17 +14260,17 @@ if test -z "$cf_x_athena_lib" ; then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then test -n "$verbose" && echo " found package Xext" 1>&6 -echo "${as_me:-configure}:13820: testing found package Xext ..." 1>&5 +echo "${as_me:-configure}:14263: testing found package Xext ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`" test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:13826: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:14269: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:13830: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:14273: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -13948,7 +14391,7 @@ else cf_pkgconfig_incs= cf_pkgconfig_libs= - echo "$as_me:13951: checking for XextCreateExtension in -lXext" >&5 + echo "$as_me:14394: checking for XextCreateExtension in -lXext" >&5 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13956,7 +14399,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 13959 "configure" +#line 14402 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -13965,7 +14408,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XextCreateExtension (); +char XextCreateExtension (void); int main (void) { @@ -13975,16 +14418,16 @@ XextCreateExtension (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:13978: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14421: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13981: \$? = $ac_status" >&5 + echo "$as_me:14424: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:13984: \"$ac_try\"") >&5 + { (eval echo "$as_me:14427: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13987: \$? = $ac_status" >&5 + echo "$as_me:14430: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_Xext_XextCreateExtension=yes else @@ -13995,7 +14438,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:13998: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 +echo "$as_me:14441: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then @@ -14031,17 +14474,17 @@ then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then test -n "$verbose" && echo " found package x11" 1>&6 -echo "${as_me:-configure}:14034: testing found package x11 ..." 1>&5 +echo "${as_me:-configure}:14477: testing found package x11 ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`" test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14040: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:14483: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14044: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:14487: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -14161,24 +14604,24 @@ LIBS="$cf_add_libs" else cf_pkgconfig_incs= cf_pkgconfig_libs= - { echo "$as_me:14164: WARNING: unable to find X11 library" >&5 + { echo "$as_me:14607: WARNING: unable to find X11 library" >&5 echo "$as_me: WARNING: unable to find X11 library" >&2;} fi if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then test -n "$verbose" && echo " found package ice" 1>&6 -echo "${as_me:-configure}:14171: testing found package ice ..." 1>&5 +echo "${as_me:-configure}:14614: testing found package ice ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`" test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14177: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:14620: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14181: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:14624: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -14298,24 +14741,24 @@ LIBS="$cf_add_libs" else cf_pkgconfig_incs= cf_pkgconfig_libs= - { echo "$as_me:14301: WARNING: unable to find ICE library" >&5 + { echo "$as_me:14744: WARNING: unable to find ICE library" >&5 echo "$as_me: WARNING: unable to find ICE library" >&2;} fi if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then test -n "$verbose" && echo " found package sm" 1>&6 -echo "${as_me:-configure}:14308: testing found package sm ..." 1>&5 +echo "${as_me:-configure}:14751: testing found package sm ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`" test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14314: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:14757: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14318: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:14761: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -14435,24 +14878,24 @@ LIBS="$cf_add_libs" else cf_pkgconfig_incs= cf_pkgconfig_libs= - { echo "$as_me:14438: WARNING: unable to find SM library" >&5 + { echo "$as_me:14881: WARNING: unable to find SM library" >&5 echo "$as_me: WARNING: unable to find SM library" >&2;} fi if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then test -n "$verbose" && echo " found package xt" 1>&6 -echo "${as_me:-configure}:14445: testing found package xt ..." 1>&5 +echo "${as_me:-configure}:14888: testing found package xt ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`" test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14451: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:14894: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14455: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:14898: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -14572,7 +15015,7 @@ LIBS="$cf_add_libs" else cf_pkgconfig_incs= cf_pkgconfig_libs= - { echo "$as_me:14575: WARNING: unable to find Xt library" >&5 + { echo "$as_me:15018: WARNING: unable to find Xt library" >&5 echo "$as_me: WARNING: unable to find Xt library" >&2;} fi @@ -14585,17 +15028,17 @@ cf_have_X_LIBS=no if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then test -n "$verbose" && echo " found package xt" 1>&6 -echo "${as_me:-configure}:14588: testing found package xt ..." 1>&5 +echo "${as_me:-configure}:15031: testing found package xt ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`" test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14594: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:15037: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14598: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:15041: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -14716,16 +15159,17 @@ LIBS="$cf_add_libs" ;; (*) # we have an "xt" package, but it may omit Xt's dependency on X11 -echo "$as_me:14719: checking for usable X dependency" >&5 +echo "$as_me:15162: checking for usable X dependency" >&5 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6 if test "${cf_cv_xt_x11_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14726 "configure" +#line 15169 "configure" #include "confdefs.h" +$ac_includes_default #include int @@ -14742,16 +15186,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:14745: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15189: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14748: \$? = $ac_status" >&5 + echo "$as_me:15192: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:14751: \"$ac_try\"") >&5 + { (eval echo "$as_me:15195: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14754: \$? = $ac_status" >&5 + echo "$as_me:15198: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xt_x11_compat=yes else @@ -14761,30 +15205,30 @@ cf_cv_xt_x11_compat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:14764: result: $cf_cv_xt_x11_compat" >&5 +echo "$as_me:15208: result: $cf_cv_xt_x11_compat" >&5 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6 if test "$cf_cv_xt_x11_compat" = no then test -n "$verbose" && echo " work around broken X11 dependency" 1>&6 -echo "${as_me:-configure}:14770: testing work around broken X11 dependency ..." 1>&5 +echo "${as_me:-configure}:15214: testing work around broken X11 dependency ..." 1>&5 # 2010/11/19 - good enough until a working Xt on Xcb is delivered. if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then test -n "$verbose" && echo " found package x11" 1>&6 -echo "${as_me:-configure}:14777: testing found package x11 ..." 1>&5 +echo "${as_me:-configure}:15221: testing found package x11 ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`" test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14783: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:15227: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14787: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:15231: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -14907,12 +15351,12 @@ else test -n "$verbose" && echo " ...before $LIBS" 1>&6 -echo "${as_me:-configure}:14910: testing ...before $LIBS ..." 1>&5 +echo "${as_me:-configure}:15354: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 -echo "${as_me:-configure}:14915: testing ...after $LIBS ..." 1>&5 +echo "${as_me:-configure}:15359: testing ...after $LIBS ..." 1>&5 fi @@ -14920,16 +15364,17 @@ fi ;; esac -echo "$as_me:14923: checking for usable X Toolkit package" >&5 +echo "$as_me:15367: checking for usable X Toolkit package" >&5 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6 if test "${cf_cv_xt_ice_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 14930 "configure" +#line 15374 "configure" #include "confdefs.h" +$ac_includes_default #include int @@ -14942,16 +15387,16 @@ int num = IceConnectionNumber(0); (void) num } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:14945: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15390: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14948: \$? = $ac_status" >&5 + echo "$as_me:15393: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:14951: \"$ac_try\"") >&5 + { (eval echo "$as_me:15396: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14954: \$? = $ac_status" >&5 + echo "$as_me:15399: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xt_ice_compat=yes else @@ -14961,7 +15406,7 @@ cf_cv_xt_ice_compat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:14964: result: $cf_cv_xt_ice_compat" >&5 +echo "$as_me:15409: result: $cf_cv_xt_ice_compat" >&5 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6 if test "$cf_cv_xt_ice_compat" = no @@ -14975,22 +15420,22 @@ echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6 (*) test -n "$verbose" && echo " work around broken ICE dependency" 1>&6 -echo "${as_me:-configure}:14978: testing work around broken ICE dependency ..." 1>&5 +echo "${as_me:-configure}:15423: testing work around broken ICE dependency ..." 1>&5 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then test -n "$verbose" && echo " found package ice" 1>&6 -echo "${as_me:-configure}:14983: testing found package ice ..." 1>&5 +echo "${as_me:-configure}:15428: testing found package ice ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`" test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:14989: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:15434: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:14993: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:15438: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -15109,17 +15554,17 @@ LIBS="$cf_add_libs" if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then test -n "$verbose" && echo " found package sm" 1>&6 -echo "${as_me:-configure}:15112: testing found package sm ..." 1>&5 +echo "${as_me:-configure}:15557: testing found package sm ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`" test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6 -echo "${as_me:-configure}:15118: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 +echo "${as_me:-configure}:15563: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6 -echo "${as_me:-configure}:15122: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 +echo "${as_me:-configure}:15567: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= @@ -15248,12 +15693,12 @@ else test -n "$verbose" && echo " ...before $LIBS" 1>&6 -echo "${as_me:-configure}:15251: testing ...before $LIBS ..." 1>&5 +echo "${as_me:-configure}:15696: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 -echo "${as_me:-configure}:15256: testing ...after $LIBS ..." 1>&5 +echo "${as_me:-configure}:15701: testing ...after $LIBS ..." 1>&5 fi @@ -15273,7 +15718,7 @@ else test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 -echo "${as_me:-configure}:15276: testing checking additions to CFLAGS ..." 1>&5 +echo "${as_me:-configure}:15721: testing checking additions to CFLAGS ..." 1>&5 cf_check_cflags="$CFLAGS" cf_check_cppflags="$CPPFLAGS" @@ -15358,7 +15803,7 @@ done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 -echo "${as_me:-configure}:15361: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 +echo "${as_me:-configure}:15806: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" @@ -15368,7 +15813,7 @@ fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 -echo "${as_me:-configure}:15371: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 +echo "${as_me:-configure}:15816: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" @@ -15378,7 +15823,7 @@ fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 -echo "${as_me:-configure}:15381: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 +echo "${as_me:-configure}:15826: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" @@ -15387,7 +15832,7 @@ fi if test "x$cf_check_cflags" != "x$CFLAGS" ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 15390 "configure" +#line 15835 "configure" #include "confdefs.h" #include int @@ -15399,16 +15844,16 @@ printf("Hello world"); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15402: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15847: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15405: \$? = $ac_status" >&5 + echo "$as_me:15850: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15408: \"$ac_try\"") >&5 + { (eval echo "$as_me:15853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15411: \$? = $ac_status" >&5 + echo "$as_me:15856: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -15416,12 +15861,12 @@ else cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 -echo "${as_me:-configure}:15419: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 +echo "${as_me:-configure}:15864: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 -echo "${as_me:-configure}:15424: testing but keeping change to \$CPPFLAGS ..." 1>&5 +echo "${as_me:-configure}:15869: testing but keeping change to \$CPPFLAGS ..." 1>&5 fi CFLAGS="$cf_check_cflags" @@ -15429,13 +15874,13 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi - echo "$as_me:15432: checking for XOpenDisplay" >&5 + echo "$as_me:15877: checking for XOpenDisplay" >&5 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6 if test "${ac_cv_func_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15438 "configure" +#line 15883 "configure" #include "confdefs.h" #define XOpenDisplay autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -15466,16 +15911,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15469: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15914: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15472: \$? = $ac_status" >&5 + echo "$as_me:15917: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15475: \"$ac_try\"") >&5 + { (eval echo "$as_me:15920: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15478: \$? = $ac_status" >&5 + echo "$as_me:15923: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_XOpenDisplay=yes else @@ -15485,13 +15930,13 @@ ac_cv_func_XOpenDisplay=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:15488: result: $ac_cv_func_XOpenDisplay" >&5 +echo "$as_me:15933: result: $ac_cv_func_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6 if test "$ac_cv_func_XOpenDisplay" = yes; then : else - echo "$as_me:15494: checking for XOpenDisplay in -lX11" >&5 + echo "$as_me:15939: checking for XOpenDisplay in -lX11" >&5 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15499,7 +15944,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 15502 "configure" +#line 15947 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -15508,7 +15953,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XOpenDisplay (); +char XOpenDisplay (void); int main (void) { @@ -15518,16 +15963,16 @@ XOpenDisplay (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15521: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15966: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15524: \$? = $ac_status" >&5 + echo "$as_me:15969: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15527: \"$ac_try\"") >&5 + { (eval echo "$as_me:15972: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15530: \$? = $ac_status" >&5 + echo "$as_me:15975: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_X11_XOpenDisplay=yes else @@ -15538,7 +15983,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:15541: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +echo "$as_me:15986: result: $ac_cv_lib_X11_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then @@ -15562,13 +16007,13 @@ fi fi - echo "$as_me:15565: checking for XtAppInitialize" >&5 + echo "$as_me:16010: checking for XtAppInitialize" >&5 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6 if test "${ac_cv_func_XtAppInitialize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 15571 "configure" +#line 16016 "configure" #include "confdefs.h" #define XtAppInitialize autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -15599,16 +16044,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15602: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16047: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15605: \$? = $ac_status" >&5 + echo "$as_me:16050: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15608: \"$ac_try\"") >&5 + { (eval echo "$as_me:16053: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15611: \$? = $ac_status" >&5 + echo "$as_me:16056: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_XtAppInitialize=yes else @@ -15618,13 +16063,13 @@ ac_cv_func_XtAppInitialize=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:15621: result: $ac_cv_func_XtAppInitialize" >&5 +echo "$as_me:16066: result: $ac_cv_func_XtAppInitialize" >&5 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6 if test "$ac_cv_func_XtAppInitialize" = yes; then : else - echo "$as_me:15627: checking for XtAppInitialize in -lXt" >&5 + echo "$as_me:16072: checking for XtAppInitialize in -lXt" >&5 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15632,7 +16077,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 15635 "configure" +#line 16080 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -15641,7 +16086,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XtAppInitialize (); +char XtAppInitialize (void); int main (void) { @@ -15651,16 +16096,16 @@ XtAppInitialize (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15654: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16099: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15657: \$? = $ac_status" >&5 + echo "$as_me:16102: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15660: \"$ac_try\"") >&5 + { (eval echo "$as_me:16105: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15663: \$? = $ac_status" >&5 + echo "$as_me:16108: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_Xt_XtAppInitialize=yes else @@ -15671,7 +16116,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:15674: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 +echo "$as_me:16119: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then @@ -15688,7 +16133,7 @@ fi fi if test "$cf_have_X_LIBS" = no ; then - { echo "$as_me:15691: WARNING: Unable to successfully link X Toolkit library (-lXt) with + { echo "$as_me:16136: WARNING: Unable to successfully link X Toolkit library (-lXt) with test program. You will have to check and add the proper libraries by hand to makefile." >&5 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with @@ -15729,14 +16174,14 @@ done test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_path/include" - echo "$as_me:15732: checking for $cf_test in $cf_path" >&5 + echo "$as_me:16177: checking for $cf_test in $cf_path" >&5 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6 else - echo "$as_me:15735: checking for $cf_test" >&5 + echo "$as_me:16180: checking for $cf_test" >&5 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6 fi cat >"conftest.$ac_ext" <<_ACEOF -#line 15739 "configure" +#line 16184 "configure" #include "confdefs.h" #include @@ -15750,16 +16195,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:15753: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:16198: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:15756: \$? = $ac_status" >&5 + echo "$as_me:16201: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:15759: \"$ac_try\"") >&5 + { (eval echo "$as_me:16204: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15762: \$? = $ac_status" >&5 + echo "$as_me:16207: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -15768,7 +16213,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:15771: result: $cf_result" >&5 + echo "$as_me:16216: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS" @@ -15784,7 +16229,7 @@ CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS" done if test -z "$cf_x_athena_inc" ; then - { echo "$as_me:15787: WARNING: Unable to find Athena header files" >&5 + { echo "$as_me:16232: WARNING: Unable to find Athena header files" >&5 echo "$as_me: WARNING: Unable to find Athena header files" >&2;} elif test "$cf_x_athena_inc" != default ; then @@ -15849,12 +16294,13 @@ for cf_add_1lib in $cf_add_0lib; do done LIBS="$cf_add_libs" - echo "$as_me:15852: checking for $cf_test in $cf_libs" >&5 + echo "$as_me:16297: checking for $cf_test in $cf_libs" >&5 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 15855 "configure" +#line 16300 "configure" #include "confdefs.h" +$ac_includes_default #include #include @@ -15868,16 +16314,16 @@ $cf_test((XtAppContext) 0) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:15871: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16317: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15874: \$? = $ac_status" >&5 + echo "$as_me:16320: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:15877: \"$ac_try\"") >&5 + { (eval echo "$as_me:16323: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15880: \$? = $ac_status" >&5 + echo "$as_me:16326: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -15886,7 +16332,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:15889: result: $cf_result" >&5 + echo "$as_me:16335: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS" @@ -15903,7 +16349,7 @@ CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS" done if test -z "$cf_x_athena_lib" ; then - { { echo "$as_me:15906: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 + { { echo "$as_me:16352: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;} { (exit 1); exit 1; }; } fi @@ -15937,7 +16383,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:15940: checking for $ac_word" >&5 +echo "$as_me:16386: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15952,7 +16398,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog" -echo "$as_me:15955: found $ac_dir/$ac_word" >&5 +echo "$as_me:16401: found $ac_dir/$ac_word" >&5 break done @@ -15960,10 +16406,10 @@ fi fi XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG if test -n "$XCURSES_CONFIG"; then - echo "$as_me:15963: result: $XCURSES_CONFIG" >&5 + echo "$as_me:16409: result: $XCURSES_CONFIG" >&5 echo "${ECHO_T}$XCURSES_CONFIG" >&6 else - echo "$as_me:15966: result: no" >&5 + echo "$as_me:16412: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -15976,7 +16422,7 @@ if test -z "$XCURSES_CONFIG"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:15979: checking for $ac_word" >&5 +echo "$as_me:16425: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15991,7 +16437,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog" -echo "$as_me:15994: found $ac_dir/$ac_word" >&5 +echo "$as_me:16440: found $ac_dir/$ac_word" >&5 break done @@ -15999,10 +16445,10 @@ fi fi ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG if test -n "$ac_ct_XCURSES_CONFIG"; then - echo "$as_me:16002: result: $ac_ct_XCURSES_CONFIG" >&5 + echo "$as_me:16448: result: $ac_ct_XCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6 else - echo "$as_me:16005: result: no" >&5 + echo "$as_me:16451: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -16137,7 +16583,7 @@ LDFLAGS="$LDFLAGS $X_LIBS" test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 -echo "${as_me:-configure}:16140: testing checking additions to CFLAGS ..." 1>&5 +echo "${as_me:-configure}:16586: testing checking additions to CFLAGS ..." 1>&5 cf_check_cflags="$CFLAGS" cf_check_cppflags="$CPPFLAGS" @@ -16222,7 +16668,7 @@ done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 -echo "${as_me:-configure}:16225: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 +echo "${as_me:-configure}:16671: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" @@ -16232,7 +16678,7 @@ fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 -echo "${as_me:-configure}:16235: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 +echo "${as_me:-configure}:16681: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" @@ -16242,7 +16688,7 @@ fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 -echo "${as_me:-configure}:16245: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 +echo "${as_me:-configure}:16691: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" @@ -16251,7 +16697,7 @@ fi if test "x$cf_check_cflags" != "x$CFLAGS" ; then cat >"conftest.$ac_ext" <<_ACEOF -#line 16254 "configure" +#line 16700 "configure" #include "confdefs.h" #include int @@ -16263,16 +16709,16 @@ printf("Hello world"); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16266: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16712: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16269: \$? = $ac_status" >&5 + echo "$as_me:16715: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16272: \"$ac_try\"") >&5 + { (eval echo "$as_me:16718: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16275: \$? = $ac_status" >&5 + echo "$as_me:16721: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -16280,12 +16726,12 @@ else cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 -echo "${as_me:-configure}:16283: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 +echo "${as_me:-configure}:16729: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 -echo "${as_me:-configure}:16288: testing but keeping change to \$CPPFLAGS ..." 1>&5 +echo "${as_me:-configure}:16734: testing but keeping change to \$CPPFLAGS ..." 1>&5 fi CFLAGS="$cf_check_cflags" @@ -16293,7 +16739,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:16296: checking for XOpenDisplay in -lX11" >&5 +echo "$as_me:16742: checking for XOpenDisplay in -lX11" >&5 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16301,7 +16747,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 16304 "configure" +#line 16750 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -16310,7 +16756,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XOpenDisplay (); +char XOpenDisplay (void); int main (void) { @@ -16320,16 +16766,16 @@ XOpenDisplay (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16323: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16769: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16326: \$? = $ac_status" >&5 + echo "$as_me:16772: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16329: \"$ac_try\"") >&5 + { (eval echo "$as_me:16775: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16332: \$? = $ac_status" >&5 + echo "$as_me:16778: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_X11_XOpenDisplay=yes else @@ -16340,7 +16786,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:16343: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +echo "$as_me:16789: result: $ac_cv_lib_X11_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then @@ -16362,7 +16808,7 @@ LIBS="$cf_add_libs" fi -echo "$as_me:16365: checking for XCurses library" >&5 +echo "$as_me:16811: checking for XCurses library" >&5 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6 if test "${cf_cv_lib_XCurses+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16385,7 +16831,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 16388 "configure" +#line 16834 "configure" #include "confdefs.h" #include @@ -16400,16 +16846,16 @@ XCursesExit(); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16403: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16849: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16406: \$? = $ac_status" >&5 + echo "$as_me:16852: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16409: \"$ac_try\"") >&5 + { (eval echo "$as_me:16855: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16412: \$? = $ac_status" >&5 + echo "$as_me:16858: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_lib_XCurses=yes else @@ -16420,7 +16866,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:16423: result: $cf_cv_lib_XCurses" >&5 +echo "$as_me:16869: result: $cf_cv_lib_XCurses" >&5 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6 fi @@ -16435,23 +16881,23 @@ cat >>confdefs.h <<\EOF #define XCURSES 1 EOF - echo "$as_me:16438: checking for xcurses.h" >&5 + echo "$as_me:16884: checking for xcurses.h" >&5 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6 if test "${ac_cv_header_xcurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 16444 "configure" +#line 16890 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:16448: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:16894: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:16454: \$? = $ac_status" >&5 + echo "$as_me:16900: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -16470,7 +16916,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:16473: result: $ac_cv_header_xcurses_h" >&5 +echo "$as_me:16919: result: $ac_cv_header_xcurses_h" >&5 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6 if test "$ac_cv_header_xcurses_h" = yes; then @@ -16481,14 +16927,14 @@ EOF fi else - { { echo "$as_me:16484: error: Cannot link with XCurses" >&5 + { { echo "$as_me:16930: error: Cannot link with XCurses" >&5 echo "$as_me: error: Cannot link with XCurses" >&2;} { (exit 1); exit 1; }; } fi ;; (*) - { { echo "$as_me:16491: error: unexpected screen-value: $cf_cv_screen" >&5 + { { echo "$as_me:16937: error: unexpected screen-value: $cf_cv_screen" >&5 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;} { (exit 1); exit 1; }; } ;; @@ -16496,7 +16942,7 @@ esac : ${cf_nculib_root:=$cf_cv_screen} as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh` -echo "$as_me:16499: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5 +echo "$as_me:16945: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16504,7 +16950,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 16507 "configure" +#line 16953 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -16513,7 +16959,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char _nc_init_pthreads (); +char _nc_init_pthreads (void); int main (void) { @@ -16523,16 +16969,16 @@ _nc_init_pthreads (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16526: \"$ac_link\"") >&5 +if { (eval echo "$as_me:16972: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16529: \$? = $ac_status" >&5 + echo "$as_me:16975: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16532: \"$ac_try\"") >&5 + { (eval echo "$as_me:16978: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16535: \$? = $ac_status" >&5 + echo "$as_me:16981: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else @@ -16543,7 +16989,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:16546: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 +echo "$as_me:16992: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then cf_cv_ncurses_pthreads=yes @@ -16578,7 +17024,7 @@ case $cf_cv_screen in ;; esac -echo "$as_me:16581: checking for X11 rgb file" >&5 +echo "$as_me:17027: checking for X11 rgb file" >&5 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6 # Check whether --with-x11-rgb or --without-x11-rgb was given. @@ -16642,7 +17088,7 @@ case ".$cf_path" in cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%` ;; (*) - { { echo "$as_me:16645: error: expected a pathname, not \"$cf_path\"" >&5 + { { echo "$as_me:17091: error: expected a pathname, not \"$cf_path\"" >&5 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -16650,7 +17096,7 @@ esac fi -echo "$as_me:16653: result: $RGB_PATH" >&5 +echo "$as_me:17099: result: $RGB_PATH" >&5 echo "${ECHO_T}$RGB_PATH" >&6 cat >>confdefs.h <&5 +echo "$as_me:17140: checking for desired basename for form library" >&5 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6 # Check whether --with-form-libname or --without-form-libname was given. @@ -16711,10 +17157,10 @@ case "x$FORM_NAME" in ;; esac -echo "$as_me:16714: result: $FORM_NAME" >&5 +echo "$as_me:17160: result: $FORM_NAME" >&5 echo "${ECHO_T}$FORM_NAME" >&6 -echo "$as_me:16717: checking for desired basename for menu library" >&5 +echo "$as_me:17163: checking for desired basename for menu library" >&5 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6 # Check whether --with-menu-libname or --without-menu-libname was given. @@ -16734,10 +17180,10 @@ case "x$MENU_NAME" in ;; esac -echo "$as_me:16737: result: $MENU_NAME" >&5 +echo "$as_me:17183: result: $MENU_NAME" >&5 echo "${ECHO_T}$MENU_NAME" >&6 -echo "$as_me:16740: checking for desired basename for panel library" >&5 +echo "$as_me:17186: checking for desired basename for panel library" >&5 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6 # Check whether --with-panel-libname or --without-panel-libname was given. @@ -16757,10 +17203,10 @@ case "x$PANEL_NAME" in ;; esac -echo "$as_me:16760: result: $PANEL_NAME" >&5 +echo "$as_me:17206: result: $PANEL_NAME" >&5 echo "${ECHO_T}$PANEL_NAME" >&6 -echo "$as_me:16763: checking if you want to check for panel functions" >&5 +echo "$as_me:17209: checking if you want to check for panel functions" >&5 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6 # Check whether --enable-panel or --disable-panel was given. @@ -16777,7 +17223,7 @@ else cf_enable_panel=$cf_default_panel fi; -echo "$as_me:16780: result: $cf_enable_panel" >&5 +echo "$as_me:17226: result: $cf_enable_panel" >&5 echo "${ECHO_T}$cf_enable_panel" >&6 if test $cf_enable_panel = yes then @@ -16788,13 +17234,13 @@ cf_have_curses_lib=no if test "x${NCURSES_CONFIG_PKG}" = xnone; then : elif test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:16791: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5 + echo "$as_me:17237: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then - echo "$as_me:16794: result: yes" >&5 + echo "$as_me:17240: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:16797: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5 + echo "$as_me:17243: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" @@ -16944,7 +17390,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 16947 "configure" +#line 17393 "configure" #include "confdefs.h" #include <$PANEL_NAME.h> int @@ -16956,37 +17402,37 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:16959: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17405: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16962: \$? = $ac_status" >&5 + echo "$as_me:17408: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:16965: \"$ac_try\"") >&5 + { (eval echo "$as_me:17411: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16968: \$? = $ac_status" >&5 + echo "$as_me:17414: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_curses_lib=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 16974 "configure" +#line 17420 "configure" #include "confdefs.h" #include <$PANEL_NAME.h> int main(void) { (void) new_panel ( 0 ); return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:16981: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17427: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:16984: \$? = $ac_status" >&5 + echo "$as_me:17430: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:16986: \"$ac_try\"") >&5 + { (eval echo "$as_me:17432: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:16989: \$? = $ac_status" >&5 + echo "$as_me:17435: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_curses_lib=yes else @@ -17003,7 +17449,7 @@ cat "conftest.$ac_ext" >&5 cf_have_curses_lib=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:17006: result: $cf_have_curses_lib" >&5 + echo "$as_me:17452: result: $cf_have_curses_lib" >&5 echo "${ECHO_T}$cf_have_curses_lib" >&6 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes if test "$cf_have_curses_lib" = "yes" @@ -17024,7 +17470,7 @@ EOF fi if test "$cf_have_curses_lib" = no; then as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh` -echo "$as_me:17027: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5 +echo "$as_me:17473: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17032,7 +17478,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 17035 "configure" +#line 17481 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -17041,7 +17487,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char new_panel (); +char new_panel (void); int main (void) { @@ -17051,16 +17497,16 @@ new_panel (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17054: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17500: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17057: \$? = $ac_status" >&5 + echo "$as_me:17503: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17060: \"$ac_try\"") >&5 + { (eval echo "$as_me:17506: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17063: \$? = $ac_status" >&5 + echo "$as_me:17509: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else @@ -17071,7 +17517,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:17074: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 +echo "$as_me:17520: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then @@ -17104,7 +17550,7 @@ fi cf_curses_headers="$cf_curses_headers panel.h" fi -echo "$as_me:17107: checking if you want to check for menu functions" >&5 +echo "$as_me:17553: checking if you want to check for menu functions" >&5 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6 # Check whether --enable-menu or --disable-menu was given. @@ -17121,7 +17567,7 @@ else cf_enable_menu=$cf_default_menu fi; -echo "$as_me:17124: result: $cf_enable_menu" >&5 +echo "$as_me:17570: result: $cf_enable_menu" >&5 echo "${ECHO_T}$cf_enable_menu" >&6 if test $cf_enable_menu = yes then @@ -17130,14 +17576,14 @@ then ;; (curses*) -echo "$as_me:17133: checking for NetBSD menu.h" >&5 +echo "$as_me:17579: checking for NetBSD menu.h" >&5 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6 if test "${cf_cv_netbsd_menu_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17140 "configure" +#line 17586 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -17155,16 +17601,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:17158: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:17604: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:17161: \$? = $ac_status" >&5 + echo "$as_me:17607: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:17164: \"$ac_try\"") >&5 + { (eval echo "$as_me:17610: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17167: \$? = $ac_status" >&5 + echo "$as_me:17613: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_netbsd_menu_h=yes @@ -17176,7 +17622,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:17179: result: $cf_cv_netbsd_menu_h" >&5 +echo "$as_me:17625: result: $cf_cv_netbsd_menu_h" >&5 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6 test "$cf_cv_netbsd_menu_h" = yes && @@ -17193,13 +17639,13 @@ cf_have_curses_lib=no if test "x${NCURSES_CONFIG_PKG}" = xnone; then : elif test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:17196: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5 + echo "$as_me:17642: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then - echo "$as_me:17199: result: yes" >&5 + echo "$as_me:17645: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:17202: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5 + echo "$as_me:17648: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" @@ -17349,7 +17795,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 17352 "configure" +#line 17798 "configure" #include "confdefs.h" #include <$MENU_NAME.h> int @@ -17361,37 +17807,37 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17364: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17810: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17367: \$? = $ac_status" >&5 + echo "$as_me:17813: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17370: \"$ac_try\"") >&5 + { (eval echo "$as_me:17816: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17373: \$? = $ac_status" >&5 + echo "$as_me:17819: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_curses_lib=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 17379 "configure" +#line 17825 "configure" #include "confdefs.h" #include <$MENU_NAME.h> int main(void) { (void) menu_driver ( 0,0 ); return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:17386: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17832: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17389: \$? = $ac_status" >&5 + echo "$as_me:17835: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:17391: \"$ac_try\"") >&5 + { (eval echo "$as_me:17837: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17394: \$? = $ac_status" >&5 + echo "$as_me:17840: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_curses_lib=yes else @@ -17408,7 +17854,7 @@ cat "conftest.$ac_ext" >&5 cf_have_curses_lib=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:17411: result: $cf_have_curses_lib" >&5 + echo "$as_me:17857: result: $cf_have_curses_lib" >&5 echo "${ECHO_T}$cf_have_curses_lib" >&6 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes if test "$cf_have_curses_lib" = "yes" @@ -17429,7 +17875,7 @@ EOF fi if test "$cf_have_curses_lib" = no; then as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh` -echo "$as_me:17432: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5 +echo "$as_me:17878: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17437,7 +17883,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 17440 "configure" +#line 17886 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -17446,7 +17892,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char menu_driver (); +char menu_driver (void); int main (void) { @@ -17456,16 +17902,16 @@ menu_driver (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17459: \"$ac_link\"") >&5 +if { (eval echo "$as_me:17905: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17462: \$? = $ac_status" >&5 + echo "$as_me:17908: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17465: \"$ac_try\"") >&5 + { (eval echo "$as_me:17911: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17468: \$? = $ac_status" >&5 + echo "$as_me:17914: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else @@ -17476,7 +17922,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:17479: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 +echo "$as_me:17925: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then @@ -17509,7 +17955,7 @@ fi cf_curses_headers="$cf_curses_headers menu.h" fi -echo "$as_me:17512: checking if you want to check for form functions" >&5 +echo "$as_me:17958: checking if you want to check for form functions" >&5 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6 # Check whether --enable-form or --disable-form was given. @@ -17526,7 +17972,7 @@ else cf_enable_form=$cf_default_form fi; -echo "$as_me:17529: result: $cf_enable_form" >&5 +echo "$as_me:17975: result: $cf_enable_form" >&5 echo "${ECHO_T}$cf_enable_form" >&6 if test $cf_enable_form = yes then @@ -17535,14 +17981,14 @@ then ;; (curses*) -echo "$as_me:17538: checking for NetBSD form.h" >&5 +echo "$as_me:17984: checking for NetBSD form.h" >&5 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6 if test "${cf_cv_netbsd_form_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 17545 "configure" +#line 17991 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -17561,16 +18007,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:17564: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:18010: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:17567: \$? = $ac_status" >&5 + echo "$as_me:18013: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:17570: \"$ac_try\"") >&5 + { (eval echo "$as_me:18016: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17573: \$? = $ac_status" >&5 + echo "$as_me:18019: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_netbsd_form_h=yes @@ -17582,7 +18028,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:17585: result: $cf_cv_netbsd_form_h" >&5 +echo "$as_me:18031: result: $cf_cv_netbsd_form_h" >&5 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6 test "$cf_cv_netbsd_form_h" = yes && @@ -17599,13 +18045,13 @@ cf_have_curses_lib=no if test "x${NCURSES_CONFIG_PKG}" = xnone; then : elif test "x${PKG_CONFIG:=none}" != xnone; then - echo "$as_me:17602: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5 + echo "$as_me:18048: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then - echo "$as_me:17605: result: yes" >&5 + echo "$as_me:18051: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:17608: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5 + echo "$as_me:18054: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" @@ -17755,7 +18201,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 17758 "configure" +#line 18204 "configure" #include "confdefs.h" #include <$FORM_NAME.h> int @@ -17767,37 +18213,37 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17770: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18216: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17773: \$? = $ac_status" >&5 + echo "$as_me:18219: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17776: \"$ac_try\"") >&5 + { (eval echo "$as_me:18222: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17779: \$? = $ac_status" >&5 + echo "$as_me:18225: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_curses_lib=maybe else cat >"conftest.$ac_ext" <<_ACEOF -#line 17785 "configure" +#line 18231 "configure" #include "confdefs.h" #include <$FORM_NAME.h> int main(void) { (void) form_driver ( 0,0 ); return 0; } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:17792: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18238: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17795: \$? = $ac_status" >&5 + echo "$as_me:18241: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:17797: \"$ac_try\"") >&5 + { (eval echo "$as_me:18243: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17800: \$? = $ac_status" >&5 + echo "$as_me:18246: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_curses_lib=yes else @@ -17814,7 +18260,7 @@ cat "conftest.$ac_ext" >&5 cf_have_curses_lib=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" - echo "$as_me:17817: result: $cf_have_curses_lib" >&5 + echo "$as_me:18263: result: $cf_have_curses_lib" >&5 echo "${ECHO_T}$cf_have_curses_lib" >&6 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes if test "$cf_have_curses_lib" = "yes" @@ -17835,7 +18281,7 @@ EOF fi if test "$cf_have_curses_lib" = no; then as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh` -echo "$as_me:17838: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5 +echo "$as_me:18284: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -17843,7 +18289,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 17846 "configure" +#line 18292 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -17852,7 +18298,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char form_driver (); +char form_driver (void); int main (void) { @@ -17862,16 +18308,16 @@ form_driver (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:17865: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18311: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:17868: \$? = $ac_status" >&5 + echo "$as_me:18314: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:17871: \"$ac_try\"") >&5 + { (eval echo "$as_me:18317: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:17874: \$? = $ac_status" >&5 + echo "$as_me:18320: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else @@ -17882,7 +18328,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:17885: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 +echo "$as_me:18331: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then @@ -17920,196 +18366,58 @@ fi for ac_header in $cf_curses_headers do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:17923: checking for $ac_header" >&5 +echo "$as_me:18369: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 17929 "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:17933: \"$ac_cpp "conftest.$ac_ext"\"") >&5 - (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - $EGREP -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:17939: \$? = $ac_status" >&5 - (exit "$ac_status"); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 - cat "conftest.$ac_ext" >&5 - eval "$as_ac_Header=no" -fi -rm -f conftest.err "conftest.$ac_ext" -fi -echo "$as_me:17958: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 -echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 -if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 17974 "configure" -#include "confdefs.h" -#include -#include -#include -#include - -_ACEOF -if { (eval echo "$as_me:17982: \"$ac_cpp "conftest.$ac_ext"\"") >&5 - (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - $EGREP -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:17988: \$? = $ac_status" >&5 - (exit "$ac_status"); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 - cat "conftest.$ac_ext" >&5 - ac_cv_header_stdc=no -fi -rm -f conftest.err "conftest.$ac_ext" - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 18010 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >"conftest.$ac_ext" <<_ACEOF -#line 18028 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -rf conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >"conftest.$ac_ext" <<_ACEOF -#line 18049 "configure" -#include "confdefs.h" -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main (void) -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - $ac_main_return(2); - $ac_main_return (0); -} +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 18375 "configure" +#include "confdefs.h" +#include <$ac_header> _ACEOF -rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:18075: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:18078: \$? = $ac_status" >&5 - (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:18080: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:18379: \"$ac_cpp "conftest.$ac_ext"\"") >&5 + (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? - echo "$as_me:18083: \$? = $ac_status" >&5 - (exit "$ac_status"); }; }; then - : + $EGREP -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:18385: \$? = $ac_status" >&5 + (exit "$ac_status"); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat "conftest.$ac_ext" >&5 -ac_cv_header_stdc=no -fi -rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat "conftest.$ac_ext" >&5 + eval "$as_ac_Header=no" fi +rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:18096: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 +echo "$as_me:18404: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 +if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then + cat >>confdefs.h <&5 +echo "$as_me:18414: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18112 "configure" +#line 18420 "configure" #include "confdefs.h" #include #include @@ -18125,16 +18433,16 @@ return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18128: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:18436: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18131: \$? = $ac_status" >&5 + echo "$as_me:18439: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18134: \"$ac_try\"") >&5 + { (eval echo "$as_me:18442: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18137: \$? = $ac_status" >&5 + echo "$as_me:18445: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_header_time=yes else @@ -18144,7 +18452,7 @@ ac_cv_header_time=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:18147: result: $ac_cv_header_time" >&5 +echo "$as_me:18455: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then @@ -18159,7 +18467,6 @@ getopt.h \ locale.h \ math.h \ stdarg.h \ -stdint.h \ sys/ioctl.h \ sys/select.h \ sys/time.h \ @@ -18168,23 +18475,23 @@ unistd.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:18171: checking for $ac_header" >&5 +echo "$as_me:18478: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18177 "configure" +#line 18484 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:18181: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:18488: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:18187: \$? = $ac_status" >&5 + echo "$as_me:18494: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -18203,7 +18510,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:18206: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:18513: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:18526: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18225 "configure" +#line 18532 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:18229: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:18536: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:18235: \$? = $ac_status" >&5 + echo "$as_me:18542: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -18251,7 +18558,7 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:18254: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 +echo "$as_me:18561: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:18571: checking for header declaring getopt variables" >&5 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6 if test "${cf_cv_getopt_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18271,7 +18578,7 @@ cf_cv_getopt_header=none for cf_header in stdio.h stdlib.h unistd.h getopt.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 18274 "configure" +#line 18581 "configure" #include "confdefs.h" #include <$cf_header> @@ -18284,16 +18591,16 @@ int x = optind; char *y = optarg; (void)x; (void)y } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18287: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:18594: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18290: \$? = $ac_status" >&5 + echo "$as_me:18597: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18293: \"$ac_try\"") >&5 + { (eval echo "$as_me:18600: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18296: \$? = $ac_status" >&5 + echo "$as_me:18603: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_getopt_header=$cf_header break @@ -18305,7 +18612,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:18308: result: $cf_cv_getopt_header" >&5 +echo "$as_me:18615: result: $cf_cv_getopt_header" >&5 echo "${ECHO_T}$cf_cv_getopt_header" >&6 if test "$cf_cv_getopt_header" != none ; then @@ -18322,9 +18629,201 @@ EOF fi +echo "$as_me:18632: checking for clock_gettime" >&5 +echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6 +if test "${cf_cv_func_clock_gettime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >"conftest.$ac_ext" <<_ACEOF +#line 18639 "configure" +#include "confdefs.h" +#include +int +main (void) +{ +struct timespec ts; + int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:18652: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:18655: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:18658: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:18661: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + cf_cv_func_clock_gettime=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +cf_cv_func_clock_gettime=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" + +fi +echo "$as_me:18672: result: $cf_cv_func_clock_gettime" >&5 +echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6 + +if test "$cf_cv_func_clock_gettime" = yes +then + +cat >>confdefs.h <<\EOF +#define HAVE_CLOCK_GETTIME 1 +EOF + +else +echo "$as_me:18683: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 +if test "${ac_cv_func_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >"conftest.$ac_ext" <<_ACEOF +#line 18689 "configure" +#include "confdefs.h" +#define gettimeofday autoconf_temporary +#include /* least-intrusive standard header which defines gcc2 __stub macros */ +#undef gettimeofday + +#ifdef __cplusplus +extern "C" +#endif + +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gettimeofday (void); + +int +main (void) +{ + +/* The GNU C library defines stubs for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#error found stub for gettimeofday +#endif + + return gettimeofday (); + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:18720: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:18723: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:18726: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:18729: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_func_gettimeofday=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_func_gettimeofday=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +fi +echo "$as_me:18739: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +if test "$ac_cv_func_gettimeofday" = yes; then + +cat >>confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 +EOF + +else + +echo "$as_me:18749: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >"conftest.$ac_ext" <<_ACEOF +#line 18757 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gettimeofday (void); +int +main (void) +{ +gettimeofday (); + ; + return 0; +} +_ACEOF +rm -f "conftest.$ac_objext" "conftest$ac_exeext" +if { (eval echo "$as_me:18776: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:18779: \$? = $ac_status" >&5 + (exit "$ac_status"); } && + { ac_try='test -s "conftest$ac_exeext"' + { (eval echo "$as_me:18782: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:18785: \$? = $ac_status" >&5 + (exit "$ac_status"); }; }; then + ac_cv_lib_bsd_gettimeofday=yes +else + echo "$as_me: failed program was:" >&5 +cat "conftest.$ac_ext" >&5 +ac_cv_lib_bsd_gettimeofday=no +fi +rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:18796: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +if test "$ac_cv_lib_bsd_gettimeofday" = yes; then + +cat >>confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 +EOF + +cf_add_libs="$LIBS" +# reverse order +cf_add_0lib= +for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done +# filter duplicates +for cf_add_1lib in $cf_add_0lib; do + for cf_add_2lib in $cf_add_libs; do + if test "x$cf_add_1lib" = "x$cf_add_2lib"; then + cf_add_1lib= + break + fi + done + test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" +done +LIBS="$cf_add_libs" + +fi + +fi +fi + for ac_func in \ getopt \ -gettimeofday \ snprintf \ strdup \ strstr \ @@ -18332,13 +18831,13 @@ tsearch \ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:18335: checking for $ac_func" >&5 +echo "$as_me:18834: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18341 "configure" +#line 18840 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -18369,16 +18868,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18372: \"$ac_link\"") >&5 +if { (eval echo "$as_me:18871: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18375: \$? = $ac_status" >&5 + echo "$as_me:18874: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18378: \"$ac_try\"") >&5 + { (eval echo "$as_me:18877: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18381: \$? = $ac_status" >&5 + echo "$as_me:18880: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -18388,7 +18887,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:18391: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:18890: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:18901: checking if we can use termcap.h" >&5 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6 if test "${cf_cv_have_termcap_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18409 "configure" +#line 18908 "configure" #include "confdefs.h" #include @@ -18427,16 +18926,16 @@ return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18430: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:18929: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18433: \$? = $ac_status" >&5 + echo "$as_me:18932: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18436: \"$ac_try\"") >&5 + { (eval echo "$as_me:18935: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18439: \$? = $ac_status" >&5 + echo "$as_me:18938: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have_termcap_h=yes else @@ -18446,7 +18945,7 @@ cf_cv_have_termcap_h=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:18449: result: $cf_cv_have_termcap_h" >&5 +echo "$as_me:18948: result: $cf_cv_have_termcap_h" >&5 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6 if test "x$cf_cv_have_termcap_h" = xyes then @@ -18456,14 +18955,14 @@ cat >>confdefs.h <<\EOF EOF else -echo "$as_me:18459: checking if we can use ncurses/termcap.h" >&5 +echo "$as_me:18958: checking if we can use ncurses/termcap.h" >&5 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18466 "configure" +#line 18965 "configure" #include "confdefs.h" #include @@ -18484,16 +18983,16 @@ return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18487: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:18986: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18490: \$? = $ac_status" >&5 + echo "$as_me:18989: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18493: \"$ac_try\"") >&5 + { (eval echo "$as_me:18992: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18496: \$? = $ac_status" >&5 + echo "$as_me:18995: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_have_ncurses_termcap_h=yes else @@ -18503,7 +19002,7 @@ cf_cv_have_ncurses_termcap_h=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:18506: result: $cf_cv_have_ncurses_termcap_h" >&5 +echo "$as_me:19005: result: $cf_cv_have_ncurses_termcap_h" >&5 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6 test "x$cf_cv_have_ncurses_termcap_h" = xyes && cat >>confdefs.h <<\EOF @@ -18513,7 +19012,7 @@ EOF fi if test "x$ac_cv_func_getopt" = xno; then - { { echo "$as_me:18516: error: getopt is required for building programs" >&5 + { { echo "$as_me:19015: error: getopt is required for building programs" >&5 echo "$as_me: error: getopt is required for building programs" >&2;} { (exit 1); exit 1; }; } fi @@ -18532,13 +19031,13 @@ wcstombs \ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:18535: checking for $ac_func" >&5 +echo "$as_me:19034: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 18541 "configure" +#line 19040 "configure" #include "confdefs.h" #define $ac_func autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -18569,16 +19068,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18572: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19071: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18575: \$? = $ac_status" >&5 + echo "$as_me:19074: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18578: \"$ac_try\"") >&5 + { (eval echo "$as_me:19077: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18581: \$? = $ac_status" >&5 + echo "$as_me:19080: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_var=yes" else @@ -18588,7 +19087,7 @@ eval "$as_ac_var=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:18591: result: `eval echo '${'"$as_ac_var"'}'`" >&5 +echo "$as_me:19090: result: `eval echo '${'"$as_ac_var"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then cat >>confdefs.h <&5 +echo "$as_me:19102: checking definition to turn on extended curses functions" >&5 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6 if test "${cf_cv_need_xopen_extension+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18608,10 +19107,10 @@ else cf_cv_need_xopen_extension=unknown cat >"conftest.$ac_ext" <<_ACEOF -#line 18611 "configure" +#line 19110 "configure" #include "confdefs.h" -#include +$ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}> int main (void) @@ -18619,15 +19118,16 @@ main (void) #if defined(NCURSES_VERSION_PATCH) #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) - make an error + #error disallow ncurses versions between 2020/04/03 and 2010/05/01 #endif #endif #ifdef NCURSES_WIDECHAR -make an error /* prefer to fall-through on the second checks */ +#error prefer to fall-through on the second checks #endif + static char dummy[10]; cchar_t check; int check2 = curs_set((int)sizeof(check)); - long x = winnstr(stdscr, "", 0); + long x = winnstr(stdscr, dummy, 5); int x1, y1; (void)check2; getbegyx(stdscr, y1, x1); @@ -18640,16 +19140,16 @@ make an error /* prefer to fall-through on the second checks */ } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18643: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19143: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18646: \$? = $ac_status" >&5 + echo "$as_me:19146: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18649: \"$ac_try\"") >&5 + { (eval echo "$as_me:19149: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18652: \$? = $ac_status" >&5 + echo "$as_me:19152: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_need_xopen_extension=none else @@ -18659,19 +19159,20 @@ cat "conftest.$ac_ext" >&5 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR do cat >"conftest.$ac_ext" <<_ACEOF -#line 18662 "configure" +#line 19162 "configure" #include "confdefs.h" #define $cf_try_xopen_extension 1 -#include +$ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { + static char dummy[10]; cchar_t check; int check2 = curs_set((int)sizeof(check)); - long x = winnstr(stdscr, "", 0); + long x = winnstr(stdscr, dummy, 5); int x1, y1; getbegyx(stdscr, y1, x1); (void)check2; @@ -18684,16 +19185,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:18687: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19188: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:18690: \$? = $ac_status" >&5 + echo "$as_me:19191: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:18693: \"$ac_try\"") >&5 + { (eval echo "$as_me:19194: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18696: \$? = $ac_status" >&5 + echo "$as_me:19197: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_need_xopen_extension=$cf_try_xopen_extension; break else @@ -18707,7 +19208,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:18710: result: $cf_cv_need_xopen_extension" >&5 +echo "$as_me:19211: result: $cf_cv_need_xopen_extension" >&5 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6 case "$cf_cv_need_xopen_extension" in @@ -18719,7 +19220,7 @@ case "$cf_cv_need_xopen_extension" in ;; esac -echo "$as_me:18722: checking for term.h" >&5 +echo "$as_me:19223: checking for term.h" >&5 echo $ECHO_N "checking for term.h... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18740,7 +19241,7 @@ esac for cf_header in $cf_header_list do cat >"conftest.$ac_ext" <<_ACEOF -#line 18743 "configure" +#line 19244 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -18754,16 +19255,16 @@ WINDOW *x; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18757: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19258: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18760: \$? = $ac_status" >&5 + echo "$as_me:19261: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18763: \"$ac_try\"") >&5 + { (eval echo "$as_me:19264: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18766: \$? = $ac_status" >&5 + echo "$as_me:19267: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header=$cf_header break @@ -18782,14 +19283,14 @@ case "$cf_cv_term_header" in for cf_header in ncurses/term.h ncursesw/term.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 18785 "configure" +#line 19286 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> #ifdef NCURSES_VERSION #include <${cf_header}> #else -make an error +#error expected NCURSES_VERSION to be defined #endif int main (void) @@ -18800,16 +19301,16 @@ WINDOW *x; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18803: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19304: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18806: \$? = $ac_status" >&5 + echo "$as_me:19307: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18809: \"$ac_try\"") >&5 + { (eval echo "$as_me:19310: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18812: \$? = $ac_status" >&5 + echo "$as_me:19313: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header=$cf_header break @@ -18824,7 +19325,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" esac fi -echo "$as_me:18827: result: $cf_cv_term_header" >&5 +echo "$as_me:19328: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 case "$cf_cv_term_header" in @@ -18851,7 +19352,7 @@ EOF ;; esac -echo "$as_me:18854: checking for unctrl.h" >&5 +echo "$as_me:19355: checking for unctrl.h" >&5 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6 if test "${cf_cv_unctrl_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -18872,7 +19373,7 @@ esac for cf_header in $cf_header_list do cat >"conftest.$ac_ext" <<_ACEOF -#line 18875 "configure" +#line 19376 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -18886,16 +19387,16 @@ WINDOW *x; (void)x } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:18889: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19390: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:18892: \$? = $ac_status" >&5 + echo "$as_me:19393: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:18895: \"$ac_try\"") >&5 + { (eval echo "$as_me:19396: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:18898: \$? = $ac_status" >&5 + echo "$as_me:19399: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_unctrl_header=$cf_header break @@ -18908,12 +19409,12 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi -echo "$as_me:18911: result: $cf_cv_unctrl_header" >&5 +echo "$as_me:19412: result: $cf_cv_unctrl_header" >&5 echo "${ECHO_T}$cf_cv_unctrl_header" >&6 case "$cf_cv_unctrl_header" in (no) - { echo "$as_me:18916: WARNING: unctrl.h header not found" >&5 + { echo "$as_me:19417: WARNING: unctrl.h header not found" >&5 echo "$as_me: WARNING: unctrl.h header not found" >&2;} ;; esac @@ -18943,12 +19444,15 @@ EOF esac for cf_func in \ +_nc_tparm_analyze \ +_tracef \ alloc_pair \ assume_default_colors \ chgat \ color_content \ color_set \ copywin \ +curses_trace \ delscreen \ dupwin \ exit_curses \ @@ -18983,8 +19487,12 @@ termname \ tgetent \ tigetnum \ tigetstr \ +tiparm \ +tiparm_s \ +tiscan_s \ tputs_sp \ typeahead \ +unget_wch \ use_default_colors \ use_env \ use_extended_names \ @@ -18999,16 +19507,15 @@ winsdelln \ winsstr \ wresize \ wsyncdown \ -_tracef \ do cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` - echo "$as_me:19008: checking for ${cf_func}" >&5 + echo "$as_me:19515: checking for ${cf_func}" >&5 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6 -echo "${as_me:-configure}:19011: testing ${cf_func} ..." 1>&5 +echo "${as_me:-configure}:19518: testing ${cf_func} ..." 1>&5 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19017,7 +19524,7 @@ else eval cf_result='$ac_cv_func_'$cf_func if test ".$cf_result" != ".no"; then cat >"conftest.$ac_ext" <<_ACEOF -#line 19020 "configure" +#line 19527 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -19050,16 +19557,16 @@ if (foo + 1234L > 5678L) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19053: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19560: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19056: \$? = $ac_status" >&5 + echo "$as_me:19563: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19059: \"$ac_try\"") >&5 + { (eval echo "$as_me:19566: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19062: \$? = $ac_status" >&5 + echo "$as_me:19569: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -19075,7 +19582,7 @@ fi # use the computed/retrieved cache-value: eval 'cf_result=$cf_cv_func_'$cf_func - echo "$as_me:19078: result: $cf_result" >&5 + echo "$as_me:19585: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" != no; then cat >>confdefs.h <&5 + echo "$as_me:19600: checking for ${cf_func}" >&5 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6 -echo "${as_me:-configure}:19096: testing ${cf_func} ..." 1>&5 +echo "${as_me:-configure}:19603: testing ${cf_func} ..." 1>&5 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19102,7 +19609,7 @@ else eval cf_result='$ac_cv_func_'$cf_func if test ".$cf_result" != ".no"; then cat >"conftest.$ac_ext" <<_ACEOF -#line 19105 "configure" +#line 19612 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -19135,16 +19642,16 @@ if (foo + 1234L > 5678L) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19138: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19645: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19141: \$? = $ac_status" >&5 + echo "$as_me:19648: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19144: \"$ac_try\"") >&5 + { (eval echo "$as_me:19651: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19147: \$? = $ac_status" >&5 + echo "$as_me:19654: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -19160,7 +19667,7 @@ fi # use the computed/retrieved cache-value: eval 'cf_result=$cf_cv_func_'$cf_func - echo "$as_me:19163: result: $cf_result" >&5 + echo "$as_me:19670: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" != no; then cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF -#line 19187 "configure" +#line 19694 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19204,21 +19711,21 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19207: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19714: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19210: \$? = $ac_status" >&5 + echo "$as_me:19717: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19213: \"$ac_try\"") >&5 + { (eval echo "$as_me:19720: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19216: \$? = $ac_status" >&5 + echo "$as_me:19723: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6 -echo "${as_me:-configure}:19221: testing prototype $cf_ret func($cf_arg value) ..." 1>&5 +echo "${as_me:-configure}:19728: testing prototype $cf_ret func($cf_arg value) ..." 1>&5 cat >>confdefs.h <&5 +echo "$as_me:19748: checking for ncurses extended functions" >&5 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19248 "configure" +#line 19755 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19260,16 +19767,16 @@ int x = NCURSES_EXT_FUNCS } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19263: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19770: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19266: \$? = $ac_status" >&5 + echo "$as_me:19773: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19269: \"$ac_try\"") >&5 + { (eval echo "$as_me:19776: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19272: \$? = $ac_status" >&5 + echo "$as_me:19779: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_ext_funcs=defined else @@ -19277,7 +19784,7 @@ else cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 19280 "configure" +#line 19787 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19302,16 +19809,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19305: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19812: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19308: \$? = $ac_status" >&5 + echo "$as_me:19815: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19311: \"$ac_try\"") >&5 + { (eval echo "$as_me:19818: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19314: \$? = $ac_status" >&5 + echo "$as_me:19821: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_ext_funcs=yes else @@ -19325,7 +19832,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:19328: result: $cf_cv_ncurses_ext_funcs" >&5 +echo "$as_me:19835: result: $cf_cv_ncurses_ext_funcs" >&5 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF @@ -19339,11 +19846,11 @@ then if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno then cf_define_xpg5=no - echo "$as_me:19342: checking if _XPG5 should be defined to enable wide-characters" >&5 + echo "$as_me:19849: checking if _XPG5 should be defined to enable wide-characters" >&5 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 19346 "configure" +#line 19853 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19356,16 +19863,16 @@ int x = _XPG5 } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19359: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19866: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19362: \$? = $ac_status" >&5 + echo "$as_me:19869: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19365: \"$ac_try\"") >&5 + { (eval echo "$as_me:19872: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19368: \$? = $ac_status" >&5 + echo "$as_me:19875: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else @@ -19374,7 +19881,7 @@ cat "conftest.$ac_ext" >&5 cf_save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XPG5" cat >"conftest.$ac_ext" <<_ACEOF -#line 19377 "configure" +#line 19884 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19387,16 +19894,16 @@ int x = _XPG5 } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19390: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:19897: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19393: \$? = $ac_status" >&5 + echo "$as_me:19900: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19396: \"$ac_try\"") >&5 + { (eval echo "$as_me:19903: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19399: \$? = $ac_status" >&5 + echo "$as_me:19906: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_define_xpg5=yes else @@ -19407,7 +19914,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save_cppflags" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" - echo "$as_me:19410: result: $cf_define_xpg5" >&5 + echo "$as_me:19917: result: $cf_define_xpg5" >&5 echo "${ECHO_T}$cf_define_xpg5" >&6 if test "$cf_define_xpg5" = yes @@ -19416,14 +19923,14 @@ echo "${ECHO_T}$cf_define_xpg5" >&6 fi fi - echo "$as_me:19419: checking for wide-character functions" >&5 + echo "$as_me:19926: checking for wide-character functions" >&5 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6 if test "${cf_cv_widechar_funcs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19426 "configure" +#line 19933 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19440,16 +19947,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19443: \"$ac_link\"") >&5 +if { (eval echo "$as_me:19950: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19446: \$? = $ac_status" >&5 + echo "$as_me:19953: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19449: \"$ac_try\"") >&5 + { (eval echo "$as_me:19956: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19452: \$? = $ac_status" >&5 + echo "$as_me:19959: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_widechar_funcs=yes else @@ -19460,7 +19967,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19463: result: $cf_cv_widechar_funcs" >&5 +echo "$as_me:19970: result: $cf_cv_widechar_funcs" >&5 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6 if test "$cf_cv_widechar_funcs" != no ; then @@ -19481,14 +19988,14 @@ EOF fi -echo "$as_me:19484: checking if $cf_cv_screen library uses pthreads" >&5 +echo "$as_me:19991: checking if $cf_cv_screen library uses pthreads" >&5 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6 if test "${cf_cv_use_pthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19491 "configure" +#line 19998 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19506,16 +20013,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19509: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20016: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19512: \$? = $ac_status" >&5 + echo "$as_me:20019: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19515: \"$ac_try\"") >&5 + { (eval echo "$as_me:20022: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19518: \$? = $ac_status" >&5 + echo "$as_me:20025: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_use_pthreads=yes else @@ -19526,21 +20033,21 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:19529: result: $cf_cv_use_pthreads" >&5 +echo "$as_me:20036: result: $cf_cv_use_pthreads" >&5 echo "${ECHO_T}$cf_cv_use_pthreads" >&6 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF #define USE_PTHREADS 1 EOF -echo "$as_me:19536: checking if sys/time.h works with sys/select.h" >&5 +echo "$as_me:20043: checking if sys/time.h works with sys/select.h" >&5 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6 if test "${cf_cv_sys_time_select+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 19543 "configure" +#line 20050 "configure" #include "confdefs.h" #include @@ -19560,16 +20067,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:19563: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20070: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19566: \$? = $ac_status" >&5 + echo "$as_me:20073: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:19569: \"$ac_try\"") >&5 + { (eval echo "$as_me:20076: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19572: \$? = $ac_status" >&5 + echo "$as_me:20079: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_sys_time_select=yes else @@ -19581,7 +20088,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:19584: result: $cf_cv_sys_time_select" >&5 +echo "$as_me:20091: result: $cf_cv_sys_time_select" >&5 echo "${ECHO_T}$cf_cv_sys_time_select" >&6 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF @@ -19590,7 +20097,7 @@ EOF # special check for test/ditto.c -echo "$as_me:19593: checking for openpty in -lutil" >&5 +echo "$as_me:20100: checking for openpty in -lutil" >&5 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 if test "${ac_cv_lib_util_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19598,7 +20105,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 19601 "configure" +#line 20108 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -19607,7 +20114,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char openpty (); +char openpty (void); int main (void) { @@ -19617,16 +20124,16 @@ openpty (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19620: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20127: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19623: \$? = $ac_status" >&5 + echo "$as_me:20130: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19626: \"$ac_try\"") >&5 + { (eval echo "$as_me:20133: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19629: \$? = $ac_status" >&5 + echo "$as_me:20136: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_util_openpty=yes else @@ -19637,7 +20144,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:19640: result: $ac_cv_lib_util_openpty" >&5 +echo "$as_me:20147: result: $ac_cv_lib_util_openpty" >&5 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 if test "$ac_cv_lib_util_openpty" = yes; then cf_cv_lib_util=yes @@ -19645,7 +20152,7 @@ else cf_cv_lib_util=no fi -echo "$as_me:19648: checking for openpty header" >&5 +echo "$as_me:20155: checking for openpty header" >&5 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6 if test "${cf_cv_func_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19672,7 +20179,7 @@ LIBS="$cf_add_libs" for cf_header in pty.h libutil.h util.h do cat >"conftest.$ac_ext" <<_ACEOF -#line 19675 "configure" +#line 20182 "configure" #include "confdefs.h" #include <$cf_header> @@ -19683,22 +20190,23 @@ main (void) int x = openpty((int *)0, (int *)0, (char *)0, (struct termios *)0, (struct winsize *)0); + (void)x; ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19692: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20200: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19695: \$? = $ac_status" >&5 + echo "$as_me:20203: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19698: \"$ac_try\"") >&5 + { (eval echo "$as_me:20206: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19701: \$? = $ac_status" >&5 + echo "$as_me:20209: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_openpty=$cf_header @@ -19716,7 +20224,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" fi -echo "$as_me:19719: result: $cf_cv_func_openpty" >&5 +echo "$as_me:20227: result: $cf_cv_func_openpty" >&5 echo "${ECHO_T}$cf_cv_func_openpty" >&6 if test "$cf_cv_func_openpty" != no ; then @@ -19750,7 +20258,7 @@ TEST_LIBS="$cf_add_libs" fi fi -echo "$as_me:19753: checking for function curses_version" >&5 +echo "$as_me:20261: checking for function curses_version" >&5 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6 if test "${cf_cv_func_curses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19760,28 +20268,31 @@ if test "$cross_compiling" = yes; then cf_cv_func_curses_version=unknown else cat >"conftest.$ac_ext" <<_ACEOF -#line 19763 "configure" +#line 20271 "configure" #include "confdefs.h" +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> + int main(void) { char temp[1024]; - sprintf(temp, "%s\\n", curses_version()); + sprintf(temp, "%.999s\\n", curses_version()); ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:19776: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20287: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19779: \$? = $ac_status" >&5 + echo "$as_me:20290: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:19781: \"$ac_try\"") >&5 + { (eval echo "$as_me:20292: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19784: \$? = $ac_status" >&5 + echo "$as_me:20295: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_func_curses_version=yes @@ -19796,14 +20307,14 @@ rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftes fi rm -f core fi -echo "$as_me:19799: result: $cf_cv_func_curses_version" >&5 +echo "$as_me:20310: result: $cf_cv_func_curses_version" >&5 echo "${ECHO_T}$cf_cv_func_curses_version" >&6 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF #define HAVE_CURSES_VERSION 1 EOF -echo "$as_me:19806: checking for alternate character set array" >&5 +echo "$as_me:20317: checking for alternate character set array" >&5 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6 if test "${cf_cv_curses_acs_map+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19813,7 +20324,7 @@ cf_cv_curses_acs_map=unknown for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map do cat >"conftest.$ac_ext" <<_ACEOF -#line 19816 "configure" +#line 20327 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> @@ -19829,16 +20340,16 @@ ${name}['k'] = ACS_PLUS } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19832: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20343: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19835: \$? = $ac_status" >&5 + echo "$as_me:20346: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19838: \"$ac_try\"") >&5 + { (eval echo "$as_me:20349: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19841: \$? = $ac_status" >&5 + echo "$as_me:20352: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_curses_acs_map=$name; break else @@ -19849,7 +20360,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" done fi -echo "$as_me:19852: result: $cf_cv_curses_acs_map" >&5 +echo "$as_me:20363: result: $cf_cv_curses_acs_map" >&5 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6 test "$cf_cv_curses_acs_map" != unknown && @@ -19859,7 +20370,7 @@ EOF if test "$cf_enable_widec" = yes; then -echo "$as_me:19862: checking for wide alternate character set array" >&5 +echo "$as_me:20373: checking for wide alternate character set array" >&5 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6 if test "${cf_cv_curses_wacs_map+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19869,7 +20380,7 @@ else for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char do cat >"conftest.$ac_ext" <<_ACEOF -#line 19872 "configure" +#line 20383 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -19885,16 +20396,16 @@ void *foo = &(${name}['k']); (void)foo } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19888: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20399: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19891: \$? = $ac_status" >&5 + echo "$as_me:20402: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19894: \"$ac_try\"") >&5 + { (eval echo "$as_me:20405: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19897: \$? = $ac_status" >&5 + echo "$as_me:20408: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_curses_wacs_map=$name break @@ -19905,7 +20416,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" done fi -echo "$as_me:19908: result: $cf_cv_curses_wacs_map" >&5 +echo "$as_me:20419: result: $cf_cv_curses_wacs_map" >&5 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6 test "$cf_cv_curses_wacs_map" != unknown && @@ -19913,7 +20424,7 @@ cat >>confdefs.h <&5 +echo "$as_me:20427: checking for wide alternate character constants" >&5 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6 if test "${cf_cv_curses_wacs_symbols+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -19923,7 +20434,7 @@ cf_cv_curses_wacs_symbols=no if test "$cf_cv_curses_wacs_map" != unknown then cat >"conftest.$ac_ext" <<_ACEOF -#line 19926 "configure" +#line 20437 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -19940,16 +20451,16 @@ cchar_t *foo = WACS_PLUS; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19943: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20454: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19946: \$? = $ac_status" >&5 + echo "$as_me:20457: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19949: \"$ac_try\"") >&5 + { (eval echo "$as_me:20460: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19952: \$? = $ac_status" >&5 + echo "$as_me:20463: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_curses_wacs_symbols=yes else @@ -19959,7 +20470,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" else cat >"conftest.$ac_ext" <<_ACEOF -#line 19962 "configure" +#line 20473 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -19975,16 +20486,16 @@ cchar_t *foo = WACS_PLUS; (void)foo } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:19978: \"$ac_link\"") >&5 +if { (eval echo "$as_me:20489: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:19981: \$? = $ac_status" >&5 + echo "$as_me:20492: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:19984: \"$ac_try\"") >&5 + { (eval echo "$as_me:20495: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:19987: \$? = $ac_status" >&5 + echo "$as_me:20498: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_curses_wacs_symbols=yes else @@ -19995,7 +20506,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi fi -echo "$as_me:19998: result: $cf_cv_curses_wacs_symbols" >&5 +echo "$as_me:20509: result: $cf_cv_curses_wacs_symbols" >&5 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6 test "$cf_cv_curses_wacs_symbols" != no && @@ -20005,10 +20516,10 @@ EOF fi -echo "$as_me:20008: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5 +echo "$as_me:20519: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 20011 "configure" +#line 20522 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -20026,16 +20537,16 @@ attr_t foo } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20029: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20540: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20032: \$? = $ac_status" >&5 + echo "$as_me:20543: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20035: \"$ac_try\"") >&5 + { (eval echo "$as_me:20546: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20038: \$? = $ac_status" >&5 + echo "$as_me:20549: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -20044,7 +20555,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:20047: result: $cf_result" >&5 +echo "$as_me:20558: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then @@ -20065,14 +20576,14 @@ fi if test "$cf_enable_widec" = yes; then # This is needed on Tru64 5.0 to declare mbstate_t -echo "$as_me:20068: checking if we must include wchar.h to declare mbstate_t" >&5 +echo "$as_me:20579: checking if we must include wchar.h to declare mbstate_t" >&5 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6 if test "${cf_cv_mbstate_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20075 "configure" +#line 20586 "configure" #include "confdefs.h" #include @@ -20084,29 +20595,29 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -mbstate_t state +mbstate_t state; (void)state ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20093: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20604: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20096: \$? = $ac_status" >&5 + echo "$as_me:20607: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20099: \"$ac_try\"") >&5 + { (eval echo "$as_me:20610: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20102: \$? = $ac_status" >&5 + echo "$as_me:20613: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_mbstate_t=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 20109 "configure" +#line 20620 "configure" #include "confdefs.h" #include @@ -20119,22 +20630,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -mbstate_t value +mbstate_t value; (void) value ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20128: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20639: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20131: \$? = $ac_status" >&5 + echo "$as_me:20642: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20134: \"$ac_try\"") >&5 + { (eval echo "$as_me:20645: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20137: \$? = $ac_status" >&5 + echo "$as_me:20648: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_mbstate_t=yes else @@ -20146,7 +20657,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20149: result: $cf_cv_mbstate_t" >&5 +echo "$as_me:20660: result: $cf_cv_mbstate_t" >&5 echo "${ECHO_T}$cf_cv_mbstate_t" >&6 if test "$cf_cv_mbstate_t" = yes ; then @@ -20169,14 +20680,14 @@ if test "$cf_cv_mbstate_t" != unknown ; then fi # This is needed on Tru64 5.0 to declare wchar_t -echo "$as_me:20172: checking if we must include wchar.h to declare wchar_t" >&5 +echo "$as_me:20683: checking if we must include wchar.h to declare wchar_t" >&5 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6 if test "${cf_cv_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20179 "configure" +#line 20690 "configure" #include "confdefs.h" #include @@ -20188,29 +20699,29 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wchar_t state +wchar_t state; (void)state ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20197: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20708: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20200: \$? = $ac_status" >&5 + echo "$as_me:20711: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20203: \"$ac_try\"") >&5 + { (eval echo "$as_me:20714: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20206: \$? = $ac_status" >&5 + echo "$as_me:20717: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wchar_t=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 20213 "configure" +#line 20724 "configure" #include "confdefs.h" #include @@ -20223,22 +20734,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wchar_t value +wchar_t value; (void) value ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20232: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20743: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20235: \$? = $ac_status" >&5 + echo "$as_me:20746: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20238: \"$ac_try\"") >&5 + { (eval echo "$as_me:20749: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20241: \$? = $ac_status" >&5 + echo "$as_me:20752: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wchar_t=yes else @@ -20250,7 +20761,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20253: result: $cf_cv_wchar_t" >&5 +echo "$as_me:20764: result: $cf_cv_wchar_t" >&5 echo "${ECHO_T}$cf_cv_wchar_t" >&6 if test "$cf_cv_wchar_t" = yes ; then @@ -20273,14 +20784,14 @@ if test "$cf_cv_wchar_t" != unknown ; then fi # This is needed on Tru64 5.0 to declare wint_t -echo "$as_me:20276: checking if we must include wchar.h to declare wint_t" >&5 +echo "$as_me:20787: checking if we must include wchar.h to declare wint_t" >&5 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6 if test "${cf_cv_wint_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 20283 "configure" +#line 20794 "configure" #include "confdefs.h" #include @@ -20292,29 +20803,29 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wint_t state +wint_t state; (void)state ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20301: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20812: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20304: \$? = $ac_status" >&5 + echo "$as_me:20815: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20307: \"$ac_try\"") >&5 + { (eval echo "$as_me:20818: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20310: \$? = $ac_status" >&5 + echo "$as_me:20821: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wint_t=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cat >"conftest.$ac_ext" <<_ACEOF -#line 20317 "configure" +#line 20828 "configure" #include "confdefs.h" #include @@ -20327,22 +20838,22 @@ cat >"conftest.$ac_ext" <<_ACEOF int main (void) { -wint_t value +wint_t value; (void) value ; return 0; } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20336: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20847: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20339: \$? = $ac_status" >&5 + echo "$as_me:20850: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20342: \"$ac_try\"") >&5 + { (eval echo "$as_me:20853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20345: \$? = $ac_status" >&5 + echo "$as_me:20856: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_wint_t=yes else @@ -20354,7 +20865,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:20357: result: $cf_cv_wint_t" >&5 +echo "$as_me:20868: result: $cf_cv_wint_t" >&5 echo "${ECHO_T}$cf_cv_wint_t" >&6 if test "$cf_cv_wint_t" = yes ; then @@ -20378,10 +20889,10 @@ fi if test "$NCURSES_OK_MBSTATE_T" = 0 ; then -echo "$as_me:20381: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5 +echo "$as_me:20892: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 20384 "configure" +#line 20895 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -20399,16 +20910,16 @@ mbstate_t foo } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20402: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20913: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20405: \$? = $ac_status" >&5 + echo "$as_me:20916: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20408: \"$ac_try\"") >&5 + { (eval echo "$as_me:20919: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20411: \$? = $ac_status" >&5 + echo "$as_me:20922: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -20417,7 +20928,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:20420: result: $cf_result" >&5 +echo "$as_me:20931: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then @@ -20439,10 +20950,10 @@ fi if test "$NCURSES_OK_WCHAR_T" = 0 ; then -echo "$as_me:20442: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5 +echo "$as_me:20953: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 20445 "configure" +#line 20956 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -20460,16 +20971,16 @@ wchar_t foo } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20463: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:20974: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20466: \$? = $ac_status" >&5 + echo "$as_me:20977: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20469: \"$ac_try\"") >&5 + { (eval echo "$as_me:20980: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20472: \$? = $ac_status" >&5 + echo "$as_me:20983: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -20478,7 +20989,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:20481: result: $cf_result" >&5 +echo "$as_me:20992: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then @@ -20500,10 +21011,10 @@ fi if test "$NCURSES_OK_WINT_T" = 0 ; then -echo "$as_me:20503: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5 +echo "$as_me:21014: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 20506 "configure" +#line 21017 "configure" #include "confdefs.h" #ifndef _XOPEN_SOURCE_EXTENDED @@ -20521,16 +21032,16 @@ wint_t foo } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20524: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21035: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20527: \$? = $ac_status" >&5 + echo "$as_me:21038: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20530: \"$ac_try\"") >&5 + { (eval echo "$as_me:21041: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20533: \$? = $ac_status" >&5 + echo "$as_me:21044: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -20539,7 +21050,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:20542: result: $cf_result" >&5 +echo "$as_me:21053: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then @@ -20568,11 +21079,11 @@ boolnames \ boolfnames \ ttytype do -echo "$as_me:20571: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5 +echo "$as_me:21082: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF -#line 20575 "configure" +#line 21086 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -20605,16 +21116,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:20608: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:21119: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:20611: \$? = $ac_status" >&5 + echo "$as_me:21122: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:20614: \"$ac_try\"") >&5 + { (eval echo "$as_me:21125: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20617: \$? = $ac_status" >&5 + echo "$as_me:21128: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes @@ -20624,7 +21135,7 @@ cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" -echo "$as_me:20627: result: $cf_result" >&5 +echo "$as_me:21138: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then @@ -20636,14 +21147,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./ EOF else - echo "$as_me:20639: checking for data $cf_data in library" >&5 + echo "$as_me:21150: checking for data $cf_data in library" >&5 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6 # BSD linkers insist on making weak linkage, but resolve at runtime. if test "$cross_compiling" = yes; then # cross-compiling cat >"conftest.$ac_ext" <<_ACEOF -#line 20646 "configure" +#line 21157 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -20682,16 +21193,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:20685: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21196: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20688: \$? = $ac_status" >&5 + echo "$as_me:21199: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:20691: \"$ac_try\"") >&5 + { (eval echo "$as_me:21202: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20694: \$? = $ac_status" >&5 + echo "$as_me:21205: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else @@ -20703,7 +21214,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" else cat >"conftest.$ac_ext" <<_ACEOF -#line 20706 "configure" +#line 21217 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -20735,15 +21246,15 @@ int main(void) } _ACEOF rm -f "conftest$ac_exeext" -if { (eval echo "$as_me:20738: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21249: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20741: \$? = $ac_status" >&5 + echo "$as_me:21252: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' - { (eval echo "$as_me:20743: \"$ac_try\"") >&5 + { (eval echo "$as_me:21254: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20746: \$? = $ac_status" >&5 + echo "$as_me:21257: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes @@ -20755,7 +21266,7 @@ cf_result=no fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi - echo "$as_me:20758: result: $cf_result" >&5 + echo "$as_me:21269: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = yes ; then @@ -20772,7 +21283,7 @@ done if test -n "$with_screen" && test "x$with_screen" = "xpdcurses" then - echo "$as_me:20775: checking for X" >&5 + echo "$as_me:21286: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. @@ -20876,17 +21387,17 @@ if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >"conftest.$ac_ext" <<_ACEOF -#line 20879 "configure" +#line 21390 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:20883: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:21394: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:20889: \$? = $ac_status" >&5 + echo "$as_me:21400: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -20919,7 +21430,7 @@ if test "$ac_x_libraries" = no; then ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 20922 "configure" +#line 21433 "configure" #include "confdefs.h" #include int @@ -20931,16 +21442,16 @@ XtMalloc (0) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:20934: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21445: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:20937: \$? = $ac_status" >&5 + echo "$as_me:21448: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:20940: \"$ac_try\"") >&5 + { (eval echo "$as_me:21451: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:20943: \$? = $ac_status" >&5 + echo "$as_me:21454: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. @@ -20978,7 +21489,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:20981: result: $have_x" >&5 + echo "$as_me:21492: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else @@ -20988,7 +21499,7 @@ else # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:20991: result: libraries $x_libraries, headers $x_includes" >&5 + echo "$as_me:21502: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi @@ -21015,11 +21526,11 @@ else # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - echo "$as_me:21018: checking whether -R must be followed by a space" >&5 + echo "$as_me:21529: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >"conftest.$ac_ext" <<_ACEOF -#line 21022 "configure" +#line 21533 "configure" #include "confdefs.h" int @@ -21031,16 +21542,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21034: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21545: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21037: \$? = $ac_status" >&5 + echo "$as_me:21548: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21040: \"$ac_try\"") >&5 + { (eval echo "$as_me:21551: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21043: \$? = $ac_status" >&5 + echo "$as_me:21554: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_R_nospace=yes else @@ -21050,13 +21561,13 @@ ac_R_nospace=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" if test $ac_R_nospace = yes; then - echo "$as_me:21053: result: no" >&5 + echo "$as_me:21564: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >"conftest.$ac_ext" <<_ACEOF -#line 21059 "configure" +#line 21570 "configure" #include "confdefs.h" int @@ -21068,16 +21579,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21071: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21582: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21074: \$? = $ac_status" >&5 + echo "$as_me:21585: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21077: \"$ac_try\"") >&5 + { (eval echo "$as_me:21588: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21080: \$? = $ac_status" >&5 + echo "$as_me:21591: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_R_space=yes else @@ -21087,11 +21598,11 @@ ac_R_space=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" if test $ac_R_space = yes; then - echo "$as_me:21090: result: yes" >&5 + echo "$as_me:21601: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else - echo "$as_me:21094: result: neither works" >&5 + echo "$as_me:21605: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi @@ -21111,7 +21622,7 @@ echo "${ECHO_T}neither works" >&6 # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >"conftest.$ac_ext" <<_ACEOF -#line 21114 "configure" +#line 21625 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21120,7 +21631,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XOpenDisplay (); +char XOpenDisplay (void); int main (void) { @@ -21130,22 +21641,22 @@ XOpenDisplay (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21133: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21644: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21136: \$? = $ac_status" >&5 + echo "$as_me:21647: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21139: \"$ac_try\"") >&5 + { (eval echo "$as_me:21650: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21142: \$? = $ac_status" >&5 + echo "$as_me:21653: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 -echo "$as_me:21148: checking for dnet_ntoa in -ldnet" >&5 +echo "$as_me:21659: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21153,7 +21664,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21156 "configure" +#line 21667 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21162,7 +21673,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dnet_ntoa (); +char dnet_ntoa (void); int main (void) { @@ -21172,16 +21683,16 @@ dnet_ntoa (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21175: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21686: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21178: \$? = $ac_status" >&5 + echo "$as_me:21689: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21181: \"$ac_try\"") >&5 + { (eval echo "$as_me:21692: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21184: \$? = $ac_status" >&5 + echo "$as_me:21695: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else @@ -21192,14 +21703,14 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21195: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "$as_me:21706: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:21202: checking for dnet_ntoa in -ldnet_stub" >&5 + echo "$as_me:21713: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21207,7 +21718,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21210 "configure" +#line 21721 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21216,7 +21727,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dnet_ntoa (); +char dnet_ntoa (void); int main (void) { @@ -21226,16 +21737,16 @@ dnet_ntoa (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21229: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21740: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21232: \$? = $ac_status" >&5 + echo "$as_me:21743: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21235: \"$ac_try\"") >&5 + { (eval echo "$as_me:21746: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21238: \$? = $ac_status" >&5 + echo "$as_me:21749: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else @@ -21246,7 +21757,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21249: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "$as_me:21760: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" @@ -21265,13 +21776,13 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:21268: checking for gethostbyname" >&5 + echo "$as_me:21779: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21274 "configure" +#line 21785 "configure" #include "confdefs.h" #define gethostbyname autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -21302,16 +21813,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21305: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21816: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21308: \$? = $ac_status" >&5 + echo "$as_me:21819: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21311: \"$ac_try\"") >&5 + { (eval echo "$as_me:21822: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21314: \$? = $ac_status" >&5 + echo "$as_me:21825: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_gethostbyname=yes else @@ -21321,11 +21832,11 @@ ac_cv_func_gethostbyname=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21324: result: $ac_cv_func_gethostbyname" >&5 +echo "$as_me:21835: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then - echo "$as_me:21328: checking for gethostbyname in -lnsl" >&5 + echo "$as_me:21839: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21333,7 +21844,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21336 "configure" +#line 21847 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21342,7 +21853,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char gethostbyname (); +char gethostbyname (void); int main (void) { @@ -21352,16 +21863,16 @@ gethostbyname (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21355: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21866: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21358: \$? = $ac_status" >&5 + echo "$as_me:21869: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21361: \"$ac_try\"") >&5 + { (eval echo "$as_me:21872: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21364: \$? = $ac_status" >&5 + echo "$as_me:21875: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_nsl_gethostbyname=yes else @@ -21372,14 +21883,14 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21375: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "$as_me:21886: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:21382: checking for gethostbyname in -lbsd" >&5 + echo "$as_me:21893: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21387,7 +21898,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21390 "configure" +#line 21901 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21396,7 +21907,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char gethostbyname (); +char gethostbyname (void); int main (void) { @@ -21406,16 +21917,16 @@ gethostbyname (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21409: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21920: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21412: \$? = $ac_status" >&5 + echo "$as_me:21923: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21415: \"$ac_try\"") >&5 + { (eval echo "$as_me:21926: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21418: \$? = $ac_status" >&5 + echo "$as_me:21929: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_bsd_gethostbyname=yes else @@ -21426,7 +21937,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21429: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "$as_me:21940: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" @@ -21442,13 +21953,13 @@ fi # variants that don't use the nameserver (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:21445: checking for connect" >&5 + echo "$as_me:21956: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21451 "configure" +#line 21962 "configure" #include "confdefs.h" #define connect autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -21479,16 +21990,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21482: \"$ac_link\"") >&5 +if { (eval echo "$as_me:21993: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21485: \$? = $ac_status" >&5 + echo "$as_me:21996: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21488: \"$ac_try\"") >&5 + { (eval echo "$as_me:21999: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21491: \$? = $ac_status" >&5 + echo "$as_me:22002: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_connect=yes else @@ -21498,11 +22009,11 @@ ac_cv_func_connect=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21501: result: $ac_cv_func_connect" >&5 +echo "$as_me:22012: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then - echo "$as_me:21505: checking for connect in -lsocket" >&5 + echo "$as_me:22016: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21510,7 +22021,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21513 "configure" +#line 22024 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21519,7 +22030,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char connect (); +char connect (void); int main (void) { @@ -21529,16 +22040,16 @@ connect (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21532: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22043: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21535: \$? = $ac_status" >&5 + echo "$as_me:22046: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21538: \"$ac_try\"") >&5 + { (eval echo "$as_me:22049: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21541: \$? = $ac_status" >&5 + echo "$as_me:22052: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_socket_connect=yes else @@ -21549,7 +22060,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21552: result: $ac_cv_lib_socket_connect" >&5 +echo "$as_me:22063: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test "$ac_cv_lib_socket_connect" = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" @@ -21558,13 +22069,13 @@ fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:21561: checking for remove" >&5 + echo "$as_me:22072: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21567 "configure" +#line 22078 "configure" #include "confdefs.h" #define remove autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -21595,16 +22106,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21598: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22109: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21601: \$? = $ac_status" >&5 + echo "$as_me:22112: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21604: \"$ac_try\"") >&5 + { (eval echo "$as_me:22115: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21607: \$? = $ac_status" >&5 + echo "$as_me:22118: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_remove=yes else @@ -21614,11 +22125,11 @@ ac_cv_func_remove=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21617: result: $ac_cv_func_remove" >&5 +echo "$as_me:22128: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then - echo "$as_me:21621: checking for remove in -lposix" >&5 + echo "$as_me:22132: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21626,7 +22137,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21629 "configure" +#line 22140 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21635,7 +22146,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char remove (); +char remove (void); int main (void) { @@ -21645,16 +22156,16 @@ remove (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21648: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22159: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21651: \$? = $ac_status" >&5 + echo "$as_me:22162: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21654: \"$ac_try\"") >&5 + { (eval echo "$as_me:22165: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21657: \$? = $ac_status" >&5 + echo "$as_me:22168: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_posix_remove=yes else @@ -21665,7 +22176,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21668: result: $ac_cv_lib_posix_remove" >&5 +echo "$as_me:22179: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test "$ac_cv_lib_posix_remove" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" @@ -21674,13 +22185,13 @@ fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:21677: checking for shmat" >&5 + echo "$as_me:22188: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 21683 "configure" +#line 22194 "configure" #include "confdefs.h" #define shmat autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ @@ -21711,16 +22222,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21714: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22225: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21717: \$? = $ac_status" >&5 + echo "$as_me:22228: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21720: \"$ac_try\"") >&5 + { (eval echo "$as_me:22231: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21723: \$? = $ac_status" >&5 + echo "$as_me:22234: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_shmat=yes else @@ -21730,11 +22241,11 @@ ac_cv_func_shmat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi -echo "$as_me:21733: result: $ac_cv_func_shmat" >&5 +echo "$as_me:22244: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then - echo "$as_me:21737: checking for shmat in -lipc" >&5 + echo "$as_me:22248: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21742,7 +22253,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21745 "configure" +#line 22256 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21751,7 +22262,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char shmat (); +char shmat (void); int main (void) { @@ -21761,16 +22272,16 @@ shmat (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21764: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22275: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21767: \$? = $ac_status" >&5 + echo "$as_me:22278: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21770: \"$ac_try\"") >&5 + { (eval echo "$as_me:22281: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21773: \$? = $ac_status" >&5 + echo "$as_me:22284: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_ipc_shmat=yes else @@ -21781,7 +22292,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21784: result: $ac_cv_lib_ipc_shmat" >&5 +echo "$as_me:22295: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test "$ac_cv_lib_ipc_shmat" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" @@ -21799,7 +22310,7 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:21802: checking for IceConnectionNumber in -lICE" >&5 + echo "$as_me:22313: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21807,7 +22318,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 21810 "configure" +#line 22321 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -21816,7 +22327,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char IceConnectionNumber (); +char IceConnectionNumber (void); int main (void) { @@ -21826,16 +22337,16 @@ IceConnectionNumber (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:21829: \"$ac_link\"") >&5 +if { (eval echo "$as_me:22340: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:21832: \$? = $ac_status" >&5 + echo "$as_me:22343: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:21835: \"$ac_try\"") >&5 + { (eval echo "$as_me:22346: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:21838: \$? = $ac_status" >&5 + echo "$as_me:22349: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else @@ -21846,7 +22357,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:21849: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "$as_me:22360: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" @@ -21865,14 +22376,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $CFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6 - -echo "${as_me:-configure}:21870: testing repairing CFLAGS: $CFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $CFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -21887,15 +22400,22 @@ echo "${as_me:-configure}:21870: testing repairing CFLAGS: $CFLAGS ..." 1>&5 ;; esac done - CFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 + if test "x$CFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6 + +echo "${as_me:-configure}:22407: testing repairing CFLAGS: $CFLAGS ..." 1>&5 -echo "${as_me:-configure}:21893: testing ... fixed $CFLAGS ..." 1>&5 + CFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:22412: testing ... fixed $CFLAGS ..." 1>&5 -echo "${as_me:-configure}:21897: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:22416: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + + fi ;; esac fi @@ -21904,14 +22424,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $CPPFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 - -echo "${as_me:-configure}:21909: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $CPPFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -21926,15 +22448,22 @@ echo "${as_me:-configure}:21909: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 ;; esac done - CPPFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 + if test "x$CPPFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 + +echo "${as_me:-configure}:22455: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 + + CPPFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 -echo "${as_me:-configure}:21932: testing ... fixed $CPPFLAGS ..." 1>&5 +echo "${as_me:-configure}:22460: testing ... fixed $CPPFLAGS ..." 1>&5 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 -echo "${as_me:-configure}:21936: testing ... extra $EXTRA_CFLAGS ..." 1>&5 +echo "${as_me:-configure}:22464: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + fi ;; esac fi @@ -21943,14 +22472,16 @@ if test "$GCC" = yes || test "$GXX" = yes then case $LDFLAGS in (*-Werror=*) - test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 - -echo "${as_me:-configure}:21948: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 - cf_temp_flags= for cf_temp_scan in $LDFLAGS do case "x$cf_temp_scan" in + (x-Werror=format*) + + test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " + cf_temp_flags="${cf_temp_flags}$cf_temp_scan" + + ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " @@ -21965,20 +22496,27 @@ echo "${as_me:-configure}:21948: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 ;; esac done - LDFLAGS="$cf_temp_flags" - test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 + if test "x$LDFLAGS" != "x$cf_temp_flags" + then + test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 + +echo "${as_me:-configure}:22503: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 -echo "${as_me:-configure}:21971: testing ... fixed $LDFLAGS ..." 1>&5 + LDFLAGS="$cf_temp_flags" + test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 - test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:22508: testing ... fixed $LDFLAGS ..." 1>&5 -echo "${as_me:-configure}:21975: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 +echo "${as_me:-configure}:22512: testing ... extra $EXTRA_CFLAGS ..." 1>&5 + + fi ;; esac fi -echo "$as_me:21981: checking if you want to turn on gcc warnings" >&5 +echo "$as_me:22519: checking if you want to turn on gcc warnings" >&5 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. @@ -21995,7 +22533,7 @@ else enable_warnings=no fi; -echo "$as_me:21998: result: $enable_warnings" >&5 +echo "$as_me:22536: result: $enable_warnings" >&5 echo "${ECHO_T}$enable_warnings" >&6 if test "$enable_warnings" = "yes" then @@ -22018,10 +22556,11 @@ cat > conftest.i <&5 + { echo "$as_me:22559: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -22070,12 +22609,12 @@ EOF ;; esac - if { (eval echo "$as_me:22073: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:22612: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22076: \$? = $ac_status" >&5 + echo "$as_me:22615: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:22078: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:22617: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case "$cf_attribute" in @@ -22153,7 +22692,7 @@ do done cat >"conftest.$ac_ext" <<_ACEOF -#line 22156 "configure" +#line 22695 "configure" #include "confdefs.h" #include @@ -22168,28 +22707,29 @@ String foo = malloc(1); free((void*)foo) } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:22171: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:22710: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22174: \$? = $ac_status" >&5 + echo "$as_me:22713: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:22177: \"$ac_try\"") >&5 + { (eval echo "$as_me:22716: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22180: \$? = $ac_status" >&5 + echo "$as_me:22719: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then -echo "$as_me:22183: checking for X11/Xt const-feature" >&5 +echo "$as_me:22722: checking for X11/Xt const-feature" >&5 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6 if test "${cf_cv_const_x_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22190 "configure" +#line 22729 "configure" #include "confdefs.h" +#undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include @@ -22204,16 +22744,16 @@ String foo = malloc(1); *foo = 0 } _ACEOF rm -f "conftest.$ac_objext" -if { (eval echo "$as_me:22207: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:22747: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22210: \$? = $ac_status" >&5 + echo "$as_me:22750: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' - { (eval echo "$as_me:22213: \"$ac_try\"") >&5 + { (eval echo "$as_me:22753: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22216: \$? = $ac_status" >&5 + echo "$as_me:22756: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_const_x_string=no @@ -22228,7 +22768,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi -echo "$as_me:22231: result: $cf_cv_const_x_string" >&5 +echo "$as_me:22771: result: $cf_cv_const_x_string" >&5 echo "${ECHO_T}$cf_cv_const_x_string" >&6 LIBS="$cf_save_LIBS_CF_CONST_X_STRING" @@ -22257,7 +22797,7 @@ fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi cat > "conftest.$ac_ext" <&5 + { echo "$as_me:22816: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall" @@ -22289,12 +22829,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:22292: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:22832: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22295: \$? = $ac_status" >&5 + echo "$as_me:22835: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:22297: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:22837: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -22302,7 +22842,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 CFLAGS="$cf_save_CFLAGS" elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown" then - { echo "$as_me:22305: checking for $CC warning options..." >&5 + { echo "$as_me:22845: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" cf_warn_CONST="" @@ -22325,12 +22865,12 @@ echo "$as_me: checking for $CC warning options..." >&6;} Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:22328: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:22868: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:22331: \$? = $ac_status" >&5 + echo "$as_me:22871: \$? = $ac_status" >&5 (exit "$ac_status"); }; then - test -n "$verbose" && echo "$as_me:22333: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:22873: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case "$cf_opt" in (Winline) @@ -22338,7 +22878,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:22341: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:22881: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -22348,7 +22888,7 @@ echo "${as_me:-configure}:22341: testing feature is broken in gcc $GCC_VERSION . ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:22351: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:22891: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -22365,7 +22905,7 @@ fi fi -echo "$as_me:22368: checking if you want to use dmalloc for testing" >&5 +echo "$as_me:22908: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. @@ -22387,7 +22927,7 @@ EOF else with_dmalloc= fi; -echo "$as_me:22390: result: ${with_dmalloc:-no}" >&5 +echo "$as_me:22930: result: ${with_dmalloc:-no}" >&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case ".$with_cflags" in @@ -22501,23 +23041,23 @@ fi esac if test "$with_dmalloc" = yes ; then - echo "$as_me:22504: checking for dmalloc.h" >&5 + echo "$as_me:23044: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22510 "configure" +#line 23050 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:22514: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:23054: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:22520: \$? = $ac_status" >&5 + echo "$as_me:23060: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -22536,11 +23076,11 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:22539: result: $ac_cv_header_dmalloc_h" >&5 +echo "$as_me:23079: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test "$ac_cv_header_dmalloc_h" = yes; then -echo "$as_me:22543: checking for dmalloc_debug in -ldmalloc" >&5 +echo "$as_me:23083: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22548,7 +23088,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 22551 "configure" +#line 23091 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -22557,7 +23097,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dmalloc_debug (); +char dmalloc_debug (void); int main (void) { @@ -22567,16 +23107,16 @@ dmalloc_debug (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22570: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23110: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22573: \$? = $ac_status" >&5 + echo "$as_me:23113: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22576: \"$ac_try\"") >&5 + { (eval echo "$as_me:23116: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22579: \$? = $ac_status" >&5 + echo "$as_me:23119: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else @@ -22587,7 +23127,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:22590: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 +echo "$as_me:23130: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then cat >>confdefs.h <&5 +echo "$as_me:23145: checking if you want to use dbmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. @@ -22624,7 +23164,7 @@ EOF else with_dbmalloc= fi; -echo "$as_me:22627: result: ${with_dbmalloc:-no}" >&5 +echo "$as_me:23167: result: ${with_dbmalloc:-no}" >&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case ".$with_cflags" in @@ -22738,23 +23278,23 @@ fi esac if test "$with_dbmalloc" = yes ; then - echo "$as_me:22741: checking for dbmalloc.h" >&5 + echo "$as_me:23281: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF -#line 22747 "configure" +#line 23287 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:22751: \"$ac_cpp "conftest.$ac_ext"\"") >&5 +if { (eval echo "$as_me:23291: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:22757: \$? = $ac_status" >&5 + echo "$as_me:23297: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -22773,11 +23313,11 @@ else fi rm -f conftest.err "conftest.$ac_ext" fi -echo "$as_me:22776: result: $ac_cv_header_dbmalloc_h" >&5 +echo "$as_me:23316: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test "$ac_cv_header_dbmalloc_h" = yes; then -echo "$as_me:22780: checking for debug_malloc in -ldbmalloc" >&5 +echo "$as_me:23320: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22785,7 +23325,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF -#line 22788 "configure" +#line 23328 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -22794,7 +23334,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char debug_malloc (); +char debug_malloc (void); int main (void) { @@ -22804,16 +23344,16 @@ debug_malloc (); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:22807: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23347: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:22810: \$? = $ac_status" >&5 + echo "$as_me:23350: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:22813: \"$ac_try\"") >&5 + { (eval echo "$as_me:23353: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:22816: \$? = $ac_status" >&5 + echo "$as_me:23356: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else @@ -22824,7 +23364,7 @@ fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:22827: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 +echo "$as_me:23367: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then cat >>confdefs.h <&5 +echo "$as_me:23382: checking if you want to use valgrind for testing" >&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. @@ -22861,7 +23401,7 @@ EOF else with_valgrind= fi; -echo "$as_me:22864: result: ${with_valgrind:-no}" >&5 +echo "$as_me:23404: result: ${with_valgrind:-no}" >&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case ".$with_cflags" in @@ -22974,7 +23514,7 @@ fi ;; esac -echo "$as_me:22977: checking if you want to perform memory-leak testing" >&5 +echo "$as_me:23517: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. @@ -22985,7 +23525,7 @@ else enable_leaks=yes fi; if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi -echo "$as_me:22988: result: $with_no_leaks" >&5 +echo "$as_me:23528: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$enable_leaks" = no ; then @@ -23003,7 +23543,7 @@ fi LD_RPATH_OPT= if test "x$cf_cv_enable_rpath" != xno then - echo "$as_me:23006: checking for an rpath option" >&5 + echo "$as_me:23546: checking for an rpath option" >&5 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 case "$cf_cv_system_name" in (irix*) @@ -23034,12 +23574,12 @@ echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 (*) ;; esac - echo "$as_me:23037: result: $LD_RPATH_OPT" >&5 + echo "$as_me:23577: result: $LD_RPATH_OPT" >&5 echo "${ECHO_T}$LD_RPATH_OPT" >&6 case "x$LD_RPATH_OPT" in (x-R*) - echo "$as_me:23042: checking if we need a space after rpath option" >&5 + echo "$as_me:23582: checking if we need a space after rpath option" >&5 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6 cf_save_LIBS="$LIBS" @@ -23060,7 +23600,7 @@ done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF -#line 23063 "configure" +#line 23603 "configure" #include "confdefs.h" int @@ -23072,16 +23612,16 @@ main (void) } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:23075: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23615: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23078: \$? = $ac_status" >&5 + echo "$as_me:23618: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:23081: \"$ac_try\"") >&5 + { (eval echo "$as_me:23621: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23084: \$? = $ac_status" >&5 + echo "$as_me:23624: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_rpath_space=no else @@ -23091,14 +23631,14 @@ cf_rpath_space=yes fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" - echo "$as_me:23094: result: $cf_rpath_space" >&5 + echo "$as_me:23634: result: $cf_rpath_space" >&5 echo "${ECHO_T}$cf_rpath_space" >&6 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " ;; esac fi -echo "$as_me:23101: checking if rpath-hack should be disabled" >&5 +echo "$as_me:23641: checking if rpath-hack should be disabled" >&5 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6 # Check whether --enable-rpath-hack or --disable-rpath-hack was given. @@ -23116,22 +23656,22 @@ else fi; if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi -echo "$as_me:23119: result: $cf_disable_rpath_hack" >&5 +echo "$as_me:23659: result: $cf_disable_rpath_hack" >&5 echo "${ECHO_T}$cf_disable_rpath_hack" >&6 if test "$enable_rpath_hack" = yes ; then -echo "$as_me:23124: checking for updated LDFLAGS" >&5 +echo "$as_me:23664: checking for updated LDFLAGS" >&5 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6 if test -n "$LD_RPATH_OPT" ; then - echo "$as_me:23127: result: maybe" >&5 + echo "$as_me:23667: result: maybe" >&5 echo "${ECHO_T}maybe" >&6 for ac_prog in ldd do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:23134: checking for $ac_word" >&5 +echo "$as_me:23674: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -23146,7 +23686,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_cf_ldd_prog="$ac_prog" -echo "$as_me:23149: found $ac_dir/$ac_word" >&5 +echo "$as_me:23689: found $ac_dir/$ac_word" >&5 break done @@ -23154,10 +23694,10 @@ fi fi cf_ldd_prog=$ac_cv_prog_cf_ldd_prog if test -n "$cf_ldd_prog"; then - echo "$as_me:23157: result: $cf_ldd_prog" >&5 + echo "$as_me:23697: result: $cf_ldd_prog" >&5 echo "${ECHO_T}$cf_ldd_prog" >&6 else - echo "$as_me:23160: result: no" >&5 + echo "$as_me:23700: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -23171,7 +23711,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no" cf_rpath_oops= cat >"conftest.$ac_ext" <<_ACEOF -#line 23174 "configure" +#line 23714 "configure" #include "confdefs.h" #include int @@ -23183,16 +23723,16 @@ printf("Hello"); } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" -if { (eval echo "$as_me:23186: \"$ac_link\"") >&5 +if { (eval echo "$as_me:23726: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:23189: \$? = $ac_status" >&5 + echo "$as_me:23729: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' - { (eval echo "$as_me:23192: \"$ac_try\"") >&5 + { (eval echo "$as_me:23732: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:23195: \$? = $ac_status" >&5 + echo "$as_me:23735: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq` cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq` @@ -23220,7 +23760,7 @@ rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" then test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6 -echo "${as_me:-configure}:23223: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5 +echo "${as_me:-configure}:23763: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib" break @@ -23232,11 +23772,11 @@ echo "${as_me:-configure}:23223: testing ...adding -L$cf_rpath_dir/lib to LDFLAG test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me:-configure}:23235: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:23775: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me:-configure}:23239: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:23779: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 cf_rpath_dst= for cf_rpath_src in $LDFLAGS @@ -23273,7 +23813,7 @@ do then test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6 -echo "${as_me:-configure}:23276: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 +echo "${as_me:-configure}:23816: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" fi @@ -23286,11 +23826,11 @@ LDFLAGS=$cf_rpath_dst test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me:-configure}:23289: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:23829: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6 -echo "${as_me:-configure}:23293: testing ...checking LIBS $LIBS ..." 1>&5 +echo "${as_me:-configure}:23833: testing ...checking LIBS $LIBS ..." 1>&5 cf_rpath_dst= for cf_rpath_src in $LIBS @@ -23327,7 +23867,7 @@ do then test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6 -echo "${as_me:-configure}:23330: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 +echo "${as_me:-configure}:23870: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" fi @@ -23340,14 +23880,14 @@ LIBS=$cf_rpath_dst test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6 -echo "${as_me:-configure}:23343: testing ...checked LIBS $LIBS ..." 1>&5 +echo "${as_me:-configure}:23883: testing ...checked LIBS $LIBS ..." 1>&5 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me:-configure}:23347: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me:-configure}:23887: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 else - echo "$as_me:23350: result: no" >&5 + echo "$as_me:23890: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -23368,7 +23908,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -23437,7 +23977,7 @@ DEFS=-DHAVE_CONFIG_H : "${CONFIG_STATUS=./config.status}" ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:23440: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:23980: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >"$CONFIG_STATUS" <<_ACEOF #! $SHELL @@ -23446,6 +23986,8 @@ cat >"$CONFIG_STATUS" <<_ACEOF # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. +me=\`echo "\$0" | sed -e 's,.*\\/,,'\` + debug=false SHELL=\${CONFIG_SHELL-$SHELL} ac_cs_invocation="\$0 \$@" @@ -23467,9 +24009,9 @@ fi as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr + as_expr="expr" else - as_expr=false + as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file @@ -23484,7 +24026,7 @@ if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + as_ln_s='ln' else as_ln_s='cp -p' fi @@ -23571,10 +24113,10 @@ EOF cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:23619: error: ambiguous option: $1 + { { echo "$as_me:24161: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -23635,7 +24177,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:23638: error: unrecognized option: $1 + -*) { { echo "$as_me:24180: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -23654,7 +24196,7 @@ cat >&5 << _ACEOF ## Running config.status. ## ## ----------------------- ## -This file was extended by $as_me 2.52.20210509, executed with +This file was extended by $as_me 2.52.20231210, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -23685,7 +24227,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;; - *) { { echo "$as_me:23688: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:24230: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -23709,14 +24251,14 @@ $debug || } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} +: "${TMPDIR=/tmp}" { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/cs$$-$RANDOM - (umask 077 && mkdir $tmp) + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 @@ -23736,7 +24278,7 @@ cat >>"$CONFIG_STATUS" <\$tmp/subs.sed <<\\CEOF + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t @@ -23797,6 +24339,7 @@ s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t s,@LINT@,$LINT,;t t s,@LINT_OPTS@,$LINT_OPTS,;t t +s,@LINT_LIBS@,$LINT_LIBS,;t t s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t s,@MAKE_PHONY@,$MAKE_PHONY,;t t s,@CTAGS@,$CTAGS,;t t @@ -23851,6 +24394,7 @@ s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t +s,@cf_cv_screen@,$cf_cv_screen,;t t s,@RGB_PATH@,$RGB_PATH,;t t s,@no_x11_rgb@,$no_x11_rgb,;t t s,@FORM_NAME@,$FORM_NAME,;t t @@ -23874,11 +24418,11 @@ EOF ac_sed_cmds= while "$ac_more_lines"; do if test "$ac_beg" -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag fi - if test ! -s $tmp/subs.frag; then + if test ! -s "$tmp"/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to @@ -23886,17 +24430,17 @@ EOF # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed # It is possible to make a multiline substitution using escaped newlines. # Ensure that we do not split the substitution between script fragments. ac_BEG=$ac_end ac_END=`expr "$ac_end" + "$ac_max_sed_lines"` - sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next - if test -s $tmp/subs.next; then - grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit - if test ! -s $tmp/subs.edit; then - grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit - if test ! -s $tmp/subs.edit; then + sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next + if test -s "$tmp"/subs.next; then + grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit + if test ! -s "$tmp"/subs.edit; then + grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit + if test ! -s "$tmp"/subs.edit; then if test "$ac_beg" -gt 1; then ac_end=`expr "$ac_end" - 1` continue @@ -23906,9 +24450,9 @@ EOF fi if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr "$ac_sed_frag" + 1` ac_beg=$ac_end @@ -23916,7 +24460,7 @@ EOF fi done if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + ac_sed_cmds="cat" fi fi # test -n "$CONFIG_FILES" @@ -23926,7 +24470,7 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin + cat >"$tmp"/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` @@ -23963,7 +24507,7 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" + ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else @@ -23991,7 +24535,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:23994: creating $ac_file" >&5 + { echo "$as_me:24538: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -24006,23 +24550,23 @@ echo "$as_me: creating $ac_file" >&6;} ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:24012: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:24556: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative if test -f "$f"; then # Build tree - echo $f + echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree - { { echo "$as_me:24025: error: cannot find input file: $f" >&5 + { { echo "$as_me:24569: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -24038,7 +24582,7 @@ cat >>"$CONFIG_STATUS" <<\EOF if test -n "$ac_seen"; then ac_used=`grep '@datarootdir@' "$ac_item"` if test -z "$ac_used"; then - { echo "$as_me:24041: WARNING: datarootdir was used implicitly but not set: + { echo "$as_me:24585: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&2;} @@ -24047,7 +24591,7 @@ $ac_seen" >&2;} fi ac_seen=`grep '${datarootdir}' "$ac_item"` if test -n "$ac_seen"; then - { echo "$as_me:24050: WARNING: datarootdir was used explicitly but not set: + { echo "$as_me:24594: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&2;} @@ -24072,38 +24616,46 @@ s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin +" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out + rm -f "$tmp"/stdin +EOF +test -n "${FGREP}" || FGREP="grep -F" +test -n "${EGREP}" || EGREP="grep -E" +cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF if test x"$ac_file" != x-; then cp "$tmp/out" "$ac_file" for ac_name in prefix exec_prefix datarootdir do - ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"` + ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"` if test -n "$ac_seen"; then - ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"` + ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"` if test -z "$ac_init"; then - ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'` - { echo "$as_me:24087: WARNING: Variable $ac_name is used but was not set: + ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'` + { echo "$as_me:24639: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&5 echo "$as_me: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&2;} fi fi done - ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out - ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out - if test -s $tmp/out; then - ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out` - { echo "$as_me:24098: WARNING: Some variables may not be substituted: + $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out + $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out + if test -s "$tmp"/out; then + ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out` + { echo "$as_me:24650: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} fi else - cat $tmp/out + cat "$tmp"/out fi - rm -f $tmp/out + rm -f "$tmp"/out done EOF @@ -24136,7 +24688,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin + cat >"$tmp"/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` @@ -24144,7 +24696,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:24147: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:24699: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -24152,10 +24704,10 @@ echo "$as_me: creating $ac_file" >&6;} ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in - -) echo $tmp/stdin ;; + -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:24158: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:24710: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -24168,14 +24720,14 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo "$srcdir/$f" else # /dev/null tree - { { echo "$as_me:24171: error: cannot find input file: $f" >&5 + { { echo "$as_me:24723: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in EOF @@ -24207,9 +24759,9 @@ echo ' cat >> conftest.edit < $tmp/out -rm -f $tmp/in -mv $tmp/out $tmp/in +sed -f conftest.edit "$tmp"/in > "$tmp"/out +rm -f "$tmp"/in +mv "$tmp"/out "$tmp"/in rm -f conftest.edit conftest.frag ' >> "$CONFIG_STATUS" @@ -24218,15 +24770,15 @@ cat >>"$CONFIG_STATUS" <<\EOF # use $as_me), people would be surprised to read: # /* config.h. Generated automatically by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated automatically by configure. */" >"$tmp"/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + cat "$tmp"/in >>"$tmp"/config.h + rm -f "$tmp"/in if test x"$ac_file" != x-; then if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then - { echo "$as_me:24229: $ac_file is unchanged" >&5 + { echo "$as_me:24781: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -24262,8 +24814,8 @@ done; } mv "$tmp/config.h" "$ac_file" fi else - cat $tmp/config.h - rm -f $tmp/config.h + cat "$tmp"/config.h + rm -f "$tmp"/config.h fi done EOF diff --git a/test/configure.in b/test/configure.in index faa674d2..4df1c11f 100644 --- a/test/configure.in +++ b/test/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2020,2021 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1996-on dnl -dnl $Id: configure.in,v 1.163 2021/07/03 20:21:07 tom Exp $ +dnl $Id: configure.in,v 1.174 2024/03/30 14:31:11 tom Exp $ dnl This is a simple configuration-script for the ncurses test programs that dnl allows the test-directory to be separately configured against a reference dnl system (i.e., sysvr4 curses) @@ -108,6 +108,7 @@ AC_OBJEXT CF_GCC_ATTRIBUTES CF_ENABLE_STRING_HACKS CF_XOPEN_SOURCE(600) +AC_CHECK_DECL(exit) CF_SIG_ATOMIC_T # Work around breakage on OS X @@ -237,14 +238,12 @@ fi # look for curses-related headers AC_CHECK_HEADERS( $cf_curses_headers ) -AC_STDC_HEADERS AC_HEADER_TIME AC_CHECK_HEADERS( \ getopt.h \ locale.h \ math.h \ stdarg.h \ -stdint.h \ sys/ioctl.h \ sys/select.h \ sys/time.h \ @@ -253,10 +252,10 @@ unistd.h \ ) CF_GETOPT_HEADER +CF_FUNC_GETTIME AC_CHECK_FUNCS( \ getopt \ -gettimeofday \ snprintf \ strdup \ strstr \ @@ -317,12 +316,15 @@ wcstombs \ fi CF_CURSES_FUNCS( \ +_nc_tparm_analyze \ +_tracef \ alloc_pair \ assume_default_colors \ chgat \ color_content \ color_set \ copywin \ +curses_trace \ delscreen \ dupwin \ exit_curses \ @@ -357,8 +359,12 @@ termname \ tgetent \ tigetnum \ tigetstr \ +tiparm \ +tiparm_s \ +tiscan_s \ tputs_sp \ typeahead \ +unget_wch \ use_default_colors \ use_env \ use_extended_names \ @@ -373,7 +379,6 @@ winsdelln \ winsstr \ wresize \ wsyncdown \ -_tracef \ ) CF_TPUTS_PROTO diff --git a/test/demo_altkeys.c b/test/demo_altkeys.c index fb3cd65c..ea6a7e64 100644 --- a/test/demo_altkeys.c +++ b/test/demo_altkeys.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2005-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_altkeys.c,v 1.14 2020/02/02 23:34:34 tom Exp $ + * $Id: demo_altkeys.c,v 1.17 2023/02/25 18:08:02 tom Exp $ * * Demonstrate the define_key() function. * Thomas Dickey - 2005/10/22 @@ -71,17 +71,49 @@ log_last_line(WINDOW *win) } } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: demo_altkeys [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int n; int ch; -#if HAVE_GETTIMEOFDAY - struct timeval previous; -#endif + TimeType previous; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); unlink(MY_LOGFILE); + setlocale(LC_ALL, ""); if (newterm(0, stdout, stdin) == 0) { fprintf(stderr, "Cannot initialize terminal\n"); ExitProgram(EXIT_FAILURE); @@ -113,31 +145,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) } } -#if HAVE_GETTIMEOFDAY - gettimeofday(&previous, 0); -#endif + GetClockTime(&previous); while ((ch = getch()) != ERR) { bool escaped = (ch >= MY_KEYS); const char *name = keyname(escaped ? (ch - MY_KEYS) : ch); -#if HAVE_GETTIMEOFDAY - int secs, msecs; - struct timeval current; - - gettimeofday(¤t, 0); - secs = (int) (current.tv_sec - previous.tv_sec); - msecs = (int) ((current.tv_usec - previous.tv_usec) / 1000); - if (msecs < 0) { - msecs += 1000; - --secs; - } - if (msecs >= 1000) { - secs += msecs / 1000; - msecs %= 1000; - } - printw("%6d.%03d ", secs, msecs); + TimeType current; + + GetClockTime(¤t); + printw("%6.03f ", ElapsedSeconds(&previous, ¤t)); previous = current; -#endif printw("Keycode %d, name %s%s\n", ch, escaped ? "ESC-" : "", diff --git a/test/demo_defkey.c b/test/demo_defkey.c index afe10293..44166726 100644 --- a/test/demo_defkey.c +++ b/test/demo_defkey.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 2002-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_defkey.c,v 1.31 2020/12/26 17:55:13 tom Exp $ + * $Id: demo_defkey.c,v 1.35 2024/01/20 20:46:12 tom Exp $ * * Demonstrate the define_key() function. * Thomas Dickey - 2002/11/23 @@ -100,7 +100,7 @@ visible(const char *string) { char *result = 0; - if (string != 0 && *string != '\0') { + if (VALID_STRING(string) && *string != '\0') { int pass; int n; size_t need = 1; @@ -148,11 +148,7 @@ really_define_key(WINDOW *win, const char *new_string, int code) } log_last_line(win); - if (vis_string != 0) { - free(vis_string); - vis_string = 0; - } - + free(vis_string); vis_string = visible(new_string); if ((rc = key_defined(new_string)) > 0) { wprintw(win, "%s was bound to %s\n", vis_string, keyname(rc)); @@ -185,7 +181,7 @@ duplicate(WINDOW *win, NCURSES_CONST char *name, int code) { char *value = tigetstr(name); - if (value != 0) { + if (VALID_STRING(value)) { const char *prefix = 0; if (!(strncmp) (value, "\033[", (size_t) 2)) { @@ -214,16 +210,50 @@ remove_definition(WINDOW *win, int code) really_define_key(win, 0, code); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: demo_defkey [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { char *fkeys[12]; int n; int ch; WINDOW *win; + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + unlink(MY_LOGFILE); + setlocale(LC_ALL, ""); initscr(); (void) cbreak(); /* take input chars one at a time, no wait for \n */ (void) noecho(); /* don't echo input */ diff --git a/test/demo_forms.c b/test/demo_forms.c index ea0426d0..62e8c644 100644 --- a/test/demo_forms.c +++ b/test/demo_forms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2003-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_forms.c,v 1.58 2020/03/21 15:57:59 tom Exp $ + * $Id: demo_forms.c,v 1.63 2023/11/11 00:29:53 tom Exp $ * * Demonstrate a variety of functions from the form library. * Thomas Dickey - 2003/4/26 @@ -154,7 +154,7 @@ make_label(const char *label, int frow, int fcol) if (f) { set_field_buffer(f, 0, label); - set_field_opts(f, (int) ((unsigned) field_opts(f) & ~O_ACTIVE)); + set_field_opts(f, (int) ((unsigned) field_opts(f) & (unsigned) ~O_ACTIVE)); } return (f); } @@ -242,7 +242,7 @@ show_insert_mode(bool insert_mode) #define O_SELECTABLE (O_ACTIVE | O_VISIBLE) static FIELD * -another_field(FORM *form, FIELD *field) +another_field(FORM *form, const FIELD *const field) { FIELD **f = form_fields(form); FIELD *result = 0; @@ -556,23 +556,28 @@ demo_forms(void) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: demo_forms [options] [data file]" ,"" - ," -d make fields dynamic" - ," -j value justify (1=left, 2=center, 3=right)" - ," -m value set maximum size of dynamic fields" - ," -o value specify number of offscreen rows in new_field()" - ," -t value specify text to fill fields initially" + ,USAGE_COMMON + ,"Options:" + ," -d make fields dynamic" + ," -j NUM justify (1=left, 2=center, 3=right)" + ," -m NUM set maximum size of dynamic fields" + ," -o NUM specify number of offscreen rows in new_field()" + ," -t NUM specify text to fill fields initially" }; unsigned int j; for (j = 0; j < SIZEOF(tbl); ++j) fprintf(stderr, "%s\n", tbl[j]); - exit(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -581,7 +586,7 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "dj:m:o:t:")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "dj:m:o:t:")) != -1) { switch (ch) { case 'd': d_option = TRUE; @@ -590,7 +595,7 @@ main(int argc, char *argv[]) j_value = atoi(optarg); if (j_value < NO_JUSTIFICATION || j_value > JUSTIFY_RIGHT) - usage(); + usage(FALSE); break; case 'm': m_value = atoi(optarg); @@ -601,9 +606,12 @@ main(int argc, char *argv[]) case 't': t_value = optarg; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } while (optind < argc) { diff --git a/test/demo_keyok.c b/test/demo_keyok.c index 28d90aa1..8f4ae906 100644 --- a/test/demo_keyok.c +++ b/test/demo_keyok.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2002-2006,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_keyok.c,v 1.7 2020/02/02 23:34:34 tom Exp $ + * $Id: demo_keyok.c,v 1.9 2022/12/10 23:31:31 tom Exp $ * * Demonstrate the keyok() function. * Thomas Dickey - 2002/11/23 @@ -36,14 +36,48 @@ #include #if defined(NCURSES_VERSION) && NCURSES_EXT_FUNCS +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: demo_keyok [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int lastch = ERR; int prior = ERR; int ch; WINDOW *win; + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + + setlocale(LC_ALL, ""); initscr(); (void) cbreak(); /* take input chars one at a time, no wait for \n */ (void) noecho(); /* don't echo input */ diff --git a/test/demo_menus.c b/test/demo_menus.c index 9f3b4d22..7b0bf303 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2003-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_menus.c,v 1.73 2021/05/08 19:41:08 tom Exp $ + * $Id: demo_menus.c,v 1.80 2023/05/27 20:13:10 tom Exp $ * * Demonstrate a variety of functions from the menu library. * Thomas Dickey - 2005/4/9 @@ -308,7 +308,7 @@ menu_create(ITEM ** items, int count, int ncols, MenuNo number) } static void -menu_destroy(MENU * m) +menu_destroy(MENU * m, int itemsToo) { Trace(("menu_destroy %p", (void *) m)); if (m != 0) { @@ -331,18 +331,18 @@ menu_destroy(MENU * m) Trace(("freeing blob %p", blob)); free((void *) blob); } - free(items); - items = 0; } -#ifdef TRACE - if ((count > 0) && (m == mpTrace)) { - ITEM **ip = items; - if (ip != 0) { - while (*ip) - free(*ip++); + if (count > 0 && itemsToo) { + if (itemsToo & 1) { + ITEM **ip = items; + if (ip != 0) { + while (*ip) + free_item(*ip++); + } } + if (itemsToo & 2) + free(items); } -#endif } } @@ -925,19 +925,18 @@ perform_menus(void) } if (code == E_REQUEST_DENIED) beep(); - continue; } } static void destroy_menus(void) { - menu_destroy(mpFile); - menu_destroy(mpSelect); + menu_destroy(mpFile, 1); + menu_destroy(mpSelect, 3); #ifdef TRACE - menu_destroy(mpTrace); + menu_destroy(mpTrace, 1); #endif - menu_destroy(mpBanner); + menu_destroy(mpBanner, 1); } #if HAVE_RIPOFFLINE @@ -977,41 +976,46 @@ call_files(int code) } static void -usage(void) +usage(int ok) { static const char *const tbl[] = { "Usage: demo_menus [options] [menu-file]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_RIPOFFLINE - ," -f rip-off footer line (can repeat)" - ," -h rip-off header line (can repeat)" + ," -F rip-off footer line (can repeat)" + ," -H rip-off header line (can repeat)" #endif #ifdef TRACE - ," -t mask specify default trace-level (may toggle with ^T)" + ," -t mask specify default trace-level (may toggle with ^T)" #endif }; size_t n; for (n = 0; n < SIZEOF(tbl); n++) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int c; + int ch; setlocale(LC_ALL, ""); + START_TRACE(); - while ((c = getopt(argc, argv, "fht:")) != -1) { - switch (c) { + while ((ch = getopt(argc, argv, OPTS_COMMON "FHt:")) != -1) { + switch (ch) { #if HAVE_RIPOFFLINE - case 'f': + case 'F': ripoffline(-1, rip_footer); break; - case 'h': + case 'H': ripoffline(1, rip_header); break; #endif /* HAVE_RIPOFFLINE */ @@ -1020,8 +1024,12 @@ main(int argc, char *argv[]) curses_trace((unsigned) strtoul(optarg, 0, 0)); break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } diff --git a/test/demo_new_pair.c b/test/demo_new_pair.c index ac0d9bf3..bc41d44d 100644 --- a/test/demo_new_pair.c +++ b/test/demo_new_pair.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_new_pair.c,v 1.24 2021/02/21 01:24:06 tom Exp $ + * $Id: demo_new_pair.c,v 1.27 2022/12/04 00:40:11 tom Exp $ * * Demonstrate the alloc_pair() function. */ @@ -127,26 +127,27 @@ now(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: demo_new_pair [options]", - "", - "Repeatedly print using all possible color combinations.", - "", - "Options:", - " -g use getcchar to check setcchar", - " -i use init_pair rather than alloc_pair", - " -p start in paged-mode", - " -s start in single-step mode", - " -w print a wide-character cell", + "Usage: demo_new_pair [options]" + ,"" + ,"Repeatedly print using all possible color combinations." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -g use getcchar to check setcchar" + ," -i use init_pair rather than alloc_pair" + ," -p start in paged-mode" + ," -s start in single-step mode" + ," -w print a wide-character cell" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } #define use_pages() \ @@ -158,6 +159,9 @@ usage(void) #define update_modes() \ scrollok(stdscr, !paged_mode); \ nodelay(stdscr, !single_mode || paged_mode) +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -204,7 +208,7 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "gipsw")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "gipsw")) != -1) { switch (ch) { case 'g': check_set = TRUE; @@ -221,9 +225,12 @@ main(int argc, char *argv[]) case 'w': use_wide = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } diff --git a/test/demo_panels.c b/test/demo_panels.c index 005483e9..6c825891 100644 --- a/test/demo_panels.c +++ b/test/demo_panels.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2022 Thomas E. Dickey * * Copyright 2003-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_panels.c,v 1.45 2020/02/02 23:34:34 tom Exp $ + * $Id: demo_panels.c,v 1.48 2022/12/04 00:40:11 tom Exp $ * * Demonstrate a variety of functions from the panel library. */ @@ -741,39 +741,43 @@ demo_panels(InitPanel myInit, FillPanel myFill) } static void -usage(void) +usage(int ok) { static const char *const tbl[] = { "Usage: demo_panels [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -i file read commands from file" - ," -o file record commands in file" - ," -m do not use colors" + ," -i file read commands from file" + ," -o file record commands in file" + ," -m do not use colors" #if USE_WIDEC_SUPPORT - ," -w use wide-characters in panels and background" + ," -w use wide-characters in panels and background" #endif - ," -x do not enclose panels in boxes" + ," -x do not enclose panels in boxes" }; size_t n; for (n = 0; n < SIZEOF(tbl); n++) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int c; + int ch; bool monochrome = FALSE; InitPanel myInit = init_panel; FillPanel myFill = fill_panel; setlocale(LC_ALL, ""); - while ((c = getopt(argc, argv, "i:o:mwx")) != -1) { - switch (c) { + while ((ch = getopt(argc, argv, OPTS_COMMON "i:o:mwx")) != -1) { + switch (ch) { case 'i': log_in = fopen(optarg, "r"); break; @@ -792,8 +796,12 @@ main(int argc, char *argv[]) case 'x': unboxed = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (unboxed) diff --git a/test/demo_tabs.c b/test/demo_tabs.c index f63850df..16c1ad57 100644 --- a/test/demo_tabs.c +++ b/test/demo_tabs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,52 +29,60 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_tabs.c,v 1.5 2020/02/02 23:34:34 tom Exp $ + * $Id: demo_tabs.c,v 1.10 2022/12/04 00:40:11 tom Exp $ * * A simple demo of tabs in curses. */ +#define USE_CURSES #define USE_TINFO -#include "test.priv.h" +#include static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: demo_tabs [options]", - "", - "Print a grid to test tab-stops with the curses interface", - "", - "Options:", - " -l COUNT total number of lines to show", - " -t NUM set TABSIZE variable to the given value", + "Usage: demo_tabs [options]" + ,"" + ,"Print a grid to test tab-stops with the curses interface" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -l COUNT total number of lines to show" + ," -t NUM set TABSIZE variable to the given value" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { int tabstop; - int n, col, row, step; + int ch, col, row, step; int line_limit = -1; int curses_stops = -1; - while ((n = getopt(argc, argv, "l:t:")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "l:t:")) != -1) { + switch (ch) { case 'l': line_limit = atoi(optarg); break; case 't': curses_stops = atoi(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -92,10 +100,10 @@ main(int argc, char *argv[]) move(row, 0); for (col = step = 0; col < COLS - 1; ++col) { if (row == 0) { - chtype ch = '-'; + chtype ct = '-'; if ((col % tabstop) == 0) - ch = '+'; - addch(ch); + ct = '+'; + addch(ct); } else if (col + 1 < row) { addch('*'); } else { diff --git a/test/demo_termcap.c b/test/demo_termcap.c index 347fc5bd..6e2aba70 100644 --- a/test/demo_termcap.c +++ b/test/demo_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2005-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_termcap.c,v 1.60 2021/03/20 16:05:49 tom Exp $ + * $Id: demo_termcap.c,v 1.65 2023/05/27 20:13:10 tom Exp $ * * A simple demo of the termcap interface. */ @@ -105,7 +105,7 @@ static long total_s_values; #define EachCapName(n) n = 33; n < 127; ++n static char * -make_dbitem(char *p, char *q) +make_dbitem(const char *const p, const char *const q) { size_t need = strlen(e_opt) + 2 + (size_t) (p - q); char *result = malloc(need); @@ -404,7 +404,8 @@ typedef enum { static void parse_description(const char *input_name) { - static char empty[1]; + static char empty[1] = + {0}; FILE *fp; struct stat sb; @@ -437,11 +438,13 @@ parse_description(const char *input_name) failed("cannot allocate memory for input-file"); } - if ((fp = fopen(input_name, "r")) == 0) + if ((fp = fopen(input_name, "r")) == 0) { failed("cannot open input-file"); - len = fread(my_blob, sizeof(char), (size_t) sb.st_size, fp); - my_blob[sb.st_size] = '\0'; - fclose(fp); + } else { + len = fread(my_blob, sizeof(char), (size_t) sb.st_size, fp); + my_blob[sb.st_size] = '\0'; + fclose(fp); + } /* * First, get rid of comments and escaped newlines, as well as repeated @@ -738,40 +741,45 @@ free_code_list(char **list) #endif /* USE_CODE_LISTS */ static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: demo_termcap [options] [terminal]", - "", - "If no options are given, print all (boolean, numeric, string)", - "capabilities for the given terminal, using short names.", - "", - "Options:", - " -a try all names, print capabilities found", - " -b print boolean-capabilities", - " -d LIST colon-separated list of databases to use", - " -e NAME environment variable to set with -d option", - " -i NAME terminal description to use as names for \"-a\" option, etc.", - " -n print numeric-capabilities", - " -q quiet (prints only counts)", - " -r COUNT repeat for given count", - " -s print string-capabilities", - " -v print termcap-variables", + "Usage: demo_termcap [options] [terminal]" + ,"" + ,"If no options are given, print all (boolean, numeric, string)" + ,"capabilities for the given terminal, using short names." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -a try all names, print capabilities found" + ," -b print boolean-capabilities" + ," -d LIST colon-separated list of databases to use" + ," -e NAME environment variable to set with -d option" + ," -i NAME terminal description to use as names for \"-a\" option, etc." + ," -n print numeric-capabilities" + ," -q quiet (prints only counts)" + ," -r COUNT repeat for given count" + ," -s print string-capabilities" + ," -v print termcap-variables" #ifdef NCURSES_VERSION - " -x print extended capabilities", + ," -x print extended capabilities" #endif }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + int ch; int n; char *name; bool a_opt = FALSE; @@ -783,8 +791,8 @@ main(int argc, char *argv[]) int repeat; int r_opt = 1; - while ((n = getopt(argc, argv, "abd:e:i:nqr:svxy")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "abd:e:i:nqr:svxy")) != -1) { + switch (ch) { case 'a': a_opt = TRUE; break; @@ -808,7 +816,7 @@ main(int argc, char *argv[]) break; case 'r': if ((r_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 's': s_opt = TRUE; @@ -829,9 +837,12 @@ main(int argc, char *argv[]) break; #endif #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -915,8 +926,7 @@ main(int argc, char *argv[]) #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { failed("This program requires termcap"); } diff --git a/test/demo_terminfo.c b/test/demo_terminfo.c index 45cee391..5e78015c 100644 --- a/test/demo_terminfo.c +++ b/test/demo_terminfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2009-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_terminfo.c,v 1.52 2021/03/20 16:07:29 tom Exp $ + * $Id: demo_terminfo.c,v 1.57 2023/05/27 20:13:10 tom Exp $ * * A simple demo of the terminfo interface. */ @@ -96,7 +96,7 @@ static long total_s_values; #define FNAME(type) "%s %-*s = ", #type, f_opt ? 24 : FCOLS static char * -make_dbitem(char *p, char *q) +make_dbitem(const char *const p, const char *const q) { size_t need = strlen(e_opt) + 2 + (size_t) (p - q); char *result = malloc(need); @@ -430,7 +430,8 @@ typedef enum { static void parse_description(const char *input_name) { - static char empty[1]; + static char empty[1] = + {0}; FILE *fp; struct stat sb; @@ -463,11 +464,13 @@ parse_description(const char *input_name) failed("cannot allocate memory for input-file"); } - if ((fp = fopen(input_name, "r")) == 0) + if ((fp = fopen(input_name, "r")) == 0) { failed("cannot open input-file"); - len = fread(my_blob, sizeof(char), (size_t) sb.st_size, fp); - my_blob[sb.st_size] = '\0'; - fclose(fp); + } else { + len = fread(my_blob, sizeof(char), (size_t) sb.st_size, fp); + my_blob[sb.st_size] = '\0'; + fclose(fp); + } /* * First, get rid of comments and escaped newlines, as well as repeated @@ -768,49 +771,54 @@ free_code_list(char **list) #endif /* USE_CODE_LISTS */ static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: demo_terminfo [options] [terminal]", - "", - "If no options are given, print all (boolean, numeric, string)", - "capabilities for the given terminal, using short names.", - "", - "Options:", - " -a try all names, print capabilities found", - " -b print boolean-capabilities", - " -d LIST colon-separated list of databases to use", - " -e NAME environment variable to set with -d option", - " -f print full names", - " -i NAME terminal description to use as names for \"-a\" option", - " -n print numeric-capabilities", - " -q quiet (prints only counts)", - " -r COUNT repeat for given count", - " -s print string-capabilities", + "Usage: demo_terminfo [options] [terminal]" + ,"" + ,"If no options are given, print all (boolean, numeric, string)" + ,"capabilities for the given terminal, using short names." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -a try all names, print capabilities found" + ," -b print boolean-capabilities" + ," -d LIST colon-separated list of databases to use" + ," -e NAME environment variable to set with -d option" + ," -f print full names" + ," -i NAME terminal description to use as names for \"-a\" option" + ," -n print numeric-capabilities" + ," -q quiet (prints only counts)" + ," -r COUNT repeat for given count" + ," -s print string-capabilities" #ifdef NCURSES_VERSION - " -x print extended capabilities", - " -y direct-lookup names of extended capabilities", + ," -x print extended capabilities" + ," -y direct-lookup names of extended capabilities" #endif }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + int ch; int n; int repeat; char *name; int r_opt = 1; char *input_name = 0; - while ((n = getopt(argc, argv, "abd:e:fi:nqr:sxy")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "abd:e:fi:nqr:sxy")) != -1) { + switch (ch) { case 'a': a_opt = TRUE; break; @@ -837,7 +845,7 @@ main(int argc, char *argv[]) break; case 'r': if ((r_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 's': s_opt = TRUE; @@ -853,9 +861,12 @@ main(int argc, char *argv[]) x_opt = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -946,7 +957,7 @@ main(int argc, char *argv[]) #else /* !HAVE_TIGETSTR */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { failed("This program requires the terminfo functions such as tigetstr"); ExitProgram(EXIT_FAILURE); diff --git a/test/ditto.c b/test/ditto.c index fdc8611a..acac8377 100644 --- a/test/ditto.c +++ b/test/ditto.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey (1998-on) * - * $Id: ditto.c,v 1.52 2021/08/15 20:07:11 tom Exp $ + * $Id: ditto.c,v 1.59 2023/09/23 17:08:43 tom Exp $ * * The program illustrates how to set up multiple screens from a single * program. @@ -92,6 +92,15 @@ typedef struct { #endif } DITTO; +#ifdef USE_PTHREADS +#define LockIt() pthread_mutex_lock(&pending_mutex) +#define UnlockIt() pthread_mutex_unlock(&pending_mutex) +pthread_mutex_t pending_mutex; +#else +#define LockIt() /* nothing */ +#define UnlockIt() /* nothing */ +#endif + /* * Structure used to pass multiple parameters via the use_screen() * single-parameter interface. @@ -102,9 +111,6 @@ typedef struct { DITTO *ditto; /* data for all screens */ } DDATA; -static GCC_NORETURN void failed(const char *); -static GCC_NORETURN void usage(void); - static void failed(const char *s) { @@ -112,13 +118,6 @@ failed(const char *s) ExitProgram(EXIT_FAILURE); } -static void -usage(void) -{ - fprintf(stderr, "Usage: ditto [terminal1 ...]\n"); - ExitProgram(EXIT_FAILURE); -} - /* Add to the head of the fifo, checking for overflow. */ static void put_fifo(FIFO * fifo, int value) @@ -240,6 +239,14 @@ init_screen( return TRUE; } +static void +free_screen(DITTO * target) +{ + free(target->parents); + free(target->windows); + free(target->peeks); +} + static void open_screen(DITTO * target, char **source, int length, int which1) { @@ -381,17 +388,46 @@ handle_screen(void *arg) } #endif +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: ditto [terminal [terminal2 ...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { int j; + int ch; DITTO *data; #ifndef USE_PTHREADS int count; #endif - if (argc <= 1) - usage(); + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } if ((data = typeCalloc(DITTO, (size_t) argc)) == 0) failed("calloc data"); @@ -403,13 +439,15 @@ main(int argc, char *argv[]) } #ifdef USE_PTHREADS + pthread_mutex_init(&pending_mutex, NULL); /* * For multi-threaded operation, set up a reader for each of the screens. * That uses blocking I/O rather than polling for input, so no calls to * napms() are needed. */ for (j = 0; j < argc; j++) { - (void) pthread_create(&(data[j].thread), NULL, handle_screen, &data[j]); + (void) pthread_create(&(data[j].thread), NULL, handle_screen, + &data[j]); } pthread_join(data[1].thread, NULL); #else @@ -419,7 +457,6 @@ main(int argc, char *argv[]) */ for (count = 0;; ++count) { DDATA ddata; - int ch; int which = (count % argc); napms(20); @@ -440,6 +477,7 @@ main(int argc, char *argv[]) * Cleanup and exit */ for (j = argc - 1; j >= 0; j--) { + LockIt(); USING_SCREEN(data[j].screen, close_screen, 0); fprintf(data[j].output, "**Closed\r\n"); @@ -450,7 +488,10 @@ main(int argc, char *argv[]) fflush(data[j].output); fclose(data[j].output); delscreen(data[j].screen); + free_screen(&data[j]); + UnlockIt(); } + free(data); ExitProgram(EXIT_SUCCESS); } #else diff --git a/test/dots.c b/test/dots.c index 94d90a13..05aa8545 100644 --- a/test/dots.c +++ b/test/dots.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 1999-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey 1999 * - * $Id: dots.c,v 1.40 2020/05/29 23:04:02 tom Exp $ + * $Id: dots.c,v 1.45 2023/01/07 17:21:48 tom Exp $ * * A simple demo of the terminfo interface. */ @@ -111,12 +111,13 @@ get_number(NCURSES_CONST char *cap, int map) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: dots [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -T TERM override $TERM" #if HAVE_USE_ENV @@ -132,12 +133,14 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc, - char *argv[]) +main(int argc, char *argv[]) { int ch; double r; @@ -150,13 +153,14 @@ main(int argc, size_t need; char *my_env; - while ((ch = getopt(argc, argv, "T:efm:r:s:")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "T:efm:r:s:")) != -1) { switch (ch) { case 'T': need = 6 + strlen(optarg); - my_env = malloc(need); - _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); - putenv(my_env); + if ((my_env = malloc(need)) != NULL) { + _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); + putenv(my_env); + } break; #if HAVE_USE_ENV case 'e': @@ -175,9 +179,12 @@ main(int argc, case 's': s_option = atoi(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -236,8 +243,7 @@ main(int argc, } #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { fprintf(stderr, "This program requires terminfo\n"); exit(EXIT_FAILURE); diff --git a/test/dots_curses.c b/test/dots_curses.c index 95ddb931..1a553213 100644 --- a/test/dots_curses.c +++ b/test/dots_curses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: dots_curses.c,v 1.21 2020/08/29 16:22:03 juergen Exp $ + * $Id: dots_curses.c,v 1.25 2023/01/07 17:21:48 tom Exp $ * * A simple demo of the curses interface used for comparison with termcap. */ @@ -87,12 +87,13 @@ set_colors(int fg, int bg) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: dots_curses [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -T TERM override $TERM" #if HAVE_USE_DEFAULT_COLORS @@ -110,8 +111,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -129,13 +133,14 @@ main(int argc, char *argv[]) size_t need; char *my_env; - while ((ch = getopt(argc, argv, "T:dem:r:s:")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "T:dem:r:s:")) != -1) { switch (ch) { case 'T': need = 6 + strlen(optarg); - my_env = malloc(need); - _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); - putenv(my_env); + if ((my_env = malloc(need)) != NULL) { + _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); + putenv(my_env); + } break; #if HAVE_USE_DEFAULT_COLORS case 'd': @@ -156,9 +161,12 @@ main(int argc, char *argv[]) case 's': s_option = atoi(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } diff --git a/test/dots_mvcur.c b/test/dots_mvcur.c index a032124c..a6119237 100644 --- a/test/dots_mvcur.c +++ b/test/dots_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2007-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey - 2007 * - * $Id: dots_mvcur.c,v 1.26 2020/05/29 23:04:02 tom Exp $ + * $Id: dots_mvcur.c,v 1.31 2023/01/07 17:21:48 tom Exp $ * * A simple demo of the terminfo interface, and mvcur. */ @@ -112,12 +112,13 @@ get_number(NCURSES_CONST char *cap, int map) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: dots_termcap [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -T TERM override $TERM" #if HAVE_USE_ENV @@ -133,12 +134,14 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int x0 = 1, y0 = 1; int ch; @@ -153,13 +156,14 @@ main(int argc GCC_UNUSED, size_t need; char *my_env; - while ((ch = getopt(argc, argv, "T:efm:r:s:")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "T:efm:r:s:")) != -1) { switch (ch) { case 'T': need = 6 + strlen(optarg); - my_env = malloc(need); - _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); - putenv(my_env); + if ((my_env = malloc(need)) != NULL) { + _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); + putenv(my_env); + } break; #if HAVE_USE_ENV case 'e': @@ -178,9 +182,12 @@ main(int argc GCC_UNUSED, case 's': s_option = atoi(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -253,8 +260,7 @@ main(int argc GCC_UNUSED, } #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { fprintf(stderr, "This program requires terminfo\n"); exit(EXIT_FAILURE); diff --git a/test/dots_termcap.c b/test/dots_termcap.c index 5e4c17d1..65786c41 100644 --- a/test/dots_termcap.c +++ b/test/dots_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2013-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: dots_termcap.c,v 1.26 2020/09/05 17:58:47 juergen Exp $ + * $Id: dots_termcap.c,v 1.32 2023/02/25 18:11:21 tom Exp $ * * A simple demo of the termcap interface. */ @@ -150,11 +150,19 @@ ranf(void) return ((double) r / 32768.); } +/* + * napms is a curses function which happens to be usable without initializing + * the screen, but if this program happened to be build with a "real" termcap + * library, there is nothing like napms. + */ +#if HAVE_NAPMS +#define my_napms(ms) napms(ms) +#else static void my_napms(int ms) { if (ms > 0) { -#if defined(_NC_WINDOWS) || !HAVE_GETTIMEOFDAY +#if defined(_NC_WINDOWS) Sleep((unsigned int) ms); #else struct timeval data; @@ -164,6 +172,7 @@ my_napms(int ms) #endif } } +#endif static int get_number(NCURSES_CONST char *cap, const char *env) @@ -180,12 +189,13 @@ get_number(NCURSES_CONST char *cap, const char *env) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: dots_termcap [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -T TERM override $TERM" ," -e allow environment $LINES / $COLUMNS" @@ -198,8 +208,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -220,13 +233,14 @@ main(int argc, char *argv[]) size_t need; char *my_env; - while ((ch = getopt(argc, argv, "T:em:r:s:")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "T:em:r:s:")) != -1) { switch (ch) { case 'T': need = 6 + strlen(optarg); - my_env = malloc(need); - _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); - putenv(my_env); + if ((my_env = malloc(need)) != NULL) { + _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); + putenv(my_env); + } break; case 'e': e_option = 1; @@ -240,9 +254,12 @@ main(int argc, char *argv[]) case 's': s_option = atoi(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -319,8 +336,7 @@ main(int argc, char *argv[]) } #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { fprintf(stderr, "This program requires termcap\n"); exit(EXIT_FAILURE); diff --git a/test/dots_xcurses.c b/test/dots_xcurses.c index b640c2b6..b4b52193 100644 --- a/test/dots_xcurses.c +++ b/test/dots_xcurses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: dots_xcurses.c,v 1.24 2020/08/29 16:22:03 juergen Exp $ + * $Id: dots_xcurses.c,v 1.29 2023/01/07 17:21:48 tom Exp $ * * A simple demo of the wide-curses interface used for comparison with termcap. */ @@ -110,12 +110,13 @@ set_colors(int fg, int bg) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: dots_xcurses [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -T TERM override $TERM" #if HAVE_USE_DEFAULT_COLORS @@ -136,8 +137,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -155,13 +159,14 @@ main(int argc, char *argv[]) size_t need; char *my_env; - while ((ch = getopt(argc, argv, "T:dem:r:s:x")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "T:dem:r:s:x")) != -1) { switch (ch) { case 'T': need = 6 + strlen(optarg); - my_env = malloc(need); - _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); - putenv(my_env); + if ((my_env = malloc(need)) != NULL) { + _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg); + putenv(my_env); + } break; #if HAVE_USE_DEFAULT_COLORS case 'd': @@ -187,12 +192,16 @@ main(int argc, char *argv[]) x_option = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } + setlocale(LC_ALL, ""); srand((unsigned) time(0)); SetupAlarm(r_option); diff --git a/test/dump_window.c b/test/dump_window.c index 14a8c9fa..eed4dbcb 100644 --- a/test/dump_window.c +++ b/test/dump_window.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: dump_window.c,v 1.4 2020/02/02 23:34:34 tom Exp $ + * $Id: dump_window.c,v 1.5 2023/11/11 00:30:50 tom Exp $ */ #include @@ -97,7 +97,7 @@ dump_window(WINDOW *w) char aa; char pp; - temp = ((data & A_ATTRIBUTES) & (~A_COLOR)); + temp = ((data & A_ATTRIBUTES) & (chtype) (~A_COLOR)); if (temp) { if (temp & A_ALTCHARSET) { aa = (temp & A_BOLD) ? 'A' : 'a'; diff --git a/test/dup_field.c b/test/dup_field.c index eb87c90c..68198ed7 100644 --- a/test/dup_field.c +++ b/test/dup_field.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,9 +26,9 @@ * authorization. * ****************************************************************************/ /* - * $Id: dup_field.c,v 1.2 2021/03/27 23:41:57 tom Exp $ + * $Id: dup_field.c,v 1.8 2023/11/11 00:29:10 tom Exp $ * - * Demonstrate move_field(). + * Demonstrate dup_field(). */ #include @@ -38,7 +38,8 @@ #include #include -#define MY_DEMO EDIT_FIELD('f') +#define DO_DEMO CTRL('F') /* actual key for toggling demo-mode */ +#define MY_DEMO EDIT_FIELD('f') /* internal request-code */ static char empty[] = ""; static FIELD *all_fields[100]; @@ -51,7 +52,6 @@ static struct { { CTRL('A'), REQ_BEG_FIELD, "go to beginning of field" }, { CTRL('D'), REQ_DOWN_FIELD, "move downward to field" }, { CTRL('E'), REQ_END_FIELD, "go to end of field" }, - { CTRL('G'), MY_DEMO, "move current field with cursor keys" }, { CTRL('H'), REQ_DEL_PREV, "delete previous character" }, { CTRL('I'), REQ_NEXT_FIELD, "go to next field" }, { CTRL('K'), REQ_CLR_EOF, "clear to end of field" }, @@ -72,7 +72,8 @@ static struct { { KEY_NEXT, REQ_NEXT_FIELD, "go to next field" }, { KEY_PREVIOUS, REQ_PREV_FIELD, "go to previous field" }, { KEY_RIGHT, REQ_RIGHT_CHAR, "move right 1 character" }, - { KEY_UP, REQ_UP_CHAR, "move up 1 character" } + { KEY_UP, REQ_UP_CHAR, "move up 1 character" }, + { DO_DEMO, MY_DEMO, "duplicate current field" } }; /* *INDENT-ON* */ @@ -108,11 +109,6 @@ my_help_edit_field(void) free(msgs); } -static void -do_demo(FORM *form) -{ -} - static FIELD * make_label(const char *label, int frow, int fcol) { @@ -120,7 +116,7 @@ make_label(const char *label, int frow, int fcol) if (f) { set_field_buffer(f, 0, label); - set_field_opts(f, (int) ((unsigned) field_opts(f) & ~O_ACTIVE)); + set_field_opts(f, (int) ((unsigned) field_opts(f) & (unsigned) ~O_ACTIVE)); } return (f); } @@ -147,28 +143,6 @@ erase_form(FORM *f) werase(w); wrefresh(w); delwin(s); - delwin(w); -} - -static int -my_form_driver(FORM *form, int c) -{ - switch (c) { - case MY_QUIT: - if (form_driver(form, REQ_VALIDATION) == E_OK) - return (TRUE); - break; - case MY_HELP: - my_help_edit_field(); - break; - case MY_DEMO: - do_demo(form); - break; - default: - beep(); - break; - } - return (FALSE); } static FieldAttrs * @@ -291,6 +265,55 @@ my_edit_field(FORM *form, int *result) return status; } +static FIELD ** +copy_fields(FIELD **source, FIELD *extra, size_t length) +{ + FIELD **target = typeCalloc(FIELD *, length + 1); + memcpy(target, source, length * sizeof(FIELD *)); + target[length] = extra; + return target; +} + +static void +do_demo(FORM *form) +{ + int count = field_count(form); + FIELD *my_field = current_field(form); + FIELD **old_fields = form_fields(form); + + if (count > 0 && old_fields != NULL && my_field != NULL) { + FIELD **new_fields = copy_fields(old_fields, + dup_field(my_field, + form_field_row(my_field) + + 1, + form_field_col(my_field)), + (size_t) count); + if (new_fields != NULL) + set_form_fields(form, new_fields); + } +} + +static int +my_form_driver(FORM *form, int c) +{ + switch (c) { + case MY_QUIT: + if (form_driver(form, REQ_VALIDATION) == E_OK) + return (TRUE); + break; + case MY_HELP: + my_help_edit_field(); + break; + case MY_DEMO: + do_demo(form); + break; + default: + beep(); + break; + } + return (FALSE); +} + static void demo_forms(void) { @@ -354,9 +377,44 @@ demo_forms(void) nl(); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: dup_field [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(void) +main(int argc, char *argv[]) { + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + setlocale(LC_ALL, ""); initscr(); diff --git a/test/echochar.c b/test/echochar.c index ce7f03d3..08497069 100644 --- a/test/echochar.c +++ b/test/echochar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2006-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: echochar.c,v 1.21 2020/02/02 23:34:34 tom Exp $ + * $Id: echochar.c,v 1.26 2023/05/27 20:13:10 tom Exp $ * * Demonstrate the echochar function (compare to dots.c). * Thomas Dickey - 2006/11/4 @@ -65,7 +65,7 @@ ranf(void) } static void -set_color(char *my_pairs, int fg, int bg) +set_color(const char *const my_pairs, int fg, int bg) { int pair = (fg * COLORS) + bg; if (pair < COLOR_PAIRS) { @@ -78,9 +78,30 @@ set_color(char *my_pairs, int fg, int bg) } } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: echochar" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -r use addch/refresh rather than echochar()" + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; double r; @@ -91,14 +112,17 @@ main(int argc GCC_UNUSED, int last_fg = 0; int last_bg = 0; - while ((ch = getopt(argc, argv, "r")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "r")) != -1) { switch (ch) { case 'r': opt_r = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - fprintf(stderr, "Usage: echochar [-r]\n"); - ExitProgram(EXIT_FAILURE); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } diff --git a/test/extended_color.c b/test/extended_color.c index bc52cc48..746c0359 100644 --- a/test/extended_color.c +++ b/test/extended_color.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2022 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: extended_color.c,v 1.15 2020/02/02 23:34:34 tom Exp $ + * $Id: extended_color.c,v 1.20 2022/12/10 22:28:50 tom Exp $ */ #include @@ -139,42 +139,50 @@ show_rgb(SCREEN *sp) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { - "Usage: extended_color", - "", - "Options:", - " -s use sp-funcs", - NULL + "Usage: extended_color" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -s use sp-funcs" }; size_t n; for (n = 0; n < SIZEOF(tbl); ++n) { fprintf(stderr, "%s\n", tbl[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { + int ch; int i; SCREEN *sp; - while ((i = getopt(argc, argv, "s")) != -1) { - switch (i) { + while ((ch = getopt(argc, argv, OPTS_COMMON "s")) != -1) { + switch (ch) { #if USE_SP_FUNCS case 's': opt_s = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } + setlocale(LC_ALL, ""); slk_init(1); sp = newterm(NULL, stdout, stdin); cbreak(); diff --git a/test/filter.c b/test/filter.c index 6cd9206b..b7444569 100644 --- a/test/filter.c +++ b/test/filter.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey 1998 * - * $Id: filter.c,v 1.35 2020/07/25 22:40:57 tom Exp $ + * $Id: filter.c,v 1.38 2022/12/04 00:40:11 tom Exp $ * * An example of the 'filter()' function in ncurses, this program prompts * for commands and executes them (like a command shell). It illustrates @@ -299,28 +299,32 @@ cancel_altscreen(void) #endif static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: filter [options]" ,"" + ,USAGE_COMMON ,"Options:" #ifdef NCURSES_VERSION - ," -a suppress xterm alternate-screen by amending smcup/rmcup" + ," -a suppress xterm alternate-screen by amending smcup/rmcup" #endif - ," -c show current time on prompt line with \"Command\"" + ," -c show current time on prompt line with \"Command\"" #if HAVE_USE_DEFAULT_COLORS - ," -d invoke use_default_colors" + ," -d invoke use_default_colors" #endif - ," -i use initscr() rather than newterm()" - ," -p poll for individual characters rather than using getnstr" + ," -i use initscr() rather than newterm()" + ," -p poll for individual characters rather than using getnstr" }; unsigned n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -340,7 +344,7 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "adcip")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "adcip")) != -1) { switch (ch) { #ifdef NCURSES_VERSION case 'a': @@ -361,8 +365,12 @@ main(int argc, char *argv[]) case 'p': p_option = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } diff --git a/test/firework.c b/test/firework.c index bfeadd7c..54e4036c 100644 --- a/test/firework.c +++ b/test/firework.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: firework.c,v 1.37 2020/02/02 23:34:34 tom Exp $ + * $Id: firework.c,v 1.40 2022/12/04 00:40:11 tom Exp $ */ #include @@ -138,12 +138,13 @@ explode(int row, int col) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: firework [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors, repeat to use in init_pair" @@ -154,8 +155,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -170,19 +174,23 @@ main(int argc, char *argv[]) bool d_option = FALSE; #endif - while ((ch = getopt(argc, argv, "d")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "d")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': d_option = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); InitAndCatch(initscr(), onsig); noecho(); diff --git a/test/firstlast.c b/test/firstlast.c index 0a8e5ee0..c66c2b85 100644 --- a/test/firstlast.c +++ b/test/firstlast.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ * This test was written by Alexander V. Lukyanov to demonstrate difference * between ncurses 4.1 and SVR4 curses * - * $Id: firstlast.c,v 1.9 2020/02/02 23:34:34 tom Exp $ + * $Id: firstlast.c,v 1.10 2022/12/10 23:31:31 tom Exp $ */ #include @@ -71,11 +71,45 @@ fill(WINDOW *w, const char *str) } } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: firstlast [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { WINDOW *large, *small; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + initscr(); noecho(); diff --git a/test/foldkeys.c b/test/foldkeys.c index ba4d18ca..bb3801e2 100644 --- a/test/foldkeys.c +++ b/test/foldkeys.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2006-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey, 2006 * - * $Id: foldkeys.c,v 1.10 2021/08/08 00:41:57 tom Exp $ + * $Id: foldkeys.c,v 1.12 2023/02/25 16:51:01 tom Exp $ * * Demonstrate a method for altering key definitions at runtime. * @@ -193,13 +193,44 @@ demo_foldkeys(void) printw("Merged to %d key definitions\n", info_len - merged); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: foldkeys [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; -#if HAVE_GETTIMEOFDAY - struct timeval previous; -#endif + TimeType previous; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); if (newterm(0, stdout, stdin) == 0) { fprintf(stderr, "Cannot initialize terminal\n"); @@ -217,32 +248,17 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) demo_foldkeys(); -#if HAVE_GETTIMEOFDAY - gettimeofday(&previous, 0); -#endif + GetClockTime(&previous); while ((ch = getch()) != ERR) { bool escaped = (ch >= MY_KEYS); const char *name = keyname(escaped ? (ch - MY_KEYS) : ch); + TimeType current; -#if HAVE_GETTIMEOFDAY - int secs, msecs; - struct timeval current; - - gettimeofday(¤t, 0); - secs = (int) (current.tv_sec - previous.tv_sec); - msecs = (int) ((current.tv_usec - previous.tv_usec) / 1000); - if (msecs < 0) { - msecs += 1000; - --secs; - } - if (msecs >= 1000) { - secs += msecs / 1000; - msecs %= 1000; - } - printw("%6d.%03d ", secs, msecs); + GetClockTime(¤t); + printw("%6.03f ", ElapsedSeconds(&previous, ¤t)); previous = current; -#endif + printw("Keycode %d, name %s%s\n", ch, escaped ? "ESC-" : "", diff --git a/test/form_driver_w.c b/test/form_driver_w.c index dd7ea68c..544060dc 100644 --- a/test/form_driver_w.c +++ b/test/form_driver_w.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2013-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -32,7 +32,7 @@ ****************************************************************************/ /* - * $Id: form_driver_w.c,v 1.16 2020/02/02 23:34:34 tom Exp $ + * $Id: form_driver_w.c,v 1.17 2022/12/10 23:31:31 tom Exp $ * * Test form_driver_w (int, int, wchar_t), a wide char aware * replacement of form_driver. @@ -45,8 +45,28 @@ #include +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: form_driver_w [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(void) +main(int argc, char *argv[]) { static const char *help[] = { @@ -64,6 +84,20 @@ main(void) FORM *my_form; bool done = FALSE; int n; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); setlocale(LC_ALL, ""); @@ -94,14 +128,14 @@ main(void) /* Loop through to get user requests */ while (!done) { - wint_t ch; - int ret = get_wch(&ch); + wint_t c2; + int ret = get_wch(&c2); mvprintw(MyRow(NUM_FIELDS), MyCol(NUM_FIELDS), "Got %d (%#x), type: %s", - (int) ch, - (int) ch, + (int) c2, + (int) c2, (ret == KEY_CODE_YES) ? "KEY_CODE_YES" : ((ret == OK) @@ -113,7 +147,7 @@ main(void) switch (ret) { case KEY_CODE_YES: - switch (ch) { + switch (c2) { case KEY_DOWN: /* Go to next field */ form_driver_w(my_form, KEY_CODE_YES, REQ_NEXT_FIELD); @@ -132,7 +166,7 @@ main(void) } break; case OK: - switch (ch) { + switch (c2) { case CTRL('D'): case QUIT: case ESCAPE: @@ -146,7 +180,7 @@ main(void) popup_msg(form_win(my_form), help); break; default: - form_driver_w(my_form, OK, (wchar_t) ch); + form_driver_w(my_form, OK, (wchar_t) c2); break; } break; diff --git a/test/gdc.6 b/test/gdc.6 index 383aae57..bf90b26f 100644 --- a/test/gdc.6 +++ b/test/gdc.6 @@ -27,8 +27,8 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: gdc.6,v 1.5 2020/02/02 23:34:34 tom Exp $ -.TH GDC 6 +.\" $Id: gdc.6,v 1.6 2020/02/02 23:34:34 tom Exp $ +.TH GDC 6 2020-02-02 ncurses-examples Games .SH NAME gdc \- grand digital clock (curses) .SH SYNOPSIS diff --git a/test/gdc.c b/test/gdc.c index 59c95e17..7243c104 100644 --- a/test/gdc.c +++ b/test/gdc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -34,7 +34,7 @@ * modified 10-18-89 for curses (jrl) * 10-18-89 added signal handling * - * $Id: gdc.c,v 1.54 2020/02/02 23:34:34 tom Exp $ + * $Id: gdc.c,v 1.57 2022/12/04 00:40:11 tom Exp $ */ #include @@ -150,26 +150,27 @@ set(int t, int n) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: gdc [options] [count]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS - ," -d invoke use_default_colors" + ," -d invoke use_default_colors" #endif - ," -n redirect input to /dev/null" - ," -s scroll each number into place, rather than flipping" - ," -t hh:mm:ss specify starting time (default is ``now'')" + ," -n redirect input to /dev/null" + ," -s scroll each number into place, rather than flipping" + ," -t TIME specify starting time as hh:mm:ss (default is ``now'')" ,"" ,"If you specify a count, gdc runs for that number of seconds" }; unsigned j; for (j = 0; j < SIZEOF(msg); j++) fprintf(stderr, "%s\n", msg[j]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } static time_t @@ -183,14 +184,14 @@ parse_time(const char *value) if (sscanf(value, "%d:%d:%d%c", &hh, &mm, &ss, &c) != 3) { if (sscanf(value, "%02d%02d%02d%c", &hh, &mm, &ss, &c) != 3) { - usage(); + usage(FALSE); } } if ((hh < 0) || (hh >= 24) || (mm < 0) || (mm >= 60) || (ss < 0) || (ss >= 60)) { - usage(); + usage(FALSE); } /* adjust so that the localtime in the main loop will give usable time */ @@ -204,10 +205,13 @@ parse_time(const char *value) if (tm->tm_hour != hh) { fprintf(stderr, "Cannot find local time for %s!\n", value); - usage(); + usage(FALSE); } return result; } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -215,7 +219,7 @@ main(int argc, char *argv[]) time_t now; struct tm *tm; long t, a; - int i, j, s, k; + int i, j, s, k, ch; int count = 0; FILE *ofp = stdout; FILE *ifp = stdin; @@ -228,8 +232,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((k = getopt(argc, argv, "dnst:")) != -1) { - switch (k) { + while ((ch = getopt(argc, argv, OPTS_COMMON "dnst:")) != -1) { + switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': d_option = TRUE; @@ -245,15 +249,19 @@ main(int argc, char *argv[]) case 't': starts = parse_time(optarg); break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) { count = atoi(argv[optind++]); assert(count >= 0); if (optind < argc) - usage(); + usage(FALSE); } InitAndCatch({ diff --git a/test/hanoi.c b/test/hanoi.c index 610b2d8a..6d92332f 100644 --- a/test/hanoi.c +++ b/test/hanoi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -42,7 +42,7 @@ * * Date: 05.Nov.90 * - * $Id: hanoi.c,v 1.42 2021/05/08 20:44:44 tom Exp $ + * $Id: hanoi.c,v 1.47 2022/12/04 00:40:11 tom Exp $ */ #include @@ -125,6 +125,15 @@ InitTiles(void) Pegs[2].Count = 0; } +static int +two2n(int n) +{ + int result = 1; + while (n-- > 0) + result *= 2; + return result; +} + static void DisplayTiles(void) { @@ -134,7 +143,7 @@ DisplayTiles(void) erase(); MvAddStr(1, 24, "T O W E R S O F H A N O I"); MvAddStr(3, 34, "SJR 1990"); - MvPrintw(19, 5, "Moves : %d of %.0f", NMoves, pow(2.0, (float) NTiles) - 1); + MvPrintw(19, 5, "Moves : %d of %d", NMoves, two2n(NTiles) - 1); (void) attrset(A_REVERSE); MvAddStr(BASELINE, 8, " "); @@ -232,12 +241,13 @@ Solved(int NumTiles) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: hanoi [options] [[] [a]]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors" @@ -250,8 +260,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char **argv) @@ -263,7 +276,7 @@ main(int argc, char **argv) #endif NTiles = DEFAULTTILES; - while ((ch = getopt(argc, argv, "dn:X")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "dn:X")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': @@ -276,8 +289,11 @@ main(int argc, char **argv) case 'X': AutoFlag = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } @@ -286,7 +302,7 @@ main(int argc, char **argv) switch (argc - optind) { case 2: if (strcmp(argv[optind + 1], "a")) { - usage(); + usage(FALSE); } AutoFlag = TRUE; /* FALLTHRU */ @@ -296,12 +312,12 @@ main(int argc, char **argv) case 0: break; default: - usage(); + usage(FALSE); } if (NTiles > MAXTILES || NTiles < MINTILES) { fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES); - usage(); + usage(FALSE); } initscr(); diff --git a/test/hashtest.c b/test/hashtest.c index 70d62287..be79c0e1 100644 --- a/test/hashtest.c +++ b/test/hashtest.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 1998-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -31,7 +31,7 @@ * * Generate timing statistics for vertical-motion optimization. * - * $Id: hashtest.c,v 1.36 2020/02/02 23:34:34 tom Exp $ + * $Id: hashtest.c,v 1.39 2022/12/04 00:40:11 tom Exp $ */ #include @@ -150,49 +150,53 @@ run_test(bool optimized GCC_UNUSED) } static void -usage(void) +usage(int ok) { static const char *const tbl[] = { "Usage: hashtest [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -c continuous (don't reset between refresh's)" - ," -f num leave 'num' lines constant for footer" - ," -h num leave 'num' lines constant for header" - ," -l num repeat test 'num' times" - ," -n test the normal optimizer" - ," -o test the hashed optimizer" - ," -r reverse the loops" - ," -s single-step" - ," -x assume lower-right corner extension" + ," -c continuous (don't reset between refresh's)" + ," -F num leave 'num' lines constant for footer" + ," -H num leave 'num' lines constant for header" + ," -l num repeat test 'num' times" + ," -n test the normal optimizer" + ," -o test the hashed optimizer" + ," -r reverse the loops" + ," -s single-step" + ," -x assume lower-right corner extension" }; size_t n; for (n = 0; n < SIZEOF(tbl); n++) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int c; + int ch; int test_loops = 1; int test_normal = FALSE; int test_optimize = FALSE; setlocale(LC_ALL, ""); - while ((c = getopt(argc, argv, "cf:h:l:norsx")) != -1) { - switch (c) { + while ((ch = getopt(argc, argv, OPTS_COMMON "cF:H:l:norsx")) != -1) { + switch (ch) { case 'c': continuous = TRUE; break; - case 'f': + case 'F': foot_lines = atoi(optarg); break; - case 'h': + case 'H': head_lines = atoi(optarg); break; case 'l': @@ -214,8 +218,12 @@ main(int argc, char *argv[]) case 'x': extend_corner = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (!test_normal && !test_optimize) { diff --git a/test/inch_wide.c b/test/inch_wide.c index e44a5f51..7b838d1d 100644 --- a/test/inch_wide.c +++ b/test/inch_wide.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2007-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: inch_wide.c,v 1.11 2020/02/02 23:34:34 tom Exp $ + * $Id: inch_wide.c,v 1.13 2022/12/10 23:55:34 tom Exp $ */ /* int in_wch(cchar_t *wcval); @@ -259,19 +259,49 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) return TRUE; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: inch_wide [options] [file1 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *chrbox; WINDOW *chrwin; WINDOW *strwin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file1 [file2 [...]]\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -282,7 +312,7 @@ main(int argc, char *argv[]) chrwin = derwin(chrbox, 1, COLS - 2, 1, 1); strwin = derwin(chrbox, 4, COLS - 2, 2, 1); - test_inchs(1, argv, chrwin, strwin); + test_inchs(optind, argv, chrwin, strwin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/inchs.c b/test/inchs.c index 1d1691a6..b5922dd6 100644 --- a/test/inchs.c +++ b/test/inchs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2007-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: inchs.c,v 1.18 2020/02/02 23:34:34 tom Exp $ + * $Id: inchs.c,v 1.19 2022/12/11 00:01:39 tom Exp $ * * Author: Thomas E Dickey */ @@ -271,19 +271,49 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) return TRUE; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: inchs [options] file1 [file2 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *chrbox; WINDOW *chrwin; WINDOW *strwin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file1 [file2 [...]]\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -294,7 +324,7 @@ main(int argc, char *argv[]) chrwin = derwin(chrbox, 1, COLS - 2, 1, 1); strwin = derwin(chrbox, 4, COLS - 2, 2, 1); - test_inchs(1, argv, chrwin, strwin); + test_inchs(optind, argv, chrwin, strwin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/ins_wide.c b/test/ins_wide.c index 9f733924..a7324493 100644 --- a/test/ins_wide.c +++ b/test/ins_wide.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2002-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: ins_wide.c,v 1.25 2020/02/02 23:34:34 tom Exp $ + * $Id: ins_wide.c,v 1.30 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the wins_wstr() and wins_wch functions. * Thomas Dickey - 2002/11/23 @@ -106,7 +106,7 @@ legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) } static int -ColOf(wchar_t *buffer, int length, int margin) +ColOf(const wchar_t *buffer, int length, int margin) { int n; int result; @@ -455,32 +455,36 @@ test_inserts(int level) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: ins_wide [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -f FILE read data from given file" - ," -n NUM limit string-inserts to NUM bytes on ^N replay" - ," -m perform wmove/move separately from insert-functions" - ," -w use window-parameter even when stdscr would be implied" + ," -f FILE read data from given file" + ," -n NUM limit string-inserts to NUM bytes on ^N replay" + ," -m perform wmove/move separately from insert-functions" + ," -w use window-parameter even when stdscr would be implied" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:w")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:mn:w")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -496,13 +500,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'w': w_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); test_inserts(0); endwin(); diff --git a/test/insdelln.c b/test/insdelln.c index 55e606ae..52ccfb62 100644 --- a/test/insdelln.c +++ b/test/insdelln.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2008-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: insdelln.c,v 1.14 2020/02/02 23:34:34 tom Exp $ + * $Id: insdelln.c,v 1.15 2022/12/10 23:31:31 tom Exp $ * * test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln */ @@ -371,9 +371,44 @@ test_insdelln(void) } while ((st.ch = getch()) != ERR); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: insdelln [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + initscr(); cbreak(); noecho(); diff --git a/test/inserts.c b/test/inserts.c index 6d108cc3..b106ffc7 100644 --- a/test/inserts.c +++ b/test/inserts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2002-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: inserts.c,v 1.30 2020/02/02 23:34:34 tom Exp $ + * $Id: inserts.c,v 1.34 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the winsstr() and winsch functions. * Thomas Dickey - 2002/10/19 @@ -384,32 +384,36 @@ test_inserts(int level) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: inserts [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -f FILE read data from given file" - ," -n NUM limit string-inserts to NUM bytes on ^N replay" - ," -m perform wmove/move separately from insert-functions" - ," -w use window-parameter even when stdscr would be implied" + ," -f FILE read data from given file" + ," -n NUM limit string-inserts to NUM bytes on ^N replay" + ," -m perform wmove/move separately from insert-functions" + ," -w use window-parameter even when stdscr would be implied" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:w")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:mn:w")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -425,13 +429,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'w': w_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); test_inserts(0); endwin(); diff --git a/test/key_names.c b/test/key_names.c index 69c95d63..fa7fdba6 100644 --- a/test/key_names.c +++ b/test/key_names.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2007-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: key_names.c,v 1.8 2020/02/02 23:34:34 tom Exp $ + * $Id: key_names.c,v 1.11 2022/12/04 00:40:11 tom Exp $ */ #include @@ -35,15 +35,32 @@ #if USE_WIDEC_SUPPORT static void -usage(void) +usage(int ok) { - fprintf(stderr, "Usage: key_names [-m] [-s]\n"); - ExitProgram(EXIT_FAILURE); + static const char *msg[] = + { + "Usage: key_names" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -m call meta(TRUE) in initialization" + ," -s call newterm, etc., to complete initialization" + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + int ch; int n; bool do_setup = FALSE; @@ -51,16 +68,19 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((n = getopt(argc, argv, "ms")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "ms")) != -1) { + switch (ch) { case 'm': do_meta = TRUE; break; case 's': do_setup = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } diff --git a/test/keynames.c b/test/keynames.c index 5a3d12a6..cae260f6 100644 --- a/test/keynames.c +++ b/test/keynames.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2006,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,37 +27,57 @@ * authorization. * ****************************************************************************/ /* - * $Id: keynames.c,v 1.10 2020/02/02 23:34:34 tom Exp $ + * $Id: keynames.c,v 1.13 2022/12/04 00:40:11 tom Exp $ */ #include static void -usage(void) +usage(int ok) { - fprintf(stderr, "Usage: keynames [-m] [-s]\n"); - ExitProgram(EXIT_FAILURE); + static const char *msg[] = + { + "Usage: keynames" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -m call meta(TRUE) in initialization" + ," -s call newterm, etc., to complete initialization" + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + int ch; int n; bool do_setup = FALSE; bool do_meta = FALSE; setlocale(LC_ALL, ""); - while ((n = getopt(argc, argv, "ms")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "ms")) != -1) { + switch (ch) { case 'm': do_meta = TRUE; break; case 's': do_setup = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } diff --git a/test/knight.c b/test/knight.c index 08ccf225..b15c4d23 100644 --- a/test/knight.c +++ b/test/knight.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -34,7 +34,7 @@ * Eric S. Raymond July 22 1995. Mouse support * added September 20th 1995. * - * $Id: knight.c,v 1.49 2021/05/08 19:32:15 tom Exp $ + * $Id: knight.c,v 1.52 2022/12/04 00:40:11 tom Exp $ */ #include @@ -899,12 +899,13 @@ play(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: knight [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors" @@ -916,15 +917,18 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { int ch; - while ((ch = getopt(argc, argv, "dn:")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "dn:")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': @@ -935,17 +939,20 @@ main(int argc, char *argv[]) ch = atoi(optarg); if (ch < 3 || ch > 8) { fprintf(stderr, "board size %d is outside [3..8]\n", ch); - usage(); + usage(FALSE); } xlimit = ylimit = ch; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); init_program(); diff --git a/test/list_keys.c b/test/list_keys.c index e3077de4..b616919f 100644 --- a/test/list_keys.c +++ b/test/list_keys.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: list_keys.c,v 1.27 2021/03/27 23:41:21 tom Exp $ + * $Id: list_keys.c,v 1.33 2023/11/11 00:35:05 tom Exp $ * * Author: Thomas E Dickey * @@ -52,7 +52,10 @@ static bool f_opt = FALSE; static bool m_opt = FALSE; static bool t_opt = FALSE; + +#if NCURSES_XNAMES || HAVE_USE_EXTENDED_NAMES static bool x_opt = FALSE; +#endif typedef enum { ktCursor @@ -71,6 +74,13 @@ typedef struct { #define Type(n) list[n].type #define Name(n) list[n].name +static void +failed(const char *msg) +{ + perror(msg); + ExitProgram(EXIT_FAILURE); +} + static const char * full_name(const char *name) { @@ -338,8 +348,11 @@ list_keys(TERMINAL **terms, int count) widths1 = (int) strlen(modifier); for (k = 0; k < count; ++k) { + char *value; set_curterm(terms[k]); - check = (int) strlen(termname()); + if ((value = termname()) == NULL) + failed("termname"); + check = (int) strlen(value); if (widths2 < check) widths2 = check; } @@ -417,37 +430,41 @@ list_keys(TERMINAL **terms, int count) } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: list_keys [options] [terminal [terminal2 [...]]]", - "", - "Print capabilities for terminal special keys.", - "", - "Options:", - " -f print full names", - " -m print modifier-column for shift/control keys", - " -t print result as CSV table", + "Usage: list_keys [options] [terminal [terminal2 [...]]]" + ,"" + ,"Print capabilities for terminal special keys." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -f print full names" + ," -m print modifier-column for shift/control keys" + ," -t print result as CSV table" #ifdef NCURSES_VERSION - " -x print extended capabilities", + ," -x print extended capabilities" #endif }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int n; + int ch; TERMINAL **terms = typeCalloc(TERMINAL *, argc + 1); - while ((n = getopt(argc, argv, "fmtx")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "fmtx")) != -1) { + switch (ch) { case 'f': f_opt = TRUE; break; @@ -457,14 +474,17 @@ main(int argc, char *argv[]) case 't': t_opt = TRUE; break; -#ifdef NCURSES_VERSION +#if NCURSES_XNAMES || HAVE_USE_EXTENDED_NAMES case 'x': x_opt = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -475,6 +495,7 @@ main(int argc, char *argv[]) if (optind < argc) { int found = 0; int status; + int n; for (n = optind; n < argc; ++n) { setupterm((NCURSES_CONST char *) argv[n], 1, &status); if (status > 0 && cur_term != 0) { @@ -496,7 +517,7 @@ main(int argc, char *argv[]) #else int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { printf("This program requires the terminfo arrays\n"); ExitProgram(EXIT_FAILURE); @@ -504,7 +525,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #endif #else /* !HAVE_TIGETSTR */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { printf("This program requires the terminfo functions such as tigetstr\n"); ExitProgram(EXIT_FAILURE); diff --git a/test/listused.sh b/test/listused.sh index 2151653e..45653ebd 100755 --- a/test/listused.sh +++ b/test/listused.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2021,2022 Thomas E. Dickey # # Copyright 2003-2006,2010 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -27,14 +27,16 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: listused.sh,v 1.10 2021/06/17 21:20:30 tom Exp $ +# $Id: listused.sh,v 1.12 2022/07/16 16:33:38 tom Exp $ # A very simple script to list all entrypoints that are used by either a test # program, or within the libraries. This relies on the output format of 'nm', # and assumes that the libraries are configured with TRACE defined, and using # these options: # --disable-macros +# --enable-opaque-curses # --enable-sp-funcs # --enable-widec +# --without-gpm # Static libraries are used, to provide some filtering based on internal usage # of the different symbols. @@ -65,7 +67,7 @@ do ;; *) NAME=../objects/${name}.o - if test -f $NAME + if test -f "$NAME" then PROGS="$PROGS $NAME" fi @@ -76,19 +78,19 @@ done # For each library - for lib in ../lib/*.a do - LIB=`basename $lib .a` + LIB=`basename "$lib" .a` case $LIB in *_*|*+*) continue ;; esac - tmp=`echo $LIB|sed -e 's/w$//'` + tmp=`echo "$LIB"|sed -e 's/w$//'` echo echo "${tmp}:" - echo $tmp |sed -e 's/./-/g' + echo "$tmp" |sed -e 's/./-/g' # Construct a list of public externals provided by the library. - WANT=`nm $NM_OPTS $lib |\ + WANT=`nm $NM_OPTS "$lib" |\ sed -e 's/^[^ ]*//' \ -e 's/^ *//' \ -e '/^[ a-z] /d' \ @@ -111,7 +113,7 @@ do tags=$prog ;; *) - TEST=`nm $NM_OPTS $prog |\ + TEST=`nm $NM_OPTS "$prog" |\ sed -e 's/^[^ ]*//' \ -e 's/^ *//' \ -e '/^[ a-z] /d' \ @@ -123,7 +125,7 @@ do -e '/^[^_]/d'` if test -n "$TEST" then - have=`basename $prog .o` + have=`basename "$prog" .o` if test -n "$HAVE" then if test "$last" = "$tags" @@ -151,7 +153,7 @@ do continue ;; esac - TEST=`nm $NM_OPTS $tmp |\ + TEST=`nm $NM_OPTS "$tmp" |\ sed -e 's/^[^ ]*//' \ -e 's/^ *//' \ -e '/^[ a-z] /d' \ @@ -164,20 +166,20 @@ do -e '/^[^_]/d'` if test -n "$TEST" then - tmp=`basename $tmp .a |sed -e 's/w$//'` - HAVE=`echo $tmp | sed -e 's/lib/lib: /'` + tmp=`basename "$tmp" .a |sed -e 's/w$//'` + HAVE=`echo "$tmp" | sed -e 's/lib/lib: /'` break fi done fi test -z "$HAVE" && HAVE="-" - lenn=`expr 39 - length $name` - lenn=`expr $lenn / 8` + lenn=`expr 39 - length "$name"` + lenn=`expr "$lenn" / 8` tabs= - while test $lenn != 0 + while test "$lenn" != 0 do tabs="${tabs} " - lenn=`expr $lenn - 1` + lenn=`expr "$lenn" - 1` done echo "${name}${tabs}${HAVE}" done diff --git a/test/lrtest.c b/test/lrtest.c index 9c77577e..0e609d01 100644 --- a/test/lrtest.c +++ b/test/lrtest.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 1998-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ * This can't be part of the ncurses test-program, because ncurses rips off the * bottom line to do labels. * - * $Id: lrtest.c,v 1.27 2020/02/02 23:34:34 tom Exp $ + * $Id: lrtest.c,v 1.29 2022/12/10 23:44:18 tom Exp $ */ #include @@ -82,10 +82,28 @@ show(MARK *m) } } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: lrtest [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main( - int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { static MARK marks[] = { @@ -97,6 +115,20 @@ main( {1, 0, 1, 1, 1, '*' | A_REVERSE}, {2, 0, 1, 1, 1, '*' | A_REVERSE} }; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); setlocale(LC_ALL, ""); @@ -132,7 +164,7 @@ main( } for (;;) { - int ch; + int c2; unsigned n; box(stdscr, 0, 0); @@ -140,21 +172,21 @@ main( show(&marks[n]); } - if ((ch = getch()) > 0) { - if (ch == 'q') + if ((c2 = getch()) > 0) { + if (c2 == 'q') break; - else if (ch == 's') + else if (c2 == 's') nodelay(stdscr, FALSE); - else if (ch == ' ') + else if (c2 == ' ') nodelay(stdscr, TRUE); #ifdef TRACE - else if (ch == 'T') + else if (c2 == 'T') curses_trace(0); - else if (ch == 't') + else if (c2 == 't') curses_trace(TRACE_CALLS | TRACE_ICALLS | TRACE_UPDATE); #endif #ifdef KEY_RESIZE - else if (ch == KEY_RESIZE) { + else if (c2 == KEY_RESIZE) { for (n = 0; n < SIZEOF(marks); n++) { if (marks[n].mode == 0) { /* moving along x-direction */ if (marks[n].y) diff --git a/test/make-tar.sh b/test/make-tar.sh index 9eaf40b0..df4b66aa 100755 --- a/test/make-tar.sh +++ b/test/make-tar.sh @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: make-tar.sh,v 1.18 2021/10/12 21:12:16 tom Exp $ +# $Id: make-tar.sh,v 1.21 2022/11/05 19:41:33 tom Exp $ ############################################################################## -# Copyright 2019-2020,2021 Thomas E. Dickey # +# Copyright 2019-2021,2022 Thomas E. Dickey # # Copyright 2010-2015,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -42,6 +42,12 @@ TARGET=`pwd` : "${DESTDIR:=$TARGET}" : "${TMPDIR:=/tmp}" +# make timestamps of generated files predictable +same_timestamp() { + [ -f ../NEWS ] || echo "OOPS $1" + touch -r ../NEWS "$1" +} + grep_assign() { grep_assign=`grep -E "^$2\>" "$1" | sed -e "s/^$2[ ]*=[ ]*//" -e 's/"//g'` eval "$2"=\""$grep_assign"\" @@ -62,6 +68,7 @@ edit_specfile() { -e "s/\\/$NCURSES_PATCH/g" "$1" >"$1.new" chmod u+w "$1" mv "$1.new" "$1" + same_timestamp "$1" } make_changelog() { @@ -73,6 +80,7 @@ make_changelog() { -- `head -n 1 "$HOME"/.signature` `date -R` EOF + same_timestamp "$1" } # This can be run from either the subdirectory, or from the top-level @@ -84,7 +92,8 @@ fi SOURCE=`cd ..;pwd` BUILD=$TMPDIR/make-tar$$ -trap "cd /; rm -rf $BUILD; exit 0" EXIT INT QUIT TERM HUP +trap "cd /; rm -rf $BUILD; exit 1" 1 2 3 15 +trap "cd /; rm -rf $BUILD; exit 0" 0 umask 077 if ! ( mkdir $BUILD ) @@ -123,6 +132,7 @@ cp -p "$SOURCE/NEWS" "$BUILD/$ROOTNAME" touch $BUILD/$ROOTNAME/MANIFEST ( cd $BUILD/$ROOTNAME && find . -type f -print | "$SOURCE/misc/csort" >MANIFEST ) +same_timestamp $BUILD/$ROOTNAME/MANIFEST cd $BUILD || exit @@ -141,7 +151,10 @@ find . -name "*.gz" -exec rm -rf {} \; # Make the files writable... chmod -R u+w . -tar cf - $ROOTNAME | gzip >"$DESTDIR/$ROOTNAME.tar.gz" +# Cleanup timestamps +[ -n "$TOUCH_DIRS" ] && "$TOUCH_DIRS" "$ROOTNAME" + +tar cf - $TAR_OPTIONS $ROOTNAME | gzip >"$DESTDIR/$ROOTNAME.tar.gz" cd "$DESTDIR" || exit pwd diff --git a/test/modules b/test/modules index 6ba90a37..fb97d027 100644 --- a/test/modules +++ b/test/modules @@ -1,6 +1,6 @@ -# $Id: modules,v 1.75 2021/12/11 17:41:34 tom Exp $ +# $Id: modules,v 1.79 2023/11/10 11:48:20 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2022,2023 Thomas E. Dickey # # Copyright 1998-2016,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -101,15 +101,19 @@ test_addchstr progs $(srcdir) $(HEADER_DEPS) $(srcdir)/linedata.h test_addstr progs $(srcdir) $(HEADER_DEPS) $(srcdir)/linedata.h test_addwstr progs $(srcdir) $(HEADER_DEPS) $(srcdir)/linedata.h test_arrays progs $(srcdir) $(HEADER_DEPS) +test_delwin progs $(srcdir) $(HEADER_DEPS) +test_endwin progs $(srcdir) $(HEADER_DEPS) test_get_wstr progs $(srcdir) $(HEADER_DEPS) test_getstr progs $(srcdir) $(HEADER_DEPS) test_instr progs $(srcdir) $(HEADER_DEPS) test_inwstr progs $(srcdir) $(HEADER_DEPS) +test_mouse progs $(srcdir) $(HEADER_DEPS) test_opaque progs $(srcdir) $(HEADER_DEPS) test_setupterm progs $(srcdir) $(HEADER_DEPS) test_sgr progs $(srcdir) $(HEADER_DEPS) test_termattrs progs $(srcdir) $(HEADER_DEPS) test_tparm progs $(srcdir) $(HEADER_DEPS) +test_unget_wch progs $(srcdir) $(HEADER_DEPS) test_vid_puts progs $(srcdir) $(HEADER_DEPS) test_vidputs progs $(srcdir) $(HEADER_DEPS) testaddch progs $(srcdir) $(HEADER_DEPS) diff --git a/test/move_field.c b/test/move_field.c index b5ec9438..84bac3f4 100644 --- a/test/move_field.c +++ b/test/move_field.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: move_field.c,v 1.9 2021/06/12 21:30:34 tom Exp $ + * $Id: move_field.c,v 1.15 2023/11/11 00:28:19 tom Exp $ * * Demonstrate move_field(). */ @@ -38,14 +38,6 @@ #include #include -#ifdef HAVE_NETBSD_FORM_H -#define form_field_row(field) (field)->form_row -#define form_field_col(field) (field)->form_col -#else /* e.g., SVr4, ncurses */ -#define form_field_row(field) (field)->frow -#define form_field_col(field) (field)->fcol -#endif - #define DO_DEMO CTRL('F') /* actual key for toggling demo-mode */ #define MY_DEMO EDIT_FIELD('f') /* internal request-code */ @@ -124,7 +116,7 @@ make_label(const char *label, int frow, int fcol) if (f) { set_field_buffer(f, 0, label); - set_field_opts(f, (int) ((unsigned) field_opts(f) & ~O_ACTIVE)); + set_field_opts(f, (int) ((unsigned) field_opts(f) & (unsigned) ~O_ACTIVE)); } return (f); } @@ -151,7 +143,6 @@ erase_form(FORM *f) werase(w); wrefresh(w); delwin(s); - delwin(w); } static FieldAttrs * @@ -277,7 +268,7 @@ my_edit_field(FORM *form, int *result) static FIELD ** copy_fields(FIELD **source, size_t length) { - FIELD **target = calloc(length + 1, sizeof(FIELD *)); + FIELD **target = typeCalloc(FIELD *, length + 1); memcpy(target, source, length * sizeof(FIELD *)); return target; } @@ -309,13 +300,13 @@ do_demo(FORM *form) { int count = field_count(form); FIELD *my_field = current_field(form); + FIELD **old_fields = form_fields(form); - if (count > 0 && my_field != NULL) { + if (count > 0 && old_fields != NULL && my_field != NULL) { size_t needed = (size_t) count; - FIELD **old_fields = copy_fields(form_fields(form), needed); - FIELD **new_fields = copy_fields(form_fields(form), needed); + FIELD **new_fields = copy_fields(old_fields, needed); - if (old_fields != NULL && new_fields != NULL) { + if (new_fields != NULL) { bool found = FALSE; int ch; @@ -395,7 +386,6 @@ do_demo(FORM *form) refresh(); } } - free(old_fields); free(new_fields); } } @@ -484,9 +474,44 @@ demo_forms(void) nl(); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: move_field [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(void) +main(int argc, char *argv[]) { + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + setlocale(LC_ALL, ""); initscr(); diff --git a/test/movewindow.c b/test/movewindow.c index 1c8f42d1..07797ca6 100644 --- a/test/movewindow.c +++ b/test/movewindow.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2006-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: movewindow.c,v 1.52 2021/12/18 18:57:55 tom Exp $ + * $Id: movewindow.c,v 1.54 2023/05/27 20:13:10 tom Exp $ * * Demonstrate move functions for windows and derived windows from the curses * library. @@ -324,6 +324,7 @@ add_window(WINDOW *parent, WINDOW *child) all_windows = typeRealloc(FRAME, need, all_windows); if (!all_windows) failed("add_window"); + have = need; } all_windows[num_windows].parent = parent; all_windows[num_windows].child = child; @@ -331,7 +332,7 @@ add_window(WINDOW *parent, WINDOW *child) } static int -window2num(WINDOW *win) +window2num(const WINDOW *const win) { int n; int result = -1; @@ -407,7 +408,7 @@ prev_window(WINDOW *win) } static void -recur_move_window(WINDOW *parent, int dy, int dx) +recur_move_window(const WINDOW *const parent, int dy, int dx) { unsigned n; @@ -671,13 +672,46 @@ show_help(WINDOW *current) free(msgs); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: movewindow [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { WINDOW *current_win; int ch; bool done = FALSE; + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + initscr(); cbreak(); noecho(); diff --git a/test/ncurses.c b/test/ncurses.c index c387b0a1..a272d142 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -41,24 +41,24 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.527 2021/09/04 10:31:03 tom Exp $ +$Id: ncurses.c,v 1.538 2023/11/11 01:23:59 tom Exp $ ***************************************************************************/ +#define NEED_TIME_H 1 #include #ifdef __hpux #undef mvwdelch /* HPUX 11.23 macro will not compile */ #endif -#if HAVE_GETTIMEOFDAY #if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT #include #endif + #if HAVE_SYS_SELECT_H #include #endif -#endif #if USE_LIBPANEL #include @@ -770,7 +770,7 @@ slk_repaint(void) * Resize both and paint the box in the parent. */ static void -resize_boxes(unsigned level, WINDOW *win) +resize_boxes(unsigned level, const WINDOW *const win) { unsigned n; int base = 5; @@ -1012,7 +1012,7 @@ getch_test(bool recur GCC_UNUSED) */ #if defined(KEY_RESIZE) && HAVE_WRESIZE static void -resize_wide_boxes(unsigned level, WINDOW *win) +resize_wide_boxes(unsigned level, const WINDOW *const win) { unsigned n; int base = 5; @@ -2885,6 +2885,10 @@ init_all_colors(bool xterm_colors, char *palette_file) while (fgets(buffer, sizeof(buffer), fp) != 0) { if (sscanf(buffer, "scale:%d", &c) == 1) { scale = c; + if (scale < 100) + scale = 100; + if (scale > 1000) + scale = 1000; } else if (sscanf(buffer, "%d:%d %d %d", &c, &red, @@ -3153,7 +3157,7 @@ color_edit(bool recur GCC_UNUSED) * ****************************************************************************/ static bool -cycle_attr(int ch, unsigned *at_code, chtype *attr, ATTR_TBL * list, unsigned limit) +cycle_attr(int ch, unsigned *at_code, attr_t *attr, ATTR_TBL * list, unsigned limit) { bool result = TRUE; @@ -3314,7 +3318,7 @@ slk_test(bool recur GCC_UNUSED) int c, fmt = 1; char buf[9]; char *s; - chtype attr = A_NORMAL; + attr_t attr = A_NORMAL; unsigned at_code = 0; #if HAVE_SLK_COLOR int fg = COLOR_BLACK; @@ -3404,7 +3408,7 @@ slk_test(bool recur GCC_UNUSED) default: if (cycle_attr(c, &at_code, &attr, my_list, my_size)) { - slk_attrset(attr); + slk_attrset((chtype) attr); slk_touch(); slk_noutrefresh(); break; @@ -3820,7 +3824,7 @@ acs_test(bool recur GCC_UNUSED) const char *pch_kludge = ((term != 0 && strstr(term, "linux")) ? "p=PC, " : ""); - chtype attr = A_NORMAL; + attr_t attr = A_NORMAL; int digit = 0; int repeat = 1; int fg = COLOR_BLACK; @@ -4413,7 +4417,7 @@ x_acs_test(bool recur GCC_UNUSED) if (pending_code) { _nc_SPRINTF(at_page, _nc_SLIMIT(sizeof(at_page)) "%02x", digit); } else if (at_page[0] != '\0') { - _nc_SPRINTF(at_page, _nc_SLIMIT(sizeof(at_page)) "%x", digit); + sscanf(at_page, "%x", &digit); } break; default: @@ -5596,10 +5600,8 @@ panner(WINDOW *pad, int (*pgetc) (WINDOW *), bool colored) { -#if HAVE_GETTIMEOFDAY - struct timeval before, after; + TimeType before, after; bool timing = TRUE; -#endif bool pan_lines = FALSE; bool scrollers = TRUE; int basex = 0; @@ -5645,13 +5647,11 @@ panner(WINDOW *pad, pending_pan = FALSE; break; -#if HAVE_GETTIMEOFDAY case 't': timing = !timing; if (!timing) panner_legend(LINES - 1); break; -#endif case 's': scrollers = !scrollers; break; @@ -5824,9 +5824,7 @@ panner(WINDOW *pad, MvAddCh(porty - 1, portx - 1, ACS_LRCORNER); if (!pending_pan) { -#if HAVE_GETTIMEOFDAY - gettimeofday(&before, 0); -#endif + GetClockTime(&before); wnoutrefresh(stdscr); pnoutrefresh(pad, @@ -5836,17 +5834,12 @@ panner(WINDOW *pad, portx - (pymax > porty) - 1); doupdate(); -#if HAVE_GETTIMEOFDAY -#define TIMEVAL2S(data) ((double) data.tv_sec + ((double) data.tv_usec / 1.0e6)) if (timing) { - double elapsed; - gettimeofday(&after, 0); - elapsed = (TIMEVAL2S(after) - TIMEVAL2S(before)); + GetClockTime(&after); move(LINES - 1, COLS - 12); - printw("Secs: %2.03f", elapsed); + printw("Secs: %6.03f", ElapsedSeconds(&before, &after)); refresh(); } -#endif } } while @@ -6168,7 +6161,6 @@ menu_test(bool recur GCC_UNUSED) break; if (c == E_REQUEST_DENIED) beep(); - continue; } MvPrintw(LINES - 2, 0, @@ -6336,8 +6328,9 @@ trace_set(bool recur GCC_UNUSED) set_item_value(*ip, TRUE); } - while (run_trace_menu(m)) - continue; + while (run_trace_menu(m)) { + /* EMPTY */ ; + } newtrace = 0; for (ip = menu_items(m); *ip; ip++) @@ -6376,7 +6369,7 @@ make_label(int frow, int fcol, NCURSES_CONST char *label) if (f) { set_field_buffer(f, 0, label); - set_field_opts(f, (int) ((unsigned) field_opts(f) & ~O_ACTIVE)); + set_field_opts(f, (int) ((unsigned) field_opts(f) & (unsigned) ~O_ACTIVE)); } return (f); } @@ -7635,48 +7628,49 @@ settings_test(bool recur GCC_UNUSED) ****************************************************************************/ static void -usage(void) +usage(int ok) { static const char *const tbl[] = { "Usage: ncurses [options]" ,"" + ,USAGE_COMMON ,"Options:" #ifdef NCURSES_VERSION - ," -a f,b set default-colors (assumed white-on-black)" - ," -d use default-colors if terminal supports them" + ," -a f,b set default-colors (assumed white-on-black)" + ," -d use default-colors if terminal supports them" #endif #if HAVE_USE_ENV - ," -E call use_env(FALSE) to ignore $LINES and $COLUMNS" + ," -E call use_env(FALSE) to ignore $LINES and $COLUMNS" #endif #if USE_SOFTKEYS - ," -e fmt specify format for soft-keys test (e)" + ," -e fmt specify format for soft-keys test (e)" #endif #if HAVE_RIPOFFLINE - ," -f rip-off footer line (can repeat)" - ," -h rip-off header line (can repeat)" + ," -F rip-off footer line (can repeat)" + ," -H rip-off header line (can repeat)" #endif - ," -m do not use colors" + ," -m do not use colors" #if HAVE_COLOR_CONTENT - ," -p file rgb values to use in 'd' rather than ncurses's builtin" + ," -p file rgb values to use in 'd' rather than ncurses's builtin" #endif #if USE_LIBPANEL - ," -s msec specify nominal time for panel-demo (default: 1, to hold)" + ," -s msec specify nominal time for panel-demo (default: 1, to hold)" #endif #if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_NC_WINDOWS) - ," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment" + ," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment" #endif #ifdef TRACE - ," -t mask specify default trace-level (may toggle with ^T)" + ," -t mask specify default trace-level (may toggle with ^T)" #endif #if HAVE_COLOR_CONTENT - ," -x use xterm-compatible control for reading color palette" + ," -x use xterm-compatible control for reading color palette" #endif }; size_t n; for (n = 0; n < SIZEOF(tbl); n++) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } static void @@ -7883,11 +7877,14 @@ main_menu(bool top) /*+------------------------------------------------------------------------- main(argc,argv) --------------------------------------------------------------------------*/ +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int c; + int ch; int my_e_param = 1; #ifdef NCURSES_VERSION_PATCH #if HAVE_USE_DEFAULT_COLORS @@ -7907,8 +7904,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((c = getopt(argc, argv, "a:dEe:fhmp:s:Tt:x")) != -1) { - switch (c) { + while ((ch = getopt(argc, argv, OPTS_COMMON "a:dEe:FHmp:s:Tt:x")) != -1) { + switch (ch) { #ifdef NCURSES_VERSION_PATCH #if HAVE_USE_DEFAULT_COLORS #if HAVE_ASSUME_DEFAULT_COLORS @@ -7938,17 +7935,17 @@ main(int argc, char *argv[]) my_e_param = atoi(optarg); #ifdef NCURSES_VERSION if (my_e_param > 3) /* allow extended layouts */ - usage(); + usage(FALSE); #else if (my_e_param > 1) - usage(); + usage(FALSE); #endif break; #if HAVE_RIPOFFLINE - case 'f': + case 'F': ripoffline(-1, rip_footer); break; - case 'h': + case 'H': ripoffline(1, rip_header); break; #endif /* HAVE_RIPOFFLINE */ @@ -7980,8 +7977,12 @@ main(int argc, char *argv[]) xterm_colors = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } diff --git a/test/newdemo.c b/test/newdemo.c index d76523ab..78761534 100644 --- a/test/newdemo.c +++ b/test/newdemo.c @@ -2,7 +2,7 @@ * newdemo.c - A demo program using PDCurses. The program illustrate * the use of colours for text output. * - * $Id: newdemo.c,v 1.47 2019/12/14 23:25:29 tom Exp $ + * $Id: newdemo.c,v 1.48 2022/12/10 23:36:05 tom Exp $ */ #include @@ -215,17 +215,51 @@ BouncingBalls(WINDOW *win) return 0; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: newdemo [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + /* * Main driver */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { WINDOW *win; int x, y, i, k; char buffer[SIZEOF(messages) * 80]; int width, height; chtype save[80]; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); setlocale(LC_ALL, ""); diff --git a/test/package/debian-mingw/compat b/test/package/debian-mingw/compat index f599e28b..48082f72 100644 --- a/test/package/debian-mingw/compat +++ b/test/package/debian-mingw/compat @@ -1 +1 @@ -10 +12 diff --git a/test/package/debian-mingw/control b/test/package/debian-mingw/control index 64bd01b1..116103d2 100644 --- a/test/package/debian-mingw/control +++ b/test/package/debian-mingw/control @@ -2,7 +2,7 @@ Source: ncurses-examples Maintainer: Thomas E. Dickey Section: misc Priority: optional -Standards-Version: 3.8.4 +Standards-Version: 4.6.1.0 Build-Depends: debhelper (>= 5) Homepage: https://invisible-island.net/ncurses/ncurses-examples.html diff --git a/test/package/debian-mingw/copyright b/test/package/debian-mingw/copyright index 2226a074..7546e1cc 100644 --- a/test/package/debian-mingw/copyright +++ b/test/package/debian-mingw/copyright @@ -4,13 +4,13 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 Thomas E. Dickey +Copyright: 2017-2023,2024 Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 2003-2020,2021 by Thomas E. Dickey -Licence: X11 +Copyright: 2003-2023,2024 by Thomas E. Dickey +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -39,7 +39,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/test/package/debian-mingw/rules b/test/package/debian-mingw/rules index e61cf71a..152cd3c7 100755 --- a/test/package/debian-mingw/rules +++ b/test/package/debian-mingw/rules @@ -70,7 +70,7 @@ install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs $(MAKE) install DESTDIR=$(MINGW_TMP) diff --git a/test/package/debian-mingw64/compat b/test/package/debian-mingw64/compat index f599e28b..48082f72 100644 --- a/test/package/debian-mingw64/compat +++ b/test/package/debian-mingw64/compat @@ -1 +1 @@ -10 +12 diff --git a/test/package/debian-mingw64/control b/test/package/debian-mingw64/control index c22f262a..df942b75 100644 --- a/test/package/debian-mingw64/control +++ b/test/package/debian-mingw64/control @@ -2,7 +2,7 @@ Source: ncurses-examples Maintainer: Thomas E. Dickey Section: misc Priority: optional -Standards-Version: 3.8.4 +Standards-Version: 4.6.1.0 Build-Depends: debhelper (>= 5) Homepage: https://invisible-island.net/ncurses/ncurses-examples.html diff --git a/test/package/debian-mingw64/copyright b/test/package/debian-mingw64/copyright index 2226a074..7546e1cc 100644 --- a/test/package/debian-mingw64/copyright +++ b/test/package/debian-mingw64/copyright @@ -4,13 +4,13 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 Thomas E. Dickey +Copyright: 2017-2023,2024 Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 2003-2020,2021 by Thomas E. Dickey -Licence: X11 +Copyright: 2003-2023,2024 by Thomas E. Dickey +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -39,7 +39,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/test/package/debian-mingw64/rules b/test/package/debian-mingw64/rules index 7db9c5ac..02175a66 100755 --- a/test/package/debian-mingw64/rules +++ b/test/package/debian-mingw64/rules @@ -70,7 +70,7 @@ install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs $(MAKE) install DESTDIR=$(MINGW_TMP) diff --git a/test/package/debian/compat b/test/package/debian/compat index f599e28b..48082f72 100644 --- a/test/package/debian/compat +++ b/test/package/debian/compat @@ -1 +1 @@ -10 +12 diff --git a/test/package/debian/control b/test/package/debian/control index d7647b3f..89de1b8c 100644 --- a/test/package/debian/control +++ b/test/package/debian/control @@ -2,7 +2,7 @@ Source: ncurses-examples Maintainer: Thomas E. Dickey Section: misc Priority: optional -Standards-Version: 3.8.4 +Standards-Version: 4.6.1.0 Build-Depends: debhelper (>= 5) Homepage: https://invisible-island.net/ncurses/ncurses-examples.html diff --git a/test/package/debian/copyright b/test/package/debian/copyright index c8885b0b..7546e1cc 100644 --- a/test/package/debian/copyright +++ b/test/package/debian/copyright @@ -4,13 +4,13 @@ Current ncurses maintainer: Thomas Dickey ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2021,2022 Thomas E. Dickey +Copyright: 2017-2023,2024 Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. -Licence: X11 +License: X11 Files: aclocal.m4 package -Copyright: 2003-2019,2020 by Thomas E. Dickey -Licence: X11 +Copyright: 2003-2023,2024 by Thomas E. Dickey +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -39,7 +39,7 @@ Licence: X11 ------------------------------------------------------------------------------- Files: install-sh Copyright: 1994 X Consortium -Licence: X11 +License: X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/test/package/mingw-ncurses-examples.spec b/test/package/mingw-ncurses-examples.spec index cad43d1d..bfadd10e 100644 --- a/test/package/mingw-ncurses-examples.spec +++ b/test/package/mingw-ncurses-examples.spec @@ -4,14 +4,14 @@ Summary: ncurses-examples - example/test programs from ncurses %global AppProgram ncurses-examples %global AppVersion MAJOR.MINOR %global AppRelease YYYYMMDD -# $Id: mingw-ncurses-examples.spec,v 1.10 2021/06/17 21:11:12 tom Exp $ +# $Id: mingw-ncurses-examples.spec,v 1.11 2023/02/25 23:10:34 tom Exp $ Name: mingw32-ncurses6-examples Version: %{AppVersion} Release: %{AppRelease} License: X11 Group: Development/Libraries -Source: ncurses-examples-%{release}.tgz -# URL: https://invisible-island.net/ncurses/ +URL: https://invisible-island.net/ncurses/%{AppProgram}.html +Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz BuildRequires: mingw32-ncurses6 @@ -56,6 +56,9 @@ This package is used for testing ABI 6 with cross-compiles to MinGW. %global mingw32_datadir %{mingw32_datadir}/%{AppProgram} %global mingw64_datadir %{mingw64_datadir}/%{AppProgram} +%global mingw32_libexec %{mingw32_libexecdir}/%{AppProgram} +%global mingw64_libexec %{mingw64_libexecdir}/%{AppProgram} + %define CFG_OPTS \\\ --enable-echo \\\ --enable-warnings \\\ @@ -96,26 +99,24 @@ pushd BUILD-W64 %{mingw64_make} install DESTDIR=$RPM_BUILD_ROOT popd -%clean -if rm -rf $RPM_BUILD_ROOT; then - echo OK -else - find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1 -fi -exit 0 - -%defattr(-,root,root,-) - %files -n mingw32-ncurses6-examples +%defattr(-,root,root,-) %{mingw32_bindir}/* %{mingw32_datadir}/* +%{mingw32_libexec}/* %files -n mingw64-ncurses6-examples +%defattr(-,root,root,-) %{mingw64_bindir}/* %{mingw64_datadir}/* +%{mingw64_libexec}/* %changelog +* Sat Feb 25 2023 Thomas Dickey +- use libexecdir for programs rather than subdir of bindir +- amend URLs per rpmlint + * Sat Nov 16 2019 Thomas Dickey - modify clean-rule to work around Fedora NFS bugs. diff --git a/test/package/ncurses-examples.spec b/test/package/ncurses-examples.spec index 1a045edc..8f1a3cbe 100644 --- a/test/package/ncurses-examples.spec +++ b/test/package/ncurses-examples.spec @@ -3,15 +3,14 @@ Summary: example/test programs from ncurses %global AltProgram ncursest-examples %global AppVersion MAJOR.MINOR %global AppRelease YYYYMMDD -# $Id: ncurses-examples.spec,v 1.21 2021/12/19 00:13:46 tom Exp $ +# $Id: ncurses-examples.spec,v 1.22 2023/02/25 23:10:49 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: %{AppRelease} License: MIT Group: Applications/Development -URL: ftp://ftp.invisible-island.net/pub/%{AppProgram} -Source0: %{AppProgram}-%{AppRelease}.tgz -Packager: Thomas Dickey +URL: https://invisible-island.net/ncurses/%{AppProgram}.html +Source: https://invisible-island.net/archives/%{AppProgram}/%{AppProgram}-%{release}.tgz %description These are the example/test programs from the ncurses MAJOR.MINOR distribution, @@ -83,14 +82,6 @@ pushd BUILD-%{AltProgram} make install PACKAGE=%{AltProgram} DESTDIR=$RPM_BUILD_ROOT popd -%clean -if rm -rf $RPM_BUILD_ROOT; then - echo OK -else - find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1 -fi -exit 0 - %files -n %{AppProgram} %defattr(-,root,root) %{_bindir}/%{AppProgram} @@ -106,6 +97,9 @@ exit 0 %changelog # each patch should add its ChangeLog entries here +* Sat Feb 25 2023 Thomas Dickey +- amend URLs per rpmlint + * Sat Dec 18 2021 Thomas Dickey - use libexecdir for programs rather than subdir of bindir diff --git a/test/padview.c b/test/padview.c index fb1d9fca..0defee34 100644 --- a/test/padview.c +++ b/test/padview.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -29,7 +29,7 @@ /* * clone of view.c, using pads * - * $Id: padview.c,v 1.18 2021/06/12 23:16:31 tom Exp $ + * $Id: padview.c,v 1.22 2022/12/04 00:40:11 tom Exp $ */ #include @@ -45,6 +45,7 @@ static GCC_NORETURN void finish(int sig); #define my_pair 1 +static WINDOW *global_pad; static int shift = 0; static bool try_color = FALSE; @@ -55,8 +56,6 @@ static int num_lines; static bool n_option = FALSE; #endif -static GCC_NORETURN void usage(void); - static void failed(const char *msg) { @@ -69,6 +68,8 @@ static void finish(int sig) { endwin(); + if (global_pad != NULL) + delwin(global_pad); ExitProgram(sig != 0 ? EXIT_FAILURE : EXIT_SUCCESS); } @@ -247,12 +248,13 @@ read_file(const char *filename) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: view [options] file" ,"" + ,USAGE_COMMON ,"Options:" ," -c use color if terminal supports it" ," -i ignore INT, QUIT, TERM signals" @@ -268,8 +270,11 @@ usage(void) size_t n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -299,6 +304,7 @@ main(int argc, char *argv[]) 0 }; + int ch; int i; int my_delay = 0; WINDOW *my_pad; @@ -312,8 +318,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((i = getopt(argc, argv, "cinstT:")) != -1) { - switch (i) { + while ((ch = getopt(argc, argv, OPTS_COMMON "cinstT:")) != -1) { + switch (ch) { case 'c': try_color = TRUE; break; @@ -334,7 +340,7 @@ main(int argc, char *argv[]) char *next = 0; int tvalue = (int) strtol(optarg, &next, 0); if (tvalue < 0 || (next != 0 && *next != 0)) - usage(); + usage(FALSE); curses_trace((unsigned) tvalue); } break; @@ -342,12 +348,16 @@ main(int argc, char *argv[]) curses_trace(TRACE_CALLS); break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind + 1 != argc) - usage(); + usage(FALSE); InitAndCatch(initscr(), ignore_sigs ? SIG_IGN : finish); keypad(stdscr, TRUE); /* enable keyboard mapping */ @@ -372,7 +382,8 @@ main(int argc, char *argv[]) * Do this after starting color, otherwise the pad's background will be * uncolored after the ncurses 6.1.20181208 fixes. */ - my_pad = read_file(fname = argv[optind]); + global_pad = + my_pad = read_file(fname = argv[optind]); my_row = 0; while (!done) { diff --git a/test/pair_content.c b/test/pair_content.c index fc5926b5..2b759a82 100644 --- a/test/pair_content.c +++ b/test/pair_content.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: pair_content.c,v 1.14 2020/02/02 23:34:34 tom Exp $ + * $Id: pair_content.c,v 1.22 2023/02/25 16:43:56 tom Exp $ */ #define NEED_TIME_H @@ -57,10 +57,15 @@ static int x_opt; static MYPAIR *expected; -#if HAVE_GETTIMEOFDAY -static struct timeval initial_time; -static struct timeval finish_time; -#endif +static TimeType initial_time; +static TimeType finish_time; + +static GCC_NORETURN void +finish(int code) +{ + free(expected); + ExitProgram(code); +} static void failed(const char *msg) @@ -68,7 +73,7 @@ failed(const char *msg) printw("%s", msg); getch(); endwin(); - ExitProgram(EXIT_FAILURE); + finish(EXIT_FAILURE); } #if USE_EXTENDED_COLOR @@ -115,6 +120,7 @@ random_color(void) static void setup_test(void) { + setlocale(LC_ALL, ""); initscr(); cbreak(); noecho(); @@ -163,9 +169,7 @@ setup_test(void) } else { failed("This demo requires a color terminal"); } -#if HAVE_GETTIMEOFDAY - gettimeofday(&initial_time, 0); -#endif + GetClockTime(&initial_time); } static void @@ -198,23 +202,14 @@ finish_test(void) endwin(); } -#if HAVE_GETTIMEOFDAY -static double -seconds(struct timeval *mark) -{ - double result = (double) mark->tv_sec; - result += ((double) mark->tv_usec / 1e6); - return result; -} -#endif - static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: pair_content [options]" ,"" + ,USAGE_COMMON ,"Options:" ," -f PAIR first color pair to test (default: 1)" ," -i interactive, showing test-progress" @@ -230,26 +225,29 @@ usage(void) size_t n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { - int i; + int ch; - while ((i = getopt(argc, argv, "f:il:npr:sx")) != -1) { - switch (i) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:il:npr:sx")) != -1) { + switch (ch) { case 'f': if ((f_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 'i': i_opt = 1; break; case 'l': if ((l_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 'n': n_opt = 1; @@ -259,7 +257,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) break; case 'r': if ((r_opt = atoi(optarg)) <= 0) - usage(); + usage(FALSE); break; case 's': s_opt = 1; @@ -269,17 +267,22 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) x_opt = 1; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); if (r_opt <= 0) r_opt = 1; setup_test(); if (p_opt) { + int i; endwin(); for (i = f_opt; i < l_opt; ++i) { my_color_t fg, bg; @@ -304,14 +307,10 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) addch('\n'); } printw("DONE: "); -#if HAVE_GETTIMEOFDAY - gettimeofday(&finish_time, 0); - printw("%.03f seconds", - seconds(&finish_time) - - seconds(&initial_time)); -#endif + GetClockTime(&finish_time); + printw("%.03f seconds", ElapsedSeconds(&initial_time, &finish_time)); finish_test(); } - ExitProgram(EXIT_SUCCESS); + finish(EXIT_SUCCESS); } diff --git a/test/picsmap.c b/test/picsmap.c index f95747f4..b582f3aa 100644 --- a/test/picsmap.c +++ b/test/picsmap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2022,2023 Thomas E. Dickey * * Copyright 2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: picsmap.c,v 1.139 2021/05/08 15:56:05 tom Exp $ + * $Id: picsmap.c,v 1.149 2023/04/23 23:20:37 tom Exp $ * * Author: Thomas E. Dickey * @@ -53,13 +53,6 @@ #include #include -#if HAVE_STDINT_H -#include -#define my_intptr_t intptr_t -#else -#define my_intptr_t long -#endif - #if HAVE_TSEARCH #include #endif @@ -487,27 +480,28 @@ read_file(const char *filename) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: picsmap [options] [imagefile [...]]" ,"Read/display one or more xbm/xpm files (possibly use \"convert\")" ,"" + ,USAGE_COMMON ,"Options:" - ," -a ratio aspect-ratio correction for ImageMagick" + ," -a ratio aspect-ratio correction for ImageMagick" #if HAVE_USE_DEFAULT_COLORS - ," -d invoke use_default_colors" + ," -d invoke use_default_colors" #endif - ," -L add debugging information to logfile" - ," -l logfile write informational messages to logfile" - ," -p palette color-palette file (default \"$TERM.dat\")" - ," -q less verbose" - ," -r rgb-path xpm uses X rgb color-names (default \"" RGB_PATH "\")" - ," -s SECS pause for SECS seconds after display vs getch" + ," -L add debugging information to logfile" + ," -l FILE write informational messages to FILE" + ," -p FILE color-palette file (default \"$TERM.dat\")" + ," -q less verbose" + ," -r FILE xpm uses X rgb color-names in FILE (default \"" RGB_PATH "\")" + ," -s SECS pause for SECS seconds after display vs getch" #if USE_EXTENDED_COLORS - ," -x [pc] use extension (p=extended-pairs, c=extended-colors)" - ," Either/both extension may be given" + ," -x [pc] use extension (p=extended-pairs, c=extended-colors)" + ," Either/both extension may be given" #endif }; size_t n; @@ -517,7 +511,7 @@ usage(void) fflush(stdout); for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - cleanup(EXIT_FAILURE); + cleanup(ok ? EXIT_SUCCESS : EXIT_FAILURE); } static void @@ -541,7 +535,7 @@ giveup(const char *fmt, ...) fflush(logfp); } - usage(); + usage(FALSE); } /* @@ -797,6 +791,7 @@ match_c(const char *source, const char *pattern, ...) int ch; int *ip; char *cp; + float *fp; long lv; va_start(ap, pattern); @@ -810,10 +805,13 @@ match_c(const char *source, const char *pattern, ...) continue; } /* %c, %d, %s are like sscanf except for special treatment of blanks */ - if (ch == '%' && *pattern != '\0' && strchr("cdnsx", *pattern)) { + if (ch == '%' && *pattern != '\0' && strchr("%cdnfsx", *pattern)) { bool found = FALSE; ch = *pattern++; switch (ch) { + case '%': + source++; + break; case 'c': cp = va_arg(ap, char *); do { @@ -832,6 +830,29 @@ match_c(const char *source, const char *pattern, ...) goto finish; } break; + case 'f': + /* floating point for pixels... */ + fp = va_arg(ap, float *); + lv = strtol(source, &cp, 10); + if (cp == 0 || cp == source) + goto finish; + *fp = (float) lv; + source = cp; + if (*source == '.') { + lv = strtol(++source, &cp, 10); + if (cp == 0 || cp == source) + goto finish; + { + float scale = 1.0f; + int digits = (int) (cp - source); + while (digits-- > 0) { + scale *= 10.0f; + } + *fp += (float) lv / scale; + } + source = cp; + } + break; case 'n': /* not really sscanf... */ limit = *va_arg(ap, int *); @@ -1346,11 +1367,16 @@ parse_img(const char *filename) break; } } else { - /* subsequent lines begin "col,row: (r,g,b,a) #RGB" */ + /* + * subsequent lines begin "col,row: (r,g,b,a) #RGB". + * Those r/g/b could be integers (0..255) or float-percentages. + */ int r, g, b, nocolor; + float rf, gf, bf; unsigned check; char *t; char *s = t = strchr(buffer, '#'); + bool matched = FALSE; if (s != 0) { /* after the "#RGB", there are differences - just ignore */ @@ -1358,19 +1384,44 @@ parse_img(const char *filename) ++s; *++s = '\0'; } + if (match_c(buffer, "%d,%d: (%d,%d,%d,%d) #%x ", &col, &row, &r, &g, &b, &nocolor, &check)) { + matched = TRUE; + } else if (match_c(buffer, + "%d,%d: (%f%%,%f%%,%f%%,%d) #%x ", + &col, &row, + &rf, &gf, &bf, &nocolor, + &check) || + match_c(buffer, + "%d,%d: (%f%%,%f%%,%f%%) #%x ", + &col, &row, + &rf, &gf, &bf, + &check)) { + matched = TRUE; + +#define fp_fix(n) (int) (MaxRGB * (((n) > 100.0 ? 100.0 : (n)) / 100.0)) + + r = fp_fix(rf); + g = fp_fix(gf); + b = fp_fix(bf); + } + if ((s - t) > 8) /* 6 hex digits vs 8 */ + check /= 256; + if (matched) { int which, c; + int want_r = (check >> 16) & 0xff; + int want_g = (check >> 8) & 0xff; + int want_b = (check >> 0) & 0xff; + +#define fp_err(tst,ref) ((tst > MaxRGB) || ((tst - ref)*(tst - ref)) > 4) - if ((s - t) > 8) /* 6 hex digits vs 8 */ - check /= 256; - if (r > MaxRGB || - g > MaxRGB || - b > MaxRGB || - check != (unsigned) ((r << 16) | (g << 8) | b)) { + if (fp_err(r, want_r) || + fp_err(g, want_g) || + fp_err(b, want_b)) { okay = FALSE; break; } @@ -1470,6 +1521,7 @@ init_display(const char *palette_path, int opt_d) (void) opt_d; if (isatty(fileno(stdout))) { in_curses = TRUE; + setlocale(LC_ALL, ""); initscr(); cbreak(); noecho(); @@ -1665,24 +1717,27 @@ report_colors(PICS_HEAD * pics) } } } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int n; + int ch; int opt_d = FALSE; char ignore_ch; const char *palette_path = 0; const char *rgb_path = RGB_PATH; - while ((n = getopt(argc, argv, "a:dLl:p:qr:s:x:")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "a:dLl:p:qr:s:x:")) != -1) { + switch (ch) { case 'a': if (sscanf(optarg, "%lf%c", &aspect_ratio, &ignore_ch) != 1 || aspect_ratio < 0.1 || aspect_ratio > 10.) { fprintf(stderr, "Expected a number in [0.1 to 10.]: %s\n", optarg); - usage(); + usage(FALSE); } break; #if HAVE_USE_DEFAULT_COLORS @@ -1722,21 +1777,25 @@ main(int argc, char *argv[]) use_extended_colors = TRUE; break; default: - usage(); + usage(FALSE); break; } } } break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) { char **rgb_data = read_file(rgb_path); + int n; if (rgb_data) rgb_table = parse_rgb(rgb_data); @@ -1769,7 +1828,7 @@ main(int argc, char *argv[]) free(rgb_table); free(all_colors); } else { - usage(); + usage(FALSE); } cleanup(EXIT_SUCCESS); diff --git a/test/programs b/test/programs index a759ffda..16ecf810 100644 --- a/test/programs +++ b/test/programs @@ -1,6 +1,6 @@ -# $Id: programs,v 1.51 2021/12/18 18:46:56 tom Exp $ +# $Id: programs,v 1.57 2023/11/10 11:48:38 tom Exp $ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2022,2023 Thomas E. Dickey # # Copyright 2006-2016,2017 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -96,15 +96,19 @@ test_addchstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_addchstr test_addstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_addstr test_addwstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_addwstr test_arrays $(LDFLAGS_TINFO) $(LOCAL_LIBS) test_arrays +test_delwin $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_delwin +test_endwin $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_endwin test_get_wstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_get_wstr popup_msg test_getstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_getstr popup_msg test_instr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_instr test_inwstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_inwstr +test_mouse $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_mouse test_opaque $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_opaque test_setupterm $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_setupterm test_sgr $(LDFLAGS_TINFO) $(LOCAL_LIBS) test_sgr test_termattrs $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_termattrs test_tparm $(LDFLAGS_TINFO) $(LOCAL_LIBS) test_tparm +test_unget_wch $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_unget_wch test_vid_puts $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_vid_puts test_vidputs $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_vidputs testaddch $(LDFLAGS_CURSES) $(LOCAL_LIBS) testaddch diff --git a/test/railroad.c b/test/railroad.c index 3336f565..4d7c0700 100644 --- a/test/railroad.c +++ b/test/railroad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 2000-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey - 2000 * - * $Id: railroad.c,v 1.25 2020/09/05 21:43:37 tom Exp $ + * $Id: railroad.c,v 1.26 2022/12/11 00:12:13 tom Exp $ * * A simple demo of the termcap interface. */ @@ -235,11 +235,44 @@ railroad(char **args) } } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: railroad [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { - if (argc > 1) { - railroad(argv + 1); + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + + if (optind < argc) { + railroad(argv + optind); } else { static char world[] = "Hello World"; static char *hello[] = @@ -251,8 +284,7 @@ main(int argc, char *argv[]) #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { printf("This program requires termcap\n"); exit(EXIT_FAILURE); diff --git a/test/rain.c b/test/rain.c index 4c3568cf..1b1d81a0 100644 --- a/test/rain.c +++ b/test/rain.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2022 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: rain.c,v 1.52 2020/08/29 16:22:03 juergen Exp $ + * $Id: rain.c,v 1.57 2022/12/04 00:40:11 tom Exp $ */ #include #include @@ -57,6 +57,7 @@ typedef struct DATA { #ifdef USE_PTHREADS pthread_cond_t cond_next_drop; +pthread_mutex_t mutex_drop_data; pthread_mutex_t mutex_next_drop; static int used_threads; @@ -200,7 +201,7 @@ draw_part(void (*func) (DATA *), int state, DATA * data) static int put_next_drop(void) { - pthread_cond_signal(&cond_next_drop); + pthread_cond_broadcast(&cond_next_drop); pthread_mutex_unlock(&mutex_next_drop); return 0; @@ -246,7 +247,9 @@ draw_drop(void *arg) * to the data which it uses for setting up this thread (but it has * been modified to use different coordinates). */ + pthread_mutex_lock(&mutex_drop_data); mydata = *(DATA *) arg; + pthread_mutex_unlock(&mutex_drop_data); draw_part(part1, 0, &mydata); draw_part(part2, 1, &mydata); @@ -254,6 +257,7 @@ draw_drop(void *arg) draw_part(part4, 3, &mydata); draw_part(part5, 4, &mydata); draw_part(part6, 0, &mydata); + } while (get_next_drop()); return NULL; @@ -298,12 +302,13 @@ get_input(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: rain [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors" @@ -314,8 +319,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -341,20 +349,23 @@ main(int argc, char *argv[]) bool d_option = FALSE; #endif - while ((ch = getopt(argc, argv, "d")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "d")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': d_option = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); setlocale(LC_ALL, ""); @@ -374,7 +385,9 @@ main(int argc, char *argv[]) curs_set(0); timeout(0); -#ifndef USE_PTHREADS +#ifdef USE_PTHREADS + pthread_mutex_init(&mutex_drop_data, NULL); +#else /* !USE_PTHREADS */ for (j = MAX_DROP; --j >= 0;) { last[j].x = random_x(); last[j].y = random_y(); @@ -383,14 +396,21 @@ main(int argc, char *argv[]) #endif while (!done) { +#ifdef USE_PTHREADS + pthread_mutex_lock(&mutex_drop_data); + drop.x = random_x(); drop.y = random_y(); -#ifdef USE_PTHREADS if (start_drop(&drop) != 0) { beep(); } + + pthread_mutex_unlock(&mutex_drop_data); #else + drop.x = random_x(); + drop.y = random_y(); + /* * The non-threaded code draws parts of each drop on each loop. */ diff --git a/test/redraw.c b/test/redraw.c index b0840fb8..749f790b 100644 --- a/test/redraw.c +++ b/test/redraw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 2006-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: redraw.c,v 1.13 2021/06/17 21:26:02 tom Exp $ + * $Id: redraw.c,v 1.17 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the redrawwin() and wredrawln() functions. * Thomas Dickey - 2006/11/4 @@ -189,30 +189,34 @@ test_redraw(WINDOW *win) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: redraw [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -e use stderr (default stdout)" - ," -n do not initialize terminal" + ," -e use stderr (default stdout)" + ," -n do not initialize terminal" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; bool no_init = FALSE; FILE *my_fp = stdout; - while ((ch = getopt(argc, argv, "en")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "en")) != -1) { switch (ch) { case 'e': my_fp = stderr; @@ -220,13 +224,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'n': no_init = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); if (no_init) { START_TRACE(); diff --git a/test/savescreen.c b/test/savescreen.c index 4c767a52..3ea61930 100644 --- a/test/savescreen.c +++ b/test/savescreen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 2006-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: savescreen.c,v 1.58 2021/03/27 23:41:21 tom Exp $ + * $Id: savescreen.c,v 1.62 2022/12/10 23:23:27 tom Exp $ * * Demonstrate save/restore functions from the curses library. * Thomas Dickey - 2007/7/14 @@ -253,24 +253,28 @@ replay_help(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: savescreen [-r] files", - "", - "Options:", - " -f file fill/initialize screen using text from this file", - " -i use scr_init/scr_restore rather than scr_set", - " -k keep the restored dump-files rather than removing them", - " -r replay the screen-dump files" + "Usage: savescreen [-r] files" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -f file fill/initialize screen using text from this file" + ," -i use scr_init/scr_restore rather than scr_set" + ," -k keep the restored dump-files rather than removing them" + ," -r replay the screen-dump files" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -291,7 +295,7 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:ikr")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:ikr")) != -1) { switch (ch) { case 'f': fill_by = optarg; @@ -305,9 +309,12 @@ main(int argc, char *argv[]) case 'r': replaying = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -648,7 +655,7 @@ main(int argc, char *argv[]) #else int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { printf("This program requires the screen-dump functions\n"); ExitProgram(EXIT_FAILURE); diff --git a/test/savescreen.sh b/test/savescreen.sh old mode 100644 new mode 100755 index 4a15ce42..1ffab2fc --- a/test/savescreen.sh +++ b/test/savescreen.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright 2020 Thomas E. Dickey # +# Copyright 2020,2022 Thomas E. Dickey # # Copyright 2007-2009,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -27,17 +27,18 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: savescreen.sh,v 1.6 2020/02/02 23:34:34 tom Exp $ +# $Id: savescreen.sh,v 1.8 2022/07/16 16:34:34 tom Exp $ # # Use this script to exercise "savescreen". # It starts by generating a series of temporary-filenames, which are passed # to the test-program. Loop as long as the first file named exists. -: ${TMPDIR:=/tmp} +: "${TMPDIR:=/tmp}" # "mktemp -d" would be preferable, but is not standard. MY_DIR=$TMPDIR/savescreen$$ -trap "rm -rf $MY_DIR" EXIT INT QUIT HUP +trap "rm -rf $MY_DIR; exit 1" 1 2 3 +trap "rm -rf $MY_DIR" 0 umask 077 mkdir $MY_DIR || exit 1 @@ -58,7 +59,7 @@ if test -f $BEGINS then while test -f $BEGINS do - ${0%.sh} -r $PARAMS + "${0%.sh}" -r $PARAMS test $? != 0 && break done else diff --git a/test/sp_tinfo.c b/test/sp_tinfo.c index 419b000a..72b20cfb 100644 --- a/test/sp_tinfo.c +++ b/test/sp_tinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -28,7 +28,7 @@ ****************************************************************************/ /* - * $Id: sp_tinfo.c,v 1.23 2020/02/02 23:34:34 tom Exp $ + * $Id: sp_tinfo.c,v 1.29 2023/06/24 14:14:56 tom Exp $ * * TOTO: add option for non-sp-funcs interface */ @@ -279,48 +279,51 @@ cleanup(MYDATA * data) { set_curterm(data->term); del_curterm(data->term); -#if !NO_LEAKS - free(data->sp); /* cannot use delscreen in tinfo */ -#endif free(data); } static void -usage(void) +usage(int ok) { static const char *tbl[] = { - "Usage: sp_tinfo [output] [error]", - "", - "Options:", - " -n suppress call to new_prescr()", - " -t use termcap functions rather than terminfo", - NULL + "Usage: sp_tinfo [output] [error]" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -n suppress call to new_prescr()" + ," -t use termcap functions rather than terminfo" }; size_t n; for (n = 0; n < SIZEOF(tbl); ++n) { fprintf(stderr, "%s\n", tbl[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { MYDATA *my_out; MYDATA *my_err; - int n; + int ch; - while ((n = getopt(argc, argv, "nt")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "nt")) != -1) { + switch (ch) { case 'n': opt_n = TRUE; break; case 't': opt_t = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } @@ -328,7 +331,7 @@ main(int argc, char *argv[]) argc -= (optind - 1); if (argc > 3) - usage(); + usage(FALSE); my_out = initialize((argc > 1) ? argv[1] : "vt100", stdout); my_err = initialize((argc > 2) ? argv[2] : "ansi", stderr); @@ -336,14 +339,18 @@ main(int argc, char *argv[]) do_stuff(my_out); do_stuff(my_err); - cleanup(my_out); - cleanup(my_err); + if (my_out != my_err) { + cleanup(my_out); + cleanup(my_err); + } else { + cleanup(my_out); + } ExitProgram(EXIT_SUCCESS); } #else int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { fprintf(stderr, "This program requires the low-level ncurses sp-funcs tputs_sp\n"); diff --git a/test/tclock.c b/test/tclock.c index 71da53af..1a749628 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -1,9 +1,9 @@ -/* $Id: tclock.c,v 1.42 2020/12/26 17:56:36 tom Exp $ */ +/* $Id: tclock.c,v 1.48 2023/02/25 16:42:22 tom Exp $ */ #define NEED_TIME_H #include -#if HAVE_MATH_H +#if HAVE_MATH_H && HAVE_MATH_FUNCS #include @@ -107,12 +107,13 @@ dline(int pair, int from_x, int from_y, int x2, int y2, int ch) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: tclock [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors" @@ -123,12 +124,17 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + static TimeType initial; + int i, cx, cy; double cr, mradius, hradius, mangle, hangle; double sangle, sradius, hours; @@ -143,28 +149,28 @@ main(int argc, char *argv[]) char szChar[20]; char *text; short my_bg = COLOR_BLACK; -#if HAVE_GETTIMEOFDAY - struct timeval current; -#endif - double fraction = 0.0; + TimeType current; #if HAVE_USE_DEFAULT_COLORS bool d_option = FALSE; #endif - while ((ch = getopt(argc, argv, "d")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "d")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': d_option = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); setlocale(LC_ALL, ""); @@ -229,11 +235,9 @@ main(int argc, char *argv[]) hdx = A2X(hangle, hradius); hdy = A2Y(hangle, hradius); -#if HAVE_GETTIMEOFDAY - gettimeofday(¤t, 0); - fraction = ((double) current.tv_usec / 1.0e6); -#endif - sangle = ((t->tm_sec + fraction) * (2.0 * PI) / 60.0); + GetClockTime(¤t); + + sangle = (ElapsedSeconds(&initial, ¤t) * (2.0 * PI) / 60.0); sdx = A2X(sangle, sradius); sdy = A2Y(sangle, sradius); @@ -287,9 +291,9 @@ main(int argc, char *argv[]) } #else int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { - printf("This program requires the development header math.h\n"); + printf("This program requires the header math.h and trignometric functions\n"); ExitProgram(EXIT_FAILURE); } #endif diff --git a/test/test.priv.h b/test/test.priv.h index 6f699af7..a901185b 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2023,2024 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.198 2021/12/18 18:55:10 tom Exp $ */ +/* $Id: test.priv.h,v 1.218 2024/02/10 14:40:03 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -67,22 +67,18 @@ #define HAVE_ASSUME_DEFAULT_COLORS 0 #endif -#ifndef HAVE_BSD_STRING_H -#define HAVE_BSD_STRING_H 0 -#endif - -#ifndef HAVE_CURSES_VERSION -#define HAVE_CURSES_VERSION 0 -#endif - -#ifndef HAVE_CURSCR -#define HAVE_CURSCR 0 +#ifndef HAVE_CFMAKERAW +#define HAVE_CFMAKERAW 0 #endif #ifndef HAVE_CHGAT #define HAVE_CHGAT 0 #endif +#ifndef HAVE_CLOCK_GETTIME +#define HAVE_CLOCK_GETTIME 0 +#endif + #ifndef HAVE_COLOR_CONTENT #define HAVE_COLOR_CONTENT 0 #endif @@ -95,6 +91,18 @@ #define HAVE_COLOR_SET 0 #endif +#ifndef HAVE_BSD_STRING_H +#define HAVE_BSD_STRING_H 0 +#endif + +#ifndef HAVE_CURSES_VERSION +#define HAVE_CURSES_VERSION 0 +#endif + +#ifndef HAVE_CURSCR +#define HAVE_CURSCR 0 +#endif + #ifndef HAVE_DELSCREEN #define HAVE_DELSCREEN 0 #endif @@ -123,6 +131,10 @@ #define HAVE_GETMAXX 0 #endif +#ifndef HAVE_GETTIMEOFDAY +#define HAVE_GETTIMEOFDAY 0 +#endif + #ifndef HAVE_GETOPT_H #define HAVE_GETOPT_H 0 #endif @@ -163,6 +175,10 @@ #define HAVE_LOCALE_H 0 #endif +#ifndef HAVE_MATH_FUNCS +#define HAVE_MATH_FUNCS 0 +#endif + #ifndef HAVE_MATH_H #define HAVE_MATH_H 0 #endif @@ -287,6 +303,18 @@ #define HAVE_TIGETSTR 0 #endif +#ifndef HAVE_TIPARM +#define HAVE_TIPARM 0 +#endif + +#ifndef HAVE_TIPARM_S +#define HAVE_TIPARM_S 0 +#endif + +#ifndef HAVE_TISCAN_S +#define HAVE_TISCAN_S 0 +#endif + #ifndef HAVE_TPUTS_SP #define HAVE_TPUTS_SP 0 #endif @@ -303,6 +331,10 @@ #define HAVE_WINSSTR 0 #endif +#ifndef HAVE_UNGET_WCH +#define HAVE_UNGET_WCH 0 +#endif + #ifndef HAVE_USE_DEFAULT_COLORS #define HAVE_USE_DEFAULT_COLORS 0 #endif @@ -359,6 +391,10 @@ #define NO_LEAKS 0 #endif +#ifndef HAVE__NC_TPARM_ANALYZE +#define HAVE__NC_TPARM_ANALYZE 0 +#endif + /* * Workaround for HPUX */ @@ -451,6 +487,13 @@ extern int optind; #include #include +#if HAVE_STDINT_H +#include +#define my_intptr_t intptr_t +#else +#define my_intptr_t long +#endif + #if defined(_MSC_VER) #undef popen #define popen(s,n) _popen(s,n) @@ -549,8 +592,12 @@ extern int optind; /* workaround, to build against NetBSD's variant of the form library */ #ifdef HAVE_NETBSD_FORM_H #define form_getyx(form, y, x) y = (int)current_field(form)->cursor_ypos, x = (int)current_field(form)->cursor_xpos -#else +#define form_field_row(field) (field)->form_row +#define form_field_col(field) (field)->form_col +#else /* e.g., SVr4, ncurses */ #define form_getyx(form, y, x) y = (int)(form)->currow, x = (int)(form)->curcol +#define form_field_row(field) (field)->frow +#define form_field_col(field) (field)->fcol #endif /* workaround, to build against NetBSD's variant of the form library */ @@ -695,6 +742,48 @@ extern int optind; #define HELP_KEY_1 '?' #define HELP_KEY_2 KEY_F(1) +/* our "standard" options for getopt, needed for help2man */ +#define OPTS_USAGE 'h' +#define OPTS_VERSION 'V' +#define OPTS_COMMON "hV" +#define USAGE_COMMON \ + "Common options:"\ +," -h show this message"\ +," -V show version of curses" + +#if HAVE_CURSES_VERSION +#define format_version(buffer, size) strcpy(buffer, curses_version()) +#elif defined(NCURSES_VERSION_MAJOR) && defined(NCURSES_VERSION_MINOR) && defined(NCURSES_VERSION_PATCH) +#define format_version(buffer, size) \ + _nc_SPRINTF(buffer, _nc_SLIMIT(size) "ncurses %d.%d.%d", \ + NCURSES_VERSION_MAJOR, \ + NCURSES_VERSION_MINOR, \ + NCURSES_VERSION_PATCH) +#else +#define format_version(buffer, size) strcpy(buffer, "ncurses-examples") +#endif + +#define VERSION_COMMON() \ +static char *version_common(char **argv) { \ + char *base = argv[0]; \ + char *part = strrchr(base, '/'); \ + size_t need = strlen(base) + 80; \ + char *result = malloc(need); \ + if (result != NULL) { \ + if (part++ == NULL) part = base; \ + _nc_SPRINTF(result, _nc_SLIMIT(need) "%.20s: ", part); \ + format_version(result + strlen(result), need - strlen(result)); \ + } \ + return result; \ +} \ +static void show_version(char **argv) { \ + char *value = version_common(argv); \ + if (value != NULL) { \ + puts(value); \ + free(value); \ + } \ +} + /* from nc_string.h, to make this stand alone */ #if HAVE_BSD_STRING_H #include @@ -718,10 +807,18 @@ extern int optind; #define HAVE_SNPRINTF 0 #endif +#ifndef HAVE_STRDUP +#define HAVE_STRDUP 0 +#endif + #ifndef USE_STRING_HACKS #define USE_STRING_HACKS 0 #endif +#ifndef HAVE_STRSTR +#define HAVE_STRSTR 0 +#endif + #ifndef NCURSES_CAST #ifdef __cplusplus extern "C" { @@ -920,11 +1017,13 @@ extern int TABSIZE; #define UChar(c) ((unsigned char)(c)) +#ifndef SIZEOF #define SIZEOF(table) (sizeof(table)/sizeof(table[0])) +#endif #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H #include -#if HAVE_EXIT_TERMINFO && (defined(USE_TERMINFO) || defined(USE_TINFO)) +#if HAVE_EXIT_TERMINFO && !defined(USE_CURSES) && (defined(USE_TERMINFO) || defined(USE_TINFO)) #undef ExitProgram #define ExitProgram(code) exit_terminfo(code) #elif HAVE_EXIT_CURSES @@ -1012,6 +1111,26 @@ extern int TABSIZE; #endif #endif +#if HAVE_CLOCK_GETTIME +# define GetClockTime(t) clock_gettime(CLOCK_REALTIME, t) +# define TimeType struct timespec +# define TimeScale 1000000000L /* 1e9 */ +# define ElapsedSeconds(b,e) \ + (double) (((e)->tv_sec - (b)->tv_sec) \ + + ((e)->tv_nsec - (b)->tv_nsec) / TimeScale) +#elif HAVE_GETTIMEOFDAY +# define GetClockTime(t) gettimeofday(t, 0) +# define TimeType struct timeval +# define TimeScale 1000000L /* 1e6 */ +# define ElapsedSeconds(b,e) \ + (double) (((e)->tv_sec - (b)->tv_sec) \ + + ((e)->tv_usec - (b)->tv_usec) / TimeScale) +#else +# define TimeType time_t +# define GetClockTime(t) time((time_t*)0) +# define ElapsedSeconds(b,e) (double)((e) - (b)) +#endif + /* * Ultrix 3.1 */ @@ -1180,7 +1299,7 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */ #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void) #endif -#if defined(TRACE) && HAVE__TRACEF +#if defined(TRACE) && HAVE__TRACEF && HAVE_CURSES_TRACE #define Trace(p) _tracef p #define USE_TRACE 1 #define START_TRACE() \ diff --git a/test/test_add_wchstr.c b/test/test_add_wchstr.c index b1d320bb..f69e1ddc 100644 --- a/test/test_add_wchstr.c +++ b/test/test_add_wchstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 2009-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_add_wchstr.c,v 1.29 2021/05/08 20:04:10 tom Exp $ + * $Id: test_add_wchstr.c,v 1.34 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the waddwchstr() and wadd_wch functions. * Thomas Dickey - 2009/9/12 @@ -191,7 +191,7 @@ legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) } static int -ColOf(wchar_t *buffer, int length, int margin) +ColOf(const wchar_t *buffer, int length, int margin) { int n; int result; @@ -542,33 +542,37 @@ recursive_test(int level) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_add_wchstr [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -f FILE read data from given file" - ," -n NUM limit string-adds to NUM bytes on ^N replay" - ," -m perform wmove/move separately from add-functions" - ," -p pass-thru control characters without using unctrl()" - ," -w use window-parameter even when stdscr would be implied" + ," -f FILE read data from given file" + ," -n NUM limit string-adds to NUM bytes on ^N replay" + ," -m perform wmove/move separately from add-functions" + ," -p pass-thru control characters without using unctrl()" + ," -w use window-parameter even when stdscr would be implied" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:pw")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:mn:pw")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -587,13 +591,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'w': w_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); recursive_test(0); endwin(); diff --git a/test/test_addchstr.c b/test/test_addchstr.c index 5b2df8ad..cddc3152 100644 --- a/test/test_addchstr.c +++ b/test/test_addchstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2009-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addchstr.c,v 1.25 2020/02/02 23:34:34 tom Exp $ + * $Id: test_addchstr.c,v 1.29 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the waddchstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -460,33 +460,37 @@ recursive_test(int level) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_addchstr [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -f FILE read data from given file" - ," -n NUM limit string-adds to NUM bytes on ^N replay" - ," -m perform wmove/move separately from add-functions" - ," -p pass-thru control characters without using unctrl()" - ," -w use window-parameter even when stdscr would be implied" + ," -f FILE read data from given file" + ," -n NUM limit string-adds to NUM bytes on ^N replay" + ," -m perform wmove/move separately from add-functions" + ," -p pass-thru control characters without using unctrl()" + ," -w use window-parameter even when stdscr would be implied" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:pw")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:mn:pw")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -505,13 +509,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'w': w_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); recursive_test(0); endwin(); diff --git a/test/test_addstr.c b/test/test_addstr.c index 67e540a5..ba8a90e5 100644 --- a/test/test_addstr.c +++ b/test/test_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2009-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addstr.c,v 1.16 2020/02/02 23:34:34 tom Exp $ + * $Id: test_addstr.c,v 1.20 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the waddstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -375,32 +375,36 @@ recursive_test(int level) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_addstr [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -f FILE read data from given file" - ," -n NUM limit string-adds to NUM bytes on ^N replay" - ," -m perform wmove/move separately from add-functions" - ," -w use window-parameter even when stdscr would be implied" + ," -f FILE read data from given file" + ," -n NUM limit string-adds to NUM bytes on ^N replay" + ," -m perform wmove/move separately from add-functions" + ," -w use window-parameter even when stdscr would be implied" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:w")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:mn:w")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -416,13 +420,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'w': w_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); recursive_test(0); endwin(); diff --git a/test/test_addwstr.c b/test/test_addwstr.c index 22cacb91..9e51f49d 100644 --- a/test/test_addwstr.c +++ b/test/test_addwstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 2009-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addwstr.c,v 1.17 2020/02/02 23:34:34 tom Exp $ + * $Id: test_addwstr.c,v 1.22 2023/05/27 20:13:10 tom Exp $ * * Demonstrate the waddwstr() and wadd_wch functions. * Thomas Dickey - 2009/9/12 @@ -114,7 +114,7 @@ legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) } static int -ColOf(wchar_t *buffer, int length, int margin) +ColOf(const wchar_t *const buffer, int length, int margin) { int n; int result; @@ -467,32 +467,36 @@ recursive_test(int level) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_addwstr [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -f FILE read data from given file" - ," -n NUM limit string-adds to NUM bytes on ^N replay" - ," -m perform wmove/move separately from add-functions" - ," -w use window-parameter even when stdscr would be implied" + ," -f FILE read data from given file" + ," -n NUM limit string-adds to NUM bytes on ^N replay" + ," -m perform wmove/move separately from add-functions" + ," -w use window-parameter even when stdscr would be implied" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:w")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:mn:w")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -508,13 +512,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'w': w_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); recursive_test(0); endwin(); diff --git a/test/test_arrays.c b/test/test_arrays.c index 7ee25eab..f89cb280 100644 --- a/test/test_arrays.c +++ b/test/test_arrays.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2007-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_arrays.c,v 1.9 2020/02/02 23:34:34 tom Exp $ + * $Id: test_arrays.c,v 1.13 2022/12/10 23:23:27 tom Exp $ * * Author: Thomas E Dickey * @@ -135,37 +135,41 @@ dump_table(void) } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: test_arrays [options]", - "", - "If no options are given, print all (boolean, numeric, string)", - "capability names showing their index within the tables.", - "", - "Options:", - " -C print termcap names", - " -T print terminfo names", - " -c print termcap names", - " -f print full terminfo names", - " -n print short terminfo names", - " -t print the result as CSV table", + "Usage: test_arrays [options]" + ,"" + ,"If no options are given, print all (boolean, numeric, string)" + ,"capability names showing their index within the tables." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -C print termcap names" + ," -T print terminfo names" + ," -c print termcap names" + ," -f print full terminfo names" + ," -n print short terminfo names" + ," -t print the result as CSV table" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int n; + int ch; - while ((n = getopt(argc, argv, "CTcfnt")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "CTcfnt")) != -1) { + switch (ch) { case 'C': opt_C = TRUE; break; @@ -184,13 +188,16 @@ main(int argc, char *argv[]) case 't': opt_t = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); if (!(opt_T || opt_C)) { opt_T = opt_C = TRUE; @@ -210,7 +217,7 @@ main(int argc, char *argv[]) #else int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { printf("This program requires the terminfo arrays\n"); ExitProgram(EXIT_FAILURE); @@ -218,7 +225,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #endif #else /* !HAVE_TIGETSTR */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { printf("This program requires the terminfo functions such as tigetstr\n"); ExitProgram(EXIT_FAILURE); diff --git a/test/test_delwin.c b/test/test_delwin.c new file mode 100644 index 00000000..09ef5c53 --- /dev/null +++ b/test/test_delwin.c @@ -0,0 +1,151 @@ +/**************************************************************************** + * Copyright 2022,2023 Thomas E. Dickey * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/* + * $Id: test_delwin.c,v 1.5 2023/05/27 20:34:51 tom Exp $ + */ +#include + +#define STATUS 10 + +static SCREEN *my_screen; + +static void +show_rc(const char *what, const char *explain, int rc) +{ + printw("%s : %d (%s)\n", what, rc, explain); +} + +static void +next_step(WINDOW *win) +{ + int ch = wgetch(win); + if (ch == QUIT || ch == ESCAPE) { + endwin(); + /* use this to verify if delscreen frees all memory */ + delscreen(my_screen); + exit(EXIT_FAILURE); + } +} + +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_delwin [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + +int +main(int argc, char **argv) +{ + WINDOW *parent, *child1; + int rc; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + + if ((my_screen = newterm(NULL, stdout, stdin)) == NULL) + ExitProgram(EXIT_FAILURE); + + noecho(); + cbreak(); + + refresh(); + wsetscrreg(stdscr, 0, STATUS - 1); + scrollok(stdscr, TRUE); + + parent = newwin(0, 0, STATUS, 0); + box(parent, 0, 0); + wrefresh(parent); + next_step(parent); + + printw("New window %p %s\n", (void *) parent, "Top window"); + mvwprintw(parent, 1, 1, "Top window"); + wrefresh(parent); + next_step(stdscr); + + child1 = derwin(parent, LINES - STATUS - 4, COLS - 4, 2, 2); + box(child1, 0, 0); + mvwprintw(child1, 1, 1, "Sub window"); + wrefresh(child1); + + printw("Sub window %p %s\n", (void *) child1, "Hello world!"); + next_step(stdscr); + + show_rc("Deleted parent", + "should fail, it still has a subwindow", + delwin(parent)); + next_step(stdscr); + show_rc("Deleted child1", + "should succeed", + rc = delwin(child1)); + next_step(stdscr); + if (rc == OK) { + wclrtobot(parent); + box(parent, 0, 0); + next_step(parent); + } + show_rc("Deleted parent", + "should succeed, it has no subwindow now", + rc = delwin(parent)); + next_step(stdscr); + if (rc == OK) { + touchwin(stdscr); + next_step(stdscr); + } + show_rc("Deleted parent", + "should fail, may dump core", + delwin(parent)); + next_step(stdscr); + endwin(); + ExitProgram(EXIT_SUCCESS); +} diff --git a/test/test_endwin.c b/test/test_endwin.c new file mode 100644 index 00000000..8e0d283c --- /dev/null +++ b/test/test_endwin.c @@ -0,0 +1,132 @@ +/**************************************************************************** + * Copyright 2023 Thomas E. Dickey * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ +/* + * $Id: test_endwin.c,v 1.2 2023/11/10 15:17:19 tom Exp $ + */ +#include + +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_endwin [options]" + ,"" + ,"Options:" + ," -e call endwin() an extra time" + ," -i call initscr() before endwin()" + ," -n call newterm() before endwin()" + ," -r call refresh() before endwin()" + ," -s call getch() after endwin(), to refresh screen" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + +#define status(opt,name,rc) if (opt) printf(" %s: %s", name, (rc) == OK ? "OK" : "ERR") + +int +main(int argc, char *argv[]) +{ + int ch; + int rc_r = OK; + int rc_e1 = OK; + int rc_e2 = OK; + int rc_e3 = OK; + SCREEN *sp = NULL; + bool opt_e = FALSE; + bool opt_i = FALSE; + bool opt_n = FALSE; + bool opt_r = FALSE; + bool opt_s = FALSE; + + while ((ch = getopt(argc, argv, "einrs" OPTS_COMMON)) != -1) { + switch (ch) { + case 'e': + opt_e = TRUE; + break; + case 'i': + opt_i = TRUE; + break; + case 'n': + opt_n = TRUE; + break; + case 'r': + opt_r = TRUE; + break; + case 's': + opt_s = TRUE; + break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + if (opt_i && opt_n) + usage(TRUE); + + if (opt_i) { + initscr(); + } else if (opt_n) { + sp = newterm(NULL, stdout, stdin); + } + if (opt_r) { + rc_r = refresh(); + } + rc_e1 = endwin(); + if (opt_e) { + rc_e2 = endwin(); + } + if (opt_s) { + getch(); + rc_e3 = endwin(); + } + printf("status:"); + status(opt_i, "initscr(-i)", OK); + status(opt_n, "newterm(-n)", (sp != NULL) ? OK : ERR); + status(opt_r, "refresh(-r)", rc_r); + status(TRUE, "endwin", rc_e1); + status(opt_e, "endwin(-e)", rc_e2); + status(opt_s, "endwin(-s)", rc_e3); + printf("\n"); + ExitProgram(EXIT_SUCCESS); +} diff --git a/test/test_get_wstr.c b/test/test_get_wstr.c index bc86030c..2a788fce 100644 --- a/test/test_get_wstr.c +++ b/test/test_get_wstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2007-2011,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_get_wstr.c,v 1.12 2020/02/02 23:34:34 tom Exp $ + * $Id: test_get_wstr.c,v 1.14 2022/12/10 23:59:13 tom Exp $ * * Author: Thomas E Dickey * @@ -355,18 +355,48 @@ recursive_test(int level, char **argv, WINDOW *strwin) return TRUE; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_get_wstr [options] [file1 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *chrbox; WINDOW *strwin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -376,7 +406,7 @@ main(int argc, char *argv[]) strwin = derwin(chrbox, 4, COLS - 2, 1, 1); - recursive_test(1, argv, strwin); + recursive_test(optind, argv, strwin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/test_getstr.c b/test/test_getstr.c index 0910a041..dbc0a0a2 100644 --- a/test/test_getstr.c +++ b/test/test_getstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2007-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_getstr.c,v 1.14 2020/02/02 23:34:34 tom Exp $ + * $Id: test_getstr.c,v 1.16 2022/12/10 23:58:37 tom Exp $ * * Author: Thomas E Dickey * @@ -362,18 +362,48 @@ recursive_test(int level, char **argv, WINDOW *strwin) return TRUE; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_getstr [options] [file1 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *chrbox; WINDOW *strwin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -383,7 +413,7 @@ main(int argc, char *argv[]) strwin = derwin(chrbox, 4, COLS - 2, 1, 1); - recursive_test(1, argv, strwin); + recursive_test(optind, argv, strwin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/test_instr.c b/test/test_instr.c index f04d8a3d..c87bdd70 100644 --- a/test/test_instr.c +++ b/test/test_instr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2007-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_instr.c,v 1.10 2020/02/02 23:34:34 tom Exp $ + * $Id: test_instr.c,v 1.12 2022/12/10 23:58:01 tom Exp $ * * Author: Thomas E Dickey * @@ -232,19 +232,49 @@ recursive_test(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) return TRUE; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_instr [options] [file1 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *chrbox; WINDOW *chrwin; WINDOW *strwin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -255,7 +285,7 @@ main(int argc, char *argv[]) chrwin = derwin(chrbox, 2, COLS - 2, 1, 1); strwin = derwin(chrbox, 2, COLS - 2, 3, 1); - recursive_test(1, argv, chrwin, strwin); + recursive_test(optind, argv, chrwin, strwin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/test_inwstr.c b/test/test_inwstr.c index 81ebda77..c22add7b 100644 --- a/test/test_inwstr.c +++ b/test/test_inwstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2007-2010,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_inwstr.c,v 1.6 2020/02/02 23:34:34 tom Exp $ + * $Id: test_inwstr.c,v 1.8 2022/12/10 23:56:39 tom Exp $ * * Author: Thomas E Dickey * @@ -232,19 +232,49 @@ recursive_test(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) return TRUE; } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_inwstr [options] [file1 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *chrbox; WINDOW *chrwin; WINDOW *strwin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -255,7 +285,7 @@ main(int argc, char *argv[]) chrwin = derwin(chrbox, 2, COLS - 2, 1, 1); strwin = derwin(chrbox, 2, COLS - 2, 3, 1); - recursive_test(1, argv, chrwin, strwin); + recursive_test(optind, argv, chrwin, strwin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/test_mouse.c b/test/test_mouse.c new file mode 100644 index 00000000..5508ea42 --- /dev/null +++ b/test/test_mouse.c @@ -0,0 +1,284 @@ +/**************************************************************************** + * Copyright 2022-2023,2024 Thomas E. Dickey * + * Copyright 2022 Leonid S. Usov * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************/ +/* + * $Id: test_mouse.c,v 1.31 2024/03/30 20:45:31 tom Exp $ + * + * Author: Leonid S Usov + * + * Observe mouse events in the raw terminal or parsed ncurses modes + */ + +#include + +#if defined(NCURSES_MOUSE_VERSION) && !defined(_NC_WINDOWS) + +static int logoffset = 0; + +static void +raw_loop(void) +{ + char *xtermcap; + + printf("Entering raw mode. Ctrl-c to quit.\n"); + + newterm(NULL, stdout, stdin); + raw(); + xtermcap = tigetstr("XM"); + if (!VALID_STRING(xtermcap)) { + fprintf(stderr, "couldn't get XM terminfo"); + return; + } + + putp(tgoto(xtermcap, 1, 1)); + fflush(stdout); + + while (1) { + int c = getc(stdin); + const char *pretty; + + if (c == -1 || c == '\003') { + break; + } else if (c == '\033') { + printf("\r\n\\E"); + } else if ((pretty = unctrl((chtype) c)) != NULL) { + printf("%s", pretty); + } else if (isprint(c)) { + printf("%c", c); + } else { + printf("{%x}", UChar(c)); + } + } + + putp(tgoto(xtermcap, 0, 0)); + fflush(stdout); + noraw(); +} + +static void logw(const char *fmt, ...) GCC_PRINTFLIKE(1, 2); + +static void +logw(const char *fmt, ...) +{ + int row = getcury(stdscr); + va_list args; + + va_start(args, fmt); + wmove(stdscr, row++, 0); + vw_printw(stdscr, fmt, args); + va_end(args); + + clrtoeol(); + + row %= (getmaxy(stdscr) - logoffset); + if (row < logoffset) { + row = logoffset; + } + + wmove(stdscr, row, 0); + wprintw(stdscr, ">"); + clrtoeol(); +} + +static void +cooked_loop(char *my_environ, int interval) +{ + MEVENT event; + + initscr(); + noecho(); + cbreak(); /* Line buffering disabled; pass everything */ + nonl(); + keypad(stdscr, TRUE); + + /* Get all the mouse events */ + mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, NULL); + mouseinterval(interval); + + logw("Ctrl-c to quit"); + logw("--------------"); + if (my_environ) + logw("%s", my_environ); + logoffset = getcury(stdscr); + + while (1) { + int c = getch(); + + switch (c) { + case KEY_MOUSE: + if (getmouse(&event) == OK) { + unsigned btn; + mmask_t events; +#if NCURSES_MOUSE_VERSION > 1 + const unsigned max_btn = 5; +#else + const unsigned max_btn = 4; +#endif + const mmask_t btn_mask = (NCURSES_BUTTON_RELEASED | + NCURSES_BUTTON_PRESSED | + NCURSES_BUTTON_CLICKED | + NCURSES_DOUBLE_CLICKED | + NCURSES_TRIPLE_CLICKED); + bool found = FALSE; + for (btn = 1; btn <= max_btn; btn++) { + events = (mmask_t) (event.bstate + & NCURSES_MOUSE_MASK(btn, btn_mask)); + if (events == 0) + continue; +#define ShowQ(btn,name) \ + (((event.bstate & NCURSES_MOUSE_MASK(btn, NCURSES_ ## name)) != 0) \ + ? (" " #name) \ + : "") +#define ShowM(name) \ + (((event.bstate & NCURSES_MOUSE_MASK(btn, BUTTON_ ## name)) != 0) \ + ? (" " #name) \ + : "") +#define ShowP() \ + ((event.bstate & REPORT_MOUSE_POSITION) != 0 \ + ? " position" \ + : "") + logw("[%08lX] button %d%s%s%s%s%s%s%s%s%s @ %d, %d", + (unsigned long) events, + btn, + ShowQ(btn, BUTTON_RELEASED), + ShowQ(btn, BUTTON_PRESSED), + ShowQ(btn, BUTTON_CLICKED), + ShowQ(btn, DOUBLE_CLICKED), + ShowQ(btn, TRIPLE_CLICKED), + ShowM(SHIFT), + ShowM(CTRL), + ShowM(ALT), + ShowP(), + event.y, event.x); + found = TRUE; + } + /* + * A position report need not have a button associated with it. + * The modifiers probably are unused. + */ + if (!found && (event.bstate & REPORT_MOUSE_POSITION)) { + logw("[%08lX]%s%s%s%s @ %d, %d", + (unsigned long) events, + ShowM(SHIFT), + ShowM(CTRL), + ShowM(ALT), + ShowP(), + event.y, event.x); + } + } + break; + case '\003': + goto end; + default: + logw("got another char: 0x%x", UChar(c)); + } + refresh(); + } + end: + endwin(); +} + +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_mouse [options]" + ,"" + ,"Test mouse events. These examples for $TERM demonstrate xterm" + ,"features:" + ," xterm" + ," xterm-1002" + ," xterm-1003" + ,"" + ,USAGE_COMMON + ,"Options:" + ," -r show raw input stream, injecting a new line before every ESC" + ," -i n set mouse interval to n; default is 0 (no double-clicks)" + ," -T term use terminal description other than $TERM" + }; + unsigned n; + for (n = 0; n < sizeof(msg) / sizeof(char *); ++n) { + fprintf(stderr, "%s\n", msg[n]); + } + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + +int +main(int argc, char *argv[]) +{ + bool rawmode = FALSE; + int interval = 0; + int ch; + size_t my_len; + char *my_environ = NULL; + const char *term_format = "TERM=%s"; + + while ((ch = getopt(argc, argv, OPTS_COMMON "i:rT:")) != -1) { + switch (ch) { + case 'i': + interval = atoi(optarg); + break; + case 'r': + rawmode = TRUE; + break; + case 'T': + my_len = strlen(term_format) + strlen(optarg) + 1; + my_environ = malloc(my_len); + if (my_environ != NULL) { + _nc_SPRINTF(my_environ, _nc_SLIMIT(my_len) term_format, optarg); + putenv(my_environ); + } + break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) { + usage(FALSE); + ExitProgram(EXIT_FAILURE); + } + + if (rawmode) { + raw_loop(); + } else { + cooked_loop(my_environ, interval); + } + + ExitProgram(EXIT_SUCCESS); +} +#else +int +main(void) +{ + printf("This program requires the ncurses library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/test_opaque.c b/test/test_opaque.c index c365ba5c..09b98c00 100644 --- a/test/test_opaque.c +++ b/test/test_opaque.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 2007-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_opaque.c,v 1.14 2021/09/11 23:44:07 tom Exp $ + * $Id: test_opaque.c,v 1.15 2022/12/11 00:03:10 tom Exp $ * * Author: Thomas E Dickey * @@ -454,18 +454,48 @@ test_set_tabsize(void) set_tabsize(save_tabsize); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_opaque [options] file1 [file2 [...]]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { WINDOW *stsbox; WINDOW *stswin; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); - if (argc < 2) { - fprintf(stderr, "usage: %s file\n", argv[0]); - return EXIT_FAILURE; - } + if (optind + 1 > argc) + usage(FALSE); initscr(); @@ -479,7 +509,7 @@ main(int argc, char *argv[]) stswin = derwin(stsbox, BASE_Y - 2, COLS - 2, 1, 1); keypad(stswin, TRUE); - test_opaque(1, argv, stswin); + test_opaque(optind, argv, stswin); endwin(); ExitProgram(EXIT_SUCCESS); diff --git a/test/test_setupterm.c b/test/test_setupterm.c index 9d582aa0..24d7c46c 100644 --- a/test/test_setupterm.c +++ b/test/test_setupterm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * Copyright 2015,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: test_setupterm.c,v 1.10 2020/02/02 23:34:34 tom Exp $ + * $Id: test_setupterm.c,v 1.17 2023/06/24 14:19:52 tom Exp $ * * A simple demo of setupterm/restartterm. */ @@ -43,6 +43,55 @@ static bool f_opt = FALSE; static bool n_opt = FALSE; static bool r_opt = FALSE; +#if NO_LEAKS +static TERMINAL **saved_terminals; +static size_t num_saved; +static size_t max_saved; + +static void +failed(const char *msg) +{ + perror(msg); + ExitProgram(EXIT_FAILURE); +} + +static void +finish(int code) +{ + size_t n; + for (n = 0; n < num_saved; ++n) + del_curterm(saved_terminals[n]); + free(saved_terminals); + ExitProgram(code); +} + +static void +save_curterm(void) +{ + size_t n; + bool found = FALSE; + for (n = 0; n < num_saved; ++n) { + if (saved_terminals[n] == cur_term) { + found = TRUE; + break; + } + } + if (!found) { + if (num_saved + 1 >= max_saved) { + max_saved += 100; + saved_terminals = typeRealloc(TERMINAL *, max_saved, saved_terminals); + if (saved_terminals == NULL) + failed("realloc"); + } + saved_terminals[num_saved++] = cur_term; + } +} + +#else +#define finish(code) ExitProgram(code) +#define save_curterm() /* nothing */ +#endif + static void test_rc(NCURSES_CONST char *name, int actual_rc, int actual_err) { @@ -104,40 +153,46 @@ test_setupterm(NCURSES_CONST char *name) #endif rc = setupterm(name, 0, f_opt ? NULL : &err); test_rc(name, rc, err); + save_curterm(); } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: test_setupterm [options] [terminal]", - "", - "Demonstrate error-checking for setupterm and restartterm.", - "", - "Options:", - " -a automatic test for each success/error code", - " -f treat errors as fatal", - " -n set environment to disable terminfo database, assuming", - " the compiled-in paths for database also fail", + "Usage: test_setupterm [options] [terminal]" + ,"" + ,USAGE_COMMON + ,"Demonstrate error-checking for setupterm and restartterm." + ,"" + ,"Options:" + ," -a automatic test for each success/error code" + ," -f treat errors as fatal" + ," -n set environment to disable terminfo database, assuming" + ," the compiled-in paths for database also fail" #if HAVE_RESTARTTERM - " -r test restartterm rather than setupterm", + ," -r test restartterm rather than setupterm" #endif }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + finish(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + int ch; int n; - while ((n = getopt(argc, argv, "afnr")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "afnr")) != -1) { + switch (ch) { case 'a': a_opt = TRUE; break; @@ -152,9 +207,12 @@ main(int argc, char *argv[]) r_opt = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -182,13 +240,14 @@ main(int argc, char *argv[]) if (r_opt) { newterm("ansi", stdout, stdin); reset_shell_mode(); + save_curterm(); } if (a_opt) { static char predef[][9] = {"vt100", "dumb", "lpr", "unknown", "none-such"}; if (optind < argc) { - usage(); + usage(FALSE); } for (n = 0; n < 4; ++n) { test_setupterm(predef[n]); @@ -203,12 +262,12 @@ main(int argc, char *argv[]) } } - ExitProgram(EXIT_SUCCESS); + finish(EXIT_SUCCESS); } #else /* !HAVE_TIGETSTR */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { printf("This program requires the terminfo functions such as tigetstr\n"); ExitProgram(EXIT_FAILURE); diff --git a/test/test_sgr.c b/test/test_sgr.c index 33564adb..8763dca3 100644 --- a/test/test_sgr.c +++ b/test/test_sgr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2022,2023 Thomas E. Dickey * * Copyright 2015-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: test_sgr.c,v 1.17 2021/03/27 22:43:36 tom Exp $ + * $Id: test_sgr.c,v 1.22 2023/05/27 20:13:10 tom Exp $ * * A simple demo of the sgr/sgr0 terminal capabilities. */ @@ -61,7 +61,7 @@ static int db_item; static long total_values; static char * -make_dbitem(char *p, char *q) +make_dbitem(const char *const p, const char *const q) { size_t need = strlen(e_opt) + 2 + (size_t) (p - q); char *result = malloc(need); @@ -305,35 +305,39 @@ brute_force(const char *name) } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: test_sgr [options] [terminal]", - "", - "Print all distinct combinations of sgr capability.", - "", - "Options:", - " -d LIST colon-separated list of databases to use", - " -e NAME environment variable to set with -d option", - " -n do not initialize terminal, to test error-checking", - " -q quiet (prints only counts)", + "Usage: test_sgr [options] [terminal]" + ,"" + ,"Print all distinct combinations of sgr capability." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -d LIST colon-separated list of databases to use" + ," -e NAME environment variable to set with -d option" + ," -n do not initialize terminal, to test error-checking" + ," -q quiet (prints only counts)" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { - int n; + int ch; char *name; - while ((n = getopt(argc, argv, "d:e:nq")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "d:e:nq")) != -1) { + switch (ch) { case 'd': d_opt = optarg; break; @@ -346,15 +350,19 @@ main(int argc, char *argv[]) case 'q': q_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } make_dblist(); if (optind < argc) { + int n; for (n = optind; n < argc; ++n) { brute_force(argv[n]); } @@ -376,7 +384,7 @@ main(int argc, char *argv[]) #else /* !HAVE_TIGETSTR */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { failed("This program requires the terminfo functions such as tigetstr"); ExitProgram(EXIT_FAILURE); diff --git a/test/test_termattrs.c b/test/test_termattrs.c index fc22216a..ec44cc22 100644 --- a/test/test_termattrs.c +++ b/test/test_termattrs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,11 +27,12 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_termattrs.c,v 1.3 2020/02/02 23:34:34 tom Exp $ + * $Id: test_termattrs.c,v 1.8 2022/12/10 23:23:27 tom Exp $ * * Demonstrate the termattrs and term_attrs functions. */ +#define USE_CURSES #define USE_TINFO #include @@ -117,28 +118,32 @@ test_termattrs(unsigned long value) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_termattrs [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -e use stderr (default stdout)" - ," -n do not initialize terminal" - ," -s use setupterm rather than newterm" + ," -e use stderr (default stdout)" + ," -n do not initialize terminal" + ," -s use setupterm rather than newterm" #if USE_WIDEC_SUPPORT - ," -w use term_attrs rather than termattrs" + ," -w use term_attrs rather than termattrs" #endif }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; bool no_init = FALSE; @@ -149,7 +154,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) my_fp = stdout; - while ((ch = getopt(argc, argv, "ensw")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "ensw")) != -1) { switch (ch) { case 'e': my_fp = stderr; @@ -165,13 +170,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) w_opt = TRUE; break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); if (no_init) { START_TRACE(); @@ -191,8 +199,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { fprintf(stderr, "This program requires terminfo\n"); exit(EXIT_FAILURE); diff --git a/test/test_tparm.c b/test/test_tparm.c index 1c976af7..50289def 100644 --- a/test/test_tparm.c +++ b/test/test_tparm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2022,2023 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,18 +29,34 @@ /* * Author: Thomas E. Dickey * - * $Id: test_tparm.c,v 1.20 2021/03/20 15:58:32 tom Exp $ + * $Id: test_tparm.c,v 1.39 2023/11/11 01:00:03 tom Exp $ * - * Exercise tparm, either for all possible capabilities with fixed parameters, - * or one capability with all possible parameters. - * - * TODO: incorporate tic.h and _nc_tparm_analyze - * TODO: optionally test tiparm - * TODO: add checks/logic to handle "%s" in tparm + * Exercise tparm/tiparm, either for all possible capabilities with fixed + * parameters, or one capability with specific combinations of parameters. */ #define USE_TINFO #include +#if NCURSES_XNAMES +#if HAVE_TERM_ENTRY_H +#include +#else +#undef NCURSES_XNAMES +#define NCURSES_XNAMES 0 +#endif +#endif + +#define MAX_PARM 9 + +#define GrowArray(array,limit,length) \ + if (length + 2 >= limit) { \ + limit *= 2; \ + array = typeRealloc(char *, limit, array); \ + if (array == 0) { \ + failed("no memory: " #array); \ + } \ + } + static GCC_NORETURN void failed(const char *); static void @@ -56,6 +72,14 @@ static int a_opt; static int p_opt; static int v_opt; +#if HAVE_TIPARM +static int i_opt; +#endif + +#if HAVE_TIPARM_S +static int s_opt; +#endif + /* * Total tests (and failures): */ @@ -119,13 +143,13 @@ relevant(const char *name, const char *value) } static int -increment(int *all_parms, int *num_parms, int len_parms, int end_parms) +increment(long *all_parms, int *num_parms, int len_parms, int end_parms) { int rc = 0; int n; - if (len_parms > 9) - len_parms = 9; + if (len_parms > MAX_PARM) + len_parms = MAX_PARM; if (end_parms < len_parms) { if (all_parms[end_parms]++ >= num_parms[end_parms]) { @@ -143,90 +167,253 @@ increment(int *all_parms, int *num_parms, int len_parms, int end_parms) return rc; } +/* parse the format string to determine which positional parameters + * are assumed to be strings. + */ +#if HAVE_TISCAN_S +static int +analyze_format(const char *format, int *mask, char **p_is_s) +{ + int arg_count; + int arg_mask; + int n; + if (tiscan_s(&arg_count, &arg_mask, format) == OK) { + *mask = arg_mask; + for (n = 0; n < MAX_PARM; ++n) { + static char dummy[1]; + p_is_s[n] = (arg_mask & 1) ? dummy : NULL; + arg_mask >>= 1; + } + } else { + *mask = 0; + arg_count = 0; + for (n = 0; n < MAX_PARM; ++n) { + p_is_s[n] = NULL; + } + } + return arg_count; +} +#elif HAVE__NC_TPARM_ANALYZE +extern int _nc_tparm_analyze(TERMINAL *, const char *, char **, int *); + +static int +analyze_format(const char *format, int *mask, char **p_is_s) +{ + int popcount = 0; + int analyzed = _nc_tparm_analyze(cur_term, format, p_is_s, &popcount); + int n; + if (analyzed < popcount) { + analyzed = popcount; + } + *mask = 0; + for (n = 0; n < MAX_PARM; ++n) { + if (p_is_s[n]) + *mask |= (1 << n); + } + return analyzed; +} +#else +/* TODO: make this work without direct use of ncurses internals. */ +static int +analyze_format(const char *format, int *mask, char **p_is_s) +{ + int n; + char *filler = strstr(format, "%s"); + *mask = 0; + for (n = 0; n < MAX_PARM; ++n) { + p_is_s[n] = filler; + } + return n; +} +#endif + +#define NumStr(n) use_strings[n] \ + ? (long) (my_intptr_t) (number[n] \ + ? string[n] \ + : NULL) \ + : number[n] + +#define NS_0(fmt) fmt +#define NS_1(fmt) NS_0(fmt), NumStr(0) +#define NS_2(fmt) NS_1(fmt), NumStr(1) +#define NS_3(fmt) NS_2(fmt), NumStr(2) +#define NS_4(fmt) NS_3(fmt), NumStr(3) +#define NS_5(fmt) NS_4(fmt), NumStr(4) +#define NS_6(fmt) NS_5(fmt), NumStr(5) +#define NS_7(fmt) NS_6(fmt), NumStr(6) +#define NS_8(fmt) NS_7(fmt), NumStr(7) +#define NS_9(fmt) NS_8(fmt), NumStr(8) + static void -test_tparm(const char *name, const char *format, int *number) +test_tparm(const char *name, const char *format, long *number, char **string) { - char *result = tparm(format, - number[0], - number[1], - number[2], - number[3], - number[4], - number[5], - number[6], - number[7], - number[8]); + char *use_strings[MAX_PARM]; + char *result = NULL; + int nparam; + int mask; + + nparam = analyze_format(format, &mask, use_strings); +#if HAVE_TIPARM_S + if (s_opt) { + switch (nparam) { + case 0: + result = tiparm_s(0, mask, NS_0(format)); + break; + case 1: + result = tiparm_s(1, mask, NS_1(format)); + break; + case 2: + result = tiparm_s(2, mask, NS_2(format)); + break; + case 3: + result = tiparm_s(3, mask, NS_3(format)); + break; + case 4: + result = tiparm_s(4, mask, NS_4(format)); + break; + case 5: + result = tiparm_s(5, mask, NS_5(format)); + break; + case 6: + result = tiparm_s(6, mask, NS_6(format)); + break; + case 7: + result = tiparm_s(7, mask, NS_7(format)); + break; + case 8: + result = tiparm_s(8, mask, NS_8(format)); + break; + case 9: + result = tiparm_s(9, mask, NS_9(format)); + break; + } + } else +#endif +#if HAVE_TIPARM + if (i_opt) { + switch (nparam) { + case 0: + result = tiparm(NS_0(format)); + break; + case 1: + result = tiparm(NS_1(format)); + break; + case 2: + result = tiparm(NS_2(format)); + break; + case 3: + result = tiparm(NS_3(format)); + break; + case 4: + result = tiparm(NS_4(format)); + break; + case 5: + result = tiparm(NS_5(format)); + break; + case 6: + result = tiparm(NS_6(format)); + break; + case 7: + result = tiparm(NS_7(format)); + break; + case 8: + result = tiparm(NS_8(format)); + break; + case 9: + result = tiparm(NS_9(format)); + break; + } + } else +#endif + result = tparm(NS_9(format)); total_tests++; if (result != NULL) { tputs(result, 1, output_func); } else { total_fails++; } - if (v_opt > 1) - printf(".. %2d = %2d %2d %2d %2d %2d %2d %2d %2d %2d %s\n", - result != 0 ? (int) strlen(result) : -1, - number[0], - number[1], - number[2], - number[3], - number[4], - number[5], - number[6], - number[7], - number[8], - name); + if (v_opt > 1) { + int n; + printf(".. %3d =", result != 0 ? (int) strlen(result) : -1); + for (n = 0; n < nparam; ++n) { + if (use_strings[n]) { + if (number[n]) { + printf(" \"%s\"", string[n]); + } else { + printf(" ?"); + } + } else { + printf(" %2ld", number[n]); + } + } + printf(" %s\n", name); + } } static void -usage(void) +usage(int ok) { static const char *msg[] = { - "Usage: test_tparm [options] [capability] [value1 [value2 [...]]]", - "", - "Use tparm/tputs for all distinct combinations of given capability.", - "", - "Options:", - " -T TERM override $TERM; this may be a comma-separated list or \"-\"", - " to read a list from standard-input", - " -a test all combinations of parameters", - " [value1...] forms a vector of maximum parameter-values.", - " -p test capabilities with no parameters but having padding", - " -r NUM repeat tests NUM times", - " -v show values and results", + "Usage: test_tparm [options] [capability] [value1 [value2 [...]]]" + ,"" + ,"Use tparm/tputs for all distinct combinations of given capability." + ,"" + ,USAGE_COMMON + ,"Options:" + ," -T TERM override $TERM; this may be a comma-separated list or \"-\"" + ," to read a list from standard-input" + ," -a test all combinations of parameters" + ," [value1...] forms a vector of maximum parameter-values." +#if HAVE_TIPARM + ," -i test tiparm rather than tparm" +#endif + ," -p test capabilities with no parameters but having padding" + ," -r NUM repeat tests NUM times" +#if HAVE_TIPARM_S + ," -s test tiparm_s rather than tparm" +#endif + ," -v show values and results" }; unsigned n; for (n = 0; n < SIZEOF(msg); ++n) { fprintf(stderr, "%s\n", msg[n]); } - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } #define PLURAL(n) n, (n != 1) ? "s" : "" #define COLONS(n) (n >= 1) ? ":" : "" #define NUMFORM "%10ld" +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) { + int ch; int n; int r_run, t_run, n_run; char *old_term = getenv("TERM"); int r_opt = 1; char *t_opt = 0; + int std_caps = 0; /* predefine items in all_caps[] */ int len_caps = 0; /* cur # of items in all_caps[] */ int max_caps = 10; /* max # of items in all_caps[] */ char **all_caps = typeCalloc(char *, max_caps); - int all_parms[10]; /* workspace for "-a" option */ + long all_parms[10]; /* workspace for "-a" option */ int len_terms = 0; /* cur # of items in all_terms[] */ int max_terms = 10; /* max # of items in all_terms[] */ char **all_terms = typeCalloc(char *, max_terms); int use_caps; + int max_name = 10; /* max # of items in cap_name[] */ + int max_data = 10; /* max # of items in cap_data[] */ char **cap_name; char **cap_data; @@ -239,26 +426,39 @@ main(int argc, char *argv[]) if (all_caps == 0 || all_terms == 0 || num_parms == 0 || str_parms == 0) failed("no memory"); - while ((n = getopt(argc, argv, "T:apr:v")) != -1) { - switch (n) { + while ((ch = getopt(argc, argv, OPTS_COMMON "T:aipr:sv")) != -1) { + switch (ch) { case 'T': t_opt = optarg; break; case 'a': ++a_opt; break; +#if HAVE_TIPARM + case 'i': + ++i_opt; + break; +#endif case 'p': ++p_opt; break; case 'r': r_opt = atoi(optarg); break; +#if HAVE_TIPARM_S + case 's': + ++s_opt; + break; +#endif case 'v': ++v_opt; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } @@ -362,13 +562,7 @@ main(int argc, char *argv[]) if (len_caps == 0) { #if defined(HAVE_CURSES_DATA_BOOLNAMES) || defined(DECL_CURSES_DATA_BOOLNAMES) for (n = 0; strnames[n] != 0; ++n) { - if (len_caps + 2 >= max_caps) { - max_caps *= 2; - all_caps = typeRealloc(char *, max_caps, all_caps); - if (all_caps == 0) { - failed("no memory: all_caps"); - } - } + GrowArray(all_caps, max_caps, len_caps); all_caps[len_caps++] = strdup(strnames[n]); } #else @@ -376,6 +570,7 @@ main(int argc, char *argv[]) all_caps[len_caps++] = strdup("sgr"); #endif } + std_caps = len_caps; all_caps[len_caps] = 0; if (v_opt) { printf("%d name%s%s\n", PLURAL(len_caps), COLONS(len_caps)); @@ -386,8 +581,8 @@ main(int argc, char *argv[]) } } - cap_name = typeMalloc(char *, len_caps); - cap_data = typeMalloc(char *, len_caps); + cap_name = typeMalloc(char *, (max_name = 1 + len_caps)); + cap_data = typeMalloc(char *, (max_data = 1 + len_caps)); if (r_opt <= 0) r_opt = 1; @@ -405,6 +600,20 @@ main(int argc, char *argv[]) if (setupterm(all_terms[t_run], fileno(stdout), &errs) != OK) { printf("** skipping %s (errs:%d)\n", all_terms[t_run], errs); } +#if NCURSES_XNAMES + len_caps = std_caps; + if (cur_term) { + TERMTYPE *term = (TERMTYPE *) cur_term; + for (n = STRCOUNT; n < NUM_STRINGS(term); ++n) { + GrowArray(all_caps, max_caps, len_caps); + GrowArray(cap_name, max_name, len_caps); + GrowArray(cap_data, max_data, len_caps); + all_caps[len_caps++] = strdup(ExtStrname(term, (int) n, strnames)); + } + } +#else + (void) std_caps; +#endif /* * Most of the capabilities have no parameters, e.g., they are @@ -422,7 +631,7 @@ main(int argc, char *argv[]) } if (v_opt) { - printf("[%d:%d] %d cap%s * %ld param%s \"%s\"\n", + printf("[%d:%d] %d paramerized cap%s * %ld test-case%s \"%s\"\n", r_run + 1, r_opt, PLURAL(use_caps), PLURAL(use_parms), @@ -434,16 +643,27 @@ main(int argc, char *argv[]) /* for each combination of values */ do { for (n_run = 0; n_run < use_caps; ++n_run) { - test_tparm(cap_name[n_run], cap_data[n_run], all_parms); + test_tparm(cap_name[n_run], + cap_data[n_run], + all_parms, + str_parms); } } while (increment(all_parms, num_parms, len_parms, 0)); } else { /* for the given values */ for (n_run = 0; n_run < use_caps; ++n_run) { - test_tparm(cap_name[n_run], cap_data[n_run], all_parms); + test_tparm(cap_name[n_run], + cap_data[n_run], + all_parms, + str_parms); } } +#if NCURSES_XNAMES + for (n = std_caps; n < len_caps; ++n) { + free(all_caps[n]); + } +#endif if (cur_term != 0) { del_curterm(cur_term); } else { @@ -462,7 +682,7 @@ main(int argc, char *argv[]) printf(NUMFORM " printable\n", total_print); printf(NUMFORM " total\n", total_nulls + total_ctrls + total_print); #if NO_LEAKS - for (n = 0; n < len_caps; ++n) { + for (n = 0; n < std_caps; ++n) { free(all_caps[n]); } free(all_caps); @@ -482,7 +702,7 @@ main(int argc, char *argv[]) #else /* !HAVE_TIGETSTR */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(void) { failed("This program requires the terminfo functions such as tigetstr"); } diff --git a/test/test_unget_wch.c b/test/test_unget_wch.c new file mode 100644 index 00000000..58085304 --- /dev/null +++ b/test/test_unget_wch.c @@ -0,0 +1,116 @@ +/**************************************************************************** + * Copyright 2022 Thomas E. Dickey * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ +/* + * $Id: test_unget_wch.c,v 1.4 2022/12/10 23:31:31 tom Exp $ + * + * Demonstrate the unget_wch and unget functions. + */ + +#include + +#if USE_WIDEC_SUPPORT && HAVE_UNGET_WCH +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: test_unget_wch [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + +int +main(int argc, char *argv[]) +{ + int step = 0; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); + + setlocale(LC_ALL, ""); + initscr(); + keypad(stdscr, TRUE); + cbreak(); + noecho(); + scrollok(stdscr, TRUE); + + for (;;) { + wint_t widechar; + int rc = get_wch(&widechar); + if (rc == KEY_CODE_YES) { + printw("KEY[%d] %s\n", ++step, keyname((int) widechar)); + ungetch((int) widechar); + printw("...[%d] %s\n", step, keyname(getch())); + } else if (widechar == QUIT || widechar == ESCAPE) { + break; + } else { + printw("CHR[%d] %s\n", ++step, key_name((wchar_t) widechar)); + unget_wch((wchar_t) widechar); + rc = get_wch(&widechar); + printw("%s[%d] %s\n", + ((rc == KEY_CODE_YES) + ? "???" + : "..."), + step, key_name((wchar_t) widechar)); + } + } + + endwin(); + + ExitProgram(EXIT_SUCCESS); +} + +#else +int +main(void) +{ + printf("This program requires the wide-ncurses library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/test_vid_puts.c b/test/test_vid_puts.c index 1259ebf2..0d7d7abb 100644 --- a/test/test_vid_puts.c +++ b/test/test_vid_puts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 2013-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_vid_puts.c,v 1.12 2021/04/25 00:10:43 tom Exp $ + * $Id: test_vid_puts.c,v 1.17 2022/12/10 22:28:50 tom Exp $ * * Demonstrate the vid_puts and vid_attr functions. * Thomas Dickey - 2013/01/12 @@ -94,32 +94,36 @@ test_vid_puts(void) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_vid_puts [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -e use stderr (default stdout)" - ," -n do not initialize terminal" - ," -p use vid_puts (default vid_attr)" + ," -e use stderr (default stdout)" + ," -n do not initialize terminal" + ," -p use vid_puts (default vid_attr)" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; bool no_init = FALSE; my_fp = stdout; - while ((ch = getopt(argc, argv, "enp")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "enp")) != -1) { switch (ch) { case 'e': my_fp = stderr; @@ -130,14 +134,18 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'p': p_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); + setlocale(LC_ALL, ""); if (no_init) { START_TRACE(); } else { diff --git a/test/test_vidputs.c b/test/test_vidputs.c index 25b7714d..31dc9da4 100644 --- a/test/test_vidputs.c +++ b/test/test_vidputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 2013-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_vidputs.c,v 1.11 2021/04/25 00:10:43 tom Exp $ + * $Id: test_vidputs.c,v 1.15 2022/12/10 23:23:27 tom Exp $ * * Demonstrate the vidputs and vidattr functions. * Thomas Dickey - 2013/01/12 @@ -94,32 +94,36 @@ test_vidputs(void) } static void -usage(void) +usage(int ok) { static const char *tbl[] = { "Usage: test_vidputs [options]" ,"" + ,USAGE_COMMON ,"Options:" - ," -e use stderr (default stdout)" - ," -n do not initialize terminal" - ," -p use vidputs (default vidattr)" + ," -e use stderr (default stdout)" + ," -n do not initialize terminal" + ," -p use vidputs (default vidattr)" }; unsigned n; for (n = 0; n < SIZEOF(tbl); ++n) fprintf(stderr, "%s\n", tbl[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { int ch; bool no_init = FALSE; my_fp = stdout; - while ((ch = getopt(argc, argv, "enp")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "enp")) != -1) { switch (ch) { case 'e': my_fp = stderr; @@ -130,13 +134,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) case 'p': p_opt = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); - break; + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); if (no_init) { START_TRACE(); @@ -150,8 +157,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) #else int -main(int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(void) { fprintf(stderr, "This program requires terminfo\n"); exit(EXIT_FAILURE); diff --git a/test/testaddch.c b/test/testaddch.c index 875c8be7..e393c3cc 100644 --- a/test/testaddch.c +++ b/test/testaddch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2022 Thomas E. Dickey * * Copyright 1998-2013,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ * This is an example written by Alexander V. Lukyanov , * to demonstrate an inconsistency between ncurses and SVr4 curses. * - * $Id: testaddch.c,v 1.13 2020/02/02 23:34:34 tom Exp $ + * $Id: testaddch.c,v 1.15 2022/12/10 23:44:18 tom Exp $ */ #include @@ -41,13 +41,45 @@ attr_addstr(const char *s, chtype a) addch(((unsigned char) (*s++)) | a); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: testaddch [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main( - int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { unsigned i; chtype back, set, attr; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); setlocale(LC_ALL, ""); diff --git a/test/testcurs.c b/test/testcurs.c index 2e014159..750e5a45 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -6,7 +6,7 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) with either * PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.56 2021/03/27 22:39:50 tom Exp $ + * $Id: testcurs.c,v 1.58 2023/05/28 14:23:34 tom Exp $ */ #include @@ -252,11 +252,11 @@ inputTest(WINDOW *win) #ifdef KEY_MOUSE if (c == KEY_MOUSE) { #if defined(NCURSES_MOUSE_VERSION) -#define ButtonChanged(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, 037)) -#define ButtonPressed(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED)) -#define ButtonDouble(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED)) -#define ButtonTriple(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED)) -#define ButtonRelease(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)) +#define ButtonChanged(n) ((event.bstate) & NCURSES_MOUSE_MASK(n, (NCURSES_BUTTON_RELEASED|NCURSES_BUTTON_PRESSED|NCURSES_BUTTON_CLICKED|NCURSES_DOUBLE_CLICKED|NCURSES_TRIPLE_CLICKED|NCURSES_RESERVED_EVENT))) +#define ButtonPressed(n) ((event.bstate) & NCURSES_MOUSE_MASK(n, NCURSES_BUTTON_PRESSED)) +#define ButtonDouble(n) ((event.bstate) & NCURSES_MOUSE_MASK(n, NCURSES_DOUBLE_CLICKED)) +#define ButtonTriple(n) ((event.bstate) & NCURSES_MOUSE_MASK(n, NCURSES_TRIPLE_CLICKED)) +#define ButtonRelease(n) ((event.bstate) & NCURSES_MOUSE_MASK(n, NCURSES_BUTTON_RELEASED)) MEVENT event; int button = 0; @@ -676,16 +676,48 @@ display_menu(int old_option, int new_option) refresh(); } +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: testcurs [options]" + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int -main( - int argc GCC_UNUSED, - char *argv[]GCC_UNUSED) +main(int argc, char *argv[]) { WINDOW *win; int old_option = (-1); int new_option = 0; bool quit = FALSE; int n; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } + if (optind < argc) + usage(FALSE); setlocale(LC_ALL, ""); diff --git a/test/testscanw.c b/test/testscanw.c index 251c464d..415250c6 100644 --- a/test/testscanw.c +++ b/test/testscanw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2019-2020,2022 Thomas E. Dickey * * Copyright 1998-2002,2006 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,15 +30,49 @@ * Date: 1997/03/17 * From: bayern@morpheus.cis.yale.edu * - * $Id: testscanw.c,v 1.13 2020/02/02 23:34:34 tom Exp $ + * $Id: testscanw.c,v 1.15 2022/12/11 00:10:29 tom Exp $ */ #include +static void +usage(int ok) +{ + static const char *msg[] = + { + "Usage: testscanw [options] tokens" + ,"" + ,"Tokens are integers (starting line-number) or k+, k- to turn keypad on/off." + ,"" + ,USAGE_COMMON + }; + size_t n; + + for (n = 0; n < SIZEOF(msg); n++) + fprintf(stderr, "%s\n", msg[n]); + + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); +} +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ + int main(int argc, char *argv[]) { long badanswer = 1; long *response = &badanswer; + int ch; + + while ((ch = getopt(argc, argv, OPTS_COMMON)) != -1) { + switch (ch) { + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); + default: + usage(ch == OPTS_USAGE); + /* NOTREACHED */ + } + } setlocale(LC_ALL, ""); @@ -50,12 +84,14 @@ main(int argc, char *argv[]) #if 0 curses_trace(TRACE_UPDATE | TRACE_CALLS); #endif - while (argc > 1) { - if (isdigit(UChar(*argv[1]))) - move(atoi(argv[1]), 0); - else if (!strcmp(argv[1], "-k")) + while (optind < argc) { + char *token = argv[optind++]; + if (isdigit(UChar(*token))) + move(atoi(token), 0); + else if (!strcmp(token, "k+")) keypad(stdscr, TRUE); - argc--, argv++; + else if (!strcmp(token, "k-")) + keypad(stdscr, FALSE); } while (badanswer) { diff --git a/test/tput-colorcube b/test/tput-colorcube old mode 100644 new mode 100755 diff --git a/test/tput-initc b/test/tput-initc old mode 100644 new mode 100755 diff --git a/test/view.c b/test/view.c index b368f5b7..72e0cfbb 100644 --- a/test/view.c +++ b/test/view.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2019-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -52,7 +52,7 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.142 2021/06/12 23:16:31 tom Exp $ + * $Id: view.c,v 1.145 2022/12/04 00:40:11 tom Exp $ */ #include @@ -377,12 +377,13 @@ read_file(const char *filename) } static GCC_NORETURN void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: view [options] file" ,"" + ,USAGE_COMMON ,"Options:" ," -c use color if terminal supports it" ," -i ignore INT, QUIT, TERM signals" @@ -398,8 +399,11 @@ usage(void) size_t n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -429,6 +433,7 @@ main(int argc, char *argv[]) 0 }; + int ch; int i; int my_delay = 0; NCURSES_CH_T **olptr; @@ -441,8 +446,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((i = getopt(argc, argv, "cinstT:")) != -1) { - switch (i) { + while ((ch = getopt(argc, argv, OPTS_COMMON "cinstT:")) != -1) { + switch (ch) { case 'c': try_color = TRUE; break; @@ -463,7 +468,7 @@ main(int argc, char *argv[]) char *next = 0; int tvalue = (int) strtol(optarg, &next, 0); if (tvalue < 0 || (next != 0 && *next != 0)) - usage(); + usage(FALSE); curses_trace((unsigned) tvalue); } break; @@ -471,12 +476,16 @@ main(int argc, char *argv[]) curses_trace(TRACE_CALLS); break; #endif + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); + /* NOTREACHED */ } } if (optind + 1 != argc) - usage(); + usage(FALSE); InitAndCatch(initscr(), ignore_sigs ? SIG_IGN : finish); keypad(stdscr, TRUE); /* enable keyboard mapping */ diff --git a/test/worm.c b/test/worm.c index 6304e4b0..7c4842e4 100644 --- a/test/worm.c +++ b/test/worm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -53,7 +53,7 @@ traces will be dumped. The program stops and waits for one character of input at the beginning and end of the interval. - $Id: worm.c,v 1.82 2020/02/02 23:34:34 tom Exp $ + $Id: worm.c,v 1.89 2022/12/24 20:46:49 tom Exp $ */ #include @@ -107,6 +107,18 @@ static int length = 16, number = 3; static chtype trail = ' '; static unsigned pending; + +#ifdef USE_PTHREADS +#define Locked(statement) { \ + pthread_mutex_lock(&pending_mutex); \ + statement; \ + pthread_mutex_unlock(&pending_mutex); \ + } +pthread_mutex_t pending_mutex; +#else +#define Locked(statement) statement +#endif + #ifdef TRACE static int generation, trace_start, trace_end; #endif /* TRACE */ @@ -248,13 +260,18 @@ draw_worm(WINDOW *win, void *data) WORM *w = (WORM *) data; const struct options *op; unsigned mask = (unsigned) (~(1 << (w - worm))); - chtype attrs = w->attrs | ((mask & pending) ? A_REVERSE : 0); + chtype attrs; int x; int y; int h; bool done = FALSE; + bool is_pending; + + Locked(is_pending = ((mask & pending) != 0)); + + attrs = w->attrs | (is_pending ? A_REVERSE : 0); if ((x = w->xpos[h = w->head]) < 0) { wmove(win, y = w->ypos[h] = last_y, x = w->xpos[h] = 0); @@ -336,9 +353,12 @@ draw_worm(WINDOW *win, void *data) static bool quit_worm(int bitnum) { - pending = (pending | (unsigned) (1 << bitnum)); + Locked(pending = (pending | (unsigned) (1 << bitnum))); + napms(10); /* let the other thread(s) have a chance */ - pending = (pending & (unsigned) ~(1 << bitnum)); + + Locked(pending = (pending & (unsigned) ~(1 << bitnum))); + return quitting; } @@ -348,13 +368,13 @@ start_worm(void *arg) unsigned long compare = 0; Trace(("start_worm")); while (!quit_worm((int) (((struct worm *) arg) - worm))) { - while (compare < sequence) { + for (;;) { + bool done = FALSE; + Locked(done = (compare >= sequence)); + if (done) + break; ++compare; -#if HAVE_USE_WINDOW - use_window(stdscr, draw_worm, arg); -#else - draw_worm(stdscr, arg); -#endif + USING_WINDOW2(stdscr, draw_worm, arg); } } Trace(("...start_worm (done)")); @@ -379,13 +399,7 @@ draw_all_worms(void) } #else for (n = 0, w = &worm[0]; n < number; n++, w++) { - if ( -#if HAVE_USE_WINDOW - USING_WINDOW2(stdscr, draw_worm, w) -#else - draw_worm(stdscr, w) -#endif - ) + if (USING_WINDOW2(stdscr, draw_worm, w)) done = TRUE; } #endif @@ -437,12 +451,13 @@ update_refs(WINDOW *win, void *data) #endif static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: worm [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors" @@ -461,8 +476,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -479,7 +497,7 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "dfl:n:tT:N")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "dfl:n:tT:N")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': @@ -492,13 +510,13 @@ main(int argc, char *argv[]) case 'l': if ((length = atoi(optarg)) < 2 || length > MAX_LENGTH) { fprintf(stderr, "%s: Invalid length\n", *argv); - usage(); + usage(FALSE); } break; case 'n': if ((number = atoi(optarg)) < 1 || number > MAX_WORMS) { fprintf(stderr, "%s: Invalid number of worms\n", *argv); - usage(); + usage(FALSE); } break; case 't': @@ -507,19 +525,22 @@ main(int argc, char *argv[]) #ifdef TRACE case 'T': if (sscanf(optarg, "%d,%d", &trace_start, &trace_end) != 2) - usage(); + usage(FALSE); break; case 'N': _nc_optimize_enable ^= OPTIMIZE_ALL; /* declared by ncurses */ break; #endif /* TRACE */ + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } } if (optind < argc) - usage(); + usage(FALSE); signal(SIGINT, onsig); initscr(); @@ -603,8 +624,12 @@ main(int argc, char *argv[]) USING_WINDOW1(stdscr, wrefresh, safe_wrefresh); nodelay(stdscr, TRUE); +#ifdef USE_PTHREADS + pthread_mutex_init(&pending_mutex, NULL); +#endif + while (!done) { - ++sequence; + Locked(++sequence); if ((ch = get_input()) > 0) { #ifdef TRACE if (trace_start || trace_end) { @@ -649,6 +674,15 @@ main(int argc, char *argv[]) Trace(("Cleanup")); cleanup(); +#ifdef USE_PTHREADS + /* + * Do this just in case one of the threads did not really exit. + */ + Trace(("join all threads")); + for (n = 0; n < number; n++) { + pthread_join(worm[n].thread, NULL); + } +#endif #if NO_LEAKS for (y = 0; y < max_refs; y++) { free(refs[y]); @@ -658,15 +692,6 @@ main(int argc, char *argv[]) free(w->xpos); free(w->ypos); } -#endif -#ifdef USE_PTHREADS - /* - * Do this just in case one of the threads did not really exit. - */ - Trace(("join all threads")); - for (n = 0; n < number; n++) { - pthread_join(worm[n].thread, NULL); - } #endif ExitProgram(EXIT_SUCCESS); } diff --git a/test/xmas.c b/test/xmas.c index 678c9e17..9ba3a26c 100644 --- a/test/xmas.c +++ b/test/xmas.c @@ -92,7 +92,7 @@ /******************************************************************************/ /* - * $Id: xmas.c,v 1.36 2021/03/27 22:40:53 tom Exp $ + * $Id: xmas.c,v 1.39 2022/12/04 00:40:11 tom Exp $ */ #include @@ -646,12 +646,13 @@ done(int sig GCC_UNUSED) } static void -usage(void) +usage(int ok) { static const char *msg[] = { "Usage: xmas [options]" ,"" + ,USAGE_COMMON ,"Options:" #if HAVE_USE_DEFAULT_COLORS ," -d invoke use_default_colors" @@ -663,8 +664,11 @@ usage(void) for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - ExitProgram(EXIT_FAILURE); + ExitProgram(ok ? EXIT_SUCCESS : EXIT_FAILURE); } +/* *INDENT-OFF* */ +VERSION_COMMON() +/* *INDENT-ON* */ int main(int argc, char *argv[]) @@ -676,7 +680,7 @@ main(int argc, char *argv[]) #endif bool opt_q = FALSE; - while ((ch = getopt(argc, argv, "dq")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "dq")) != -1) { switch (ch) { #if HAVE_USE_DEFAULT_COLORS case 'd': @@ -686,8 +690,11 @@ main(int argc, char *argv[]) case 'q': opt_q = TRUE; break; + case OPTS_VERSION: + show_version(argv); + ExitProgram(EXIT_SUCCESS); default: - usage(); + usage(ch == OPTS_USAGE); /* NOTREACHED */ } }