summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2020-02-12 02:21:21 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2020-02-12 02:21:21 +0000
commitff448436b2b70771d09b8d5ff34a509dcf02f81b (patch)
tree2f7abbba7198a4e1c4a23955bc3a539db5a7d999 /include
parentf6d73a10a980bc78969c3af93665cbe7d06c3646 (diff)
downloadncurses-ff448436b2b70771d09b8d5ff34a509dcf02f81b.tar.gz
ncurses-6.2ncurses-6.2
Diffstat (limited to 'include')
-rw-r--r--include/Caps333
-rw-r--r--include/Caps-ncurses451
-rw-r--r--include/Caps.aix4258
-rw-r--r--include/Caps.hpux11364
-rw-r--r--include/Caps.keys332
-rw-r--r--include/Caps.osf1r5333
-rw-r--r--include/Caps.uwin328
-rwxr-xr-xinclude/MKhashsize.sh9
-rwxr-xr-xinclude/MKkey_defs.sh23
-rwxr-xr-xinclude/MKncurses_def.sh5
-rwxr-xr-xinclude/MKparametrized.sh20
-rw-r--r--include/MKterm.h.awk.in709
-rw-r--r--include/Makefile.in35
-rw-r--r--include/capdefaults.c5
-rw-r--r--include/curses.h.in263
-rw-r--r--include/curses.tail12
-rw-r--r--include/curses.wide6
-rwxr-xr-xinclude/edit_cfg.sh7
-rw-r--r--include/hashed_db.h9
-rw-r--r--include/headers5
-rw-r--r--include/nc_alloc.h22
-rw-r--r--include/nc_mingw.h17
-rw-r--r--include/nc_panel.h8
-rw-r--r--include/nc_string.h13
-rw-r--r--include/nc_termios.h11
-rw-r--r--include/nc_tparm.h9
-rw-r--r--include/ncurses_cfg.hin20
-rw-r--r--include/ncurses_defs37
-rw-r--r--include/ncurses_dll.h.in25
-rw-r--r--include/ncurses_mingw.h10
-rw-r--r--include/term_entry.h163
-rw-r--r--include/termcap.h.in14
-rw-r--r--include/tic.h173
-rw-r--r--include/unctrl.h.in5
34 files changed, 1600 insertions, 2434 deletions
diff --git a/include/Caps b/include/Caps
index cb650a6..af0ec45 100644
--- a/include/Caps
+++ b/include/Caps
@@ -1,5 +1,6 @@
##############################################################################
-# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 1998-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -29,12 +30,12 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
-# $Id: Caps,v 1.38 2011/10/15 23:10:18 tom Exp $
+# $Id: Caps,v 1.45 2020/02/02 23:34:34 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
# This table is used to generate initializers for tables that drive tic,
-# infocmp, and the library compilation code used to support the termcap
+# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@@ -97,7 +98,7 @@
# 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 the ncurses
+# 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.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@@ -119,14 +120,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
-# CONTROLLING ENTRY LENGTH
+# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
-# the set of keys the `joe' editor will be upset if it can't see. So don't
+# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@@ -147,7 +148,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
-# into history and GNU termcap's application base shrinks towards being GNU
+# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@@ -166,7 +167,7 @@
#%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
+#%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.
#%
@@ -227,7 +228,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+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
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@@ -271,7 +272,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
-maximum_windows wnum num MW - - ----- maximum number of defineable windows
+maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@@ -719,7 +720,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
-define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@@ -826,7 +827,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
-# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@@ -843,9 +844,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
-# The `ma' capability seems to have been designed to map between the rogue(2)
-# motion keys (including jkhl) and characters emitted by arrow keys on some
-# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+# The `ma' capability was a 4.0BSD feature used by vi version 2.
+# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
+# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@@ -871,7 +872,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
-arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@@ -887,7 +888,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
-# in the mytinfo tables.
+# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@@ -936,7 +937,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
-# (via IGNORE aliases further down). We don't want to do normal pad
+# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@@ -958,303 +959,9 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
-# This section is almost all comments. What it's mainly for is to describe
-# what capabilities need to be squeezed out to get down to the XSI Curses
-# standard set. They are flagged with K.
-#
-# HP extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in HP
-# terminfo files. Except for memory_lock and memory_unlock, they are
-# functionally identical to SVr4 extensions, but they make the binary format
-# different. Grrr....
+# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
-#plab_norm pln str pn - - ----- program label #1 to show string #2
-#label_on smln str LO - - ----- turn on soft labels
-#label_off rmln str LF - - ----- turn off soft labels
-#key_f11 kf11 str F1 - - ----- F11 function key
-#key_f12 kf12 str F2 - - ----- F12 function key
-#key_f13 kf13 str F3 - - ----- F13 function key
-#key_f14 kf14 str F4 - - ----- F14 function key
-#key_f15 kf15 str F5 - - ----- F15 function key
-#key_f16 kf16 str F6 - - ----- F16 function key
-#key_f17 kf17 str F7 - - ----- F17 function key
-#key_f18 kf18 str F8 - - ----- F18 function key
-#key_f19 kf19 str F9 - - ----- F19 function key
-#key_f20 kf20 str FA - - ----- F20 function key
-#key_f21 kf21 str FB - - ----- F21 function key
-#key_f22 kf22 str FC - - ----- F22 function key
-#key_f23 kf23 str FD - - ----- F23 function key
-#key_f24 kf24 str FE - - ----- F24 function key
-#key_f25 kf25 str FF - - ----- F25 function key
-#key_f26 kf26 str FG - - ----- F26 function key
-#key_f27 kf27 str FH - - ----- F27 function key
-#key_f28 kf28 str FI - - ----- F28 function key
-#key_f29 kf29 str FJ - - ----- F29 function key
-#key_f30 kf30 str FK - - ----- F30 function key
-#key_f31 kf31 str FL - - ----- F31 function key
-#key_f32 kf32 str FM - - ----- F32 function key
-#key_f33 kf33 str FN - - ----- F33 function key
-#key_f34 kf34 str FO - - ----- F34 function key
-#key_f35 kf35 str FP - - ----- F35 function key
-#key_f36 kf36 str FQ - - ----- F36 function key
-#key_f37 kf37 str FR - - ----- F37 function key
-#key_f38 kf38 str FS - - ----- F38 function key
-#key_f39 kf39 str FT - - ----- F39 function key
-#key_f40 kf40 str FU - - ----- F40 function key
-#key_f41 kf41 str FV - - ----- F41 function key
-#key_f42 kf42 str FW - - ----- F42 function key
-#key_f43 kf43 str FX - - ----- F43 function key
-#key_f44 kf44 str FY - - ----- F44 function key
-#key_f45 kf45 str FZ - - ----- F45 function key
-#key_f46 kf46 str Fa - - ----- F46 function key
-#key_f47 kf47 str Fb - - ----- F47 function key
-#key_f48 kf48 str Fc - - ----- F48 function key
-#key_f49 kf49 str Fd - - ----- F49 function key
-#key_f50 kf50 str Fe - - ----- F50 function key
-#key_f51 kf51 str Ff - - ----- F51 function key
-#key_f52 kf52 str Fg - - ----- F52 function key
-#key_f53 kf53 str Fh - - ----- F53 function key
-#key_f54 kf54 str Fi - - ----- F54 function key
-#key_f55 kf55 str Fj - - ----- F55 function key
-#key_f56 kf56 str Fk - - ----- F56 function key
-#key_f57 kf57 str Fl - - ----- F57 function key
-#key_f58 kf58 str Fm - - ----- F58 function key
-#key_f59 kf59 str Fn - - ----- F59 function key
-#key_f60 kf60 str Fo - - ----- F60 function key
-#key_f61 kf61 str Fp - - ----- F61 function key
-#key_f62 kf62 str Fq - - ----- F62 function key
-#key_f63 kf63 str Fr - - ----- F63 function key
-#
-# IBM extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in IBM
-# terminfo files.
-#
-# The places in the box[12] capabilities correspond to acsc characters, here is
-# the mapping:
-#
-# box1[0] = ACS_ULCORNER
-# box1[1] = ACS_HLINE
-# box1[2] = ACS_URCORNER
-# box1[3] = ACS_VLINE
-# box1[4] = ACS_LRCORNER
-# box1[5] = ACS_LLCORNER
-# box1[6] = ACS_TTEE
-# box1[7] = ACS_RTEE
-# box1[8] = ACS_BTEE
-# box1[9] = ACS_LTEE
-# box1[10] = ACS_PLUS
-#
-# The box2 characters are the double-line versions of these forms graphics.
-#
box_chars_1 box1 str bx - - ----K box characters primary set
-#box_chars_2 box2 str by - - ----K box characters secondary set
-#box_attr_1 batt1 str Bx - - ----K attributes for box1
-#box_attr_2 batt2 str By - - ----K attributes for box2
-#color_bg_0 colb0 str d0 - - ----K background color 0
-#color_bg_1 colb1 str d1 - - ----K background color 1
-#color_bg_2 colb2 str d2 - - ----K background color 2
-#color_bg_3 colb3 str d3 - - ----K background color 3
-#color_bg_4 colb4 str d4 - - ----K background color 4
-#color_bg_5 colb5 str d5 - - ----K background color 5
-#color_bg_6 colb6 str d6 - - ----K background color 6
-#color_bg_7 colb7 str d7 - - ----K background color 7
-#color_fg_0 colf0 str c0 - - ----K foreground color 0
-#color_fg_1 colf1 str c1 - - ----K foreground color 1
-#color_fg_2 colf2 str c2 - - ----K foreground color 2
-#color_fg_3 colf3 str c3 - - ----K foreground color 3
-#color_fg_4 colf4 str c4 - - ----K foreground color 4
-#color_fg_5 colf5 str c5 - - ----K foreground color 5
-#color_fg_6 colf6 str c6 - - ----K foreground color 6
-#color_fg_7 colf7 str c7 - - ----K foreground color 7
-#font_0 font0 str f0 - - ----- select font 0
-#font_1 font1 str f1 - - ----- select font 1
-#font_2 font2 str f2 - - ----- select font 2
-#font_3 font3 str f3 - - ----- select font 3
-#font_4 font4 str f4 - - ----K select font 4
-#font_5 font5 str f5 - - ----K select font 5
-#font_6 font6 str f6 - - ----K select font 6
-#font_7 font7 str f7 - - ----K select font 7
-#key_back_tab kbtab str k0 - - ----- backtab key
-#key_do kdo str ki - - ----K do request key
-#key_command kcmd str kd - - ----K command-request key
-#key_command_pane kcpn str kW - - ----K command-pane key
-#key_end kend str kw - - ----- end key
-#key_help khlp str kq - - ----- help key
-#key_newline knl str nl - - ----K newline key
-#key_next_pane knpn str kv - - ----K next-pane key
-#key_prev_cmd kppn str kp - - ----K previous-command key
-#key_prev_pane kppn str kV - - ----K previous-pane key
-#key_quit kquit str kQ - - ----K quit key
-#key_select ksel str kU - - ----- select key
-#key_scroll_left kscl str kz - - ----K scroll left
-#key_scroll_right kscr str kZ - - ----K scroll right
-#key_tab ktab str ko - - ----K tab key
-#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
-#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
-#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
-#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
-#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
-#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
-#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
-#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
-#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
-#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
-#appl_defined_str apstr str za - - ----K application-defined string
-# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
-# the IBM manual pages, so the cap name strings are guesses. The terminfo
-# names are almost certainly right, the termcap ones almost certainly wrong.
-#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
-#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
-#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
-#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
-#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
-#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
-#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
-#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
-# Undocumented capabilities end here
-#key_sf1 ksf1 str S1 - - ----K special function key 1
-#key_sf2 ksf2 str S2 - - ----K special function key 2
-#key_sf3 ksf3 str S3 - - ----K special function key 3
-#key_sf4 ksf4 str S4 - - ----K special function key 4
-#key_sf5 ksf5 str S5 - - ----K special function key 5
-#key_sf6 ksf6 str S6 - - ----K special function key 6
-#key_sf7 ksf7 str S7 - - ----K special function key 7
-#key_sf8 ksf8 str S8 - - ----K special function key 8
-#key_sf9 ksf9 str S9 - - ----K special function key 9
-#key_sf10 ksf10 str SA - - ----K special function key 10
-# AIX version 3 documents different codes for F11, F12 and does not mention
-# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
-#key_f11 kf11 str k< - - ----- function key 11
-#key_f12 kf12 str k> - - ----- function key 12
-# Undocumented capabilities end here.
-#key_action kact str kJ - - ----K sent by action key
-# The IBM docs say these capabilities are for table-drawing, and are
-# valid only for aixterm descriptions.
-#enter_topline_mode topl str tp - - ----K start top-line mode
-#enter_bottom_mode btml str bm - - ----K start bottom-line mode
-#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
-#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
-#
-#############################################################################
-#
-# ALIAS DECLARATIONS
-#
-# Here we set up aliases for translating extensions into standard terminfo.
-#
-#---------------------------------- Termcap aliases -------------------------
-#
-# BSD aliases:
-#
-# This is a common error in many termcap files. We'll get notified during
-# translation when this (or any other alias) fires.
-#
-capalias sb sr BSD scroll text down
-#
-# AT&T extensions:
-#
-# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
-# nonstandard capabilities. Its signature is the KM capability, used to name
-# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
-# set. Comments in the original, and a little cross-checking with other AT&T
-# documentation, seem to establish the following mappings:
-#
-capalias BO mr AT&T enter_reverse_mode
-capalias CI vi AT&T cursor_invisible
-capalias CV ve AT&T cursor_normal
-capalias DS mh AT&T enter_dim_mode
-#capalias EE me AT&T exit_attribute_mode
-capalias FE LF AT&T label_on
-capalias FL LO AT&T label_off
-capalias XS mk AT&T enter_secure_mode
-#
-# We comment out EE because the conflicting XENIX EE is more common in
-# old entries.
-#
-# XENIX extensions:
-#
-# These are the ones we know how to translate directly:
-#
-capalias EE mh XENIX exit_attribute_mode
-capalias GE ae XENIX exit_alt_charset_mode
-capalias GS as XENIX enter_alt_charset_mode
-capalias CF vi XENIX cursor_invis
-capalias CO ve XENIX cursor_normal
-capalias EN @7 XENIX key_end
-capalias HM kh XENIX key_home
-capalias LD kL XENIX key_dl
-capalias PD kN XENIX key_npage
-capalias PN po XENIX prtr_off
-capalias PS pf XENIX prtr_on
-capalias PU kP XENIX key_ppage
-capalias RT @8 XENIX kent
-capalias UP ku XENIX kcuu1
-capalias G6 IGNORE XENIX double-ACS_ULCORNER
-capalias G7 IGNORE XENIX double-ACS_LLCORNER
-capalias G5 IGNORE XENIX double-ACS_URCORNER
-capalias G8 IGNORE XENIX double-ACS_LRCORNER
-capalias Gr IGNORE XENIX double-ACS_LTEE
-capalias Gr IGNORE XENIX double-ACS_RTEE
-capalias Gu IGNORE XENIX double-ACS_BTEE
-capalias Gd IGNORE XENIX double ACS_TTEE
-capalias Gh IGNORE XENIX double-ACS_HLINE
-capalias Gv IGNORE XENIX double-ACS_VLINE
-capalias Gc IGNORE XENIX double-ACS_PLUS
-capalias GG IGNORE XENIX acs-glitch
-#
-# IBM extensions:
-#
-capalias kq %1 IBM key_help
-#
-# Iris extensions:
-#
-capalias HS mh IRIS enter_dim_mode
-#
-# Tektronix extensions:
-#
-capalias KA k; Tek key_f10
-capalias KB F1 Tek key_f11
-capalias KC F2 Tek key_f12
-capalias KD F3 Tek key_f13
-capalias KE F4 Tek key_f14
-capalias KF F5 Tek key_f15
-capalias BC Sb Tek set_background
-capalias FC Sf Tek set_foreground
-#
-# There are also the following:
-#
-# XENIX XENIX variable name name clash with terminfo?
-# ----- ------------------- -------------------------
-# CL key_char_left
-# CR key_char_right
-# CW key_change_window
-# HP ??
-# LF key_linefeed label_off
-# NU key_next_unlocked_cell
-# PL ??
-# PR ??
-# RC key_recalc remove_clock
-# RF key_toggle_ref req_for_input
-# WL key_word_left
-# WR key_word_right
-#
-# If you know what any of the question-marked ones mean, please tell us.
-#
-#--------------------------------- Terminfo aliases ------------------------
-#
-# IBM extensions:
-#
-infoalias font0 s0ds IBM set0_des_seq
-infoalias font1 s1ds IBM set1_des_seq
-infoalias font2 s2ds IBM set2_des_seq
-infoalias font3 s3ds IBM set3_des_seq
-infoalias kbtab kcbt IBM key_backtab
-infoalias ksel kslt IBM key_select
-#
-# Some others are identical to SVr4/XPG4 capabilities, in particular:
-# kcmd, kend, khlp, and kf11...kf63.
-#
#############################################################################
diff --git a/include/Caps-ncurses b/include/Caps-ncurses
new file mode 100644
index 0000000..a1aef0d
--- /dev/null
+++ b/include/Caps-ncurses
@@ -0,0 +1,451 @@
+##############################################################################
+# Copyright 2019,2020 Thomas E. Dickey #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# $Id: Caps-ncurses,v 1.8 2020/02/02 23:34:34 tom Exp $
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is all comments (selected lines are copied/uncommented into
+# specific "Caps" files). The section describes what capabilities need to be
+# squeezed out to get down to the XSI Curses standard set. They are flagged
+# with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+#memory_lock meml str ml - - ----K lock memory above cursor
+#memory_unlock memu str mu - - ----K unlock memory
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+#box_chars_1 box1 str bx - - ----K box characters primary set
+#box_chars_2 box2 str by - - ----K box characters secondary set
+#box_attr_1 batt1 str Bx - - ----K attributes for box1
+#box_attr_2 batt2 str By - - ----K attributes for box2
+#color_bg_0 colb0 str d0 - - ----K background color 0
+#color_bg_1 colb1 str d1 - - ----K background color 1
+#color_bg_2 colb2 str d2 - - ----K background color 2
+#color_bg_3 colb3 str d3 - - ----K background color 3
+#color_bg_4 colb4 str d4 - - ----K background color 4
+#color_bg_5 colb5 str d5 - - ----K background color 5
+#color_bg_6 colb6 str d6 - - ----K background color 6
+#color_bg_7 colb7 str d7 - - ----K background color 7
+#color_fg_0 colf0 str c0 - - ----K foreground color 0
+#color_fg_1 colf1 str c1 - - ----K foreground color 1
+#color_fg_2 colf2 str c2 - - ----K foreground color 2
+#color_fg_3 colf3 str c3 - - ----K foreground color 3
+#color_fg_4 colf4 str c4 - - ----K foreground color 4
+#color_fg_5 colf5 str c5 - - ----K foreground color 5
+#color_fg_6 colf6 str c6 - - ----K foreground color 6
+#color_fg_7 colf7 str c7 - - ----K foreground color 7
+#font_0 font0 str f0 - - ----- select font 0
+#font_1 font1 str f1 - - ----- select font 1
+#font_2 font2 str f2 - - ----- select font 2
+#font_3 font3 str f3 - - ----- select font 3
+#font_4 font4 str f4 - - ----K select font 4
+#font_5 font5 str f5 - - ----K select font 5
+#font_6 font6 str f6 - - ----K select font 6
+#font_7 font7 str f7 - - ----K select font 7
+#key_back_tab kbtab str k0 - - ----- backtab key
+#key_do kdo str ki - - ----K do request key
+#key_command kcmd str kd - - ----K command-request key
+#key_command_pane kcpn str kW - - ----K command-pane key
+#key_end kend str kw - - ----- end key
+#key_help khlp str kq - - ----- help key
+#key_newline knl str nl - - ----K newline key
+#key_next_pane knpn str kv - - ----K next-pane key
+#key_prev_cmd kppn str kp - - ----K previous-command key
+#key_prev_pane kppn str kV - - ----K previous-pane key
+#key_quit kquit str kQ - - ----K quit key
+#key_select ksel str kU - - ----- select key
+#key_scroll_left kscl str kz - - ----K scroll left
+#key_scroll_right kscr str kZ - - ----K scroll right
+#key_tab ktab str ko - - ----K tab key
+#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+#appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
+# the IBM manual pages, so the cap name strings are guesses. The terminfo
+# names are almost certainly right, the termcap ones almost certainly wrong.
+#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
+#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
+#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
+#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
+#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
+#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
+#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
+#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
+# Undocumented capabilities end here
+#key_sf1 ksf1 str S1 - - ----K special function key 1
+#key_sf2 ksf2 str S2 - - ----K special function key 2
+#key_sf3 ksf3 str S3 - - ----K special function key 3
+#key_sf4 ksf4 str S4 - - ----K special function key 4
+#key_sf5 ksf5 str S5 - - ----K special function key 5
+#key_sf6 ksf6 str S6 - - ----K special function key 6
+#key_sf7 ksf7 str S7 - - ----K special function key 7
+#key_sf8 ksf8 str S8 - - ----K special function key 8
+#key_sf9 ksf9 str S9 - - ----K special function key 9
+#key_sf10 ksf10 str SA - - ----K special function key 10
+# AIX version 3 documents different codes for F11, F12 and does not mention
+# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
+#key_f11 kf11 str k< - - ----- function key 11
+#key_f12 kf12 str k> - - ----- function key 12
+# Undocumented capabilities end here.
+#key_action kact str kJ - - ----K sent by action key
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+#enter_topline_mode topl str tp - - ----K start top-line mode
+#enter_bottom_mode btml str bm - - ----K start bottom-line mode
+#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+# This is a table of ncurses user-definable capabilities which applications
+# developers may have used. ncurses may use the table to check consistency of
+# types/parameters. Applications may have defined others (such as screen's
+# LP and NF), but where a standard capability is available, those alternatives
+# are not listed here.
+#
+used_by ncurses
+userdef E3 str - clears the terminal's scrollback buffer.
+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.
+userdef TS str - like "tsl", but uses no parameter.
+userdef U8 num n terminal does/does not support VT100 SI/SO when processing UTF-8 encoding.
+userdef XM str n initialize alternate xterm mouse mode
+userdef grbom str - disable real bold (not intensity bright) mode.
+userdef gsbom str - enable real bold (not intensity bright) mode.
+userdef xm str - mouse response, no parameters
+userdef xm str n mouse response, p1 = y-ordinate
+userdef xm str nn mouse response, p2 = x-ordinate
+userdef xm str nnn mouse response, p3 = button
+userdef xm str nnns mouse response, p4 = state, e.g., pressed or released
+userdef xm str nnnsn mouse response, p5 = y-ordinate starting region
+userdef xm str nnnsnn mouse response, p6 = x-ordinate starting region
+userdef xm str nnnsnnn mouse response, p7 = y-ordinate ending region
+userdef xm str nnnsnnnn mouse response, p8 = x-ordinate ending region
+#
+used_by screen
+userdef AN bool - turn on autonuke.
+userdef AX bool - understands ANSI set default fg/bg color (\E[39m / \E[49m).
+userdef C0 str - use the string as a conversion table for font '0', like acsc.
+userdef C8 bool - terminal shows bold as high-intensity colors.
+userdef CE str - switch cursor-keys back to normal mode.
+userdef CS str - switch cursor-keys to application mode.
+userdef E0 str - switch charset 'G0' back to standard charset. Default is '\E(B'.
+userdef G0 bool - terminal can deal with ISO 2022 font selection sequences.
+userdef KJ str s set the encoding of the terminal.
+userdef OL num n set the screen program's output buffer limit.
+userdef S0 str s switch charset 'G0' to the specified charset. Default is '\E(%.'.
+userdef TF bool - add missing capabilities to screen's termcap/info entry. (Set by default).
+userdef WS str nn resize display. This capability has the desired width and height as arguments. SunView(tm) example: '\E[8;%d;%dt'.
+userdef XC str s describe a translation of characters to strings depending on the current font.
+userdef XT bool - terminal understands special xterm sequences (OSC, mouse tracking).
+userdef Z0 str - change width to 132 columns.
+userdef Z1 str - change width to 80 columns.
+#
+used_by tmux
+userdef Cr str - restore the default cursor color.
+userdef Cs str s set the cursor color.
+userdef Csr str n change the cursor style, overriding Ss.
+userdef Ms str ss store the current buffer in the host terminal's selection (clipboard).
+userdef Se str - reset the cursor style to the terminal initial state.
+userdef Smulx str n modify the appearance of underlines in VTE.
+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 xterm
+userdef kDC3 str - alt delete-character
+userdef kDC4 str - shift+alt delete-character
+userdef kDC5 str - control delete-character
+userdef kDC6 str - shift+control delete-character
+userdef kDC7 str - alt+control delete-character
+userdef kDN str - shift down-cursor
+userdef kDN3 str - alt down-cursor
+userdef kDN4 str - shift+alt down-cursor
+userdef kDN5 str - control down-cursor
+userdef kDN6 str - shift+control down-cursor
+userdef kDN7 str - alt+control down-cursor
+userdef kEND3 str - alt end
+userdef kEND4 str - shift+alt end
+userdef kEND5 str - control end
+userdef kEND6 str - shift+control end
+userdef kEND7 str - alt+control end
+userdef kHOM3 str - alt home
+userdef kHOM4 str - shift+alt home
+userdef kHOM5 str - control home
+userdef kHOM6 str - shift+control home
+userdef kHOM7 str - alt+control home
+userdef kIC3 str - alt insert-character
+userdef kIC4 str - shift+alt insert-character
+userdef kIC5 str - control insert-character
+userdef kIC6 str - shift+control insert-character
+userdef kIC7 str - alt+control insert-character
+userdef kLFT3 str - alt left-cursor
+userdef kLFT4 str - shift+alt left-cursor
+userdef kLFT5 str - control left-cursor
+userdef kLFT6 str - shift+control left-cursor
+userdef kLFT7 str - alt+control left-cursor
+userdef kNXT3 str - alt next
+userdef kNXT4 str - shift+alt next
+userdef kNXT5 str - control next
+userdef kNXT6 str - shift+control next
+userdef kNXT7 str - alt+control next
+userdef kPRV3 str - alt previous
+userdef kPRV4 str - shift+alt previous
+userdef kPRV5 str - control previous
+userdef kPRV6 str - shift+control previous
+userdef kPRV7 str - alt+control previous
+userdef kRIT3 str - alt right-cursor
+userdef kRIT4 str - shift+alt right-cursor
+userdef kRIT5 str - control right-cursor
+userdef kRIT6 str - shift+control right-cursor
+userdef kRIT7 str - alt+control right-cursor
+userdef kUP str - shift up-cursor
+userdef kUP3 str - alt up-cursor
+userdef kUP4 str - shift+alt up-cursor
+userdef kUP5 str - control up-cursor
+userdef kUP6 str - shift+control up-cursor
+userdef kUP7 str - alt+control up-cursor
+userdef ka2 str - vt220-keypad extensions
+userdef kb1 str - vt220-keypad extensions
+userdef kb3 str - vt220-keypad extensions
+userdef kc2 str - vt220-keypad extensions
+#############################################################################
diff --git a/include/Caps.aix4 b/include/Caps.aix4
index faa9822..100489c 100644
--- a/include/Caps.aix4
+++ b/include/Caps.aix4
@@ -1,5 +1,6 @@
##############################################################################
-# Copyright (c) 2001-2010,2011 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,13 +29,13 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.aix4,v 1.9 2011/10/15 23:19:16 tom Exp $
+# $Id: Caps.aix4,v 1.17 2020/02/02 23:34:34 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
#
# This table is used to generate initializers for tables that drive tic,
-# infocmp, and the library compilation code used to support the termcap
+# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@@ -97,7 +98,7 @@
# 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 the ncurses
+# 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.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@@ -119,14 +120,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
-# CONTROLLING ENTRY LENGTH
+# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
-# the set of keys the `joe' editor will be upset if it can't see. So don't
+# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@@ -147,7 +148,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
-# into history and GNU termcap's application base shrinks towards being GNU
+# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@@ -166,7 +167,7 @@
#%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
+#%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.
#%
@@ -227,7 +228,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+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
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@@ -271,7 +272,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
-maximum_windows wnum num MW - - ----- maximum number of defineable windows
+maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@@ -476,7 +477,7 @@ prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
# the mapping:
#
# box1[0] = ACS_ULCORNER
-# box1[1] = ACS_HLINE
+# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
@@ -517,15 +518,15 @@ font_4 font4 str f4 - - ----K select font 4
font_5 font5 str f5 - - ----K select font 5
font_6 font6 str f6 - - ----K select font 6
font_7 font7 str f7 - - ----K select font 7
-key_back_tab kbtab str k0 - - ----K backtab key
+key_back_tab kbtab str kO - - ----K backtab key
key_do kdo str ki - - ----K do request key
-key_command kcmd str kd - - ----K command-request key
+key_command kcmd str @4 - - ----K command-request key
key_command_pane kcpn str kW - - ----K command-pane key
-key_end kend str kw KEY_END 0550 ----- end key
-key_help khlp str kq - - ----- help key
-key_newline knl str nl - - ----K newline key
+key_end kend str @7 KEY_END 0550 ----- end key
+key_help khlp str %1 - - ----- help key
+key_newline knl str kn - - ----K newline key
key_next_pane knpn str kv - - ----K next-pane key
-key_prev_cmd kppn str kp - - ----K previous-command key
+key_prev_cmd kpcmd str kp - - ----K previous-command key
key_prev_pane kppn str kV - - ----K previous-pane key
key_quit kquit str kQ - - ----K quit key
key_select_aix ksel str kU - - ----- select key
@@ -543,13 +544,13 @@ key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
appl_defined_str apstr str za - - ----K application-defined string
-key_smap_in6 kmpf6 str kr - - ----K special mapped key 6 input
+key_smap_in6 kmpf6 str Kr - - ----K special mapped key 6 input
key_smap_out6 kmpt6 str KR - - ----K special mapped key 6 output
-key_smap_in7 kmpf7 str ks - - ----K special mapped key 7 input
+key_smap_in7 kmpf7 str Ks - - ----K special mapped key 7 input
key_smap_out7 kmpt7 str KS - - ----K special mapped key 7 output
-key_smap_in8 kmpf8 str kt - - ----K special mapped key 8 input
+key_smap_in8 kmpf8 str Kt - - ----K special mapped key 8 input
key_smap_out8 kmpt8 str KT - - ----K special mapped key 8 output
-key_smap_in9 kmpf9 str ku - - ----K special mapped key 9 input
+key_smap_in9 kmpf9 str Ku - - ----K special mapped key 9 input
key_smap_out9 kmpt9 str KU - - ----K special mapped key 9 output
key_sf1 ksf1 str S1 - - ----K special function key 1
key_sf2 ksf2 str S2 - - ----K special function key 2
@@ -821,7 +822,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
-define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@@ -857,13 +858,13 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
-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
-enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
-enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
-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
+#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
+#enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
+#enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
+#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
@@ -928,7 +929,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
-# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@@ -945,9 +946,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
-# The `ma' capability seems to have been designed to map between the rogue(2)
-# motion keys (including jkhl) and characters emitted by arrow keys on some
-# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+# The `ma' capability was a 4.0BSD feature used by vi version 2.
+# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
+# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@@ -973,7 +974,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
-arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@@ -989,7 +990,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
-# in the mytinfo tables.
+# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@@ -1038,7 +1039,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
-# (via IGNORE aliases further down). We don't want to do normal pad
+# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@@ -1060,192 +1061,9 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
-# This section is almost all comments. What it's mainly for is to describe
-# what capabilities need to be squeezed out to get down to the XSI Curses
-# standard set. They are flagged with K.
-#
-# HP extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in HP
-# terminfo files. Except for memory_lock and memory_unlock, they are
-# functionally identical to SVr4 extensions, but they make the binary format
-# different. Grrr....
+# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
-#plab_norm pln str pn - - ----- program label #1 to show string #2
-#label_on smln str LO - - ----- turn on soft labels
-#label_off rmln str LF - - ----- turn off soft labels
-#key_f11 kf11 str F1 - - ----- F11 function key
-#key_f12 kf12 str F2 - - ----- F12 function key
-#key_f13 kf13 str F3 - - ----- F13 function key
-#key_f14 kf14 str F4 - - ----- F14 function key
-#key_f15 kf15 str F5 - - ----- F15 function key
-#key_f16 kf16 str F6 - - ----- F16 function key
-#key_f17 kf17 str F7 - - ----- F17 function key
-#key_f18 kf18 str F8 - - ----- F18 function key
-#key_f19 kf19 str F9 - - ----- F19 function key
-#key_f20 kf20 str FA - - ----- F20 function key
-#key_f21 kf21 str FB - - ----- F21 function key
-#key_f22 kf22 str FC - - ----- F22 function key
-#key_f23 kf23 str FD - - ----- F23 function key
-#key_f24 kf24 str FE - - ----- F24 function key
-#key_f25 kf25 str FF - - ----- F25 function key
-#key_f26 kf26 str FG - - ----- F26 function key
-#key_f27 kf27 str FH - - ----- F27 function key
-#key_f28 kf28 str FI - - ----- F28 function key
-#key_f29 kf29 str FJ - - ----- F29 function key
-#key_f30 kf30 str FK - - ----- F30 function key
-#key_f31 kf31 str FL - - ----- F31 function key
-#key_f32 kf32 str FM - - ----- F32 function key
-#key_f33 kf33 str FN - - ----- F33 function key
-#key_f34 kf34 str FO - - ----- F34 function key
-#key_f35 kf35 str FP - - ----- F35 function key
-#key_f36 kf36 str FQ - - ----- F36 function key
-#key_f37 kf37 str FR - - ----- F37 function key
-#key_f38 kf38 str FS - - ----- F38 function key
-#key_f39 kf39 str FT - - ----- F39 function key
-#key_f40 kf40 str FU - - ----- F40 function key
-#key_f41 kf41 str FV - - ----- F41 function key
-#key_f42 kf42 str FW - - ----- F42 function key
-#key_f43 kf43 str FX - - ----- F43 function key
-#key_f44 kf44 str FY - - ----- F44 function key
-#key_f45 kf45 str FZ - - ----- F45 function key
-#key_f46 kf46 str Fa - - ----- F46 function key
-#key_f47 kf47 str Fb - - ----- F47 function key
-#key_f48 kf48 str Fc - - ----- F48 function key
-#key_f49 kf49 str Fd - - ----- F49 function key
-#key_f50 kf50 str Fe - - ----- F50 function key
-#key_f51 kf51 str Ff - - ----- F51 function key
-#key_f52 kf52 str Fg - - ----- F52 function key
-#key_f53 kf53 str Fh - - ----- F53 function key
-#key_f54 kf54 str Fi - - ----- F54 function key
-#key_f55 kf55 str Fj - - ----- F55 function key
-#key_f56 kf56 str Fk - - ----- F56 function key
-#key_f57 kf57 str Fl - - ----- F57 function key
-#key_f58 kf58 str Fm - - ----- F58 function key
-#key_f59 kf59 str Fn - - ----- F59 function key
-#key_f60 kf60 str Fo - - ----- F60 function key
-#key_f61 kf61 str Fp - - ----- F61 function key
-#key_f62 kf62 str Fq - - ----- F62 function key
-#key_f63 kf63 str Fr - - ----- F63 function key
-#
-#############################################################################
-#
-# ALIAS DECLARATIONS
-#
-# Here we set up aliases for translating extensions into standard terminfo.
-#
-#---------------------------------- Termcap aliases -------------------------
-#
-# BSD aliases:
-#
-# This is a common error in many termcap files. We'll get notified during
-# translation when this (or any other alias) fires.
-#
-capalias sb sr BSD scroll text down
-#
-# AT&T extensions:
-#
-# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
-# nonstandard capabilities. Its signature is the KM capability, used to name
-# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
-# set. Comments in the original, and a little cross-checking with other AT&T
-# documentation, seem to establish the following mappings:
-#
-capalias BO mr AT&T enter_reverse_mode
-capalias CI vi AT&T cursor_invisible
-capalias CV ve AT&T cursor_normal
-capalias DS mh AT&T enter_dim_mode
-#capalias EE me AT&T exit_attribute_mode
-capalias FE LF AT&T label_on
-capalias FL LO AT&T label_off
-capalias XS mk AT&T enter_secure_mode
-#
-# We comment out EE because the conflicting XENIX EE is more common in
-# old entries.
-#
-# XENIX extensions:
-#
-# These are the ones we know how to translate directly:
-#
-capalias EE mh XENIX exit_attribute_mode
-capalias GE ae XENIX exit_alt_charset_mode
-capalias GS as XENIX enter_alt_charset_mode
-capalias CF vi XENIX cursor_invis
-capalias CO ve XENIX cursor_normal
-capalias EN @7 XENIX key_end
-capalias HM kh XENIX key_home
-capalias LD kL XENIX key_dl
-capalias PD kN XENIX key_npage
-capalias PN po XENIX prtr_off
-capalias PS pf XENIX prtr_on
-capalias PU kP XENIX key_ppage
-capalias RT @8 XENIX kent
-capalias UP ku XENIX kcuu1
-capalias G6 IGNORE XENIX double-ACS_ULCORNER
-capalias G7 IGNORE XENIX double-ACS_LLCORNER
-capalias G5 IGNORE XENIX double-ACS_URCORNER
-capalias G8 IGNORE XENIX double-ACS_LRCORNER
-capalias Gr IGNORE XENIX double-ACS_LTEE
-capalias Gr IGNORE XENIX double-ACS_RTEE
-capalias Gu IGNORE XENIX double-ACS_BTEE
-capalias Gd IGNORE XENIX double ACS_TTEE
-capalias Gh IGNORE XENIX double-ACS_HLINE
-capalias Gv IGNORE XENIX double-ACS_VLINE
-capalias Gc IGNORE XENIX double-ACS_PLUS
-capalias GG IGNORE XENIX acs-glitch
-#
-# IBM extensions:
-#
-capalias kq %1 IBM key_help
-#
-# Iris extensions:
-#
-capalias HS mh IRIS enter_dim_mode
-#
-# Tektronix extensions:
-#
-capalias KA k; Tek key_f10
-capalias KB F1 Tek key_f11
-capalias KC F2 Tek key_f12
-capalias KD F3 Tek key_f13
-capalias KE F4 Tek key_f14
-capalias KF F5 Tek key_f15
-capalias BC Sb Tek set_background
-capalias FC Sf Tek set_foreground
-#
-# There are also the following:
-#
-# XENIX XENIX variable name name clash with terminfo?
-# ----- ------------------- -------------------------
-# CL key_char_left
-# CR key_char_right
-# CW key_change_window
-# HP ??
-# LF key_linefeed label_off
-# NU key_next_unlocked_cell
-# PL ??
-# PR ??
-# RC key_recalc remove_clock
-# RF key_toggle_ref req_for_input
-# WL key_word_left
-# WR key_word_right
-#
-# If you know what any of the question-marked ones mean, please tell us.
-#
-#--------------------------------- Terminfo aliases ------------------------
-#
-# IBM extensions:
-#
-infoalias font0 s0ds IBM set0_des_seq
-infoalias font1 s1ds IBM set1_des_seq
-infoalias font2 s2ds IBM set2_des_seq
-infoalias font3 s3ds IBM set3_des_seq
-infoalias kbtab kcbt IBM key_backtab
-infoalias ksel kslt IBM key_select
-#
-# Some others are identical to SVr4/XPG4 capabilities, in particular:
-# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
diff --git a/include/Caps.hpux11 b/include/Caps.hpux11
index b7bb998..e028224 100644
--- a/include/Caps.hpux11
+++ b/include/Caps.hpux11
@@ -1,5 +1,6 @@
##############################################################################
-# Copyright (c) 2002-2010,2011 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2002-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,13 +29,13 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.hpux11,v 1.6 2011/10/15 23:20:04 tom Exp $
+# $Id: Caps.hpux11,v 1.15 2020/02/02 23:34:34 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
#
# This table is used to generate initializers for tables that drive tic,
-# infocmp, and the library compilation code used to support the termcap
+# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@@ -97,7 +98,7 @@
# 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 the ncurses
+# 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.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@@ -119,14 +120,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
-# CONTROLLING ENTRY LENGTH
+# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
-# the set of keys the `joe' editor will be upset if it can't see. So don't
+# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@@ -147,7 +148,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
-# into history and GNU termcap's application base shrinks towards being GNU
+# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@@ -166,7 +167,7 @@
#%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
+#%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.
#%
@@ -227,7 +228,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+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)
@@ -273,7 +274,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
-maximum_windows wnum num MW - - ----- maximum number of defineable windows
+maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@@ -298,7 +299,7 @@ dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
-micro_col_size mcs num Yf - - ----- character step size when in micro mode
+micro_char_size mcs num Yf - - ----- character step size when in micro mode
micro_line_size mls num Yg - - ----- line step size when in micro mode
number_of_pins npins num Yh - - ----- numbers of pins in print-head
output_res_char orc num Yi - - ----- horizontal resolution in units per line
@@ -727,7 +728,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
-define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@@ -755,6 +756,8 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%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;
@@ -764,19 +767,19 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
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 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
-enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
-enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
-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
-exit_horizontal_hl_mode rhhlm str XH - - ----K Exit horizontal highlight mode
-exit_left_hl_mode rlhlm str XL - - ----K Exit left highlight mode
-exit_low_hl_mode rlohlm str XO - - ----K Exit low highlight mode
-exit_right_hl_mode rrhlm str XR - - ----K Exit right highlight mode
-exit_top_hl_mode rthlm str XT - - ----K Exit top highlight mode
-exit_vertical_hl_mode rvhlm str XV - - ----K Exit vertical highlight mode
+enter_horizontal_hl_mode ehhlm str Q1 - - ----- Enter horizontal highlight mode
+enter_left_hl_mode elhlm str Q2 - - ----- Enter left highlight mode
+enter_low_hl_mode elohlm str Q3 - - ----- Enter low highlight mode
+enter_right_hl_mode erhlm str Q4 - - ----- Enter right highlight mode
+enter_top_hl_mode ethlm str Q5 - - ----- Enter top highlight mode
+enter_vertical_hl_mode evhlm str Q6 - - ----- Enter vertical highlight mode
+set_a_attributes sgr1 str Q7 - - ----- Define second set of video attributes #1-#6
+exit_horizontal_hl_mode rmhhlm str Q8 - - ----K Exit horizontal highlight mode
+exit_left_hl_mode rmlhlm str Q9 - - ----K Exit left highlight mode
+exit_low_hl_mode rmlohlm str Qa - - ----K Exit low highlight mode
+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
#
@@ -840,7 +843,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
-# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@@ -857,9 +860,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
-# The `ma' capability seems to have been designed to map between the rogue(2)
-# motion keys (including jkhl) and characters emitted by arrow keys on some
-# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+# The `ma' capability was a 4.0BSD feature used by vi version 2.
+# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
+# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@@ -885,7 +888,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
-arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@@ -901,7 +904,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
-# in the mytinfo tables.
+# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@@ -950,7 +953,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
-# (via IGNORE aliases further down). We don't want to do normal pad
+# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@@ -972,303 +975,8 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
-# This section is almost all comments. What it's mainly for is to describe
-# what capabilities need to be squeezed out to get down to the XSI Curses
-# standard set. They are flagged with K.
-#
-# HP extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in HP
-# terminfo files. Except for memory_lock and memory_unlock, they are
-# functionally identical to SVr4 extensions, but they make the binary format
-# different. Grrr....
-#
-#memory_lock meml str ml - - ----K memory lock above
-#memory_unlock memu str mu - - ----K memory unlock
-#plab_norm pln str pn - - ----- program label #1 to show string #2
-#label_on smln str LO - - ----- turn on soft labels
-#label_off rmln str LF - - ----- turn off soft labels
-#key_f11 kf11 str F1 - - ----- F11 function key
-#key_f12 kf12 str F2 - - ----- F12 function key
-#key_f13 kf13 str F3 - - ----- F13 function key
-#key_f14 kf14 str F4 - - ----- F14 function key
-#key_f15 kf15 str F5 - - ----- F15 function key
-#key_f16 kf16 str F6 - - ----- F16 function key
-#key_f17 kf17 str F7 - - ----- F17 function key
-#key_f18 kf18 str F8 - - ----- F18 function key
-#key_f19 kf19 str F9 - - ----- F19 function key
-#key_f20 kf20 str FA - - ----- F20 function key
-#key_f21 kf21 str FB - - ----- F21 function key
-#key_f22 kf22 str FC - - ----- F22 function key
-#key_f23 kf23 str FD - - ----- F23 function key
-#key_f24 kf24 str FE - - ----- F24 function key
-#key_f25 kf25 str FF - - ----- F25 function key
-#key_f26 kf26 str FG - - ----- F26 function key
-#key_f27 kf27 str FH - - ----- F27 function key
-#key_f28 kf28 str FI - - ----- F28 function key
-#key_f29 kf29 str FJ - - ----- F29 function key
-#key_f30 kf30 str FK - - ----- F30 function key
-#key_f31 kf31 str FL - - ----- F31 function key
-#key_f32 kf32 str FM - - ----- F32 function key
-#key_f33 kf33 str FN - - ----- F33 function key
-#key_f34 kf34 str FO - - ----- F34 function key
-#key_f35 kf35 str FP - - ----- F35 function key
-#key_f36 kf36 str FQ - - ----- F36 function key
-#key_f37 kf37 str FR - - ----- F37 function key
-#key_f38 kf38 str FS - - ----- F38 function key
-#key_f39 kf39 str FT - - ----- F39 function key
-#key_f40 kf40 str FU - - ----- F40 function key
-#key_f41 kf41 str FV - - ----- F41 function key
-#key_f42 kf42 str FW - - ----- F42 function key
-#key_f43 kf43 str FX - - ----- F43 function key
-#key_f44 kf44 str FY - - ----- F44 function key
-#key_f45 kf45 str FZ - - ----- F45 function key
-#key_f46 kf46 str Fa - - ----- F46 function key
-#key_f47 kf47 str Fb - - ----- F47 function key
-#key_f48 kf48 str Fc - - ----- F48 function key
-#key_f49 kf49 str Fd - - ----- F49 function key
-#key_f50 kf50 str Fe - - ----- F50 function key
-#key_f51 kf51 str Ff - - ----- F51 function key
-#key_f52 kf52 str Fg - - ----- F52 function key
-#key_f53 kf53 str Fh - - ----- F53 function key
-#key_f54 kf54 str Fi - - ----- F54 function key
-#key_f55 kf55 str Fj - - ----- F55 function key
-#key_f56 kf56 str Fk - - ----- F56 function key
-#key_f57 kf57 str Fl - - ----- F57 function key
-#key_f58 kf58 str Fm - - ----- F58 function key
-#key_f59 kf59 str Fn - - ----- F59 function key
-#key_f60 kf60 str Fo - - ----- F60 function key
-#key_f61 kf61 str Fp - - ----- F61 function key
-#key_f62 kf62 str Fq - - ----- F62 function key
-#key_f63 kf63 str Fr - - ----- F63 function key
-#
-# IBM extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in IBM
-# terminfo files.
-#
-# The places in the box[12] capabilities correspond to acsc characters, here is
-# the mapping:
-#
-# box1[0] = ACS_ULCORNER
-# box1[1] = ACS_HLINE
-# box1[2] = ACS_URCORNER
-# box1[3] = ACS_VLINE
-# box1[4] = ACS_LRCORNER
-# box1[5] = ACS_LLCORNER
-# box1[6] = ACS_TTEE
-# box1[7] = ACS_RTEE
-# box1[8] = ACS_BTEE
-# box1[9] = ACS_LTEE
-# box1[10] = ACS_PLUS
-#
-# The box2 characters are the double-line versions of these forms graphics.
+# (see Caps-ncurses for the complete set of comments)
#
box_chars_1 box1 str bx - - ----K box characters primary set
-#box_chars_2 box2 str by - - ----K box characters secondary set
-#box_attr_1 batt1 str Bx - - ----K attributes for box1
-#box_attr_2 batt2 str By - - ----K attributes for box2
-#color_bg_0 colb0 str d0 - - ----K background color 0
-#color_bg_1 colb1 str d1 - - ----K background color 1
-#color_bg_2 colb2 str d2 - - ----K background color 2
-#color_bg_3 colb3 str d3 - - ----K background color 3
-#color_bg_4 colb4 str d4 - - ----K background color 4
-#color_bg_5 colb5 str d5 - - ----K background color 5
-#color_bg_6 colb6 str d6 - - ----K background color 6
-#color_bg_7 colb7 str d7 - - ----K background color 7
-#color_fg_0 colf0 str c0 - - ----K foreground color 0
-#color_fg_1 colf1 str c1 - - ----K foreground color 1
-#color_fg_2 colf2 str c2 - - ----K foreground color 2
-#color_fg_3 colf3 str c3 - - ----K foreground color 3
-#color_fg_4 colf4 str c4 - - ----K foreground color 4
-#color_fg_5 colf5 str c5 - - ----K foreground color 5
-#color_fg_6 colf6 str c6 - - ----K foreground color 6
-#color_fg_7 colf7 str c7 - - ----K foreground color 7
-#font_0 font0 str f0 - - ----- select font 0
-#font_1 font1 str f1 - - ----- select font 1
-#font_2 font2 str f2 - - ----- select font 2
-#font_3 font3 str f3 - - ----- select font 3
-#font_4 font4 str f4 - - ----K select font 4
-#font_5 font5 str f5 - - ----K select font 5
-#font_6 font6 str f6 - - ----K select font 6
-#font_7 font7 str f7 - - ----K select font 7
-#key_back_tab kbtab str k0 - - ----- backtab key
-#key_do kdo str ki - - ----K do request key
-#key_command kcmd str kd - - ----K command-request key
-#key_command_pane kcpn str kW - - ----K command-pane key
-#key_end kend str kw - - ----- end key
-#key_help khlp str kq - - ----- help key
-#key_newline knl str nl - - ----K newline key
-#key_next_pane knpn str kv - - ----K next-pane key
-#key_prev_cmd kppn str kp - - ----K previous-command key
-#key_prev_pane kppn str kV - - ----K previous-pane key
-#key_quit kquit str kQ - - ----K quit key
-#key_select ksel str kU - - ----- select key
-#key_scroll_left kscl str kz - - ----K scroll left
-#key_scroll_right kscr str kZ - - ----K scroll right
-#key_tab ktab str ko - - ----K tab key
-#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
-#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
-#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
-#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
-#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
-#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
-#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
-#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
-#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
-#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
-#appl_defined_str apstr str za - - ----K application-defined string
-# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
-# the IBM manual pages, so the cap name strings are guesses. The terminfo
-# names are almost certainly right, the termcap ones almost certainly wrong.
-#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
-#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
-#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
-#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
-#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
-#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
-#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
-#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
-# Undocumented capabilities end here
-#key_sf1 ksf1 str S1 - - ----K special function key 1
-#key_sf2 ksf2 str S2 - - ----K special function key 2
-#key_sf3 ksf3 str S3 - - ----K special function key 3
-#key_sf4 ksf4 str S4 - - ----K special function key 4
-#key_sf5 ksf5 str S5 - - ----K special function key 5
-#key_sf6 ksf6 str S6 - - ----K special function key 6
-#key_sf7 ksf7 str S7 - - ----K special function key 7
-#key_sf8 ksf8 str S8 - - ----K special function key 8
-#key_sf9 ksf9 str S9 - - ----K special function key 9
-#key_sf10 ksf10 str SA - - ----K special function key 10
-# AIX version 3 documents different codes for F11, F12 and does not mention
-# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
-#key_f11 kf11 str k< - - ----- function key 11
-#key_f12 kf12 str k> - - ----- function key 12
-# Undocumented capabilities end here.
-#key_action kact str kJ - - ----K sent by action key
-# The IBM docs say these capabilities are for table-drawing, and are
-# valid only for aixterm descriptions.
-#enter_topline_mode topl str tp - - ----K start top-line mode
-#enter_bottom_mode btml str bm - - ----K start bottom-line mode
-#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
-#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
-#
-#############################################################################
-#
-# ALIAS DECLARATIONS
-#
-# Here we set up aliases for translating extensions into standard terminfo.
-#
-#---------------------------------- Termcap aliases -------------------------
-#
-# BSD aliases:
-#
-# This is a common error in many termcap files. We'll get notified during
-# translation when this (or any other alias) fires.
-#
-capalias sb sr BSD scroll text down
-#
-# AT&T extensions:
-#
-# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
-# nonstandard capabilities. Its signature is the KM capability, used to name
-# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
-# set. Comments in the original, and a little cross-checking with other AT&T
-# documentation, seem to establish the following mappings:
-#
-capalias BO mr AT&T enter_reverse_mode
-capalias CI vi AT&T cursor_invisible
-capalias CV ve AT&T cursor_normal
-capalias DS mh AT&T enter_dim_mode
-#capalias EE me AT&T exit_attribute_mode
-capalias FE LF AT&T label_on
-capalias FL LO AT&T label_off
-capalias XS mk AT&T enter_secure_mode
-#
-# We comment out EE because the conflicting XENIX EE is more common in
-# old entries.
-#
-# XENIX extensions:
-#
-# These are the ones we know how to translate directly:
-#
-capalias EE mh XENIX exit_attribute_mode
-capalias GE ae XENIX exit_alt_charset_mode
-capalias GS as XENIX enter_alt_charset_mode
-capalias CF vi XENIX cursor_invis
-capalias CO ve XENIX cursor_normal
-capalias EN @7 XENIX key_end
-capalias HM kh XENIX key_home
-capalias LD kL XENIX key_dl
-capalias PD kN XENIX key_npage
-capalias PN po XENIX prtr_off
-capalias PS pf XENIX prtr_on
-capalias PU kP XENIX key_ppage
-capalias RT @8 XENIX kent
-capalias UP ku XENIX kcuu1
-capalias G6 IGNORE XENIX double-ACS_ULCORNER
-capalias G7 IGNORE XENIX double-ACS_LLCORNER
-capalias G5 IGNORE XENIX double-ACS_URCORNER
-capalias G8 IGNORE XENIX double-ACS_LRCORNER
-capalias Gr IGNORE XENIX double-ACS_LTEE
-capalias Gr IGNORE XENIX double-ACS_RTEE
-capalias Gu IGNORE XENIX double-ACS_BTEE
-capalias Gd IGNORE XENIX double ACS_TTEE
-capalias Gh IGNORE XENIX double-ACS_HLINE
-capalias Gv IGNORE XENIX double-ACS_VLINE
-capalias Gc IGNORE XENIX double-ACS_PLUS
-capalias GG IGNORE XENIX acs-glitch
-#
-# IBM extensions:
-#
-capalias kq %1 IBM key_help
-#
-# Iris extensions:
-#
-capalias HS mh IRIS enter_dim_mode
-#
-# Tektronix extensions:
-#
-capalias KA k; Tek key_f10
-capalias KB F1 Tek key_f11
-capalias KC F2 Tek key_f12
-capalias KD F3 Tek key_f13
-capalias KE F4 Tek key_f14
-capalias KF F5 Tek key_f15
-capalias BC Sb Tek set_background
-capalias FC Sf Tek set_foreground
-#
-# There are also the following:
-#
-# XENIX XENIX variable name name clash with terminfo?
-# ----- ------------------- -------------------------
-# CL key_char_left
-# CR key_char_right
-# CW key_change_window
-# HP ??
-# LF key_linefeed label_off
-# NU key_next_unlocked_cell
-# PL ??
-# PR ??
-# RC key_recalc remove_clock
-# RF key_toggle_ref req_for_input
-# WL key_word_left
-# WR key_word_right
-#
-# If you know what any of the question-marked ones mean, please tell us.
-#
-#--------------------------------- Terminfo aliases ------------------------
-#
-# IBM extensions:
-#
-infoalias font0 s0ds IBM set0_des_seq
-infoalias font1 s1ds IBM set1_des_seq
-infoalias font2 s2ds IBM set2_des_seq
-infoalias font3 s3ds IBM set3_des_seq
-infoalias kbtab kcbt IBM key_backtab
-infoalias ksel kslt IBM key_select
-#
-# Some others are identical to SVr4/XPG4 capabilities, in particular:
-# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
diff --git a/include/Caps.keys b/include/Caps.keys
index 99c65b7..6b03964 100644
--- a/include/Caps.keys
+++ b/include/Caps.keys
@@ -1,5 +1,6 @@
##############################################################################
-# Copyright (c) 2001-2011,2013 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -29,14 +30,14 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
-# $Id: Caps.keys,v 1.7 2013/07/20 17:59:24 tom Exp $
+# $Id: Caps.keys,v 1.14 2020/02/02 23:34:34 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
# control-modifiers applied to function and normal keys, as done on IBM pc's.
#
# This table is used to generate initializers for tables that drive tic,
-# infocmp, and the library compilation code used to support the termcap
+# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@@ -99,7 +100,7 @@
# 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 the ncurses
+# 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.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@@ -121,14 +122,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
-# CONTROLLING ENTRY LENGTH
+# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
-# the set of keys the `joe' editor will be upset if it can't see. So don't
+# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@@ -149,7 +150,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
-# into history and GNU termcap's application base shrinks towards being GNU
+# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@@ -168,7 +169,7 @@
#%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
+#%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.
#%
@@ -229,7 +230,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+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
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@@ -273,7 +274,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
-maximum_windows wnum num MW - - ----- maximum number of defineable windows
+maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@@ -809,7 +810,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
-define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@@ -916,7 +917,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
-# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@@ -933,9 +934,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
-# The `ma' capability seems to have been designed to map between the rogue(2)
-# motion keys (including jkhl) and characters emitted by arrow keys on some
-# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+# The `ma' capability was a 4.0BSD feature used by vi version 2.
+# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
+# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@@ -961,7 +962,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
-arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@@ -977,7 +978,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
-# in the mytinfo tables.
+# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@@ -1026,7 +1027,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
-# (via IGNORE aliases further down). We don't want to do normal pad
+# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@@ -1048,303 +1049,10 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
-# This section is almost all comments. What it's mainly for is to describe
-# what capabilities need to be squeezed out to get down to the XSI Curses
-# standard set. They are flagged with K.
-#
-# HP extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in HP
-# terminfo files. Except for memory_lock and memory_unlock, they are
-# functionally identical to SVr4 extensions, but they make the binary format
-# different. Grrr....
+# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
-#plab_norm pln str pn - - ----- program label #1 to show string #2
-#label_on smln str LO - - ----- turn on soft labels
-#label_off rmln str LF - - ----- turn off soft labels
-#key_f11 kf11 str F1 - - ----- F11 function key
-#key_f12 kf12 str F2 - - ----- F12 function key
-#key_f13 kf13 str F3 - - ----- F13 function key
-#key_f14 kf14 str F4 - - ----- F14 function key
-#key_f15 kf15 str F5 - - ----- F15 function key
-#key_f16 kf16 str F6 - - ----- F16 function key
-#key_f17 kf17 str F7 - - ----- F17 function key
-#key_f18 kf18 str F8 - - ----- F18 function key
-#key_f19 kf19 str F9 - - ----- F19 function key
-#key_f20 kf20 str FA - - ----- F20 function key
-#key_f21 kf21 str FB - - ----- F21 function key
-#key_f22 kf22 str FC - - ----- F22 function key
-#key_f23 kf23 str FD - - ----- F23 function key
-#key_f24 kf24 str FE - - ----- F24 function key
-#key_f25 kf25 str FF - - ----- F25 function key
-#key_f26 kf26 str FG - - ----- F26 function key
-#key_f27 kf27 str FH - - ----- F27 function key
-#key_f28 kf28 str FI - - ----- F28 function key
-#key_f29 kf29 str FJ - - ----- F29 function key
-#key_f30 kf30 str FK - - ----- F30 function key
-#key_f31 kf31 str FL - - ----- F31 function key
-#key_f32 kf32 str FM - - ----- F32 function key
-#key_f33 kf33 str FN - - ----- F33 function key
-#key_f34 kf34 str FO - - ----- F34 function key
-#key_f35 kf35 str FP - - ----- F35 function key
-#key_f36 kf36 str FQ - - ----- F36 function key
-#key_f37 kf37 str FR - - ----- F37 function key
-#key_f38 kf38 str FS - - ----- F38 function key
-#key_f39 kf39 str FT - - ----- F39 function key
-#key_f40 kf40 str FU - - ----- F40 function key
-#key_f41 kf41 str FV - - ----- F41 function key
-#key_f42 kf42 str FW - - ----- F42 function key
-#key_f43 kf43 str FX - - ----- F43 function key
-#key_f44 kf44 str FY - - ----- F44 function key
-#key_f45 kf45 str FZ - - ----- F45 function key
-#key_f46 kf46 str Fa - - ----- F46 function key
-#key_f47 kf47 str Fb - - ----- F47 function key
-#key_f48 kf48 str Fc - - ----- F48 function key
-#key_f49 kf49 str Fd - - ----- F49 function key
-#key_f50 kf50 str Fe - - ----- F50 function key
-#key_f51 kf51 str Ff - - ----- F51 function key
-#key_f52 kf52 str Fg - - ----- F52 function key
-#key_f53 kf53 str Fh - - ----- F53 function key
-#key_f54 kf54 str Fi - - ----- F54 function key
-#key_f55 kf55 str Fj - - ----- F55 function key
-#key_f56 kf56 str Fk - - ----- F56 function key
-#key_f57 kf57 str Fl - - ----- F57 function key
-#key_f58 kf58 str Fm - - ----- F58 function key
-#key_f59 kf59 str Fn - - ----- F59 function key
-#key_f60 kf60 str Fo - - ----- F60 function key
-#key_f61 kf61 str Fp - - ----- F61 function key
-#key_f62 kf62 str Fq - - ----- F62 function key
-#key_f63 kf63 str Fr - - ----- F63 function key
-#
-# IBM extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in IBM
-# terminfo files.
-#
-# The places in the box[12] capabilities correspond to acsc characters, here is
-# the mapping:
-#
-# box1[0] = ACS_ULCORNER
-# box1[1] = ACS_HLINE
-# box1[2] = ACS_URCORNER
-# box1[3] = ACS_VLINE
-# box1[4] = ACS_LRCORNER
-# box1[5] = ACS_LLCORNER
-# box1[6] = ACS_TTEE
-# box1[7] = ACS_RTEE
-# box1[8] = ACS_BTEE
-# box1[9] = ACS_LTEE
-# box1[10] = ACS_PLUS
-#
-# The box2 characters are the double-line versions of these forms graphics.
-#
box_chars_1 box1 str bx - - ----K box characters primary set
-#box_chars_2 box2 str by - - ----K box characters secondary set
-#box_attr_1 batt1 str Bx - - ----K attributes for box1
-#box_attr_2 batt2 str By - - ----K attributes for box2
-#color_bg_0 colb0 str d0 - - ----K background color 0
-#color_bg_1 colb1 str d1 - - ----K background color 1
-#color_bg_2 colb2 str d2 - - ----K background color 2
-#color_bg_3 colb3 str d3 - - ----K background color 3
-#color_bg_4 colb4 str d4 - - ----K background color 4
-#color_bg_5 colb5 str d5 - - ----K background color 5
-#color_bg_6 colb6 str d6 - - ----K background color 6
-#color_bg_7 colb7 str d7 - - ----K background color 7
-#color_fg_0 colf0 str c0 - - ----K foreground color 0
-#color_fg_1 colf1 str c1 - - ----K foreground color 1
-#color_fg_2 colf2 str c2 - - ----K foreground color 2
-#color_fg_3 colf3 str c3 - - ----K foreground color 3
-#color_fg_4 colf4 str c4 - - ----K foreground color 4
-#color_fg_5 colf5 str c5 - - ----K foreground color 5
-#color_fg_6 colf6 str c6 - - ----K foreground color 6
-#color_fg_7 colf7 str c7 - - ----K foreground color 7
-#font_0 font0 str f0 - - ----- select font 0
-#font_1 font1 str f1 - - ----- select font 1
-#font_2 font2 str f2 - - ----- select font 2
-#font_3 font3 str f3 - - ----- select font 3
-#font_4 font4 str f4 - - ----K select font 4
-#font_5 font5 str f5 - - ----K select font 5
-#font_6 font6 str f6 - - ----K select font 6
-#font_7 font7 str f7 - - ----K select font 7
-#key_back_tab kbtab str k0 - - ----- backtab key
-#key_do kdo str ki - - ----K do request key
-#key_command kcmd str kd - - ----K command-request key
-#key_command_pane kcpn str kW - - ----K command-pane key
-#key_end kend str kw - - ----- end key
-#key_help khlp str kq - - ----- help key
-#key_newline knl str nl - - ----K newline key
-#key_next_pane knpn str kv - - ----K next-pane key
-#key_prev_cmd kppn str kp - - ----K previous-command key
-#key_prev_pane kppn str kV - - ----K previous-pane key
-#key_quit kquit str kQ - - ----K quit key
-#key_select ksel str kU - - ----- select key
-#key_scroll_left kscl str kz - - ----K scroll left
-#key_scroll_right kscr str kZ - - ----K scroll right
-#key_tab ktab str ko - - ----K tab key
-#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
-#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
-#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
-#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
-#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
-#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
-#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
-#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
-#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
-#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
-#appl_defined_str apstr str za - - ----K application-defined string
-# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
-# the IBM manual pages, so the cap name strings are guesses. The terminfo
-# names are almost certainly right, the termcap ones almost certainly wrong.
-#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
-#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
-#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
-#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
-#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
-#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
-#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
-#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
-# Undocumented capabilities end here
-#key_sf1 ksf1 str S1 - - ----K special function key 1
-#key_sf2 ksf2 str S2 - - ----K special function key 2
-#key_sf3 ksf3 str S3 - - ----K special function key 3
-#key_sf4 ksf4 str S4 - - ----K special function key 4
-#key_sf5 ksf5 str S5 - - ----K special function key 5
-#key_sf6 ksf6 str S6 - - ----K special function key 6
-#key_sf7 ksf7 str S7 - - ----K special function key 7
-#key_sf8 ksf8 str S8 - - ----K special function key 8
-#key_sf9 ksf9 str S9 - - ----K special function key 9
-#key_sf10 ksf10 str SA - - ----K special function key 10
-# AIX version 3 documents different codes for F11, F12 and does not mention
-# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
-#key_f11 kf11 str k< - - ----- function key 11
-#key_f12 kf12 str k> - - ----- function key 12
-# Undocumented capabilities end here.
-#key_action kact str kJ - - ----K sent by action key
-# The IBM docs say these capabilities are for table-drawing, and are
-# valid only for aixterm descriptions.
-#enter_topline_mode topl str tp - - ----K start top-line mode
-#enter_bottom_mode btml str bm - - ----K start bottom-line mode
-#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
-#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
-#
-#############################################################################
-#
-# ALIAS DECLARATIONS
-#
-# Here we set up aliases for translating extensions into standard terminfo.
-#
-#---------------------------------- Termcap aliases -------------------------
-#
-# BSD aliases:
-#
-# This is a common error in many termcap files. We'll get notified during
-# translation when this (or any other alias) fires.
-#
-capalias sb sr BSD scroll text down
-#
-# AT&T extensions:
-#
-# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
-# nonstandard capabilities. Its signature is the KM capability, used to name
-# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
-# set. Comments in the original, and a little cross-checking with other AT&T
-# documentation, seem to establish the following mappings:
-#
-capalias BO mr AT&T enter_reverse_mode
-capalias CI vi AT&T cursor_invisible
-capalias CV ve AT&T cursor_normal
-capalias DS mh AT&T enter_dim_mode
-#capalias EE me AT&T exit_attribute_mode
-capalias FE LF AT&T label_on
-capalias FL LO AT&T label_off
-capalias XS mk AT&T enter_secure_mode
-#
-# We comment out EE because the conflicting XENIX EE is more common in
-# old entries.
-#
-# XENIX extensions:
-#
-# These are the ones we know how to translate directly:
-#
-capalias EE mh XENIX exit_attribute_mode
-capalias GE ae XENIX exit_alt_charset_mode
-capalias GS as XENIX enter_alt_charset_mode
-capalias CF vi XENIX cursor_invis
-capalias CO ve XENIX cursor_normal
-capalias EN @7 XENIX key_end
-capalias HM kh XENIX key_home
-capalias LD kL XENIX key_dl
-capalias PD kN XENIX key_npage
-capalias PN po XENIX prtr_off
-capalias PS pf XENIX prtr_on
-capalias PU kP XENIX key_ppage
-capalias RT @8 XENIX kent
-capalias UP ku XENIX kcuu1
-capalias G6 IGNORE XENIX double-ACS_ULCORNER
-capalias G7 IGNORE XENIX double-ACS_LLCORNER
-capalias G5 IGNORE XENIX double-ACS_URCORNER
-capalias G8 IGNORE XENIX double-ACS_LRCORNER
-capalias Gr IGNORE XENIX double-ACS_LTEE
-capalias Gr IGNORE XENIX double-ACS_RTEE
-capalias Gu IGNORE XENIX double-ACS_BTEE
-capalias Gd IGNORE XENIX double ACS_TTEE
-capalias Gh IGNORE XENIX double-ACS_HLINE
-capalias Gv IGNORE XENIX double-ACS_VLINE
-capalias Gc IGNORE XENIX double-ACS_PLUS
-capalias GG IGNORE XENIX acs-glitch
-#
-# IBM extensions:
-#
-capalias kq %1 IBM key_help
-#
-# Iris extensions:
-#
-capalias HS mh IRIS enter_dim_mode
-#
-# Tektronix extensions:
-#
-capalias KA k; Tek key_f10
-capalias KB F1 Tek key_f11
-capalias KC F2 Tek key_f12
-capalias KD F3 Tek key_f13
-capalias KE F4 Tek key_f14
-capalias KF F5 Tek key_f15
-capalias BC Sb Tek set_background
-capalias FC Sf Tek set_foreground
-#
-# There are also the following:
-#
-# XENIX XENIX variable name name clash with terminfo?
-# ----- ------------------- -------------------------
-# CL key_char_left
-# CR key_char_right
-# CW key_change_window
-# HP ??
-# LF key_linefeed label_off
-# NU key_next_unlocked_cell
-# PL ??
-# PR ??
-# RC key_recalc remove_clock
-# RF key_toggle_ref req_for_input
-# WL key_word_left
-# WR key_word_right
-#
-# If you know what any of the question-marked ones mean, please tell us.
-#
-#--------------------------------- Terminfo aliases ------------------------
-#
-# IBM extensions:
-#
-infoalias font0 s0ds IBM set0_des_seq
-infoalias font1 s1ds IBM set1_des_seq
-infoalias font2 s2ds IBM set2_des_seq
-infoalias font3 s3ds IBM set3_des_seq
-infoalias kbtab kcbt IBM key_backtab
-infoalias ksel kslt IBM key_select
-#
-# Some others are identical to SVr4/XPG4 capabilities, in particular:
-# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
diff --git a/include/Caps.osf1r5 b/include/Caps.osf1r5
index b9400b9..9499183 100644
--- a/include/Caps.osf1r5
+++ b/include/Caps.osf1r5
@@ -1,5 +1,6 @@
##############################################################################
-# Copyright (c) 2002-2010,2011 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2002-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,13 +29,13 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.osf1r5,v 1.6 2011/10/15 22:52:09 tom Exp $
+# $Id: Caps.osf1r5,v 1.13 2020/02/02 23:34:34 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
#
# This table is used to generate initializers for tables that drive tic,
-# infocmp, and the library compilation code used to support the termcap
+# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@@ -97,7 +98,7 @@
# 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 the ncurses
+# 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.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@@ -119,14 +120,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
-# CONTROLLING ENTRY LENGTH
+# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
-# the set of keys the `joe' editor will be upset if it can't see. So don't
+# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@@ -147,7 +148,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
-# into history and GNU termcap's application base shrinks towards being GNU
+# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@@ -166,7 +167,7 @@
#%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
+#%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.
#%
@@ -227,7 +228,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+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
back_color_erase bce bool ut - - ----- screen erased with background color
@@ -280,7 +281,7 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
-maximum_windows wnum num MW - - ----- maximum number of defineable windows
+maximum_windows wnum num MW - - ----- maximum number of definable windows
micro_col_size mcs num Yf - - ----- character step size when in micro mode
micro_line_size mls num Yg - - ----- line step size when in micro mode
no_color_video ncv num NC - - ----- video attributes that can not be used with colors
@@ -574,7 +575,7 @@ clr_bol el1 str cb - - ----- Clear to beginning of line
code_set_init csin str ci - - ----- Init sequence for multiple codesets
color_names colornm str Yw - - ----- Give name for color #1
create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
-define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
device_type devt str dv - - ----- Indicate language/codeset support
dial_phone dial str DI - - ----- dial number #1
@@ -834,7 +835,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
-# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@@ -851,9 +852,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
-# The `ma' capability seems to have been designed to map between the rogue(2)
-# motion keys (including jkhl) and characters emitted by arrow keys on some
-# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+# The `ma' capability was a 4.0BSD feature used by vi version 2.
+# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
+# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@@ -879,7 +880,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
-arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@@ -895,7 +896,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
-# in the mytinfo tables.
+# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@@ -944,7 +945,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
-# (via IGNORE aliases further down). We don't want to do normal pad
+# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@@ -966,303 +967,9 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
-# This section is almost all comments. What it's mainly for is to describe
-# what capabilities need to be squeezed out to get down to the XSI Curses
-# standard set. They are flagged with K.
-#
-# HP extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in HP
-# terminfo files. Except for memory_lock and memory_unlock, they are
-# functionally identical to SVr4 extensions, but they make the binary format
-# different. Grrr....
+# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
-#plab_norm pln str pn - - ----- program label #1 to show string #2
-#label_on smln str LO - - ----- turn on soft labels
-#label_off rmln str LF - - ----- turn off soft labels
-#key_f11 kf11 str F1 - - ----- F11 function key
-#key_f12 kf12 str F2 - - ----- F12 function key
-#key_f13 kf13 str F3 - - ----- F13 function key
-#key_f14 kf14 str F4 - - ----- F14 function key
-#key_f15 kf15 str F5 - - ----- F15 function key
-#key_f16 kf16 str F6 - - ----- F16 function key
-#key_f17 kf17 str F7 - - ----- F17 function key
-#key_f18 kf18 str F8 - - ----- F18 function key
-#key_f19 kf19 str F9 - - ----- F19 function key
-#key_f20 kf20 str FA - - ----- F20 function key
-#key_f21 kf21 str FB - - ----- F21 function key
-#key_f22 kf22 str FC - - ----- F22 function key
-#key_f23 kf23 str FD - - ----- F23 function key
-#key_f24 kf24 str FE - - ----- F24 function key
-#key_f25 kf25 str FF - - ----- F25 function key
-#key_f26 kf26 str FG - - ----- F26 function key
-#key_f27 kf27 str FH - - ----- F27 function key
-#key_f28 kf28 str FI - - ----- F28 function key
-#key_f29 kf29 str FJ - - ----- F29 function key
-#key_f30 kf30 str FK - - ----- F30 function key
-#key_f31 kf31 str FL - - ----- F31 function key
-#key_f32 kf32 str FM - - ----- F32 function key
-#key_f33 kf33 str FN - - ----- F33 function key
-#key_f34 kf34 str FO - - ----- F34 function key
-#key_f35 kf35 str FP - - ----- F35 function key
-#key_f36 kf36 str FQ - - ----- F36 function key
-#key_f37 kf37 str FR - - ----- F37 function key
-#key_f38 kf38 str FS - - ----- F38 function key
-#key_f39 kf39 str FT - - ----- F39 function key
-#key_f40 kf40 str FU - - ----- F40 function key
-#key_f41 kf41 str FV - - ----- F41 function key
-#key_f42 kf42 str FW - - ----- F42 function key
-#key_f43 kf43 str FX - - ----- F43 function key
-#key_f44 kf44 str FY - - ----- F44 function key
-#key_f45 kf45 str FZ - - ----- F45 function key
-#key_f46 kf46 str Fa - - ----- F46 function key
-#key_f47 kf47 str Fb - - ----- F47 function key
-#key_f48 kf48 str Fc - - ----- F48 function key
-#key_f49 kf49 str Fd - - ----- F49 function key
-#key_f50 kf50 str Fe - - ----- F50 function key
-#key_f51 kf51 str Ff - - ----- F51 function key
-#key_f52 kf52 str Fg - - ----- F52 function key
-#key_f53 kf53 str Fh - - ----- F53 function key
-#key_f54 kf54 str Fi - - ----- F54 function key
-#key_f55 kf55 str Fj - - ----- F55 function key
-#key_f56 kf56 str Fk - - ----- F56 function key
-#key_f57 kf57 str Fl - - ----- F57 function key
-#key_f58 kf58 str Fm - - ----- F58 function key
-#key_f59 kf59 str Fn - - ----- F59 function key
-#key_f60 kf60 str Fo - - ----- F60 function key
-#key_f61 kf61 str Fp - - ----- F61 function key
-#key_f62 kf62 str Fq - - ----- F62 function key
-#key_f63 kf63 str Fr - - ----- F63 function key
-#
-# IBM extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in IBM
-# terminfo files.
-#
-# The places in the box[12] capabilities correspond to acsc characters, here is
-# the mapping:
-#
-# box1[0] = ACS_ULCORNER
-# box1[1] = ACS_HLINE
-# box1[2] = ACS_URCORNER
-# box1[3] = ACS_VLINE
-# box1[4] = ACS_LRCORNER
-# box1[5] = ACS_LLCORNER
-# box1[6] = ACS_TTEE
-# box1[7] = ACS_RTEE
-# box1[8] = ACS_BTEE
-# box1[9] = ACS_LTEE
-# box1[10] = ACS_PLUS
-#
-# The box2 characters are the double-line versions of these forms graphics.
-#
-#box_chars_1 box1 str bx - - ----K box characters primary set
-#box_chars_2 box2 str by - - ----K box characters secondary set
-#box_attr_1 batt1 str Bx - - ----K attributes for box1
-#box_attr_2 batt2 str By - - ----K attributes for box2
-#color_bg_0 colb0 str d0 - - ----K background color 0
-#color_bg_1 colb1 str d1 - - ----K background color 1
-#color_bg_2 colb2 str d2 - - ----K background color 2
-#color_bg_3 colb3 str d3 - - ----K background color 3
-#color_bg_4 colb4 str d4 - - ----K background color 4
-#color_bg_5 colb5 str d5 - - ----K background color 5
-#color_bg_6 colb6 str d6 - - ----K background color 6
-#color_bg_7 colb7 str d7 - - ----K background color 7
-#color_fg_0 colf0 str c0 - - ----K foreground color 0
-#color_fg_1 colf1 str c1 - - ----K foreground color 1
-#color_fg_2 colf2 str c2 - - ----K foreground color 2
-#color_fg_3 colf3 str c3 - - ----K foreground color 3
-#color_fg_4 colf4 str c4 - - ----K foreground color 4
-#color_fg_5 colf5 str c5 - - ----K foreground color 5
-#color_fg_6 colf6 str c6 - - ----K foreground color 6
-#color_fg_7 colf7 str c7 - - ----K foreground color 7
-#font_0 font0 str f0 - - ----- select font 0
-#font_1 font1 str f1 - - ----- select font 1
-#font_2 font2 str f2 - - ----- select font 2
-#font_3 font3 str f3 - - ----- select font 3
-#font_4 font4 str f4 - - ----K select font 4
-#font_5 font5 str f5 - - ----K select font 5
-#font_6 font6 str f6 - - ----K select font 6
-#font_7 font7 str f7 - - ----K select font 7
-#key_back_tab kbtab str k0 - - ----- backtab key
-#key_do kdo str ki - - ----K do request key
-#key_command kcmd str kd - - ----K command-request key
-#key_command_pane kcpn str kW - - ----K command-pane key
-#key_end kend str kw - - ----- end key
-#key_help khlp str kq - - ----- help key
-#key_newline knl str nl - - ----K newline key
-#key_next_pane knpn str kv - - ----K next-pane key
-#key_prev_cmd kppn str kp - - ----K previous-command key
-#key_prev_pane kppn str kV - - ----K previous-pane key
-#key_quit kquit str kQ - - ----K quit key
-#key_select ksel str kU - - ----- select key
-#key_scroll_left kscl str kz - - ----K scroll left
-#key_scroll_right kscr str kZ - - ----K scroll right
-#key_tab ktab str ko - - ----K tab key
-#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
-#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
-#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
-#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
-#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
-#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
-#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
-#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
-#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
-#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
-#appl_defined_str apstr str za - - ----K application-defined string
-# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
-# the IBM manual pages, so the cap name strings are guesses. The terminfo
-# names are almost certainly right, the termcap ones almost certainly wrong.
-#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
-#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
-#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
-#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
-#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
-#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
-#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
-#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
-# Undocumented capabilities end here
-#key_sf1 ksf1 str S1 - - ----K special function key 1
-#key_sf2 ksf2 str S2 - - ----K special function key 2
-#key_sf3 ksf3 str S3 - - ----K special function key 3
-#key_sf4 ksf4 str S4 - - ----K special function key 4
-#key_sf5 ksf5 str S5 - - ----K special function key 5
-#key_sf6 ksf6 str S6 - - ----K special function key 6
-#key_sf7 ksf7 str S7 - - ----K special function key 7
-#key_sf8 ksf8 str S8 - - ----K special function key 8
-#key_sf9 ksf9 str S9 - - ----K special function key 9
-#key_sf10 ksf10 str SA - - ----K special function key 10
-# AIX version 3 documents different codes for F11, F12 and does not mention
-# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
-#key_f11 kf11 str k< - - ----- function key 11
-#key_f12 kf12 str k> - - ----- function key 12
-# Undocumented capabilities end here.
-#key_action kact str kJ - - ----K sent by action key
-# The IBM docs say these capabilities are for table-drawing, and are
-# valid only for aixterm descriptions.
-#enter_topline_mode topl str tp - - ----K start top-line mode
-#enter_bottom_mode btml str bm - - ----K start bottom-line mode
-#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
-#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
-#
-#############################################################################
-#
-# ALIAS DECLARATIONS
-#
-# Here we set up aliases for translating extensions into standard terminfo.
-#
-#---------------------------------- Termcap aliases -------------------------
-#
-# BSD aliases:
-#
-# This is a common error in many termcap files. We'll get notified during
-# translation when this (or any other alias) fires.
-#
-capalias sb sr BSD scroll text down
-#
-# AT&T extensions:
-#
-# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
-# nonstandard capabilities. Its signature is the KM capability, used to name
-# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
-# set. Comments in the original, and a little cross-checking with other AT&T
-# documentation, seem to establish the following mappings:
-#
-capalias BO mr AT&T enter_reverse_mode
-capalias CI vi AT&T cursor_invisible
-capalias CV ve AT&T cursor_normal
-capalias DS mh AT&T enter_dim_mode
-#capalias EE me AT&T exit_attribute_mode
-capalias FE LF AT&T label_on
-capalias FL LO AT&T label_off
-capalias XS mk AT&T enter_secure_mode
-#
-# We comment out EE because the conflicting XENIX EE is more common in
-# old entries.
-#
-# XENIX extensions:
-#
-# These are the ones we know how to translate directly:
-#
-capalias EE mh XENIX exit_attribute_mode
-capalias GE ae XENIX exit_alt_charset_mode
-capalias GS as XENIX enter_alt_charset_mode
-capalias CF vi XENIX cursor_invis
-capalias CO ve XENIX cursor_normal
-capalias EN @7 XENIX key_end
-capalias HM kh XENIX key_home
-capalias LD kL XENIX key_dl
-capalias PD kN XENIX key_npage
-capalias PN po XENIX prtr_off
-capalias PS pf XENIX prtr_on
-capalias PU kP XENIX key_ppage
-capalias RT @8 XENIX kent
-capalias UP ku XENIX kcuu1
-capalias G6 IGNORE XENIX double-ACS_ULCORNER
-capalias G7 IGNORE XENIX double-ACS_LLCORNER
-capalias G5 IGNORE XENIX double-ACS_URCORNER
-capalias G8 IGNORE XENIX double-ACS_LRCORNER
-capalias Gr IGNORE XENIX double-ACS_LTEE
-capalias Gr IGNORE XENIX double-ACS_RTEE
-capalias Gu IGNORE XENIX double-ACS_BTEE
-capalias Gd IGNORE XENIX double ACS_TTEE
-capalias Gh IGNORE XENIX double-ACS_HLINE
-capalias Gv IGNORE XENIX double-ACS_VLINE
-capalias Gc IGNORE XENIX double-ACS_PLUS
-capalias GG IGNORE XENIX acs-glitch
-#
-# IBM extensions:
-#
-capalias kq %1 IBM key_help
-#
-# Iris extensions:
-#
-capalias HS mh IRIS enter_dim_mode
-#
-# Tektronix extensions:
-#
-capalias KA k; Tek key_f10
-capalias KB F1 Tek key_f11
-capalias KC F2 Tek key_f12
-capalias KD F3 Tek key_f13
-capalias KE F4 Tek key_f14
-capalias KF F5 Tek key_f15
-capalias BC Sb Tek set_background
-capalias FC Sf Tek set_foreground
-#
-# There are also the following:
-#
-# XENIX XENIX variable name name clash with terminfo?
-# ----- ------------------- -------------------------
-# CL key_char_left
-# CR key_char_right
-# CW key_change_window
-# HP ??
-# LF key_linefeed label_off
-# NU key_next_unlocked_cell
-# PL ??
-# PR ??
-# RC key_recalc remove_clock
-# RF key_toggle_ref req_for_input
-# WL key_word_left
-# WR key_word_right
-#
-# If you know what any of the question-marked ones mean, please tell us.
-#
-#--------------------------------- Terminfo aliases ------------------------
-#
-# IBM extensions:
-#
-infoalias font0 s0ds IBM set0_des_seq
-infoalias font1 s1ds IBM set1_des_seq
-infoalias font2 s2ds IBM set2_des_seq
-infoalias font3 s3ds IBM set3_des_seq
-infoalias kbtab kcbt IBM key_backtab
-infoalias ksel kslt IBM key_select
-#
-# Some others are identical to SVr4/XPG4 capabilities, in particular:
-# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
diff --git a/include/Caps.uwin b/include/Caps.uwin
index 31020cd..7628bd4 100644
--- a/include/Caps.uwin
+++ b/include/Caps.uwin
@@ -1,5 +1,6 @@
##############################################################################
-# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,13 +29,13 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.uwin,v 1.5 2010/12/04 18:49:20 tom Exp $
+# $Id: Caps.uwin,v 1.12 2020/02/02 23:34:34 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
#
# This table is used to generate initializers for tables that drive tic,
-# infocmp, and the library compilation code used to support the termcap
+# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@@ -97,7 +98,7 @@
# 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 the ncurses
+# 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.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@@ -119,14 +120,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
-# CONTROLLING ENTRY LENGTH
+# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
-# the set of keys the `joe' editor will be upset if it can't see. So don't
+# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@@ -147,7 +148,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
-# into history and GNU termcap's application base shrinks towards being GNU
+# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@@ -166,7 +167,7 @@
#%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
+#%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.
#%
@@ -227,7 +228,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+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
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@@ -650,7 +651,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
-# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@@ -667,9 +668,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
-# The `ma' capability seems to have been designed to map between the rogue(2)
-# motion keys (including jkhl) and characters emitted by arrow keys on some
-# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+# The `ma' capability was a 4.0BSD feature used by vi version 2.
+# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
+# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@@ -695,7 +696,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
-arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@@ -711,7 +712,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
-# in the mytinfo tables.
+# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@@ -760,7 +761,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
-# (via IGNORE aliases further down). We don't want to do normal pad
+# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@@ -782,303 +783,10 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
-# This section is almost all comments. What it's mainly for is to describe
-# what capabilities need to be squeezed out to get down to the XSI Curses
-# standard set. They are flagged with K.
-#
-# HP extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in HP
-# terminfo files. Except for memory_lock and memory_unlock, they are
-# functionally identical to SVr4 extensions, but they make the binary format
-# different. Grrr....
+# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
-#plab_norm pln str pn - - ----- program label #1 to show string #2
-#label_on smln str LO - - ----- turn on soft labels
-#label_off rmln str LF - - ----- turn off soft labels
-#key_f11 kf11 str F1 - - ----- F11 function key
-#key_f12 kf12 str F2 - - ----- F12 function key
-#key_f13 kf13 str F3 - - ----- F13 function key
-#key_f14 kf14 str F4 - - ----- F14 function key
-#key_f15 kf15 str F5 - - ----- F15 function key
-#key_f16 kf16 str F6 - - ----- F16 function key
-#key_f17 kf17 str F7 - - ----- F17 function key
-#key_f18 kf18 str F8 - - ----- F18 function key
-#key_f19 kf19 str F9 - - ----- F19 function key
-#key_f20 kf20 str FA - - ----- F20 function key
-#key_f21 kf21 str FB - - ----- F21 function key
-#key_f22 kf22 str FC - - ----- F22 function key
-#key_f23 kf23 str FD - - ----- F23 function key
-#key_f24 kf24 str FE - - ----- F24 function key
-#key_f25 kf25 str FF - - ----- F25 function key
-#key_f26 kf26 str FG - - ----- F26 function key
-#key_f27 kf27 str FH - - ----- F27 function key
-#key_f28 kf28 str FI - - ----- F28 function key
-#key_f29 kf29 str FJ - - ----- F29 function key
-#key_f30 kf30 str FK - - ----- F30 function key
-#key_f31 kf31 str FL - - ----- F31 function key
-#key_f32 kf32 str FM - - ----- F32 function key
-#key_f33 kf33 str FN - - ----- F33 function key
-#key_f34 kf34 str FO - - ----- F34 function key
-#key_f35 kf35 str FP - - ----- F35 function key
-#key_f36 kf36 str FQ - - ----- F36 function key
-#key_f37 kf37 str FR - - ----- F37 function key
-#key_f38 kf38 str FS - - ----- F38 function key
-#key_f39 kf39 str FT - - ----- F39 function key
-#key_f40 kf40 str FU - - ----- F40 function key
-#key_f41 kf41 str FV - - ----- F41 function key
-#key_f42 kf42 str FW - - ----- F42 function key
-#key_f43 kf43 str FX - - ----- F43 function key
-#key_f44 kf44 str FY - - ----- F44 function key
-#key_f45 kf45 str FZ - - ----- F45 function key
-#key_f46 kf46 str Fa - - ----- F46 function key
-#key_f47 kf47 str Fb - - ----- F47 function key
-#key_f48 kf48 str Fc - - ----- F48 function key
-#key_f49 kf49 str Fd - - ----- F49 function key
-#key_f50 kf50 str Fe - - ----- F50 function key
-#key_f51 kf51 str Ff - - ----- F51 function key
-#key_f52 kf52 str Fg - - ----- F52 function key
-#key_f53 kf53 str Fh - - ----- F53 function key
-#key_f54 kf54 str Fi - - ----- F54 function key
-#key_f55 kf55 str Fj - - ----- F55 function key
-#key_f56 kf56 str Fk - - ----- F56 function key
-#key_f57 kf57 str Fl - - ----- F57 function key
-#key_f58 kf58 str Fm - - ----- F58 function key
-#key_f59 kf59 str Fn - - ----- F59 function key
-#key_f60 kf60 str Fo - - ----- F60 function key
-#key_f61 kf61 str Fp - - ----- F61 function key
-#key_f62 kf62 str Fq - - ----- F62 function key
-#key_f63 kf63 str Fr - - ----- F63 function key
-#
-# IBM extensions
-#
-# These extensions follow ptr_non (replacing everything after it) in IBM
-# terminfo files.
-#
-# The places in the box[12] capabilities correspond to acsc characters, here is
-# the mapping:
-#
-# box1[0] = ACS_ULCORNER
-# box1[1] = ACS_HLINE
-# box1[2] = ACS_URCORNER
-# box1[3] = ACS_VLINE
-# box1[4] = ACS_LRCORNER
-# box1[5] = ACS_LLCORNER
-# box1[6] = ACS_TTEE
-# box1[7] = ACS_RTEE
-# box1[8] = ACS_BTEE
-# box1[9] = ACS_LTEE
-# box1[10] = ACS_PLUS
-#
-# The box2 characters are the double-line versions of these forms graphics.
-#
box_chars_1 box1 str bx - - ----K box characters primary set
-#box_chars_2 box2 str by - - ----K box characters secondary set
-#box_attr_1 batt1 str Bx - - ----K attributes for box1
-#box_attr_2 batt2 str By - - ----K attributes for box2
-#color_bg_0 colb0 str d0 - - ----K background color 0
-#color_bg_1 colb1 str d1 - - ----K background color 1
-#color_bg_2 colb2 str d2 - - ----K background color 2
-#color_bg_3 colb3 str d3 - - ----K background color 3
-#color_bg_4 colb4 str d4 - - ----K background color 4
-#color_bg_5 colb5 str d5 - - ----K background color 5
-#color_bg_6 colb6 str d6 - - ----K background color 6
-#color_bg_7 colb7 str d7 - - ----K background color 7
-#color_fg_0 colf0 str c0 - - ----K foreground color 0
-#color_fg_1 colf1 str c1 - - ----K foreground color 1
-#color_fg_2 colf2 str c2 - - ----K foreground color 2
-#color_fg_3 colf3 str c3 - - ----K foreground color 3
-#color_fg_4 colf4 str c4 - - ----K foreground color 4
-#color_fg_5 colf5 str c5 - - ----K foreground color 5
-#color_fg_6 colf6 str c6 - - ----K foreground color 6
-#color_fg_7 colf7 str c7 - - ----K foreground color 7
-#font_0 font0 str f0 - - ----- select font 0
-#font_1 font1 str f1 - - ----- select font 1
-#font_2 font2 str f2 - - ----- select font 2
-#font_3 font3 str f3 - - ----- select font 3
-#font_4 font4 str f4 - - ----K select font 4
-#font_5 font5 str f5 - - ----K select font 5
-#font_6 font6 str f6 - - ----K select font 6
-#font_7 font7 str f7 - - ----K select font 7
-#key_back_tab kbtab str k0 - - ----- backtab key
-#key_do kdo str ki - - ----K do request key
-#key_command kcmd str kd - - ----K command-request key
-#key_command_pane kcpn str kW - - ----K command-pane key
-#key_end kend str kw - - ----- end key
-#key_help khlp str kq - - ----- help key
-#key_newline knl str nl - - ----K newline key
-#key_next_pane knpn str kv - - ----K next-pane key
-#key_prev_cmd kppn str kp - - ----K previous-command key
-#key_prev_pane kppn str kV - - ----K previous-pane key
-#key_quit kquit str kQ - - ----K quit key
-#key_select ksel str kU - - ----- select key
-#key_scroll_left kscl str kz - - ----K scroll left
-#key_scroll_right kscr str kZ - - ----K scroll right
-#key_tab ktab str ko - - ----K tab key
-#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
-#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
-#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
-#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
-#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
-#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
-#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
-#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
-#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
-#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
-#appl_defined_str apstr str za - - ----K application-defined string
-# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
-# the IBM manual pages, so the cap name strings are guesses. The terminfo
-# names are almost certainly right, the termcap ones almost certainly wrong.
-#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
-#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
-#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
-#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
-#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
-#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
-#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
-#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
-# Undocumented capabilities end here
-#key_sf1 ksf1 str S1 - - ----K special function key 1
-#key_sf2 ksf2 str S2 - - ----K special function key 2
-#key_sf3 ksf3 str S3 - - ----K special function key 3
-#key_sf4 ksf4 str S4 - - ----K special function key 4
-#key_sf5 ksf5 str S5 - - ----K special function key 5
-#key_sf6 ksf6 str S6 - - ----K special function key 6
-#key_sf7 ksf7 str S7 - - ----K special function key 7
-#key_sf8 ksf8 str S8 - - ----K special function key 8
-#key_sf9 ksf9 str S9 - - ----K special function key 9
-#key_sf10 ksf10 str SA - - ----K special function key 10
-# AIX version 3 documents different codes for F11, F12 and does not mention
-# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
-#key_f11 kf11 str k< - - ----- function key 11
-#key_f12 kf12 str k> - - ----- function key 12
-# Undocumented capabilities end here.
-#key_action kact str kJ - - ----K sent by action key
-# The IBM docs say these capabilities are for table-drawing, and are
-# valid only for aixterm descriptions.
-#enter_topline_mode topl str tp - - ----K start top-line mode
-#enter_bottom_mode btml str bm - - ----K start bottom-line mode
-#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
-#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
-#
-#############################################################################
-#
-# ALIAS DECLARATIONS
-#
-# Here we set up aliases for translating extensions into standard terminfo.
-#
-#---------------------------------- Termcap aliases -------------------------
-#
-# BSD aliases:
-#
-# This is a common error in many termcap files. We'll get notified during
-# translation when this (or any other alias) fires.
-#
-capalias sb sr BSD scroll text down
-#
-# AT&T extensions:
-#
-# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
-# nonstandard capabilities. Its signature is the KM capability, used to name
-# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
-# set. Comments in the original, and a little cross-checking with other AT&T
-# documentation, seem to establish the following mappings:
-#
-capalias BO mr AT&T enter_reverse_mode
-capalias CI vi AT&T cursor_invisible
-capalias CV ve AT&T cursor_normal
-capalias DS mh AT&T enter_dim_mode
-#capalias EE me AT&T exit_attribute_mode
-capalias FE LF AT&T label_on
-capalias FL LO AT&T label_off
-capalias XS mk AT&T enter_secure_mode
-#
-# We comment out EE because the conflicting XENIX EE is more common in
-# old entries.
-#
-# XENIX extensions:
-#
-# These are the ones we know how to translate directly:
-#
-capalias EE mh XENIX exit_attribute_mode
-capalias GE ae XENIX exit_alt_charset_mode
-capalias GS as XENIX enter_alt_charset_mode
-capalias CF vi XENIX cursor_invis
-capalias CO ve XENIX cursor_normal
-capalias EN @7 XENIX key_end
-capalias HM kh XENIX key_home
-capalias LD kL XENIX key_dl
-capalias PD kN XENIX key_npage
-capalias PN po XENIX prtr_off
-capalias PS pf XENIX prtr_on
-capalias PU kP XENIX key_ppage
-capalias RT @8 XENIX kent
-capalias UP ku XENIX kcuu1
-capalias G6 IGNORE XENIX double-ACS_ULCORNER
-capalias G7 IGNORE XENIX double-ACS_LLCORNER
-capalias G5 IGNORE XENIX double-ACS_URCORNER
-capalias G8 IGNORE XENIX double-ACS_LRCORNER
-capalias Gr IGNORE XENIX double-ACS_LTEE
-capalias Gr IGNORE XENIX double-ACS_RTEE
-capalias Gu IGNORE XENIX double-ACS_BTEE
-capalias Gd IGNORE XENIX double ACS_TTEE
-capalias Gh IGNORE XENIX double-ACS_HLINE
-capalias Gv IGNORE XENIX double-ACS_VLINE
-capalias Gc IGNORE XENIX double-ACS_PLUS
-capalias GG IGNORE XENIX acs-glitch
-#
-# IBM extensions:
-#
-capalias kq %1 IBM key_help
-#
-# Iris extensions:
-#
-capalias HS mh IRIS enter_dim_mode
-#
-# Tektronix extensions:
-#
-capalias KA k; Tek key_f10
-capalias KB F1 Tek key_f11
-capalias KC F2 Tek key_f12
-capalias KD F3 Tek key_f13
-capalias KE F4 Tek key_f14
-capalias KF F5 Tek key_f15
-capalias BC Sb Tek set_background
-capalias FC Sf Tek set_foreground
-#
-# There are also the following:
-#
-# XENIX XENIX variable name name clash with terminfo?
-# ----- ------------------- -------------------------
-# CL key_char_left
-# CR key_char_right
-# CW key_change_window
-# HP ??
-# LF key_linefeed label_off
-# NU key_next_unlocked_cell
-# PL ??
-# PR ??
-# RC key_recalc remove_clock
-# RF key_toggle_ref req_for_input
-# WL key_word_left
-# WR key_word_right
-#
-# If you know what any of the question-marked ones mean, please tell us.
-#
-#--------------------------------- Terminfo aliases ------------------------
-#
-# IBM extensions:
-#
-infoalias font0 s0ds IBM set0_des_seq
-infoalias font1 s1ds IBM set1_des_seq
-infoalias font2 s2ds IBM set2_des_seq
-infoalias font3 s3ds IBM set3_des_seq
-infoalias kbtab kcbt IBM key_backtab
-infoalias ksel kslt IBM key_select
-#
-# Some others are identical to SVr4/XPG4 capabilities, in particular:
-# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
diff --git a/include/MKhashsize.sh b/include/MKhashsize.sh
index 11b3111..8a534d4 100755
--- a/include/MKhashsize.sh
+++ b/include/MKhashsize.sh
@@ -1,6 +1,7 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 1998,2006 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 1998,2006 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -26,7 +27,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKhashsize.sh,v 1.7 2006/10/22 00:45:39 tom Exp $
+# $Id: MKhashsize.sh,v 1.9 2020/02/02 23:34:34 tom Exp $
#
# MKhashsize.sh --- generate size include for hash functions
#
@@ -34,8 +35,8 @@ echo "/*"
echo " * hashsize.h -- hash and token table constants"
echo " */"
-CAPS="${1-Caps}"
-TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
+test $# = 0 && set Caps
+TABSIZE=`cat "$@" | grep -v '^[ #]' | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | grep -v "^userdef" | grep -v "^used_by" | wc -l`
echo ""
echo "#define CAPTABSIZE ${TABSIZE}"
diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh
index 45a06d0..865a7b9 100755
--- a/include/MKkey_defs.sh
+++ b/include/MKkey_defs.sh
@@ -1,7 +1,8 @@
#! /bin/sh
-# $Id: MKkey_defs.sh,v 1.15 2013/03/09 16:32:01 tom Exp $
+# $Id: MKkey_defs.sh,v 1.19 2020/02/02 23:34:34 tom Exp $
##############################################################################
-# Copyright (c) 2001-2003,2013 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 2001-2013,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -35,25 +36,26 @@
# Extract function-key definitions from the Caps file
#
: ${AWK-awk}
-DATA=${1-Caps}
+
+test $# = 0 && set Caps
data=data$$
pass1=pass1_$$
pass2=pass2_$$
pass3=pass3_$$
pass4=pass4_$$
-trap 'rm -f $data pass[1234]_$$' 0 1 2 5 15
+trap 'rm -f $data pass[1234]_$$' EXIT INT QUIT TERM HUP
# change repeated tabs (used for readability) to single tabs (needed to make
# awk see the right field alignment of the corresponding columns):
-if sort -k 6 $DATA >$data 2>/dev/null
+if sort -k 6 "$@" >$data 2>/dev/null
then
# POSIX
- sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n -k 6 >$data
-elif sort -n +5 $DATA >$data 2>/dev/null
+ sed -e 's/[ ][ ]*/ /g' "$@" |sort -n -k 6 >$data
+elif sort -n +5 "$@" >$data 2>/dev/null
then
# SunOS (and SVr4, marked as obsolete but still recognized)
- sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n +5 >$data
+ sed -e 's/[ ][ ]*/ /g' "$@" |sort -n +5 >$data
else
echo "Your sort utility is broken. Please install one that works." >&2
exit 1
@@ -66,11 +68,10 @@ key_event kv1 str V1 KEY_EVENT + ----- We were interrupted by an event
EOF
THIS=./`basename $0`
-PARM=./`basename $DATA`
cat <<EOF
/*
- * These definitions were generated by $THIS $PARM
+ * These definitions were generated by $THIS $*
*/
EOF
@@ -124,6 +125,8 @@ BEGIN {
/^#/ {next;}
/^capalias/ {next;}
/^infoalias/ {next;}
+/^used_by/ {next;}
+/^userdef/ {next;}
$5 != "-" && $6 != "-" {
if ($6 == "+") {
diff --git a/include/MKncurses_def.sh b/include/MKncurses_def.sh
index 4aac865..81f39d2 100755
--- a/include/MKncurses_def.sh
+++ b/include/MKncurses_def.sh
@@ -1,7 +1,8 @@
#! /bin/sh
-# $Id: MKncurses_def.sh,v 1.2 2003/10/25 16:19:46 tom Exp $
+# $Id: MKncurses_def.sh,v 1.4 2020/02/02 23:34:34 tom Exp $
##############################################################################
-# Copyright (c) 2000 Free Software Foundation, Inc. #
+# Copyright 2020 Thomas E. Dickey #
+# Copyright 2000,2003 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
diff --git a/include/MKparametrized.sh b/include/MKparametrized.sh
index 3ce5d9c..5d0cae1 100755
--- a/include/MKparametrized.sh
+++ b/include/MKparametrized.sh
@@ -1,6 +1,7 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 1998-2006,2014 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 1998-2014,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -26,15 +27,18 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKparametrized.sh,v 1.7 2014/05/24 15:07:19 tom Exp $
+# $Id: MKparametrized.sh,v 1.10 2020/02/02 23:34:34 tom Exp $
#
# MKparametrized.sh -- generate indirection vectors for various sort methods
#
# The output of this script is C source for an array specifying whether
# termcap strings should undergo parameter and padding translation.
#
-CAPS="${1-Caps}"
+[ $# = 0 ] && set - Caps
+
cat <<EOF
+#ifndef PARAMETRIZED_H
+#define PARAMETRIZED_H 1
/*
* parametrized.h --- is a termcap capability parametrized?
*
@@ -52,7 +56,14 @@ EOF
# XENIX acs_* capabilities. Maybe someday we'll dedicate a flag field for
# this, that would be cleaner....
-${AWK-awk} <$CAPS '
+cat "$@" | ${AWK-awk} '
+
+/^#/ { next ; }
+/^capalias/ { next ; }
+/^infoalias/ { next ; }
+/^used_by/ { next ; }
+/^userdef/ { next ; }
+
$3 != "str" {next;}
$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
$1 ~ /^label_format/ {print "-1,\t/* ", $2, " */"; count++; next;}
@@ -61,3 +72,4 @@ $0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
END {printf("} /* %d entries */;\n\n", count);}
'
+echo "#endif /* PARAMETRIZED_H */"
diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in
index 587ee52..ee4e2b4 100644
--- a/include/MKterm.h.awk.in
+++ b/include/MKterm.h.awk.in
@@ -1,334 +1,391 @@
# vile:awkmode
-BEGIN {
- print "/****************************************************************************"
- print " * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *"
- print " * *"
- print " * Permission is hereby granted, free of charge, to any person obtaining a *"
- print " * copy of this software and associated documentation files (the *"
- print " * \"Software\"), to deal in the Software without restriction, including *"
- print " * without limitation the rights to use, copy, modify, merge, publish, *"
- print " * distribute, distribute with modifications, sublicense, and/or sell *"
- print " * copies of the Software, and to permit persons to whom the Software is *"
- print " * furnished to do so, subject to the following conditions: *"
- print " * *"
- print " * The above copyright notice and this permission notice shall be included *"
- print " * in all copies or substantial portions of the Software. *"
- print " * *"
- print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
- print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
- print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
- print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
- print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
- print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
- print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
- print " * *"
- print " * Except as contained in this notice, the name(s) of the above copyright *"
- print " * holders shall not be used in advertising or otherwise to promote the *"
- print " * sale, use or other dealings in this Software without prior written *"
- print " * authorization. *"
- print " ****************************************************************************/"
- print ""
- print "/****************************************************************************/"
- print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
- print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
- print "/* and: Thomas E. Dickey 1995-on */"
- print "/****************************************************************************/"
- print ""
- print "/* $Id: MKterm.h.awk.in,v 1.62 2013/08/17 19:21:56 tom Exp $ */"
- print ""
- print "/*"
- print "** term.h -- Definition of struct term"
- print "*/"
- print ""
- print "#ifndef NCURSES_TERM_H_incl"
- print "#define NCURSES_TERM_H_incl 1"
- print ""
- print "#undef NCURSES_VERSION"
- print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
- print ""
- print "#include <ncurses_dll.h>"
- print ""
- print "#ifdef __cplusplus"
- print "extern \"C\" {"
- print "#endif"
- print ""
- print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
- print " * definition (based on the system for which this was configured)."
- print " */"
- print ""
- print "#undef NCURSES_CONST"
- print "#define NCURSES_CONST @NCURSES_CONST@"
- print ""
- print "#undef NCURSES_SBOOL"
- print "#define NCURSES_SBOOL @NCURSES_SBOOL@"
- print ""
- print "#undef NCURSES_USE_DATABASE"
- print "#define NCURSES_USE_DATABASE @NCURSES_USE_DATABASE@"
- print ""
- print "#undef NCURSES_USE_TERMCAP"
- print "#define NCURSES_USE_TERMCAP @NCURSES_USE_TERMCAP@"
- print ""
- print "#undef NCURSES_XNAMES"
- print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
- print ""
- print "/* We will use these symbols to hide differences between"
- print " * termios/termio/sgttyb interfaces."
- print " */"
- print "#undef TTY"
- print "#undef SET_TTY"
- print "#undef GET_TTY"
- print ""
- print "/* Assume POSIX termio if we have the header and function */"
- print "/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */"
- print "#if @HAVE_TERMIOS_H@ && @HAVE_TCGETATTR@"
- print ""
- print "#undef TERMIOS"
- print "#define TERMIOS 1"
- print ""
- print "#include <termios.h>"
- print "#define TTY struct termios"
- print ""
- print "#else /* !HAVE_TERMIOS_H */"
- print ""
- print "/* #if HAVE_TERMIO_H */"
- print "#if @HAVE_TERMIO_H@"
- print ""
- print "#undef TERMIOS"
- print "#define TERMIOS 1"
- print ""
- print "#include <termio.h>"
- print "#define TTY struct termio"
- print ""
- print "#else /* !HAVE_TERMIO_H */"
- print ""
- print "#if __MINGW32__"
- print "# include <ncurses_mingw.h>"
- print "# define TTY struct termios"
- print "#else"
- print "#undef TERMIOS"
- print "#include <sgtty.h>"
- print "#include <sys/ioctl.h>"
- print "#define TTY struct sgttyb"
- print "#endif /* MINGW32 */"
- print "#endif /* HAVE_TERMIO_H */"
- print ""
- print "#endif /* HAVE_TERMIOS_H */"
- print ""
- print "#ifdef TERMIOS"
- print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
- print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
- print "#else"
- print "#define GET_TTY(fd, buf) gtty(fd, buf)"
- print "#define SET_TTY(fd, buf) stty(fd, buf)"
- print "#endif"
- print ""
- print "#define NAMESIZE 256"
- print ""
- print "#define CUR cur_term->type."
- print ""
- }
+function declare_termtype(number,suffix) {
+ printf "typedef struct termtype%s { /* in-core form of terminfo data */\n", suffix;
+ print " char *term_names; /* str_table offset of term names */"
+ print " char *str_table; /* pointer to string table */"
+ print " NCURSES_SBOOL *Booleans; /* array of boolean values */"
+ printf " %-5s *Numbers; /* array of integer values */\n", number;
+ print " char **Strings; /* array of string offsets */"
+ print ""
+ print "#if NCURSES_XNAMES"
+ print " char *ext_str_table; /* pointer to extended string table */"
+ print " char **ext_Names; /* corresponding names */"
+ print ""
+ print " unsigned short num_Booleans;/* count total Booleans */";
+ print " unsigned short num_Numbers; /* count total Numbers */";
+ print " unsigned short num_Strings; /* count total Strings */";
+ print ""
+ print " unsigned short ext_Booleans;/* count extensions to Booleans */";
+ print " unsigned short ext_Numbers; /* count extensions to Numbers */";
+ print " unsigned short ext_Strings; /* count extensions to Strings */";
+ print "#endif /* NCURSES_XNAMES */"
+ print ""
+ printf "} TERMTYPE%s;\n", suffix;
+}
+BEGIN {
+ lcurl = "{";
+ rcurl = "}";
+ print "/****************************************************************************"
+ print " * Copyright 2018-2019,2020 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 *"
+ print " * copy of this software and associated documentation files (the *"
+ print " * \"Software\"), to deal in the Software without restriction, including *"
+ print " * without limitation the rights to use, copy, modify, merge, publish, *"
+ print " * distribute, distribute with modifications, sublicense, and/or sell *"
+ print " * copies of the Software, and to permit persons to whom the Software is *"
+ print " * furnished to do so, subject to the following conditions: *"
+ print " * *"
+ print " * The above copyright notice and this permission notice shall be included *"
+ print " * in all copies or substantial portions of the Software. *"
+ print " * *"
+ print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
+ print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
+ print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
+ print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
+ print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
+ print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
+ print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
+ print " * *"
+ print " * Except as contained in this notice, the name(s) of the above copyright *"
+ print " * holders shall not be used in advertising or otherwise to promote the *"
+ print " * sale, use or other dealings in this Software without prior written *"
+ print " * authorization. *"
+ print " ****************************************************************************/"
+ print ""
+ print "/****************************************************************************/"
+ print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
+ print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
+ print "/* and: Thomas E. Dickey 1995-on */"
+ print "/****************************************************************************/"
+ print ""
+ print "/* $Id: MKterm.h.awk.in,v 1.74 2020/02/02 23:34:34 tom Exp $ */"
+ print ""
+ print "/*"
+ print "** term.h -- Definition of struct term"
+ print "*/"
+ print ""
+ print "#ifndef NCURSES_TERM_H_incl"
+ print "#define NCURSES_TERM_H_incl 1"
+ print ""
+ print "#undef NCURSES_VERSION"
+ print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
+ print ""
+ print "#include <ncurses_dll.h>"
+ print ""
+ print "#ifdef __cplusplus"
+ printf "extern \"C\" %s\n", lcurl;
+ print "#endif"
+ print ""
+ print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
+ print " * definition (based on the system for which this was configured)."
+ print " */"
+ print ""
+ print "#undef NCURSES_CONST"
+ print "#define NCURSES_CONST @NCURSES_CONST@"
+ print ""
+ print "#undef NCURSES_SBOOL"
+ print "#define NCURSES_SBOOL @NCURSES_SBOOL@"
+ print ""
+ print "#undef NCURSES_USE_DATABASE"
+ print "#define NCURSES_USE_DATABASE @NCURSES_USE_DATABASE@"
+ print ""
+ print "#undef NCURSES_USE_TERMCAP"
+ print "#define NCURSES_USE_TERMCAP @NCURSES_USE_TERMCAP@"
+ print ""
+ print "#undef NCURSES_XNAMES"
+ print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
+ print ""
+ print "/* We will use these symbols to hide differences between"
+ print " * termios/termio/sgttyb interfaces."
+ print " */"
+ print "#undef TTY"
+ print "#undef SET_TTY"
+ print "#undef GET_TTY"
+ print ""
+ print "/* Assume POSIX termio if we have the header and function */"
+ print "/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */"
+ print "#if @HAVE_TERMIOS_H@ && @HAVE_TCGETATTR@"
+ print ""
+ print "#undef TERMIOS"
+ print "#define TERMIOS 1"
+ print ""
+ print "#include <termios.h>"
+ print "#define TTY struct termios"
+ print ""
+ print "#else /* !HAVE_TERMIOS_H */"
+ print ""
+ print "/* #if HAVE_TERMIO_H */"
+ print "#if @HAVE_TERMIO_H@"
+ print ""
+ print "#undef TERMIOS"
+ print "#define TERMIOS 1"
+ print ""
+ print "#include <termio.h>"
+ print "#define TTY struct termio"
+ print ""
+ print "#else /* !HAVE_TERMIO_H */"
+ print ""
+ print "#if _WIN32"
+ print "# include <ncurses_mingw.h>"
+ print "# define TTY struct termios"
+ print "#else"
+ print "#undef TERMIOS"
+ print "#include <sgtty.h>"
+ print "#include <sys/ioctl.h>"
+ print "#define TTY struct sgttyb"
+ print "#endif /* MINGW32 */"
+ print "#endif /* HAVE_TERMIO_H */"
+ print ""
+ print "#endif /* HAVE_TERMIOS_H */"
+ print ""
+ print "#ifdef TERMIOS"
+ print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
+ print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
+ print "#else"
+ print "#define GET_TTY(fd, buf) gtty(fd, buf)"
+ print "#define SET_TTY(fd, buf) stty(fd, buf)"
+ print "#endif"
+ print ""
+ print "#ifndef GCC_NORETURN"
+ print "#define GCC_NORETURN /* nothing */"
+ print "#endif"
+ print ""
+ print "#define NAMESIZE 256"
+ print ""
+ print "/* The cast works because TERMTYPE is the first data in TERMINAL */"
+ print "#define CUR ((TERMTYPE *)(cur_term))->"
+ print ""
+}
-$2 == "%%-STOP-HERE-%%" {
- print ""
- printf "#define BOOLWRITE %d\n", BoolCount
- printf "#define NUMWRITE %d\n", NumberCount
- printf "#define STRWRITE %d\n", StringCount
- print ""
- print "/* older synonyms for some capabilities */"
- print "#define beehive_glitch no_esc_ctlc"
- print "#define teleray_glitch dest_tabs_magic_smso"
- print "#define micro_char_size micro_col_size"
- print ""
- print "#ifdef __INTERNAL_CAPS_VISIBLE"
- }
+$2 == "%%-STOP-HERE-%%" {
+ print ""
+ printf "#define BOOLWRITE %d\n", BoolCount
+ printf "#define NUMWRITE %d\n", NumberCount
+ printf "#define STRWRITE %d\n", StringCount
+ print ""
+ print "/* older synonyms for some capabilities */"
+ print "#define beehive_glitch no_esc_ctlc"
+ print "#define teleray_glitch dest_tabs_magic_smso"
+ print ""
+ print "/* HPUX-11 uses this name rather than the standard one */"
+ print "#ifndef micro_char_size"
+ print "#define micro_char_size micro_col_size"
+ print "#endif"
+ print ""
+ print "#ifdef __INTERNAL_CAPS_VISIBLE"
+}
-/^#/ {next;}
+/^#/ { next; }
-$1 == "acs_chars" {acsindex = StringCount}
+/^used_by/ { next ; }
+/^userdef/ { next ; }
-$3 == "bool" {
- printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
- }
+$1 == "acs_chars" {
+ acsindex = StringCount;
+}
-$3 == "num" {
- printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
- }
+$3 == "bool" {
+ printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
+}
-$3 == "str" {
- printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++
- }
+$3 == "num" {
+ printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
+}
-END {
- print "#endif /* __INTERNAL_CAPS_VISIBLE */"
- print ""
- print ""
- print "/*"
- print " * Predefined terminfo array sizes"
- print " */"
- printf "#define BOOLCOUNT %d\n", BoolCount
- printf "#define NUMCOUNT %d\n", NumberCount
- printf "#define STRCOUNT %d\n", StringCount
- print ""
- print "/* used by code for comparing entries */"
- print "#define acs_chars_index ", acsindex
- print ""
- print "typedef struct termtype { /* in-core form of terminfo data */"
- print " char *term_names; /* str_table offset of term names */"
- print " char *str_table; /* pointer to string table */"
- print " NCURSES_SBOOL *Booleans; /* array of boolean values */"
- print " short *Numbers; /* array of integer values */"
- print " char **Strings; /* array of string offsets */"
- print ""
- print "#if NCURSES_XNAMES"
- print " char *ext_str_table; /* pointer to extended string table */"
- print " char **ext_Names; /* corresponding names */"
- print ""
- print " unsigned short num_Booleans;/* count total Booleans */"
- print " unsigned short num_Numbers; /* count total Numbers */"
- print " unsigned short num_Strings; /* count total Strings */"
- print ""
- print " unsigned short ext_Booleans;/* count extensions to Booleans */"
- print " unsigned short ext_Numbers; /* count extensions to Numbers */"
- print " unsigned short ext_Strings; /* count extensions to Strings */"
- print "#endif /* NCURSES_XNAMES */"
- print ""
- print "} TERMTYPE;"
- 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 " Nttyb; /* current state of the terminal */"
- print " int _baudrate; /* used to compute padding */"
- print " char * _termname; /* used for termname() */"
- print "} TERMINAL;"
- print ""
- print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
- print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
- print "#elif @cf_cv_enable_reentrant@"
- print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
- print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
- print "#else"
- print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
- print "#endif"
- print ""
- print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
- print ""
- print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
- print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
- print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
- print "#define numnames NCURSES_PUBLIC_VAR(numnames())"
- print "#define numcodes NCURSES_PUBLIC_VAR(numcodes())"
- print "#define numfnames NCURSES_PUBLIC_VAR(numfnames())"
- print "#define strnames NCURSES_PUBLIC_VAR(strnames())"
- print "#define strcodes NCURSES_PUBLIC_VAR(strcodes())"
- print "#define strfnames NCURSES_PUBLIC_VAR(strfnames())"
- print ""
- print "#else"
- print ""
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];"
- print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];"
- print ""
- print "#endif"
- print ""
- print "/* internals */"
- print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);"
- print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);"
- print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
- print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);"
- print "extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE *const);"
- print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, char *, int);"
- 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(const TERMTYPE *) _nc_fallback (const char *);"
- print ""
- print "/* entry points */"
- print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);"
- print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);"
- print ""
- print "/* miscellaneous entry points */"
- print "extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);"
- print "extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *);"
- print ""
- print "/* terminfo entry points, also declared in curses.h */"
- print "#if !defined(__NCURSES_H)"
- print "extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT_VAR(char) ttytype[];"
- print "extern NCURSES_EXPORT(int) putp (const char *);"
- print "extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);"
- print ""
- print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
- print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */"
- print "#else"
- print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */"
- print "extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */"
- print "#endif"
- print ""
- print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
- print ""
- print "#endif /* __NCURSES_H */"
- print ""
- print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
- print "#if !defined(NCURSES_TERMCAP_H_incl)"
- print "extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);"
- print "extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);"
- print "extern NCURSES_EXPORT(int) tgetent (char *, const char *);"
- print "extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
- print "#endif /* NCURSES_TERMCAP_H_incl */"
- print ""
- print "/*"
- print " * Include curses.h before term.h to enable these extensions."
- print " */"
- print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
- print ""
- print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);"
- print ""
- print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
- print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
- print "#else"
- print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */"
- print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
- print "#endif"
- print ""
- print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
- print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);"
- print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
- print ""
- print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
- print ""
- print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
- print "#endif /* NCURSES_SP_FUNCS */"
- print ""
- print "#ifdef __cplusplus"
- print "}"
- print "#endif"
- print ""
- print "#endif /* NCURSES_TERM_H_incl */"
- }
+$3 == "str" {
+ printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++
+}
+
+END {
+ print "#endif /* __INTERNAL_CAPS_VISIBLE */"
+ print ""
+ print ""
+ print "/*"
+ print " * Predefined terminfo array sizes"
+ print " */"
+ printf "#define BOOLCOUNT %d\n", BoolCount
+ printf "#define NUMCOUNT %d\n", NumberCount
+ printf "#define STRCOUNT %d\n", StringCount
+ print ""
+ print "/* used by code for comparing entries */"
+ print "#define acs_chars_index ", acsindex
+ print ""
+ declare_termtype("short","");
+ print ""
+ print "/*"
+ 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 "#ifdef NCURSES_INTERNALS"
+ print ""
+ if (@NCURSES_EXT_COLORS@) {
+ declare_termtype("int","2");
+ } else {
+ print "typedef TERMTYPE TERMTYPE2;"
+ }
+ 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 "#endif /* NCURSES_INTERNALS */"
+ print ""
+ print ""
+ print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
+ print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
+ print "#elif @cf_cv_enable_reentrant@"
+ print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
+ print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
+ print "#else"
+ print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
+ print "#endif"
+ print ""
+ print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
+ print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
+ print ""
+ print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
+ print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
+ print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
+ print "#define numnames NCURSES_PUBLIC_VAR(numnames())"
+ print "#define numcodes NCURSES_PUBLIC_VAR(numcodes())"
+ print "#define numfnames NCURSES_PUBLIC_VAR(numfnames())"
+ print "#define strnames NCURSES_PUBLIC_VAR(strnames())"
+ print "#define strcodes NCURSES_PUBLIC_VAR(strcodes())"
+ print "#define strfnames NCURSES_PUBLIC_VAR(strfnames())"
+ print ""
+ print "#else"
+ print ""
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];"
+ print ""
+ print "#endif"
+ print ""
+ print "/*"
+ print " * These entrypoints are used only by the ncurses utilities such as tic."
+ print " */"
+ print "#ifdef NCURSES_INTERNALS"
+ print ""
+ print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);"
+ print "extern NCURSES_EXPORT(int) _nc_read_entry2 (const char * const, char * const, TERMTYPE2 *const);"
+ print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE2 *);"
+ print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);"
+ 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 ""
+ 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 "/*"
+ print " * Normal entry points"
+ print " */"
+ print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);"
+ print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);"
+ print ""
+ print "/* miscellaneous entry points */"
+ print "extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);"
+ print "extern NCURSES_EXPORT(int) setupterm (const char *,int,int *);"
+ print ""
+ print "/* terminfo entry points, also declared in curses.h */"
+ print "#if !defined(__NCURSES_H)"
+ print "extern NCURSES_EXPORT(char *) tigetstr (const char *);"
+ print "extern NCURSES_EXPORT_VAR(char) ttytype[];"
+ print "extern NCURSES_EXPORT(int) putp (const char *);"
+ print "extern NCURSES_EXPORT(int) tigetflag (const char *);"
+ print "extern NCURSES_EXPORT(int) tigetnum (const char *);"
+ print ""
+ print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
+ print "extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */"
+ print "#else"
+ print "extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */"
+ print "extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */"
+ print "#endif"
+ print ""
+ print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
+ print ""
+ print "#endif /* __NCURSES_H */"
+ print ""
+ print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
+ print "#if !defined(NCURSES_TERMCAP_H_incl)"
+ print "extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);"
+ print "extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);"
+ print "extern NCURSES_EXPORT(int) tgetent (char *, const char *);"
+ print "extern NCURSES_EXPORT(int) tgetflag (const char *);"
+ print "extern NCURSES_EXPORT(int) tgetnum (const char *);"
+ print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
+ print "#endif /* NCURSES_TERMCAP_H_incl */"
+ print ""
+ print "/*"
+ print " * Include curses.h before term.h to enable these extensions."
+ print " */"
+ print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
+ print ""
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);"
+ print ""
+ print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */"
+ print "#else"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, const char *, ...); /* special */"
+ print "#endif"
+ print ""
+ print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, const char *, char **);"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
+ print ""
+ print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
+ print ""
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
+ print "#endif /* NCURSES_SP_FUNCS */"
+ print ""
+ print "/*"
+ print " * Debugging features."
+ print " */"
+ print "extern NCURSES_EXPORT(void) exit_terminfo(int) GCC_NORETURN;"
+ print ""
+ print "#ifdef __cplusplus"
+ printf "%s\n", rcurl;
+ print "#endif"
+ print ""
+ print "#endif /* NCURSES_TERM_H_incl */"
+}
diff --git a/include/Makefile.in b/include/Makefile.in
index 61f3884..d23c472 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,6 +1,7 @@
-# $Id: Makefile.in,v 1.41 2013/08/03 23:10:51 tom Exp $
+# $Id: Makefile.in,v 1.46 2020/02/02 23:34:34 tom Exp $
##############################################################################
-# Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
+# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -39,7 +40,7 @@
# turn off _all_ suffix rules; we'll generate our own
.SUFFIXES:
-SHELL = /bin/sh
+SHELL = @SHELL@
VPATH = @srcdir@
THIS = Makefile
@@ -66,6 +67,8 @@ VERSION = @cf_cv_rel_version@
# The "Caps" file specifies the terminfo database format, as well as the list
# of function keys.
TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@
+CAPLIST = $(TERMINFO_CAPS) \
+ $(srcdir)/Caps-ncurses
# These files are generated by the configure script
CONFIG_SRC = \
@@ -91,27 +94,30 @@ depend \
sources \
install :: $(AUTO_SRC)
-curses.h : $(TERMINFO_CAPS) \
+curses.h : $(CAPLIST) \
curses.head \
$(srcdir)/curses.tail \
$(srcdir)/MKkey_defs.sh
cat curses.head >$@
- AWK=$(AWK) sh $(srcdir)/MKkey_defs.sh $(TERMINFO_CAPS) >>$@
- sh -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
+ AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@
+ $(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
cat $(srcdir)/curses.tail >>$@
-term.h: $(TERMINFO_CAPS) MKterm.h.awk
- $(AWK) -f MKterm.h.awk $(TERMINFO_CAPS) > $@
- sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
+term.h: $(CAPLIST) \
+ MKterm.h.awk
+ $(AWK) -f MKterm.h.awk $(CAPLIST) > $@
+ $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
-hashsize.h: $(TERMINFO_CAPS) $(srcdir)/MKhashsize.sh
- sh $(srcdir)/MKhashsize.sh $(TERMINFO_CAPS) >$@
+hashsize.h: $(CAPLIST) \
+ $(srcdir)/MKhashsize.sh
+ $(SHELL) $(srcdir)/MKhashsize.sh $(CAPLIST) >$@
ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
- AWK=$(AWK) sh $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
+ AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
-parametrized.h: $(TERMINFO_CAPS) $(srcdir)/MKparametrized.sh
- AWK=$(AWK) sh $(srcdir)/MKparametrized.sh $(TERMINFO_CAPS) >$@
+parametrized.h: $(CAPLIST) \
+ $(srcdir)/MKparametrized.sh
+ AWK=$(AWK) $(SHELL) $(srcdir)/MKparametrized.sh $(CAPLIST) >$@
# This is required by pthread.h on MinGW
config.h:
@@ -128,6 +134,7 @@ mostlyclean ::
clean :: mostlyclean
-rm -f $(AUTO_SRC)
+ -rm -rf *.dSYM
distclean :: clean
-rm -f Makefile $(CONFIG_SRC) config.h
diff --git a/include/capdefaults.c b/include/capdefaults.c
index da76cc1..951a9ca 100644
--- a/include/capdefaults.c
+++ b/include/capdefaults.c
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 1998-2000,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +33,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: capdefaults.c,v 1.14 2008/11/16 00:19:59 juergen Exp $ */
+/* $Id: capdefaults.c,v 1.15 2020/02/02 23:34:34 tom Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file is
diff --git a/include/curses.h.in b/include/curses.h.in
index 65eedaa..2cb3224 100644
--- a/include/curses.h.in
+++ b/include/curses.h.in
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
+ * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +33,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: curses.h.in,v 1.241 2014/08/09 20:39:44 tom Exp $ */
+/* $Id: curses.h.in,v 1.266 2020/02/08 10:51:53 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@@ -89,13 +90,13 @@
#define NCURSES_INLINE @NCURSES_INLINE@
/*
- * The internal type used for color values, and for color-pairs. The latter
+ * The standard type used for color values, and for color-pairs. The latter
* allows the curses library to enumerate the combinations of foreground and
* background colors used by an application, and is normally the product of the
* total foreground and background colors.
*
* X/Open uses "short" for both of these types, ultimately because they are
- * numbers from the terminal database, which uses 16-bit signed values.
+ * numbers from the SVr4 terminal database, which uses 16-bit signed values.
*/
#undef NCURSES_COLOR_T
#define NCURSES_COLOR_T short
@@ -104,10 +105,22 @@
#define NCURSES_PAIRS_T short
/*
- * Definition used to make WINDOW and similar structs opaque.
+ * Definitions used to make WINDOW and similar structs opaque.
*/
-#ifndef @cf_cv_enable_opaque@
-#define NCURSES_OPAQUE @NCURSES_OPAQUE@
+#ifndef NCURSES_INTERNALS
+#define NCURSES_OPAQUE @NCURSES_OPAQUE@
+#define NCURSES_OPAQUE_FORM @NCURSES_OPAQUE_FORM@
+#define NCURSES_OPAQUE_MENU @NCURSES_OPAQUE_MENU@
+#define NCURSES_OPAQUE_PANEL @NCURSES_OPAQUE_PANEL@
+#endif
+
+/*
+ * Definition used to optionally suppress wattr* macros to help with the
+ * transition from ncurses5 to ncurses6 by allowing the header files to
+ * be shared across development packages for ncursesw in both ABIs.
+ */
+#ifndef NCURSES_WATTR_MACROS
+#define NCURSES_WATTR_MACROS @NCURSES_WATTR_MACROS@
#endif
/*
@@ -118,6 +131,14 @@
#endif
/*
+ * In certain environments, we must work around linker problems for data
+ */
+#undef NCURSES_BROKEN_LINKER
+#if @BROKEN_LINKER@
+#define NCURSES_BROKEN_LINKER 1
+#endif
+
+/*
* Control whether bindings for interop support are added.
*/
#undef NCURSES_INTEROP_FUNCS
@@ -143,6 +164,13 @@
#define NCURSES_TPARM_ARG @NCURSES_TPARM_ARG@
/*
+ * Control whether ncurses uses wcwidth() for checking width of line-drawing
+ * characters.
+ */
+#undef NCURSES_WCWIDTH_GRAPHICS
+#define NCURSES_WCWIDTH_GRAPHICS @NCURSES_WCWIDTH_GRAPHICS@
+
+/*
* NCURSES_CH_T is used in building the library, but not used otherwise in
* this header file, since that would make the normal/wide-character versions
* of the header incompatible.
@@ -229,6 +257,8 @@ extern "C" {
#define NCURSES_CAST(type,value) (type)(value)
#endif
+#define NCURSES_OK_ADDR(p) (0 != NCURSES_CAST(const void *, (p)))
+
/*
* X/Open attributes. In the ncurses implementation, they are identical to the
* A_ attributes.
@@ -559,6 +589,13 @@ extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *)
#define GCC_UNUSED /* nothing */
#endif
+#undef GCC_DEPRECATED
+#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))
+#define GCC_DEPRECATED(msg) __attribute__((deprecated))
+#else
+#define GCC_DEPRECATED(msg) /* nothing */
+#endif
+
/*
* Curses uses a helper function. Define our type for this to simplify
* extending it for the sp-funcs feature.
@@ -680,7 +717,7 @@ extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */
extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */
extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */
GCC_PRINTFLIKE(3,4);
-extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */
+extern NCURSES_EXPORT(int) mvscanw (int,int, const char *,...) /* implemented */
GCC_SCANFLIKE(3,4);
extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */
extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */
@@ -705,13 +742,13 @@ extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* gene
extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */
extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */
GCC_PRINTFLIKE(4,5);
-extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */
+extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, const char *,...) /* implemented */
GCC_SCANFLIKE(4,5);
extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */
extern NCURSES_EXPORT(int) napms (int); /* implemented */
-extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */
-extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */
-extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */
+extern NCURSES_EXPORT(SCREEN *) newterm (const char *,FILE *,FILE *); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */
extern NCURSES_EXPORT(int) nl (void); /* implemented */
extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */
extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */
@@ -739,7 +776,7 @@ extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */
extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */
extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */
extern NCURSES_EXPORT(int) savetty (void); /* implemented */
-extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */
+extern NCURSES_EXPORT(int) scanw (const char *,...) /* implemented */
GCC_SCANFLIKE(1,2);
extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */
extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */
@@ -765,7 +802,7 @@ extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */
extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */
extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */
extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */
-extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */
+extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */
extern NCURSES_EXPORT(int) standout (void); /* generated */
extern NCURSES_EXPORT(int) standend (void); /* generated */
extern NCURSES_EXPORT(int) start_color (void); /* implemented */
@@ -785,10 +822,10 @@ 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); /* implemented */
-extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */
-extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */
-extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* 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) waddch (WINDOW *, const chtype); /* implemented */
extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */
extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */
@@ -834,7 +871,7 @@ extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented
GCC_PRINTFLIKE(2,3);
extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */
extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */
-extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */
+extern NCURSES_EXPORT(int) wscanw (WINDOW *, const char *,...) /* implemented */
GCC_SCANFLIKE(2,3);
extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */
extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */
@@ -849,16 +886,16 @@ extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */
/*
* These are also declared in <term.h>:
*/
-extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */
-extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */
-extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */
+extern NCURSES_EXPORT(int) tigetflag (const char *); /* implemented */
+extern NCURSES_EXPORT(int) tigetnum (const char *); /* implemented */
+extern NCURSES_EXPORT(char *) tigetstr (const char *); /* implemented */
extern NCURSES_EXPORT(int) putp (const char *); /* implemented */
#if NCURSES_TPARM_VARARGS
-extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */
+extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
#else
-extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */
-extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */
+extern NCURSES_EXPORT(char *) tparm (const char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */
+extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
@@ -894,11 +931,20 @@ 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(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 *);
+extern NCURSES_EXPORT(int) extended_slk_color(int);
+extern NCURSES_EXPORT(int) find_pair (int, int);
+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) key_defined (const char *);
extern NCURSES_EXPORT(int) keyok (int, bool);
+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);
@@ -981,7 +1027,7 @@ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemente
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */
-extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, const char *, FILE *, FILE *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */
@@ -1025,13 +1071,22 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implem
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(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(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(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 */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
@@ -1085,7 +1140,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* These pseudo functions are always implemented as macros:
*/
-#define getyx(win,y,x) (y = getcury(win), x = getcurx(win))
+#define getyx(win,y,x) (y = getcury(win), x = getcurx(win))
#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win))
#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win))
#define getparyx(win,y,x) (y = getpary(win), x = getparx(win))
@@ -1128,36 +1183,40 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
/* It seems older SYSV curses versions define these */
#if !NCURSES_OPAQUE
-#define getattrs(win) NCURSES_CAST(int, (win) ? (win)->_attrs : A_NORMAL)
-#define getcurx(win) ((win) ? (win)->_curx : ERR)
-#define getcury(win) ((win) ? (win)->_cury : ERR)
-#define getbegx(win) ((win) ? (win)->_begx : ERR)
-#define getbegy(win) ((win) ? (win)->_begy : ERR)
-#define getmaxx(win) ((win) ? ((win)->_maxx + 1) : ERR)
-#define getmaxy(win) ((win) ? ((win)->_maxy + 1) : ERR)
-#define getparx(win) ((win) ? (win)->_parx : ERR)
-#define getpary(win) ((win) ? (win)->_pary : ERR)
+#define getattrs(win) NCURSES_CAST(int, NCURSES_OK_ADDR(win) ? (win)->_attrs : A_NORMAL)
+#define getcurx(win) (NCURSES_OK_ADDR(win) ? (win)->_curx : ERR)
+#define getcury(win) (NCURSES_OK_ADDR(win) ? (win)->_cury : ERR)
+#define getbegx(win) (NCURSES_OK_ADDR(win) ? (win)->_begx : ERR)
+#define getbegy(win) (NCURSES_OK_ADDR(win) ? (win)->_begy : ERR)
+#define getmaxx(win) (NCURSES_OK_ADDR(win) ? ((win)->_maxx + 1) : ERR)
+#define getmaxy(win) (NCURSES_OK_ADDR(win) ? ((win)->_maxy + 1) : ERR)
+#define getparx(win) (NCURSES_OK_ADDR(win) ? (win)->_parx : ERR)
+#define getpary(win) (NCURSES_OK_ADDR(win) ? (win)->_pary : ERR)
#endif /* NCURSES_OPAQUE */
-#define wstandout(win) (wattrset(win,A_STANDOUT))
-#define wstandend(win) (wattrset(win,A_NORMAL))
+#define wstandout(win) (wattrset(win,A_STANDOUT))
+#define wstandend(win) (wattrset(win,A_NORMAL))
#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL)
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
#if !NCURSES_OPAQUE
+#if NCURSES_WATTR_MACROS
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
-#define wattrset(win,at) ((win) \
- ? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \
- (win)->_attrs = NCURSES_CAST(attr_t, at), \
- OK) \
- : ERR)
+#define wattrset(win,at) \
+ (NCURSES_OK_ADDR(win) \
+ ? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \
+ (win)->_attrs = NCURSES_CAST(attr_t, at), \
+ OK) \
+ : ERR)
#else
-#define wattrset(win,at) ((win) \
- ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
- OK) \
- : ERR)
+#define wattrset(win,at) \
+ (NCURSES_OK_ADDR(win) \
+ ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
+ OK) \
+ : ERR)
#endif
+#endif /* NCURSES_WATTR_MACROS */
#endif /* NCURSES_OPAQUE */
#define scroll(win) wscrl(win,1)
@@ -1176,7 +1235,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define winsstr(w, s) winsnstr(w, s, -1)
#if !NCURSES_OPAQUE
-#define redrawwin(win) wredrawln(win, 0, ((win) ? (win)->_maxy+1 : -1))
+#define redrawwin(win) wredrawln(win, 0, (NCURSES_OK_ADDR(win) ? (win)->_maxy+1 : -1))
#endif /* NCURSES_OPAQUE */
#define waddstr(win,str) waddnstr(win,str,-1)
@@ -1185,7 +1244,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
/*
* These apply to the first 256 color pairs.
*/
-#define COLOR_PAIR(n) NCURSES_BITS((n), 0)
+#define COLOR_PAIR(n) (NCURSES_BITS((n), 0) & A_COLOR)
#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,(a)) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
/*
@@ -1197,13 +1256,13 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define addchstr(str) waddchstr(stdscr,(str))
#define addnstr(str,n) waddnstr(stdscr,(str),(n))
#define addstr(str) waddnstr(stdscr,(str),-1)
-#define attroff(at) wattroff(stdscr,(at))
-#define attron(at) wattron(stdscr,(at))
-#define attrset(at) wattrset(stdscr,(at))
#define attr_get(ap,cp,o) wattr_get(stdscr,(ap),(cp),(o))
#define attr_off(a,o) wattr_off(stdscr,(a),(o))
#define attr_on(a,o) wattr_on(stdscr,(a),(o))
#define attr_set(a,c,o) wattr_set(stdscr,(a),(c),(o))
+#define attroff(at) wattroff(stdscr,(at))
+#define attron(at) wattron(stdscr,(at))
+#define attrset(at) wattrset(stdscr,(at))
#define bkgd(ch) wbkgd(stdscr,(ch))
#define bkgdset(ch) wbkgdset(stdscr,(ch))
#define chgat(n,a,c,o) wchgat(stdscr,(n),(a),(c),(o))
@@ -1246,8 +1305,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define mvwaddchstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),-1))
#define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n)))
#define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1))
-#define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win))
#define mvwchgat(win,y,x,n,a,c,o) (wmove((win),(y),(x)) == ERR ? ERR : wchgat((win),(n),(a),(c),(o)))
+#define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win))
#define mvwgetch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wgetch(win))
#define mvwgetnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : wgetnstr((win),(str),(n)))
#define mvwgetstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : wgetstr((win),(str)))
@@ -1287,31 +1346,53 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* Some wide-character functions can be implemented without the extensions.
*/
#if !NCURSES_OPAQUE
-#define getbkgd(win) ((win) ? ((win)->_bkgd) : 0)
+#define getbkgd(win) (NCURSES_OK_ADDR(win) ? ((win)->_bkgd) : 0)
#endif /* NCURSES_OPAQUE */
#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a))
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
#if !NCURSES_OPAQUE
+#if NCURSES_WATTR_MACROS
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
-#define wattr_set(win,a,p,opts) (((win) \
- ? ((win)->_attrs = ((a) & ~A_COLOR), \
- (win)->_color = (p)) \
- : OK), \
- OK)
-#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \
- (void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? (win)->_color : 0)) : OK), \
- OK)
-#else
-#define wattr_set(win,a,p,opts) (((win) \
- ? ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p))) \
- : OK), \
- OK)
-#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \
- (void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? PAIR_NUMBER((win)->_attrs) : 0)) : OK), \
- OK)
-#endif
+#define wattr_set(win,a,p,opts) \
+ (NCURSES_OK_ADDR(win) \
+ ? ((void)((win)->_attrs = ((a) & ~A_COLOR), \
+ (win)->_color = (opts) ? *(int *)(opts) : (p)), \
+ OK) \
+ : ERR)
+#define wattr_get(win,a,p,opts) \
+ (NCURSES_OK_ADDR(win) \
+ ? ((void)(NCURSES_OK_ADDR(a) \
+ ? (*(a) = (win)->_attrs) \
+ : OK), \
+ (void)(NCURSES_OK_ADDR(p) \
+ ? (*(p) = (NCURSES_PAIRS_T) (win)->_color) \
+ : OK), \
+ (void)(NCURSES_OK_ADDR(opts) \
+ ? (*(int *)(opts) = (win)->_color) \
+ : OK), \
+ OK) \
+ : ERR)
+#else /* !(NCURSES_WIDECHAR && NCURSES_EXE_COLORS) */
+#define wattr_set(win,a,p,opts) \
+ (NCURSES_OK_ADDR(win) \
+ ? ((void)((win)->_attrs = (((a) & ~A_COLOR) | \
+ (attr_t)COLOR_PAIR(p))), \
+ OK) \
+ : ERR)
+#define wattr_get(win,a,p,opts) \
+ (NCURSES_OK_ADDR(win) \
+ ? ((void)(NCURSES_OK_ADDR(a) \
+ ? (*(a) = (win)->_attrs) \
+ : OK), \
+ (void)(NCURSES_OK_ADDR(p) \
+ ? (*(p) = (NCURSES_PAIRS_T) PAIR_NUMBER((win)->_attrs)) \
+ : OK), \
+ OK) \
+ : ERR)
+#endif /* (NCURSES_WIDECHAR && NCURSES_EXE_COLORS) */
+#endif /* NCURSES_WATTR_MACROS */
#endif /* NCURSES_OPAQUE */
/*
@@ -1320,8 +1401,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already
* use stdarg.h, so...
*/
-#define vw_printw vwprintw
-#define vw_scanw vwscanw
+/* define vw_printw vwprintw */
+/* define vw_scanw vwscanw */
/*
* Export fallback function for use in C++ binding.
@@ -1336,24 +1417,30 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
*/
#if @NCURSES_EXT_FUNCS@
#if !NCURSES_OPAQUE
-#define is_cleared(win) ((win) ? (win)->_clear : FALSE)
-#define is_idcok(win) ((win) ? (win)->_idcok : FALSE)
-#define is_idlok(win) ((win) ? (win)->_idlok : FALSE)
-#define is_immedok(win) ((win) ? (win)->_immed : FALSE)
-#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE)
-#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE)
-#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE)
-#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE)
-#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
-#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE)
-#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
-#define is_syncok(win) ((win) ? (win)->_sync : FALSE)
-#define wgetdelay(win) ((win) ? (win)->_delay : 0)
-#define wgetparent(win) ((win) ? (win)->_parent : 0)
-#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
+#define is_cleared(win) (NCURSES_OK_ADDR(win) ? (win)->_clear : FALSE)
+#define is_idcok(win) (NCURSES_OK_ADDR(win) ? (win)->_idcok : FALSE)
+#define is_idlok(win) (NCURSES_OK_ADDR(win) ? (win)->_idlok : FALSE)
+#define is_immedok(win) (NCURSES_OK_ADDR(win) ? (win)->_immed : FALSE)
+#define is_keypad(win) (NCURSES_OK_ADDR(win) ? (win)->_use_keypad : FALSE)
+#define is_leaveok(win) (NCURSES_OK_ADDR(win) ? (win)->_leaveok : FALSE)
+#define is_nodelay(win) (NCURSES_OK_ADDR(win) ? ((win)->_delay == 0) : FALSE)
+#define is_notimeout(win) (NCURSES_OK_ADDR(win) ? (win)->_notimeout : FALSE)
+#define is_pad(win) (NCURSES_OK_ADDR(win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
+#define is_scrollok(win) (NCURSES_OK_ADDR(win) ? (win)->_scroll : FALSE)
+#define is_subwin(win) (NCURSES_OK_ADDR(win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
+#define is_syncok(win) (NCURSES_OK_ADDR(win) ? (win)->_sync : FALSE)
+#define wgetdelay(win) (NCURSES_OK_ADDR(win) ? (win)->_delay : 0)
+#define wgetparent(win) (NCURSES_OK_ADDR(win) ? (win)->_parent : 0)
+#define wgetscrreg(win,t,b) (NCURSES_OK_ADDR(win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#endif
#endif
+/*
+ * X/Open says this returns a bool; SVr4 also checked for out-of-range line.
+ * The macro provides compatibility:
+ */
+#define is_linetouched(w,l) ((!(w) || ((l) > getmaxy(w)) || ((l) < 0)) ? ERR : (is_linetouched)((w),(l)))
+
#endif /* NCURSES_NOMACROS */
/*
diff --git a/include/curses.tail b/include/curses.tail
index 5f911ae..05f7439 100644
--- a/include/curses.tail
+++ b/include/curses.tail
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.21 2011/10/29 20:03:22 tom Exp $ */
+/* $Id: curses.tail,v 1.25 2019/12/14 22:28:39 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@@ -111,7 +111,9 @@ extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mma
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
#endif
+#ifndef NCURSES_NOMACROS
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
+#endif
/* other non-XSI functions */
@@ -126,10 +128,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* d
/* Debugging : use with libncurses_g.a */
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
-extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *);
extern NCURSES_EXPORT(char *) _traceattr (attr_t);
extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype);
-extern NCURSES_EXPORT(char *) _nc_tracebits (void);
extern NCURSES_EXPORT(char *) _tracechar (int);
extern NCURSES_EXPORT(char *) _tracechtype (chtype);
extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype);
@@ -142,8 +142,8 @@ extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *);
#define _tracech_t _tracechtype
#define _tracech_t2 _tracechtype2
#endif
-extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *);
-extern NCURSES_EXPORT(void) trace (const unsigned int);
+extern NCURSES_EXPORT(void) trace (const unsigned) GCC_DEPRECATED("use curses_trace");
+extern NCURSES_EXPORT(unsigned) curses_trace (const unsigned);
/* trace masks */
#define TRACE_DISABLE 0x0000 /* turn off tracing */
@@ -174,6 +174,8 @@ 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;
+
#include <unctrl.h>
#ifdef __cplusplus
diff --git a/include/curses.wide b/include/curses.wide
index 5d130a9..7a8ae7d 100644
--- a/include/curses.wide
+++ b/include/curses.wide
@@ -1,4 +1,4 @@
-/* $Id: curses.wide,v 1.46 2014/02/01 22:00:32 tom Exp $ */
+/* $Id: curses.wide,v 1.50 2017/03/26 16:05:21 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@@ -204,7 +204,7 @@ extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implement
extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */
extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *, wint_t *, int); /* implemented */
extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */
extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */
@@ -261,7 +261,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_P
#define wins_wstr(w,t) wins_nwstr((w),(t),-1)
#if !NCURSES_OPAQUE
-#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK)
+#define wgetbkgrnd(win,wch) (NCURSES_OK_ADDR(wch) ? ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK) : ERR)
#endif
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c))
diff --git a/include/edit_cfg.sh b/include/edit_cfg.sh
index 8d64fee..f7f1795 100755
--- a/include/edit_cfg.sh
+++ b/include/edit_cfg.sh
@@ -1,7 +1,8 @@
#!/bin/sh
-# $Id: edit_cfg.sh,v 1.12 2001/12/23 00:52:40 tom Exp $
+# $Id: edit_cfg.sh,v 1.14 2020/02/02 23:34:34 tom Exp $
##############################################################################
-# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
+# Copyright 2020 Thomas E. Dickey #
+# Copyright 1998-2001,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -38,7 +39,7 @@
#
BAK=save$$
TMP=edit$$
-trap "rm -f $BAK $TMP" 0 1 2 5 15
+trap "rm -f $BAK $TMP" 0 1 2 3 15
for name in \
HAVE_TCGETATTR \
HAVE_TERMIOS_H \
diff --git a/include/hashed_db.h b/include/hashed_db.h
index 1ae29b0..584fd96 100644
--- a/include/hashed_db.h
+++ b/include/hashed_db.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 2006 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2006-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,12 +32,14 @@
****************************************************************************/
/*
- * $Id: hashed_db.h,v 1.6 2014/04/12 22:41:10 tom Exp $
+ * $Id: hashed_db.h,v 1.9 2020/02/02 23:34:34 tom Exp $
*/
#ifndef HASHED_DB_H
#define HASHED_DB_H 1
+#include <ncurses_cfg.h>
+
#include <curses.h>
#if USE_HASHED_DB
@@ -45,7 +48,7 @@
#include <db.h>
-#ifndef DBN_SUFFIX
+#ifndef DBM_SUFFIX
#define DBM_SUFFIX ".db"
#endif
diff --git a/include/headers b/include/headers
index 2f20bed..dbb134d 100644
--- a/include/headers
+++ b/include/headers
@@ -1,6 +1,7 @@
-# $Id: headers,v 1.13 2013/10/20 00:32:21 tom Exp $
+# $Id: headers,v 1.14 2020/02/02 23:34:34 tom Exp $
##############################################################################
-# Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. #
+# Copyright 2020 Thomas E. Dickey #
+# Copyright 1998-2012,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
diff --git a/include/nc_alloc.h b/include/nc_alloc.h
index 356f605..ca63e78 100644
--- a/include/nc_alloc.h
+++ b/include/nc_alloc.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
+ * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,12 +30,15 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: nc_alloc.h,v 1.22 2013/01/26 21:56:51 tom Exp $ */
+/* $Id: nc_alloc.h,v 1.26 2020/02/02 23:34:34 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
/* *INDENT-OFF* */
+#include <ncurses_cfg.h>
+#include <curses.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -69,8 +73,9 @@ extern "C" {
#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS
#define HAVE_NC_FREEALL 1
struct termtype;
-extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
-extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN;
+extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN 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 NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
@@ -79,9 +84,16 @@ 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;
#endif
+extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
-#define ExitProgram(code) _nc_free_and_exit(code)
+#else /* !NCURSES_INTERNALS */
+extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN 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");
#endif /* NO_LEAKS, etc */
#ifndef HAVE_NC_FREEALL
diff --git a/include/nc_mingw.h b/include/nc_mingw.h
index 3247003..68a4184 100644
--- a/include/nc_mingw.h
+++ b/include/nc_mingw.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2008-2010,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,19 +28,19 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas Dickey, 2008-on *
- * *
+ * Author: Thomas Dickey, 2008-on *
****************************************************************************/
-/* $Id: nc_mingw.h,v 1.3 2010/09/25 22:16:12 juergen Exp $ */
+/* $Id: nc_mingw.h,v 1.7 2020/02/02 23:34:34 tom Exp $ */
#ifndef NC_MINGW_H
#define NC_MINGW_H 1
+#ifdef _WIN32
#ifdef WINVER
# if WINVER < 0x0501
# error WINVER must at least be 0x0501
-# endif
+# endif
#else
# define WINVER 0x0501
#endif
@@ -51,7 +52,7 @@
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
-#include <sys/time.h> /* for struct timeval */
+#include <sys/time.h> /* for struct timeval */
extern int _nc_gettimeofday(struct timeval *, void *);
@@ -63,7 +64,9 @@ extern int _nc_gettimeofday(struct timeval *, void *);
#define getlogin() "username"
#undef wcwidth
-#define wcwidth(ucs) _nc_wcwidth(ucs)
+#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
extern int _nc_wcwidth(wchar_t);
+#endif /* _WIN32 */
+
#endif /* NC_MINGW_H */
diff --git a/include/nc_panel.h b/include/nc_panel.h
index 6a9ffea..60eb811 100644
--- a/include/nc_panel.h
+++ b/include/nc_panel.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 1998-2009,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +33,7 @@
****************************************************************************/
/*
- * $Id: nc_panel.h,v 1.7 2009/07/04 18:20:02 tom Exp $
+ * $Id: nc_panel.h,v 1.10 2020/02/02 23:34:34 tom Exp $
*
* nc_panel.h
*
@@ -43,6 +44,9 @@
#ifndef NC_PANEL_H
#define NC_PANEL_H 1
+#include <ncurses_cfg.h>
+#include <curses.h>
+
#ifdef __cplusplus
extern "C"
{
diff --git a/include/nc_string.h b/include/nc_string.h
index 7e6ccd4..93cf201 100644
--- a/include/nc_string.h
+++ b/include/nc_string.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 2012,2013 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2012-2013,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,8 +36,12 @@
#include <ncurses_cfg.h>
+#if HAVE_BSD_STRING_H
+#include <bsd/string.h>
+#endif
+
/*
- * $Id: nc_string.h,v 1.4 2013/12/15 01:09:19 tom Exp $
+ * $Id: nc_string.h,v 1.8 2020/02/02 23:34:34 tom Exp $
*
* String-hacks. Use these macros to stifle warnings on (presumably) correct
* uses of strcat, strcpy and sprintf.
@@ -56,14 +61,18 @@
#if USE_STRING_HACKS && HAVE_STRLCAT
#define _nc_STRCAT(d,s,n) NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,n))
+#define _nc_STRNCAT(d,s,m,n) NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,m))
#else
#define _nc_STRCAT(d,s,n) NCURSES_VOID strcat((d),(s))
+#define _nc_STRNCAT(d,s,m,n) NCURSES_VOID strncat((d),(s),(n))
#endif
#if USE_STRING_HACKS && HAVE_STRLCPY
#define _nc_STRCPY(d,s,n) NCURSES_VOID strlcpy((d),(s),NCURSES_CAST(size_t,n))
+#define _nc_STRNCPY(d,s,n) NCURSES_VOID strlcpy((d),(s),NCURSES_CAST(size_t,n))
#else
#define _nc_STRCPY(d,s,n) NCURSES_VOID strcpy((d),(s))
+#define _nc_STRNCPY(d,s,n) NCURSES_VOID strncpy((d),(s),(n))
#endif
#if USE_STRING_HACKS && HAVE_SNPRINTF
diff --git a/include/nc_termios.h b/include/nc_termios.h
index 2217f07..87fa46e 100644
--- a/include/nc_termios.h
+++ b/include/nc_termios.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 2011,2014 Free Software Foundation, Inc. *
+ * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2011-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,11 +31,13 @@
* Author: Thomas E. Dickey 2011 *
****************************************************************************/
-/* $Id: nc_termios.h,v 1.3 2014/05/03 19:40:10 juergen Exp $ */
+/* $Id: nc_termios.h,v 1.7 2020/02/02 23:34:34 tom Exp $ */
#ifndef NC_TERMIOS_included
#define NC_TERMIOS_included 1
+#include <ncurses_cfg.h>
+
#if HAVE_TERMIOS_H && HAVE_TCGETATTR
#else /* !HAVE_TERMIOS_H */
@@ -69,7 +72,7 @@
#else /* !HAVE_TERMIO_H */
-#if __MINGW32__
+#if _WIN32
/* lflag bits */
#define ISIG 0x0001
@@ -153,7 +156,7 @@
#undef ttyname
#define ttyname(fd) NULL
-#endif /* __MINGW32__ */
+#endif /* _WIN32 */
#endif /* HAVE_TERMIO_H */
#endif /* HAVE_TERMIOS_H */
diff --git a/include/nc_tparm.h b/include/nc_tparm.h
index 248f6c0..6157095 100644
--- a/include/nc_tparm.h
+++ b/include/nc_tparm.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 2006-2010,2012 Free Software Foundation, Inc. *
+ * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2006-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,11 +31,14 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
-/* $Id: nc_tparm.h,v 1.6 2012/02/18 21:34:42 tom Exp $ */
+/* $Id: nc_tparm.h,v 1.10 2020/02/02 23:34:34 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
+#include <ncurses_cfg.h>
+#include <curses.h>
+
/*
* Cast parameters past the formatting-string for tparm() to match the
* assumption of the varargs code.
@@ -70,7 +74,6 @@
#define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0)
#define TPARM_2(a,b,c) TPARM_3(a,b,c,0)
#define TPARM_1(a,b) TPARM_2(a,b,0)
-#define TPARM_1(a,b) TPARM_2(a,b,0)
#define TPARM_0(a) TPARM_1(a,0)
#endif
diff --git a/include/ncurses_cfg.hin b/include/ncurses_cfg.hin
index 3f8a482..bf9b2c5 100644
--- a/include/ncurses_cfg.hin
+++ b/include/ncurses_cfg.hin
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,10 +28,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ * Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
- * $Id: ncurses_cfg.hin,v 1.7 2005/01/02 01:26:58 tom Exp $
+ * $Id: ncurses_cfg.hin,v 1.12 2020/02/02 23:34:34 tom Exp $
+ *
+ * Both ncurses_cfg.h and ncurses_def.h are internal header-files used when
+ * building ncurses.
*
* This is a template-file used to generate the "ncurses_cfg.h" file.
*
@@ -40,7 +44,7 @@
*
* See:
* http://invisible-island.net/autoconf/
- * ftp://invisible-island.net/autoconf/
+ * ftp://ftp.invisible-island.net/autoconf/
*/
#ifndef NC_CONFIG_H
#define NC_CONFIG_H
@@ -52,11 +56,6 @@
#ifdef __cplusplus
#undef const
#undef inline
-#else
-#if defined(lint) || defined(TRACE)
-#undef inline
-#define inline /* nothing */
-#endif
#endif
/* On HP-UX, the C compiler doesn't grok mbstate_t without
@@ -69,4 +68,7 @@
#endif
#endif
+/*
+ * vile:cmode
+ */
#endif /* NC_CONFIG_H */
diff --git a/include/ncurses_defs b/include/ncurses_defs
index 5a63b25..e37fc90 100644
--- a/include/ncurses_defs
+++ b/include/ncurses_defs
@@ -1,6 +1,7 @@
-# $Id: ncurses_defs,v 1.66 2014/09/05 08:46:16 tom Exp $
+# $Id: ncurses_defs,v 1.92 2020/02/02 23:34:34 tom Exp $
##############################################################################
-# Copyright (c) 2000-2013,2014 Free Software Foundation, Inc. #
+# Copyright 2018-2019,2020 Thomas E. Dickey #
+# Copyright 2000-2016,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -41,15 +42,26 @@ DECL_ERRNO
ETIP_NEEDS_MATH_H
GCC_NORETURN /* nothing */
GCC_UNUSED /* nothing */
+HAVE_ALLOC_PAIR
HAVE_ASSUME_DEFAULT_COLORS
HAVE_BIG_CORE
HAVE_BSD_CGETENT
HAVE_BSD_SIGNAL_H
+HAVE_BSD_STRING_H
HAVE_BTOWC
HAVE_BUILTIN_H
HAVE_CHGAT 1
+HAVE_COLOR_CONTENT 1
HAVE_COLOR_SET 1
+HAVE_CONSISTENT_GETENV
+HAVE_COPYWIN 1
+HAVE_CURSCR 1
+HAVE_CURSES_DATA_TABSIZE 1
+HAVE_CURSES_DATA_TTYTYPE 1
+HAVE_DELSCREEN 1
+HAVE_DERWIN 1
HAVE_DIRENT_H
+HAVE_DUPWIN 1
HAVE_ERRNO
HAVE_FCNTL_H
HAVE_FILTER 1
@@ -69,7 +81,9 @@ HAVE_GETWIN 1
HAVE_GPM_H
HAVE_GPP_BUILTIN_H
HAVE_GXX_BUILTIN_H
+HAVE_HALFDELAY 1
HAVE_HAS_KEY
+HAVE_INIT_EXTENDED_COLOR
HAVE_INTTYPES_H
HAVE_IOSTREAM
HAVE_ISASCII
@@ -83,8 +97,10 @@ HAVE_LIBGPM
HAVE_LIBMENU
HAVE_LIBMPATROL
HAVE_LIBPANEL
+HAVE_LIB_PCRE2
HAVE_LIMITS_H
HAVE_LINK
+HAVE_LOCALECONV
HAVE_LOCALE_H
HAVE_LONG_FILE_NAMES
HAVE_MATH_H
@@ -96,11 +112,16 @@ HAVE_MBSTOWCS
HAVE_MBTOWC
HAVE_MENU_H
HAVE_MKSTEMP
+HAVE_MVDERWIN 1
HAVE_MVVLINE 1
+HAVE_MVWIN 1
HAVE_MVWVLINE 1
HAVE_NANOSLEEP
HAVE_NC_ALLOC_H
+HAVE_NEWPAD 1
HAVE_PANEL_H
+HAVE_PCRE2_POSIX_H
+HAVE_PCREPOSIX_H
HAVE_POLL
HAVE_POLL_H
HAVE_PURIFY
@@ -111,8 +132,10 @@ HAVE_REGEXPR_H_FUNCS
HAVE_REGEXP_H_FUNCS
HAVE_REGEX_H_FUNCS
HAVE_REMOVE
+HAVE_RESET_COLOR_PAIRS
HAVE_RESIZETERM
HAVE_RESIZE_TERM
+HAVE_RESTARTTERM 1
HAVE_RIPOFFLINE 1
HAVE_SCR_DUMP 1
HAVE_SELECT
@@ -134,6 +157,7 @@ HAVE_STRLCAT
HAVE_STRLCPY
HAVE_STRSTR
HAVE_SYMLINK
+HAVE_SYSCONF
HAVE_SYS_BSDTYPES_H
HAVE_SYS_IOCTL_H
HAVE_SYS_PARAM_H
@@ -147,6 +171,7 @@ HAVE_TCGETATTR
HAVE_TCGETPGRP
HAVE_TELL
HAVE_TERMATTRS 1
+HAVE_TERMCAP_H 1
HAVE_TERMIOS_H
HAVE_TERMIO_H
HAVE_TERMNAME 1
@@ -156,6 +181,8 @@ HAVE_TGETENT 1
HAVE_TIGETNUM 1
HAVE_TIGETSTR 1
HAVE_TIMES
+HAVE_TPUTS_SP
+HAVE_TSEARCH
HAVE_TTYENT_H
HAVE_TYPEAHEAD 1
HAVE_TYPEINFO
@@ -174,21 +201,26 @@ HAVE_VIDPUTS 1
HAVE_VID_PUTS 1
HAVE_VSNPRINTF
HAVE_VSSCANF
+HAVE_VW_PRINTW 1
+HAVE_WCHGAT 1
HAVE_WCSRTOMBS
HAVE_WCSTOMBS
HAVE_WCTOB
HAVE_WCTOMB
HAVE_WCTYPE_H
+HAVE_WINSDELLN 1
HAVE_WINSSTR 1
HAVE_WORKING_POLL
HAVE_WRESIZE
HAVE_WSYNCDOWN 1
HAVE__DOSCAN
+HAVE__TRACEF
MIXEDCASE_FILENAMES
NCURSES_CHAR_EQ
NCURSES_EXPANDED
NCURSES_EXT_COLORS
NCURSES_EXT_FUNCS
+NCURSES_EXT_PUTWIN
NCURSES_NO_PADDING
NCURSES_OSPEED_COMPAT
NCURSES_PATHSEP ':'
@@ -205,6 +237,7 @@ TERMPATH "none"
TIME_WITH_SYS_TIME
TYPEOF_CHTYPE
USE_COLORFGBG
+USE_FOPEN_BIN_R
USE_GETCAP
USE_GETCAP_CACHE
USE_HARD_TABS
diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in
index 676850c..f439d48 100644
--- a/include/ncurses_dll.h.in
+++ b/include/ncurses_dll.h.in
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. *
+ * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2009,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -25,17 +26,30 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
-/* $Id: ncurses_dll.h.in,v 1.9 2014/08/02 21:30:20 tom Exp $ */
+/* $Id: ncurses_dll.h.in,v 1.12 2020/02/02 23:34:34 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
+/*
+ * MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64.
+ */
+#if defined(__MINGW64__)
+
+#ifndef _WIN64
+#define _WIN64 1
+#endif
+
+#elif defined(__MINGW32__)
+
+#ifndef _WIN32
+#define _WIN32 1
+#endif
+
/* 2014-08-02 workaround for broken MinGW compiler.
* Oddly, only TRACE is mapped to trace - the other -D's are okay.
* suggest TDM as an alternative.
*/
-#if defined(__MINGW64__)
-#elif defined(__MINGW32__)
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#ifdef trace
@@ -44,6 +58,7 @@
#endif
#endif /* broken compiler */
+
#endif /* MingW */
/*
@@ -60,7 +75,7 @@
#undef NCURSES_DLL
#define NCURSES_STATIC
-#if defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__CYGWIN__) || defined(_WIN32)
# if defined(NCURSES_DLL)
# if defined(NCURSES_STATIC)
# undef NCURSES_STATIC
diff --git a/include/ncurses_mingw.h b/include/ncurses_mingw.h
index 2bbad76..fc77aca 100644
--- a/include/ncurses_mingw.h
+++ b/include/ncurses_mingw.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. *
+ * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,17 +29,16 @@
/****************************************************************************
* Author: Juergen Pfeifer, 2008-on *
- * *
****************************************************************************/
-/* $Id: ncurses_mingw.h,v 1.3 2014/05/03 19:40:19 juergen Exp $ */
+/* $Id: ncurses_mingw.h,v 1.6 2020/02/02 23:34:34 tom Exp $ */
/*
* This is a placeholder up to now and describes what needs to be implemented
* to support I/O to external terminals with ncurses on the Windows OS.
*/
-#if __MINGW32__
+#ifdef _WIN32
#ifndef _NC_MINGWH
#define _NC_MINGWH
@@ -79,4 +79,4 @@ extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);
#endif /* _NC_MINGWH */
-#endif /* __MINGW32__ */
+#endif /* _WIN32 */
diff --git a/include/term_entry.h b/include/term_entry.h
index b12710d..df13f53 100644
--- a/include/term_entry.h
+++ b/include/term_entry.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
+ * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 1998-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +33,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
-/* $Id: term_entry.h,v 1.45 2014/11/01 14:47:00 tom Exp $ */
+/* $Id: term_entry.h,v 1.59 2020/02/02 23:34:34 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@@ -40,53 +41,18 @@
#ifndef NCURSES_TERM_ENTRY_H_incl
#define NCURSES_TERM_ENTRY_H_incl 1
+/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
+#include <curses.h>
#include <term.h>
- /*
- * see db_iterator.c - this enumeration lists the places searched for a
- * terminal description and defines the order in which they are searched.
- */
- typedef enum {
- dbdTIC = 0, /* special, used by tic when writing entry */
-#if NCURSES_USE_DATABASE
- dbdEnvOnce, /* the $TERMINFO environment variable */
- dbdHome, /* $HOME/.terminfo */
- dbdEnvList, /* the $TERMINFO_DIRS environment variable */
- dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
- dbdCfgOnce, /* the compiled-in TERMINFO value */
-#endif
-#if NCURSES_USE_TERMCAP
- dbdEnvOnce2, /* the $TERMCAP environment variable */
- dbdEnvList2, /* the $TERMPATH environment variable */
- dbdCfgList2, /* the compiled-in TERMPATH */
-#endif
- dbdLAST
- } DBDIRS;
-
-#define MAX_USES 32
-#define MAX_CROSSLINKS 16
-
- typedef struct entry {
- TERMTYPE tterm;
- unsigned nuses;
- struct {
- char *name;
- struct entry *link;
- long line;
- } uses[MAX_USES];
- int ncrosslinks;
- struct entry *crosslinks[MAX_CROSSLINKS];
- long cstart, cend;
- long startline;
- struct entry *next;
- struct entry *last;
- } ENTRY;
-/* *INDENT-OFF* */
+/*
+ * These macros may be used by programs that know about TERMTYPE:
+ */
#if NCURSES_XNAMES
#define NUM_BOOLEANS(tp) (tp)->num_Booleans
#define NUM_NUMBERS(tp) (tp)->num_Numbers
@@ -106,15 +72,66 @@ extern "C" {
#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
#if NCURSES_XNAMES
-#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; n < NUM_BOOLEANS(tp); n++)
-#define for_each_ext_number(n,tp) for(n = NUMCOUNT; n < NUM_NUMBERS(tp); n++)
-#define for_each_ext_string(n,tp) for(n = STRCOUNT; n < NUM_STRINGS(tp); n++)
+#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; (int) n < (int) NUM_BOOLEANS(tp); n++)
+#define for_each_ext_number(n,tp) for(n = NUMCOUNT; (int) n < (int) NUM_NUMBERS(tp); n++)
+#define for_each_ext_string(n,tp) for(n = STRCOUNT; (int) n < (int) NUM_STRINGS(tp); n++)
#endif
#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
+/*
+ * The remaining type-definitions and macros are used only internally by the
+ * ncurses utilities.
+ */
+#ifdef NCURSES_INTERNALS
+
+/*
+ * see db_iterator.c - this enumeration lists the places searched for a
+ * terminal description and defines the order in which they are searched.
+ */
+typedef enum {
+ dbdTIC = 0, /* special, used by tic when writing entry */
+#if NCURSES_USE_DATABASE
+ dbdEnvOnce, /* the $TERMINFO environment variable */
+ dbdHome, /* $HOME/.terminfo */
+ dbdEnvList, /* the $TERMINFO_DIRS environment variable */
+ dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
+ dbdCfgOnce, /* the compiled-in TERMINFO value */
+#endif
+#if NCURSES_USE_TERMCAP
+ dbdEnvOnce2, /* the $TERMCAP environment variable */
+ dbdEnvList2, /* the $TERMPATH environment variable */
+ dbdCfgList2, /* the compiled-in TERMPATH */
+#endif
+ dbdLAST
+} DBDIRS;
+
+#define MAX_USES 32
+#define MAX_CROSSLINKS 16
+
+typedef struct entry ENTRY;
+
+typedef struct {
+ char *name;
+ ENTRY *link;
+ long line;
+} ENTRY_USES;
+
+struct entry {
+ TERMTYPE2 tterm;
+ unsigned nuses;
+ ENTRY_USES uses[MAX_USES];
+ int ncrosslinks;
+ ENTRY *crosslinks[MAX_CROSSLINKS];
+ long cstart;
+ long cend;
+ long startline;
+ ENTRY *next;
+ ENTRY *last;
+};
+
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)
@@ -131,7 +148,10 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
#define ANDMISSING(p,q) \
- {if (PRESENT(p) && !PRESENT(q)) _nc_warning(#p " but no " #q);}
+ { \
+ if (PRESENT(p) && !PRESENT(q)) \
+ _nc_warning(#p " but no " #q); \
+ }
#define PAIRED(p,q) \
{ \
@@ -141,25 +161,25 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
_nc_warning(#p " but no " #q); \
}
+/*
+ * These entrypoints are used only by the ncurses utilities such as tic.
+ */
+
/* alloc_entry.c: elementary allocation code */
extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
-extern NCURSES_EXPORT(void) _nc_init_entry (TERMTYPE *const);
-extern NCURSES_EXPORT(void) _nc_merge_entry (TERMTYPE *const, TERMTYPE *const);
+extern NCURSES_EXPORT(void) _nc_init_entry (ENTRY *const);
+extern NCURSES_EXPORT(void) _nc_merge_entry (ENTRY *const, ENTRY *const);
extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
/* alloc_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE *, TERMTYPE *);
-extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *);
+extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
/* free_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
-
-/* lib_acs.c */
-extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
+extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
/* lib_termcap.c: trim sgr0 string for termcap users */
-extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE *);
+extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
/* parse_entry.c: entry-parsing code */
#if NCURSES_XNAMES
@@ -171,7 +191,8 @@ extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
/* write_entry.c: writing an entry to the file system */
extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
-extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const);
+extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE2 *const);
+extern NCURSES_EXPORT(int) _nc_write_object (TERMTYPE2 *, char *, unsigned *, unsigned);
/* comp_parse.c: entry list handling */
extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
@@ -180,13 +201,37 @@ extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
-extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE *, bool);
+extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE2 *, bool);
/* trace_xnames.c */
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
-/* *INDENT-ON* */
+
+#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
-#endif /* NCURSES_TERM_ENTRY_H_incl */
+
+/* *INDENT-ON* */
+
+#endif /* NCURSES_TERM_ENTRY_H_incl */
diff --git a/include/termcap.h.in b/include/termcap.h.in
index 6adc312..dc8d8fc 100644
--- a/include/termcap.h.in
+++ b/include/termcap.h.in
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 1998-2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,7 +32,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-/* $Id: termcap.h.in,v 1.16 2001/03/24 21:53:27 tom Exp $ */
+/* $Id: termcap.h.in,v 1.19 2020/02/02 23:34:34 tom Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
@@ -48,9 +49,6 @@ extern "C"
#include <sys/types.h>
-#undef NCURSES_CONST
-#define NCURSES_CONST @NCURSES_CONST@
-
#undef NCURSES_OSPEED
#define NCURSES_OSPEED @NCURSES_OSPEED@
@@ -60,11 +58,11 @@ extern NCURSES_EXPORT_VAR(char *) BC;
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
#if !defined(NCURSES_TERM_H_incl)
-extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);
+extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
-extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);
-extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);
+extern NCURSES_EXPORT(int) tgetflag (const char *);
+extern NCURSES_EXPORT(int) tgetnum (const char *);
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
#endif
diff --git a/include/tic.h b/include/tic.h
index 528a1b7..8210936 100644
--- a/include/tic.h
+++ b/include/tic.h
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 1998-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,9 +34,8 @@
****************************************************************************/
/*
- * $Id: tic.h,v 1.69 2012/03/17 18:22:10 tom Exp $
- * tic.h - Global variables and structures for the terminfo
- * compiler.
+ * $Id: tic.h,v 1.81 2020/02/02 23:34:34 tom Exp $
+ * tic.h - Global variables and structures for the terminfo compiler.
*/
#ifndef __TIC_H
@@ -45,10 +45,12 @@
extern "C" {
#endif
+#include <ncurses_cfg.h>
+
#include <curses.h> /* for the _tracef() prototype, ERR/OK, bool defs */
/*
-** The format of compiled terminfo files is as follows:
+** The format of SVr2 compiled terminfo files is as follows:
**
** Header (12 bytes), containing information given below
** Names Section, containing the names of the terminal
@@ -64,6 +66,11 @@ extern "C" {
** String Table, containing the actual characters of the string
** capabilities.
**
+** In the SVr2 format, "short" means signed 16-bit numbers, which is sometimes
+** inconvenient. The numbers are signed, to provide for absent and canceled
+** values. ncurses6.1 introduced an extension to this compiled format, by
+** making the Number Section a list of signed 32-bit integers.
+**
** NOTE that all short integers in the file are stored using VAX/PDP-style
** byte-order, i.e., least-significant byte first.
**
@@ -76,6 +83,7 @@ extern "C" {
*/
#define MAGIC 0432 /* first two bytes of a compiled entry */
+#define MAGIC2 01036 /* first two bytes of a compiled 32-bit entry */
#undef BYTE
#define BYTE(p,n) (unsigned char)((p)[n])
@@ -84,14 +92,23 @@ extern "C" {
#define IS_NEG2(p) ((BYTE(p,0) == 0376) && (BYTE(p,1) == 0377))
#define LOW_MSB(p) (BYTE(p,0) + 256*BYTE(p,1))
-#define IS_TIC_MAGIC(p) (LOW_MSB(p) == MAGIC)
+#define IS_TIC_MAGIC(p) (LOW_MSB(p) == MAGIC || LOW_MSB(p) == MAGIC2)
+
+#define quick_prefix(s) (!strncmp((s), "b64:", (size_t)4) || !strncmp((s), "hex:", (size_t)4))
/*
* The "maximum" here is misleading; XSI guarantees minimum values, which a
* given implementation may exceed.
*/
#define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */
-#define MAX_ENTRY_SIZE 4096 /* maximum legal entry size */
+#define MAX_ENTRY_SIZE1 4096 /* maximum legal entry size (SVr2) */
+#define MAX_ENTRY_SIZE2 32768 /* maximum legal entry size (ncurses6.1) */
+
+#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR
+#define MAX_ENTRY_SIZE MAX_ENTRY_SIZE2
+#else
+#define MAX_ENTRY_SIZE MAX_ENTRY_SIZE1
+#endif
/*
* The maximum size of individual name or alias is guaranteed in XSI to be at
@@ -118,7 +135,8 @@ extern "C" {
#define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT)
#define set_trace_level(n) \
- _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL), \
+ _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \
+ + DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \
_nc_tracing |= DEBUG_LEVEL(n)
#ifdef TRACE
@@ -127,11 +145,6 @@ extern "C" {
#define DEBUG(n, a) /*nothing*/
#endif
-extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
-extern NCURSES_EXPORT(void) _nc_tracef (char *, ...) GCC_PRINTFLIKE(1,2);
-extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
-extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
-
/*
* These are the types of tokens returned by the scanner. The first
* three are also used in the hash table of capability names. The scanner
@@ -148,49 +161,33 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
#define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */
- /*
- * The global structure in which the specific parts of a
- * scanned token are returned.
- *
- */
+/*
+ * The global structure in which the specific parts of a
+ * scanned token are returned.
+ */
struct token
{
- char *tk_name; /* name of capability */
+ char *tk_name; /* name of capability */
int tk_valnumber; /* value of capability (if a number) */
char *tk_valstring; /* value of capability (if a string) */
};
-extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
-
- /*
- * Offsets to string capabilities, with the corresponding functionkey
- * codes.
- */
+/*
+ * Offsets to string capabilities, with the corresponding functionkey codes.
+ */
struct tinfo_fkeys {
unsigned offset;
chtype code;
};
-#if BROKEN_LINKER
-
-#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
-extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
-
-#else
-
-extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
-
-#endif
-
typedef short HashValue;
- /*
- * The file comp_captab.c contains an array of these structures, one
- * per possible capability. These are indexed by a hash table array of
- * pointers to the same structures for use by the parser.
- */
-
+/*
+ * The file comp_captab.c contains an array of these structures, one per
+ * possible capability. These are indexed by a hash table array of pointers to
+ * the same structures for use by the parser.
+ */
struct name_table_entry
{
const char *nte_name; /* name to hash on */
@@ -199,10 +196,9 @@ struct name_table_entry
HashValue nte_link; /* index in table of next hash, or -1 */
};
- /*
- * Use this structure to hide differences between terminfo and termcap
- * tables.
- */
+/*
+ * Use this structure to hide differences between terminfo and termcap tables.
+ */
typedef struct {
unsigned table_size;
const HashValue *table_data;
@@ -217,14 +213,24 @@ struct alias
const char *source;
};
-extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
-extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
-extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
-extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
-
#define NOTFOUND ((struct name_table_entry *) 0)
/*
+ * The file comp_userdefs.c contains an array of these structures, one per
+ * possible capability. These are indexed by a hash table array of pointers to
+ * the same structures for use by the parser.
+ */
+struct user_table_entry
+{
+ const char *ute_name; /* name to hash on */
+ int ute_type; /* mask (BOOLEAN, NUMBER, STRING) */
+ unsigned ute_argc; /* number of parameters */
+ unsigned ute_args; /* bit-mask for string parameters */
+ HashValue ute_index; /* index of associated variable in its array */
+ HashValue ute_link; /* index in table of next hash, or -1 */
+};
+
+/*
* The casts are required for correct sign-propagation with systems such as
* AIX, IRIX64, Solaris which default to unsigned characters. The C standard
* leaves this detail unspecified.
@@ -256,6 +262,10 @@ extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#ifdef NCURSES_TERM_ENTRY_H_incl
+/*
+ * These entrypoints are used only by the ncurses utilities such as tic.
+ */
+#ifdef NCURSES_INTERNALS
/* access.c */
extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *);
extern NCURSES_EXPORT(bool) _nc_is_abs_path (const char *);
@@ -264,17 +274,21 @@ extern NCURSES_EXPORT(bool) _nc_is_file_path (const char *);
extern NCURSES_EXPORT(char *) _nc_basename (char *);
extern NCURSES_EXPORT(char *) _nc_rootname (char *);
+/* comp_captab.c */
+extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
+extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
+extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
+
/* comp_hash.c: name lookup */
-extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
- (const char *, const HashValue *);
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
(const char *, int, bool);
+extern NCURSES_EXPORT(struct user_table_entry const *) _nc_find_user_entry
+ (const char *);
/* comp_scan.c: lexical analysis */
extern NCURSES_EXPORT(int) _nc_get_token (bool);
extern NCURSES_EXPORT(void) _nc_panic_mode (char);
extern NCURSES_EXPORT(void) _nc_push_token (int);
-extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
extern NCURSES_EXPORT_VAR(int) _nc_curr_col;
extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
extern NCURSES_EXPORT_VAR(int) _nc_syntax;
@@ -296,11 +310,12 @@ extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFL
extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
-/* comp_expand.c: expand string into readable form */
-extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
+/* comp_scan.c */
+extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
-/* comp_scan.c: decode string from readable form */
-extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *);
+/* comp_userdefs.c */
+NCURSES_EXPORT(const struct user_table_entry *) _nc_get_userdefs_table (void);
+NCURSES_EXPORT(const HashData *) _nc_get_hash_user (void);
/* captoinfo.c: capability conversion */
extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const);
@@ -309,6 +324,14 @@ extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int con
/* home_terminfo.c */
extern NCURSES_EXPORT(char *) _nc_home_terminfo (void);
+/* init_keytry.c */
+#if BROKEN_LINKER
+#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
+extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
+#else
+extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
+#endif
+
/* lib_tparm.c */
#define NUM_PARM 9
@@ -316,8 +339,13 @@ extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *);
+/* lib_trace.c */
+extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
+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 */
+extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
/* comp_main.c: compiler main */
extern const char * _nc_progname;
@@ -331,6 +359,33 @@ extern NCURSES_EXPORT(void) _nc_last_db(void);
/* write_entry.c */
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/unctrl.h.in b/include/unctrl.h.in
index e08bc81..f76f443 100644
--- a/include/unctrl.h.in
+++ b/include/unctrl.h.in
@@ -1,5 +1,6 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 1998-2001,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +40,7 @@
* as ^?. Printable characters are displayed as is.
*/
-/* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */
+/* $Id: unctrl.h.in,v 1.12 2020/02/02 23:34:34 tom Exp $ */
#ifndef NCURSES_UNCTRL_H_incl
#define NCURSES_UNCTRL_H_incl 1