From a816c8dae437106bbf1661304240ff568ae3efef Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" These notes are for ncurses
- @VERSION@, released February 12, 2020.Announcing ncurses @VERSION@
@@ -158,10 +155,10 @@
Notes
This release is designed to be source-compatible with - ncurses 5.0 through 6.1; providing + ncurses 5.0 through 6.2; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is @@ -173,45 +170,28 @@ this announcement.
The most important - bug-fixes/improvements dealt with user-defined capabilities - in terminal descriptions. The release notes also mention some - other bug-fixes, but are focused on new features and improvements - to existing features since ncurses - 6.1 release.
+ bug-fixes/improvements dealt with portability issues. The + release notes also mention some other bug-fixes, but are focused + on new features and improvements to existing features since + ncurses 6.2 release.There are several new features:
+There are a few new features:
O_EDGE_INSERT_STAY - tells the form library to optionally delay cursor movement on - a field edge/boundary
+A new (experimental) driver, for the Windows Terminal + configuration is provided.
O_INPUT_FIELD - extension to form library allows a dynamic field to shrink if - the new limit is smaller than the current field size.
-added exit_curses and - exit_terminfo to - replace internal symbols for leak-checking.
-added curses_trace, - to replace trace().
+A script is provided which enables OpenBSD users to + upgrade their system to use ncurses 6.3 (OpenBSD developers + are also invited to do this).
mouse decoding now handles shift/control/alt logic when - decoding xterm's 1006 mode
-ncurses now defines a limit for wgetnstr, wgetn_wstr when - length is negative or “too large”.
-there is now no buffer-size limit when reading the - $TERMCAP - variable.
-the $TERMCAP - variable may be interpreted as a fallback to a terminfo - entry
-- mvcur now decides whether to use hard-tabs, using - xt, tbc - and hts as clues.
-extended colors are improved by modifying an internal call - to - vid_puts to pass extended color pairs e.g., from - tty_update.c and lib_mvcur.c
+modify lib_mouse.c to check for out-of-range button + numbers, convert those to position reports.
the initialization functions now avoid - relying upon persistent data for the result from getenv
-scrolling is improved:
- -improved loop limits in _nc_scroll_window - handle a case where the scrolled data is a pad which is - taller than the window.
-add sp-funcs for + erasewchar, + killwchar.
These are revised features:
used “const” in some prototypes - rather than NCURSES_CONST where X/Open Curses was - updated to do this, e.g., wscanw, newterm, - the terminfo interface. Also use “const” - for consistency in the termcap interface, which was withdrawn - by X/Open Curses in Issue 5 (2007). As of Issue 7, X/Open - Curses still lacks “const” for certain - return values, e.g., keyname.
-modified wbkgd - and wbkgrnd - to improve compatibility with SVr4 curses, changing the way - the window rendition is updated when the background character - is modified
-improved terminfo write/read by modifying the fourth item - of the extended header to denote the number of valid strings - in the extended string table (see term(5)).
-modified the initialization checks for mouse so that the - xterm+sm+1006 - block will work with terminal descriptions not mentioning - xterm.
-These were done to limit or ultimately deprecate features:
deprecated safe-sprintf, since the - vsnprintf function, which does what was needed, was - standardized long ago.
-mark wgetch-events feature as deprecated.
-marked vwprintw - and vwscanw as deprecated; recommend using vw_printw - and vw_scanw, respectively.
-prevent KEY_EVENT from appearing in
+ curses.h unless the configure option
+ --enable-wgetch-events
is used.
added deprecation warnings for internal functions called - by older versions of tack.
+modify MKkey_defs.sh to hide ncurses' + definition of KEY_EVENTS to reduce Visual + Studio C++ redefinition warnings.
+removed unused _nc_import_termtype2 function.
+reduce build-warnings by excluding ncurses-internals from + deprecation warnings.
check parameter of set_escdelay, - return ERR if negative.
-check parameter of set_tabsize, return - ERR if not greater than zero
-correct a status-check in _nc_read_tic_entry() so that if - reading a hex/b64 $TERMINFO, - and the $TERM - does not match, fall-through to the compiled-in search - list.
-amend check for - repeat_char to handle a case where setlocale() was - called after initscr
-move macro for is_linetouched - inside NCURSES_NOMACROS - ifndef.
-use _nc_copy_termtype2 rather than direct - assignment in setupterm, - in case it is called repeatedly using fallback terminfo - descriptions
+drop symbols GCC_PRINTF and GCC_SCANF + from <curses.h>, to simplify use.
improve workaround for Solaris wcwidth versus line-drawing - characters
+apply gcc format attribute to prototypes which use a + va_list parameter rather than a “...” + variable-length parameter list.
add checks in repair_subwindows - to keep the current position and scroll-margins inside the - resized subwindow.
+modify <term.h> so that it is not necessary to + include <curses.h> before <term.h>.
correct a buffer-limit in write_entry.c for - systems that use caseless filenames.
-improved build-time utility report_offsets:
- -add categories, e.g., "w" for wide-character, "t" for - threads to make the report more readable. Reorganized the - structures reported to make the categories more - apparent.
-add NCURSES_GLOBALS and - NCURSES_PRESCREEN to report to show how similar - the different libtinfo configurations are.
-provide for wide-characters as background character in + wbkgrnd
modified some header files to ensure that those include - necessary files except for the previously-documented - cases
+improve parameter-checking for tparm, adding function + _nc_tiparm() to handle the most-used case, which accepts only + numeric parameters.
added some traces in initialization to show whether a - fallback entry is used.
+use return-value from vsnprintf to reallocate as + needed to allow for buffers larger than the screen size.
made minor optimization to reduce calls to - _nc_reserve_pairs
+add another fflush(stdout) in _nc_flush + to handle time-delays in the middle of strings such as flash + when the application uses low-level calls rather than + curses.
fix a special case in PutAttrChar where a cell is - marked as alternate-character set, but the terminal does not - actually support the given graphic character. This would - happen in an older terminal such as vt52, which - lacks most line-drawing capability.
-corrected flag for "seq" method of db 1.8.5 interface, - needed by toe on some of the BSDs.
-modify comparison in make_hash.c to correct a special case - in collision handling for Caps-hpux11
-add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files
-modify lib_setup to avoid calling pthread_self() without - first verifying that the address is valid, i.e., for weak - symbols
+add a check to guard against repeat_char emitting + digits which could be interpreted as BSD-style padding when + --enable-bsdpad is configured.
add a couple of broken-linker symbols to the list of - versioned symbols to help with link-time optimization versus - weak symbols.
+check for screen size-change in scr_init and + scr_restore, in + case a screen dump does not match the current screen + dimensions
Several improvements were made to the utility programs:
+Several improvements were made to the + utility programs:
implement “+m” option
+add check for duplicate “use=” + clauses.
+add check to report instances where tparm + would detect an error in an expression.
+add user-defined capabilities from mintty to + Caps-ncurses, for checking consistency.
+improve warning when oc/op do not mention SGR 39/49
+ for xterm compatible XT
flag.
improve checks for number of parameters of
+ smglp
, smgrp
,
+ smgtp
, and smgbp
.
improve “-c” option to validate + the number and type of parameters and compare against + expected number/type before deciding which set of + parameter-lists to use in tparm calls.
+improve check for errors detected in
+ tparm
.
improve format of output, to ensure that the messages + contain only printable text.
+modify to eliminate unnecessary
+ “\
” to escape
+ “:
” in terminfo format.
remove check that assumes that none or both + parameterized and non-parameterized margin-setting + capabilities are present.
+modify output of “toe -as” to + show first description found rather than the last.
+add a check to ensure that a “termcap + file” is text rather than binary.
+Several changes were made to the generated ncurses*config - scripts and the analogous “.pc” files to - reduce differences between the configurations they report:
+modify to allow multiple commands per line.
+modified the ncurse*-config and pc-files to more closely - match for the -I and -l options.
-improve parameter-checking by analyzing all extended
+ string capabilities, e.g., as used in the Cs
+ and Ms
capabilities of the tmux
+ description.
filtered out linker-specs from the --libs - report.
-make warning messages consistently using alias names + when those are used, rather than the underlying program's + name.
+amended the ncurses*-config and pc-files to take into - account the rpath hack which differed between those - files.
-improve usage message for aliases such as + clear, by eliminating tput-specific + portions.
+modified generated ncurses*config and ncurses.pc, - ncursesw.pc, etc., to list helper libraries such as gpm for - static linking.
-modify initialization to avoid opening + /dev/tty for cases other than + reset/init, e.g., for clear.
+improve recovery from error when reading command-character - in test/ncurses.c, showing the relevant error - message and not exiting on EINTR.
+add “-r” option to the dots + test-programs, to help with scripting a performance + comparison.
improve tracemunch, by keeping track of - TERMINAL* values, and if tracing was first turned on - after initialization, attempt to show distinct screen, window - and terminal names anyway.
+build-fix for test_opaque, for configurations + without opaque curses structs, e.g., ncurses 5.7.
modify tracemunch to accept filename parameters - in addition to use as a pipe/filter.
+improve tracemunch logic for "RUN" + compaction.
update tracemunch to work with perl - 5.26.2, which changed the rules for escaping regular - expressions.
+improve tracemunch's coverage of form/menu/panel + libraries.
add some checks in tracemunch for undefined - variables.
+improve tracemunch's checking/reporting the type + for the first parameter, e.g., "WINDOW*" rather than + "#1".
modify TurnOn/TurnOff macros (in - lib_vidattr.c and lib_vid_attr.c) to avoid expansion of - “CUR” in trace.
+modify tracemunch and the panel library to show + readable traces for panel- and user-pointers.
A variety of improvements were made to existing programs, both - new features as well as options added to make the set of programs - more consistent.
- -add “-l” option to test/background, - to dump screen contents in a form that lets different curses - implementations be compared.
-add “@” command to test/ncurses - F-test, to allow rapid jump to different character pages.
-added enum, regex examples to test/demo_forms
-amend Scaled256() macro in test/picsmap.c to cover the - full range 0..1000
-corrected pathname used in Ada95 sample programs for - explain.txt, to work with test-packages, and used an - awk script to split the resulting pathname when it would be - too long for a single line.
-ignore interrupted system-call in test/ncurses's - command-line, e.g., if the terminal were resized.
-improved ifdef's for TABSIZE variable, to help - with AIX/HPUX ports.
-There are several new terminal descriptions:
-alacritty, domterm, kitty, - mintty, mintty-direct, ms-terminal, - n7900, nsterm-build309, - nsterm-direct, screen5, ti703, - ti707, ti703-w, ti707-w - vscode, vscode-direct, xterm-mono, - xterm.js
+absolute, + att610+cvis, + foot, + foot-direct, + hp98550-color, + hpterm-color2, + hterm, + hterm-256color, + linux-s, + putty+keypad, + putty+screen, + putty-screen, + screen.linux-s, + scrt/securecrt, + tmux-direct, + vt220+cvis, + vt220+cvis8, + vt220+pcedit, + vt220+vtedit, + vt220-base, + vt52+keypad, + xterm+256color2, + xterm+88color2, + xterm-direct16, + xterm-direct256, + xterm+nofkeys, + and xterm+nopcfkeys.
There are many changes to existing terminal descriptions. Some were updates to several descriptions:
while others affected specific descriptions. These were retested, to take into account changes by their developers:
-terminator, st
+kitty+common, + mlterm3, + ms-terminal
while these are specific fixes based on reviewing @@ -814,156 +632,133 @@
A few entries use extensions (user-defined terminal capabilities):
make opts extension for getcchar + work as documented for ncurses + 6.1, adding “-g” flag to + demo_new_pair to illustrate.
+modify tset + “-q” option to refrain from modifying + terminal modes, to match the documentation.
+Clarify in manual pages that vwprintw
- and vwscanw
- are obsolete.
- They have not been part of X/Open Curses since 2007.
New/improved history and portability sections:
improve documentation for + tparm and static/dynamic variables.
+Improvements for user_caps.5:
+add history note to curs_scanw.3x + for <stdarg.h> and <varargs.h>
+add history note to curs_printw.3x + for <stdarg.h> and <varargs.h>
+add portability note to ncurses.3x + regarding <stdarg.h>
+add historical notes to tput, + + curses-terminfo and curses-color + manpages based on source-code for SVr2, SVr3 and + SVr4.
+improve history section for tset manpage + based on the 1BSD tarball, which preceded BSD's SCCS + checkins by more than three years.
+Other improvements:
explain in + ncurses.3x that functions in the tinfo library do not + rely upon wide-characters.
+improve manual page for panel + library, extending the portability section as well as + documenting error-returns.
+add section on margins to terminfo.5, + adapted from X/Open Curses.
+improve man/term.5 + section on legacy storage format.
+add a note in + terminfo.5 explaining that no-parameter strings such + as sgr0 or cnorm + should not be used with tparm.
+improve description of BSD-style padding in curs_termcap.3x
+improve discussion of padding versus tparm + and tputs in + man/curs_terminfo.3x
+add a note in manual page to explain + ungetch vs unget_wch.
+improve description of error-returns in waddch + and waddnstr + manual pages.
+Some of the improvements are more subtle, relating to the way - the information is presented. For instance, the generated - terminfo.5 file uses a different table layout, allowing it to use - space on wide terminals more effectively.
+ the information is presented. For instance, hyphenation is + suppressed in the HTML files generated from manual pages because + an upgrade to groff gave noticeably poorer results, + interfering with the process of creating links between the + resulting webpages.While there were many bugs fixed during development of ncurses - 6.2, only a few (the reason for this release) were both important + 6.3, only a few (the reason for this release) were both important and interesting. Most of the bug-fixes were for local issues which did not affect compatibility across releases. Since those - are detailed in the NEWS file no elaboration is needed here.
+ are detailed in the NEWS file no elaboration is + needed here. -The interesting bugs were in tic/infocmp's handling of - user-defined capabilities. These were not recent bugs. Initially - it was a simple problem:
+The interesting bugs were:
One of simpleterm's contributors copied some definitions - for using tmux's user-defined capabilities in +
modify wbkgd and - late in 2016.
- ----diff --git a/st.info b/st.info -@@ -185,7 +185,10 @@ st| simpleterm, - tsl=\E]0;, - xenl, - vpa=\E[%i%p1%dd, -- -+# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -+ Se, -+ Ss, -+ Tc, - - st-256color| simpleterm with 256 colors, - use=st, --
Later, in (referring to a version from - mid-2017), a user asked to have it updated in - ncurses.
-However, it had an error from the change in late 2016. The - terminal description made what tmux expected to be - string actually a - boolean.
- -Over the years, there were problems with each of - simpleterm's terminal descriptions. I repaired those, and - usually dealt with the problem.
+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.
The difference in this case was that when compiling the - terminal database, tic may have in memory the - definitions for more than one terminal description (so that - it can resolve “use=” clauses). Seeing - two different types for the same name, in certain situations - it would incorrectly merge the symbol tables for the two - terminal descriptions.
-On simpleterm's side, their bug was finally fixed in +
remove output-related checks for nl/nonl (also - late 2019, three years after the bug was created.
-For ncurses, the elapsed time to fix this bug was less than - three years. Someone reported a problem with the terminal - description a few weeks after releasing ncurses 6.1 (in tmux #1264), and - the terminal description was updated that week (ncurses patch - 20180224):
- --- --20180224 - + modify _nc_resolve_uses2() to detect incompatible types when merging - a "use=" clause of extended capabilities. The problem was seen in a - defective terminfo integrated from simpleterm sources in 20171111, - compounded by repair in 20180121. - + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD --
The larger part of that change added a check to prevent a - simple merge of terminal descriptions where the same user-defined - name was used with different types. But it raised some - questions:
- -Was there a reliable way to manage terminal descriptions - which used the same extended name in different ways?
+ "https://lists.gnu.org/archive/html/bug-ncurses/2020-09/msg00018.html"> + reported on the mailing list).Should ncurses provide a registry of well-known extended - names, with their types?
-improve tparm implementation of %P and + %g, more closely matching SVr4 terminfo. Those + denote static and dynamic variables in + terminfo expressions.
-Since the correction to terminfo.src - could have been readily adopted by packagers, there was nothing - more to be done from ncurses' standpoint on that part. But - improving ncurses to prevent issues like that is the reason for - making a release.
- -Nothing more (constructive) was mentioned with regard to - simpleterm. But a few problems were found in the handling of - user-defined capabilities:
- -Forward-references to user-defined capabilities in a - “use=” clause did not allocate new data - for each use. In tic, successive compilation of - terminal entries could add user-defined capabilities to the - wrong terminal entry.
- -This was not noticed before, since xterm's terminal - descriptions were the main users of the feature, and almost - all of the uses of the building-blocks which contained - user-defined capabilities were backward-references.
-There is one (documented) case where ncurses 6.1 supports - a user-defined capability that could be any type (i.e., - “RGB”). The check added in February 2018 to guard - against mismatches did not handle all of the combinations - needed.
+Exactly what those terms meant was never documented before + in any implementation of curses, aside from source code. + Unlike the other two fixes, the problem was discovered while + studying OpenBSD's version of tset.
Both of these issues dated from the original implementation of - user-defined capabilities. Fixing them does not change the - terminal database, but a older tic without the fixes - will not be able to handle terminfo sources which rely upon those - fixes. Starting in June 2019, the download link for the terminfo - source file was capped at that date. The development sources have - an up-to-date copy of the file, for people with a legitimate need - for it.
- -The “-c” (check) option of tic - is not very useful if it cannot offer advice on parameters needed - for user-defined capabilities. The various Caps files - were reorganized to reduce redundancy, and in the common portion - (Caps-ncurses), - a registry of user-defined capabilities is provided for use by - tic. While users can still define their own custom - capabilities, tic will not offer any advice when their - parameters do not match.
- -In ncurses 6.2, tic makes a special check to allow - any type for RGB, but its being able to do this relies - upon fixes made in the ncurses library in mid-2019.
-There are a few new/modified configure options:
helps work around a filename conflict with Debian packages - versus test-packages.
+new configure option and check for gcc + -fvisibility=hidden feature
allows one to rename the “AdaCurses” library - (at least one packager prefers a lowercase name).
+corrected to allow turning leak-checking off later in a + set of options.
now ensures there is a value, and adds the fallback - information to top-level Makefile summary.
+new configure option makes the _Noreturn
+ keyword optional to ease transition.
check for pcre-posix library to help with MinGW port.
+revised option also controls whether $LDFLAGS
+ from the build is provided in “-config”
+ and “.pc” files.
add configure option which tells ncurses to disallow most + file-opens by setuid processes.
+help work around problems building fallback source using - pre-6.0 tic/infocmp.
+changed default to help packagers who reuse wide ncursesw + header file with non-wide ncurses library.
option value can now be a relative pathname.
+revised option uses the actual search path from + pkg-config or pkgconf using the output from + --debug.
+new several --with-xxx-libname options, + to help with pkgsrc
ignore $TERMINFO - as a default value in configure script if it came from the - infocmp -Q option.
+add a special case in the configure script to work around + one of the build-time breakages reported for OpenBSD 6 here:
+ +++ https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
+
distinguish gcc from icc and clang when the - --enable-warnings option is not used, to avoid - unnecessary warnings about unrecognized inline options
+modify configure check for libtool to prevent + accidental use of an OpenBSD program which uses the same + name.
consistently prepend new libraries as they are found - during configuration, rather than relying upon the linker to - resolve order dependencies of libraries.
+modify configuration checks for build-time tic/infocmp to + use AC_CHECK_TOOL. That can still be overridden by + --with-tic-path and --with-infocmp-path + when fallbacks are used, but even if not using fallbacks, the + improved check may help with cross-compiling.
modified configure scripts to reduce relinking/ranlib - during library install :
- -relax modification-time comparison in + CF_LINK_FUNCS to allow it to accept link() function + with NFS filesystems which change the mtime on the link + target, e.g., several BSD systems.
add configure check for getenv to work around - implementation shown in Emscripten which overwrites the - previous return value on each call.
- -Use that to optionally suppress START_TRACE - macro, whose call to getenv may not work - properly
+modify configure check for c89/c99 aliases of + clang to use its -std option instead, + because some platforms, in particular macOS, do not provide + workable c89/c99 aliases.
change target configure level for _XOPEN_SOURCE - to 600 to address use of vsscanf and - setenv.
+modify CF_NCURSES_CONFIG to work around + Xcode's c99 "-W" option, which conflicts with + conventional use for passing linker options.
reduce use of _GNU_SOURCE for current glibc where - _DEFAULT_SOURCE combines with - _XOPEN_SOURCE
+modify configure scripts to filter out redefinitions of + _XOPEN_SOURCE, e.g., for NetBSD which generally supports 500, + but 600 is needed for ncursesw.
+Allow for Cygwin's newlib when checking for the - _DEFAULT_SOURCE symbol.
+Here are some of the other portability fixes:
-MidnightBSD is now checked for the - _XOPEN_SOURCE-related definitions.
+change configure-check and source-code for gcc's noreturn + attribute to assume it is a prefix rather than suffix, + matching c11's _Noreturn convention.
If the check for va_copy or __va_copy - fails,
- -modify mk-1st.awk to account for extra-suffix configure + option.
several changes to support a port to Ultrix 3.1:
- -build-fix for termsort module when configured with + termcap.
The test/configure script (used for ncurses-examples) - is improved:
- -modify configure script and makefiles to support ".PHONY" + make program feature.
Here are some of the other portability fixes:
- -added dummy "check" rule in top-level and test-Makefile to - simplify building test-packages for ArchLinux.
+amend libtool configuration to add dependency for + install.tic, etc., in ncurses/Makefile on the lower-level + libraries.
dropped library-dependency on psapi for MinGW port, since - win_driver.c defines PSAPI_VERSION to 2, making it - use GetProcessImageFileName from kernel32.dll
+modify Ada95 source-generation utility to write to a file + given as parameter rather than to the standard output, + allowing builds with MinGW.
made build-fixes for configuration using --program-suffix - with Ada95, noticed with MacOS but applicable to other - platforms without libpanelw, etc.
+amend tic/infocmp check to allow for the respective tool's + absence.
modified ncurses/Makefile.in to fix a case where - Debian/testing changes to the ld --as-needed configuration - broke ncurses-examples test packages.
+build-fixes for gnat 10.1.1, whose gnatmake drops + integration with gprbuild.
used _WIN32/_WIN64 in preference to - __MINGW32__/__MINGW64__ symbols to simplify - building with Microsoft Visual C++, since the former are - defined in both compiler configurations.
+correct configure version-check/warning for g++ to allow + for 10.x
The API is 8-bit clean and base-level conformant with the X/OPEN curses specification, XSI curses (that is, it - implements all BASE level features, and most EXTENDED - features). It includes many function calls not supported - under SVr4 curses (but portability of all calls is documented - so you can use the SVr4 subset only).
+ implements all BASE level features, and most + EXTENDED features). It includes many function calls + not supported under SVr4 curses (but portability of all calls + is documented so you can use the SVr4 subset only).Support for direct-color terminals, such as modern + xterm.
+Support for 256-color terminals, such as modern xterm.
The library meets the XSI requirement that every macro
- entry point have a corresponding function which may be linked
+ entry point has a corresponding function which may be linked
(and will be prototype-checked) if the macro definition is
disabled with #undef
.
a replacement for ssh
.
Ongoing development work is done by Thomas E. Dickey. Thomas E. Dickey has acted as the maintainer for the Free Software - Foundation, which holds a copyright on ncurses for releases 4.2 through 6.1. Following the release of ncurses 6.1, effective as of release 6.2, copyright for ncurses reverted to @@ -2026,7 +1680,6 @@ diff --git a/st.info b/st.info "mailto:bug-ncurses-request@gnu.org">bug-ncurses-request@gnu.org containing the line: -
@@ -2050,10 +1703,10 @@ diff --git a/st.info b/st.info
subscribe
<name>@<host.domain>ftp://ftp.invisible-island.net/ncurses/6.1/ + "ftp://ftp.invisible-island.net/ncurses/6.2/">ftp://ftp.invisible-island.net/ncurses/6.2/ and
+ "https://invisible-mirror.net/archives/ncurses/6.2/">https://invisible-mirror.net/archives/ncurses/6.2/ .
https://invisible-mirror.net/archives/ncurses/6.1/ .There is an archive of the mailing list here:
@@ -2082,6 +1735,9 @@ diff --git a/st.info b/st.info ncurses versus slang (S-Lang) +Comments on + OpenBSD +tack – terminfo action checker @@ -2118,11 +1774,9 @@ diff --git a/st.info b/st.infoRelease Notes -
- Library improvements -
-+ +
- New features
@@ -2133,7 +1787,6 @@ diff --git a/st.info b/st.info- Program improvements -
@@ -379,102 +255,42 @@
- Utilities
@@ -2149,7 +1802,6 @@ diff --git a/st.info b/st.info- Configuration changes -
- Major changes
diff --git a/dist.mk b/dist.mk index 40f835df..1af7c16d 100644 --- a/dist.mk +++ b/dist.mk @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1442 2021/10/18 23:31:58 tom Exp $ +# $Id: dist.mk,v 1.1444 2021/10/20 22:43:08 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,8 +37,8 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 -NCURSES_MINOR = 2 -NCURSES_PATCH = 20211018 +NCURSES_MINOR = 3 +NCURSES_PATCH = 20211021 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/doc/html/ada/terminal_interface-curses_constants__ads.htm b/doc/html/ada/terminal_interface-curses_constants__ads.htm index d9489631..d0d54ddd 100644 --- a/doc/html/ada/terminal_interface-curses_constants__ads.htm +++ b/doc/html/ada/terminal_interface-curses_constants__ads.htm @@ -36,8 +36,8 @@ -- Version of the ncurses library from extensions(3NCURSES) NCURSES_VERSION_MAJOR : constant := 6; - NCURSES_VERSION_MINOR : constant := 2; - Version : constant String := "6.2"; + NCURSES_VERSION_MINOR : constant := 3; + Version : constant String := "6.3"; -- Character non-color attributes from attr(3NCURSES) diff --git a/doc/html/announce.html b/doc/html/announce.html index 69937201..a6040c45 100644 --- a/doc/html/announce.html +++ b/doc/html/announce.html @@ -1,7 +1,7 @@ - - -Announcing ncurses 6.2 + "HTML Tidy for HTML5 for Linux version 5.6.0"> +Announcing ncurses 6.3 @@ -57,9 +55,8 @@ } - -Announcing ncurses 6.2
+Announcing ncurses 6.3
Overview
@@ -103,38 +100,33 @@ including-
- - captoinfo, a termcap conversion tool
+- captoinfo, a termcap conversion + tool
-- - clear, utility for clearing the screen
+- clear, utility for clearing the + screen
-- - infocmp, the terminfo decompiler
+- infocmp, the terminfo decompiler
-- - tabs, set tabs on a terminal
+- tabs, set tabs on a terminal
-- - tic, the terminfo compiler
+- tic, the terminfo compiler
-- - toe, list (table of) terminfo entries
+- toe, list (table of) terminfo + entries
-- - tput, utility for retrieving terminal capabilities - in shell scripts
+- tput, utility for retrieving terminal + capabilities in shell scripts
-- - tset, to initialize the terminal
+- tset, to initialize the terminal
Full manual pages are provided for the library and tools.
@@ -163,10 +155,10 @@ NotesThese notes are for ncurses - 6.2, released February 12, 2020.
+ 6.3, released October 21, 2021.This release is designed to be source-compatible with - ncurses 5.0 through 6.1; providing + ncurses 5.0 through 6.2; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is @@ -178,47 +170,28 @@ this announcement.
The most important - bug-fixes/improvements dealt with user-defined capabilities - in terminal descriptions. The release notes also mention some - other bug-fixes, but are focused on new features and improvements - to existing features since ncurses - 6.1 release.
+ bug-fixes/improvements dealt with portability issues. The + release notes also mention some other bug-fixes, but are focused + on new features and improvements to existing features since + ncurses 6.2 release.Library improvements
New features
-There are several new features:
+There are a few new features:
@@ -227,74 +200,16 @@
- -
- -- O_EDGE_INSERT_STAY tells the form library to optionally - delay cursor movement on a field edge/boundary
-- -
- O_INPUT_FIELD extension to form library allows a dynamic - field to shrink if the new limit is smaller than the current - field size.
+A new (experimental) driver, for the Windows Terminal + configuration is provided.
- -
- -added - exit_curses and - exit_terminfo to replace internal symbols for - leak-checking.
-- -
added - curses_trace, to replace trace().
+A script is provided which enables OpenBSD users to + upgrade their system to use ncurses 6.3 (OpenBSD developers + are also invited to do this).
@@ -304,74 +219,35 @@
- -
- -mouse decoding now handles shift/control/alt logic when - decoding xterm's 1006 mode
-- -
- -ncurses now defines a limit for - wgetnstr, - wgetn_wstr when length is negative or “too - large”.
-- reordered loop-limit checks in winsnstr - in case the string has no terminating null and only the number - of characters is used.
- -- -
- -there is now no buffer-size limit when reading the - - $TERMCAP variable.
-- -
the - $TERMCAP variable may be interpreted as a - fallback to a terminfo entry
+modify lib_mouse.c to check for out-of-range button + numbers, convert those to position reports.
- -
- -- mvcur now decides whether to use hard-tabs, - using xt, - tbc and - hts as clues.
-- -
- -extended colors are improved by modifying an internal call - to - vid_puts to pass extended color pairs e.g., from - tty_update.c and lib_mvcur.c
-- -
- -the initialization functions now avoid - relying upon persistent data for the result from getenv
-- -
scrolling is improved:
- --
+- a limit check in newline_forces_scroll handles - the case where the row is inside scroll-margins, but not at - the end.
- -- -
-improved loop limits in _nc_scroll_window - handle a case where the scrolled data is a pad which is - taller than the window.
-add sp-funcs for + erasewchar, + killwchar.
These are revised features:
-
- -
- -used “const” in some prototypes - rather than NCURSES_CONST where X/Open Curses was - updated to do this, e.g., wscanw, newterm, - the terminfo interface. Also use “const” - for consistency in the termcap interface, which was withdrawn - by X/Open Curses in Issue 5 (2007). As of Issue 7, X/Open - Curses still lacks “const” for certain - return values, e.g., - keyname.
-- -
- -modified - wbkgd and - wbkgrnd to improve compatibility with SVr4 - curses, changing the way the window rendition is updated when - the background character is modified
-- -
- -improved terminfo write/read by modifying the fourth item - of the extended header to denote the number of valid strings - in the extended string table (see - term(5)).
-- -
+modified the initialization checks for mouse so that the - xterm+sm+1006 - block will work with terminal descriptions not mentioning - xterm.
-- 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:
- -
+deprecated safe-sprintf, - since the vsnprintf function, which does what was - needed, was standardized long ago.
-mark wgetch-events feature as deprecated.
-- -
+marked - vwprintw and vwscanw as deprecated; - recommend using - vw_printw and vw_scanw, - respectively.
-+
- +
-prevent KEY_EVENT from appearing in + curses.h unless the configure option +
+--enable-wgetch-events
is used.- -
added deprecation warnings for internal functions called - by older versions of tack.
+- +
+modify MKkey_defs.sh to hide ncurses' + definition of KEY_EVENTS to reduce Visual + Studio C++ redefinition warnings.
+- -
removed unused _nc_import_termtype2 function.
+reduce build-warnings by excluding ncurses-internals from + deprecation warnings.
@@ -482,38 +298,18 @@
- -
- -check parameter of - set_escdelay, return ERR if negative.
-- -
- -check parameter of - set_tabsize, return ERR if not greater than zero
-- -
- -correct a status-check in _nc_read_tic_entry() so that if - reading a hex/b64 - $TERMINFO, and the - $TERM does not match, fall-through to the - compiled-in search list.
-- -
- -amend check for - repeat_char to handle a case where setlocale() - was called after - initscr
-- -
- -move macro for - is_linetouched inside - NCURSES_NOMACROS - ifndef.
-- -
- -use _nc_copy_termtype2 rather than direct - assignment in - setupterm, in case it is called repeatedly using fallback - terminfo descriptions
-- -
improve workaround for Solaris wcwidth versus line-drawing - characters
+drop symbols GCC_PRINTF and GCC_SCANF + from <curses.h>, to simplify use.
- -
add checks in - repair_subwindows to keep the current position - and scroll-margins inside the resized subwindow.
+apply gcc format attribute to prototypes which use a + va_list parameter rather than a “...” + variable-length parameter list.
- -
correct a buffer-limit in write_entry.c for - systems that use caseless filenames.
+modify <term.h> so that it is not necessary to + include <curses.h> before <term.h>.
- -
improved build-time utility report_offsets:
- --
+- -
- -add categories, e.g., "w" for wide-character, "t" for - threads to make the report more readable. Reorganized the - structures reported to make the categories more - apparent.
-- -
-add NCURSES_GLOBALS and - NCURSES_PRESCREEN to report to show how similar - the different libtinfo configurations are.
-provide for wide-characters as background character in + wbkgrnd
- -
modified some header files to ensure that those include - necessary files except for the previously-documented - cases
+improve parameter-checking for tparm, adding function + _nc_tiparm() to handle the most-used case, which accepts only + numeric parameters.
- -
added some traces in initialization to show whether a - fallback entry is used.
+use return-value from vsnprintf to reallocate as + needed to allow for buffers larger than the screen size.
- -
made minor optimization to reduce calls to - _nc_reserve_pairs
+add another fflush(stdout) in _nc_flush + to handle time-delays in the middle of strings such as flash + when the application uses low-level calls rather than + curses.
@@ -524,169 +320,178 @@ utility programs:
- -
fix a special case in PutAttrChar where a cell is - marked as alternate-character set, but the terminal does not - actually support the given graphic character. This would - happen in an older terminal such as vt52, which - lacks most line-drawing capability.
+add a check to guard against repeat_char emitting + digits which could be interpreted as BSD-style padding when + --enable-bsdpad is configured.
- -
- -corrected flag for "seq" method of db 1.8.5 interface, - needed by toe on some of the BSDs.
-- -
- -modify comparison in make_hash.c to correct a special case - in collision handling for Caps-hpux11
-- -
- -add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files
-- -
- -modify lib_setup to avoid calling pthread_self() without - first verifying that the address is valid, i.e., for weak - symbols
-- -
add a couple of broken-linker symbols to the list of - versioned symbols to help with link-time optimization versus - weak symbols.
+check for screen size-change in scr_init and + scr_restore, in + case a screen dump does not match the current screen + dimensions
-
- clear +
- tabs
- -
-
- improved logic for clearing with the E3 - extension, in case the terminal scrolls content onto its - saved-lines before actually clearing the display, by - clearing the saved-lines after clearing the display
+- +
implement “+m” option
+- infocmp +
- tic
- +
-
-- omit filtering of “OTxx” names - which are used for obsolete capabilities, when the output - is sorted by long-names. This change helps when making a - table of the short/long capability names.
-- +
-add check for duplicate “use=” + clauses.
+- tic -
+- +
-add check to report instances where tparm + would detect an error in an expression.
+- -
+-
-- added check for consistent alternate character set - capabilities.
+- +
-add user-defined capabilities from mintty to + Caps-ncurses, for checking consistency.
+- added check for paired indn/rin.
+- +
-improve warning when oc/op do not mention SGR 39/49 + for xterm compatible
+XT
flag.- added check for terminals with parm_dch vs - parm_ich.
+- +
-improve checks for number of parameters of +
+smglp
,smgrp
, +smgtp
, andsmgbp
.- added check for the case where - setf/setb are given using different - strings, but provide identical results to - setaf/setab.
+- +
-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.
+- corrected check for ich1.
+- +
-improve check for errors detected in +
+tparm
.- changed a too-large terminal entry from a fatal error - to a warning.
-- +
-improve format of output, to ensure that the messages + contain only printable text.
+- toe -
+- +
-modify to eliminate unnecessary + “
+\
” to escape + “:
” in terminfo format.- -
--
- ignores any hex/b64 $TERMINFO value in the - list of terminfo databases.
+- +
remove check that assumes that none or both + parameterized and non-parameterized margin-setting + capabilities are present.
+- tset +
- toe
- -
-
- replace check in reset - command for obsolete “pt” capability - using tbc and hts capabilities as - clues
- -- modify reset to allow - for tabstops at intervals other than 8.
- -- change reset's behavior - for margins to simply clear soft-margins if possible, - rather than clearing and then setting them according to the - terminal's width.
+- +
+ +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.
+- tput +
- tput
- - - -
-
-- add “x” to getopt string - so that “tput -x clear” - works.
-Several changes were made to the generated ncurses*config - scripts and the analogous “.pc” files to - reduce differences between the configurations they report:
+- +
-modify to allow multiple commands per line.
+-
+- -
+modified the ncurse*-config and pc-files to more closely - match for the -I and -l options.
-- +
-improve parameter-checking by analyzing all extended + string capabilities, e.g., as used in the
+Cs
+ andMs
capabilities of the tmux + description.- -
+filtered out linker-specs from the --libs - report.
-- +
-make warning messages consistently using alias names + when those are used, rather than the underlying program's + name.
+- -
+amended the ncurses*-config and pc-files to take into - account the rpath hack which differed between those - files.
-- +
-improve usage message for aliases such as + clear, by eliminating tput-specific + portions.
+- -
-modified generated ncurses*config and ncurses.pc, - ncursesw.pc, etc., to list helper libraries such as gpm for - static linking.
-- +
+modify initialization to avoid opening + /dev/tty for cases other than + reset/init, e.g., for clear.
+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 + "https://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples. Most of + this activity aimed at improving the test-packages. A few changes + are more generally useful, e.g., for the main ncurses test-program, and for analyzing traces using the tracemunch script:
@@ -694,136 +499,131 @@ examples:
- -
improve recovery from error when reading command-character - in test/ncurses.c, showing the relevant error - message and not exiting on EINTR.
+add “-r” option to the dots + test-programs, to help with scripting a performance + comparison.
- -
improve tracemunch, by keeping track of - TERMINAL* values, and if tracing was first turned on - after initialization, attempt to show distinct screen, window - and terminal names anyway.
+build-fix for test_opaque, for configurations + without opaque curses structs, e.g., ncurses 5.7.
- -
modify tracemunch to accept filename parameters - in addition to use as a pipe/filter.
+improve tracemunch logic for "RUN" + compaction.
- -
update tracemunch to work with perl - 5.26.2, which changed the rules for escaping regular - expressions.
+improve tracemunch's coverage of form/menu/panel + libraries.
- -
add some checks in tracemunch for undefined - variables.
+improve tracemunch's checking/reporting the type + for the first parameter, e.g., "WINDOW*" rather than + "#1".
- -
modify TurnOn/TurnOff macros (in - lib_vidattr.c and lib_vid_attr.c) to avoid expansion of - “CUR” in trace.
+modify tracemunch and the panel library to show + readable traces for panel- and user-pointers.
-
-- color_content -
- -- Demonstrate the color_content and - extended_color_content functions.
- -- demo_tabs -
- -- A simple demo of tabs in curses.
- -- dump_window -
- -- A portable curses screen-dump, used to compare ncurses - screen contents with Solaris.
- -- pair_content +
- back_ground
-- Demonstrate the pair_content and - extended_pair_content functions.
+- to exercise the wide-character background functions.
-- report_hashing +
- move_field
-- Check hash-tables used for terminfo and termcap names.
+- to demonstrate move_field, and a stub + for a corresponding demo of dup_field.
-- parse_rgb +
- test_tparm
-- Sample implementation of the ncurses RGB extension from - user_caps.5, - used in picsmap and savescreen programs.
+- for checking tparm changes.
A variety of improvements were made to existing programs, both - new features as well as options added to make the set of programs - more consistent.
- --
-- -
- -add “-l” option to test/background, - to dump screen contents in a form that lets different curses - implementations be compared.
-- -
- -add “@” command to test/ncurses - F-test, to allow rapid jump to different character pages.
-- -
- -added enum, regex examples to test/demo_forms
-- -
- -amend Scaled256() macro in test/picsmap.c to cover the - full range 0..1000
-- -
- -corrected pathname used in Ada95 sample programs for - explain.txt, to work with test-packages, and used an - awk script to split the resulting pathname when it would be - too long for a single line.
-- -
- -ignore interrupted system-call in test/ncurses's - command-line, e.g., if the terminal were resized.
-- -
-improved ifdef's for TABSIZE variable, to help - with AIX/HPUX ports.
-Terminal database
There are several new terminal descriptions:
-alacritty, domterm, kitty, - mintty, mintty-direct, ms-terminal, - n7900, nsterm-build309, - nsterm-direct, screen5, ti703, - ti707, ti703-w, ti707-w - vscode, vscode-direct, xterm-mono, - xterm.js
+absolute, + att610+cvis, + foot, + foot-direct, + hp98550-color, + hpterm-color2, + hterm, + hterm-256color, + linux-s, + putty+keypad, + putty+screen, + putty-screen, + screen.linux-s, + scrt/securecrt, + tmux-direct, + vt220+cvis, + vt220+cvis8, + vt220+pcedit, + vt220+vtedit, + vt220-base, + vt52+keypad, + xterm+256color2, + xterm+88color2, + xterm-direct16, + xterm-direct256, + xterm+nofkeys, + and xterm+nopcfkeys.
There are many changes to existing terminal descriptions. Some were updates to several descriptions:
-
- use ansi+rep - in a dozen places
- -- add rs1 to konsole, mlterm
- -- improve several flash capabilities with trailing mandatory - delays
+- correct use-ordering in some xterm-direct + flavors
+ +- fix some sgr inconsistencies in d230c, ibm6153, + ibm6154, + ncrvt100an
-- drop ich1 from rxvt-basic, Eterm - and mlterm to improve compatibility with old - non-curses programs
+- improve vt50h and vt52 based on + DECScope manual
-- add/use xterm+keypad - in xterm-new
+- use hp+arrows in a + few places
- use xterm+sl-twm - for consistency, nine places
+ "https://invisible-island.net/ncurses/terminfo.src.html#tic-hp_pfk-cr">hp+pfk-cr in a + few places- improve xm example in xterm+x11mouse - and xterm+sm_1006.
+- use vt220+cvis in + st, terminology, termite since they + ignore blinking-cursor detail in att610+cvis
while others affected specific descriptions. These were retested, to take into account changes by their developers:
-terminator, st
+kitty+common, + mlterm3, + ms-terminal
while these are specific fixes based on reviewing @@ -832,156 +632,133 @@
- adds200:
+ "https://invisible-island.net/ncurses/terminfo.src.html#tic-aaa_dec">aaa+dec, + aaa+rv
A few entries use extensions (user-defined terminal capabilities):
fills in overlooked descriptions of features which were - described in the NEWS - file but treated sketchily in manual pages.
+ described in the NEWS file + but treated sketchily in manual pages. @@ -1016,95 +792,67 @@Corrections:
make opts extension for getcchar + work as documented for ncurses + 6.1, adding “-g” flag to + demo_new_pair to illustrate.
+modify tset + “-q” option to refrain from modifying + terminal modes, to match the documentation.
+Clarify in manual pages that
- vwprintw and
- vwscanw are obsolete.
- They have not been part of X/Open Curses since 2007.
New/improved history and portability sections:
improve documentation for + tparm and static/dynamic variables.
+Improvements for user_caps.5:
+add history note to curs_scanw.3x + for <stdarg.h> and <varargs.h>
+add history note to curs_printw.3x + for <stdarg.h> and <varargs.h>
+add portability note to ncurses.3x + regarding <stdarg.h>
+add historical notes to tput, + + curses-terminfo and curses-color + manpages based on source-code for SVr2, SVr3 and + SVr4.
+improve history section for tset manpage + based on the 1BSD tarball, which preceded BSD's SCCS + checkins by more than three years.
+Other improvements:
explain in + ncurses.3x that functions in the tinfo library do not + rely upon wide-characters.
+improve manual page for panel + library, extending the portability section as well as + documenting error-returns.
+add section on margins to terminfo.5, + adapted from X/Open Curses.
+improve man/term.5 + section on legacy storage format.
+add a note in + terminfo.5 explaining that no-parameter strings such + as sgr0 or cnorm + should not be used with tparm.
+improve description of BSD-style padding in curs_termcap.3x
+improve discussion of padding versus tparm + and tputs in + man/curs_terminfo.3x
+add a note in manual page to explain + ungetch vs unget_wch.
+improve description of error-returns in waddch + and waddnstr + manual pages.
+Some of the improvements are more subtle, relating to the way - the information is presented. For instance, the generated - terminfo.5 file uses a different table layout, allowing it to use - space on wide terminals more effectively.
+ the information is presented. For instance, hyphenation is + suppressed in the HTML files generated from manual pages because + an upgrade to groff gave noticeably poorer results, + interfering with the process of creating links between the + resulting webpages.While there were many bugs fixed during development of ncurses - 6.2, only a few (the reason for this release) were both important + 6.3, only a few (the reason for this release) were both important and interesting. Most of the bug-fixes were for local issues which did not affect compatibility across releases. Since those - are detailed in the NEWS file no elaboration is needed here.
+ are detailed in the NEWS file no elaboration is + needed here. -The interesting bugs were in tic/infocmp's handling of - user-defined capabilities. These were not recent bugs. Initially - it was a simple problem:
+The interesting bugs were:
One of simpleterm's contributors copied some definitions - for using tmux's user-defined capabilities in +
modify wbkgd and - late in 2016.
+ "https://invisible-island.net/ncurses/man/curs_bkgrnd.3x.html#h3-bkgrnd">wbkgrnd to + avoid storing a null in the background character, because it + may be used in cases where the corresponding 0x80 is not + treated as a null. ----diff --git a/st.info b/st.info -@@ -185,7 +185,10 @@ st| simpleterm, - tsl=\E]0;, - xenl, - vpa=\E[%i%p1%dd, -- -+# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -+ Se, -+ Ss, -+ Tc, - - st-256color| simpleterm with 256 colors, - use=st, --
Later, in (referring to a version from - mid-2017), a user asked to have it updated in - ncurses.
+This was a regression introduced in ncurses 6.2 (reported + on the mailing list), for which the workaround was to specify + a blank for the background character.
However, it had an error from the change in late 2016. The - terminal description made what tmux expected to be - string actually a - boolean.
- -Over the years, there were problems with each of - simpleterm's terminal descriptions. I repaired those, and - usually dealt with the problem.
-The difference in this case was that when compiling the - terminal database, tic may have in memory the - definitions for more than one terminal description (so that - it can resolve “use=” clauses). Seeing - two different types for the same name, in certain situations - it would incorrectly merge the symbol tables for the two - terminal descriptions.
-On simpleterm's side, their bug was finally fixed in +
remove output-related checks for nl/nonl (also - late 2019, three years after the bug was created.
-For ncurses, the elapsed time to fix this bug was less than - three years. Someone reported a problem with the terminal - description a few weeks after releasing ncurses 6.1 (in tmux #1264), and - the terminal description was updated that week (ncurses patch - 20180224):
- --- --20180224 - + modify _nc_resolve_uses2() to detect incompatible types when merging - a "use=" clause of extended capabilities. The problem was seen in a - defective terminfo integrated from simpleterm sources in 20171111, - compounded by repair in 20180121. - + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD --
The larger part of that change added a check to prevent a - simple merge of terminal descriptions where the same user-defined - name was used with different types. But it raised some - questions:
- -Was there a reliable way to manage terminal descriptions - which used the same extended name in different ways?
+ "https://lists.gnu.org/archive/html/bug-ncurses/2020-09/msg00018.html"> + reported on the mailing list).Should ncurses provide a registry of well-known extended - names, with their types?
-Since the correction to - terminfo.src could have been readily adopted by - packagers, there was nothing more to be done from ncurses' - standpoint on that part. But improving ncurses to prevent issues - like that is the reason for making a release.
+improve tparm implementation of %P and + %g, more closely matching SVr4 terminfo. Those + denote static and dynamic variables in + terminfo expressions.
-Nothing more (constructive) was mentioned with regard to - simpleterm. But a few problems were found in the handling of - user-defined capabilities:
- -Forward-references to user-defined capabilities in a - “use=” clause did not allocate new data - for each use. In tic, successive compilation of - terminal entries could add user-defined capabilities to the - wrong terminal entry.
- -This was not noticed before, since xterm's terminal - descriptions were the main users of the feature, and almost - all of the uses of the building-blocks which contained - user-defined capabilities were backward-references.
-There is one (documented) case where ncurses 6.1 supports - a user-defined capability that could be any type (i.e., - “RGB”). The check added in February 2018 to guard - against mismatches did not handle all of the combinations - needed.
+Exactly what those terms meant was never documented before + in any implementation of curses, aside from source code. + Unlike the other two fixes, the problem was discovered while + studying OpenBSD's version of tset.
Both of these issues dated from the original implementation of - user-defined capabilities. Fixing them does not change the - terminal database, but a older tic without the fixes - will not be able to handle terminfo sources which rely upon those - fixes. Starting in June 2019, the download link for the terminfo - source file was capped at that date. The development sources have - an up-to-date copy of the file, for people with a legitimate need - for it.
- -The “-c” (check) option of tic - is not very useful if it cannot offer advice on parameters needed - for user-defined capabilities. The various Caps files - were reorganized to reduce redundancy, and in the common portion - (Caps-ncurses), - a registry of user-defined capabilities is provided for use by - tic. While users can still define their own custom - capabilities, tic will not offer any advice when their - parameters do not match.
- -In ncurses 6.2, tic makes a special check to allow - any type for RGB, but its being able to do this relies - upon fixes made in the ncurses library in mid-2019.
-There are a few new/modified configure options:
helps work around a filename conflict with Debian packages - versus test-packages.
+new configure option and check for gcc + -fvisibility=hidden feature
allows one to rename the “AdaCurses” library - (at least one packager prefers a lowercase name).
+corrected to allow turning leak-checking off later in a + set of options.
now ensures there is a value, and adds the fallback - information to top-level Makefile summary.
+new configure option makes the _Noreturn
+ keyword optional to ease transition.
check for pcre-posix library to help with MinGW port.
+revised option also controls whether $LDFLAGS
+ from the build is provided in “-config”
+ and “.pc” files.
add configure option which tells ncurses to disallow most + file-opens by setuid processes.
+changed default to help packagers who reuse wide ncursesw + header file with non-wide ncurses library.
+help work around problems building fallback source using - pre-6.0 tic/infocmp.
+revised option uses the actual search path from + pkg-config or pkgconf using the output from + --debug.
option value can now be a relative pathname.
+new several --with-xxx-libname options, + to help with pkgsrc
ignore $TERMINFO - as a default value in configure script if it came from the - infocmp -Q option.
+add a special case in the configure script to work around + one of the build-time breakages reported for OpenBSD 6 here:
+ +++ https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
+
distinguish gcc from icc and clang when the - --enable-warnings option is not used, to avoid - unnecessary warnings about unrecognized inline options
+modify configure check for libtool to prevent + accidental use of an OpenBSD program which uses the same + name.
consistently prepend new libraries as they are found - during configuration, rather than relying upon the linker to - resolve order dependencies of libraries.
+modify configuration checks for build-time tic/infocmp to + use AC_CHECK_TOOL. That can still be overridden by + --with-tic-path and --with-infocmp-path + when fallbacks are used, but even if not using fallbacks, the + improved check may help with cross-compiling.
modified configure scripts to reduce relinking/ranlib - during library install :
- -relax modification-time comparison in + CF_LINK_FUNCS to allow it to accept link() function + with NFS filesystems which change the mtime on the link + target, e.g., several BSD systems.
add configure check for getenv to work around - implementation shown in Emscripten which overwrites the - previous return value on each call.
- -Use that to optionally suppress START_TRACE - macro, whose call to getenv may not work - properly
+modify configure check for c89/c99 aliases of + clang to use its -std option instead, + because some platforms, in particular macOS, do not provide + workable c89/c99 aliases.
change target configure level for _XOPEN_SOURCE - to 600 to address use of vsscanf and - setenv.
+modify CF_NCURSES_CONFIG to work around + Xcode's c99 "-W" option, which conflicts with + conventional use for passing linker options.
reduce use of _GNU_SOURCE for current glibc where - _DEFAULT_SOURCE combines with - _XOPEN_SOURCE
+modify configure scripts to filter out redefinitions of + _XOPEN_SOURCE, e.g., for NetBSD which generally supports 500, + but 600 is needed for ncursesw.
+Allow for Cygwin's newlib when checking for the - _DEFAULT_SOURCE symbol.
+Here are some of the other portability fixes:
-MidnightBSD is now checked for the - _XOPEN_SOURCE-related definitions.
+change configure-check and source-code for gcc's noreturn + attribute to assume it is a prefix rather than suffix, + matching c11's _Noreturn convention.
If the check for va_copy or __va_copy - fails,
- -modify mk-1st.awk to account for extra-suffix configure + option.
several changes to support a port to Ultrix 3.1:
- -build-fix for termsort module when configured with + termcap.
The test/configure script (used for ncurses-examples) - is improved:
- -modify configure script and makefiles to support ".PHONY" + make program feature.
Here are some of the other portability fixes:
- -added dummy "check" rule in top-level and test-Makefile to - simplify building test-packages for ArchLinux.
+amend libtool configuration to add dependency for + install.tic, etc., in ncurses/Makefile on the lower-level + libraries.
dropped library-dependency on psapi for MinGW port, since - win_driver.c defines PSAPI_VERSION to 2, making it - use GetProcessImageFileName from kernel32.dll
+modify Ada95 source-generation utility to write to a file + given as parameter rather than to the standard output, + allowing builds with MinGW.
made build-fixes for configuration using --program-suffix - with Ada95, noticed with MacOS but applicable to other - platforms without libpanelw, etc.
+amend tic/infocmp check to allow for the respective tool's + absence.
modified ncurses/Makefile.in to fix a case where - Debian/testing changes to the ld --as-needed configuration - broke ncurses-examples test packages.
+build-fixes for gnat 10.1.1, whose gnatmake drops + integration with gprbuild.
used _WIN32/_WIN64 in preference to - __MINGW32__/__MINGW64__ symbols to simplify - building with Microsoft Visual C++, since the former are - defined in both compiler configurations.
+correct configure version-check/warning for g++ to allow + for 10.x
The ncurses utilities have options to allow you to filter terminfo entries for use with less capable curses/terminfo versions such - as the HP/UX and AIX ports.
+ as the HP-UX and AIX ports. @@ -1646,10 +1266,10 @@ diff --git a/st.info b/st.infoThe API is 8-bit clean and base-level conformant with the X/OPEN curses specification, XSI curses (that is, it - implements all BASE level features, and most EXTENDED - features). It includes many function calls not supported - under SVr4 curses (but portability of all calls is documented - so you can use the SVr4 subset only).
+ implements all BASE level features, and most + EXTENDED features). It includes many function calls + not supported under SVr4 curses (but portability of all calls + is documented so you can use the SVr4 subset only).Support for direct-color terminals, such as modern + xterm.
+Support for 256-color terminals, such as modern xterm.
The - tic/captoinfo - utility provided with ncurses - has the ability to translate many termcaps from the XENIX, - IBM and AT&T extension sets.
+The tic/captoinfo utility + provided with ncurses has the + ability to translate many termcaps from the XENIX, IBM and + AT&T extension sets.
A BSD-like - tset utility is provided.
+ "https://invisible-island.net/ncurses/man/tset.1.html">tset utility is provided.The table-of-entries utility - toe makes it easy for users to see exactly what - terminal types are available on the system.
+ "https://invisible-island.net/ncurses/man/toe.1m.html">toe makes it easy for users to see + exactly what terminal types are available on the system.The library meets the XSI requirement that every macro
- entry point have a corresponding function which may be linked
+ entry point has a corresponding function which may be linked
(and will be prototype-checked) if the macro definition is
disabled with #undef
.
Extensive documentation is provided (see the - Additional Reading section of the - ncurses FAQ for online documentation).
+ "https://invisible-island.net/ncurses/ncurses.faq.html#additional_reading">Additional + Reading section of the ncurses FAQ for online + documentation).Curses Development Kit
-directory-editor
- +https://invisible-island.net/dialog/
+https://invisible-island.net/dialog/
a replacement for ssh
.
terminfo action checker
- +vi-like-emacs may be built to use the terminfo, termcap or curses interfaces.
-https://invisible-island.net/vile/
+https://invisible-island.net/vile/
@@ -2041,13 +1659,13 @@ diff --git a/st.info b/st.infoOngoing development work is done by Thomas E. Dickey. Thomas E. Dickey has acted as the maintainer for the Free Software - Foundation, which holds a copyright - on ncurses for releases 4.2 through 6.1. Following the - release of ncurses 6.1, effective as of release 6.2, copyright - for ncurses reverted to Thomas E. Dickey (see the - ncurses FAQ for additional information).
+ Foundation, which held a copyright on ncurses for + releases 4.2 through 6.1. Following the release of ncurses 6.1, + effective as of release 6.2, copyright for ncurses reverted to + Thomas E. Dickey (see the ncurses FAQ for + additional information).Contact the current maintainers at
@@ -2062,7 +1680,6 @@ diff --git a/st.info b/st.info "mailto:bug-ncurses-request@gnu.org">bug-ncurses-request@gnu.org containing the line: -@@ -2086,10 +1703,10 @@ diff --git a/st.info b/st.info
subscribe
<name>@<host.domain>ftp://ftp.invisible-island.net/ncurses/6.1/ + "ftp://ftp.invisible-island.net/ncurses/6.2/">ftp://ftp.invisible-island.net/ncurses/6.2/ and
+ "https://invisible-mirror.net/archives/ncurses/6.2/">https://invisible-mirror.net/archives/ncurses/6.2/ .
https://invisible-mirror.net/archives/ncurses/6.1/ .There is an archive of the mailing list here:
@@ -2108,30 +1725,28 @@ diff --git a/st.info b/st.info which may be interesting by themselves:-
- - ncurses licensing
+- ncurses licensing
-- Symbol - versioning in ncurses
+- Symbol versioning + in ncurses
-- Comments - on ncurses versus Comments on + ncurses versus slang (S-Lang)
-- tack – - terminfo action checker
+- Comments on + OpenBSD
-- tctest - – termcap library checker
+- tack – terminfo action + checker
+ +- tctest – termcap + library checker
- - Terminal Database
+ "https://invisible-island.net/ncurses/ncurses.html#download_database">Terminal + DatabaseOther @@ -2159,11 +1774,9 @@ diff --git a/st.info b/st.info
Release Notes -
- Library improvements -
- New features
@@ -2174,7 +1787,6 @@ diff --git a/st.info b/st.info- Program improvements -
- Utilities
@@ -2190,7 +1802,6 @@ diff --git a/st.info b/st.info- Configuration changes -
- Major changes
diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index 56d39782..66f34d8f 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -126,7 +126,7 @@SEE ALSO
curses(3x) - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html index bb3f55a6..fc21e329 100644 --- a/doc/html/man/captoinfo.1m.html +++ b/doc/html/man/captoinfo.1m.html @@ -199,7 +199,7 @@SEE ALSO
infocmp(1m), curses(3x), terminfo(5) - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html index 85811873..cc5b4e81 100644 --- a/doc/html/man/clear.1.html +++ b/doc/html/man/clear.1.html @@ -150,7 +150,7 @@SEE ALSO
tput(1), terminfo(5) - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/curs_scr_dump.3x.html b/doc/html/man/curs_scr_dump.3x.html index 9d901c62..71bc263a 100644 --- a/doc/html/man/curs_scr_dump.3x.html +++ b/doc/html/man/curs_scr_dump.3x.html @@ -1,6 +1,6 @@ @@ -61,14 +61,20 @@DESCRIPTION
+ +scr_dump
The scr_dump routine dumps the current contents of the virtual screen to the file filename. + +scr_restore
The scr_restore routine sets the virtual screen to the contents of filename, which must have been written using scr_dump. The next call to doupdate restores the physical screen to the way it looked in the dump file. + +scr_init
The scr_init routine reads in the contents of filename and uses them to initialize the curses data structures about what the terminal currently has on its screen. If the data is determined to be valid, curses bases @@ -83,6 +89,8 @@ o if the terminal has been written to since the preceding scr_dump call. + +scr_set
The scr_set routine is a combination of scr_restore and scr_init. It tells the program that the information in filename is what is currently on the screen, and also what the program wants on the screen. This can @@ -124,7 +132,14 @@
- NAME
- SYNOPSIS
-- DESCRIPTION
+- DESCRIPTION +
+
+- scr_dump
+- scr_restore
+- scr_init
+- scr_set
+- RETURN VALUE
- NOTES
- PORTABILITY
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html index a408059b..dd6d5741 100644 --- a/doc/html/man/form.3x.html +++ b/doc/html/man/form.3x.html @@ -248,7 +248,7 @@ curses(3x) and related pages whose names begin "form_" for detailed descriptions of the entry points. - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html index afc9f887..03b25684 100644 --- a/doc/html/man/infocmp.1m.html +++ b/doc/html/man/infocmp.1m.html @@ -514,7 +514,7 @@ https://invisible-island.net/ncurses/tctest.html - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html index 17cd6b43..49a32bd6 100644 --- a/doc/html/man/infotocap.1m.html +++ b/doc/html/man/infotocap.1m.html @@ -91,7 +91,7 @@SEE ALSO
infocmp(1m), tic(1m), curses(3x), terminfo(5) - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html index 56d0cad1..0a748925 100644 --- a/doc/html/man/menu.3x.html +++ b/doc/html/man/menu.3x.html @@ -223,7 +223,7 @@ curses(3x) and related pages whose names begin "menu_" for detailed descriptions of the entry points. - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html index e02434b6..f4731090 100644 --- a/doc/html/man/ncurses.3x.html +++ b/doc/html/man/ncurses.3x.html @@ -60,7 +60,7 @@ method of updating character screens with reasonable optimization. This implementation is "new curses" (ncurses) and is the approved replacement for 4.4BSD classic curses, which has been discontinued. - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). The ncurses library emulates the curses library of System V Release 4 UNIX, and XPG4 (X/Open Portability Guide) curses (also known as XSI diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html index 1d3a1a93..9e626965 100644 --- a/doc/html/man/ncurses6-config.1.html +++ b/doc/html/man/ncurses6-config.1.html @@ -113,7 +113,7 @@SEE ALSO
curses(3x) - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html index 0f0276c8..24d50878 100644 --- a/doc/html/man/panel.3x.html +++ b/doc/html/man/panel.3x.html @@ -281,7 +281,7 @@SEE ALSO
curses(3x), curs_variables(3x), - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html index e46f3a73..0833c81a 100644 --- a/doc/html/man/tabs.1.html +++ b/doc/html/man/tabs.1.html @@ -252,7 +252,7 @@SEE ALSO
infocmp(1m), tset(1), curses(3x), terminfo(5). - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html index c7d1cb59..0e20061e 100644 --- a/doc/html/man/terminfo.5.html +++ b/doc/html/man/terminfo.5.html @@ -106,7 +106,7 @@ have, by specifying how to perform screen operations, and by specifying padding requirements and initialization sequences. - This manual describes ncurses version 6.2 (patch 20211016). + This manual describes ncurses version 6.3 (patch 20211021).Terminfo Entry Syntax
diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html index d42bc50a..4dff1dbe 100644 --- a/doc/html/man/tic.1m.html +++ b/doc/html/man/tic.1m.html @@ -461,7 +461,7 @@ captoinfo(1m), infocmp(1m), infotocap(1m), toe(1m), curses(3x), term(5). terminfo(5). user_caps(5). - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html index 93b47f70..e95dcd25 100644 --- a/doc/html/man/toe.1m.html +++ b/doc/html/man/toe.1m.html @@ -171,7 +171,7 @@ captoinfo(1m), infocmp(1m), infotocap(1m), tic(1m), curses(3x), terminfo(5). - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html index 74a849b5..961edcb1 100644 --- a/doc/html/man/tput.1.html +++ b/doc/html/man/tput.1.html @@ -545,7 +545,7 @@SEE ALSO
clear(1), stty(1), tabs(1), tset(1), curs_termcap(3x), terminfo(5). - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html index 87b65bd1..920ff01e 100644 --- a/doc/html/man/tset.1.html +++ b/doc/html/man/tset.1.html @@ -389,7 +389,7 @@ csh(1), sh(1), stty(1), curs_terminfo(3x), tty(4), terminfo(5), ttys(5), environ(7) - This describes ncurses version 6.2 (patch 20211016). + This describes ncurses version 6.3 (patch 20211021). diff --git a/man/curs_scr_dump.3x b/man/curs_scr_dump.3x index 229acefd..faa61446 100644 --- a/man/curs_scr_dump.3x +++ b/man/curs_scr_dump.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2019,2020 Thomas E. Dickey * +.\" Copyright 2018-2020,2021 Thomas E. Dickey * .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scr_dump.3x,v 1.16 2020/10/24 09:44:43 tom Exp $ +.\" $Id: curs_scr_dump.3x,v 1.17 2021/10/20 22:37:48 tom Exp $ .TH curs_scr_dump 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -58,14 +58,18 @@ \fBint scr_set(const char *\fP\fIfilename\fP\fB);\fR .br .SH DESCRIPTION +.SS scr_dump +.PP The \fBscr_dump\fR routine dumps the current contents of the \fIvirtual screen\fP to the file \fIfilename\fR. +.SS scr_restore .PP The \fBscr_restore\fR routine sets the \fIvirtual screen\fP to the contents of \fIfilename\fR, which must have been written using \fBscr_dump\fR. The next call to \fBdoupdate\fR restores the \fIphysical screen\fP to the way it looked in the dump file. +.SS scr_init .PP The \fBscr_init\fR routine reads in the contents of \fIfilename\fR and uses them to initialize the \fBcurses\fR data structures about what the terminal @@ -82,6 +86,7 @@ The data is declared invalid if the terminfo capabilities \fBrmcup\fR and \fBnrrmc\fR exist, also .bP if the terminal has been written to since the preceding \fBscr_dump\fR call. +.SS scr_set .PP The \fBscr_set\fR routine is a combination of \fBscr_restore\fR and \fBscr_init\fR. It tells the program that the information in \fIfilename\fR is diff --git a/misc/ncu2openbsd b/misc/ncu2openbsd new file mode 100644 index 00000000..b066a105 --- /dev/null +++ b/misc/ncu2openbsd @@ -0,0 +1,1286 @@ +#!/usr/bin/env perl +# $Id: ncu2openbsd,v 1.65 2021/10/03 18:52:22 tom Exp $ +# ----------------------------------------------------------------------------- +# Copyright 2021 by Thomas E. Dickey +# +# All Rights Reserved +# +# 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, 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 LISTED COPYRIGHT HOLDER(S) 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. +# ----------------------------------------------------------------------------- +# https://invisible-island.net/ncurses/ncurses-openbsd.html +# +# Update the OpenBSD source-tree given an ncurses tarball or build-tree. + +use strict; +use warnings; + +use Getopt::Std; +use Cwd; +use Cwd 'abs_path'; +use File::Path qw/ remove_tree /; +use File::Temp qw/ tempdir /; + +$| = 1; + +our ( $opt_d, $opt_n, $opt_r, $opt_t, $opt_v, $opt_x ); +our $source_dir; +our $target_dir; +our $update_dir; +our $backup_dir; + +our $tempdir = tempdir( CLEANUP => 1 ); +my $current = getcwd; +my $working = $current; + +our $generated_by = "generated by: ncu2openbsd"; + +our %setup_dir = qw( + lib/libcurses ncurses + lib/libform form + lib/libmenu menu + lib/libpanel panel + usr.bin/infocmp progs + usr.bin/tabs progs + usr.bin/tic progs + usr.bin/toe progs + usr.bin/tput progs + usr.bin/tset progs + share/termtypes misc +); + +our %generated = qw( + codes.c 1 + comp_captab.c 1 + comp_userdefs.c 1 + expanded.c 1 + fallback.c 1 + init_keytry.h 1 + keys.list 1 + lib_gen.c 1 + lib_keyname.c 1 + make_hash 1 + make_keys 1 + names.c 1 + termsort.c 1 + unctrl.c 1 +); + +our %definitions = qw( + CAPTOINFO captoinfo + DATADIR /usr/share + INFOCMP infocmp + INFOTOCAP infotocap + NCURSES_MAJOR 5 + NCURSES_MINOR 7 + NCURSES_OSPEED int + NCURSES_PATCH 20081102 + TERMINFO /usr/share/terminfo + TIC tic + TOE toe + TPUT tput + TSET tset +); + +sub patchdate() { + return $definitions{"NCURSES_PATCH"}; +} + +sub failed($) { + chdir $current; + printf STDERR "? %s\n", $_[0]; + exit; +} + +sub verbose($) { + my $text = shift; + printf "%s\n", $text if ($opt_v); +} + +sub read_file($) { + my $name = shift; + open( my $fp, $name ) || &failed("cannot open $name"); + my (@input) = <$fp>; + chomp @input; + close($fp); + return @input; +} + +sub read_dir($) { + my $path = shift; + my @result; + if ( opendir( my $dh, $path ) ) { + my @data = sort readdir($dh); + closedir $dh; + for my $d ( 0 .. $#data ) { + next if ( $data[$d] =~ /^\.(\.)?$/ ); + next if ( -l $path . "/" . $data[$d] ); + $result[ $#result + 1 ] = $data[$d]; + } + } + return @result; +} + +sub rename_dir($$) { + my $src = shift; + my $dst = shift; + printf "%% mv %s -> %s\n", $src, $dst if ($opt_v); + rename $src, $dst unless ($opt_n); +} + +sub check_sourcedir($) { + my $path = shift; + &failed("not a directory: $path") unless ( -d $path ); + my $full = abs_path($path); + chdir $full; + &failed("not an ncurses source-tree: $path") + unless ( -f "NEWS" and -f "dist.mk" ); + $source_dir = $full; +} + +sub unpack($) { + my $path = shift; + my $full = abs_path($path); + my $command = ""; + if ( $path =~ /\.tgz$/ or $path =~ /\.tar\.gz$/ ) { + $command = "tar xzf %s"; + } + elsif ( $path =~ /\.zip$/ ) { + $command = "unzip -q %s"; + } + else { + &failed("not a gzip'd tarball or zip-file: $path"); + } + chdir $tempdir; + system( sprintf( $command, $full ) ); + + # there should be exactly one subdirectory -- the source-tree + my @data = &read_dir("."); + &failed("found no subdirectories of $path") if ( $#data < 0 ); + &failed( "too many subdirectories: " . $data[0] . " vs " . $data[1] ) + if ( $#data > 0 ); + &check_sourcedir( $data[0] ); +} + +sub remove_dir($) { + my $tree = shift; + if ( -d $tree ) { + printf "%% rm -rf %s\n", $tree if ($opt_v); + remove_tree( $tree, $opt_v ? 1 : 0, 1 ) unless ($opt_n); + } +} + +sub copy_CVS($) { + my $leaf = shift; + my $src = $target_dir . $leaf . "/CVS"; + my $dst = $update_dir . $leaf . "/CVS"; + my $verbose = $opt_v ? "v" : ""; + if ( -d $src and !-d $dst ) { + my $mid = $update_dir . $leaf; + mkdir $mid unless ( -d $mid ); + mkdir $dst unless ( -d $dst ); + system("cp -a$verbose $src/* $dst/"); + } +} + +sub is_tic_code($) { + my $item = shift; + my $result = 0; + $result = 1 + if ( + $item =~ /^(capconvert + |tic + |dump + |progs + |termsort + |transform + |MKtermsort)/x + ); + return $result; +} + +sub is_ident($$) { + my $name = shift; + my $text = shift; + my $code = 0; + $code = 1 if ( $text =~ /\$$name:.*\$/ ); + return $code; +} + +# We "could", filter out differences with ident's using the diff -I option, +# but in practice, that is cumbersome. +sub munge_ident($) { + my $target = shift; + my $source = $target; + $source =~ s/\.update\b//; + &failed("bug at $source") if ( $source eq $target ); + return unless ( -f $source ); + my @source = &read_file($source); + my @target = &read_file($target); + my $old_id = ""; + my $gap_id = 0; + my $new_id = ""; + my $skipit = -1; + + for my $n ( 0 .. $#source ) { + if ( &is_ident( "OpenBSD", $source[$n] ) ) { + $old_id = $source[$n]; + $skipit = $n + 1; + } + elsif ( &is_ident( "Id", $source[$n] ) ) { + $new_id = $source[$n]; + last; + } + elsif ( $n == $skipit ) { + $source[$n] =~ s/\s+$//; + if ( $source[$n] eq "" ) { + $gap_id = $source[$n]; + } + elsif ( $source[$n] eq '.\"' ) { + $gap_id = $source[$n]; + } + } + } + if ( $old_id ne "" ) { + my @update; + my $tables = &uses_tables($target); + $update[ $#update + 1 ] = $target[0] if ($tables); + $update[ $#update + 1 ] = $old_id; + $update[ $#update + 1 ] = $gap_id unless ( $gap_id eq 0 ); + for my $n ( $tables .. $#target ) { + if ( &is_ident( "Id", $target[$n] ) ) { + $update[ $#update + 1 ] = $new_id; + } + else { + $update[ $#update + 1 ] = $target[$n]; + } + } + system("chmod u+w $target"); + if ( open my $fp, ">", $target ) { + for my $n ( 0 .. $#update ) { + printf $fp "%s\n", $update[$n]; + } + close $fp; + system("chmod u-w $target"); + } + } +} + +# ncurses manual pages provide for renaming the utilities, normally as part of +# the scripts provided in its sources. OpenBSD developers do not use those. +sub munge_docs($) { + my $path = shift; + my @data = &read_file($path); + my $done = 0; + for my $n ( 0 .. $#data ) { + my $text = $data[$n]; + $text =~ s/\b1M\b/1/g; + $text =~ s/\b3X\b/3/g; + $text =~ s/\bcurs_(term(info|cap)\s*3\b)/$1/g; + $text =~ s/(\\fB)curs_(term(info|cap)\\f[RP]\(3\))/$1$2/g; + my $left = ""; + while ( $text =~ /@[[:alnum:]_]+@/ ) { + my $next = index( $text, "@" ); + last if ( $next < 0 ); + $left .= substr( $text, 0, $next++ ); + $text = substr( $text, $next ); + $next = index( $text, "@" ); + last if ( $next < 0 ); + my $word = substr( $text, 0, $next ); + if ( $word =~ /^[[:alnum:]_]+/ ) { + + if ( $definitions{$word} ) { + $word = $definitions{$word}; + } + else { + $word = "?"; + } + $left .= $word; + $text = substr( $text, $next + 1 ); + } + else { + &failed("unexpected definition @$word@"); + } + } + $text = $left . $text; + if ( $text ne $data[$n] ) { + $done++; + $data[$n] = $text; + } + } + if ($done) { + system("chmod u+w $path"); + if ( open my $fp, ">", $path ) { + for my $n ( 0 .. $#data ) { + printf $fp "%s\n", $data[$n]; + } + close $fp; + system("chmod u-w $path"); + } + } +} + +sub copy_file($$) { + my $src = shift; + my $dst = shift; + my $verbose = $opt_v ? "v" : ""; + if ( -d $dst ) { + my $leaf = $src; + $leaf =~ s,^.*/,,; + $dst .= "/" . $leaf; + } + system("chmod u+w $dst") if ( -f $dst ); + system("cp -a$verbose $src $dst"); + &munge_ident($dst); +} + +sub copy_code($) { + my $src = shift; + my $dst = shift; + ©_CVS( substr( $dst, length($update_dir) ) ); + printf ".. copying files for $dst\n"; + my @data = &read_dir($src); + printf ".. %d entries\n", $#data + 1; + my $verbose = $opt_v ? "v" : ""; + for my $d ( 0 .. $#data ) { + my $item = $data[$d]; + my $src_item = $src . "/" . $item; + next if ( -d $src_item ); + next if ( -l $src_item ); + next if ( $item =~ /^\.(\.)?$/ ); + next if ( $item =~ /\.(bak|in|log|status)$/ ); + next if ( $item =~ /^llib-/ ); + next if ( $item =~ /^modules/ ); + next if ( $item =~ /^[fm]_trace\.c/ and not $opt_t ); + next + if ( $item =~ /^Makefile/ and index( $update_dir, "/share/" ) < 0 ); + next if ( $item =~ /^README/ ); + next if ( $item eq "headers" ); + next if ( $generated{$item} ); + next if ( $item eq "link_test.c" ); + + if ( index( $dst, "/usr.bin/" ) >= 0 ) { + next if ( $item =~ /^(clear)/ ); # OpenBSD uses "tput clear" + my $prog = $dst; + $prog =~ s%^.*/%%; + $prog =~ s/(update|backup)//; + $prog .= "c"; + if ( $dst =~ /infocmp/ ) { + next if ( $item ne $prog ); + } + elsif ( $dst =~ /tabs/ ) { + next if ( $item ne $prog ); + } + elsif ( $dst =~ /tic/ ) { + next if ( &is_tic_code($item) == 0 ); + } + elsif ( $dst =~ /toe/ ) { + next if ( $item ne $prog ); + } + elsif ( $dst =~ /tput/ ) { + next if ( $item ne $prog ); + } + elsif ( $dst =~ /tset/ ) { + next if ( $item ne $prog ); + } + else { + next; + } + } + system( sprintf( "cp -a$verbose %s %s/%s", $src_item, $dst, $item ) ); + &munge_ident("$dst/$item"); + } +} + +# Checking if nroff supports tables is a long-obsolete issue, and is not really +# necessary, except to match OpenBSD's source-tree. +sub uses_tables($) { + my $docs = shift; + my @docs = &read_file($docs); + my $code = 0; + for my $n ( 0 .. $#docs ) { + if ( $docs[$n] =~ /^[.']\\"\s+t\b.*/ ) { + $code = 1; + last; + } + elsif ( $docs[$n] =~ /^\./ ) { + last; + } + } + return $code; +} + +sub copy_1doc($$) { + my $docs = shift; + my $src = "$source_dir/man/$docs"; + my $dst = "$update_dir/$docs"; + $src .= "m" if ( -f "${src}m" ); + $dst =~ s/x$//; + if ( $dst =~ /\.3/ ) { + $dst =~ s/\bncurses/curses/ if ( $dst =~ /ncurses\./ ); + $dst =~ s/\bcurs_// if ( $dst =~ /_term(cap|info)\./ ); + } + ©_file( $src, $dst ); + &munge_docs($dst); +} + +sub copy_docs($) { + my $docs = shift; + if ( index( $update_dir, "/usr.bin/" ) >= 0 ) { + ©_1doc( $docs . ".1" ); + if ( $docs eq "tic" ) { + ©_1doc("captoinfo.1"); + ©_1doc("infotocap.1"); + } + } + else { + my @docs = &read_dir("$source_dir/man"); + if ( $docs eq "curses" ) { + for my $n ( 0 .. $#docs ) { + next if ( $docs[$n] eq "Makefile" ); + next if ( $docs[$n] eq "make_sed.sh" ); + next if ( $docs[$n] eq "man_db.renames" ); + next if ( $docs[$n] eq "manlinks.sed" ); + next if ( $docs[$n] =~ /\.(1|head|tail|in)/ ); + next if ( $docs[$n] =~ /^(form|menu|mitem|panel)/ ); + ©_1doc( $docs[$n] ); + } + } + elsif ( $docs eq "form" ) { + for my $n ( 0 .. $#docs ) { + next unless ( $docs[$n] =~ /^form/ ); + ©_1doc( $docs[$n] ); + } + } + elsif ( $docs eq "menu" ) { + for my $n ( 0 .. $#docs ) { + next unless ( $docs[$n] =~ /^(menu|mitem)/ ); + ©_1doc( $docs[$n] ); + } + } + elsif ( $docs eq "panel" ) { + for my $n ( 0 .. $#docs ) { + next unless ( $docs[$n] =~ /^panel/ ); + ©_1doc( $docs[$n] ); + } + } + } +} + +sub setup_dir($) { + my $dst = shift; + &failed("no definition for $dst") + unless ( defined $setup_dir{$dst} or $opt_r ); + $target_dir = sprintf( "%s/%s", $opt_d, $dst ); + $update_dir = $target_dir . ".update"; + $backup_dir = $target_dir . ".backup"; + my $result = 0; + if ($opt_r) { + &remove_dir($update_dir); + if ( $target_dir =~ /\/(tabs|toe)$/ ) { + &remove_dir($target_dir); + } + elsif ( -d $backup_dir ) { + &remove_dir($target_dir); + &rename_dir( $backup_dir, $target_dir ); + } + } + else { + &remove_dir($update_dir); + mkdir $update_dir; + + # reuse the shared-library version, assuming ABI=5 would involve at + # most a minor-version bump. + ©_file( "$target_dir/shlib_version", $update_dir ) + if ( $dst =~ /^lib\// ); + ©_code( $source_dir . "/" . $setup_dir{$dst}, $update_dir ) + unless ( $setup_dir{$dst} eq "misc" ); + $result = 1; + } + return $result; +} + +sub do_build($) { + my $command = shift; + printf "%% %s\n", $command if ($opt_v); + system($command); +} + +sub finish_dir() { + printf "** $target_dir\n"; + system("diff -Naurb $target_dir $update_dir | diffstat -n 30") + if ( -d $target_dir ); + if ($opt_n) { + &do_build("cd $update_dir && make -n") if ($opt_x); + } + else { + if ( -d $backup_dir ) { + printf STDERR "? backup directory exists: %s\n", $backup_dir; + } + else { + &rename_dir( $target_dir, $backup_dir ); + &rename_dir( $update_dir, $target_dir ); + } + &do_build("cd $target_dir && make") if ($opt_x); + } +} + +################################################################################ + +sub only_c_files($) { + my @data = @{ $_[0] }; + my %data; + for my $n ( 0 .. $#data ) { + my $text = $data[$n]; + $data{$text}++ if ( $text =~ /\.c$/ ); + } + return sort keys %data; +} + +sub makefile_list($$$) { + my @data = @{ $_[0] }; + my $name = $_[1]; + my $skip = $_[2]; + my %data; + my $state = 0; + for my $n ( 0 .. $#data ) { + my $text = $data[$n]; + $text =~ s/^\s+//; + next if ( index( $text, $skip ) == 0 ); + $text =~ s/\s+=/=/; + $text =~ s/=\s+/=/; + $text =~ s/\s*\\//; + $state = 1 if ( $text =~ /^${name}=/ ); + next unless ( $state == 1 ); + + if ( index( $text, "(trace)" ) >= 0 and not $opt_t ) { + next unless ( $text =~ /\b(lib_trace|visbuf)\.c$/ ); + } + if ( not $opt_t ) { + next if ( $text =~ /\b[fm]_trace\.c$/ ); + } + $text =~ s/^.*=//; + $text =~ s/\$o/.o/g; + $text =~ s/^.*\///; + next if ( $text eq "link_test.c" ); + next if ( $text eq "mf_common.h" ); + next if ( $text eq "transform.h" ); + $data{$text}++ if ( $text ne "" ); + last if ( $data[$n] !~ /\\$/ ); + } + return sort keys %data; +} + +sub manpage_list($) { + my $path = shift; + my @data = &read_dir($path); + my %data; + for my $n ( 0 .. $#data ) { + my $text = $data[$n]; + $data{$text}++ if ( $text =~ /\.\d$/ ); + } + return sort keys %data; +} + +sub columns_of($) { + my $string = shift; + my $result = 0; + for my $n ( 0 .. length($string) - 1 ) { + my $c = substr( $string, $n, 1 ); + if ( $c eq "\t" ) { + $result |= 7; + $result++; + } + elsif ( $c eq "\n" ) { + $result = 0; + } + else { + ++$result; + } + } + return $result; +} + +sub format_list($$) { + my $name = $_[0]; + my @data = @{ $_[1] }; + my $keep = ( defined $_[2] ) ? 1 : 0; + my $base; + my $fill; + if ( length($name) >= 9 ) { + $fill = " "; + $base = length($name) + 1; + } + else { + $base = 9; + $fill = "\t"; + } + my $result = sprintf( "%s%s", $name, $fill ); + if ( $keep == 0 ) { + my %data; + for my $n ( 0 .. $#data ) { + $data{ $data[$n] } = 1 if ( defined $data[$n] ); + } + @data = sort keys %data; + } + for my $n ( 0 .. $#data ) { + my $data = $data[$n]; + my $col = &columns_of($result); + my $add = 1 + length($data); + if ( ( $col + $add ) > 76 ) { + $result .= " " if ( $col > $base ); + $base = 9; + $fill = "\t"; + $result .= "\\\n" . $fill . $data; + } + else { + $result .= " " if ( $col > $base ); + $result .= $data; + } + } + return $result; +} + +################################################################################ + +sub compare_makefiles($) { + if ($opt_v) { + my $newfile = shift; + my $bakfile = + ( -d $backup_dir ? $backup_dir : $target_dir ) . "/Makefile"; + system("diff -u $bakfile $newfile") if ( -f $bakfile ); + } +} + +# The curses makefile has to build build-time utilities and generate source. +sub gen_1st_makefile() { + my $libname = "curses"; + my $oldfile = "$source_dir/n$libname/Makefile"; + my @oldfile = &read_file($oldfile); + + my $newfile = "$update_dir/Makefile"; + open( my $fp, ">", $newfile ) || &failed("cannot open $newfile"); + my @subdirs = ( + '${.CURDIR}/base', '${.CURDIR}/tinfo', + '${.CURDIR}/tty', '${.CURDIR}/widechar' + ); + $subdirs[ $#subdirs + 1 ] = '${.CURDIR}/trace' if ($opt_t); + printf $fp <\${.TARGET} + +fallback.c: \${.CURDIR}/tinfo/MKfallback.sh + sh \${.CURDIR}/tinfo/MKfallback.sh /usr/share/terminfo \${.CURDIR}/../../share/termtypes/termtypes.master \$(FALLBACK_LIST) > \${.TARGET} + +lib_gen.c: \${.CURDIR}/base/MKlib_gen.sh + sh \${.CURDIR}/base/MKlib_gen.sh "\${CC} -E -P -I\${.CURDIR}" \\ + "\${AWK}" generated < \${.CURDIR}/curses.h > lib_gen.c + +init_keytry.h: make_keys keys.list + ./make_keys keys.list > \${.TARGET} + +make_keys: \${.CURDIR}/tinfo/make_keys.c \${.CURDIR}/curses.priv.h names.c + \${HOSTCC} \${LDSTATIC} \${HOSTCFLAGS} \${HOSTLDFLAGS} \\ + -o \${.TARGET} \${.CURDIR}/tinfo/make_keys.c \${LDADD} +EOF + + if ( &patchdate >= 20090808 ) { + printf $fp < = 20190309 ) { + printf $fp < \${.TARGET} +EOF + } + printf $fp < \${.TARGET} + +comp_captab.c: make_hash + sh \${.CURDIR}/tinfo/MKcaptab.sh \${AWK} \${USE_BIG_STRINGS} \\ + \${.CURDIR}/tinfo/MKcaptab.awk \${CAPLIST} > \${.TARGET} + +lib_keyname.c: keys.list \${.CURDIR}/base/MKkeyname.awk + \${AWK} -f \${.CURDIR}/base/MKkeyname.awk \\ + bigstrings=\${USE_BIG_STRINGS} \\ + keys.list > \${.TARGET} + +names.c: \${.CURDIR}/tinfo/MKnames.awk + \${AWK} -f \${.CURDIR}/tinfo/MKnames.awk \\ + bigstrings=\${USE_BIG_STRINGS} \\ + \${CAPLIST} > \${.TARGET} +codes.c: \${.CURDIR}/tinfo/MKcodes.awk + \${AWK} -f \${.CURDIR}/tinfo/MKcodes.awk \\ + bigstrings=\${USE_BIG_STRINGS} \\ + \${CAPLIST} > \${.TARGET} + +unctrl.c: \${.CURDIR}/base/MKunctrl.awk + echo | \${AWK} -f \${.CURDIR}/base/MKunctrl.awk bigstrings=1 > \${.TARGET} + +.include + +# Link libtermlib, libtermcap to libcurses so we don't break people's Makefiles +afterinstall: + -cd \${DESTDIR}\${LIBDIR}; \\ + for i in \${_LIBS}; do \\ + ln -f \$\$i `echo \$\$i | sed 's/curses/termlib/'`; \\ + ln -f \$\$i `echo \$\$i | sed 's/curses/termcap/'`; \\ + ln -f \$\$i `echo \$\$i | sed 's/curses/ncurses/'`; \\ + ln -f \$\$i `echo \$\$i | sed 's/curses/ncursesw/'`; \\ + done + +.include +EOF + close $fp; + &compare_makefiles($newfile); +} + +sub gen_lib_makefile($) { + my $libname = shift; + my $oldfile = "$source_dir/$libname/Makefile"; + my @oldfile = &read_file($oldfile); + + # in ncurses, header-files are quasi-generated, because the original + # header file for form/menu/panel lives in the source-directory, but is + # copied to the include-directory with "make sources". + my @headers = &makefile_list( \@oldfile, "AUTO_SRC", "?" ); + + # The C source is more straightforward. + my @sources = &makefile_list( \@oldfile, "C_SRC", "?" ); + my $newfile = "$update_dir/Makefile"; + open( my $fp, ">", $newfile ) || &failed("cannot open $newfile"); + printf $fp < + +afterinstall: + -cd \${DESTDIR}\${LIBDIR}; \\ + for i in \${_LIBS}; do \\ + ln -f \$\$i `echo \$\$i | sed 's/${libname}/${libname}w/'`; \\ + done + +.include +EOF + close $fp; + &compare_makefiles($newfile); +} + +sub gen_bin_makefile($) { + my $binname = shift; + my $oldfile = "$source_dir/progs/Makefile"; + my @oldfile = &read_file($oldfile); + my $newfile = "$update_dir/Makefile"; + + open( my $fp, ">", $newfile ) || &failed("cannot open $newfile"); + my @sources = ("$binname.c"); + my @links = (); + my @autosrc = &makefile_list( \@oldfile, "AUTO_SRC", "?" ); + + my $tput_ver = 0; + my $use_dump_entry = 0; + my $use_termsort = 0; + my $use_tparm_type = 0; + my $use_transform = 0; + + $use_dump_entry = 1 if ( $binname eq "infocmp" or $binname eq "tic" ); + $use_termsort = 1 if ( $use_dump_entry or $binname eq "tput" ); + + if ( &patchdate >= 20090314 ) { + $use_transform = 1 if ( $binname =~ /^(tic|tput|tset)/ ); + } + if ( &patchdate >= 20140521 ) { + $use_tparm_type = 1 if ( $binname =~ /^(tic|tput)$/ ); + } + if ( &patchdate >= 20160806 ) { + $tput_ver = &patchdate; + } + + $sources[ ++$#sources ] = "dump_entry.c" if ($use_dump_entry); + $sources[ ++$#sources ] = "tparm_type.c" if ($use_tparm_type); + $sources[ ++$#sources ] = "transform.c" if ($use_transform); + + $autosrc[ ++$#autosrc ] = "termsort.c" if ($use_termsort); + + # transform.h also is generated, but OpenBSD checked-in a copy + + if ( $binname eq "tic" ) { + $links[ ++$#links ] = "captoinfo"; + $links[ ++$#links ] = "infotocap"; + } + elsif ( $binname eq "tabs" ) { + $sources[ ++$#sources ] = "tty_settings.c" if ( $tput_ver >= 20161224 ); + } + elsif ( $binname eq "tput" ) { + $sources[ ++$#sources ] = "clear_cmd.c" if ( $tput_ver >= 20161022 ); + $sources[ ++$#sources ] = "reset_cmd.c" if ( $tput_ver >= 20160806 ); + $sources[ ++$#sources ] = "tty_settings.c" if ( $tput_ver >= 20161224 ); + $links[ ++$#links ] = "clear"; + } + elsif ( $binname eq "tset" ) { + $sources[ ++$#sources ] = "reset_cmd.c" if ( $tput_ver >= 20160806 ); + $sources[ ++$#sources ] = "tty_settings.c" if ( $tput_ver >= 20161224 ); + $links[ ++$#links ] = "reset"; + } + + printf $fp < = 0 ) { + my @bin_links; + for my $n ( 0 .. $#links ) { + $bin_links[ ++$#bin_links ] = '${BINDIR}/' . $binname; + $bin_links[ ++$#bin_links ] = '${BINDIR}/' . $links[$n]; + } + printf $fp "%s\n", &format_list( "LINKS=", \@bin_links, 1 ); + } + my $ticfix = '${.CURDIR}/'; + if ( $binname eq "tic" ) { + printf $fp < \${.TARGET} +EOF + } + printf $fp < +EOF + close $fp; + + &compare_makefiles($newfile); +} + +################################################################################ + +sub setup_lib_libcurses() { + if ( &setup_dir("lib/libcurses") ) { + ©_code( "$source_dir/ncurses/base", "$update_dir/base" ); + ©_code( "$source_dir/ncurses/tinfo", "$update_dir/tinfo" ); + ©_code( "$source_dir/ncurses/tty", "$update_dir/tty" ); + ©_code( "$source_dir/ncurses/widechar", "$update_dir/widechar" ); + ©_file( "$source_dir/include/Caps", $update_dir ); + ©_file( "$source_dir/include/capdefaults.c", $update_dir ); + ©_file( "$source_dir/include/curses.h", $update_dir ); + ©_file( "$source_dir/include/hashed_db.h", $update_dir ); + ©_file( "$source_dir/include/hashsize.h", $update_dir ); + ©_file( "$source_dir/include/nc_alloc.h", $update_dir ); + ©_file( "$source_dir/include/nc_panel.h", $update_dir ); + ©_file( "$source_dir/include/nc_tparm.h", $update_dir ); + ©_file( "$source_dir/include/ncurses_cfg.h", $update_dir ); + ©_file( "$source_dir/include/ncurses_def.h", $update_dir ); + ©_file( "$source_dir/include/ncurses_dll.h", $update_dir ); + ©_file( "$source_dir/include/parametrized.h", $update_dir ); + ©_file( "$source_dir/include/term.h", $update_dir ); + ©_file( "$source_dir/include/termcap.h", $update_dir ); + ©_file( "$source_dir/include/term_entry.h", $update_dir ); + ©_file( "$source_dir/include/tic.h", $update_dir ); + ©_file( "$source_dir/include/unctrl.h", $update_dir ); + ©_file( "$source_dir/man/terminfo.5", $update_dir ); + ©_docs("curses"); + + &verbose(".. work around a bug in /bin/sh in OpenBSD"); + system( "sed -i" + . " -e 's,^shift,test \$# != 0 \\&\\& shift,'" + . " $update_dir/tinfo/MKfallback.sh" ); + + # OpenBSD dropped support for sys/ttydev.h, without mentioning the + # system version. Just trim it. + &verbose(".. work around mishandled sys/ttydef.h"); + system( "sed -i" + . " -e '/__FreeBSD_version/s,|| defined(__OpenBSD__),,'" + . " $update_dir/tinfo/lib_baudrate.c" ); + + if ($opt_t) { + ©_code( "$source_dir/ncurses/trace", "$update_dir/trace" ); + } + else { + ©_file( "$source_dir/ncurses/trace/lib_trace.c", $update_dir ); + ©_file( "$source_dir/ncurses/trace/visbuf.c", $update_dir ); + } + ©_file( "$source_dir/include/nc_termios.h", $update_dir ) + if ( &patchdate >= 20110625 ); + ©_file( "$source_dir/include/nc_string.h", $update_dir ) + if ( &patchdate >= 20120222 ); + ©_file( "$source_dir/include/nc_access.h", $update_dir ) + if ( &patchdate >= 20210626 ); + ©_file( "$source_dir/include/Caps-ncurses", $update_dir ) + if ( &patchdate >= 20190302 ); + &gen_1st_makefile; + &finish_dir; + } +} + +sub setup_lib_libform() { + if ( &setup_dir("lib/libform") ) { + ©_docs("form"); + &gen_lib_makefile("form"); + &finish_dir; + } +} + +sub setup_lib_libmenu() { + if ( &setup_dir("lib/libmenu") ) { + ©_docs("menu"); + &gen_lib_makefile("menu"); + &finish_dir; + } +} + +sub setup_lib_libpanel() { + if ( &setup_dir("lib/libpanel") ) { + ©_docs("panel"); + &gen_lib_makefile("panel"); + &finish_dir; + } +} + +sub setup_bin_infocmp() { + if ( &setup_dir("usr.bin/infocmp") ) { + ©_docs("infocmp"); + &gen_bin_makefile("infocmp"); + &finish_dir; + } +} + +sub setup_bin_tabs() { + if ( &setup_dir("usr.bin/tabs") ) { + ©_docs("tabs"); + &gen_bin_makefile("tabs"); + &finish_dir; + } +} + +sub setup_bin_tic() { + if ( &setup_dir("usr.bin/tic") ) { + if ( &patchdate >= 20140521 ) { + ©_file( "$source_dir/progs/tparm_type.c", $update_dir ); + ©_file( "$source_dir/progs/tparm_type.h", $update_dir ); + } + + # shared files for tput/tset + if ( &patchdate >= 20160806 ) { + ©_file( "$source_dir/progs/reset_cmd.c", $update_dir ); + ©_file( "$source_dir/progs/reset_cmd.h", $update_dir ); + } + if ( &patchdate >= 20161022 ) { + ©_file( "$source_dir/progs/clear_cmd.c", $update_dir ); + ©_file( "$source_dir/progs/clear_cmd.h", $update_dir ); + } + if ( &patchdate >= 20161224 ) { + ©_file( "$source_dir/progs/tty_settings.c", $update_dir ); + ©_file( "$source_dir/progs/tty_settings.h", $update_dir ); + } + ©_docs("tic"); + &gen_bin_makefile("tic"); + &finish_dir; + } +} + +sub setup_bin_toe() { + if ( &setup_dir("usr.bin/toe") ) { + ©_docs("toe"); + &gen_bin_makefile("toe"); + &finish_dir; + } +} + +sub setup_bin_tput() { + if ( &setup_dir("usr.bin/tput") ) { + ©_docs("tput"); + &gen_bin_makefile("tput"); + &finish_dir; + } +} + +sub setup_bin_tset() { + if ( &setup_dir("usr.bin/tset") ) { + ©_docs("tset"); + &gen_bin_makefile("tset"); + &finish_dir; + } +} + +sub setup_terminfo() { + if ( &setup_dir("share/termtypes") ) { + ©_code( $target_dir, $update_dir ); + ©_file( "$source_dir/misc/terminfo.src", + "$update_dir/termtypes.master" ); + + # build the terminfo database using the in-tree tic. + # This is always best practice, but for ncurses 6.2 in particular is + # required. + my $prog = abs_path("$target_dir/../../usr.bin/tic"); + my $libs = abs_path("$target_dir/../../lib/libcurses"); + if ( defined $prog and defined $libs ) { + $prog .= "/tic"; + &verbose(".. changing makefile to use in-tree tic"); + system( "sed -i -E " + . "-e 's,(TIC=).*,\\1\t$prog,' " + . "-e 's,(\\\${TIC}),LD_LIBRARY_PATH=$libs \\1,' " + . "$update_dir/Makefile" ); + } + &finish_dir; + } +} + +sub configure_tree() { + return if ( -f "ncurses/Makefile" ); + my @search = ( "/usr/share/terminfo", "/usr/local/share/terminfo" ); + my @prefix = ("./configure"); + $prefix[ ++$#prefix ] = "--with-abi-version=5" + if ( &patchdate >= 20150502 ); + my @options = ( + "--with-ospeed=int", # + "--with-shared", # + "--without-normal", # + "--without-debug", # + "--with-terminfo-dirs=" . join( ':', @search ), # + "--without-ada", # + "--disable-hard-tabs", # + "--enable-const", # + "--enable-getcap", # + "--enable-bsdpad", # + "--enable-signed-char", # + "--enable-termcap", # + "--enable-widec" + ); + $options[ ++$#options ] = "--with-trace" if ($opt_t); + $options[ ++$#options ] = "--enable-string-hacks" + if ( &patchdate >= 20120225 ); + system( join( ' ', @prefix ) . ' ' . join( ' ', @options ) ); + &failed("problem with configuring") unless ( -f "ncurses/Makefile" ); + + system("make sources"); + + # OpenBSD developers edit the generated file and do not regen it when + # doing upgrades. This script reflects those edits. + system( "sed -i" . " -E" + . " -e '/TYPEOF_CHTYPE/s,int,long,'" + . " -e '/USE_TERMCAP/d'" + . " -e '/HAVE_LIB(FORM|MENU|PANEL)/s,^(.*)\$,/* \\1 */,'" + . " -e 's/TERMPATH.*/PURE_TERMINFO 0/'" + . " -e '/SYSTEM_NAME/s,\[0-9.\]+,,'" + . " include/ncurses_cfg.h" ); +} + +sub get_definitions() { + my @data = &read_file("dist.mk"); + for my $n ( 0 .. $#data ) { + my $text = $data[$n]; + $text =~ s/^\s*//; + next unless ( $text =~ /^NCURSES.*=/ ); + $text =~ s/\s*=\s+/=/; + my $name = $text; + $name =~ s/=.*//; + my $value = $text; + $value =~ s/^[^=]*=//; + $value =~ s/\s.*//; + $definitions{$name} = $value; + } +} + +sub setup_all_dirs() { + printf "** %s all build-directories\n", $opt_r ? "removing" : "setting up"; + &get_definitions; + &configure_tree unless ($opt_r); + &setup_lib_libcurses; + &setup_lib_libmenu; + &setup_lib_libform; # build after libmenu, for mf_common.h + &setup_lib_libpanel; + &setup_bin_tic; # do this first, for shared headers + &setup_bin_infocmp; + &setup_bin_tabs if ( -f "$source_dir/progs/tabs.c" ); + &setup_bin_toe; + &setup_bin_tput; + &setup_bin_tset; + &setup_terminfo; +} + +sub usage() { + print < Mon, 18 Oct 2021 19:31:58 -0400 + -- Thomas E. Dickey Wed, 20 Oct 2021 18:43:08 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 776ac825..ddce3cfa 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20211018) unstable; urgency=low +ncurses6 (6.3+20211021) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Mon, 18 Oct 2021 19:31:58 -0400 + -- Thomas E. Dickey Wed, 20 Oct 2021 18:43:08 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 4f42d238..da9c2dc1 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20211018) unstable; urgency=low +ncurses6 (6.3+20211021) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Mon, 18 Oct 2021 19:31:58 -0400 + -- Thomas E. Dickey Wed, 20 Oct 2021 18:43:08 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index a9592e27..cf26efbe 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.484 2021/10/18 23:31:58 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.486 2021/10/20 22:43:08 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 "2" +!define VERSION_MINOR "3" !define VERSION_YYYY "2021" -!define VERSION_MMDD "1018" +!define VERSION_MMDD "1021" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index c7d7428d..7dd1f8e1 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -2,8 +2,8 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 -Version: 6.2 -Release: 20211018 +Version: 6.3 +Release: 20211021 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index 40457320..e7d19451 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 -Version: 6.2 -Release: 20211018 +Version: 6.3 +Release: 20211021 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index f5da76c0..35a70b26 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 -Version: 6.2 -Release: 20211018 +Version: 6.3 +Release: 20211021 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz -- 2.45.2