aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Caps303
-rw-r--r--include/Caps-ncurses21
-rw-r--r--include/Caps.aix4297
-rw-r--r--include/Caps.hpux11301
-rw-r--r--include/Caps.keys298
-rw-r--r--include/Caps.osf1r5222
-rw-r--r--include/Caps.uwin225
-rwxr-xr-xinclude/MKkey_defs.sh15
-rwxr-xr-xinclude/MKncurses_def.sh6
-rw-r--r--include/MKterm.h.awk.in39
-rw-r--r--include/Makefile.in19
-rw-r--r--include/capdefaults.c6
-rw-r--r--include/curses.events4
-rw-r--r--include/curses.h.in116
-rw-r--r--include/curses.tail16
-rw-r--r--include/curses.wide6
-rwxr-xr-xinclude/edit_cfg.sh19
-rw-r--r--include/headers8
-rw-r--r--include/nc_access.h80
-rw-r--r--include/nc_alloc.h17
-rw-r--r--include/nc_mingw.h13
-rw-r--r--include/nc_string.h8
-rw-r--r--include/nc_tparm.h5
-rw-r--r--include/nc_win32.h8
-rw-r--r--include/ncurses_defs30
-rw-r--r--include/ncurses_dll.h.in10
-rw-r--r--include/ncurses_mingw.h14
-rw-r--r--include/term_entry.h29
-rw-r--r--include/termcap.h.in10
-rw-r--r--include/tic.h47
-rw-r--r--include/win32_curses.h6
31 files changed, 1341 insertions, 857 deletions
diff --git a/include/Caps b/include/Caps
index 4528cffb80ed..cd077b969192 100644
--- a/include/Caps
+++ b/include/Caps
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 1998-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -30,7 +30,7 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
-# $Id: Caps,v 1.46 2020/10/17 21:30:19 tom Exp $
+# $Id: Caps,v 1.56 2024/04/20 21:05:02 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
-# Column 3: capability type (boolean, numeric, or string)
+# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
-# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@@ -98,8 +98,8 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
-# as a terminfo object, and breaking this would be bad. It's up to the ncurses
-# library what to do with the terminfo data after it's read in.
+# as a terminfo object, and breaking this would be bad. It is up to the ncurses
+# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
-# format). It's up to you what you have the compiler do with it.
+# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
+# FORMATTING THE TABLES
+#
+# We manually specify a (minimum) column width for the capability name
+# and terminfo code columns in the tables to achieve a consistent
+# arrangement; as used here, tbl(1) cannot know the width required by
+# one table's data while formatting another's.
+#
+# The longest capability names (C variables) are
+# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
+# 25n), and the longest terminfo code is "setcolor" (8n).
+#
+# The tables are a tight fit on traditional man(7) implementations that
+# use a line length of 65n, and the "Description" column has little room
+# within which the formatter can make breaking or adjustment decisions.
+# Words like "micro_..._address" and "parm_..._micro" don't break.
+# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
+#
#############################################################################
#
# STANDARD CAPABILITIES
#
-#%The following is a complete table of the capabilities included in a
-#%terminfo description block and available to terminfo-using code. In each
-#%line of the table,
-#%
-#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
-#%accesses the capability.
-#%
-#%The \fBcapname\fR is the short name used in the text of the database,
-#%and is used by a person updating the database.
-#%Whenever possible, capnames are chosen to be the same as or similar to
-#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
-#%identical or very similar names). Semantics are also intended to match
-#%those of the specification.
-#%
-#%The termcap code is the old
-#%.B termcap
-#%capability name (some capabilities are new, and have names which termcap
-#%did not originate).
-#%.P
-#%Capability names have no hard length limit, but an informal limit of 5
-#%characters has been adopted to keep them short and to allow the tabs in
-#%the source file
-#%.B Caps
+#%Tables of capabilities
+#%.I \%ncurses
+#%recognizes in a
+#%.I \%term\%info
+#%terminal type description and available to
+#%.IR \%term\%info -using
+#%code follow.
+#%.bP
+#%The capability name identifies the symbol by which the programmer
+#%using the
+#%.I \%term\%info
+#%API accesses the capability.
+#%.bP
+#%The TI
+#%.RI ( \%term\%info )
+#%code is the short name used by a person composing or updating a
+#%terminal type entry.
+#%.IP
+#%Whenever possible,
+#%these codes are the same as or similar to those of the ANSI X3.64-1979
+#%standard
+#%(now superseded by ECMA-48,
+#%which uses identical or very similar names).
+#%Semantics are also intended to match those of the specification.
+#%.IP
+#%.I \%term\%info
+#%codes have no hard length limit,
+#%but
+#%.I \%ncurses
+#%maintains an informal one of 5 characters to keep them short and to
+#%allow the tabs in the source file
+#%.I Caps
#%to line up nicely.
-#%
-#%Finally, the description field attempts to convey the semantics of the
-#%capability. You may find some codes in the description field:
-#%.TP
-#%(P)
-#%indicates that padding may be specified
+#%(Some standard codes exceed this limit regardless.)
+#%.bP
+#%The TC
+#%.RI ( termcap )
+#%code is that used by the corresponding API of
+#%.IR \%ncurses .
+#%(Some capabilities are new,
+#%and have names that BSD
+#%.I termcap
+#%did not originate.)
+#%.bP
+#%The description field attempts to convey the capability's semantics.
+#%.PP
+#%The description field employs a handful of notations.
#%.TP
-#%#[1-9]
-#%in the description field indicates that the string is passed
-#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
-#%.IP
-#%If no parameters are listed in the description,
-#%passing the string through \fBtparm\fP(3X) may give unexpected results,
-#%e.g., if it contains percent (%%) signs.
+#%.B (P)
+#%indicates that padding may be specified.
#%.TP
-#%(P*)
-#%indicates that padding may vary in proportion to the number of
-#%lines affected
+#%.B (P*)
+#%indicates that padding may vary in proportion to the number of output
+#%lines affected.
#%.TP
-#%(#\d\fIi\fP\u)
-#%indicates the \fIi\fP\uth\d parameter.
-#%
+#%.BI # i
+#%indicates the
+#%.IR i th
+#%parameter of a string capability;
+#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
+#%parameters listed.
+#%.IP
+#%If the description lists no parameters,
+#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
+#%behavior,
+#%for instance if the string contains percent signs.
+#%.
#%.PP
-#% These are the boolean capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBBooleans name Code\fR
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Boolean Capability Name TI TC Description
+#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@@ -252,18 +288,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
-#%.ad
-#%
-#%These are the numeric capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@@ -282,20 +316,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
-#%but are not yet documented in the man page. They came in with SVr4's
-#%printer support.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%but are not yet documented in the man page.
+#%They came in with SVr4's printer support.
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@@ -314,18 +349,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
-#%.ad
-#%
-#%These are the string capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@@ -388,6 +421,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@@ -414,8 +451,8 @@ key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
-keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
-keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+keypad_local rmkx str ke - - YBCGE leave keyboard transmit mode
+keypad_xmit smkx str ks - - YBCGE enter keyboard transmit mode
lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
lab_f10 lf10 str la - - ----- label on function key f10 if not f10
@@ -450,6 +487,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@@ -516,6 +557,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@@ -578,6 +623,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@@ -601,7 +650,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
-set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@@ -646,6 +695,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@@ -691,19 +744,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw18.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@@ -712,7 +766,7 @@ get_mouse getm str Gm - - ----- Curses should get button events, parameter #1
set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
-device_type devt str dv - - ----- Indicate language/codeset support
+device_type devt str dv - - ----- Indicate language, codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
@@ -740,9 +794,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
-#%.ad
-#%
-#%.in .8i
+#%.PP
+#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@@ -751,15 +804,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
@@ -769,7 +823,6 @@ enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
-#%.ad
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@@ -883,7 +936,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
-# mytinfo described this as a termcap capability, but it's not listed in the
+# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
diff --git a/include/Caps-ncurses b/include/Caps-ncurses
index d8c8baca1fb3..f9a5da06911a 100644
--- a/include/Caps-ncurses
+++ b/include/Caps-ncurses
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2022,2023 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas E. Dickey
#
-# $Id: Caps-ncurses,v 1.10 2020/09/29 19:05:19 tom Exp $
+# $Id: Caps-ncurses,v 1.15 2023/10/28 21:55:47 tom Exp $
#
#############################################################################
#
@@ -344,6 +344,7 @@ infoalias ksel kslt IBM key_select
used_by ncurses
userdef CO num n number of indexed colors overlaying RGB space
userdef E3 str - clears the terminal's scrollback buffer.
+userdef NQ bool - terminal does not support query/response
userdef RGB bool - use direct colors with 1/3 of color-pair bits per color.
userdef RGB num n use direct colors with given number of bits per color.
userdef RGB str - use direct colors with given bit-layout.
@@ -401,7 +402,21 @@ userdef Ss str n change the cursor style.
userdef rmxx str - reset ECMA-48 strikeout/crossed-out attributes.
userdef smxx str - set ECMA-48 strikeout/crossed-out attributes.
#
+used_by vim
+userdef BD str - disables bracketed paste
+userdef BE str - enables bracketed paste
+userdef PE str - is sent after pasted text
+userdef PS str - is sent before pasted text
+userdef RV str - report terminal secondary device attributes
+userdef XR str - report terminal version as a free-format string.
+userdef XF bool - terminal supports xterm focus in/out
+userdef fd str - disable xterm focus-events
+userdef fe str - enable xterm focus-events
+userdef rv str - response to RV, regular expression
+userdef xr str - response to XR, regular expression
+#
used_by xterm
+userdef csl str - clear status line
userdef kDC3 str - alt delete-character
userdef kDC4 str - shift+alt delete-character
userdef kDC5 str - control delete-character
@@ -458,4 +473,6 @@ userdef ka2 str - vt220-keypad extensions
userdef kb1 str - vt220-keypad extensions
userdef kb3 str - vt220-keypad extensions
userdef kc2 str - vt220-keypad extensions
+userdef kxIN str - mouse response on focus-in
+userdef kxOUT str - mouse response on focus-out
#############################################################################
diff --git a/include/Caps.aix4 b/include/Caps.aix4
index a27f2699582b..1adb848e08b1 100644
--- a/include/Caps.aix4
+++ b/include/Caps.aix4
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.aix4,v 1.18 2020/10/17 21:30:19 tom Exp $
+# $Id: Caps.aix4,v 1.28 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
@@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
-# Column 3: capability type (boolean, numeric, or string)
+# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
-# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@@ -98,8 +98,8 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
-# as a terminfo object, and breaking this would be bad. It's up to the ncurses
-# library what to do with the terminfo data after it's read in.
+# as a terminfo object, and breaking this would be bad. It is up to the ncurses
+# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
-# format). It's up to you what you have the compiler do with it.
+# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
+# FORMATTING THE TABLES
+#
+# We manually specify a (minimum) column width for the capability name
+# and terminfo code columns in the tables to achieve a consistent
+# arrangement; as used here, tbl(1) cannot know the width required by
+# one table's data while formatting another's.
+#
+# The longest capability names (C variables) are
+# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
+# 25n), and the longest terminfo code is "setcolor" (8n).
+#
+# The tables are a tight fit on traditional man(7) implementations that
+# use a line length of 65n, and the "Description" column has little room
+# within which the formatter can make breaking or adjustment decisions.
+# Words like "micro_..._address" and "parm_..._micro" don't break.
+# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
+#
#############################################################################
#
# STANDARD CAPABILITIES
#
-#%The following is a complete table of the capabilities included in a
-#%terminfo description block and available to terminfo-using code. In each
-#%line of the table,
-#%
-#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
-#%accesses the capability.
-#%
-#%The \fBcapname\fR is the short name used in the text of the database,
-#%and is used by a person updating the database.
-#%Whenever possible, capnames are chosen to be the same as or similar to
-#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
-#%identical or very similar names). Semantics are also intended to match
-#%those of the specification.
-#%
-#%The termcap code is the old
-#%.B termcap
-#%capability name (some capabilities are new, and have names which termcap
-#%did not originate).
-#%.P
-#%Capability names have no hard length limit, but an informal limit of 5
-#%characters has been adopted to keep them short and to allow the tabs in
-#%the source file
-#%.B Caps
+#%Tables of capabilities
+#%.I \%ncurses
+#%recognizes in a
+#%.I \%term\%info
+#%terminal type description and available to
+#%.IR \%term\%info -using
+#%code follow.
+#%.bP
+#%The capability name identifies the symbol by which the programmer
+#%using the
+#%.I \%term\%info
+#%API accesses the capability.
+#%.bP
+#%The TI
+#%.RI ( \%term\%info )
+#%code is the short name used by a person composing or updating a
+#%terminal type entry.
+#%.IP
+#%Whenever possible,
+#%these codes are the same as or similar to those of the ANSI X3.64-1979
+#%standard
+#%(now superseded by ECMA-48,
+#%which uses identical or very similar names).
+#%Semantics are also intended to match those of the specification.
+#%.IP
+#%.I \%term\%info
+#%codes have no hard length limit,
+#%but
+#%.I \%ncurses
+#%maintains an informal one of 5 characters to keep them short and to
+#%allow the tabs in the source file
+#%.I Caps
#%to line up nicely.
-#%
-#%Finally, the description field attempts to convey the semantics of the
-#%capability. You may find some codes in the description field:
-#%.TP
-#%(P)
-#%indicates that padding may be specified
+#%(Some standard codes exceed this limit regardless.)
+#%.bP
+#%The TC
+#%.RI ( termcap )
+#%code is that used by the corresponding API of
+#%.IR \%ncurses .
+#%(Some capabilities are new,
+#%and have names that BSD
+#%.I termcap
+#%did not originate.)
+#%.bP
+#%The description field attempts to convey the capability's semantics.
+#%.PP
+#%The description field employs a handful of notations.
#%.TP
-#%#[1-9]
-#%in the description field indicates that the string is passed
-#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
-#%.IP
-#%If no parameters are listed in the description,
-#%passing the string through \fBtparm\fP(3X) may give unexpected results,
-#%e.g., if it contains percent (%%) signs.
+#%.B (P)
+#%indicates that padding may be specified.
#%.TP
-#%(P*)
-#%indicates that padding may vary in proportion to the number of
-#%lines affected
+#%.B (P*)
+#%indicates that padding may vary in proportion to the number of output
+#%lines affected.
#%.TP
-#%(#\d\fIi\fP\u)
-#%indicates the \fIi\fP\uth\d parameter.
-#%
+#%.BI # i
+#%indicates the
+#%.IR i th
+#%parameter of a string capability;
+#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
+#%parameters listed.
+#%.IP
+#%If the description lists no parameters,
+#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
+#%behavior,
+#%for instance if the string contains percent signs.
+#%.
#%.PP
-#% These are the boolean capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBBooleans name Code\fR
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Boolean Capability Name TI TC Description
+#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@@ -252,18 +288,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
-#%.ad
-#%
-#%These are the numeric capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@@ -282,20 +316,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
-#%but are not yet documented in the man page. They came in with SVr4's
-#%printer support.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%but are not yet documented in the man page.
+#%They came in with SVr4's printer support.
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@@ -314,18 +349,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
-#%.ad
-#%
-#%These are the string capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@@ -388,6 +421,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@@ -450,6 +487,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@@ -598,6 +639,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@@ -671,6 +716,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@@ -703,7 +752,7 @@ key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
-set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@@ -748,6 +797,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@@ -793,19 +846,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw18.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@@ -842,9 +896,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
-#%.ad
-#%
-#%.in .8i
+#%.PP
+#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@@ -853,15 +906,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
#enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
#enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
#enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
@@ -871,7 +925,6 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
-#%.ad
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@@ -985,7 +1038,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
-# mytinfo described this as a termcap capability, but it's not listed in the
+# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
diff --git a/include/Caps.hpux11 b/include/Caps.hpux11
index 712a74297f6a..723556fa18f4 100644
--- a/include/Caps.hpux11
+++ b/include/Caps.hpux11
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2002-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.hpux11,v 1.16 2020/10/17 21:30:19 tom Exp $
+# $Id: Caps.hpux11,v 1.26 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
@@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
-# Column 3: capability type (boolean, numeric, or string)
+# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
-# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@@ -98,8 +98,8 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
-# as a terminfo object, and breaking this would be bad. It's up to the ncurses
-# library what to do with the terminfo data after it's read in.
+# as a terminfo object, and breaking this would be bad. It is up to the ncurses
+# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
-# format). It's up to you what you have the compiler do with it.
+# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
+# FORMATTING THE TABLES
+#
+# We manually specify a (minimum) column width for the capability name
+# and terminfo code columns in the tables to achieve a consistent
+# arrangement; as used here, tbl(1) cannot know the width required by
+# one table's data while formatting another's.
+#
+# The longest capability names (C variables) are
+# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
+# 25n), and the longest terminfo code is "setcolor" (8n).
+#
+# The tables are a tight fit on traditional man(7) implementations that
+# use a line length of 65n, and the "Description" column has little room
+# within which the formatter can make breaking or adjustment decisions.
+# Words like "micro_..._address" and "parm_..._micro" don't break.
+# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
+#
#############################################################################
#
# STANDARD CAPABILITIES
#
-#%The following is a complete table of the capabilities included in a
-#%terminfo description block and available to terminfo-using code. In each
-#%line of the table,
-#%
-#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
-#%accesses the capability.
-#%
-#%The \fBcapname\fR is the short name used in the text of the database,
-#%and is used by a person updating the database.
-#%Whenever possible, capnames are chosen to be the same as or similar to
-#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
-#%identical or very similar names). Semantics are also intended to match
-#%those of the specification.
-#%
-#%The termcap code is the old
-#%.B termcap
-#%capability name (some capabilities are new, and have names which termcap
-#%did not originate).
-#%.P
-#%Capability names have no hard length limit, but an informal limit of 5
-#%characters has been adopted to keep them short and to allow the tabs in
-#%the source file
-#%.B Caps
+#%Tables of capabilities
+#%.I \%ncurses
+#%recognizes in a
+#%.I \%term\%info
+#%terminal type description and available to
+#%.IR \%term\%info -using
+#%code follow.
+#%.bP
+#%The capability name identifies the symbol by which the programmer
+#%using the
+#%.I \%term\%info
+#%API accesses the capability.
+#%.bP
+#%The TI
+#%.RI ( \%term\%info )
+#%code is the short name used by a person composing or updating a
+#%terminal type entry.
+#%.IP
+#%Whenever possible,
+#%these codes are the same as or similar to those of the ANSI X3.64-1979
+#%standard
+#%(now superseded by ECMA-48,
+#%which uses identical or very similar names).
+#%Semantics are also intended to match those of the specification.
+#%.IP
+#%.I \%term\%info
+#%codes have no hard length limit,
+#%but
+#%.I \%ncurses
+#%maintains an informal one of 5 characters to keep them short and to
+#%allow the tabs in the source file
+#%.I Caps
#%to line up nicely.
-#%
-#%Finally, the description field attempts to convey the semantics of the
-#%capability. You may find some codes in the description field:
-#%.TP
-#%(P)
-#%indicates that padding may be specified
+#%(Some standard codes exceed this limit regardless.)
+#%.bP
+#%The TC
+#%.RI ( termcap )
+#%code is that used by the corresponding API of
+#%.IR \%ncurses .
+#%(Some capabilities are new,
+#%and have names that BSD
+#%.I termcap
+#%did not originate.)
+#%.bP
+#%The description field attempts to convey the capability's semantics.
+#%.PP
+#%The description field employs a handful of notations.
#%.TP
-#%#[1-9]
-#%in the description field indicates that the string is passed
-#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
-#%.IP
-#%If no parameters are listed in the description,
-#%passing the string through \fBtparm\fP(3X) may give unexpected results,
-#%e.g., if it contains percent (%%) signs.
+#%.B (P)
+#%indicates that padding may be specified.
#%.TP
-#%(P*)
-#%indicates that padding may vary in proportion to the number of
-#%lines affected
+#%.B (P*)
+#%indicates that padding may vary in proportion to the number of output
+#%lines affected.
#%.TP
-#%(#\d\fIi\fP\u)
-#%indicates the \fIi\fP\uth\d parameter.
-#%
+#%.BI # i
+#%indicates the
+#%.IR i th
+#%parameter of a string capability;
+#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
+#%parameters listed.
+#%.IP
+#%If the description lists no parameters,
+#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
+#%behavior,
+#%for instance if the string contains percent signs.
+#%.
#%.PP
-#% These are the boolean capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBBooleans name Code\fR
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Boolean Capability Name TI TC Description
+#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@@ -235,7 +271,7 @@ dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t106
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
-# end booleans for HPUX 9, 10 (non-color curses)
+# end Booleans for HPUX 9, 10 (non-color curses)
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
hard_cursor chts bool HC - - ----- cursor is hard to see
@@ -253,18 +289,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
-#%.ad
-#%
-#%These are the numeric capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@@ -284,20 +318,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
-#%but are not yet documented in the man page. They came in with SVr4's
-#%printer support.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%but are not yet documented in the man page.
+#%They came in with SVr4's printer support.
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@@ -316,18 +351,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
-#%.ad
-#%
-#%These are the string capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@@ -390,6 +423,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@@ -452,6 +489,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@@ -517,6 +558,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@@ -577,6 +622,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@@ -609,7 +658,7 @@ key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
-set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@@ -654,6 +703,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@@ -699,19 +752,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw18.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@@ -748,9 +802,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
-#%.ad
-#%
-#%.in .8i
+#%.PP
+#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@@ -759,17 +812,18 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
-#%
+#%.
#%AIX and Solaris do not provide termcap names for these; HPUX does.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
enter_horizontal_hl_mode ehhlm str Q1 - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Q2 - - ----- Enter left highlight mode
@@ -785,7 +839,6 @@ exit_right_hl_mode rmrhlm str Qb - - ----K Exit right highlight mode
exit_top_hl_mode rmthlm str Qc - - ----K Exit top highlight mode
exit_vertical_hl_mode rmvhlm str Qd - - ----K Exit vertical highlight mode
#%.TE
-#%.ad
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@@ -899,7 +952,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
-# mytinfo described this as a termcap capability, but it's not listed in the
+# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
diff --git a/include/Caps.keys b/include/Caps.keys
index 018f68474fda..6f8a84e3455f 100644
--- a/include/Caps.keys
+++ b/include/Caps.keys
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -30,7 +30,7 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
-# $Id: Caps.keys,v 1.15 2020/10/17 21:30:19 tom Exp $
+# $Id: Caps.keys,v 1.25 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
@@ -50,7 +50,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
-# Column 3: capability type (boolean, numeric, or string)
+# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@@ -60,7 +60,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
-# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@@ -100,8 +100,8 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
-# as a terminfo object, and breaking this would be bad. It's up to the ncurses
-# library what to do with the terminfo data after it's read in.
+# as a terminfo object, and breaking this would be bad. It is up to the ncurses
+# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@@ -110,7 +110,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
-# format). It's up to you what you have the compiler do with it.
+# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@@ -155,67 +155,104 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
+# FORMATTING THE TABLES
+#
+# We manually specify a (minimum) column width for the capability name
+# and terminfo code columns in the tables to achieve a consistent
+# arrangement; as used here, tbl(1) cannot know the width required by
+# one table's data while formatting another's.
+#
+# The longest capability names (C variables) are
+# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
+# 25n), and the longest terminfo codes are "setcolor", "kcdelete",
+# "kcinsert", "kadelete", and "kcinsert" (8n).
+#
+# The tables are a tight fit on traditional man(7) implementations that
+# use a line length of 65n, and the "Description" column has little room
+# within which the formatter can make breaking or adjustment decisions.
+# Words like "micro_..._address" and "parm_..._micro" don't break.
+# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
+#
#############################################################################
#
# STANDARD CAPABILITIES
#
-#%The following is a complete table of the capabilities included in a
-#%terminfo description block and available to terminfo-using code. In each
-#%line of the table,
-#%
-#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
-#%accesses the capability.
-#%
-#%The \fBcapname\fR is the short name used in the text of the database,
-#%and is used by a person updating the database.
-#%Whenever possible, capnames are chosen to be the same as or similar to
-#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
-#%identical or very similar names). Semantics are also intended to match
-#%those of the specification.
-#%
-#%The termcap code is the old
-#%.B termcap
-#%capability name (some capabilities are new, and have names which termcap
-#%did not originate).
-#%.P
-#%Capability names have no hard length limit, but an informal limit of 5
-#%characters has been adopted to keep them short and to allow the tabs in
-#%the source file
-#%.B Caps
+#%Tables of capabilities
+#%.I \%ncurses
+#%recognizes in a
+#%.I \%term\%info
+#%terminal type description and available to
+#%.IR \%term\%info -using
+#%code follow.
+#%.bP
+#%The capability name identifies the symbol by which the programmer
+#%using the
+#%.I \%term\%info
+#%API accesses the capability.
+#%.bP
+#%The TI
+#%.RI ( \%term\%info )
+#%code is the short name used by a person composing or updating a
+#%terminal type entry.
+#%.IP
+#%Whenever possible,
+#%these codes are the same as or similar to those of the ANSI X3.64-1979
+#%standard
+#%(now superseded by ECMA-48,
+#%which uses identical or very similar names).
+#%Semantics are also intended to match those of the specification.
+#%.IP
+#%.I \%term\%info
+#%codes have no hard length limit,
+#%but
+#%.I \%ncurses
+#%maintains an informal one of 5 characters to keep them short and to
+#%allow the tabs in the source file
+#%.I Caps
#%to line up nicely.
-#%
-#%Finally, the description field attempts to convey the semantics of the
-#%capability. You may find some codes in the description field:
-#%.TP
-#%(P)
-#%indicates that padding may be specified
+#%(Some standard codes exceed this limit regardless.)
+#%.bP
+#%The TC
+#%.RI ( termcap )
+#%code is that used by the corresponding API of
+#%.IR \%ncurses .
+#%(Some capabilities are new,
+#%and have names that BSD
+#%.I termcap
+#%did not originate.)
+#%.bP
+#%The description field attempts to convey the capability's semantics.
+#%.PP
+#%The description field employs a handful of notations.
#%.TP
-#%#[1-9]
-#%in the description field indicates that the string is passed
-#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
-#%.IP
-#%If no parameters are listed in the description,
-#%passing the string through \fBtparm\fP(3X) may give unexpected results,
-#%e.g., if it contains percent (%%) signs.
+#%.B (P)
+#%indicates that padding may be specified.
#%.TP
-#%(P*)
-#%indicates that padding may vary in proportion to the number of
-#%lines affected
+#%.B (P*)
+#%indicates that padding may vary in proportion to the number of output
+#%lines affected.
#%.TP
-#%(#\d\fIi\fP\u)
-#%indicates the \fIi\fP\uth\d parameter.
-#%
+#%.BI # i
+#%indicates the
+#%.IR i th
+#%parameter of a string capability;
+#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
+#%parameters listed.
+#%.IP
+#%If the description lists no parameters,
+#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
+#%behavior,
+#%for instance if the string contains percent signs.
+#%.
#%.PP
-#% These are the boolean capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBBooleans name Code\fR
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Boolean Capability Name TI TC Description
+#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@@ -254,18 +291,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
-#%.ad
-#%
-#%These are the numeric capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@@ -284,20 +319,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
-#%but are not yet documented in the man page. They came in with SVr4's
-#%printer support.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%but are not yet documented in the man page.
+#%They came in with SVr4's printer support.
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@@ -316,18 +352,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
-#%.ad
-#%
-#%These are the string capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@@ -390,6 +424,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@@ -452,6 +490,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@@ -518,6 +560,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@@ -580,6 +626,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@@ -603,7 +653,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
-set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@@ -736,6 +786,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@@ -781,19 +835,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
-#%.ad
-#%
+#%.PP
+#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw18.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@@ -830,9 +885,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
-#%.ad
-#%
-#%.in .8i
+#%.PP
+#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@@ -841,15 +895,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.
+#%.PP
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
@@ -859,7 +914,6 @@ enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
-#%.ad
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@@ -973,7 +1027,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
-# mytinfo described this as a termcap capability, but it's not listed in the
+# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
diff --git a/include/Caps.osf1r5 b/include/Caps.osf1r5
index 8a2955486ee9..ece14aef2ea7 100644
--- a/include/Caps.osf1r5
+++ b/include/Caps.osf1r5
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2002-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.osf1r5,v 1.14 2020/10/17 21:30:19 tom Exp $
+# $Id: Caps.osf1r5,v 1.24 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
@@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
-# Column 3: capability type (boolean, numeric, or string)
+# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
-# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@@ -98,8 +98,8 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
-# as a terminfo object, and breaking this would be bad. It's up to the ncurses
-# library what to do with the terminfo data after it's read in.
+# as a terminfo object, and breaking this would be bad. It is up to the ncurses
+# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
-# format). It's up to you what you have the compiler do with it.
+# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
+# FORMATTING THE TABLES
+#
+# We manually specify a (minimum) column width for the capability name
+# and terminfo code columns in the tables to achieve a consistent
+# arrangement; as used here, tbl(1) cannot know the width required by
+# one table's data while formatting another's.
+#
+# The longest capability names (C variables) are
+# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
+# 25n), and the longest terminfo code is "setcolor" (8n).
+#
+# The tables are a tight fit on traditional man(7) implementations that
+# use a line length of 65n, and the "Description" column has little room
+# within which the formatter can make breaking or adjustment decisions.
+# Words like "micro_..._address" and "parm_..._micro" don't break.
+# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
+#
#############################################################################
#
# STANDARD CAPABILITIES
#
-#%The following is a complete table of the capabilities included in a
-#%terminfo description block and available to terminfo-using code. In each
-#%line of the table,
-#%
-#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
-#%accesses the capability.
-#%
-#%The \fBcapname\fR is the short name used in the text of the database,
-#%and is used by a person updating the database.
-#%Whenever possible, capnames are chosen to be the same as or similar to
-#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
-#%identical or very similar names). Semantics are also intended to match
-#%those of the specification.
-#%
-#%The termcap code is the old
-#%.B termcap
-#%capability name (some capabilities are new, and have names which termcap
-#%did not originate).
-#%.P
-#%Capability names have no hard length limit, but an informal limit of 5
-#%characters has been adopted to keep them short and to allow the tabs in
-#%the source file
-#%.B Caps
+#%Tables of capabilities
+#%.I \%ncurses
+#%recognizes in a
+#%.I \%term\%info
+#%terminal type description and available to
+#%.IR \%term\%info -using
+#%code follow.
+#%.bP
+#%The capability name identifies the symbol by which the programmer
+#%using the
+#%.I \%term\%info
+#%API accesses the capability.
+#%.bP
+#%The TI
+#%.RI ( \%term\%info )
+#%code is the short name used by a person composing or updating a
+#%terminal type entry.
+#%.IP
+#%Whenever possible,
+#%these codes are the same as or similar to those of the ANSI X3.64-1979
+#%standard
+#%(now superseded by ECMA-48,
+#%which uses identical or very similar names).
+#%Semantics are also intended to match those of the specification.
+#%.IP
+#%.I \%term\%info
+#%codes have no hard length limit,
+#%but
+#%.I \%ncurses
+#%maintains an informal one of 5 characters to keep them short and to
+#%allow the tabs in the source file
+#%.I Caps
#%to line up nicely.
-#%
-#%Finally, the description field attempts to convey the semantics of the
-#%capability. You may find some codes in the description field:
-#%.TP
-#%(P)
-#%indicates that padding may be specified
+#%(Some standard codes exceed this limit regardless.)
+#%.bP
+#%The TC
+#%.RI ( termcap )
+#%code is that used by the corresponding API of
+#%.IR \%ncurses .
+#%(Some capabilities are new,
+#%and have names that BSD
+#%.I termcap
+#%did not originate.)
+#%.bP
+#%The description field attempts to convey the capability's semantics.
+#%.PP
+#%The description field employs a handful of notations.
#%.TP
-#%#[1-9]
-#%in the description field indicates that the string is passed
-#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
-#%.IP
-#%If no parameters are listed in the description,
-#%passing the string through \fBtparm\fP(3X) may give unexpected results,
-#%e.g., if it contains percent (%%) signs.
+#%.B (P)
+#%indicates that padding may be specified.
#%.TP
-#%(P*)
-#%indicates that padding may vary in proportion to the number of
-#%lines affected
+#%.B (P*)
+#%indicates that padding may vary in proportion to the number of output
+#%lines affected.
#%.TP
-#%(#\d\fIi\fP\u)
-#%indicates the \fIi\fP\uth\d parameter.
-#%
+#%.BI # i
+#%indicates the
+#%.IR i th
+#%parameter of a string capability;
+#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
+#%parameters listed.
+#%.IP
+#%If the description lists no parameters,
+#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
+#%behavior,
+#%for instance if the string contains percent signs.
+#%.
#%.PP
-#% These are the boolean capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBBooleans name Code\fR
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Boolean Capability Name TI TC Description
+#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@@ -252,18 +288,16 @@ prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
#%.TE
-#%.ad
-#%
-#%These are the numeric capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@@ -298,18 +332,16 @@ output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inc
print_rate cps num Ym - - ----- print rate in characters per second
wide_char_size widcs num Yn - - ----- character step size when in double wide mode
#%.TE
-#%.ad
-#%
-#%These are the string capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@@ -372,6 +404,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@@ -434,6 +470,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@@ -589,6 +629,10 @@ ena_acs enacs str eA - - ----- enable alternate char set
end_bit_image_region endbi str Yy - - ----- End a bit-image region
enter_am_mode smam str SA - - ----- turn on automatic margins
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@@ -635,6 +679,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@@ -673,6 +721,10 @@ key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
key_restart krst str &4 KEY_RESTART 0567 ----- restart key
key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@@ -743,7 +795,7 @@ set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
-set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
set_page_length slines str YZ - - ----- Set page length to #1 lines
@@ -891,7 +943,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
-# mytinfo described this as a termcap capability, but it's not listed in the
+# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
diff --git a/include/Caps.uwin b/include/Caps.uwin
index de0d5b77cae9..a41e9eca7a30 100644
--- a/include/Caps.uwin
+++ b/include/Caps.uwin
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.uwin,v 1.13 2020/10/17 21:30:19 tom Exp $
+# $Id: Caps.uwin,v 1.23 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
@@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
-# Column 3: capability type (boolean, numeric, or string)
+# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
-# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@@ -98,8 +98,8 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
-# as a terminfo object, and breaking this would be bad. It's up to the ncurses
-# library what to do with the terminfo data after it's read in.
+# as a terminfo object, and breaking this would be bad. It is up to the ncurses
+# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
-# format). It's up to you what you have the compiler do with it.
+# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
+# FORMATTING THE TABLES
+#
+# We manually specify a (minimum) column width for the capability name
+# and terminfo code columns in the tables to achieve a consistent
+# arrangement; as used here, tbl(1) cannot know the width required by
+# one table's data while formatting another's.
+#
+# The longest capability names (C variable) is
+# "hue_lightness_saturation" (24n), and the longest terminfo code is
+# "colornm" (7n).
+#
+# The tables are a tight fit on traditional man(7) implementations that
+# use a line length of 65n, and the "Description" column has little room
+# within which the formatter can make breaking or adjustment decisions.
+# Words like "micro_..._address" and "parm_..._micro" don't break.
+# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
+#
#############################################################################
#
# STANDARD CAPABILITIES
#
-#%The following is a complete table of the capabilities included in a
-#%terminfo description block and available to terminfo-using code. In each
-#%line of the table,
-#%
-#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
-#%accesses the capability.
-#%
-#%The \fBcapname\fR is the short name used in the text of the database,
-#%and is used by a person updating the database.
-#%Whenever possible, capnames are chosen to be the same as or similar to
-#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
-#%identical or very similar names). Semantics are also intended to match
-#%those of the specification.
-#%
-#%The termcap code is the old
-#%.B termcap
-#%capability name (some capabilities are new, and have names which termcap
-#%did not originate).
-#%.P
-#%Capability names have no hard length limit, but an informal limit of 5
-#%characters has been adopted to keep them short and to allow the tabs in
-#%the source file
-#%.B Caps
+#%Tables of capabilities
+#%.I \%ncurses
+#%recognizes in a
+#%.I \%term\%info
+#%terminal type description and available to
+#%.IR \%term\%info -using
+#%code follow.
+#%.bP
+#%The capability name identifies the symbol by which the programmer
+#%using the
+#%.I \%term\%info
+#%API accesses the capability.
+#%.bP
+#%The TI
+#%.RI ( \%term\%info )
+#%code is the short name used by a person composing or updating a
+#%terminal type entry.
+#%.IP
+#%Whenever possible,
+#%these codes are the same as or similar to those of the ANSI X3.64-1979
+#%standard
+#%(now superseded by ECMA-48,
+#%which uses identical or very similar names).
+#%Semantics are also intended to match those of the specification.
+#%.IP
+#%.I \%term\%info
+#%codes have no hard length limit,
+#%but
+#%.I \%ncurses
+#%maintains an informal one of 5 characters to keep them short and to
+#%allow the tabs in the source file
+#%.I Caps
#%to line up nicely.
-#%
-#%Finally, the description field attempts to convey the semantics of the
-#%capability. You may find some codes in the description field:
-#%.TP
-#%(P)
-#%indicates that padding may be specified
+#%(Some standard codes exceed this limit regardless.)
+#%.bP
+#%The TC
+#%.RI ( termcap )
+#%code is that used by the corresponding API of
+#%.IR \%ncurses .
+#%(Some capabilities are new,
+#%and have names that BSD
+#%.I termcap
+#%did not originate.)
+#%.bP
+#%The description field attempts to convey the capability's semantics.
+#%.PP
+#%The description field employs a handful of notations.
#%.TP
-#%#[1-9]
-#%in the description field indicates that the string is passed
-#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
-#%.IP
-#%If no parameters are listed in the description,
-#%passing the string through \fBtparm\fP(3X) may give unexpected results,
-#%e.g., if it contains percent (%%) signs.
+#%.B (P)
+#%indicates that padding may be specified.
#%.TP
-#%(P*)
-#%indicates that padding may vary in proportion to the number of
-#%lines affected
+#%.B (P*)
+#%indicates that padding may vary in proportion to the number of output
+#%lines affected.
#%.TP
-#%(#\d\fIi\fP\u)
-#%indicates the \fIi\fP\uth\d parameter.
-#%
+#%.BI # i
+#%indicates the
+#%.IR i th
+#%parameter of a string capability;
+#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
+#%parameters listed.
+#%.IP
+#%If the description lists no parameters,
+#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
+#%behavior,
+#%for instance if the string contains percent signs.
+#%.
#%.PP
-#% These are the boolean capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBBooleans name Code\fR
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
+#%\& Code \&
+#%Boolean Capability Name TI TC Description
+#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@@ -245,18 +281,16 @@ back_color_erase bce bool ut - - ----- screen erased with background color
can_change ccc bool cc - - ----- terminal can re-define existing colors
hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
#%.TE
-#%.ad
-#%
-#%These are the numeric capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBNumeric name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
+#%\& Code \&
+#%Numeric Capability Name TI TC Description
+#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@@ -276,24 +310,16 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
-#%.ad
-#%
-#%The following numeric capabilities are present in the SVr4.0 term structure,
-#%but are not yet documented in the man page. They came in with SVr4's
-#%printer support.
-#%
-#%.na
-#%
-#%These are the string capabilities:
-#%
-#%.na
-#%.TS H
-#%center expand;
-#%c l l c
-#%c l l c
-#%lw25 lw6 lw2 lw20.
-#%\fBVariable Cap- TCap Description\fR
-#%\fBString name Code\fR
+#%.PP
+#%.
+#%.TS
+#%center;
+#%Lb Cb S Lb
+#%Lb Lb Lb Lb
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
+#%\& Code \&
+#%String Capability Name TI TC Description
+#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@@ -356,6 +382,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@@ -418,6 +448,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
+#%.TE
+#%.TS
+#%center;
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@@ -484,6 +518,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@@ -546,6 +584,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+#%.TE
+#%.TS
+#%center;
+#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@@ -569,7 +611,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
-set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
device_type devt str dv - - ----- Indicate language/codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
@@ -593,7 +635,6 @@ set_background setb str Sb - - ----- Set background color #1
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
#%.TE
-#%.ad
#%
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@@ -707,7 +748,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
-# mytinfo described this as a termcap capability, but it's not listed in the
+# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh
index 86d6891c3693..e58ee2b65d79 100755
--- a/include/MKkey_defs.sh
+++ b/include/MKkey_defs.sh
@@ -1,7 +1,7 @@
#! /bin/sh
-# $Id: MKkey_defs.sh,v 1.21 2020/08/17 10:45:33 tom Exp $
+# $Id: MKkey_defs.sh,v 1.24 2024/01/19 12:26:17 tom Exp $
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2022,2024 Thomas E. Dickey #
# Copyright 2001-2013,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -35,7 +35,7 @@
#
# Extract function-key definitions from the Caps file
#
-: ${AWK-awk}
+: "${AWK-awk}"
test $# = 0 && set Caps
@@ -44,7 +44,8 @@ pass1=pass1_$$
pass2=pass2_$$
pass3=pass3_$$
pass4=pass4_$$
-trap 'rm -f $data pass[1234]_$$' EXIT INT QUIT TERM HUP
+trap 'rm -f $data pass[1234]_$$; exit 1' 1 2 3 15
+trap 'rm -f $data pass[1234]_$$' 0
# change repeated tabs (used for readability) to single tabs (needed to make
# awk see the right field alignment of the corresponding columns):
@@ -63,10 +64,10 @@ fi
# add keys that we generate automatically:
cat >>$data <<EOF
-key_resize kr1 str R1 KEY_RESIZE + NCURSES_EXT_FUNCS Terminal resize event
+key_resize kr1 str R1 KEY_RESIZE + NCURSES_SIGWINCH Terminal resize event
EOF
-THIS=./`basename $0`
+THIS=./`basename "$0"`
cat <<EOF
/*
@@ -145,7 +146,7 @@ $5 != "-" && $6 != "-" {
if (index($7,"NCURSES_") == 1) {
ifdef = 1;
printf "\n";
- printf "#ifdef %s\n", $7;
+ printf "#if %s\n", $7;
}
if ($5 == "KEY_F(0)" ) {
printf "#define "
diff --git a/include/MKncurses_def.sh b/include/MKncurses_def.sh
index 81f39d23161e..22d80c2331ae 100755
--- a/include/MKncurses_def.sh
+++ b/include/MKncurses_def.sh
@@ -1,7 +1,7 @@
#! /bin/sh
-# $Id: MKncurses_def.sh,v 1.4 2020/02/02 23:34:34 tom Exp $
+# $Id: MKncurses_def.sh,v 1.5 2022/07/16 17:03:59 tom Exp $
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2022 Thomas E. Dickey #
# Copyright 2000,2003 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -56,7 +56,7 @@ cat <<EOF
EOF
-${AWK-awk} <$DEFS '
+"${AWK-awk}" <"$DEFS" '
!/^[@#]/ {
if ( NF == 1 )
{
diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in
index c93cdeac6971..a93d8e86e9c1 100644
--- a/include/MKterm.h.awk.in
+++ b/include/MKterm.h.awk.in
@@ -26,7 +26,7 @@ BEGIN {
lcurl = "{";
rcurl = "}";
print "/****************************************************************************"
- print " * Copyright 2018-2019,2020 Thomas E. Dickey *"
+ print " * Copyright 2018-2021,2023 Thomas E. Dickey *"
print " * Copyright 1998-2013,2017 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
@@ -60,7 +60,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
- print "/* $Id: MKterm.h.awk.in,v 1.78 2020/10/31 23:14:24 tom Exp $ */"
+ print "/* $Id: MKterm.h.awk.in,v 1.85 2023/04/23 19:15:36 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@@ -244,28 +244,28 @@ END {
print " * The only reason these structures are visible is for read-only use."
print " * Programs which modify the data are not, never were, portable across"
print " * curses implementations."
+ print " *"
+ print " * The first field in TERMINAL is used in macros."
+ print " * The remaining fields are private."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
+ print "#undef TERMINAL"
+ print "#define TERMINAL struct term"
+ print "TERMINAL;"
+ print ""
if (@NCURSES_EXT_COLORS@) {
declare_termtype("int","2");
} else {
- print "typedef TERMTYPE TERMTYPE2;"
+ print "#undef TERMTYPE2"
+ print "#define TERMTYPE2 TERMTYPE"
}
+ print "#else"
print ""
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
- print " short Filedes; /* file description being written to */"
- print " TTY Ottyb; /* original state of the terminal */"
- print " TTY Nttyb; /* current state of the terminal */"
- print " int _baudrate; /* used to compute padding */"
- print " char * _termname; /* used for termname() */"
- if (@NCURSES_EXT_COLORS@) {
- print " TERMTYPE2 type2; /* extended terminal type description */"
- }
print "} TERMINAL;"
- print "#else"
- print "typedef struct term TERMINAL;"
+ print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
@@ -325,16 +325,11 @@ END {
print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
print "extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);"
- print ""
- print "#endif /* NCURSES_INTERNALS */"
- print ""
- print ""
- print "/*"
- print " * These entrypoints are used by tack 1.07."
- print " */"
print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print ""
+ print "#endif /* NCURSES_INTERNALS */"
+ print ""
print "/*"
print " * Normal entry points"
print " */"
@@ -360,6 +355,8 @@ END {
print "#endif"
print ""
print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
+ print "extern NCURSES_EXPORT(char *) tiparm_s (int, int, const char *, ...); /* special */"
+ print "extern NCURSES_EXPORT(int) tiscan_s (int *, int *, const char *); /* special */"
print ""
print "#endif /* __NCURSES_H */"
print ""
@@ -406,7 +403,7 @@ END {
print "/*"
print " * Debugging features."
print " */"
- print "extern NCURSES_EXPORT(void) exit_terminfo(int) GCC_NORETURN;"
+ print "extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);"
print ""
print "#ifdef __cplusplus"
printf "%s\n", rcurl;
diff --git a/include/Makefile.in b/include/Makefile.in
index b911f8eadce1..351383b0ebc9 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.51 2020/09/18 22:55:10 tom Exp $
+# $Id: Makefile.in,v 1.53 2021/07/03 18:56:51 tom Exp $
##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2019-2020,2021 Thomas E. Dickey #
# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -92,6 +92,21 @@ AUTO_SRC = \
term.h
################################################################################
+
+@MAKE_PHONY@.PHONY : all
+@MAKE_PHONY@.PHONY : check
+@MAKE_PHONY@.PHONY : clean
+@MAKE_PHONY@.PHONY : depend
+@MAKE_PHONY@.PHONY : distclean
+@MAKE_PHONY@.PHONY : install
+@MAKE_PHONY@.PHONY : install.libs
+@MAKE_PHONY@.PHONY : libs
+@MAKE_PHONY@.PHONY : mostlyclean
+@MAKE_PHONY@.PHONY : realclean
+@MAKE_PHONY@.PHONY : sources
+@MAKE_PHONY@.PHONY : uninstall
+@MAKE_PHONY@.PHONY : uninstall.libs
+
all \
libs \
depend \
diff --git a/include/capdefaults.c b/include/capdefaults.c
index 951a9ca4bb5c..0bdda14dee2d 100644
--- a/include/capdefaults.c
+++ b/include/capdefaults.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -33,11 +33,11 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: capdefaults.c,v 1.15 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: capdefaults.c,v 1.16 2021/09/04 10:52:55 tom Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file is
- * that the two places where it's needed want the macros to generate
+ * that the two places where it is needed require the macros to generate
* offsets to different structures. See the file Caps for explanations of
* these conversions.
*
diff --git a/include/curses.events b/include/curses.events
index 25a2583fc9b5..2509b1bf703a 100644
--- a/include/curses.events
+++ b/include/curses.events
@@ -1,4 +1,4 @@
-/* $Id*/
+/* $Id: curses.events,v 1.4 2024/01/19 09:24:17 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@@ -50,6 +50,6 @@ typedef struct
extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
-#define KEY_EVENT 0633 /* We were interrupted by an event */
+#define KEY_EVENT 0634 /* We were interrupted by an event */
#endif /* NCURSES_WGETCH_EVENTS */
diff --git a/include/curses.h.in b/include/curses.h.in
index c516b22c1fe4..8cfa0b9ff8d6 100644
--- a/include/curses.h.in
+++ b/include/curses.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2023,2024 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -33,11 +33,40 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: curses.h.in,v 1.269 2020/08/17 14:14:12 tom Exp $ */
+/* $Id: curses.h.in,v 1.282 2024/01/19 11:50:07 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
+/*
+ The symbols beginning NCURSES_ or USE_ are configuration choices.
+ A few of the former can be overridden by applications at compile-time.
+ Most of the others correspond to configure-script options (or checks
+ by the configure-script for features of the system on which it is built).
+
+ These symbols can be overridden by applications at compile-time:
+ NCURSES_NOMACROS suppresses macro definitions in favor of functions
+ NCURSES_WATTR_MACROS suppresses wattr_* macro definitions
+ NCURSES_WIDECHAR is an alternative for declaring wide-character functions.
+
+ These symbols are used only when building ncurses:
+ NCURSES_ATTR_T
+ NCURSES_FIELD_INTERNALS
+ NCURSES_INTERNALS
+
+ These symbols are set by the configure script:
+ NCURSES_ENABLE_STDBOOL_H
+ NCURSES_EXPANDED
+ NCURSES_EXT_COLORS
+ NCURSES_EXT_FUNCS
+ NCURSES_EXT_PUTWIN
+ NCURSES_NO_PADDING
+ NCURSES_OSPEED_COMPAT
+ NCURSES_PATHSEP
+ NCURSES_REENTRANT
+ NCURSES_SIGWINCH
+ */
+
#define CURSES 1
#define CURSES_H 1
@@ -60,10 +89,22 @@
*/
#include <ncurses_dll.h>
+/*
+ * Extra headers.
+ */
#if @HAVE_STDINT_H@
#include <stdint.h>
#endif
+#ifdef __cplusplus
+#else
+#if @HAVE_STDNORETURN_H@
+#include <stdnoreturn.h>
+#undef GCC_NORETURN
+#define GCC_NORETURN _Noreturn
+#endif
+#endif
+
/*
* User-definable tweak to disable the include of <stdbool.h>.
*/
@@ -131,6 +172,19 @@
#endif
/*
+ * KEY_RESIZE is an extended feature that relies upon the SIGWINCH handler
+ * in ncurses.
+ */
+#if @NCURSES_EXT_FUNCS@
+#ifndef NCURSES_SIGWINCH
+#define NCURSES_SIGWINCH @cf_cv_enable_sigwinch@
+#endif
+#else
+#undef NCURSES_SIGWINCH
+#define NCURSES_SIGWINCH 0
+#endif
+
+/*
* In certain environments, we must work around linker problems for data
*/
#undef NCURSES_BROKEN_LINKER
@@ -391,7 +445,14 @@ extern NCURSES_EXPORT_VAR(chtype) acs_map[];
*/
#define _NEWINDEX -1
+#ifdef NCURSES_INTERNALS
+#undef SCREEN
+#define SCREEN struct screen
+SCREEN;
+#else
typedef struct screen SCREEN;
+#endif
+
typedef struct _win_st WINDOW;
typedef chtype attr_t; /* ...must be at least as wide as chtype */
@@ -510,14 +571,10 @@ struct _win_st
/*
* We cannot define these in ncurses_cfg.h, since they require parameters to be
- * passed (that is non-portable). If you happen to be using gcc with warnings
- * enabled, define
- * GCC_PRINTF
- * GCC_SCANF
- * to improve checking of calls to printw(), etc.
+ * passed (that is non-portable).
*/
#ifndef GCC_PRINTFLIKE
-#if defined(GCC_PRINTF) && !defined(printf)
+#ifndef printf
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#else
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
@@ -525,7 +582,7 @@ struct _win_st
#endif
#ifndef GCC_SCANFLIKE
-#if defined(GCC_SCANF) && !defined(scanf)
+#ifndef scanf
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
#else
#define GCC_SCANFLIKE(fmt,var) /*nothing*/
@@ -773,10 +830,14 @@ extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */
extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */
extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */
extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */
-extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list) GCC_DEPRECATED(use vw_printw); /* implemented */
-extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* implemented */
-extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *,va_list) GCC_DEPRECATED(use vw_scanw); /* implemented */
-extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *,va_list); /* implemented */
+extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_printw) /* implemented */
+ GCC_PRINTFLIKE(2,0);
+extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *, va_list) /* implemented */
+ GCC_PRINTFLIKE(2,0);
+extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_scanw) /* implemented */
+ GCC_SCANFLIKE(2,0);
+extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *, va_list) /* implemented */
+ GCC_SCANFLIKE(2,0);
extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */
extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */
extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */
@@ -849,6 +910,8 @@ extern NCURSES_EXPORT(char *) tparm (const char *, NCURSES_TPARM_ARG,NCURSES_TPA
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
+extern NCURSES_EXPORT(char *) tiparm_s (int, int, const char *, ...); /* special */
+extern NCURSES_EXPORT(int) tiscan_s (int *, int *, const char *); /* special */
/*
* These functions are not in X/Open, but we use them in macro definitions:
@@ -878,11 +941,9 @@ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */
#define NCURSES_EXT_FUNCS @NCURSES_PATCH@
typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);
typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);
-extern NCURSES_EXPORT(bool) is_term_resized (int, int);
-extern NCURSES_EXPORT(char *) keybound (int, int);
-extern NCURSES_EXPORT(const char *) curses_version (void);
extern NCURSES_EXPORT(int) alloc_pair (int, int);
extern NCURSES_EXPORT(int) assume_default_colors (int, int);
+extern NCURSES_EXPORT(const char *) curses_version (void);
extern NCURSES_EXPORT(int) define_key (const char *, int);
extern NCURSES_EXPORT(int) extended_color_content(int, int *, int *, int *);
extern NCURSES_EXPORT(int) extended_pair_content(int, int *, int *);
@@ -892,20 +953,31 @@ extern NCURSES_EXPORT(int) free_pair (int);
extern NCURSES_EXPORT(int) get_escdelay (void);
extern NCURSES_EXPORT(int) init_extended_color(int, int, int, int);
extern NCURSES_EXPORT(int) init_extended_pair(int, int, int);
+extern NCURSES_EXPORT(int) is_cbreak(void);
+extern NCURSES_EXPORT(int) is_echo(void);
+extern NCURSES_EXPORT(int) is_nl(void);
+extern NCURSES_EXPORT(int) is_raw(void);
+extern NCURSES_EXPORT(bool) is_term_resized (int, int);
extern NCURSES_EXPORT(int) key_defined (const char *);
+extern NCURSES_EXPORT(char *) keybound (int, int);
extern NCURSES_EXPORT(int) keyok (int, bool);
+extern NCURSES_EXPORT(void) nofilter(void);
extern NCURSES_EXPORT(void) reset_color_pairs (void);
extern NCURSES_EXPORT(int) resize_term (int, int);
extern NCURSES_EXPORT(int) resizeterm (int, int);
extern NCURSES_EXPORT(int) set_escdelay (int);
extern NCURSES_EXPORT(int) set_tabsize (int);
extern NCURSES_EXPORT(int) use_default_colors (void);
-extern NCURSES_EXPORT(int) use_extended_names (bool);
extern NCURSES_EXPORT(int) use_legacy_coding (int);
extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *);
extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *);
extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int);
-extern NCURSES_EXPORT(void) nofilter(void);
+
+#if @NCURSES_XNAMES@
+#undef NCURSES_XNAMES
+#define NCURSES_XNAMES @NCURSES_XNAMES@
+extern NCURSES_EXPORT(int) use_extended_names (bool);
+#endif
/*
* These extensions provide access to information stored in the WINDOW even
@@ -1020,20 +1092,24 @@ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_tioctl) (SCREEN*, bool); /* impl
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
#if @NCURSES_EXT_FUNCS@
-extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(alloc_pair) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_color_content) (SCREEN*, int, int *, int *, int *); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_pair_content) (SCREEN*, int, int *, int *); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_slk_color) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(find_pair) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(free_pair) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_extended_color) (SCREEN*, int, int, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_extended_pair) (SCREEN*, int, int, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_cbreak) (SCREEN*); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_echo) (SCREEN*); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_nl) (SCREEN*); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_raw) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(reset_color_pairs) (SCREEN*); /* implemented:EXT_SP_FUNC */
diff --git a/include/curses.tail b/include/curses.tail
index 05f7439eff9d..9c9135656048 100644
--- a/include/curses.tail
+++ b/include/curses.tail
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.25 2019/12/14 22:28:39 tom Exp $ */
+/* $Id: curses.tail,v 1.27 2023/08/05 19:43:46 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@@ -13,12 +13,12 @@
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6))
#endif
-#define NCURSES_BUTTON_RELEASED 001L
-#define NCURSES_BUTTON_PRESSED 002L
-#define NCURSES_BUTTON_CLICKED 004L
-#define NCURSES_DOUBLE_CLICKED 010L
-#define NCURSES_TRIPLE_CLICKED 020L
-#define NCURSES_RESERVED_EVENT 040L
+#define NCURSES_BUTTON_RELEASED 001UL
+#define NCURSES_BUTTON_PRESSED 002UL
+#define NCURSES_BUTTON_CLICKED 004UL
+#define NCURSES_DOUBLE_CLICKED 010UL
+#define NCURSES_TRIPLE_CLICKED 020UL
+#define NCURSES_RESERVED_EVENT 040UL
/* event masks */
#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)
@@ -174,7 +174,7 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */
#endif
-extern NCURSES_EXPORT(void) exit_curses (int) GCC_NORETURN;
+extern GCC_NORETURN NCURSES_EXPORT(void) exit_curses (int);
#include <unctrl.h>
diff --git a/include/curses.wide b/include/curses.wide
index 7a8ae7d5fa13..33adb070d7b1 100644
--- a/include/curses.wide
+++ b/include/curses.wide
@@ -1,4 +1,4 @@
-/* $Id: curses.wide,v 1.50 2017/03/26 16:05:21 tom Exp $ */
+/* $Id: curses.wide,v 1.51 2021/05/22 20:28:29 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@@ -219,10 +219,12 @@ extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* imple
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(erasewchar) (SCREEN*, wchar_t *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(killwchar) (SCREEN*, wchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */
-extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
#endif
#ifndef NCURSES_NOMACROS
diff --git a/include/edit_cfg.sh b/include/edit_cfg.sh
index f7f1795654f2..559b1575443f 100755
--- a/include/edit_cfg.sh
+++ b/include/edit_cfg.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-# $Id: edit_cfg.sh,v 1.14 2020/02/02 23:34:34 tom Exp $
+# $Id: edit_cfg.sh,v 1.16 2022/07/16 18:02:32 tom Exp $
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2022 Thomas E. Dickey #
# Copyright 1998-2001,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -39,15 +39,16 @@
#
BAK=save$$
TMP=edit$$
-trap "rm -f $BAK $TMP" 0 1 2 3 15
+trap "rm -f $BAK $TMP; exit 1" 1 2 3 15
+trap "rm -f $BAK $TMP" 0
for name in \
HAVE_TCGETATTR \
HAVE_TERMIOS_H \
HAVE_TERMIO_H \
BROKEN_LINKER
do
- mv $2 $BAK
- if ( grep "[ ]$name[ ]" $1 2>&1 >$TMP )
+ mv "$2" "$BAK"
+ if ( grep "[ ]${name}[ ]" "$1" >$TMP 2>&1 )
then
value=1
else
@@ -58,11 +59,11 @@ do
-e "s@#define ${name}.*\$@#define $name $value@" \
-e "s@#if $name\$@#if $value /* $name */@" \
-e "s@#if !$name\$@#if $value /* !$name */@" \
- $BAK >$2
- if (cmp -s $2 $BAK)
+ "$BAK" >"$2"
+ if (cmp -s "$2" "$BAK")
then
- mv $BAK $2
+ mv "$BAK" "$2"
else
- rm -f $BAK
+ rm -f "$BAK"
fi
done
diff --git a/include/headers b/include/headers
index 32e33fdbc734..e1293b28a549 100644
--- a/include/headers
+++ b/include/headers
@@ -1,6 +1,6 @@
-# $Id: headers,v 1.15 2020/08/29 18:51:13 tom Exp $
+# $Id: headers,v 1.16 2023/04/22 12:09:09 tom Exp $
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2023 Thomas E. Dickey #
# Copyright 1998-2012,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -39,11 +39,9 @@ ncurses_dll.h
term.h
termcap.h
-# Headers used only for tic, other programs using internal interfaces
+# Header used by tack 1.08
@ ticlib
-$(srcdir)/tic.h
$(srcdir)/term_entry.h
-$(srcdir)/nc_tparm.h
# Porting
@ port_win32con
diff --git a/include/nc_access.h b/include/nc_access.h
new file mode 100644
index 000000000000..1d2fb0a4ec5e
--- /dev/null
+++ b/include/nc_access.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * Copyright 2021,2023 Thomas E. Dickey *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/* $Id: nc_access.h,v 1.6 2023/05/06 10:54:55 tom Exp $ */
+
+#ifndef NC_ACCESS_included
+#define NC_ACCESS_included 1
+/* *INDENT-OFF* */
+
+#include <ncurses_cfg.h>
+#include <curses.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Turn off the 'use_terminfo_vars()' symbol to limit access to environment
+ * variables when running with privileges.
+ */
+#if defined(USE_ROOT_ENVIRON) && defined(USE_SETUID_ENVIRON)
+#define use_terminfo_vars() 1
+#else
+#define use_terminfo_vars() _nc_env_access()
+#endif
+
+extern NCURSES_EXPORT(int) _nc_env_access (void);
+
+/*
+ * Turn off this symbol to limit access to files when running setuid.
+ */
+#ifdef USE_ROOT_ACCESS
+
+#define safe_fopen(name,mode) fopen(name,mode)
+#define safe_open2(name,flags) open(name,flags)
+#define safe_open3(name,flags,mode) open(name,flags,mode)
+
+#else
+
+#define safe_fopen(name,mode) _nc_safe_fopen(name,mode)
+#define safe_open2(name,flags) _nc_safe_open3(name,flags,0)
+#define safe_open3(name,flags,mode) _nc_safe_open3(name,flags,mode)
+extern NCURSES_EXPORT(FILE *) _nc_safe_fopen (const char *, const char *);
+extern NCURSES_EXPORT(int) _nc_safe_open3 (const char *, int, mode_t);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* *INDENT-ON* */
+
+#endif /* NC_ACCESS_included */
diff --git a/include/nc_alloc.h b/include/nc_alloc.h
index 8d19f98e0f67..cfea2beb6daf 100644
--- a/include/nc_alloc.h
+++ b/include/nc_alloc.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -30,7 +30,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: nc_alloc.h,v 1.27 2020/07/04 20:01:13 tom Exp $ */
+/* $Id: nc_alloc.h,v 1.30 2021/11/20 23:33:38 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
@@ -73,27 +73,26 @@ extern "C" {
#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS
#define HAVE_NC_FREEALL 1
struct termtype;
-extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN GCC_DEPRECATED("use exit_terminfo");
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_DEPRECATED("use exit_terminfo");
#ifdef NCURSES_INTERNALS
-extern NCURSES_EXPORT(void) _nc_free_tic(int) GCC_NORETURN;
-extern NCURSES_EXPORT(void) _nc_free_tparm(void);
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_tic(int);
extern void _nc_leaks_dump_entry(void);
extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
#if NCURSES_SP_FUNCS
-extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
+extern GCC_NORETURN NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int);
#endif
-extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int);
#else /* !NCURSES_INTERNALS */
-extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN GCC_DEPRECATED("use exit_curses");
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_DEPRECATED("use exit_curses");
#endif
#define ExitProgram(code) exit_curses(code)
#else
-extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN GCC_DEPRECATED("use exit_curses");
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_DEPRECATED("use exit_curses");
#endif /* NO_LEAKS, etc */
#ifndef HAVE_NC_FREEALL
diff --git a/include/nc_mingw.h b/include/nc_mingw.h
index 6729b29d3d09..1bfc4b0d37c1 100644
--- a/include/nc_mingw.h
+++ b/include/nc_mingw.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2008-2010,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -31,7 +31,7 @@
* Author: Thomas Dickey, 2008-on *
****************************************************************************/
-/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 tom Exp $ */
+/* $Id: nc_mingw.h,v 1.10 2023/02/25 19:59:24 tom Exp $ */
#ifndef NC_MINGW_H
#define NC_MINGW_H 1
@@ -50,9 +50,6 @@
#undef sleep
#define sleep(n) Sleep((n) * 1000)
-#undef gettimeofday
-#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
-
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for struct timeval */
#endif
@@ -67,10 +64,12 @@ extern "C" {
#include <ncurses_dll.h>
+#if !HAVE_CLOCK_GETTIME && !HAVE_GETTIMEOFDAY
NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
-
#undef HAVE_GETTIMEOFDAY
-#define HAVE_GETTIMEOFDAY 1
+#define HAVE_GETTIMEOFDAY 2
+#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
+#endif
#define SIGHUP 1
#define SIGKILL 9
diff --git a/include/nc_string.h b/include/nc_string.h
index 93cf201507c7..546aa0695ba0 100644
--- a/include/nc_string.h
+++ b/include/nc_string.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2012-2013,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -41,7 +41,7 @@
#endif
/*
- * $Id: nc_string.h,v 1.8 2020/02/02 23:34:34 tom Exp $
+ * $Id: nc_string.h,v 1.9 2021/04/25 00:10:43 tom Exp $
*
* String-hacks. Use these macros to stifle warnings on (presumably) correct
* uses of strcat, strcpy and sprintf.
@@ -76,7 +76,11 @@
#endif
#if USE_STRING_HACKS && HAVE_SNPRINTF
+#ifdef __cplusplus
#define _nc_SPRINTF NCURSES_VOID snprintf
+#else
+#define _nc_SPRINTF NCURSES_VOID (snprintf)
+#endif
#define _nc_SLIMIT(n) NCURSES_CAST(size_t,n),
#else
#define _nc_SPRINTF NCURSES_VOID sprintf
diff --git a/include/nc_tparm.h b/include/nc_tparm.h
index 943d9476055d..78170993fa17 100644
--- a/include/nc_tparm.h
+++ b/include/nc_tparm.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2006-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -31,7 +31,7 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
-/* $Id: nc_tparm.h,v 1.11 2020/05/27 23:33:31 tom Exp $ */
+/* $Id: nc_tparm.h,v 1.12 2023/04/16 17:57:28 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
@@ -78,6 +78,7 @@
#endif
#ifdef NCURSES_INTERNALS
+#define TIPARM_0(s) _nc_tiparm(0,s)
#define TIPARM_1(s,a) _nc_tiparm(1,s,a)
#define TIPARM_2(s,a,b) _nc_tiparm(2,s,a,b)
#define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c)
diff --git a/include/nc_win32.h b/include/nc_win32.h
index 790e8dfe9388..e67b8e045506 100644
--- a/include/nc_win32.h
+++ b/include/nc_win32.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2008-2010,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -31,7 +31,7 @@
* Author: Thomas Dickey, 2008-on *
****************************************************************************/
-/* $Id: nc_win32.h,v 1.9 2020/09/13 00:17:30 tom Exp $ */
+/* $Id: nc_win32.h,v 1.10 2023/02/25 20:09:23 tom Exp $ */
#ifndef NC_WIN32_H
#define NC_WIN32_H 1
@@ -79,9 +79,11 @@ extern "C" {
#include <ncurses_dll.h>
+#if !HAVE_CLOCK_GETTIME && !HAVE_GETTIMEOFDAY
#undef HAVE_GETTIMEOFDAY
-#define HAVE_GETTIMEOFDAY 1
+#define HAVE_GETTIMEOFDAY 2
extern NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
+#endif
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
diff --git a/include/ncurses_defs b/include/ncurses_defs
index b805c8414182..c0da3ad53ecc 100644
--- a/include/ncurses_defs
+++ b/include/ncurses_defs
@@ -1,6 +1,6 @@
-# $Id: ncurses_defs,v 1.95 2020/08/01 19:48:21 tom Exp $
+# $Id: ncurses_defs,v 1.110 2024/03/02 20:38:23 tom Exp $
##############################################################################
-# Copyright 2018-2019,2020 Thomas E. Dickey #
+# Copyright 2018-2023,2024 Thomas E. Dickey #
# Copyright 2000-2016,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -48,16 +48,19 @@ HAVE_BIG_CORE
HAVE_BSD_CGETENT
HAVE_BSD_SIGNAL_H
HAVE_BSD_STRING_H
-HAVE_BTOWC
+HAVE_BTOWC
HAVE_BUILTIN_H
HAVE_CHGAT 1
+HAVE_CLOCK_GETTIME
HAVE_COLOR_CONTENT 1
HAVE_COLOR_SET 1
HAVE_CONSISTENT_GETENV
+HAVE_CONSISTENT_MB_LEN_MAX
HAVE_COPYWIN 1
HAVE_CURSCR 1
HAVE_CURSES_DATA_TABSIZE 1
HAVE_CURSES_DATA_TTYTYPE 1
+HAVE_CURSES_TRACE 1
HAVE_DELSCREEN 1
HAVE_DERWIN 1
HAVE_DIRENT_H
@@ -68,6 +71,8 @@ HAVE_EXIT_TERMINFO 1
HAVE_FCNTL_H
HAVE_FILTER 1
HAVE_FORM_H
+HAVE_FPATHCONF
+HAVE_GETAUXVAL
HAVE_GETBEGX 1
HAVE_GETCURX 1
HAVE_GETCWD
@@ -79,6 +84,7 @@ HAVE_GETOPT_H
HAVE_GETPARX 1
HAVE_GETTIMEOFDAY
HAVE_GETTTYNAM
+HAVE_GETUID
HAVE_GETWIN 1
HAVE_GPM_H
HAVE_GPP_BUILTIN_H
@@ -105,6 +111,7 @@ HAVE_LINK
HAVE_LOCALECONV
HAVE_LOCALE_H
HAVE_LONG_FILE_NAMES
+HAVE_MATH_FUNCS
HAVE_MATH_H
HAVE_MBLEN
HAVE_MBRLEN
@@ -119,16 +126,18 @@ HAVE_MVVLINE 1
HAVE_MVWIN 1
HAVE_MVWVLINE 1
HAVE_NANOSLEEP
+HAVE_NAPMS 1
HAVE_NC_ALLOC_H
HAVE_NEWPAD 1
HAVE_PANEL_H
+HAVE_PATH_TTYS
HAVE_PCRE2POSIX_H
HAVE_PCREPOSIX_H
HAVE_POLL
HAVE_POLL_H
HAVE_PURIFY
HAVE_PUTENV
-HAVE_PUTWC
+HAVE_PUTWC
HAVE_PUTWIN 1
HAVE_REGEXPR_H_FUNCS
HAVE_REGEXP_H_FUNCS
@@ -144,6 +153,7 @@ HAVE_SELECT
HAVE_SETBUF
HAVE_SETBUFFER
HAVE_SETENV
+HAVE_SETFSUID
HAVE_SETUPTERM 1
HAVE_SETVBUF
HAVE_SGTTY_H
@@ -161,6 +171,7 @@ HAVE_STRSTR
HAVE_SYMLINK
HAVE_SYSCONF
HAVE_SYS_BSDTYPES_H
+HAVE_SYS_AUXV_H
HAVE_SYS_IOCTL_H
HAVE_SYS_PARAM_H
HAVE_SYS_POLL_H
@@ -182,20 +193,23 @@ HAVE_TERM_H 1
HAVE_TGETENT 1
HAVE_TIGETNUM 1
HAVE_TIGETSTR 1
+HAVE_TIPARM 1
+HAVE_TIPARM_S 1
+HAVE_TISCAN_S 1
HAVE_TIMES
HAVE_TPUTS_SP
HAVE_TSEARCH
-HAVE_TTYENT_H
HAVE_TYPEAHEAD 1
HAVE_TYPEINFO
HAVE_TYPE_ATTR_T
HAVE_TYPE_SIGACTION
HAVE_UNCTRL_H 1
+HAVE_UNGET_WCH 1
HAVE_UNISTD_H
HAVE_UNLINK
HAVE_USE_DEFAULT_COLORS
HAVE_USE_ENV 1
-HAVE_USE_EXTENDED_NAMES
+HAVE_USE_EXTENDED_NAMES NCURSES_XNAMES
HAVE_USE_SCREEN
HAVE_USE_WINDOW
HAVE_VFSCANF
@@ -207,16 +221,18 @@ HAVE_VW_PRINTW 1
HAVE_WCHGAT 1
HAVE_WCSRTOMBS
HAVE_WCSTOMBS
-HAVE_WCTOB
+HAVE_WCTOB
HAVE_WCTOMB
HAVE_WCTYPE_H
HAVE_WINSDELLN 1
HAVE_WINSSTR 1
+HAVE_WMEMCHR
HAVE_WORKING_POLL
HAVE_WRESIZE
HAVE_WSYNCDOWN 1
HAVE__DOSCAN
HAVE__TRACEF
+HAVE__NC_TPARM_ANALYZE 1
MIXEDCASE_FILENAMES
NCURSES_CHAR_EQ
NCURSES_EXPANDED
diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in
index 437c54de0271..401d47a81667 100644
--- a/include/ncurses_dll.h.in
+++ b/include/ncurses_dll.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2009,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -26,7 +26,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
-/* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen Exp $ */
+/* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
@@ -92,7 +92,11 @@
# define NCURSES_API __cdecl
#else
# define NCURSES_EXPORT_GENERAL_IMPORT
-# define NCURSES_EXPORT_GENERAL_EXPORT
+# if (__GNUC__ >= 4) && !defined(__cplusplus)
+# define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default")))
+# else
+# define NCURSES_EXPORT_GENERAL_EXPORT
+# endif
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
#endif
diff --git a/include/ncurses_mingw.h b/include/ncurses_mingw.h
index fc77aca8b050..8b11272de64d 100644
--- a/include/ncurses_mingw.h
+++ b/include/ncurses_mingw.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -28,10 +28,10 @@
****************************************************************************/
/****************************************************************************
- * Author: Juergen Pfeifer, 2008-on *
+ * Author: Juergen Pfeifer, 2008-on *
****************************************************************************/
-/* $Id: ncurses_mingw.h,v 1.6 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: ncurses_mingw.h,v 1.7 2021/06/17 21:26:02 tom Exp $ */
/*
* This is a placeholder up to now and describes what needs to be implemented
@@ -67,14 +67,14 @@ struct termios
};
extern NCURSES_EXPORT(int) _nc_mingw_tcsetattr(
- int fd,
- int optional_actions,
+ int fd,
+ int optional_actions,
const struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcgetattr(
- int fd,
+ int fd,
struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
- int fd,
+ int fd,
int queue);
extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);
diff --git a/include/term_entry.h b/include/term_entry.h
index 18e4b87aab77..24389ad3837e 100644
--- a/include/term_entry.h
+++ b/include/term_entry.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 1998-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -33,7 +33,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
-/* $Id: term_entry.h,v 1.60 2020/02/29 15:46:00 anonymous.maarten Exp $ */
+/* $Id: term_entry.h,v 1.64 2023/04/22 13:37:14 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@@ -135,6 +135,7 @@ struct entry {
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
+#define for_entry_list2(qp,q0) for (qp = q0; qp; qp = qp->next)
#define MAX_LINE 132
@@ -142,7 +143,7 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
/*
* Note that WANTED and PRESENT are not simple inverses! If a capability
- * has been explicitly cancelled, it's not considered WANTED.
+ * has been explicitly cancelled, it is not considered WANTED.
*/
#define WANTED(s) ((s) == ABSENT_STRING)
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
@@ -176,6 +177,8 @@ extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
/* free_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
+extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
/* lib_termcap.c: trim sgr0 string for termcap users */
@@ -208,26 +211,6 @@ extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
#endif /* NCURSES_INTERNALS */
-/*
- * These entrypoints were used by tack before 1.08.
- */
-
-#undef NCURSES_TACK_1_08
-#ifdef NCURSES_INTERNALS
-#define NCURSES_TACK_1_08 /* nothing */
-#else
-#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08")
-#endif
-
-/* alloc_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *) NCURSES_TACK_1_08;
-
-/* lib_acs.c */
-extern NCURSES_EXPORT(void) _nc_init_acs (void) NCURSES_TACK_1_08; /* corresponds to traditional 'init_acs()' */
-
-/* free_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *) NCURSES_TACK_1_08;
-
#ifdef __cplusplus
}
#endif
diff --git a/include/termcap.h.in b/include/termcap.h.in
index dc8d8fc949a8..7b7c70378153 100644
--- a/include/termcap.h.in
+++ b/include/termcap.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -32,7 +32,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-/* $Id: termcap.h.in,v 1.19 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: termcap.h.in,v 1.20 2021/06/17 21:26:02 tom Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
@@ -49,13 +49,13 @@ extern "C"
#include <sys/types.h>
-#undef NCURSES_OSPEED
-#define NCURSES_OSPEED @NCURSES_OSPEED@
+#undef NCURSES_OSPEED
+#define NCURSES_OSPEED @NCURSES_OSPEED@
extern NCURSES_EXPORT_VAR(char) PC;
extern NCURSES_EXPORT_VAR(char *) UP;
extern NCURSES_EXPORT_VAR(char *) BC;
-extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
+extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
#if !defined(NCURSES_TERM_H_incl)
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
diff --git a/include/tic.h b/include/tic.h
index 8210936cc857..7569aae9fb5f 100644
--- a/include/tic.h
+++ b/include/tic.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 1998-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -34,7 +34,7 @@
****************************************************************************/
/*
- * $Id: tic.h,v 1.81 2020/02/02 23:34:34 tom Exp $
+ * $Id: tic.h,v 1.87 2023/04/22 13:37:21 tom Exp $
* tic.h - Global variables and structures for the terminfo compiler.
*/
@@ -135,8 +135,7 @@ extern "C" {
#define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT)
#define set_trace_level(n) \
- _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \
- + DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \
+ _nc_tracing &= TRACE_MAXIMUM, \
_nc_tracing |= DEBUG_LEVEL(n)
#ifdef TRACE
@@ -302,11 +301,11 @@ extern NCURSES_EXPORT_VAR(long) _nc_start_line;
/* comp_error.c: warning & abort messages */
extern NCURSES_EXPORT(const char *) _nc_get_source (void);
-extern NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _nc_get_type (char *name);
extern NCURSES_EXPORT(void) _nc_set_source (const char *const);
extern NCURSES_EXPORT(void) _nc_set_type (const char *const);
-extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern GCC_NORETURN NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
@@ -337,7 +336,8 @@ extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
-extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *);
+extern NCURSES_EXPORT(int) _nc_tparm_analyze(TERMINAL *, const char *, char **, int *);
+extern NCURSES_EXPORT(void) _nc_reset_tparm(TERMINAL *);
/* lib_trace.c */
extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
@@ -347,6 +347,14 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
/* lib_tputs.c */
extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
+/* comp_expand.c: expand string into readable form */
+extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
+
+/* comp_hash.c: name lookup */
+extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
+ (const char *, const HashValue *);
+extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
+
/* comp_main.c: compiler main */
extern const char * _nc_progname;
@@ -361,31 +369,6 @@ extern NCURSES_EXPORT(int) _nc_tic_written (void);
#endif /* NCURSES_INTERNALS */
-/*
- * These entrypoints were used by tack before 1.08.
- */
-
-#undef NCURSES_TACK_1_08
-#ifdef NCURSES_INTERNALS
-#define NCURSES_TACK_1_08 /* nothing */
-#else
-#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08")
-#endif
-
-/* comp_hash.c: name lookup */
-extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
- (const char *, const HashValue *) NCURSES_TACK_1_08;
-extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool) NCURSES_TACK_1_08;
-
-/* comp_scan.c: lexical analysis */
-extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *) NCURSES_TACK_1_08;
-
-/* comp_expand.c: expand string into readable form */
-extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int) NCURSES_TACK_1_08;
-
-/* comp_scan.c: decode string from readable form */
-extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *) NCURSES_TACK_1_08;
-
#endif /* NCURSES_TERM_ENTRY_H_incl */
#ifdef __cplusplus
diff --git a/include/win32_curses.h b/include/win32_curses.h
index 5babf47d214a..0c807a022b15 100644
--- a/include/win32_curses.h
+++ b/include/win32_curses.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -28,10 +28,10 @@
****************************************************************************/
/****************************************************************************
- * Author: Juergen Pfeifer, 2008-on *
+ * Author: Juergen Pfeifer, 2008-on *
****************************************************************************/
-/* $Id: win32_curses.h,v 1.2 2020/11/14 23:52:46 tom Exp $ */
+/* $Id: win32_curses.h,v 1.3 2021/06/17 21:26:02 tom Exp $ */
/*
* This is the interface we use on Windows to mimic the control of the settings