Added directories for ncurses

This commit is contained in:
2022-10-11 16:00:48 -05:00
parent 990d5dfbcc
commit 1e3d7f46f0
82 changed files with 19608 additions and 3 deletions

971
include/Caps Normal file
View File

@@ -0,0 +1,971 @@
##############################################################################
# Copyright 2019-2020,2021 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"), #
# 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
# $Id: Caps,v 1.48 2021/10/08 07:55:48 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
# 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.
#
# This file has three major sections; a standard-capabilities table, two
# extension-capability tables, and a section of aliases declarations.
# The first two have the same format, as follows:
#
# FILE FORMAT
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
# Column 7: Lead with `Y' if capability should be emitted in termcap
# translations, `-' otherwise
# Column 8: capability description
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
# C = used by the 4.4BSD curses library
# G = mentioned in the documentation for GNU termcap
# E = used by GNU Emacs
# K = remove this terminfo capability when translating to standard format
# The important codes are C and E. A cap with C or E should be preserved in
# translation if possible. The problem is that preserving all such caps may
# lead to some termcap translations being too long. The termcap maintainer
# has a bit of a juggling act to do...potential problem cases are marked with
# an asterisk (*).
#
# The aliases section has the following format:
#
# Column 1: either `capalias' or `infoalias'
# Column 2: name to be aliased
# Column 3: what name it should translate to. The name IGNORE means it
# should be discarded with a warning message.
# Column 4: name of the extension set (used for compiler warning messages)
# Column 5: capability description (usually an associated terminfo variable)
#
# HANDLING TERMCAP AND TERMINFO EXTENSIONS
#
# There are basically five different ways to handle termcap and terminfo
# extensions:
#
# 1. Don't list the capname here, or list it but comment it out (the latter
# is preferable; someone might want to handle it in the future). If you do
# this, the capability will be treated as unknown and raise a warning from
# the compiler.
#
# 2. Alias it. This is appropriate if the capability has the same meaning
# as an already-supported one. The compiler will handle aliasing, emitting
# an appropriate informational message whenever an alias fires.
#
# 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 is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
# get a warning message about it).
#
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
# in this class. Nothing will ever use them again.
#
# More usually, you want the compiler to try to deduce something from the
# capability value that it can use to translate it into your output format.
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# 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
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
# It might look tempting to leave those long init strings out of translations.
# We can't do it (yet); 4.4BSD tput and tset use them.
#
# We retain the sgr capability in translation in spite of the fact that neither
# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
# hard to understand without it, and (b) the entries in which it is long tend
# to be older types that don't use up a lot of string space on function keys.
# The tic(1) translation code will complain and elide it if it makes a critical
# difference (there is special code in tic to recognize this situation).
#
# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
# optimizer in BSD curses didn't use them. This omission seems to be the
# single most effective one, it shortened the resolved length of all thirteen
# problem entries in the 9.9.0 version of the terminfo master below critical.
#
# 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
# 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.
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
eat_newline_glitch xenl bool xn - - YBCGE newline ignored after 80 cols (concept)
erase_overstrike eo bool eo - - YBCG- can erase overstrikes with a blank
generic_type gn bool gn - - YB-G- generic line type
hard_copy hc bool hc - - YBCG- hardcopy terminal
has_meta_key km bool km - - YB-GE Has a meta key (i.e., sets 8th-bit)
has_status_line hs bool hs - - YB-G- has extra status line
insert_null_glitch in bool in - - YBCGE insert mode distinguishes nulls
memory_above da bool da - - YBCG- display may be retained above the screen
memory_below db bool db - - YB-GE display may be retained below the screen
move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
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)
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
prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
hard_cursor chts bool HC - - ----- cursor is hard to see
non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
no_pad_char npc bool NP - - ----- pad character does not exist
non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
can_change ccc bool cc - - ----- terminal can re-define existing colors
back_color_erase bce bool ut - - ----- screen erased with background color
hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
width_status_line wsl num ws - - YB-G- number of columns in status line
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 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
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
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_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
output_res_line orl num Yj - - ----- vertical resolution in units per line
output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
print_rate cps num Ym - - ----- print rate in characters per second
wide_char_size widcs num Yn - - ----- character step size when in double wide mode
buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
clr_eol el str ce - - YBCGE clear to end of line (P)
clr_eos ed str cd - - YBCGE clear to end of screen (P*)
column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
cursor_address cup str cm - - YBCGE move to row #1 columns #2
cursor_down cud1 str do - - YBCGE down one line
cursor_home home str ho - - YBCGE home cursor (if no cup)
cursor_invisible civis str vi - - YB-G- make cursor invisible
cursor_left cub1 str le - - YBCGE move left one space
cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
cursor_up cuu1 str up - - YBCGE up one line
cursor_visible cvvis str vs - - YBCGE make cursor very visible
delete_character dch1 str dc - - YBCGE delete character (P*)
delete_line dl1 str dl - - YBCGE delete line (P*)
dis_status_line dsl str ds - - YB-G- disable status line
down_half_line hd str hd - - YB-G- half a line down
enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
enter_blink_mode blink str mb - - YB-G- turn on blinking
enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
enter_delete_mode smdc str dm - - YBCGE enter delete mode
enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
enter_insert_mode smir str im - - YBCGE enter insert mode
enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
enter_protected_mode prot str mp - - -B-G-* turn on protected mode
enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
enter_standout_mode smso str so - - YBCGE begin standout mode
enter_underline_mode smul str us - - YBCGE begin underline mode
erase_chars ech str ec - - YB-G- erase #1 characters (P)
exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
exit_delete_mode rmdc str ed - - YBCGE end delete mode
exit_insert_mode rmir str ei - - YBCGE exit insert mode
exit_standout_mode rmso str se - - YBCGE exit standout mode
exit_underline_mode rmul str ue - - YBCGE exit underline mode
flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
from_status_line fsl str fs - - YB-G- return from status line
init_1string is1 str i1 - - YB-G- initialization string
init_2string is2 str is - - YB-G- initialization string
init_3string is3 str i3 - - YB-G- initialization string
init_file if str if - - YB-G- name of initialization file
insert_character ich1 str ic - - YBCGE insert character (P)
insert_line il1 str al - - YBCGE insert line (P*)
insert_padding ip str ip - - YBCGE insert padding after inserted character
key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
key_home khome str kh KEY_HOME 0406 YBCGE home key
key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
lab_f10 lf10 str la - - ----- label on function key f10 if not f10
lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
meta_off rmm str mo - - YB-G-* turn off meta mode
meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
pad_char pad str pc - - YBCGE padding char (instead of null)
parm_dch dch str DC - - YB-GE delete #1 characters (P*)
parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
parm_ich ich str IC - - YB-GE insert #1 characters (P*)
parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
print_screen mc0 str ps - - -B-G-* print contents of screen
prtr_off mc4 str pf - - -B-G-* turn off printer
prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
save_cursor sc str sc - - YBCG- save current cursor position (P)
scroll_forward ind str sf - - YBCGE scroll text up (P)
scroll_reverse ri str sr - - YBCGE scroll text down (P)
set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
set_tab hts str st - - YB-G- set a tab in every row, current columns
set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
to_status_line tsl str ts - - YB-G- move to status line, column #1
underline_char uc str uc - - YBCG- underline char and move past it
up_half_line hu str hu - - YB-G- half a line up
init_prog iprog str iP - - -B--- path name of program for initialization
key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
#
# SVr1 capabilities stop here. IBM's version of terminfo is the same as
# SVr4 up to this point, but has a different set afterwards.
#
char_padding rmp str rP - - ----- like ip but when in insert mode
acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
plab_norm pln str pn - - ----- program label #1 to show string #2
key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
enter_am_mode smam str SA - - ----- turn on automatic margins
exit_am_mode rmam str RA - - ----- turn off automatic margins
xon_character xonc str XN - - ----- XON character
xoff_character xoffc str XF - - ----- XOFF character
ena_acs enacs str eA - - ----- enable alternate char set
label_on smln str LO - - ----- turn on soft labels
label_off rmln str LF - - ----- turn off soft labels
key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
key_close kclo str @3 KEY_CLOSE 0544 ----- close key
key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
key_create kcrt str @6 KEY_CREATE 0547 ----- create key
key_end kend str @7 KEY_END 0550 ----- end key
key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
key_exit kext str @9 KEY_EXIT 0551 ----- exit key
key_find kfnd str @0 KEY_FIND 0552 ----- find key
key_help khlp str %1 KEY_HELP 0553 ----- help key
key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
key_move kmov str %4 KEY_MOVE 0556 ----- move key
key_next knxt str %5 KEY_NEXT 0557 ----- next key
key_open kopn str %6 KEY_OPEN 0560 ----- open key
key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
key_print kprt str %9 KEY_PRINT 0532 ----- print key
key_redo krdo str %0 KEY_REDO 0563 ----- redo key
key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
key_restart krst str &4 KEY_RESTART 0567 ----- restart key
key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
key_select kslt str *6 KEY_SELECT 0601 ----- select key
key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap).
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
display_clock dclk str DK - - ----- display clock
remove_clock rmclk str RC - - ----- remove clock
create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
goto_window wingo str WG - - ----- go to window #1
hangup hup str HU - - ----- hang-up phone
dial_phone dial str DI - - ----- dial number #1
quick_dial qdial str QD - - ----- dial number #1 without checking
tone tone str TO - - ----- select touch tone dialing
pulse pulse str PU - - ----- select pulse dialing
flash_hook hook str fh - - ----- flash switch hook
fixed_pause pause str PA - - ----- pause for 2-3 seconds
wait_tone wait str WA - - ----- wait for dial-tone
user0 u0 str u0 - - ----- User string #0
user1 u1 str u1 - - ----- User string #1
user2 u2 str u2 - - ----- User string #2
user3 u3 str u3 - - ----- User string #3
user4 u4 str u4 - - ----- User string #4
user5 u5 str u5 - - ----- User string #5
user6 u6 str u6 - - ----- User string #6
user7 u7 str u7 - - ----- User string #7
user8 u8 str u8 - - ----- User string #8
user9 u9 str u9 - - ----- User string #9
#
# SVr4 added these capabilities to support color
#
orig_pair op str op - - ----- Set default pair to its original value
orig_colors oc str oc - - ----- Set all color pairs to the original ones
initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
set_background setb str Sb - - ----- Set background color #1
#
# SVr4 added these capabilities to support printers
#
change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
enter_upward_mode sum str ZP - - ----- Start upward carriage motion
exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
exit_italics_mode ritm str ZR - - ----- End italic mode
exit_leftward_mode rlm str ZS - - ----- End left-motion mode
exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
exit_subscript_mode rsubm str ZV - - ----- End subscript mode
exit_superscript_mode rsupm str ZW - - ----- End superscript mode
exit_upward_mode rum str ZX - - ----- End reverse character motion
micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
order_of_pins porder str Ze - - ----- Match software bits to print-head pins
parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
select_char_set scs str Zj - - ----- Select character set, #1
set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
set_top_margin smgt str Zo - - ----- Set top margin at current line
set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
start_bit_image sbim str Zq - - ----- Start printing bit image graphics
start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
subscript_characters subcs str Zu - - ----- List of subscriptable characters
superscript_characters supcs str Zv - - ----- List of superscriptable characters
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
#%.ad
#%
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw18.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
req_mouse_pos reqmp str RQ - - ----- Request mouse position
get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
device_type devt str dv - - ----- Indicate language/codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
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 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
#
# SVr4 added these capabilities for direct PC-clone support
#
display_pc_char dispc str S1 - - ----- Display PC character #1
enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
#%.ad
#%
#%.in .8i
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
#%Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented.
#%According to the XSI Curses standard, they have no termcap names.
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
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
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
# also tells the man page table generator not to pass through following lines
# This means we can have obsolete capabilities and pseudo-capabilities that are
# recognized for termcap or terminfo compilation, but not output.
#
# %%-STOP-HERE-%%
#
# Don't move this casually! In fact, don't move it at all unless you're
# either doing it to add System V or XPG4 extensions, or have decided you
# don't care about SVr4 binary compatibility.
#
#############################################################################
#
# TERMCAP EXTENSION CAPABILITIES
#
# The capabilities below are either obsolete or extensions on certain systems.
# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
# termcap sources; the rest are listed for completeness, and in case somebody
# cares about them enough to hack in code that will translate them into
# terminfo capabilities.
#
# The first part of the list is from Ross Ridge's `mytinfo' package
# (comp.sources.unix, volume 26); the variable names and terminfo names (as
# well as the termcap codes) match his list.
#
# This group of codes is not marked obsolete in 4.4BSD, but have no direct
# terminfo equivalents. The rs capability is specially translated to terminfo
# r2, and vice versa, if an entry does not already have an r2. Similarly,
# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
# The ug capability is thrown away, but assumed to be whatever sg is if the
# latter is nonzero and we're dumping in termcap format.
#
termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
termcap_reset OTrs str rs - - YB-G- terminal reset string
magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
#
# Obsolete termcap capabilities. Some are used for termcap translation. The
# code uses the 'OT' prefix we put on obsolete capabilities to suppress
# printing them in terminfo source dumps of compiled entries.
#
backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
new_line_delay OTdN num dN - - YB-G- pad needed for LF
linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
#
# GNU termcap library extensions. The GNU termcap file distributed with
# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
# BSD termcap file. The name clash with terminfo MT is resolved by type
# info; MT is converted to km.
#
gnu_has_meta_key OTMT bool MT - - ----E has meta key
# gnu_tab_width OTtw num tw - - ----E tab width in spaces
#
# 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
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
# clash with terminfo names in ways that cannot be resolved by type
# information.
#
# These mytinfo codes are not used in the 4.4BSD curses code. They are
# marked obsolete in the 4.4BSD manual pages.
#
# There is one conflict with terminfo; ma is in both. This conflict is
# resolved by type information.
#
# The `ko' capability is translated by special code. It should contain a
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# 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
# text. All lines above the cursor's current line become locked in place on
# the screen. Then enter data normally. When the screen fills up, any
# further data entered forces the first line of unfrozen line text to scroll
# under the frozen data. Lines scrolled off the screen are inserted into
# memory immediately preceding the first frozen line." (from the HP 700/96
# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
#
# Applications that use terminfo are supposed to behave as though xr is
# always true.
#
linefeed_is_newline OTNL bool NL - - YB--- move down with \n
# even_parity OTEP bool EP - - -B--- terminal requires even parity
# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
backspace_delay OTdB num dB - - YB-G- padding required for ^H
# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
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 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
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top 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.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
#
# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
# check.
#
# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
#
# The mytinfo capabilities end here.
#
# XENIX extensions:
#
# Xenix defined its own set of forms-drawing capabilities:
#
# cap IBM ASCII description ACS ASCII
# --- ----------- -------------------- ------------- ------
# G1 191 \277 M-? single upper right ACS_URCORNER
# G2 218 \332 M-Z single upper left ACS_ULCORNER
# G3 192 \300 M-@ single lower left ACS_LLCORNER
# G4 217 \331 M-Y single lower right ACS_LRCORNER
# G5 187 \273 M-; double upper right
# G6 201 \311 M-I double upper left
# G7 200 \310 M-H double lower left
# G8 188 \274 M-< double lower right
# GC 197 \305 M-E single intersection ACS_PLUS _ _
# GD 194 \302 M-B single down-tick ACS_TTEE |
# GH 196 \304 M-D single horizontal line ACS_HLINE
# GL 180 \264 M-4 single left tick ACS_RTEE -|
# GR 195 \303 M-C single right tick ACS_LTEE |-
# GU 193 \301 M-A single up tick ACS_BTEE _|_
# GV 179 \263 M-3 single vertical line ACS_VLINE
# Gc 206 \316 M-N double intersection
# Gd 203 \313 M-K double down tick
# Gh 205 \315 M-M double horizontal line
# Gl 204 \204 M-L double left tick
# Gr 185 \271 M-9 double right tick
# Gu 202 \312 M-J double up tick
# 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
# 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.
# These terminfo names are invented.
#
acs_ulcorner OTG2 str G2 - - ----- single upper left
acs_llcorner OTG3 str G3 - - ----- single lower left
acs_urcorner OTG1 str G1 - - ----- single upper right
acs_lrcorner OTG4 str G4 - - ----- single lower right
acs_ltee OTGR str GR - - ----- tee pointing right
acs_rtee OTGL str GL - - ----- tee pointing left
acs_btee OTGU str GU - - ----- tee pointing up
acs_ttee OTGD str GD - - ----- tee pointing down
acs_hline OTGH str GH - - ----- single horizontal line
acs_vline OTGV str GV - - ----- single vertical line
acs_plus OTGC str GC - - ----- single intersection
#
#############################################################################
#
# TERMINFO EXTENSION CAPABILITIES
#
# (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
box_chars_1 box1 str bx - - ----K box characters primary set
#############################################################################

461
include/Caps-ncurses Normal file
View File

@@ -0,0 +1,461 @@
##############################################################################
# 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.10 2020/09/29 19:05:19 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 CO num n number of indexed colors overlaying RGB space
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 mintty
userdef Rmol str - remove overline-mode
userdef Smol str - set overline-mode
userdef blink2 str - turn on rapid blinking
userdef norm str - turn off bold and half-bright mode
userdef opaq str - turn off blank mode
userdef setal str n set underline-color
userdef smul2 str - begin double underline mode
#
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
#############################################################################

1073
include/Caps.aix4 Normal file

File diff suppressed because it is too large Load Diff

986
include/Caps.hpux11 Normal file
View File

@@ -0,0 +1,986 @@
##############################################################################
# Copyright 2019-2020,2021 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"), #
# 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 Dickey
#
# $Id: Caps.hpux11,v 1.18 2021/10/08 07:55:48 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
# 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.
#
# This file has three major sections; a standard-capabilities table, two
# extension-capability tables, and a section of aliases declarations.
# The first two have the same format, as follows:
#
# FILE FORMAT
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
# Column 7: Lead with `Y' if capability should be emitted in termcap
# translations, `-' otherwise
# Column 8: capability description
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
# C = used by the 4.4BSD curses library
# G = mentioned in the documentation for GNU termcap
# E = used by GNU Emacs
# K = remove this terminfo capability when translating to standard format
# The important codes are C and E. A cap with C or E should be preserved in
# translation if possible. The problem is that preserving all such caps may
# lead to some termcap translations being too long. The termcap maintainer
# has a bit of a juggling act to do...potential problem cases are marked with
# an asterisk (*).
#
# The aliases section has the following format:
#
# Column 1: either `capalias' or `infoalias'
# Column 2: name to be aliased
# Column 3: what name it should translate to. The name IGNORE means it
# should be discarded with a warning message.
# Column 4: name of the extension set (used for compiler warning messages)
# Column 5: capability description (usually an associated terminfo variable)
#
# HANDLING TERMCAP AND TERMINFO EXTENSIONS
#
# There are basically five different ways to handle termcap and terminfo
# extensions:
#
# 1. Don't list the capname here, or list it but comment it out (the latter
# is preferable; someone might want to handle it in the future). If you do
# this, the capability will be treated as unknown and raise a warning from
# the compiler.
#
# 2. Alias it. This is appropriate if the capability has the same meaning
# as an already-supported one. The compiler will handle aliasing, emitting
# an appropriate informational message whenever an alias fires.
#
# 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 is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
# get a warning message about it).
#
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
# in this class. Nothing will ever use them again.
#
# More usually, you want the compiler to try to deduce something from the
# capability value that it can use to translate it into your output format.
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# 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
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
# It might look tempting to leave those long init strings out of translations.
# We can't do it (yet); 4.4BSD tput and tset use them.
#
# We retain the sgr capability in translation in spite of the fact that neither
# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
# hard to understand without it, and (b) the entries in which it is long tend
# to be older types that don't use up a lot of string space on function keys.
# The tic(1) translation code will complain and elide it if it makes a critical
# difference (there is special code in tic to recognize this situation).
#
# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
# optimizer in BSD curses didn't use them. This omission seems to be the
# single most effective one, it shortened the resolved length of all thirteen
# problem entries in the 9.9.0 version of the terminfo master below critical.
#
# 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
# 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.
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
eat_newline_glitch xenl bool xn - - YBCGE newline ignored after 80 cols (concept)
erase_overstrike eo bool eo - - YBCG- can erase overstrikes with a blank
generic_type gn bool gn - - YB-G- generic line type
hard_copy hc bool hc - - YBCG- hardcopy terminal
has_meta_key km bool km - - YB-GE Has a meta key (i.e., sets 8th-bit)
has_status_line hs bool hs - - YB-G- has extra status line
insert_null_glitch in bool in - - YBCGE insert mode distinguishes nulls
memory_above da bool da - - YBCG- display may be retained above the screen
memory_below db bool db - - YB-GE display may be retained below the screen
move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
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)
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)
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
hard_cursor chts bool HC - - ----- cursor is hard to see
non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
no_pad_char npc bool NP - - ----- pad character does not exist
non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
can_change ccc bool cc - - ----- terminal can re-define existing colors
back_color_erase bce bool ut - - ----- screen erased with background color
hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
width_status_line wsl num ws - - YB-G- number of columns in status line
# end numbers for HPUX 9, 10 (non-color curses)
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 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
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
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
output_res_line orl num Yj - - ----- vertical resolution in units per line
output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
print_rate cps num Ym - - ----- print rate in characters per second
wide_char_size widcs num Yn - - ----- character step size when in double wide mode
buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
clr_eol el str ce - - YBCGE clear to end of line (P)
clr_eos ed str cd - - YBCGE clear to end of screen (P*)
column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
cursor_address cup str cm - - YBCGE move to row #1 columns #2
cursor_down cud1 str do - - YBCGE down one line
cursor_home home str ho - - YBCGE home cursor (if no cup)
cursor_invisible civis str vi - - YB-G- make cursor invisible
cursor_left cub1 str le - - YBCGE move left one space
cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
cursor_up cuu1 str up - - YBCGE up one line
cursor_visible cvvis str vs - - YBCGE make cursor very visible
delete_character dch1 str dc - - YBCGE delete character (P*)
delete_line dl1 str dl - - YBCGE delete line (P*)
dis_status_line dsl str ds - - YB-G- disable status line
down_half_line hd str hd - - YB-G- half a line down
enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
enter_blink_mode blink str mb - - YB-G- turn on blinking
enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
enter_delete_mode smdc str dm - - YBCGE enter delete mode
enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
enter_insert_mode smir str im - - YBCGE enter insert mode
enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
enter_protected_mode prot str mp - - -B-G-* turn on protected mode
enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
enter_standout_mode smso str so - - YBCGE begin standout mode
enter_underline_mode smul str us - - YBCGE begin underline mode
erase_chars ech str ec - - YB-G- erase #1 characters (P)
exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
exit_delete_mode rmdc str ed - - YBCGE end delete mode
exit_insert_mode rmir str ei - - YBCGE exit insert mode
exit_standout_mode rmso str se - - YBCGE exit standout mode
exit_underline_mode rmul str ue - - YBCGE exit underline mode
flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
from_status_line fsl str fs - - YB-G- return from status line
init_1string is1 str i1 - - YB-G- initialization string
init_2string is2 str is - - YB-G- initialization string
init_3string is3 str i3 - - YB-G- initialization string
init_file if str if - - YB-G- name of initialization file
insert_character ich1 str ic - - YBCGE insert character (P)
insert_line il1 str al - - YBCGE insert line (P*)
insert_padding ip str ip - - YBCGE insert padding after inserted character
key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
key_home khome str kh KEY_HOME 0406 YBCGE home key
key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
lab_f10 lf10 str la - - ----- label on function key f10 if not f10
lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
meta_off rmm str mo - - YB-G-* turn off meta mode
meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
pad_char pad str pc - - YBCGE padding char (instead of null)
parm_dch dch str DC - - YB-GE delete #1 characters (P*)
parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
parm_ich ich str IC - - YB-GE insert #1 characters (P*)
parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
print_screen mc0 str ps - - -B-G-* print contents of screen
prtr_off mc4 str pf - - -B-G-* turn off printer
prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
save_cursor sc str sc - - YBCG- save current cursor position (P)
scroll_forward ind str sf - - YBCGE scroll text up (P)
scroll_reverse ri str sr - - YBCGE scroll text down (P)
set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
set_tab hts str st - - YB-G- set a tab in every row, current columns
set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
to_status_line tsl str ts - - YB-G- move to status line, column #1
underline_char uc str uc - - YBCG- underline char and move past it
up_half_line hu str hu - - YB-G- half a line up
init_prog iprog str iP - - -B--- path name of program for initialization
key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
#
# SVr1 capabilities stop here. IBM's version of terminfo is the same as
# SVr4 up to this point, but has a different set afterwards.
#
# HPUX defines these if __HP_CURSES_COMPAT is defined:
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 KEY_F(11) - ----E F11 function key
key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
# end of strings in HPUX 9
char_padding rmp str rP - - ----- like ip but when in insert mode
acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
enter_am_mode smam str SA - - ----- turn on automatic margins
exit_am_mode rmam str RA - - ----- turn off automatic margins
xon_character xonc str XN - - ----- XON character
xoff_character xoffc str XF - - ----- XOFF character
ena_acs enacs str eA - - ----- enable alternate char set
key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
key_close kclo str @3 KEY_CLOSE 0544 ----- close key
key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
key_create kcrt str @6 KEY_CREATE 0547 ----- create key
key_end kend str @7 KEY_END 0550 ----- end key
key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
key_exit kext str @9 KEY_EXIT 0551 ----- exit key
key_find kfnd str @0 KEY_FIND 0552 ----- find key
key_help khlp str %1 KEY_HELP 0553 ----- help key
key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
key_move kmov str %4 KEY_MOVE 0556 ----- move key
key_next knxt str %5 KEY_NEXT 0557 ----- next key
key_open kopn str %6 KEY_OPEN 0560 ----- open key
key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
key_print kprt str %9 KEY_PRINT 0532 ----- print key
key_redo krdo str %0 KEY_REDO 0563 ----- redo key
key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
key_restart krst str &4 KEY_RESTART 0567 ----- restart key
key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
key_select kslt str *6 KEY_SELECT 0601 ----- select key
key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap).
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
display_clock dclk str DK - - ----- display clock
remove_clock rmclk str RC - - ----- remove clock
create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
goto_window wingo str WG - - ----- go to window #1
hangup hup str HU - - ----- hang-up phone
dial_phone dial str DI - - ----- dial number #1
quick_dial qdial str QD - - ----- dial number #1 without checking
tone tone str TO - - ----- select touch tone dialing
pulse pulse str PU - - ----- select pulse dialing
flash_hook hook str fh - - ----- flash switch hook
fixed_pause pause str PA - - ----- pause for 2-3 seconds
wait_tone wait str WA - - ----- wait for dial-tone
user0 u0 str u0 - - ----- User string #0
user1 u1 str u1 - - ----- User string #1
user2 u2 str u2 - - ----- User string #2
user3 u3 str u3 - - ----- User string #3
user4 u4 str u4 - - ----- User string #4
user5 u5 str u5 - - ----- User string #5
user6 u6 str u6 - - ----- User string #6
user7 u7 str u7 - - ----- User string #7
user8 u8 str u8 - - ----- User string #8
user9 u9 str u9 - - ----- User string #9
#
# SVr4 added these capabilities to support color
#
orig_pair op str op - - ----- Set default pair to its original value
orig_colors oc str oc - - ----- Set all color pairs to the original ones
initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
set_background setb str Sb - - ----- Set background color #1
#
# SVr4 added these capabilities to support printers
#
change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
enter_upward_mode sum str ZP - - ----- Start upward carriage motion
exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
exit_italics_mode ritm str ZR - - ----- End italic mode
exit_leftward_mode rlm str ZS - - ----- End left-motion mode
exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
exit_subscript_mode rsubm str ZV - - ----- End subscript mode
exit_superscript_mode rsupm str ZW - - ----- End superscript mode
exit_upward_mode rum str ZX - - ----- End reverse character motion
micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
order_of_pins porder str Ze - - ----- Match software bits to print-head pins
parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
select_char_set scs str Zj - - ----- Select character set, #1
set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
set_top_margin smgt str Zo - - ----- Set top margin at current line
set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
start_bit_image sbim str Zq - - ----- Start printing bit image graphics
start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
subscript_characters subcs str Zu - - ----- List of subscriptable characters
superscript_characters supcs str Zv - - ----- List of superscriptable characters
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
#%.ad
#%
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw18.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
req_mouse_pos reqmp str RQ - - ----- Request mouse position
get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
device_type devt str dv - - ----- Indicate language/codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
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 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
#
# SVr4 added these capabilities for direct PC-clone support
#
display_pc_char dispc str S1 - - ----- Display PC character #1
enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
#%.ad
#%
#%.in .8i
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
#%Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented.
#%According to the XSI Curses standard, they have no termcap names.
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%AIX and Solaris do not provide termcap names for these; HPUX does.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
enter_horizontal_hl_mode ehhlm str Q1 - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Q2 - - ----- Enter left highlight mode
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
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
# also tells the man page table generator not to pass through following lines
# This means we can have obsolete capabilities and pseudo-capabilities that are
# recognized for termcap or terminfo compilation, but not output.
#
# %%-STOP-HERE-%%
#
# Don't move this casually! In fact, don't move it at all unless you're
# either doing it to add System V or XPG4 extensions, or have decided you
# don't care about SVr4 binary compatibility.
#
#############################################################################
#
# TERMCAP EXTENSION CAPABILITIES
#
# The capabilities below are either obsolete or extensions on certain systems.
# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
# termcap sources; the rest are listed for completeness, and in case somebody
# cares about them enough to hack in code that will translate them into
# terminfo capabilities.
#
# The first part of the list is from Ross Ridge's `mytinfo' package
# (comp.sources.unix, volume 26); the variable names and terminfo names (as
# well as the termcap codes) match his list.
#
# This group of codes is not marked obsolete in 4.4BSD, but have no direct
# terminfo equivalents. The rs capability is specially translated to terminfo
# r2, and vice versa, if an entry does not already have an r2. Similarly,
# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
# The ug capability is thrown away, but assumed to be whatever sg is if the
# latter is nonzero and we're dumping in termcap format.
#
termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
termcap_reset OTrs str rs - - YB-G- terminal reset string
magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
#
# Obsolete termcap capabilities. Some are used for termcap translation. The
# code uses the 'OT' prefix we put on obsolete capabilities to suppress
# printing them in terminfo source dumps of compiled entries.
#
backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
new_line_delay OTdN num dN - - YB-G- pad needed for LF
linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
#
# GNU termcap library extensions. The GNU termcap file distributed with
# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
# BSD termcap file. The name clash with terminfo MT is resolved by type
# info; MT is converted to km.
#
gnu_has_meta_key OTMT bool MT - - ----E has meta key
# gnu_tab_width OTtw num tw - - ----E tab width in spaces
#
# 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
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
# clash with terminfo names in ways that cannot be resolved by type
# information.
#
# These mytinfo codes are not used in the 4.4BSD curses code. They are
# marked obsolete in the 4.4BSD manual pages.
#
# There is one conflict with terminfo; ma is in both. This conflict is
# resolved by type information.
#
# The `ko' capability is translated by special code. It should contain a
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# 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
# text. All lines above the cursor's current line become locked in place on
# the screen. Then enter data normally. When the screen fills up, any
# further data entered forces the first line of unfrozen line text to scroll
# under the frozen data. Lines scrolled off the screen are inserted into
# memory immediately preceding the first frozen line." (from the HP 700/96
# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
#
# Applications that use terminfo are supposed to behave as though xr is
# always true.
#
linefeed_is_newline OTNL bool NL - - YB--- move down with \n
# even_parity OTEP bool EP - - -B--- terminal requires even parity
# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
backspace_delay OTdB num dB - - YB-G- padding required for ^H
# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
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 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
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top 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.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
#
# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
# check.
#
# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
#
# The mytinfo capabilities end here.
#
# XENIX extensions:
#
# Xenix defined its own set of forms-drawing capabilities:
#
# cap IBM ASCII description ACS ASCII
# --- ----------- -------------------- ------------- ------
# G1 191 \277 M-? single upper right ACS_URCORNER
# G2 218 \332 M-Z single upper left ACS_ULCORNER
# G3 192 \300 M-@ single lower left ACS_LLCORNER
# G4 217 \331 M-Y single lower right ACS_LRCORNER
# G5 187 \273 M-; double upper right
# G6 201 \311 M-I double upper left
# G7 200 \310 M-H double lower left
# G8 188 \274 M-< double lower right
# GC 197 \305 M-E single intersection ACS_PLUS _ _
# GD 194 \302 M-B single down-tick ACS_TTEE |
# GH 196 \304 M-D single horizontal line ACS_HLINE
# GL 180 \264 M-4 single left tick ACS_RTEE -|
# GR 195 \303 M-C single right tick ACS_LTEE |-
# GU 193 \301 M-A single up tick ACS_BTEE _|_
# GV 179 \263 M-3 single vertical line ACS_VLINE
# Gc 206 \316 M-N double intersection
# Gd 203 \313 M-K double down tick
# Gh 205 \315 M-M double horizontal line
# Gl 204 \204 M-L double left tick
# Gr 185 \271 M-9 double right tick
# Gu 202 \312 M-J double up tick
# 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
# 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.
# These terminfo names are invented.
#
acs_ulcorner OTG2 str G2 - - ----- single upper left
acs_llcorner OTG3 str G3 - - ----- single lower left
acs_urcorner OTG1 str G1 - - ----- single upper right
acs_lrcorner OTG4 str G4 - - ----- single lower right
acs_ltee OTGR str GR - - ----- tee pointing right
acs_rtee OTGL str GL - - ----- tee pointing left
acs_btee OTGU str GU - - ----- tee pointing up
acs_ttee OTGD str GD - - ----- tee pointing down
acs_hline OTGH str GH - - ----- single horizontal line
acs_vline OTGV str GV - - ----- single vertical line
acs_plus OTGC str GC - - ----- single intersection
#
#############################################################################
#
# TERMINFO EXTENSION CAPABILITIES
#
# (see Caps-ncurses for the complete set of comments)
#
box_chars_1 box1 str bx - - ----K box characters primary set
#
#############################################################################

1062
include/Caps.keys Normal file

File diff suppressed because it is too large Load Diff

979
include/Caps.osf1r5 Normal file
View File

@@ -0,0 +1,979 @@
##############################################################################
# Copyright 2019-2020,2021 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"), #
# 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 Dickey
#
# $Id: Caps.osf1r5,v 1.16 2021/10/08 07:55:48 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
# 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.
#
# This file has three major sections; a standard-capabilities table, two
# extension-capability tables, and a section of aliases declarations.
# The first two have the same format, as follows:
#
# FILE FORMAT
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
# Column 7: Lead with `Y' if capability should be emitted in termcap
# translations, `-' otherwise
# Column 8: capability description
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
# C = used by the 4.4BSD curses library
# G = mentioned in the documentation for GNU termcap
# E = used by GNU Emacs
# K = remove this terminfo capability when translating to standard format
# The important codes are C and E. A cap with C or E should be preserved in
# translation if possible. The problem is that preserving all such caps may
# lead to some termcap translations being too long. The termcap maintainer
# has a bit of a juggling act to do...potential problem cases are marked with
# an asterisk (*).
#
# The aliases section has the following format:
#
# Column 1: either `capalias' or `infoalias'
# Column 2: name to be aliased
# Column 3: what name it should translate to. The name IGNORE means it
# should be discarded with a warning message.
# Column 4: name of the extension set (used for compiler warning messages)
# Column 5: capability description (usually an associated terminfo variable)
#
# HANDLING TERMCAP AND TERMINFO EXTENSIONS
#
# There are basically five different ways to handle termcap and terminfo
# extensions:
#
# 1. Don't list the capname here, or list it but comment it out (the latter
# is preferable; someone might want to handle it in the future). If you do
# this, the capability will be treated as unknown and raise a warning from
# the compiler.
#
# 2. Alias it. This is appropriate if the capability has the same meaning
# as an already-supported one. The compiler will handle aliasing, emitting
# an appropriate informational message whenever an alias fires.
#
# 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 is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
# get a warning message about it).
#
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
# in this class. Nothing will ever use them again.
#
# More usually, you want the compiler to try to deduce something from the
# capability value that it can use to translate it into your output format.
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# 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
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
# It might look tempting to leave those long init strings out of translations.
# We can't do it (yet); 4.4BSD tput and tset use them.
#
# We retain the sgr capability in translation in spite of the fact that neither
# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
# hard to understand without it, and (b) the entries in which it is long tend
# to be older types that don't use up a lot of string space on function keys.
# The tic(1) translation code will complain and elide it if it makes a critical
# difference (there is special code in tic to recognize this situation).
#
# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
# optimizer in BSD curses didn't use them. This omission seems to be the
# single most effective one, it shortened the resolved length of all thirteen
# problem entries in the 9.9.0 version of the terminfo master below critical.
#
# 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
# 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.
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
eat_newline_glitch xenl bool xn - - YBCGE newline ignored after 80 cols (concept)
erase_overstrike eo bool eo - - YBCG- can erase overstrikes with a blank
generic_type gn bool gn - - YB-G- generic line type
hard_copy hc bool hc - - YBCG- hardcopy terminal
has_meta_key km bool km - - YB-GE Has a meta key (i.e., sets 8th-bit)
has_status_line hs bool hs - - YB-G- has extra status line
insert_null_glitch in bool in - - YBCGE insert mode distinguishes nulls
memory_above da bool da - - YBCG- display may be retained above the screen
memory_below db bool db - - YB-GE display may be retained below the screen
move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
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)
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
can_change ccc bool cc - - ----- terminal can re-define existing colors
col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
hard_cursor chts bool HC - - ----- cursor is hard to see
has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
no_pad_char npc bool NP - - ----- pad character does not exist
prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
width_status_line wsl num ws - - YB-G- number of columns in status line
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
buttons btns num BT - - ----- number of buttons on mouse
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
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
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 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
number_of_pins npins num Yh - - ----- numbers of pins in print-head
num_labels nlab num Nl - - ----- number of labels on screen
output_res_char orc num Yi - - ----- horizontal resolution in units per line
output_res_line orl num Yj - - ----- vertical resolution in units per line
output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
print_rate cps num Ym - - ----- print rate in characters per second
wide_char_size widcs num Yn - - ----- character step size when in double wide mode
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
clr_eol el str ce - - YBCGE clear to end of line (P)
clr_eos ed str cd - - YBCGE clear to end of screen (P*)
column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
cursor_address cup str cm - - YBCGE move to row #1 columns #2
cursor_down cud1 str do - - YBCGE down one line
cursor_home home str ho - - YBCGE home cursor (if no cup)
cursor_invisible civis str vi - - YB-G- make cursor invisible
cursor_left cub1 str le - - YBCGE move left one space
cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
cursor_up cuu1 str up - - YBCGE up one line
cursor_visible cvvis str vs - - YBCGE make cursor very visible
delete_character dch1 str dc - - YBCGE delete character (P*)
delete_line dl1 str dl - - YBCGE delete line (P*)
dis_status_line dsl str ds - - YB-G- disable status line
down_half_line hd str hd - - YB-G- half a line down
enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
enter_blink_mode blink str mb - - YB-G- turn on blinking
enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
enter_delete_mode smdc str dm - - YBCGE enter delete mode
enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
enter_insert_mode smir str im - - YBCGE enter insert mode
enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
enter_protected_mode prot str mp - - -B-G-* turn on protected mode
enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
enter_standout_mode smso str so - - YBCGE begin standout mode
enter_underline_mode smul str us - - YBCGE begin underline mode
erase_chars ech str ec - - YB-G- erase #1 characters (P)
exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
exit_delete_mode rmdc str ed - - YBCGE end delete mode
exit_insert_mode rmir str ei - - YBCGE exit insert mode
exit_standout_mode rmso str se - - YBCGE exit standout mode
exit_underline_mode rmul str ue - - YBCGE exit underline mode
flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
from_status_line fsl str fs - - YB-G- return from status line
init_1string is1 str i1 - - YB-G- initialization string
init_2string is2 str is - - YB-G- initialization string
init_3string is3 str i3 - - YB-G- initialization string
init_file if str if - - YB-G- name of initialization file
insert_character ich1 str ic - - YBCGE insert character (P)
insert_line il1 str al - - YBCGE insert line (P*)
insert_padding ip str ip - - YBCGE insert padding after inserted character
key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
key_home khome str kh KEY_HOME 0406 YBCGE home key
key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
lab_f10 lf10 str la - - ----- label on function key f10 if not f10
lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
meta_off rmm str mo - - YB-G-* turn off meta mode
meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
pad_char pad str pc - - YBCGE padding char (instead of null)
parm_dch dch str DC - - YB-GE delete #1 characters (P*)
parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
parm_ich ich str IC - - YB-GE insert #1 characters (P*)
parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
print_screen mc0 str ps - - -B-G-* print contents of screen
prtr_off mc4 str pf - - -B-G-* turn off printer
prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
save_cursor sc str sc - - YBCG- save current cursor position (P)
scroll_forward ind str sf - - YBCGE scroll text up (P)
scroll_reverse ri str sr - - YBCGE scroll text down (P)
set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
set_tab hts str st - - YB-G- set a tab in every row, current columns
set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
to_status_line tsl str ts - - YB-G- move to status line, column #1
underline_char uc str uc - - YBCG- underline char and move past it
up_half_line hu str hu - - YB-G- half a line up
init_prog iprog str iP - - -B--- path name of program for initialization
key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
#
# SVr1 capabilities stop here. IBM's version of terminfo is the same as
# SVr4 up to this point, but has a different set afterwards.
#
# OSF1 differences start here, based on IBM version:
#
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 kc KEY_COMMAND 0545 ----- command key
key_command_pane kcpn str kW - - ----K command-pane key
key_end kend str @7 KEY_END 0550 ----- end key
key_help khlp str %1 KEY_HELP 0553 ----- 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 kslt str *6 KEY_SELECT 0601 ----- 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 are described in
# the Tru64 manual pages.
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_out7 kmpt7 str KS - - ----K special mapped key 7 output
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_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
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
#
key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
key_action kact str kJ KEY_ACTION 0541 ----K sent by action key
acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
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
change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
char_padding rmp str rP - - ----- like ip but when in insert mode
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
clear_margins mgc str MC - - ----- clear right and left soft margins
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 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
display_clock dclk str DK - - ----- display clock
display_pc_char dispc str S1 - - ----- Display PC character #1
ena_acs enacs str eA - - ----- enable alternate char set
end_bit_image_region endbi str Yy - - ----- End a bit-image region
enter_am_mode smam str SA - - ----- turn on automatic margins
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
enter_upward_mode sum str ZP - - ----- Start upward carriage motion
enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
exit_am_mode rmam str RA - - ----- turn off automatic margins
exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
exit_italics_mode ritm str ZR - - ----- End italic mode
exit_leftward_mode rlm str ZS - - ----- End left-motion mode
exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
exit_subscript_mode rsubm str ZV - - ----- End subscript mode
exit_superscript_mode rsupm str ZW - - ----- End superscript mode
exit_upward_mode rum str ZX - - ----- End reverse character motion
exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
fixed_pause pause str PA - - ----- pause for 2-3 seconds
flash_hook hook str fh - - ----- flash switch hook
get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
goto_window wingo str WG - - ----- go to window #1
hangup hup str HU - - ----- hang-up phone
initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
key_btab kcbt str kB KEY_BTAB 0632 ----- back-tab key
key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
key_close kclo str @3 KEY_CLOSE 0544 ----- close key
key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
key_create kcrt str @6 KEY_CREATE 0547 ----- create key
key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
key_exit kext str @9 KEY_EXIT 0551 ----- exit key
key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
key_find kfnd str @0 KEY_FIND 0552 ----- find key
key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
key_move kmov str %4 KEY_MOVE 0556 ----- move key
key_next knxt str %5 KEY_NEXT 0557 ----- next key
key_open kopn str %6 KEY_OPEN 0560 ----- open key
key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
key_print kprt str %9 KEY_PRINT 0532 ----- print key
key_redo krdo str %0 KEY_REDO 0563 ----- redo key
key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
key_restart krst str &4 KEY_RESTART 0567 ----- restart key
key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
label_format fln str Lf - - ----- label format
label_off rmln str LF - - ----- turn off soft labels
label_on smln str LO - - ----- turn on soft labels
micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
mouse_info minfo str Mi - - ----- Mouse status information
order_of_pins porder str Ze - - ----- Match software bits to print-head pins
orig_colors oc str oc - - ----- Set all color pairs to the original ones
orig_pair op str op - - ----- Set default pair to its original value
parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
pc_term_options pctrm str S6 - - ----- PC terminal options
pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
plab_norm pln str pn - - ----- program label #1 to show string #2
pulse pulse str PU - - ----- select pulse dialing
quick_dial qdial str QD - - ----- dial number #1 without checking
req_for_input rfi str RF - - ----- send next input char (for ptys)
req_mouse_pos reqmp str RQ - - ----- Request mouse position
remove_clock rmclk str RC - - ----- remove clock
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
select_char_set scs str Zj - - ----- Select character set, #1
set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
set_background setb str Sb - - ----- Set background color #1
set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap).
set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
set_page_length slines str YZ - - ----- Set page length to #1 lines
set_right_margin smgr str MR - - ----- set right soft margin at current column
set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
set_top_margin smgt str Zo - - ----- Set top margin at current line
set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
start_bit_image sbim str Zq - - ----- Start printing bit image graphics
start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
subscript_characters subcs str Zu - - ----- List of subscriptable characters
superscript_characters supcs str Zv - - ----- List of superscriptable characters
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
tone tone str TO - - ----- select touch tone dialing
user0 u0 str u0 - - ----- User string #0
user1 u1 str u1 - - ----- User string #1
user2 u2 str u2 - - ----- User string #2
user3 u3 str u3 - - ----- User string #3
user4 u4 str u4 - - ----- User string #4
user5 u5 str u5 - - ----- User string #5
user6 u6 str u6 - - ----- User string #6
user7 u7 str u7 - - ----- User string #7
user8 u8 str u8 - - ----- User string #8
user9 u9 str u9 - - ----- User string #9
wait_tone wait str WA - - ----- wait for dial-tone
xoff_character xoffc str XF - - ----- XOFF character
xon_character xonc str XN - - ----- XON character
zero_motion zerom str Zx - - ----- No motion for subsequent character
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
#
#
#
# %%-STOP-HERE-%%
#
# Don't move this casually! In fact, don't move it at all unless you're
# either doing it to add System V or XPG4 extensions, or have decided you
# don't care about SVr4 binary compatibility.
#
#############################################################################
#
# TERMCAP EXTENSION CAPABILITIES
#
# The capabilities below are either obsolete or extensions on certain systems.
# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
# termcap sources; the rest are listed for completeness, and in case somebody
# cares about them enough to hack in code that will translate them into
# terminfo capabilities.
#
# The first part of the list is from Ross Ridge's `mytinfo' package
# (comp.sources.unix, volume 26); the variable names and terminfo names (as
# well as the termcap codes) match his list.
#
# This group of codes is not marked obsolete in 4.4BSD, but have no direct
# terminfo equivalents. The rs capability is specially translated to terminfo
# r2, and vice versa, if an entry does not already have an r2. Similarly,
# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
# The ug capability is thrown away, but assumed to be whatever sg is if the
# latter is nonzero and we're dumping in termcap format.
#
termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
termcap_reset OTrs str rs - - YB-G- terminal reset string
magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
#
# Obsolete termcap capabilities. Some are used for termcap translation. The
# code uses the 'OT' prefix we put on obsolete capabilities to suppress
# printing them in terminfo source dumps of compiled entries.
#
backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
new_line_delay OTdN num dN - - YB-G- pad needed for LF
linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
#
# GNU termcap library extensions. The GNU termcap file distributed with
# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
# BSD termcap file. The name clash with terminfo MT is resolved by type
# info; MT is converted to km.
#
gnu_has_meta_key OTMT bool MT - - ----E has meta key
# gnu_tab_width OTtw num tw - - ----E tab width in spaces
#
# 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
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
# clash with terminfo names in ways that cannot be resolved by type
# information.
#
# These mytinfo codes are not used in the 4.4BSD curses code. They are
# marked obsolete in the 4.4BSD manual pages.
#
# There is one conflict with terminfo; ma is in both. This conflict is
# resolved by type information.
#
# The `ko' capability is translated by special code. It should contain a
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# 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
# text. All lines above the cursor's current line become locked in place on
# the screen. Then enter data normally. When the screen fills up, any
# further data entered forces the first line of unfrozen line text to scroll
# under the frozen data. Lines scrolled off the screen are inserted into
# memory immediately preceding the first frozen line." (from the HP 700/96
# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
#
# Applications that use terminfo are supposed to behave as though xr is
# always true.
#
linefeed_is_newline OTNL bool NL - - YB--- move down with \n
# even_parity OTEP bool EP - - -B--- terminal requires even parity
# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
backspace_delay OTdB num dB - - YB-G- padding required for ^H
# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
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 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
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top 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.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
#
# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
# check.
#
# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
#
# The mytinfo capabilities end here.
#
# XENIX extensions:
#
# Xenix defined its own set of forms-drawing capabilities:
#
# cap IBM ASCII description ACS ASCII
# --- ----------- -------------------- ------------- ------
# G1 191 \277 M-? single upper right ACS_URCORNER
# G2 218 \332 M-Z single upper left ACS_ULCORNER
# G3 192 \300 M-@ single lower left ACS_LLCORNER
# G4 217 \331 M-Y single lower right ACS_LRCORNER
# G5 187 \273 M-; double upper right
# G6 201 \311 M-I double upper left
# G7 200 \310 M-H double lower left
# G8 188 \274 M-< double lower right
# GC 197 \305 M-E single intersection ACS_PLUS _ _
# GD 194 \302 M-B single down-tick ACS_TTEE |
# GH 196 \304 M-D single horizontal line ACS_HLINE
# GL 180 \264 M-4 single left tick ACS_RTEE -|
# GR 195 \303 M-C single right tick ACS_LTEE |-
# GU 193 \301 M-A single up tick ACS_BTEE _|_
# GV 179 \263 M-3 single vertical line ACS_VLINE
# Gc 206 \316 M-N double intersection
# Gd 203 \313 M-K double down tick
# Gh 205 \315 M-M double horizontal line
# Gl 204 \204 M-L double left tick
# Gr 185 \271 M-9 double right tick
# Gu 202 \312 M-J double up tick
# 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
# 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.
# These terminfo names are invented.
#
acs_ulcorner OTG2 str G2 - - ----- single upper left
acs_llcorner OTG3 str G3 - - ----- single lower left
acs_urcorner OTG1 str G1 - - ----- single upper right
acs_lrcorner OTG4 str G4 - - ----- single lower right
acs_ltee OTGR str GR - - ----- tee pointing right
acs_rtee OTGL str GL - - ----- tee pointing left
acs_btee OTGU str GU - - ----- tee pointing up
acs_ttee OTGD str GD - - ----- tee pointing down
acs_hline OTGH str GH - - ----- single horizontal line
acs_vline OTGV str GV - - ----- single vertical line
acs_plus OTGC str GC - - ----- single intersection
#
#############################################################################
#
# TERMINFO EXTENSION CAPABILITIES
#
# (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
#
#############################################################################

796
include/Caps.uwin Normal file
View File

@@ -0,0 +1,796 @@
##############################################################################
# Copyright 2019-2020,2021 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"), #
# 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 Dickey
#
# $Id: Caps.uwin,v 1.15 2021/10/08 07:55:48 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
# 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.
#
# This file has three major sections; a standard-capabilities table, two
# extension-capability tables, and a section of aliases declarations.
# The first two have the same format, as follows:
#
# FILE FORMAT
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
# Column 7: Lead with `Y' if capability should be emitted in termcap
# translations, `-' otherwise
# Column 8: capability description
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
# C = used by the 4.4BSD curses library
# G = mentioned in the documentation for GNU termcap
# E = used by GNU Emacs
# K = remove this terminfo capability when translating to standard format
# The important codes are C and E. A cap with C or E should be preserved in
# translation if possible. The problem is that preserving all such caps may
# lead to some termcap translations being too long. The termcap maintainer
# has a bit of a juggling act to do...potential problem cases are marked with
# an asterisk (*).
#
# The aliases section has the following format:
#
# Column 1: either `capalias' or `infoalias'
# Column 2: name to be aliased
# Column 3: what name it should translate to. The name IGNORE means it
# should be discarded with a warning message.
# Column 4: name of the extension set (used for compiler warning messages)
# Column 5: capability description (usually an associated terminfo variable)
#
# HANDLING TERMCAP AND TERMINFO EXTENSIONS
#
# There are basically five different ways to handle termcap and terminfo
# extensions:
#
# 1. Don't list the capname here, or list it but comment it out (the latter
# is preferable; someone might want to handle it in the future). If you do
# this, the capability will be treated as unknown and raise a warning from
# the compiler.
#
# 2. Alias it. This is appropriate if the capability has the same meaning
# as an already-supported one. The compiler will handle aliasing, emitting
# an appropriate informational message whenever an alias fires.
#
# 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 is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
# get a warning message about it).
#
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
# in this class. Nothing will ever use them again.
#
# More usually, you want the compiler to try to deduce something from the
# capability value that it can use to translate it into your output format.
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# 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
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
# It might look tempting to leave those long init strings out of translations.
# We can't do it (yet); 4.4BSD tput and tset use them.
#
# We retain the sgr capability in translation in spite of the fact that neither
# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
# hard to understand without it, and (b) the entries in which it is long tend
# to be older types that don't use up a lot of string space on function keys.
# The tic(1) translation code will complain and elide it if it makes a critical
# difference (there is special code in tic to recognize this situation).
#
# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
# optimizer in BSD curses didn't use them. This omission seems to be the
# single most effective one, it shortened the resolved length of all thirteen
# problem entries in the 9.9.0 version of the terminfo master below critical.
#
# 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
# 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.
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
eat_newline_glitch xenl bool xn - - YBCGE newline ignored after 80 cols (concept)
erase_overstrike eo bool eo - - YBCG- can erase overstrikes with a blank
generic_type gn bool gn - - YB-G- generic line type
hard_copy hc bool hc - - YBCG- hardcopy terminal
has_meta_key km bool km - - YB-GE Has a meta key (i.e., sets 8th-bit)
has_status_line hs bool hs - - YB-G- has extra status line
insert_null_glitch in bool in - - YBCGE insert mode distinguishes nulls
memory_above da bool da - - YBCG- display may be retained above the screen
memory_below db bool db - - YB-GE display may be retained below the screen
move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
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)
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
prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
hard_cursor chts bool HC - - ----- cursor is hard to see
non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
no_pad_char npc bool NP - - ----- pad character does not exist
non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
back_color_erase bce bool ut - - ----- screen erased with background color
can_change ccc bool cc - - ----- terminal can re-define existing colors
hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
width_status_line wsl num ws - - YB-G- number of columns in status line
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
buttons btns num BT - - ----- number of buttons on mouse
#max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
#maximum_windows wnum num MW - - ----- maximum number of defineable 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
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
clr_eol el str ce - - YBCGE clear to end of line (P)
clr_eos ed str cd - - YBCGE clear to end of screen (P*)
column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
cursor_address cup str cm - - YBCGE move to row #1 columns #2
cursor_down cud1 str do - - YBCGE down one line
cursor_home home str ho - - YBCGE home cursor (if no cup)
cursor_invisible civis str vi - - YB-G- make cursor invisible
cursor_left cub1 str le - - YBCGE move left one space
cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
cursor_up cuu1 str up - - YBCGE up one line
cursor_visible cvvis str vs - - YBCGE make cursor very visible
delete_character dch1 str dc - - YBCGE delete character (P*)
delete_line dl1 str dl - - YBCGE delete line (P*)
dis_status_line dsl str ds - - YB-G- disable status line
down_half_line hd str hd - - YB-G- half a line down
enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
enter_blink_mode blink str mb - - YB-G- turn on blinking
enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
enter_delete_mode smdc str dm - - YBCGE enter delete mode
enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
enter_insert_mode smir str im - - YBCGE enter insert mode
enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
enter_protected_mode prot str mp - - -B-G-* turn on protected mode
enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
enter_standout_mode smso str so - - YBCGE begin standout mode
enter_underline_mode smul str us - - YBCGE begin underline mode
erase_chars ech str ec - - YB-G- erase #1 characters (P)
exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
exit_delete_mode rmdc str ed - - YBCGE end delete mode
exit_insert_mode rmir str ei - - YBCGE exit insert mode
exit_standout_mode rmso str se - - YBCGE exit standout mode
exit_underline_mode rmul str ue - - YBCGE exit underline mode
flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
from_status_line fsl str fs - - YB-G- return from status line
init_1string is1 str i1 - - YB-G- initialization string
init_2string is2 str is - - YB-G- initialization string
init_3string is3 str i3 - - YB-G- initialization string
init_file if str if - - YB-G- name of initialization file
insert_character ich1 str ic - - YBCGE insert character (P)
insert_line il1 str al - - YBCGE insert line (P*)
insert_padding ip str ip - - YBCGE insert padding after inserted character
key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
key_home khome str kh KEY_HOME 0406 YBCGE home key
key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
lab_f10 lf10 str la - - ----- label on function key f10 if not f10
lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
meta_off rmm str mo - - YB-G-* turn off meta mode
meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
pad_char pad str pc - - YBCGE padding char (instead of null)
parm_dch dch str DC - - YB-GE delete #1 characters (P*)
parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
parm_ich ich str IC - - YB-GE insert #1 characters (P*)
parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
print_screen mc0 str ps - - -B-G-* print contents of screen
prtr_off mc4 str pf - - -B-G-* turn off printer
prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
save_cursor sc str sc - - YBCG- save current cursor position (P)
scroll_forward ind str sf - - YBCGE scroll text up (P)
scroll_reverse ri str sr - - YBCGE scroll text down (P)
set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
set_tab hts str st - - YB-G- set a tab in every row, current columns
set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
to_status_line tsl str ts - - YB-G- move to status line, column #1
underline_char uc str uc - - YBCG- underline char and move past it
up_half_line hu str hu - - YB-G- half a line up
init_prog iprog str iP - - -B--- path name of program for initialization
key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
#
# SVr1 capabilities stop here. IBM's version of terminfo is the same as
# SVr4 up to this point, but has a different set afterwards.
#
char_padding rmp str rP - - ----- like ip but when in insert mode
acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
plab_norm pln str pn - - ----- program label #1 to show string #2
key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
enter_am_mode smam str SA - - ----- turn on automatic margins
exit_am_mode rmam str RA - - ----- turn off automatic margins
xon_character xonc str XN - - ----- XON character
xoff_character xoffc str XF - - ----- XOFF character
ena_acs enacs str eA - - ----- enable alternate char set
label_on smln str LO - - ----- turn on soft labels
label_off rmln str LF - - ----- turn off soft labels
key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
key_close kclo str @3 KEY_CLOSE 0544 ----- close key
key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
key_create kcrt str @6 KEY_CREATE 0547 ----- create key
key_end kend str @7 KEY_END 0550 ----- end key
key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
key_exit kext str @9 KEY_EXIT 0551 ----- exit key
key_find kfnd str @0 KEY_FIND 0552 ----- find key
key_help khlp str %1 KEY_HELP 0553 ----- help key
key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
key_move kmov str %4 KEY_MOVE 0556 ----- move key
key_next knxt str %5 KEY_NEXT 0557 ----- next key
key_open kopn str %6 KEY_OPEN 0560 ----- open key
key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
key_print kprt str %9 KEY_PRINT 0532 ----- print key
key_redo krdo str %0 KEY_REDO 0563 ----- redo key
key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
key_restart krst str &4 KEY_RESTART 0567 ----- restart key
key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
key_select kslt str *6 KEY_SELECT 0601 ----- select key
key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. (ML is not in BSD termcap).
set_right_margin smgr str MR - - ----- set right soft margin at current column
device_type devt str dv - - ----- Indicate language/codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
req_mouse_pos reqmp str RQ - - ----- Request mouse position
get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
release_mouse relm str Rm - - ----- Curses should release the mouse */
color_names colornm str Yw - - ----- Give name for color #1
initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
orig_colors oc str oc - - ----- Set all color pairs to the original ones
orig_pair op str op - - ----- Set default pair to its original value
set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
set_background setb str Sb - - ----- Set background color #1
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
#%.TE
#%.ad
#%
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
# also tells the man page table generator not to pass through following lines
# This means we can have obsolete capabilities and pseudo-capabilities that are
# recognized for termcap or terminfo compilation, but not output.
#
# %%-STOP-HERE-%%
#
# Don't move this casually! In fact, don't move it at all unless you're
# either doing it to add System V or XPG4 extensions, or have decided you
# don't care about SVr4 binary compatibility.
#
#############################################################################
#
# TERMCAP EXTENSION CAPABILITIES
#
# The capabilities below are either obsolete or extensions on certain systems.
# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
# termcap sources; the rest are listed for completeness, and in case somebody
# cares about them enough to hack in code that will translate them into
# terminfo capabilities.
#
# The first part of the list is from Ross Ridge's `mytinfo' package
# (comp.sources.unix, volume 26); the variable names and terminfo names (as
# well as the termcap codes) match his list.
#
# This group of codes is not marked obsolete in 4.4BSD, but have no direct
# terminfo equivalents. The rs capability is specially translated to terminfo
# r2, and vice versa, if an entry does not already have an r2. Similarly,
# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
# The ug capability is thrown away, but assumed to be whatever sg is if the
# latter is nonzero and we're dumping in termcap format.
#
termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
termcap_reset OTrs str rs - - YB-G- terminal reset string
magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
#
# Obsolete termcap capabilities. Some are used for termcap translation. The
# code uses the 'OT' prefix we put on obsolete capabilities to suppress
# printing them in terminfo source dumps of compiled entries.
#
backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
new_line_delay OTdN num dN - - YB-G- pad needed for LF
linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
#
# GNU termcap library extensions. The GNU termcap file distributed with
# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
# BSD termcap file. The name clash with terminfo MT is resolved by type
# info; MT is converted to km.
#
gnu_has_meta_key OTMT bool MT - - ----E has meta key
# gnu_tab_width OTtw num tw - - ----E tab width in spaces
#
# 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
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
# clash with terminfo names in ways that cannot be resolved by type
# information.
#
# These mytinfo codes are not used in the 4.4BSD curses code. They are
# marked obsolete in the 4.4BSD manual pages.
#
# There is one conflict with terminfo; ma is in both. This conflict is
# resolved by type information.
#
# The `ko' capability is translated by special code. It should contain a
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# 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
# text. All lines above the cursor's current line become locked in place on
# the screen. Then enter data normally. When the screen fills up, any
# further data entered forces the first line of unfrozen line text to scroll
# under the frozen data. Lines scrolled off the screen are inserted into
# memory immediately preceding the first frozen line." (from the HP 700/96
# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
#
# Applications that use terminfo are supposed to behave as though xr is
# always true.
#
linefeed_is_newline OTNL bool NL - - YB--- move down with \n
# even_parity OTEP bool EP - - -B--- terminal requires even parity
# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
backspace_delay OTdB num dB - - YB-G- padding required for ^H
# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
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 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
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#
# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top 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.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
#
# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
# check.
#
# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
#
# The mytinfo capabilities end here.
#
# XENIX extensions:
#
# Xenix defined its own set of forms-drawing capabilities:
#
# cap IBM ASCII description ACS ASCII
# --- ----------- -------------------- ------------- ------
# G1 191 \277 M-? single upper right ACS_URCORNER
# G2 218 \332 M-Z single upper left ACS_ULCORNER
# G3 192 \300 M-@ single lower left ACS_LLCORNER
# G4 217 \331 M-Y single lower right ACS_LRCORNER
# G5 187 \273 M-; double upper right
# G6 201 \311 M-I double upper left
# G7 200 \310 M-H double lower left
# G8 188 \274 M-< double lower right
# GC 197 \305 M-E single intersection ACS_PLUS _ _
# GD 194 \302 M-B single down-tick ACS_TTEE |
# GH 196 \304 M-D single horizontal line ACS_HLINE
# GL 180 \264 M-4 single left tick ACS_RTEE -|
# GR 195 \303 M-C single right tick ACS_LTEE |-
# GU 193 \301 M-A single up tick ACS_BTEE _|_
# GV 179 \263 M-3 single vertical line ACS_VLINE
# Gc 206 \316 M-N double intersection
# Gd 203 \313 M-K double down tick
# Gh 205 \315 M-M double horizontal line
# Gl 204 \204 M-L double left tick
# Gr 185 \271 M-9 double right tick
# Gu 202 \312 M-J double up tick
# 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
# 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.
# These terminfo names are invented.
#
acs_ulcorner OTG2 str G2 - - ----- single upper left
acs_llcorner OTG3 str G3 - - ----- single lower left
acs_urcorner OTG1 str G1 - - ----- single upper right
acs_lrcorner OTG4 str G4 - - ----- single lower right
acs_ltee OTGR str GR - - ----- tee pointing right
acs_rtee OTGL str GL - - ----- tee pointing left
acs_btee OTGU str GU - - ----- tee pointing up
acs_ttee OTGD str GD - - ----- tee pointing down
acs_hline OTGH str GH - - ----- single horizontal line
acs_vline OTGV str GV - - ----- single vertical line
acs_plus OTGC str GC - - ----- single intersection
#
#############################################################################
#
# TERMINFO EXTENSION CAPABILITIES
#
# (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
box_chars_1 box1 str bx - - ----K box characters primary set
#
#############################################################################

43
include/MKhashsize.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
##############################################################################
# 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"), #
# to deal in the Software without restriction, including without limitation #
# the rights to use, copy, modify, merge, publish, distribute, distribute #
# with modifications, sublicense, and/or sell copies of the Software, and to #
# permit persons to whom the Software is furnished to do so, subject to the #
# following conditions: #
# #
# The above copyright notice and this permission notice shall be included in #
# all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
# DEALINGS IN THE SOFTWARE. #
# #
# Except as contained in this notice, the name(s) of the above copyright #
# holders shall not be used in advertising or otherwise to promote the sale, #
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: MKhashsize.sh,v 1.9 2020/02/02 23:34:34 tom Exp $
#
# MKhashsize.sh --- generate size include for hash functions
#
echo "/*"
echo " * hashsize.h -- hash and token table constants"
echo " */"
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}"
echo "#define HASHTABSIZE (${TABSIZE} * 2)"

196
include/MKkey_defs.sh Executable file
View File

@@ -0,0 +1,196 @@
#! /bin/sh
# $Id: MKkey_defs.sh,v 1.21 2020/08/17 10:45:33 tom Exp $
##############################################################################
# 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"), #
# 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. #
##############################################################################
#
# MKkey_defs.sh -- generate function-key definitions for curses.h
#
# Author: Thomas E. Dickey 2001
#
# Extract function-key definitions from the Caps file
#
: ${AWK-awk}
test $# = 0 && set Caps
data=data$$
pass1=pass1_$$
pass2=pass2_$$
pass3=pass3_$$
pass4=pass4_$$
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 2>/dev/null
then
# POSIX
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' "$@" |sort -n +5 >$data
else
echo "Your sort utility is broken. Please install one that works." >&2
exit 1
fi
# add keys that we generate automatically:
cat >>$data <<EOF
key_resize kr1 str R1 KEY_RESIZE + NCURSES_EXT_FUNCS Terminal resize event
EOF
THIS=./`basename $0`
cat <<EOF
/*
* These definitions were generated by $THIS $*
*/
EOF
# KEY_RESET
maxkey=345
for pass in 1 2 3 4
do
output=pass${pass}_$$
${AWK-awk} >$output <$data '
function print_cols(text,cols) {
printf "%s", text
len = length(text);
while (len < cols) {
printf " "
len += 8;
}
}
function decode(keycode) {
result = 0;
if (substr(keycode, 1, 2) == "0x") {
digits="0123456789abcdef";
} else if (substr(keycode, 1, 1) == "0") {
digits="01234567";
} else {
digits="0123456789";
}
while (length(keycode) != 0) {
digit=substr(keycode, 1, 1);
keycode=substr(keycode, 2);
result = result * length(digits) + index(digits, digit) - 1;
}
return result;
}
BEGIN {
maxkey='$maxkey';
pass='$pass';
key_max=1;
bits=1;
while (key_max < maxkey) {
bits = bits + 1;
key_max = (key_max * 2) + 1;
}
octal_fmt = sprintf ("%%0%do", (bits + 2) / 3 + 1);
}
/^$/ {next;}
/^#/ {next;}
/^capalias/ {next;}
/^infoalias/ {next;}
/^used_by/ {next;}
/^userdef/ {next;}
$5 != "-" && $6 != "-" {
if ($6 == "+") {
if (pass == 1 || pass == 2)
next;
thiskey=maxkey + 1;
} else {
if (pass == 3)
next;
thiskey=decode($6);
}
if (thiskey > maxkey)
maxkey = thiskey;
if (pass == 2 || pass == 3) {
showkey=sprintf(octal_fmt, thiskey);
ifdef = 0;
if (index($7,"NCURSES_") == 1) {
ifdef = 1;
printf "\n";
printf "#ifdef %s\n", $7;
}
if ($5 == "KEY_F(0)" ) {
printf "#define "
print_cols("KEY_F0", 16);
print_cols(showkey, 16);
print "/* Function keys. Space for 64 */";
printf "#define "
print_cols("KEY_F(n)", 16);
print_cols("(KEY_F0+(n))", 16);
print "/* Value of function key n */"
} else {
printf "#define "
print_cols($5, 16);
print_cols(showkey, 16);
printf "/*"
for (i = 8; i <= NF; i++)
printf " %s", $i
print " */"
}
if (ifdef != 0) {
printf "#endif\n";
}
}
}
END {
if (pass == 1) {
print maxkey;
} else if (pass == 4) {
print "";
printf "#define ";
print_cols("KEY_MAX", 16);
result = sprintf (octal_fmt, key_max);
print_cols(result, 16);
printf "/* Maximum key value is ";
printf octal_fmt, maxkey;
print " */";
}
}
'
if test $pass = 1 ; then
maxkey=`cat $pass1`
fi
done
cat $pass2
cat $pass3
cat $pass4

81
include/MKncurses_def.sh Executable file
View File

@@ -0,0 +1,81 @@
#! /bin/sh
# $Id: MKncurses_def.sh,v 1.4 2020/02/02 23:34:34 tom Exp $
##############################################################################
# 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"), #
# 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. #
##############################################################################
#
# MKncurses_def.sh -- generate fallback definitions for ncurses_cfg.h
#
# Author: Thomas E. Dickey 2000
#
# Given the choice between constructs such as
#
# #if defined(foo) && foo
# #if foo
#
# we chose the latter. It is guaranteed by the language standard, and there
# appear to be no broken compilers that do not honor that detail. But some
# people want to use gcc's -Wundef option (corresponding to one of the less
# useful features in Watcom's compiler) to check for misspellings. So we
# generate a set of fallback definitions to quiet the warnings without making
# the code ugly.
#
DEFS="${1-ncurses_defs}"
cat <<EOF
/*
* This file is generated by $0
*/
#ifndef NC_DEFINE_H
#define NC_DEFINE_H 1
EOF
${AWK-awk} <$DEFS '
!/^[@#]/ {
if ( NF == 1 )
{
print "#ifndef", $1
print "#define", $1, "0"
print "#endif"
print ""
} else if ( NF != 0 ) {
print "#ifndef", $1
printf "#define"
for (n = 1; n <= NF; n++) {
printf " %s", $n
}
print ""
print "#endif"
print ""
}
}
END {
print "#endif /* NC_DEFINE_H */"
}
'

75
include/MKparametrized.sh Executable file
View File

@@ -0,0 +1,75 @@
#!/bin/sh
##############################################################################
# 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"), #
# to deal in the Software without restriction, including without limitation #
# the rights to use, copy, modify, merge, publish, distribute, distribute #
# with modifications, sublicense, and/or sell copies of the Software, and to #
# permit persons to whom the Software is furnished to do so, subject to the #
# following conditions: #
# #
# The above copyright notice and this permission notice shall be included in #
# all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
# DEALINGS IN THE SOFTWARE. #
# #
# Except as contained in this notice, the name(s) of the above copyright #
# holders shall not be used in advertising or otherwise to promote the sale, #
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: 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.
#
[ $# = 0 ] && set - Caps
cat <<EOF
#ifndef PARAMETRIZED_H
#define PARAMETRIZED_H 1
/*
* parametrized.h --- is a termcap capability parametrized?
*
* Note: this file is generated using MKparametrized.sh, do not edit by hand.
* A value of -1 in the table means suppress both pad and % translations.
* A value of 0 in the table means do pad but not % translations.
* A value of 1 in the table means do both pad and % translations.
*/
static short const parametrized[] = {
EOF
# We detect whether % translations should be done by looking for #[0-9] in the
# description field. We presently suppress padding translation only for the
# XENIX acs_* capabilities. Maybe someday we'll dedicate a flag field for
# this, that would be cleaner....
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;}
$0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
{print "0,\t/* ", $2, " */"; count++;}
END {printf("} /* %d entries */;\n\n", count);}
'
echo "#endif /* PARAMETRIZED_H */"

416
include/MKterm.h.awk Normal file
View File

@@ -0,0 +1,416 @@
# vile:awkmode
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-2020,2021 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.82 2021/09/24 17:02:46 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 \"6.3\""
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 "#ifndef __NCURSES_H"
print ""
print "typedef struct screen SCREEN;"
print ""
print "#if 1"
print "#undef NCURSES_SP_FUNCS"
print "#define NCURSES_SP_FUNCS 20211021"
print "#undef NCURSES_SP_NAME"
print "#define NCURSES_SP_NAME(name) name##_sp"
print ""
print "/* Define the sp-funcs helper function */"
print "#undef NCURSES_SP_OUTC"
print "#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)"
print "typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);"
print "#endif"
print ""
print "#endif /* __NCURSES_H */"
print ""
print "#undef NCURSES_CONST"
print "#define NCURSES_CONST const"
print ""
print "#undef NCURSES_SBOOL"
print "#define NCURSES_SBOOL char"
print ""
print "#undef NCURSES_USE_DATABASE"
print "#define NCURSES_USE_DATABASE 1"
print ""
print "#undef NCURSES_USE_TERMCAP"
print "#define NCURSES_USE_TERMCAP 0"
print ""
print "#undef NCURSES_XNAMES"
print "#define NCURSES_XNAMES 1"
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 1 && 1"
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 1"
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 (defined(_WIN32) || defined(_WIN64))"
print "#if 0"
print "#include <win32_curses.h>"
print "#define TTY struct winconmode"
print "#else"
print "#include <ncurses_mingw.h>"
print "#define TTY struct termios"
print "#endif"
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 "#elif 0 && (defined(_WIN32) || defined(_WIN64))"
print "#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)"
print "#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),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 ""
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; }
/^used_by/ { next ; }
/^userdef/ { next ; }
$1 == "acs_chars" {
acsindex = StringCount;
}
$3 == "bool" {
printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
}
$3 == "num" {
printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
}
$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 " * The first field in TERMINAL is used in macros."
print " * The remaining fields are private."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
print "#undef TERMINAL"
print "#define TERMINAL struct term"
print "TERMINAL;"
print ""
if (0) {
declare_termtype("int","2");
} else {
print "#undef TERMTYPE2"
print "#define TERMTYPE2 TERMTYPE"
}
print "#else"
print ""
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
print "} TERMINAL;"
print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
print "#if 0 && !1"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#elif 1"
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 0 || 1"
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 "extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);"
print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
print "/*"
print " * These entrypoints are used by tack 1.07."
print " */"
print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print ""
print "/*"
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 1 /* 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 "#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 1 /* 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 "#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 GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);"
print ""
print "#ifdef __cplusplus"
printf "%s\n", rcurl;
print "#endif"
print ""
print "#endif /* NCURSES_TERM_H_incl */"
}

416
include/MKterm.h.awk.in Normal file
View File

@@ -0,0 +1,416 @@
# vile:awkmode
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-2020,2021 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.82 2021/09/24 17:02:46 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 "#ifndef __NCURSES_H"
print ""
print "typedef struct screen SCREEN;"
print ""
print "#if @NCURSES_SP_FUNCS@"
print "#undef NCURSES_SP_FUNCS"
print "#define NCURSES_SP_FUNCS @NCURSES_PATCH@"
print "#undef NCURSES_SP_NAME"
print "#define NCURSES_SP_NAME(name) name##_sp"
print ""
print "/* Define the sp-funcs helper function */"
print "#undef NCURSES_SP_OUTC"
print "#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)"
print "typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);"
print "#endif"
print ""
print "#endif /* __NCURSES_H */"
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 (defined(_WIN32) || defined(_WIN64))"
print "#if @EXP_WIN32_DRIVER@"
print "#include <win32_curses.h>"
print "#define TTY struct winconmode"
print "#else"
print "#include <ncurses_mingw.h>"
print "#define TTY struct termios"
print "#endif"
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 "#elif @EXP_WIN32_DRIVER@ && (defined(_WIN32) || defined(_WIN64))"
print "#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)"
print "#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),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 ""
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; }
/^used_by/ { next ; }
/^userdef/ { next ; }
$1 == "acs_chars" {
acsindex = StringCount;
}
$3 == "bool" {
printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
}
$3 == "num" {
printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
}
$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 " * The first field in TERMINAL is used in macros."
print " * The remaining fields are private."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
print "#undef TERMINAL"
print "#define TERMINAL struct term"
print "TERMINAL;"
print ""
if (@NCURSES_EXT_COLORS@) {
declare_termtype("int","2");
} else {
print "#undef TERMTYPE2"
print "#define TERMTYPE2 TERMTYPE"
}
print "#else"
print ""
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
print "} TERMINAL;"
print ""
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 "extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);"
print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
print "/*"
print " * These entrypoints are used by tack 1.07."
print " */"
print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print ""
print "/*"
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 "#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 "#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 GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);"
print ""
print "#ifdef __cplusplus"
printf "%s\n", rcurl;
print "#endif"
print ""
print "#endif /* NCURSES_TERM_H_incl */"
}

218
include/Makefile Normal file
View File

@@ -0,0 +1,218 @@
# $Id: Makefile.in,v 1.53 2021/07/03 18:56:51 tom Exp $
##############################################################################
# Copyright 2019-2020,2021 Thomas E. Dickey #
# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# 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 1996-on
#
# Makefile for ncurses source code.
#
# This makes/installs ncurses include-files
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
# the configure script by "--srcdir=DIR".
# turn off _all_ suffix rules; we'll generate our own
.SUFFIXES:
SHELL = /bin/sh
THIS = Makefile
DESTDIR =
srcdir = .
prefix = /usr
exec_prefix = ${prefix}
includedir = ${prefix}/include
includesubdir =
INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
AWK = gawk
LN_S = ln -s -f
CC = gcc
CFLAGS = -O2 --param max-inline-insns-single=1200
CPPFLAGS = -DHAVE_CONFIG_H -I. -I. -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG
CTAGS =
ETAGS =
VERSION = 6.3
# The "Caps" file specifies the terminfo database format, as well as the list
# of function keys.
TERMINFO_CAPS = $(srcdir)/Caps
CAPLIST = $(TERMINFO_CAPS) \
$(srcdir)/Caps-ncurses
# These files are generated by the configure script
CONFIG_SRC = \
MKterm.h.awk \
curses.head \
ncurses_dll.h \
termcap.h \
unctrl.h
# These files are generated by this makefile
AUTO_SRC = \
curses.h \
hashsize.h \
ncurses_def.h \
parametrized.h \
config.h \
term.h
################################################################################
.PHONY : all
.PHONY : check
.PHONY : clean
.PHONY : depend
.PHONY : distclean
.PHONY : install
.PHONY : install.libs
.PHONY : libs
.PHONY : mostlyclean
.PHONY : realclean
.PHONY : sources
.PHONY : uninstall
.PHONY : uninstall.libs
all \
libs \
depend \
sources \
install :: $(AUTO_SRC)
curses.h : $(CAPLIST) \
curses.head \
$(srcdir)/curses.tail \
$(srcdir)/MKkey_defs.sh
cat curses.head >$@
AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@
$(SHELL) -c 'if test "0" = "1" ; then cat $(srcdir)/curses.events >>$@ ; fi'
$(SHELL) -c 'if test "chtype" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
cat $(srcdir)/curses.tail >>$@
term.h: $(CAPLIST) \
MKterm.h.awk
$(AWK) -f MKterm.h.awk $(CAPLIST) > $@
$(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
hashsize.h: $(CAPLIST) \
$(srcdir)/MKhashsize.sh
$(SHELL) $(srcdir)/MKhashsize.sh $(CAPLIST) >$@
ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
parametrized.h: $(CAPLIST) \
$(srcdir)/MKparametrized.sh
AWK=$(AWK) $(SHELL) $(srcdir)/MKparametrized.sh $(CAPLIST) >$@
# This is required by pthread.h on MinGW
config.h:
touch $@
tags:
$(CTAGS) *.[ch]
#TAGS:
# $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
clean :: mostlyclean
-rm -f $(AUTO_SRC)
-rm -rf *.dSYM
distclean :: clean
-rm -f Makefile $(CONFIG_SRC) config.h
realclean :: distclean
# Verify that each header-file can be compiled without including another.
check:
@$(SHELL) -c "for header in *.h;\
do \
echo \"** testing \$${header}\" ; \
echo \"#include <\$${header}>\" >headers.c; \
echo \"int main(void) { return 0; }\" >>headers.c; \
$(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
done"
-@rm -f headers.*
###############################################################################
# The remainder of this file is automatically generated during configuration
###############################################################################
# generated by mk-hdr.awk
# subset: ticlib+termlib+ext_tinfo+base+ext_funcs
# compat: yes
${INCLUDEDIR} :
mkdir -p $@
install \
install.libs \
install.includes :: ${AUTO_SRC} ${INCLUDEDIR} \
curses.h \
unctrl.h \
ncurses_dll.h \
term.h \
termcap.h \
$(srcdir)/tic.h \
$(srcdir)/term_entry.h \
$(srcdir)/nc_tparm.h
@ (cd ${INCLUDEDIR} && rm -f curses.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} curses.h
@ (cd ${INCLUDEDIR} && rm -f ncurses.h && ${LN_S} curses.h ncurses.h)
@ (cd ${INCLUDEDIR} && rm -f unctrl.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} unctrl.h
@ (cd ${INCLUDEDIR} && rm -f ncurses_dll.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} ncurses_dll.h
@ (cd ${INCLUDEDIR} && rm -f term.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} term.h
@ (cd ${INCLUDEDIR} && rm -f termcap.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} termcap.h
@ (cd ${INCLUDEDIR} && rm -f tic.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/tic.h
@ (cd ${INCLUDEDIR} && rm -f term_entry.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/term_entry.h
@ (cd ${INCLUDEDIR} && rm -f nc_tparm.h) ; ../headers.sh ${INSTALL_DATA} ${INCLUDEDIR} ${srcdir} $(srcdir)/nc_tparm.h
uninstall \
uninstall.libs \
uninstall.includes ::
-@ (cd ${INCLUDEDIR} && rm -f curses.h)
-@ (cd ${INCLUDEDIR} && rm -f ncurses.h)
-@ (cd ${INCLUDEDIR} && rm -f unctrl.h)
-@ (cd ${INCLUDEDIR} && rm -f ncurses_dll.h)
-@ (cd ${INCLUDEDIR} && rm -f term.h)
-@ (cd ${INCLUDEDIR} && rm -f termcap.h)
-@ (cd ${INCLUDEDIR} && rm -f tic.h)
-@ (cd ${INCLUDEDIR} && rm -f term_entry.h)
-@ (cd ${INCLUDEDIR} && rm -f nc_tparm.h)

177
include/Makefile.in Normal file
View File

@@ -0,0 +1,177 @@
# $Id: Makefile.in,v 1.53 2021/07/03 18:56:51 tom Exp $
##############################################################################
# Copyright 2019-2020,2021 Thomas E. Dickey #
# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# 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 1996-on
#
# Makefile for ncurses source code.
#
# This makes/installs ncurses include-files
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
# the configure script by "--srcdir=DIR".
# turn off _all_ suffix rules; we'll generate our own
.SUFFIXES:
SHELL = @SHELL@
VPATH = @srcdir@
THIS = Makefile
DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
includesubdir = @includesubdir@
INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
AWK = @AWK@
LN_S = @LN_S@
CC = @CC@
CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
CPPFLAGS = -DHAVE_CONFIG_H -I. @CPPFLAGS@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
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 = \
MKterm.h.awk \
curses.head \
ncurses_dll.h \
termcap.h \
unctrl.h
# These files are generated by this makefile
AUTO_SRC = \
curses.h \
hashsize.h \
ncurses_def.h \
parametrized.h \
config.h \
term.h
################################################################################
@MAKE_PHONY@.PHONY : all
@MAKE_PHONY@.PHONY : check
@MAKE_PHONY@.PHONY : clean
@MAKE_PHONY@.PHONY : depend
@MAKE_PHONY@.PHONY : distclean
@MAKE_PHONY@.PHONY : install
@MAKE_PHONY@.PHONY : install.libs
@MAKE_PHONY@.PHONY : libs
@MAKE_PHONY@.PHONY : mostlyclean
@MAKE_PHONY@.PHONY : realclean
@MAKE_PHONY@.PHONY : sources
@MAKE_PHONY@.PHONY : uninstall
@MAKE_PHONY@.PHONY : uninstall.libs
all \
libs \
depend \
sources \
install :: $(AUTO_SRC)
curses.h : $(CAPLIST) \
curses.head \
$(srcdir)/curses.tail \
$(srcdir)/MKkey_defs.sh
cat curses.head >$@
AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@
$(SHELL) -c 'if test "@NCURSES_WGETCH_EVENTS@" = "1" ; then cat $(srcdir)/curses.events >>$@ ; fi'
$(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
cat $(srcdir)/curses.tail >>$@
term.h: $(CAPLIST) \
MKterm.h.awk
$(AWK) -f MKterm.h.awk $(CAPLIST) > $@
$(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
hashsize.h: $(CAPLIST) \
$(srcdir)/MKhashsize.sh
$(SHELL) $(srcdir)/MKhashsize.sh $(CAPLIST) >$@
ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
parametrized.h: $(CAPLIST) \
$(srcdir)/MKparametrized.sh
AWK=$(AWK) $(SHELL) $(srcdir)/MKparametrized.sh $(CAPLIST) >$@
# This is required by pthread.h on MinGW
config.h:
touch $@
tags:
$(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
clean :: mostlyclean
-rm -f $(AUTO_SRC)
-rm -rf *.dSYM
distclean :: clean
-rm -f Makefile $(CONFIG_SRC) config.h
realclean :: distclean
# Verify that each header-file can be compiled without including another.
check:
@$(SHELL) -c "for header in *.h;\
do \
echo \"** testing \$${header}\" ; \
echo \"#include <\$${header}>\" >headers.c; \
echo \"int main(void) { return 0; }\" >>headers.c; \
$(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
done"
-@rm -f headers.*
###############################################################################
# The remainder of this file is automatically generated during configuration
###############################################################################

87
include/capdefaults.c Normal file
View File

@@ -0,0 +1,87 @@
/****************************************************************************
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: capdefaults.c,v 1.16 2021/09/04 10:52:55 tom Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file is
* that the two places where it is needed require the macros to generate
* offsets to different structures. See the file Caps for explanations of
* these conversions.
*
* Note: This code is the functional inverse of the first part of
* postprocess_termcap().
*/
{
char *strp;
short capval;
#define EXTRACT_DELAY(str) \
(short) (strp = strchr(str, '*'), strp ? atoi(strp+1) : 0)
/* current (4.4BSD) capabilities marked obsolete */
if (VALID_STRING(carriage_return)
&& (capval = EXTRACT_DELAY(carriage_return)))
carriage_return_delay = capval;
if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline)))
new_line_delay = capval;
/* current (4.4BSD) capabilities not obsolete */
if (!VALID_STRING(termcap_init2) && VALID_STRING(init_3string)) {
termcap_init2 = init_3string;
init_3string = ABSENT_STRING;
}
if (!VALID_STRING(termcap_reset)
&& VALID_STRING(reset_2string)
&& !VALID_STRING(reset_1string)
&& !VALID_STRING(reset_3string)) {
termcap_reset = reset_2string;
reset_2string = ABSENT_STRING;
}
if (magic_cookie_glitch_ul == ABSENT_NUMERIC
&& magic_cookie_glitch != ABSENT_NUMERIC
&& VALID_STRING(enter_underline_mode))
magic_cookie_glitch_ul = magic_cookie_glitch;
/* totally obsolete capabilities */
linefeed_is_newline = (char) (VALID_STRING(newline)
&& (strcmp("\n", newline) == 0));
if (VALID_STRING(cursor_left)
&& (capval = EXTRACT_DELAY(cursor_left)))
backspace_delay = capval;
if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab)))
horizontal_tab_delay = capval;
#undef EXTRACT_DELAY
}

0
include/config.h Normal file
View File

55
include/curses.events Normal file
View File

@@ -0,0 +1,55 @@
/* $Id*/
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
* (see that file for the relevant copyright).
*/
/*
* This is an extension to support events...
*/
#ifdef NCURSES_WGETCH_EVENTS
#if !defined(__BEOS__) || defined(__HAIKU__)
/* Fix _nc_timed_wait() on BEOS... */
# define NCURSES_EVENT_VERSION 1
#endif /* !defined(__BEOS__) */
/*
* Bits to set in _nc_event.data.flags
*/
# define _NC_EVENT_TIMEOUT_MSEC 1
# define _NC_EVENT_FILE 2
# define _NC_EVENT_FILE_READABLE 2
# if 0 /* Not supported yet... */
# define _NC_EVENT_FILE_WRITABLE 4
# define _NC_EVENT_FILE_EXCEPTION 8
# endif
typedef struct
{
int type;
union
{
long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */
struct
{
unsigned int flags;
int fd;
unsigned int result;
} fev; /* _NC_EVENT_FILE */
} data;
} _nc_event;
typedef struct
{
int count;
int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */
_nc_event *events[1];
} _nc_eventlist;
extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
#define KEY_EVENT 0633 /* We were interrupted by an event */
#endif /* NCURSES_WGETCH_EVENTS */

1800
include/curses.h Normal file

File diff suppressed because it is too large Load Diff

1506
include/curses.h.in Normal file

File diff suppressed because it is too large Load Diff

1506
include/curses.head Normal file

File diff suppressed because it is too large Load Diff

197
include/curses.tail Normal file
View File

@@ -0,0 +1,197 @@
/* $Id: curses.tail,v 1.26 2021/03/20 15:49:25 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
* (see that file for the relevant copyright).
*/
/* mouse interface */
#if NCURSES_MOUSE_VERSION > 1
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5))
#else
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6))
#endif
#define NCURSES_BUTTON_RELEASED 001L
#define NCURSES_BUTTON_PRESSED 002L
#define NCURSES_BUTTON_CLICKED 004L
#define NCURSES_DOUBLE_CLICKED 010L
#define NCURSES_TRIPLE_CLICKED 020L
#define NCURSES_RESERVED_EVENT 040L
/* event masks */
#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)
#define BUTTON1_PRESSED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED)
#define BUTTON1_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED)
#define BUTTON1_DOUBLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED)
#define BUTTON1_TRIPLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED)
#define BUTTON2_RELEASED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED)
#define BUTTON2_PRESSED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED)
#define BUTTON2_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED)
#define BUTTON2_DOUBLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED)
#define BUTTON2_TRIPLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED)
#define BUTTON3_RELEASED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED)
#define BUTTON3_PRESSED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED)
#define BUTTON3_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED)
#define BUTTON3_DOUBLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED)
#define BUTTON3_TRIPLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED)
#define BUTTON4_RELEASED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED)
#define BUTTON4_PRESSED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED)
#define BUTTON4_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED)
#define BUTTON4_DOUBLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED)
#define BUTTON4_TRIPLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED)
/*
* In 32 bits the version-1 scheme does not provide enough space for a 5th
* button, unless we choose to change the ABI by omitting the reserved-events.
*/
#if NCURSES_MOUSE_VERSION > 1
#define BUTTON5_RELEASED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_RELEASED)
#define BUTTON5_PRESSED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_PRESSED)
#define BUTTON5_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED)
#define BUTTON5_DOUBLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED)
#define BUTTON5_TRIPLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED)
#define BUTTON_CTRL NCURSES_MOUSE_MASK(6, 0001L)
#define BUTTON_SHIFT NCURSES_MOUSE_MASK(6, 0002L)
#define BUTTON_ALT NCURSES_MOUSE_MASK(6, 0004L)
#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(6, 0010L)
#else
#define BUTTON1_RESERVED_EVENT NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT)
#define BUTTON2_RESERVED_EVENT NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT)
#define BUTTON3_RESERVED_EVENT NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT)
#define BUTTON4_RESERVED_EVENT NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT)
#define BUTTON_CTRL NCURSES_MOUSE_MASK(5, 0001L)
#define BUTTON_SHIFT NCURSES_MOUSE_MASK(5, 0002L)
#define BUTTON_ALT NCURSES_MOUSE_MASK(5, 0004L)
#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(5, 0010L)
#endif
#define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1)
/* macros to extract single event-bits from masks */
#define BUTTON_RELEASE(e, x) ((e) & NCURSES_MOUSE_MASK(x, 001))
#define BUTTON_PRESS(e, x) ((e) & NCURSES_MOUSE_MASK(x, 002))
#define BUTTON_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 004))
#define BUTTON_DOUBLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 010))
#define BUTTON_TRIPLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 020))
#define BUTTON_RESERVED_EVENT(e, x) ((e) & NCURSES_MOUSE_MASK(x, 040))
typedef struct
{
short id; /* ID to distinguish multiple devices */
int x, y, z; /* event coordinates (character-cell) */
mmask_t bstate; /* button state bits */
}
MEVENT;
extern NCURSES_EXPORT(bool) has_mouse(void);
extern NCURSES_EXPORT(int) getmouse (MEVENT *);
extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);
extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int);
extern NCURSES_EXPORT(int) mouseinterval (int);
extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool);
extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_mouse) (SCREEN*);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *);
extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *);
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 */
extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */
extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */
#endif
/* Debugging : use with libncurses_g.a */
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(char *) _traceattr (attr_t);
extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype);
extern NCURSES_EXPORT(char *) _tracechar (int);
extern NCURSES_EXPORT(char *) _tracechtype (chtype);
extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype);
#if NCURSES_WIDECHAR
#define _tracech_t _tracecchar_t
extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *);
#define _tracech_t2 _tracecchar_t2
extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *);
#else
#define _tracech_t _tracechtype
#define _tracech_t2 _tracechtype2
#endif
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 */
#define TRACE_TIMES 0x0001 /* trace user and system times of updates */
#define TRACE_TPUTS 0x0002 /* trace tputs calls */
#define TRACE_UPDATE 0x0004 /* trace update actions, old & new screens */
#define TRACE_MOVE 0x0008 /* trace cursor moves and scrolls */
#define TRACE_CHARPUT 0x0010 /* trace all character outputs */
#define TRACE_ORDINARY 0x001F /* trace all update actions */
#define TRACE_CALLS 0x0020 /* trace all curses calls */
#define TRACE_VIRTPUT 0x0040 /* trace virtual character puts */
#define TRACE_IEVENT 0x0080 /* trace low-level input processing */
#define TRACE_BITS 0x0100 /* trace state of TTY control bits */
#define TRACE_ICALLS 0x0200 /* trace internal/nested calls */
#define TRACE_CCALLS 0x0400 /* trace per-character calls */
#define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data */
#define TRACE_ATTRS 0x1000 /* trace attribute updates */
#define TRACE_SHIFT 13 /* number of bits in the trace masks */
#define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */
#if defined(TRACE) || defined(NCURSES_TEST)
extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */
extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
#define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */
#define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */
#define OPTIMIZE_SCROLL 0x04 /* scroll optimization */
#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */
#endif
extern GCC_NORETURN NCURSES_EXPORT(void) exit_curses (int);
#include <unctrl.h>
#ifdef __cplusplus
#ifndef NCURSES_NOMACROS
/* these names conflict with STL */
#undef box
#undef clear
#undef erase
#undef move
#undef refresh
#endif /* NCURSES_NOMACROS */
}
#endif
#endif /* __NCURSES_H */

314
include/curses.wide Normal file
View File

@@ -0,0 +1,314 @@
/* $Id: curses.wide,v 1.51 2021/05/22 20:28:29 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
* (see that file for the relevant copyright).
*/
#define _XOPEN_CURSES 1
#if NCURSES_WIDECHAR
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
#define NCURSES_WACS(c) (&_nc_wacs[NCURSES_CAST(unsigned char,(c))])
#define WACS_BSSB NCURSES_WACS('l')
#define WACS_SSBB NCURSES_WACS('m')
#define WACS_BBSS NCURSES_WACS('k')
#define WACS_SBBS NCURSES_WACS('j')
#define WACS_SBSS NCURSES_WACS('u')
#define WACS_SSSB NCURSES_WACS('t')
#define WACS_SSBS NCURSES_WACS('v')
#define WACS_BSSS NCURSES_WACS('w')
#define WACS_BSBS NCURSES_WACS('q')
#define WACS_SBSB NCURSES_WACS('x')
#define WACS_SSSS NCURSES_WACS('n')
#define WACS_ULCORNER WACS_BSSB
#define WACS_LLCORNER WACS_SSBB
#define WACS_URCORNER WACS_BBSS
#define WACS_LRCORNER WACS_SBBS
#define WACS_RTEE WACS_SBSS
#define WACS_LTEE WACS_SSSB
#define WACS_BTEE WACS_SSBS
#define WACS_TTEE WACS_BSSS
#define WACS_HLINE WACS_BSBS
#define WACS_VLINE WACS_SBSB
#define WACS_PLUS WACS_SSSS
#define WACS_S1 NCURSES_WACS('o') /* scan line 1 */
#define WACS_S9 NCURSES_WACS('s') /* scan line 9 */
#define WACS_DIAMOND NCURSES_WACS('`') /* diamond */
#define WACS_CKBOARD NCURSES_WACS('a') /* checker board */
#define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */
#define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */
#define WACS_BULLET NCURSES_WACS('~') /* bullet */
/* Teletype 5410v1 symbols */
#define WACS_LARROW NCURSES_WACS(',') /* arrow left */
#define WACS_RARROW NCURSES_WACS('+') /* arrow right */
#define WACS_DARROW NCURSES_WACS('.') /* arrow down */
#define WACS_UARROW NCURSES_WACS('-') /* arrow up */
#define WACS_BOARD NCURSES_WACS('h') /* board of squares */
#define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */
#define WACS_BLOCK NCURSES_WACS('0') /* solid square block */
/* ncurses extensions */
#define WACS_S3 NCURSES_WACS('p') /* scan line 3 */
#define WACS_S7 NCURSES_WACS('r') /* scan line 7 */
#define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */
#define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */
#define WACS_PI NCURSES_WACS('{') /* Pi */
#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */
#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */
/* double lines */
#define WACS_BDDB NCURSES_WACS('C')
#define WACS_DDBB NCURSES_WACS('D')
#define WACS_BBDD NCURSES_WACS('B')
#define WACS_DBBD NCURSES_WACS('A')
#define WACS_DBDD NCURSES_WACS('G')
#define WACS_DDDB NCURSES_WACS('F')
#define WACS_DDBD NCURSES_WACS('H')
#define WACS_BDDD NCURSES_WACS('I')
#define WACS_BDBD NCURSES_WACS('R')
#define WACS_DBDB NCURSES_WACS('Y')
#define WACS_DDDD NCURSES_WACS('E')
#define WACS_D_ULCORNER WACS_BDDB
#define WACS_D_LLCORNER WACS_DDBB
#define WACS_D_URCORNER WACS_BBDD
#define WACS_D_LRCORNER WACS_DBBD
#define WACS_D_RTEE WACS_DBDD
#define WACS_D_LTEE WACS_DDDB
#define WACS_D_BTEE WACS_DDBD
#define WACS_D_TTEE WACS_BDDD
#define WACS_D_HLINE WACS_BDBD
#define WACS_D_VLINE WACS_DBDB
#define WACS_D_PLUS WACS_DDDD
/* thick lines */
#define WACS_BTTB NCURSES_WACS('L')
#define WACS_TTBB NCURSES_WACS('M')
#define WACS_BBTT NCURSES_WACS('K')
#define WACS_TBBT NCURSES_WACS('J')
#define WACS_TBTT NCURSES_WACS('U')
#define WACS_TTTB NCURSES_WACS('T')
#define WACS_TTBT NCURSES_WACS('V')
#define WACS_BTTT NCURSES_WACS('W')
#define WACS_BTBT NCURSES_WACS('Q')
#define WACS_TBTB NCURSES_WACS('X')
#define WACS_TTTT NCURSES_WACS('N')
#define WACS_T_ULCORNER WACS_BTTB
#define WACS_T_LLCORNER WACS_TTBB
#define WACS_T_URCORNER WACS_BBTT
#define WACS_T_LRCORNER WACS_TBBT
#define WACS_T_RTEE WACS_TBTT
#define WACS_T_LTEE WACS_TTTB
#define WACS_T_BTEE WACS_TTBT
#define WACS_T_TTEE WACS_BTTT
#define WACS_T_HLINE WACS_BTBT
#define WACS_T_VLINE WACS_TBTB
#define WACS_T_PLUS WACS_TTTT
/*
* Function prototypes for wide-character operations.
*
* "generated" comments should include ":WIDEC" to make the corresponding
* functions ifdef'd in lib_gen.c
*
* "implemented" comments do not need this marker.
*/
extern NCURSES_EXPORT(int) add_wch (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) addwstr (const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* generated:WIDEC */
extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented */
extern NCURSES_EXPORT(int) get_wch (wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) get_wstr (wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, NCURSES_PAIRS_T*, void*); /* implemented */
extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) in_wch (cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) inwstr (wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); /* implemented */
extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented */
extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);/* generated:WIDEC */
extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int);/* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);/* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);/* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, NCURSES_PAIRS_T, const void *); /* implemented */
extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */
extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */
extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */
extern NCURSES_EXPORT(int) vid_attr (attr_t, NCURSES_PAIRS_T, void *); /* implemented */
extern NCURSES_EXPORT(int) vid_puts (attr_t, NCURSES_PAIRS_T, void *, NCURSES_OUTC); /* implemented */
extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */
extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int); /* implemented */
extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *); /* implemented */
extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* implemented */
extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implemented */
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) 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 */
extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); /* implemented */
extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); /* implemented */
extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */
extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(erasewchar) (SCREEN*, wchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(killwchar) (SCREEN*, wchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
#endif
#ifndef NCURSES_NOMACROS
/*
* XSI curses macros for XPG4 conformance.
*/
#define add_wch(c) wadd_wch(stdscr,(c))
#define add_wchnstr(str,n) wadd_wchnstr(stdscr,(str),(n))
#define add_wchstr(str) wadd_wchstr(stdscr,(str))
#define addnwstr(wstr,n) waddnwstr(stdscr,(wstr),(n))
#define addwstr(wstr) waddwstr(stdscr,(wstr))
#define bkgrnd(c) wbkgrnd(stdscr,(c))
#define bkgrndset(c) wbkgrndset(stdscr,(c))
#define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,(l),(r),(t),(b),tl,tr,bl,br)
#define box_set(w,v,h) wborder_set((w),(v),(v),(h),(h),0,0,0,0)
#define echo_wchar(c) wecho_wchar(stdscr,(c))
#define get_wch(c) wget_wch(stdscr,(c))
#define get_wstr(t) wget_wstr(stdscr,(t))
#define getbkgrnd(wch) wgetbkgrnd(stdscr,(wch))
#define getn_wstr(t,n) wgetn_wstr(stdscr,(t),(n))
#define hline_set(c,n) whline_set(stdscr,(c),(n))
#define in_wch(c) win_wch(stdscr,(c))
#define in_wchnstr(c,n) win_wchnstr(stdscr,(c),(n))
#define in_wchstr(c) win_wchstr(stdscr,(c))
#define innwstr(c,n) winnwstr(stdscr,(c),(n))
#define ins_nwstr(t,n) wins_nwstr(stdscr,(t),(n))
#define ins_wch(c) wins_wch(stdscr,(c))
#define ins_wstr(t) wins_wstr(stdscr,(t))
#define inwstr(c) winwstr(stdscr,(c))
#define vline_set(c,n) wvline_set(stdscr,(c),(n))
#define wadd_wchstr(win,str) wadd_wchnstr((win),(str),-1)
#define waddwstr(win,wstr) waddnwstr((win),(wstr),-1)
#define wget_wstr(w,t) wgetn_wstr((w),(t),-1)
#define win_wchstr(w,c) win_wchnstr((w),(c),-1)
#define wins_wstr(w,t) wins_nwstr((w),(t),-1)
#if !NCURSES_OPAQUE
#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))
#define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,(y),(x),(s),(n))
#define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,(y),(x),(s))
#define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,(y),(x),(wstr),(n))
#define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,(y),(x),(wstr))
#define mvget_wch(y,x,c) mvwget_wch(stdscr,(y),(x),(c))
#define mvget_wstr(y,x,t) mvwget_wstr(stdscr,(y),(x),(t))
#define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,(y),(x),(t),(n))
#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,(y),(x),(c),(n))
#define mvin_wch(y,x,c) mvwin_wch(stdscr,(y),(x),(c))
#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,(y),(x),(c),(n))
#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,(y),(x),(c))
#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,(y),(x),(c),(n))
#define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,(y),(x),(t),(n))
#define mvins_wch(y,x,c) mvwins_wch(stdscr,(y),(x),(c))
#define mvins_wstr(y,x,t) mvwins_wstr(stdscr,(y),(x),(t))
#define mvinwstr(y,x,c) mvwinwstr(stdscr,(y),(x),(c))
#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,(y),(x),(c),(n))
#define mvwadd_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wch((win),(c)))
#define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchnstr((win),(s),(n)))
#define mvwadd_wchstr(win,y,x,s) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchstr((win),(s)))
#define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,(y),(x)) == ERR ? ERR : waddnwstr((win),(wstr),(n)))
#define mvwaddwstr(win,y,x,wstr) (wmove(win,(y),(x)) == ERR ? ERR : waddwstr((win),(wstr)))
#define mvwget_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wget_wch((win),(c)))
#define mvwget_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wget_wstr((win),(t)))
#define mvwgetn_wstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wgetn_wstr((win),(t),(n)))
#define mvwhline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : whline_set((win),(c),(n)))
#define mvwin_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wch((win),(c)))
#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : win_wchnstr((win),(c),(n)))
#define mvwin_wchstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wchstr((win),(c)))
#define mvwinnwstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : winnwstr((win),(c),(n)))
#define mvwins_nwstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wins_nwstr((win),(t),(n)))
#define mvwins_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wins_wch((win),(c)))
#define mvwins_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wins_wstr((win),(t)))
#define mvwinwstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : winwstr((win),(c)))
#define mvwvline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : wvline_set((win),(c),(n)))
#endif /* NCURSES_NOMACROS */
#if defined(TRACE) || defined(NCURSES_TEST)
extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
#endif
#endif /* NCURSES_WIDECHAR */

68
include/edit_cfg.sh Executable file
View File

@@ -0,0 +1,68 @@
#!/bin/sh
# $Id: edit_cfg.sh,v 1.14 2020/02/02 23:34:34 tom Exp $
##############################################################################
# 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"), #
# 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 <dickey@clark.net> 1996,1997,2000
#
# Edit the default value of the term.h file based on the autoconf-generated
# values:
#
# $1 = ncurses_cfg.h
# $2 = term.h
#
BAK=save$$
TMP=edit$$
trap "rm -f $BAK $TMP" 0 1 2 3 15
for name in \
HAVE_TCGETATTR \
HAVE_TERMIOS_H \
HAVE_TERMIO_H \
BROKEN_LINKER
do
mv $2 $BAK
if ( grep "[ ]$name[ ]" $1 2>&1 >$TMP )
then
value=1
else
value=0
fi
echo '** edit: '$name $value
sed \
-e "s@#define ${name}.*\$@#define $name $value@" \
-e "s@#if $name\$@#if $value /* $name */@" \
-e "s@#if !$name\$@#if $value /* !$name */@" \
$BAK >$2
if (cmp -s $2 $BAK)
then
mv $BAK $2
else
rm -f $BAK
fi
done

55
include/eti.h Normal file
View File

@@ -0,0 +1,55 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 1998-2002,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"), 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: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: eti.h,v 1.9 2020/02/02 23:34:34 tom Exp $ */
#ifndef NCURSES_ETI_H_incl
#define NCURSES_ETI_H_incl 1
#define E_OK (0)
#define E_SYSTEM_ERROR (-1)
#define E_BAD_ARGUMENT (-2)
#define E_POSTED (-3)
#define E_CONNECTED (-4)
#define E_BAD_STATE (-5)
#define E_NO_ROOM (-6)
#define E_NOT_POSTED (-7)
#define E_UNKNOWN_COMMAND (-8)
#define E_NO_MATCH (-9)
#define E_NOT_SELECTABLE (-10)
#define E_NOT_CONNECTED (-11)
#define E_REQUEST_DENIED (-12)
#define E_INVALID_FIELD (-13)
#define E_CURRENT (-14)
#endif

460
include/form.h Normal file
View File

@@ -0,0 +1,460 @@
/****************************************************************************
* Copyright 2018-2019-2020,2021 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 *
* "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: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.h,v 0.32 2021/06/17 21:26:02 tom Exp $ */
#ifndef FORM_H
#define FORM_H
/* *INDENT-OFF*/
#include <curses.h>
#include <eti.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(BUILDING_FORM)
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API
#define FORM_EXPORT_VAR(type) FORM_IMPEXP type
#ifndef FORM_PRIV_H
typedef void *FIELD_CELL;
#endif
#ifndef NCURSES_FIELD_INTERNALS
#define NCURSES_FIELD_INTERNALS /* nothing */
#endif
typedef int Form_Options;
typedef int Field_Options;
/**********
* _PAGE *
**********/
typedef struct pagenode
#if !NCURSES_OPAQUE_FORM
{
short pmin; /* index of first field on page */
short pmax; /* index of last field on page */
short smin; /* index of top leftmost field on page */
short smax; /* index of bottom rightmost field on page */
}
#endif /* !NCURSES_OPAQUE_FORM */
_PAGE;
/**********
* FIELD *
**********/
typedef struct fieldnode
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
{
unsigned short status; /* flags */
short rows; /* size in rows */
short cols; /* size in cols */
short frow; /* first row */
short fcol; /* first col */
int drows; /* dynamic rows */
int dcols; /* dynamic cols */
int maxgrow; /* maximum field growth */
int nrow; /* off-screen rows */
short nbuf; /* additional buffers */
short just; /* justification */
short page; /* page on form */
short index; /* into form -> field */
int pad; /* pad character */
chtype fore; /* foreground attribute */
chtype back; /* background attribute */
Field_Options opts; /* options */
struct fieldnode * snext; /* sorted order pointer */
struct fieldnode * sprev; /* sorted order pointer */
struct fieldnode * link; /* linked field chain */
struct formnode * form; /* containing form */
struct typenode * type; /* field type */
void * arg; /* argument for type */
FIELD_CELL * buf; /* field buffers */
void * usrptr; /* user pointer */
/*
* The wide-character configuration requires extra information. Because
* there are existing applications that manipulate the members of FIELD
* directly, we cannot make the struct opaque, except by changing the ABI.
* Offsets of members up to this point are the same in the narrow- and
* wide-character configuration. But note that the type of buf depends on
* the configuration, and is made opaque for that reason.
*/
NCURSES_FIELD_INTERNALS
}
#endif /* NCURSES_OPAQUE_FORM */
FIELD;
/*********
* FORM *
*********/
typedef struct formnode
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
{
unsigned short status; /* flags */
short rows; /* size in rows */
short cols; /* size in cols */
int currow; /* current row in field window */
int curcol; /* current col in field window */
int toprow; /* in scrollable field window */
int begincol; /* in horiz. scrollable field */
short maxfield; /* number of fields */
short maxpage; /* number of pages */
short curpage; /* index into page */
Form_Options opts; /* options */
WINDOW * win; /* window */
WINDOW * sub; /* subwindow */
WINDOW * w; /* window for current field */
FIELD ** field; /* field [maxfield] */
FIELD * current; /* current field */
_PAGE * page; /* page [maxpage] */
void * usrptr; /* user pointer */
void (*forminit)(struct formnode *);
void (*formterm)(struct formnode *);
void (*fieldinit)(struct formnode *);
void (*fieldterm)(struct formnode *);
}
#endif /* !NCURSES_OPAQUE_FORM */
FORM;
/**************
* FIELDTYPE *
**************/
typedef struct typenode
#if !NCURSES_OPAQUE_FORM
{
unsigned short status; /* flags */
long ref; /* reference count */
struct typenode * left; /* ptr to operand for | */
struct typenode * right; /* ptr to operand for | */
void* (*makearg)(va_list *); /* make fieldtype arg */
void* (*copyarg)(const void *); /* copy fieldtype arg */
void (*freearg)(void *); /* free fieldtype arg */
#if NCURSES_INTEROP_FUNCS
union {
bool (*ofcheck)(FIELD *,const void *); /* field validation */
bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */
} fieldcheck;
union {
bool (*occheck)(int,const void *); /* character validation */
bool (*gccheck)(int,FORM*,
FIELD*,const void*); /* generic char validation */
} charcheck;
union {
bool (*onext)(FIELD *,const void *); /* enumerate next value */
bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */
} enum_next;
union {
bool (*oprev)(FIELD *,const void *); /* enumerate prev value */
bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */
} enum_prev;
void* (*genericarg)(void*); /* Alternate Arg method */
#else
bool (*fcheck)(FIELD *,const void *); /* field validation */
bool (*ccheck)(int,const void *); /* character validation */
bool (*next)(FIELD *,const void *); /* enumerate next value */
bool (*prev)(FIELD *,const void *); /* enumerate prev value */
#endif
}
#endif /* !NCURSES_OPAQUE_FORM */
FIELDTYPE;
typedef void (*Form_Hook)(FORM *);
/***************************
* miscellaneous #defines *
***************************/
/* field justification */
#define NO_JUSTIFICATION (0)
#define JUSTIFY_LEFT (1)
#define JUSTIFY_CENTER (2)
#define JUSTIFY_RIGHT (3)
/* field options */
#define O_VISIBLE (0x0001U)
#define O_ACTIVE (0x0002U)
#define O_PUBLIC (0x0004U)
#define O_EDIT (0x0008U)
#define O_WRAP (0x0010U)
#define O_BLANK (0x0020U)
#define O_AUTOSKIP (0x0040U)
#define O_NULLOK (0x0080U)
#define O_PASSOK (0x0100U)
#define O_STATIC (0x0200U)
#define O_DYNAMIC_JUSTIFY (0x0400U) /* ncurses extension */
#define O_NO_LEFT_STRIP (0x0800U) /* ncurses extension */
#define O_EDGE_INSERT_STAY (0x1000U) /* ncurses extension */
#define O_INPUT_LIMIT (0x2000U) /* ncurses extension */
/* form options */
#define O_NL_OVERLOAD (0x0001U)
#define O_BS_OVERLOAD (0x0002U)
/* form driver commands */
#define REQ_NEXT_PAGE (KEY_MAX + 1) /* move to next page */
#define REQ_PREV_PAGE (KEY_MAX + 2) /* move to previous page */
#define REQ_FIRST_PAGE (KEY_MAX + 3) /* move to first page */
#define REQ_LAST_PAGE (KEY_MAX + 4) /* move to last page */
#define REQ_NEXT_FIELD (KEY_MAX + 5) /* move to next field */
#define REQ_PREV_FIELD (KEY_MAX + 6) /* move to previous field */
#define REQ_FIRST_FIELD (KEY_MAX + 7) /* move to first field */
#define REQ_LAST_FIELD (KEY_MAX + 8) /* move to last field */
#define REQ_SNEXT_FIELD (KEY_MAX + 9) /* move to sorted next field */
#define REQ_SPREV_FIELD (KEY_MAX + 10) /* move to sorted prev field */
#define REQ_SFIRST_FIELD (KEY_MAX + 11) /* move to sorted first field */
#define REQ_SLAST_FIELD (KEY_MAX + 12) /* move to sorted last field */
#define REQ_LEFT_FIELD (KEY_MAX + 13) /* move to left to field */
#define REQ_RIGHT_FIELD (KEY_MAX + 14) /* move to right to field */
#define REQ_UP_FIELD (KEY_MAX + 15) /* move to up to field */
#define REQ_DOWN_FIELD (KEY_MAX + 16) /* move to down to field */
#define REQ_NEXT_CHAR (KEY_MAX + 17) /* move to next char in field */
#define REQ_PREV_CHAR (KEY_MAX + 18) /* move to prev char in field */
#define REQ_NEXT_LINE (KEY_MAX + 19) /* move to next line in field */
#define REQ_PREV_LINE (KEY_MAX + 20) /* move to prev line in field */
#define REQ_NEXT_WORD (KEY_MAX + 21) /* move to next word in field */
#define REQ_PREV_WORD (KEY_MAX + 22) /* move to prev word in field */
#define REQ_BEG_FIELD (KEY_MAX + 23) /* move to first char in field */
#define REQ_END_FIELD (KEY_MAX + 24) /* move after last char in fld */
#define REQ_BEG_LINE (KEY_MAX + 25) /* move to beginning of line */
#define REQ_END_LINE (KEY_MAX + 26) /* move after last char in line */
#define REQ_LEFT_CHAR (KEY_MAX + 27) /* move left in field */
#define REQ_RIGHT_CHAR (KEY_MAX + 28) /* move right in field */
#define REQ_UP_CHAR (KEY_MAX + 29) /* move up in field */
#define REQ_DOWN_CHAR (KEY_MAX + 30) /* move down in field */
#define REQ_NEW_LINE (KEY_MAX + 31) /* insert/overlay new line */
#define REQ_INS_CHAR (KEY_MAX + 32) /* insert blank char at cursor */
#define REQ_INS_LINE (KEY_MAX + 33) /* insert blank line at cursor */
#define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */
#define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */
#define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */
#define REQ_DEL_WORD (KEY_MAX + 37) /* delete word at cursor */
#define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */
#define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */
#define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */
#define REQ_OVL_MODE (KEY_MAX + 41) /* begin overlay mode */
#define REQ_INS_MODE (KEY_MAX + 42) /* begin insert mode */
#define REQ_SCR_FLINE (KEY_MAX + 43) /* scroll field forward a line */
#define REQ_SCR_BLINE (KEY_MAX + 44) /* scroll field backward a line */
#define REQ_SCR_FPAGE (KEY_MAX + 45) /* scroll field forward a page */
#define REQ_SCR_BPAGE (KEY_MAX + 46) /* scroll field backward a page */
#define REQ_SCR_FHPAGE (KEY_MAX + 47) /* scroll field forward half page */
#define REQ_SCR_BHPAGE (KEY_MAX + 48) /* scroll field backward half page */
#define REQ_SCR_FCHAR (KEY_MAX + 49) /* horizontal scroll char */
#define REQ_SCR_BCHAR (KEY_MAX + 50) /* horizontal scroll char */
#define REQ_SCR_HFLINE (KEY_MAX + 51) /* horizontal scroll line */
#define REQ_SCR_HBLINE (KEY_MAX + 52) /* horizontal scroll line */
#define REQ_SCR_HFHALF (KEY_MAX + 53) /* horizontal scroll half line */
#define REQ_SCR_HBHALF (KEY_MAX + 54) /* horizontal scroll half line */
#define REQ_VALIDATION (KEY_MAX + 55) /* validate field */
#define REQ_NEXT_CHOICE (KEY_MAX + 56) /* display next field choice */
#define REQ_PREV_CHOICE (KEY_MAX + 57) /* display prev field choice */
#define MIN_FORM_COMMAND (KEY_MAX + 1) /* used by form_driver */
#define MAX_FORM_COMMAND (KEY_MAX + 57) /* used by form_driver */
#if defined(MAX_COMMAND)
# if (MAX_FORM_COMMAND > MAX_COMMAND)
# error Something is wrong -- MAX_FORM_COMMAND is greater than MAX_COMMAND
# elif (MAX_COMMAND != (KEY_MAX + 128))
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
# endif
#else
# define MAX_COMMAND (KEY_MAX + 128)
#endif
/*************************
* standard field types *
*************************/
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
/************************************
* built-in additional field types *
* They are not defined in SVr4 *
************************************/
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
/***********************
* FIELDTYPE routines *
***********************/
extern FORM_EXPORT(FIELDTYPE *) new_fieldtype (
bool (* const field_check)(FIELD *,const void *),
bool (* const char_check)(int,const void *));
extern FORM_EXPORT(FIELDTYPE *) link_fieldtype(
FIELDTYPE *, FIELDTYPE *);
extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *);
extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
void * (* const make_arg)(va_list *),
void * (* const copy_arg)(const void *),
void (* const free_arg)(void *));
extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
bool (* const next_choice)(FIELD *,const void *),
bool (* const prev_choice)(FIELD *,const void *));
/*******************
* FIELD routines *
*******************/
extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int);
extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int);
extern FORM_EXPORT(int) free_field (FIELD *);
extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
extern FORM_EXPORT(int) set_max_field ( FIELD *,int);
extern FORM_EXPORT(int) move_field (FIELD *,int,int);
extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
extern FORM_EXPORT(int) set_new_page (FIELD *,bool);
extern FORM_EXPORT(int) set_field_just (FIELD *,int);
extern FORM_EXPORT(int) field_just (const FIELD *);
extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype);
extern FORM_EXPORT(int) set_field_back (FIELD *,chtype);
extern FORM_EXPORT(int) set_field_pad (FIELD *,int);
extern FORM_EXPORT(int) field_pad (const FIELD *);
extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
extern FORM_EXPORT(int) set_field_status (FIELD *,bool);
extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *);
extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options);
extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options);
extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options);
extern FORM_EXPORT(chtype) field_fore (const FIELD *);
extern FORM_EXPORT(chtype) field_back (const FIELD *);
extern FORM_EXPORT(bool) new_page (const FIELD *);
extern FORM_EXPORT(bool) field_status (const FIELD *);
extern FORM_EXPORT(void *) field_arg (const FIELD *);
extern FORM_EXPORT(void *) field_userptr (const FIELD *);
extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *);
extern FORM_EXPORT(char *) field_buffer (const FIELD *,int);
extern FORM_EXPORT(Field_Options) field_opts (const FIELD *);
/******************
* FORM routines *
******************/
extern FORM_EXPORT(FORM *) new_form (FIELD **);
extern FORM_EXPORT(FIELD **) form_fields (const FORM *);
extern FORM_EXPORT(FIELD *) current_field (const FORM *);
extern FORM_EXPORT(WINDOW *) form_win (const FORM *);
extern FORM_EXPORT(WINDOW *) form_sub (const FORM *);
extern FORM_EXPORT(Form_Hook) form_init (const FORM *);
extern FORM_EXPORT(Form_Hook) form_term (const FORM *);
extern FORM_EXPORT(Form_Hook) field_init (const FORM *);
extern FORM_EXPORT(Form_Hook) field_term (const FORM *);
extern FORM_EXPORT(int) free_form (FORM *);
extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **);
extern FORM_EXPORT(int) field_count (const FORM *);
extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *);
extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *);
extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *);
extern FORM_EXPORT(int) unfocus_current_field (FORM *);
extern FORM_EXPORT(int) field_index (const FIELD *);
extern FORM_EXPORT(int) set_form_page (FORM *,int);
extern FORM_EXPORT(int) form_page (const FORM *);
extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *);
extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook);
extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook);
extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook);
extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook);
extern FORM_EXPORT(int) post_form (FORM *);
extern FORM_EXPORT(int) unpost_form (FORM *);
extern FORM_EXPORT(int) pos_form_cursor (FORM *);
extern FORM_EXPORT(int) form_driver (FORM *,int);
# if NCURSES_WIDECHAR
extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
# endif
extern FORM_EXPORT(int) set_form_userptr (FORM *,void *);
extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options);
extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options);
extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options);
extern FORM_EXPORT(int) form_request_by_name (const char *);
extern FORM_EXPORT(const char *) form_request_name (int);
extern FORM_EXPORT(void *) form_userptr (const FORM *);
extern FORM_EXPORT(Form_Options) form_opts (const FORM *);
extern FORM_EXPORT(bool) data_ahead (const FORM *);
extern FORM_EXPORT(bool) data_behind (const FORM *);
#if NCURSES_SP_FUNCS
extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
#endif
#ifdef __cplusplus
}
#endif
/* *INDENT-ON*/
#endif /* FORM_H */

72
include/hashed_db.h Normal file
View File

@@ -0,0 +1,72 @@
/****************************************************************************
* 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 *
* "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 2006 *
****************************************************************************/
/*
* $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
#define DB_DBM_HSEARCH 0 /* quiet gcc -Wundef with db6 */
#include <db.h>
#ifndef DBM_SUFFIX
#define DBM_SUFFIX ".db"
#endif
#ifdef DB_VERSION_MAJOR
#define HASHED_DB_API DB_VERSION_MAJOR
#else
#define HASHED_DB_API 1 /* e.g., db 1.8.5 */
#endif
extern NCURSES_EXPORT(DB *) _nc_db_open(const char * /* path */, bool /* modify */);
extern NCURSES_EXPORT(bool) _nc_db_have_data(DBT * /* key */, DBT * /* data */, char ** /* buffer */, int * /* size */);
extern NCURSES_EXPORT(bool) _nc_db_have_index(DBT * /* key */, DBT * /* data */, char ** /* buffer */, int * /* size */);
extern NCURSES_EXPORT(int) _nc_db_close(DB * /* db */);
extern NCURSES_EXPORT(int) _nc_db_first(DB * /* db */, DBT * /* key */, DBT * /* data */);
extern NCURSES_EXPORT(int) _nc_db_next(DB * /* db */, DBT * /* key */, DBT * /* data */);
extern NCURSES_EXPORT(int) _nc_db_get(DB * /* db */, DBT * /* key */, DBT * /* data */);
extern NCURSES_EXPORT(int) _nc_db_put(DB * /* db */, DBT * /* key */, DBT * /* data */);
#endif
#endif /* HASHED_DB_H */

6
include/hashsize.h Normal file
View File

@@ -0,0 +1,6 @@
/*
* hashsize.h -- hash and token table constants
*/
#define CAPTABSIZE 497
#define HASHTABSIZE (497 * 2)

55
include/headers Normal file
View File

@@ -0,0 +1,55 @@
# $Id: headers,v 1.15 2020/08/29 18:51:13 tom Exp $
##############################################################################
# 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"), #
# 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 1996-on
#
curses.h
unctrl.h
ncurses_dll.h
# Support for termcap (and tic, etc.), which can be a separate library
@ termlib
term.h
termcap.h
# Headers used only for tic, other programs using internal interfaces
@ ticlib
$(srcdir)/tic.h
$(srcdir)/term_entry.h
$(srcdir)/nc_tparm.h
# Porting
@ port_win32con
$(srcdir)/ncurses_mingw.h
$(srcdir)/nc_mingw.h
@ port_win32
$(srcdir)/win32_curses.h
# vile:makemode

281
include/menu.h Normal file
View File

@@ -0,0 +1,281 @@
/****************************************************************************
* 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 *
* "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: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: menu.h,v 1.26 2020/12/12 00:38:02 tom Exp $ */
#ifndef ETI_MENU
#define ETI_MENU
#ifdef AMIGA
#define TEXT TEXT_ncurses
#endif
#include <curses.h>
#include <eti.h>
#ifdef __cplusplus
extern "C"
{
#endif
#if defined(BUILDING_MENU)
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API
#define MENU_EXPORT_VAR(type) MENU_IMPEXP type
typedef int Menu_Options;
typedef int Item_Options;
/* Menu options: */
#define O_ONEVALUE (0x01)
#define O_SHOWDESC (0x02)
#define O_ROWMAJOR (0x04)
#define O_IGNORECASE (0x08)
#define O_SHOWMATCH (0x10)
#define O_NONCYCLIC (0x20)
#define O_MOUSE_MENU (0x40)
/* Item options: */
#define O_SELECTABLE (0x01)
#if !NCURSES_OPAQUE_MENU
typedef struct
{
const char *str;
unsigned short length;
}
TEXT;
#endif /* !NCURSES_OPAQUE_MENU */
struct tagMENU;
typedef struct tagITEM
#if !NCURSES_OPAQUE_MENU
{
TEXT name; /* name of menu item */
TEXT description; /* description of item, optional in display */
struct tagMENU *imenu; /* Pointer to parent menu */
void *userptr; /* Pointer to user defined per item data */
Item_Options opt; /* Item options */
short index; /* Item number if connected to a menu */
short y; /* y and x location of item in menu */
short x;
bool value; /* Selection value */
struct tagITEM *left; /* neighbor items */
struct tagITEM *right;
struct tagITEM *up;
struct tagITEM *down;
}
#endif /* !NCURSES_OPAQUE_MENU */
ITEM;
typedef void (*Menu_Hook) (struct tagMENU *);
typedef struct tagMENU
#if 1 /* not yet: !NCURSES_OPAQUE_MENU */
{
short height; /* Nr. of chars high */
short width; /* Nr. of chars wide */
short rows; /* Nr. of items high */
short cols; /* Nr. of items wide */
short frows; /* Nr. of formatted items high */
short fcols; /* Nr. of formatted items wide */
short arows; /* Nr. of items high (actual) */
short namelen; /* Max. name length */
short desclen; /* Max. description length */
short marklen; /* Length of mark, if any */
short itemlen; /* Length of one item */
short spc_desc; /* Spacing for descriptor */
short spc_cols; /* Spacing for columns */
short spc_rows; /* Spacing for rows */
char *pattern; /* Buffer to store match chars */
short pindex; /* Index into pattern buffer */
WINDOW *win; /* Window containing menu */
WINDOW *sub; /* Subwindow for menu display */
WINDOW *userwin; /* User's window */
WINDOW *usersub; /* User's subwindow */
ITEM **items; /* array of items */
short nitems; /* Nr. of items in menu */
ITEM *curitem; /* Current item */
short toprow; /* Top row of menu */
chtype fore; /* Selection attribute */
chtype back; /* Nonselection attribute */
chtype grey; /* Inactive attribute */
unsigned char pad; /* Pad character */
Menu_Hook menuinit; /* User hooks */
Menu_Hook menuterm;
Menu_Hook iteminit;
Menu_Hook itemterm;
void *userptr; /* Pointer to menus user data */
char *mark; /* Pointer to marker string */
Menu_Options opt; /* Menu options */
unsigned short status; /* Internal state of menu */
}
#endif /* !NCURSES_OPAQUE_MENU */
MENU;
/* Define keys */
#define REQ_LEFT_ITEM (KEY_MAX + 1)
#define REQ_RIGHT_ITEM (KEY_MAX + 2)
#define REQ_UP_ITEM (KEY_MAX + 3)
#define REQ_DOWN_ITEM (KEY_MAX + 4)
#define REQ_SCR_ULINE (KEY_MAX + 5)
#define REQ_SCR_DLINE (KEY_MAX + 6)
#define REQ_SCR_DPAGE (KEY_MAX + 7)
#define REQ_SCR_UPAGE (KEY_MAX + 8)
#define REQ_FIRST_ITEM (KEY_MAX + 9)
#define REQ_LAST_ITEM (KEY_MAX + 10)
#define REQ_NEXT_ITEM (KEY_MAX + 11)
#define REQ_PREV_ITEM (KEY_MAX + 12)
#define REQ_TOGGLE_ITEM (KEY_MAX + 13)
#define REQ_CLEAR_PATTERN (KEY_MAX + 14)
#define REQ_BACK_PATTERN (KEY_MAX + 15)
#define REQ_NEXT_MATCH (KEY_MAX + 16)
#define REQ_PREV_MATCH (KEY_MAX + 17)
#define MIN_MENU_COMMAND (KEY_MAX + 1)
#define MAX_MENU_COMMAND (KEY_MAX + 17)
/*
* Some AT&T code expects MAX_COMMAND to be out-of-band not
* just for menu commands but for forms ones as well.
*/
#if defined(MAX_COMMAND)
# if (MAX_MENU_COMMAND > MAX_COMMAND)
# error Something is wrong -- MAX_MENU_COMMAND is greater than MAX_COMMAND
# elif (MAX_COMMAND != (KEY_MAX + 128))
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
# endif
#else
# define MAX_COMMAND (KEY_MAX + 128)
#endif
/* --------- prototypes for libmenu functions ----------------------------- */
extern MENU_EXPORT(ITEM **) menu_items(const MENU *);
extern MENU_EXPORT(ITEM *) current_item(const MENU *);
extern MENU_EXPORT(ITEM *) new_item(const char *, const char *);
extern MENU_EXPORT(MENU *) new_menu(ITEM **);
extern MENU_EXPORT(Item_Options) item_opts(const ITEM *);
extern MENU_EXPORT(Menu_Options) menu_opts(const MENU *);
extern MENU_EXPORT(Menu_Hook) item_init(const MENU *);
extern MENU_EXPORT(Menu_Hook) item_term(const MENU *);
extern MENU_EXPORT(Menu_Hook) menu_init(const MENU *);
extern MENU_EXPORT(Menu_Hook) menu_term(const MENU *);
extern MENU_EXPORT(WINDOW *) menu_sub(const MENU *);
extern MENU_EXPORT(WINDOW *) menu_win(const MENU *);
extern MENU_EXPORT(const char *) item_description(const ITEM *);
extern MENU_EXPORT(const char *) item_name(const ITEM *);
extern MENU_EXPORT(const char *) menu_mark(const MENU *);
extern MENU_EXPORT(const char *) menu_request_name(int);
extern MENU_EXPORT(char *) menu_pattern(const MENU *);
extern MENU_EXPORT(void *) menu_userptr(const MENU *);
extern MENU_EXPORT(void *) item_userptr(const ITEM *);
extern MENU_EXPORT(chtype) menu_back(const MENU *);
extern MENU_EXPORT(chtype) menu_fore(const MENU *);
extern MENU_EXPORT(chtype) menu_grey(const MENU *);
extern MENU_EXPORT(int) free_item(ITEM *);
extern MENU_EXPORT(int) free_menu(MENU *);
extern MENU_EXPORT(int) item_count(const MENU *);
extern MENU_EXPORT(int) item_index(const ITEM *);
extern MENU_EXPORT(int) item_opts_off(ITEM *, Item_Options);
extern MENU_EXPORT(int) item_opts_on(ITEM *, Item_Options);
extern MENU_EXPORT(int) menu_driver(MENU *, int);
extern MENU_EXPORT(int) menu_opts_off(MENU *, Menu_Options);
extern MENU_EXPORT(int) menu_opts_on(MENU *, Menu_Options);
extern MENU_EXPORT(int) menu_pad(const MENU *);
extern MENU_EXPORT(int) pos_menu_cursor(const MENU *);
extern MENU_EXPORT(int) post_menu(MENU *);
extern MENU_EXPORT(int) scale_menu(const MENU *, int *, int *);
extern MENU_EXPORT(int) set_current_item(MENU *menu, ITEM *item);
extern MENU_EXPORT(int) set_item_init(MENU *, Menu_Hook);
extern MENU_EXPORT(int) set_item_opts(ITEM *, Item_Options);
extern MENU_EXPORT(int) set_item_term(MENU *, Menu_Hook);
extern MENU_EXPORT(int) set_item_userptr(ITEM *, void *);
extern MENU_EXPORT(int) set_item_value(ITEM *, bool);
extern MENU_EXPORT(int) set_menu_back(MENU *, chtype);
extern MENU_EXPORT(int) set_menu_fore(MENU *, chtype);
extern MENU_EXPORT(int) set_menu_format(MENU *, int, int);
extern MENU_EXPORT(int) set_menu_grey(MENU *, chtype);
extern MENU_EXPORT(int) set_menu_init(MENU *, Menu_Hook);
extern MENU_EXPORT(int) set_menu_items(MENU *, ITEM **);
extern MENU_EXPORT(int) set_menu_mark(MENU *, const char *);
extern MENU_EXPORT(int) set_menu_opts(MENU *, Menu_Options);
extern MENU_EXPORT(int) set_menu_pad(MENU *, int);
extern MENU_EXPORT(int) set_menu_pattern(MENU *, const char *);
extern MENU_EXPORT(int) set_menu_sub(MENU *, WINDOW *);
extern MENU_EXPORT(int) set_menu_term(MENU *, Menu_Hook);
extern MENU_EXPORT(int) set_menu_userptr(MENU *, void *);
extern MENU_EXPORT(int) set_menu_win(MENU *, WINDOW *);
extern MENU_EXPORT(int) set_top_row(MENU *, int);
extern MENU_EXPORT(int) top_row(const MENU *);
extern MENU_EXPORT(int) unpost_menu(MENU *);
extern MENU_EXPORT(int) menu_request_by_name(const char *);
extern MENU_EXPORT(int) set_menu_spacing(MENU *, int, int, int);
extern MENU_EXPORT(int) menu_spacing(const MENU *, int *, int *, int *);
extern MENU_EXPORT(bool) item_value(const ITEM *);
extern MENU_EXPORT(bool) item_visible(const ITEM *);
extern MENU_EXPORT(void) menu_format(const MENU *, int *, int *);
#if NCURSES_SP_FUNCS
extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN *, ITEM **);
#endif
#ifdef __cplusplus
}
#endif
#endif /* ETI_MENU */

98
include/mf_common.h Normal file
View File

@@ -0,0 +1,98 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 1998-2005,2012 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"), 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: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: mf_common.h,v 0.25 2020/02/02 23:34:34 tom Exp $ */
/* Common internal header for menu and form library */
#ifndef MF_COMMON_H_incl
#define MF_COMMON_H_incl 1
#include <ncurses_cfg.h>
#include <curses.h>
#include <stdlib.h>
#include <sys/types.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#if DECL_ERRNO
extern int errno;
#endif
/* in case of debug version we ignore the suppression of assertions */
#ifdef TRACE
# ifdef NDEBUG
# undef NDEBUG
# endif
#endif
#include <nc_alloc.h>
#if USE_RCS_IDS
#define MODULE_ID(id) static const char Ident[] = id;
#else
#define MODULE_ID(id) /*nothing */
#endif
/* Maximum regular 8-bit character code */
#define MAX_REGULAR_CHARACTER (0xff)
#define SET_ERROR(code) (errno=(code))
#define GET_ERROR() (errno)
#ifdef TRACE
#define RETURN(code) returnCode( SET_ERROR(code) )
#else
#define RETURN(code) return( SET_ERROR(code) )
#endif
/* The few common values in the status fields for menus and forms */
#define _POSTED (0x01U) /* menu or form is posted */
#define _IN_DRIVER (0x02U) /* menu or form is processing hook routine */
#define SetStatus(target,mask) (target)->status |= (unsigned short) (mask)
#define ClrStatus(target,mask) (target)->status = (unsigned short) (target->status & (~mask))
/* Call object hook */
#define Call_Hook( object, handler ) \
if ( (object) != 0 && ((object)->handler) != (void *) 0 )\
{\
SetStatus(object, _IN_DRIVER);\
(object)->handler(object);\
ClrStatus(object, _IN_DRIVER);\
}
#endif /* MF_COMMON_H_incl */

80
include/nc_access.h Normal file
View File

@@ -0,0 +1,80 @@
/****************************************************************************
* Copyright 2021 Thomas E. Dickey *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* "Software"), to deal in the Software without restriction, including *
* without limitation the rights to use, copy, modify, merge, publish, *
* distribute, distribute with modifications, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included *
* in all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
* Except as contained in this notice, the name(s) of the above copyright *
* holders shall not be used in advertising or otherwise to promote the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: nc_access.h,v 1.2 2021/07/10 22:07:06 tom Exp $ */
#ifndef NC_ACCESS_included
#define NC_ACCESS_included 1
/* *INDENT-OFF* */
#include <ncurses_cfg.h>
#include <curses.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Turn off this symbol to limit access to environment variables when root.
*/
#ifdef USE_ROOT_ENVIRON
#define use_terminfo_vars() 1
#else
#define use_terminfo_vars() _nc_env_access()
extern NCURSES_EXPORT(int) _nc_env_access (void);
#endif
/*
* Turn off this symbol to limit access to files when running setuid.
*/
#ifdef USE_ROOT_ACCESS
#define safe_fopen(name,mode) fopen(name,mode)
#define safe_open3(name,flags,mode) open(name,flags,mode)
#else
#define safe_fopen(name,mode) fopen(name,mode)
#define safe_open3(name,flags,mode) open(name,flags,mode)
extern NCURSES_EXPORT(FILE *) _nc_safe_fopen (const char *, const char *);
extern NCURSES_EXPORT(int) _nc_safe_open3 (const char *, int, mode_t);
#endif
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif /* NC_ACCESS_included */

128
include/nc_alloc.h Normal file
View File

@@ -0,0 +1,128 @@
/****************************************************************************
* Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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 1996-on *
****************************************************************************/
/* $Id: nc_alloc.h,v 1.28 2021/03/20 16:07:29 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
#if defined(HAVE_LIBDMALLOC) && HAVE_LIBDMALLOC
#include <string.h>
#undef strndup /* workaround for #define in GLIBC 2.7 */
#include <dmalloc.h> /* Gray Watson's library */
#else
#undef HAVE_LIBDMALLOC
#define HAVE_LIBDMALLOC 0
#endif
#if defined(HAVE_LIBDBMALLOC) && HAVE_LIBDBMALLOC
#include <dbmalloc.h> /* Conor Cahill's library */
#else
#undef HAVE_LIBDBMALLOC
#define HAVE_LIBDBMALLOC 0
#endif
#if defined(HAVE_LIBMPATROL) && HAVE_LIBMPATROL
#include <mpatrol.h> /* Memory-Patrol library */
#else
#undef HAVE_LIBMPATROL
#define HAVE_LIBMPATROL 0
#endif
#ifndef NO_LEAKS
#define NO_LEAKS 0
#endif
#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS
#define HAVE_NC_FREEALL 1
struct termtype;
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_DEPRECATED("use exit_terminfo");
#ifdef NCURSES_INTERNALS
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_tic(int);
extern NCURSES_EXPORT(void) _nc_free_tparm(void);
extern void _nc_leaks_dump_entry(void);
extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
#if NCURSES_SP_FUNCS
extern GCC_NORETURN NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int);
#endif
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int);
#else /* !NCURSES_INTERNALS */
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_DEPRECATED("use exit_curses");
#endif
#define ExitProgram(code) exit_curses(code)
#else
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_DEPRECATED("use exit_curses");
#endif /* NO_LEAKS, etc */
#ifndef HAVE_NC_FREEALL
#define HAVE_NC_FREEALL 0
#endif
#ifndef ExitProgram
#define ExitProgram(code) exit(code)
#endif
/* doalloc.c */
extern NCURSES_EXPORT(void *) _nc_doalloc(void *, size_t);
#if !HAVE_STRDUP
#undef strdup
#define strdup _nc_strdup
extern NCURSES_EXPORT(char *) _nc_strdup(const char *);
#endif
/* entries.c */
extern NCURSES_EXPORT(void) _nc_leaks_tinfo(void);
#define typeMalloc(type,elts) (type *)malloc((size_t)(elts)*sizeof(type))
#define typeCalloc(type,elts) (type *)calloc((size_t)(elts),sizeof(type))
#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (size_t)(elts)*sizeof(type))
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif /* NC_ALLOC_included */

89
include/nc_mingw.h Normal file
View File

@@ -0,0 +1,89 @@
/****************************************************************************
* 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 *
* "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 Dickey, 2008-on *
****************************************************************************/
/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 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
#else
# define WINVER 0x0501
#endif
#include <windows.h>
#undef sleep
#define sleep(n) Sleep((n) * 1000)
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for struct timeval */
#endif
#ifdef _MSC_VER
#include <winsock2.h> /* for struct timeval */
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <ncurses_dll.h>
NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
#define SIGHUP 1
#define SIGKILL 9
#define getlogin() "username"
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
NCURSES_EXPORT(int) _nc_wcwidth(wchar_t);
#ifdef __cplusplus
}
#endif
#endif /* _WIN32 */
#endif /* NC_MINGW_H */

80
include/nc_panel.h Normal file
View File

@@ -0,0 +1,80 @@
/****************************************************************************
* 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 *
* "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: Juergen Pfeifer 1997 *
* and: Thomas E. Dickey *
****************************************************************************/
/*
* $Id: nc_panel.h,v 1.10 2020/02/02 23:34:34 tom Exp $
*
* nc_panel.h
*
* Headerfile to provide an interface for the panel layer into
* the SCREEN structure of the ncurses core.
*/
#ifndef NC_PANEL_H
#define NC_PANEL_H 1
#include <ncurses_cfg.h>
#include <curses.h>
#ifdef __cplusplus
extern "C"
{
#endif
struct panel; /* Forward Declaration */
struct panelhook
{
struct panel *top_panel;
struct panel *bottom_panel;
struct panel *stdscr_pseudo_panel;
#if NO_LEAKS
int (*destroy) (struct panel *);
#endif
};
struct screen; /* Forward declaration */
/* Retrieve the panelhook of the specified screen */
extern NCURSES_EXPORT(struct panelhook *)
_nc_panelhook (void);
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(struct panelhook *)
NCURSES_SP_NAME(_nc_panelhook) (SCREEN *);
#endif
#ifdef __cplusplus
}
#endif
#endif /* NC_PANEL_H */

90
include/nc_string.h Normal file
View File

@@ -0,0 +1,90 @@
/****************************************************************************
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2012-2013,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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 2012 *
****************************************************************************/
#ifndef STRING_HACKS_H
#define STRING_HACKS_H 1
#include <ncurses_cfg.h>
#if HAVE_BSD_STRING_H
#include <bsd/string.h>
#endif
/*
* $Id: nc_string.h,v 1.9 2021/04/25 00:10:43 tom Exp $
*
* String-hacks. Use these macros to stifle warnings on (presumably) correct
* uses of strcat, strcpy and sprintf.
*
* By the way -
* A fundamental limitation of the interfaces (and frequent issue in bug
* reports using these functions) is that sizes are passed as unsigned values
* (with associated sign-extension problems), limiting their effectiveness
* when checking for buffer overflow.
*/
#ifdef __cplusplus
#define NCURSES_VOID /* nothing */
#else
#define NCURSES_VOID (void)
#endif
#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
#ifdef __cplusplus
#define _nc_SPRINTF NCURSES_VOID snprintf
#else
#define _nc_SPRINTF NCURSES_VOID (snprintf)
#endif
#define _nc_SLIMIT(n) NCURSES_CAST(size_t,n),
#else
#define _nc_SPRINTF NCURSES_VOID sprintf
#define _nc_SLIMIT(n) /* nothing */
#endif
#endif /* STRING_HACKS_H */

168
include/nc_termios.h Normal file
View File

@@ -0,0 +1,168 @@
/****************************************************************************
* 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 *
* "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 2011 *
****************************************************************************/
/* $Id: nc_termios.h,v 1.8 2020/08/29 20:53:19 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 */
#if HAVE_TERMIO_H
/* Add definitions to make termio look like termios.
* But ifdef it, since there are some implementations
* that try to do this for us in a fake <termio.h>.
*/
#ifndef TCSADRAIN
#define TCSADRAIN TCSETAW
#endif
#ifndef TCSAFLUSH
#define TCSAFLUSH TCSETAF
#endif
#ifndef tcsetattr
#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
#endif
#ifndef tcgetattr
#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)
#endif
#ifndef cfgetospeed
#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
#endif
#ifndef TCIFLUSH
#define TCIFLUSH 0
#endif
#ifndef tcflush
#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
#endif
#if defined(EXP_WIN32_DRIVER)
#undef TERMIOS
#endif
#else /* !HAVE_TERMIO_H */
#if defined(_WIN32) && !defined(EXP_WIN32_DRIVER)
/* lflag bits */
#define ISIG 0x0001
#define ICANON 0x0002
#define ECHO 0x0004
#define ECHOE 0x0008
#define ECHOK 0x0010
#define ECHONL 0x0020
#define NOFLSH 0x0040
#define IEXTEN 0x0100
#define VEOF 4
#define VERASE 5
#define VINTR 6
#define VKILL 7
#define VMIN 9
#define VQUIT 10
#define VTIME 16
/* iflag bits */
#define IGNBRK 0x00001
#define BRKINT 0x00002
#define IGNPAR 0x00004
#define INPCK 0x00010
#define ISTRIP 0x00020
#define INLCR 0x00040
#define IGNCR 0x00080
#define ICRNL 0x00100
#define IXON 0x00400
#define IXOFF 0x01000
#define PARMRK 0x10000
/* oflag bits */
#define OPOST 0x00001
/* cflag bits */
#define CBAUD 0x0100f
#define B0 0x00000
#define B50 0x00001
#define B75 0x00002
#define B110 0x00003
#define B134 0x00004
#define B150 0x00005
#define B200 0x00006
#define B300 0x00007
#define B600 0x00008
#define B1200 0x00009
#define B1800 0x0000a
#define B2400 0x0000b
#define B4800 0x0000c
#define B9600 0x0000d
#define CSIZE 0x00030
#define CS8 0x00030
#define CSTOPB 0x00040
#define CREAD 0x00080
#define PARENB 0x00100
#define PARODD 0x00200
#define HUPCL 0x00400
#define CLOCAL 0x00800
#define TCIFLUSH 0
#define TCSADRAIN 3
#ifndef cfgetospeed
#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
#endif
#ifndef tcsetattr
#define tcsetattr(fd, opt, arg) _nc_mingw_tcsetattr(fd, opt, arg)
#endif
#ifndef tcgetattr
#define tcgetattr(fd, arg) _nc_mingw_tcgetattr(fd, arg)
#endif
#ifndef tcflush
#define tcflush(fd, queue) _nc_mingw_tcflush(fd, queue)
#endif
#undef ttyname
#define ttyname(fd) NULL
#endif /* _WIN32 */
#endif /* HAVE_TERMIO_H */
#endif /* HAVE_TERMIOS_H */
#endif /* NC_TERMIOS_included */

92
include/nc_tparm.h Normal file
View File

@@ -0,0 +1,92 @@
/****************************************************************************
* 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 *
* "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 2006 *
****************************************************************************/
/* $Id: nc_tparm.h,v 1.11 2020/05/27 23:33:31 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.
*/
#ifndef TPARM_ARG
#ifdef NCURSES_TPARM_ARG
#define TPARM_ARG NCURSES_TPARM_ARG
#else
#define TPARM_ARG long
#endif
#endif /* TPARAM_ARG */
#define TPARM_N(n) (TPARM_ARG)(n)
#define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j))
#if NCURSES_TPARM_VARARGS
#define TPARM_8(a,b,c,d,e,f,g,h,i) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i))
#define TPARM_7(a,b,c,d,e,f,g,h) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h))
#define TPARM_6(a,b,c,d,e,f,g) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g))
#define TPARM_5(a,b,c,d,e,f) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f))
#define TPARM_4(a,b,c,d,e) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e))
#define TPARM_3(a,b,c,d) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d))
#define TPARM_2(a,b,c) tparm(a,TPARM_N(b),TPARM_N(c))
#define TPARM_1(a,b) tparm(a,TPARM_N(b))
#define TPARM_0(a) tparm(a)
#else
#define TPARM_8(a,b,c,d,e,f,g,h,i) TPARM_9(a,b,c,d,e,f,g,h,i,0)
#define TPARM_7(a,b,c,d,e,f,g,h) TPARM_8(a,b,c,d,e,f,g,h,0)
#define TPARM_6(a,b,c,d,e,f,g) TPARM_7(a,b,c,d,e,f,g,0)
#define TPARM_5(a,b,c,d,e,f) TPARM_6(a,b,c,d,e,f,0)
#define TPARM_4(a,b,c,d,e) TPARM_5(a,b,c,d,e,0)
#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_0(a) TPARM_1(a,0)
#endif
#ifdef NCURSES_INTERNALS
#define TIPARM_1(s,a) _nc_tiparm(1,s,a)
#define TIPARM_2(s,a,b) _nc_tiparm(2,s,a,b)
#define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c)
#define TIPARM_4(s,a,b,c,d) _nc_tiparm(4,s,a,b,c,d)
#define TIPARM_5(s,a,b,c,d,e) _nc_tiparm(5,s,a,b,c,d,e)
#define TIPARM_6(s,a,b,c,d,e,f) _nc_tiparm(6,s,a,b,c,d,e,f)
#define TIPARM_7(s,a,b,c,d,e,f,g) _nc_tiparm(7,s,a,b,c,d,e,f,g)
#define TIPARM_8(s,a,b,c,d,e,f,g,h) _nc_tiparm(8,s,a,b,c,d,e,f,g,h)
#define TIPARM_9(s,a,b,c,d,e,f,g,h,i) _nc_tiparm(9,s,a,b,c,d,e,f,g,h,i)
#endif
#endif /* NC_TPARM_included */

183
include/nc_win32.h Normal file
View File

@@ -0,0 +1,183 @@
/****************************************************************************
* 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 *
* "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 Dickey, 2008-on *
****************************************************************************/
/* $Id: nc_win32.h,v 1.9 2020/09/13 00:17:30 tom Exp $ */
#ifndef NC_WIN32_H
#define NC_WIN32_H 1
#if defined(_WIN32) || defined(_WIN64)
#ifndef _NC_WINDOWS
#define _NC_WINDOWS
#endif
#ifdef TERMIOS
#error TERMIOS must not be defined on Windows
#endif
/* We no longer support WindowsXP.
Minimum requirement is Windows Vista or Server2008,
aka Windows NT 6.0
*/
#ifdef WINVER
# if WINVER < 0x0600
# error WINVER must at least be 0x0600
# endif
#else
# define WINVER 0x0600
#endif
#undef _NC_CHECK_MINTTY
#if WINVER >= 0x0600
#define _NC_CHECK_MINTTY
#endif
#include <windows.h>
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for struct timeval */
#endif
#ifdef _NC_MSC
#include <winsock2.h> /* for struct timeval */
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <ncurses_dll.h>
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
extern NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
extern NCURSES_EXPORT(int) _nc_wcwidth(wchar_t);
#ifdef EVENTLIST_2nd /* test.priv.h just needs the preceding */
extern NCURSES_EXPORT(void) _nc_console_size(int* Lines, int* Cols);
extern NCURSES_EXPORT(HANDLE) _nc_console_handle(int fd);
extern NCURSES_EXPORT(int) _nc_console_isatty(int fd);
extern NCURSES_EXPORT(int) _nc_console_test(int fd);
extern NCURSES_EXPORT(int) _nc_console_read(SCREEN *sp,HANDLE hdl,int *buf);
extern NCURSES_EXPORT(int) _nc_console_twait(SCREEN *, HANDLE,int,int,int * EVENTLIST_2nd(_nc_eventlist * evl));
extern NCURSES_EXPORT(WORD) _nc_console_MapColor(bool fore, int color);
extern NCURSES_EXPORT(void) _nc_console_selectActiveHandle(void);
extern NCURSES_EXPORT(bool) _nc_console_get_SBI(void);
extern NCURSES_EXPORT(void) _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info);
extern NCURSES_EXPORT(int) _nc_console_testmouse(SCREEN *,HANDLE,int EVENTLIST_2nd(_nc_eventlist*));
extern NCURSES_EXPORT(int) _nc_console_keyok(int keycode,int flag);
extern NCURSES_EXPORT(bool) _nc_console_keyExist(int keycode);
extern NCURSES_EXPORT(bool) _nc_console_checkinit(bool initFlag, bool assumeTermInfo);
extern NCURSES_EXPORT(int) _nc_console_vt_supported(void);
#ifdef _NC_CHECK_MINTTY
extern NCURSES_EXPORT(int) _nc_console_checkmintty(int fd, LPHANDLE pMinTTY);
#endif
#undef VALID_TERM_ENV
#define MS_TERMINAL "ms-terminal"
#define VALID_TERM_ENV(term_env, no_terminal) \
(term_env = (NonEmpty(term_env) \
? term_env \
: (_nc_console_vt_supported() \
? MS_TERMINAL \
: no_terminal)), \
NonEmpty(term_env))
/*
* Various Console mode definitions
*/
/* Flags to enable virtual Terminal processing */
#define VT_FLAG_OUT ENABLE_VIRTUAL_TERMINAL_PROCESSING
#define VT_FLAG_IN ENABLE_VIRTUAL_TERMINAL_INPUT
/* Default flags for input/output modes */
#define CONMODE_IN_DEFAULT (ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT)
#define CONMODE_OUT_DEFAULT (ENABLE_PROCESSED_OUTPUT | DISABLE_NEWLINE_AUTO_RETURN | ENABLE_LVB_GRID_WORLDWIDE)
/* Flags to reset from RAW/CBREAK */
#define CONMODE_NORAW (ENABLE_PROCESSED_INPUT|ENABLE_LINE_INPUT)
#define CONMODE_NOCBREAK (ENABLE_LINE_INPUT)
#if defined(USE_TERM_DRIVER) && defined(USE_WIN32CON_DRIVER)
extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
#endif
#define CON_NUMPAIRS 64
typedef struct {
BOOL initialized;
BOOL buffered;
BOOL window_only;
BOOL progMode;
BOOL isMinTTY;
BOOL isTermInfoConsole;
HANDLE out;
HANDLE inp;
HANDLE hdl;
HANDLE lastOut;
int numButtons;
LPDWORD ansi_map;
LPDWORD map;
LPDWORD rmap;
WORD pairs[CON_NUMPAIRS];
COORD origin;
CHAR_INFO *save_screen;
COORD save_size;
SMALL_RECT save_region;
CONSOLE_SCREEN_BUFFER_INFO SBI;
CONSOLE_SCREEN_BUFFER_INFO save_SBI;
CONSOLE_CURSOR_INFO save_CI;
TTY originalMode;
} ConsoleInfo;
extern NCURSES_EXPORT_VAR(ConsoleInfo) _nc_CONSOLE;
#define WINCONSOLE _nc_CONSOLE
#define TypeAlloca(type,count)(type*) _alloca(sizeof(type)*(size_t)(count))
#endif /* EVENTLIST_2nd */
#ifdef __cplusplus
}
#endif
#endif /* _WIN32 || _WIN64 */
#endif /* NC_WIN32_H */

237
include/ncurses_cfg.h Normal file
View File

@@ -0,0 +1,237 @@
/* include/ncurses_cfg.h. Generated automatically by configure. */
/****************************************************************************
* 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 *
* "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 1997-on *
****************************************************************************/
/*
* $Id: ncurses_cfg.hin,v 1.13 2020/03/08 12:37:59 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.
*
* Rather than list every definition, the configuration script substitutes the
* definitions that it finds using 'sed'. You need a patch (original date
* 971222) to autoconf 2.12 or 2.13 to do this.
*
* See:
* https://invisible-island.net/autoconf/
* ftp://ftp.invisible-island.net/autoconf/
*/
#ifndef NC_CONFIG_H
#define NC_CONFIG_H
#define PACKAGE "ncurses"
#define NCURSES_VERSION "6.3"
#define NCURSES_PATCHDATE 20211021
#define SYSTEM_NAME "linux-gnu"
#if 0
#include <stdlib.h>
#endif
#define HAVE_LONG_FILE_NAMES 1
#define MIXEDCASE_FILENAMES 1
#define HAVE_GPM_H 1
#define HAVE_LIBDL 1
#define LIBGPM_SONAME "libgpm.so.2"
#define HAVE_LIBGPM 1
#define TERMINFO_DIRS "/usr/share/terminfo"
#define TERMINFO "/usr/share/terminfo"
#define HAVE_BIG_CORE 1
#define PURE_TERMINFO 1
#define USE_HOME_TERMINFO 1
#define USE_ROOT_ENVIRON 1
#define USE_ROOT_ACCESS 1
#define HAVE_UNISTD_H 1
#define HAVE_REMOVE 1
#define HAVE_UNLINK 1
#define HAVE_LINK 1
#define HAVE_SYMLINK 1
#define USE_LINKS 1
#define HAVE_LANGINFO_CODESET 1
#define HAVE_FSEEKO 1
#define RGB_PATH "/usr/lib64/X11/rgb.txt"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define SIZEOF_SIGNED_CHAR 1
#define NCURSES_EXT_FUNCS 1
#define HAVE_ASSUME_DEFAULT_COLORS 1
#define HAVE_CURSES_VERSION 1
#define HAVE_HAS_KEY 1
#define HAVE_RESIZETERM 1
#define HAVE_RESIZE_TERM 1
#define HAVE_TERM_ENTRY_H 1
#define HAVE_USE_DEFAULT_COLORS 1
#define HAVE_USE_EXTENDED_NAMES 1
#define HAVE_USE_SCREEN 1
#define HAVE_USE_WINDOW 1
#define HAVE_WRESIZE 1
#define NCURSES_SP_FUNCS 1
#define HAVE_TPUTS_SP 1
#define NCURSES_EXT_PUTWIN 1
#define NCURSES_NO_PADDING 1
#define USE_SIGWINCH 1
#define HAVE_PTHREADS_H 1
#define HAVE_LIBPTHREADS 1
#define USE_PTHREADS 1
#define USE_REENTRANT 1
#define NCURSES_WRAP_PREFIX "_nc_"
#define USE_ASSUMED_COLOR 1
#define USE_HASHMAP 1
#define GCC_SCANF 1
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
#define GCC_PRINTF 1
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#define GCC_UNUSED __attribute__((unused))
#define GCC_NORETURN __attribute__((noreturn))
#define HAVE_NC_ALLOC_H 1
#define HAVE_GETTIMEOFDAY 1
#define STDC_HEADERS 1
#define HAVE_DIRENT_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_REGEX_H_FUNCS 1
#define HAVE_FCNTL_H 1
#define HAVE_GETOPT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_LOCALE_H 1
#define HAVE_MATH_H 1
#define HAVE_POLL_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_POLL_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_TTYENT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_WCTYPE_H 1
#define HAVE_UNISTD_H 1
#define HAVE_GETOPT_H 1
#define HAVE_GETOPT_HEADER 1
#define DECL_ENVIRON 1
#define HAVE_ENVIRON 1
#define HAVE_PUTENV 1
#define HAVE_SETENV 1
#define HAVE_STRDUP 1
#define HAVE_SYS_TIME_SELECT 1
#define SIG_ATOMIC_T volatile sig_atomic_t
#define HAVE_GETCWD 1
#define HAVE_GETEGID 1
#define HAVE_GETEUID 1
#define HAVE_GETOPT 1
#define HAVE_GETTTYNAM 1
#define HAVE_LOCALECONV 1
#define HAVE_POLL 1
#define HAVE_PUTENV 1
#define HAVE_REMOVE 1
#define HAVE_SELECT 1
#define HAVE_SETBUF 1
#define HAVE_SETBUFFER 1
#define HAVE_SETENV 1
#define HAVE_SETFSUID 1
#define HAVE_SETVBUF 1
#define HAVE_SIGACTION 1
#define HAVE_SNPRINTF 1
#define HAVE_STRDUP 1
#define HAVE_STRSTR 1
#define HAVE_SYSCONF 1
#define HAVE_TCGETPGRP 1
#define HAVE_TIMES 1
#define HAVE_TSEARCH 1
#define HAVE_VSNPRINTF 1
#define HAVE_ISASCII 1
#define HAVE_NANOSLEEP 1
#define HAVE_TERMIO_H 1
#define HAVE_TERMIOS_H 1
#define HAVE_UNISTD_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_TCGETATTR 1
#define HAVE_VSSCANF 1
#define HAVE_UNISTD_H 1
#define HAVE_MKSTEMP 1
#define HAVE_SIZECHANGE 1
#define HAVE_WORKING_POLL 1
#define HAVE_VA_COPY 1
#define HAVE_UNISTD_H 1
#define HAVE_FORK 1
#define HAVE_VFORK 1
#define HAVE_WORKING_VFORK 1
#define HAVE_WORKING_FORK 1
#define USE_FOPEN_BIN_R 1
#define USE_OPENPTY_HEADER <pty.h>
#define USE_XTERM_PTY 1
#define HAVE_TYPEINFO 1
#define HAVE_IOSTREAM 1
#define IOSTREAM_NAMESPACE 1
#define SIZEOF_BOOL 1
#define CPP_HAS_STATIC_CAST 1
#define HAVE_SLK_COLOR 1
#define HAVE_PANEL_H 1
#define HAVE_LIBPANEL 1
#define HAVE_MENU_H 1
#define HAVE_LIBMENU 1
#define HAVE_FORM_H 1
#define HAVE_LIBFORM 1
#define NCURSES_PATHSEP ':'
#define NCURSES_VERSION_STRING "6.3.20211021"
#define NCURSES_OSPEED_COMPAT 1
#define HAVE_CURSES_DATA_BOOLNAMES 1
#include <ncurses_def.h>
/* The C compiler may not treat these properly but C++ has to */
#ifdef __cplusplus
#undef const
#undef inline
#endif
/* On HP-UX, the C compiler doesn't grok mbstate_t without
-D_XOPEN_SOURCE=500. However, this causes problems on
IRIX. So, we #define mbstate_t to int in configure.in
only for the C compiler if needed. */
#ifndef __cplusplus
#ifdef NEED_MBSTATE_T_DEF
#define mbstate_t int
#endif
#endif
/*
* vile:cmode
*/
#endif /* NC_CONFIG_H */

74
include/ncurses_cfg.hin Normal file
View File

@@ -0,0 +1,74 @@
/****************************************************************************
* 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 *
* "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 1997-on *
****************************************************************************/
/*
* $Id: ncurses_cfg.hin,v 1.13 2020/03/08 12:37:59 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.
*
* Rather than list every definition, the configuration script substitutes the
* definitions that it finds using 'sed'. You need a patch (original date
* 971222) to autoconf 2.12 or 2.13 to do this.
*
* See:
* https://invisible-island.net/autoconf/
* ftp://ftp.invisible-island.net/autoconf/
*/
#ifndef NC_CONFIG_H
#define NC_CONFIG_H
@DEFS@
#include <ncurses_def.h>
/* The C compiler may not treat these properly but C++ has to */
#ifdef __cplusplus
#undef const
#undef inline
#endif
/* On HP-UX, the C compiler doesn't grok mbstate_t without
-D_XOPEN_SOURCE=500. However, this causes problems on
IRIX. So, we #define mbstate_t to int in configure.in
only for the C compiler if needed. */
#ifndef __cplusplus
#ifdef NEED_MBSTATE_T_DEF
#define mbstate_t int
#endif
#endif
/*
* vile:cmode
*/
#endif /* NC_CONFIG_H */

928
include/ncurses_def.h Normal file
View File

@@ -0,0 +1,928 @@
/*
* This file is generated by ./MKncurses_def.sh
*/
#ifndef NC_DEFINE_H
#define NC_DEFINE_H 1
#ifndef BROKEN_LINKER
#define BROKEN_LINKER 0
#endif
#ifndef BSD_TPUTS
#define BSD_TPUTS 0
#endif
#ifndef CGETENT_CONST
#define CGETENT_CONST /* nothing */
#endif
#ifndef CPP_HAS_PARAM_INIT
#define CPP_HAS_PARAM_INIT 0
#endif
#ifndef CURSES_ACS_ARRAY
#define CURSES_ACS_ARRAY acs_map
#endif
#ifndef CURSES_WACS_ARRAY
#define CURSES_WACS_ARRAY _nc_wacs
#endif
#ifndef DECL_ERRNO
#define DECL_ERRNO 0
#endif
#ifndef ETIP_NEEDS_MATH_H
#define ETIP_NEEDS_MATH_H 0
#endif
#ifndef GCC_NORETURN
#define GCC_NORETURN /* nothing */
#endif
#ifndef GCC_UNUSED
#define GCC_UNUSED /* nothing */
#endif
#ifndef HAVE_ALLOC_PAIR
#define HAVE_ALLOC_PAIR 0
#endif
#ifndef HAVE_ASSUME_DEFAULT_COLORS
#define HAVE_ASSUME_DEFAULT_COLORS 0
#endif
#ifndef HAVE_BIG_CORE
#define HAVE_BIG_CORE 0
#endif
#ifndef HAVE_BSD_CGETENT
#define HAVE_BSD_CGETENT 0
#endif
#ifndef HAVE_BSD_SIGNAL_H
#define HAVE_BSD_SIGNAL_H 0
#endif
#ifndef HAVE_BSD_STRING_H
#define HAVE_BSD_STRING_H 0
#endif
#ifndef HAVE_BTOWC
#define HAVE_BTOWC 0
#endif
#ifndef HAVE_BUILTIN_H
#define HAVE_BUILTIN_H 0
#endif
#ifndef HAVE_CHGAT
#define HAVE_CHGAT 1
#endif
#ifndef HAVE_COLOR_CONTENT
#define HAVE_COLOR_CONTENT 1
#endif
#ifndef HAVE_COLOR_SET
#define HAVE_COLOR_SET 1
#endif
#ifndef HAVE_CONSISTENT_GETENV
#define HAVE_CONSISTENT_GETENV 0
#endif
#ifndef HAVE_COPYWIN
#define HAVE_COPYWIN 1
#endif
#ifndef HAVE_CURSCR
#define HAVE_CURSCR 1
#endif
#ifndef HAVE_CURSES_DATA_TABSIZE
#define HAVE_CURSES_DATA_TABSIZE 1
#endif
#ifndef HAVE_CURSES_DATA_TTYTYPE
#define HAVE_CURSES_DATA_TTYTYPE 1
#endif
#ifndef HAVE_DELSCREEN
#define HAVE_DELSCREEN 1
#endif
#ifndef HAVE_DERWIN
#define HAVE_DERWIN 1
#endif
#ifndef HAVE_DIRENT_H
#define HAVE_DIRENT_H 0
#endif
#ifndef HAVE_DUPWIN
#define HAVE_DUPWIN 1
#endif
#ifndef HAVE_ERRNO
#define HAVE_ERRNO 0
#endif
#ifndef HAVE_EXIT_CURSES
#define HAVE_EXIT_CURSES 1
#endif
#ifndef HAVE_EXIT_TERMINFO
#define HAVE_EXIT_TERMINFO 1
#endif
#ifndef HAVE_FCNTL_H
#define HAVE_FCNTL_H 0
#endif
#ifndef HAVE_FILTER
#define HAVE_FILTER 1
#endif
#ifndef HAVE_FORM_H
#define HAVE_FORM_H 0
#endif
#ifndef HAVE_GETBEGX
#define HAVE_GETBEGX 1
#endif
#ifndef HAVE_GETCURX
#define HAVE_GETCURX 1
#endif
#ifndef HAVE_GETCWD
#define HAVE_GETCWD 0
#endif
#ifndef HAVE_GETEGID
#define HAVE_GETEGID 0
#endif
#ifndef HAVE_GETEUID
#define HAVE_GETEUID 0
#endif
#ifndef HAVE_GETMAXX
#define HAVE_GETMAXX 1
#endif
#ifndef HAVE_GETNSTR
#define HAVE_GETNSTR 0
#endif
#ifndef HAVE_GETOPT_H
#define HAVE_GETOPT_H 0
#endif
#ifndef HAVE_GETPARX
#define HAVE_GETPARX 1
#endif
#ifndef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 0
#endif
#ifndef HAVE_GETTTYNAM
#define HAVE_GETTTYNAM 0
#endif
#ifndef HAVE_GETWIN
#define HAVE_GETWIN 1
#endif
#ifndef HAVE_GPM_H
#define HAVE_GPM_H 0
#endif
#ifndef HAVE_GPP_BUILTIN_H
#define HAVE_GPP_BUILTIN_H 0
#endif
#ifndef HAVE_GXX_BUILTIN_H
#define HAVE_GXX_BUILTIN_H 0
#endif
#ifndef HAVE_HALFDELAY
#define HAVE_HALFDELAY 1
#endif
#ifndef HAVE_HAS_KEY
#define HAVE_HAS_KEY 0
#endif
#ifndef HAVE_INIT_EXTENDED_COLOR
#define HAVE_INIT_EXTENDED_COLOR 0
#endif
#ifndef HAVE_INTTYPES_H
#define HAVE_INTTYPES_H 0
#endif
#ifndef HAVE_IOSTREAM
#define HAVE_IOSTREAM 0
#endif
#ifndef HAVE_ISASCII
#define HAVE_ISASCII 0
#endif
#ifndef HAVE_ISSETUGID
#define HAVE_ISSETUGID 0
#endif
#ifndef HAVE_LANGINFO_CODESET
#define HAVE_LANGINFO_CODESET 0
#endif
#ifndef HAVE_LIBC_H
#define HAVE_LIBC_H 0
#endif
#ifndef HAVE_LIBDBMALLOC
#define HAVE_LIBDBMALLOC 0
#endif
#ifndef HAVE_LIBDMALLOC
#define HAVE_LIBDMALLOC 0
#endif
#ifndef HAVE_LIBFORM
#define HAVE_LIBFORM 0
#endif
#ifndef HAVE_LIBGPM
#define HAVE_LIBGPM 0
#endif
#ifndef HAVE_LIBMENU
#define HAVE_LIBMENU 0
#endif
#ifndef HAVE_LIBMPATROL
#define HAVE_LIBMPATROL 0
#endif
#ifndef HAVE_LIBPANEL
#define HAVE_LIBPANEL 0
#endif
#ifndef HAVE_LIB_PCRE2
#define HAVE_LIB_PCRE2 0
#endif
#ifndef HAVE_LIMITS_H
#define HAVE_LIMITS_H 0
#endif
#ifndef HAVE_LINK
#define HAVE_LINK 0
#endif
#ifndef HAVE_LOCALECONV
#define HAVE_LOCALECONV 0
#endif
#ifndef HAVE_LOCALE_H
#define HAVE_LOCALE_H 0
#endif
#ifndef HAVE_LONG_FILE_NAMES
#define HAVE_LONG_FILE_NAMES 0
#endif
#ifndef HAVE_MATH_H
#define HAVE_MATH_H 0
#endif
#ifndef HAVE_MBLEN
#define HAVE_MBLEN 0
#endif
#ifndef HAVE_MBRLEN
#define HAVE_MBRLEN 0
#endif
#ifndef HAVE_MBRTOWC
#define HAVE_MBRTOWC 0
#endif
#ifndef HAVE_MBSRTOWCS
#define HAVE_MBSRTOWCS 0
#endif
#ifndef HAVE_MBSTOWCS
#define HAVE_MBSTOWCS 0
#endif
#ifndef HAVE_MBTOWC
#define HAVE_MBTOWC 0
#endif
#ifndef HAVE_MENU_H
#define HAVE_MENU_H 0
#endif
#ifndef HAVE_MKSTEMP
#define HAVE_MKSTEMP 0
#endif
#ifndef HAVE_MVDERWIN
#define HAVE_MVDERWIN 1
#endif
#ifndef HAVE_MVVLINE
#define HAVE_MVVLINE 1
#endif
#ifndef HAVE_MVWIN
#define HAVE_MVWIN 1
#endif
#ifndef HAVE_MVWVLINE
#define HAVE_MVWVLINE 1
#endif
#ifndef HAVE_NANOSLEEP
#define HAVE_NANOSLEEP 0
#endif
#ifndef HAVE_NC_ALLOC_H
#define HAVE_NC_ALLOC_H 0
#endif
#ifndef HAVE_NEWPAD
#define HAVE_NEWPAD 1
#endif
#ifndef HAVE_PANEL_H
#define HAVE_PANEL_H 0
#endif
#ifndef HAVE_PCRE2POSIX_H
#define HAVE_PCRE2POSIX_H 0
#endif
#ifndef HAVE_PCREPOSIX_H
#define HAVE_PCREPOSIX_H 0
#endif
#ifndef HAVE_POLL
#define HAVE_POLL 0
#endif
#ifndef HAVE_POLL_H
#define HAVE_POLL_H 0
#endif
#ifndef HAVE_PURIFY
#define HAVE_PURIFY 0
#endif
#ifndef HAVE_PUTENV
#define HAVE_PUTENV 0
#endif
#ifndef HAVE_PUTWC
#define HAVE_PUTWC 0
#endif
#ifndef HAVE_PUTWIN
#define HAVE_PUTWIN 1
#endif
#ifndef HAVE_REGEXPR_H_FUNCS
#define HAVE_REGEXPR_H_FUNCS 0
#endif
#ifndef HAVE_REGEXP_H_FUNCS
#define HAVE_REGEXP_H_FUNCS 0
#endif
#ifndef HAVE_REGEX_H_FUNCS
#define HAVE_REGEX_H_FUNCS 0
#endif
#ifndef HAVE_REMOVE
#define HAVE_REMOVE 0
#endif
#ifndef HAVE_RESET_COLOR_PAIRS
#define HAVE_RESET_COLOR_PAIRS 0
#endif
#ifndef HAVE_RESIZETERM
#define HAVE_RESIZETERM 0
#endif
#ifndef HAVE_RESIZE_TERM
#define HAVE_RESIZE_TERM 0
#endif
#ifndef HAVE_RESTARTTERM
#define HAVE_RESTARTTERM 1
#endif
#ifndef HAVE_RIPOFFLINE
#define HAVE_RIPOFFLINE 1
#endif
#ifndef HAVE_SCR_DUMP
#define HAVE_SCR_DUMP 1
#endif
#ifndef HAVE_SELECT
#define HAVE_SELECT 0
#endif
#ifndef HAVE_SETBUF
#define HAVE_SETBUF 0
#endif
#ifndef HAVE_SETBUFFER
#define HAVE_SETBUFFER 0
#endif
#ifndef HAVE_SETFSUID
#define HAVE_SETFSUID 0
#endif
#ifndef HAVE_SETENV
#define HAVE_SETENV 0
#endif
#ifndef HAVE_SETUPTERM
#define HAVE_SETUPTERM 1
#endif
#ifndef HAVE_SETVBUF
#define HAVE_SETVBUF 0
#endif
#ifndef HAVE_SGTTY_H
#define HAVE_SGTTY_H 0
#endif
#ifndef HAVE_SIGACTION
#define HAVE_SIGACTION 0
#endif
#ifndef HAVE_SIGVEC
#define HAVE_SIGVEC 0
#endif
#ifndef HAVE_SIZECHANGE
#define HAVE_SIZECHANGE 0
#endif
#ifndef HAVE_SLK_COLOR
#define HAVE_SLK_COLOR 0
#endif
#ifndef HAVE_SLK_INIT
#define HAVE_SLK_INIT 1
#endif
#ifndef HAVE_SNPRINTF
#define HAVE_SNPRINTF 0
#endif
#ifndef HAVE_STDINT_H
#define HAVE_STDINT_H 0
#endif
#ifndef HAVE_STRDUP
#define HAVE_STRDUP 0
#endif
#ifndef HAVE_STRLCAT
#define HAVE_STRLCAT 0
#endif
#ifndef HAVE_STRLCPY
#define HAVE_STRLCPY 0
#endif
#ifndef HAVE_STRSTR
#define HAVE_STRSTR 0
#endif
#ifndef HAVE_SYMLINK
#define HAVE_SYMLINK 0
#endif
#ifndef HAVE_SYSCONF
#define HAVE_SYSCONF 0
#endif
#ifndef HAVE_SYS_BSDTYPES_H
#define HAVE_SYS_BSDTYPES_H 0
#endif
#ifndef HAVE_SYS_IOCTL_H
#define HAVE_SYS_IOCTL_H 0
#endif
#ifndef HAVE_SYS_PARAM_H
#define HAVE_SYS_PARAM_H 0
#endif
#ifndef HAVE_SYS_POLL_H
#define HAVE_SYS_POLL_H 0
#endif
#ifndef HAVE_SYS_SELECT_H
#define HAVE_SYS_SELECT_H 0
#endif
#ifndef HAVE_SYS_TERMIO_H
#define HAVE_SYS_TERMIO_H 0
#endif
#ifndef HAVE_SYS_TIMES_H
#define HAVE_SYS_TIMES_H 0
#endif
#ifndef HAVE_SYS_TIME_H
#define HAVE_SYS_TIME_H 0
#endif
#ifndef HAVE_SYS_TIME_SELECT
#define HAVE_SYS_TIME_SELECT 0
#endif
#ifndef HAVE_TCGETATTR
#define HAVE_TCGETATTR 0
#endif
#ifndef HAVE_TCGETPGRP
#define HAVE_TCGETPGRP 0
#endif
#ifndef HAVE_TELL
#define HAVE_TELL 0
#endif
#ifndef HAVE_TERMATTRS
#define HAVE_TERMATTRS 1
#endif
#ifndef HAVE_TERMCAP_H
#define HAVE_TERMCAP_H 1
#endif
#ifndef HAVE_TERMIOS_H
#define HAVE_TERMIOS_H 0
#endif
#ifndef HAVE_TERMIO_H
#define HAVE_TERMIO_H 0
#endif
#ifndef HAVE_TERMNAME
#define HAVE_TERMNAME 1
#endif
#ifndef HAVE_TERM_ENTRY_H
#define HAVE_TERM_ENTRY_H 1
#endif
#ifndef HAVE_TERM_H
#define HAVE_TERM_H 1
#endif
#ifndef HAVE_TGETENT
#define HAVE_TGETENT 1
#endif
#ifndef HAVE_TIGETNUM
#define HAVE_TIGETNUM 1
#endif
#ifndef HAVE_TIGETSTR
#define HAVE_TIGETSTR 1
#endif
#ifndef HAVE_TIMES
#define HAVE_TIMES 0
#endif
#ifndef HAVE_TPUTS_SP
#define HAVE_TPUTS_SP 0
#endif
#ifndef HAVE_TSEARCH
#define HAVE_TSEARCH 0
#endif
#ifndef HAVE_TTYENT_H
#define HAVE_TTYENT_H 0
#endif
#ifndef HAVE_TYPEAHEAD
#define HAVE_TYPEAHEAD 1
#endif
#ifndef HAVE_TYPEINFO
#define HAVE_TYPEINFO 0
#endif
#ifndef HAVE_TYPE_ATTR_T
#define HAVE_TYPE_ATTR_T 0
#endif
#ifndef HAVE_TYPE_SIGACTION
#define HAVE_TYPE_SIGACTION 0
#endif
#ifndef HAVE_UNCTRL_H
#define HAVE_UNCTRL_H 1
#endif
#ifndef HAVE_UNISTD_H
#define HAVE_UNISTD_H 0
#endif
#ifndef HAVE_UNLINK
#define HAVE_UNLINK 0
#endif
#ifndef HAVE_USE_DEFAULT_COLORS
#define HAVE_USE_DEFAULT_COLORS 0
#endif
#ifndef HAVE_USE_ENV
#define HAVE_USE_ENV 1
#endif
#ifndef HAVE_USE_EXTENDED_NAMES
#define HAVE_USE_EXTENDED_NAMES 0
#endif
#ifndef HAVE_USE_SCREEN
#define HAVE_USE_SCREEN 0
#endif
#ifndef HAVE_USE_WINDOW
#define HAVE_USE_WINDOW 0
#endif
#ifndef HAVE_VFSCANF
#define HAVE_VFSCANF 0
#endif
#ifndef HAVE_VIDPUTS
#define HAVE_VIDPUTS 1
#endif
#ifndef HAVE_VID_PUTS
#define HAVE_VID_PUTS 1
#endif
#ifndef HAVE_VSNPRINTF
#define HAVE_VSNPRINTF 0
#endif
#ifndef HAVE_VSSCANF
#define HAVE_VSSCANF 0
#endif
#ifndef HAVE_VW_PRINTW
#define HAVE_VW_PRINTW 1
#endif
#ifndef HAVE_WCHGAT
#define HAVE_WCHGAT 1
#endif
#ifndef HAVE_WCSRTOMBS
#define HAVE_WCSRTOMBS 0
#endif
#ifndef HAVE_WCSTOMBS
#define HAVE_WCSTOMBS 0
#endif
#ifndef HAVE_WCTOB
#define HAVE_WCTOB 0
#endif
#ifndef HAVE_WCTOMB
#define HAVE_WCTOMB 0
#endif
#ifndef HAVE_WCTYPE_H
#define HAVE_WCTYPE_H 0
#endif
#ifndef HAVE_WINSDELLN
#define HAVE_WINSDELLN 1
#endif
#ifndef HAVE_WINSSTR
#define HAVE_WINSSTR 1
#endif
#ifndef HAVE_WORKING_POLL
#define HAVE_WORKING_POLL 0
#endif
#ifndef HAVE_WRESIZE
#define HAVE_WRESIZE 0
#endif
#ifndef HAVE_WSYNCDOWN
#define HAVE_WSYNCDOWN 1
#endif
#ifndef HAVE__DOSCAN
#define HAVE__DOSCAN 0
#endif
#ifndef HAVE__TRACEF
#define HAVE__TRACEF 0
#endif
#ifndef MIXEDCASE_FILENAMES
#define MIXEDCASE_FILENAMES 0
#endif
#ifndef NCURSES_CHAR_EQ
#define NCURSES_CHAR_EQ 0
#endif
#ifndef NCURSES_EXPANDED
#define NCURSES_EXPANDED 0
#endif
#ifndef NCURSES_EXT_COLORS
#define NCURSES_EXT_COLORS 0
#endif
#ifndef NCURSES_EXT_FUNCS
#define NCURSES_EXT_FUNCS 0
#endif
#ifndef NCURSES_EXT_PUTWIN
#define NCURSES_EXT_PUTWIN 0
#endif
#ifndef NCURSES_NO_PADDING
#define NCURSES_NO_PADDING 0
#endif
#ifndef NCURSES_OSPEED_COMPAT
#define NCURSES_OSPEED_COMPAT 0
#endif
#ifndef NCURSES_PATHSEP
#define NCURSES_PATHSEP ':'
#endif
#ifndef NCURSES_WIDECHAR
#define NCURSES_WIDECHAR 0
#endif
#ifndef NEED_PTEM_H
#define NEED_PTEM_H 0
#endif
#ifndef NO_LEAKS
#define NO_LEAKS 0
#endif
#ifndef PURE_TERMINFO
#define PURE_TERMINFO 0
#endif
#ifndef STDC_HEADERS
#define STDC_HEADERS 0
#endif
#ifndef SVR4_ACTION
#define SVR4_ACTION 0
#endif
#ifndef SVR4_TERMIO
#define SVR4_TERMIO 0
#endif
#ifndef SYSTEM_NAME
#define SYSTEM_NAME "unknown"
#endif
#ifndef TERMINFO
#define TERMINFO "none"
#endif
#ifndef TERMPATH
#define TERMPATH "none"
#endif
#ifndef TIME_WITH_SYS_TIME
#define TIME_WITH_SYS_TIME 0
#endif
#ifndef TYPEOF_CHTYPE
#define TYPEOF_CHTYPE 0
#endif
#ifndef USE_COLORFGBG
#define USE_COLORFGBG 0
#endif
#ifndef USE_FOPEN_BIN_R
#define USE_FOPEN_BIN_R 0
#endif
#ifndef USE_GETCAP
#define USE_GETCAP 0
#endif
#ifndef USE_GETCAP_CACHE
#define USE_GETCAP_CACHE 0
#endif
#ifndef USE_HARD_TABS
#define USE_HARD_TABS 0
#endif
#ifndef USE_HASHED_DB
#define USE_HASHED_DB 0
#endif
#ifndef USE_HASHMAP
#define USE_HASHMAP 0
#endif
#ifndef USE_HOME_TERMINFO
#define USE_HOME_TERMINFO 0
#endif
#ifndef USE_LINKS
#define USE_LINKS 0
#endif
#ifndef USE_MY_MEMMOVE
#define USE_MY_MEMMOVE 0
#endif
#ifndef USE_OK_BCOPY
#define USE_OK_BCOPY 0
#endif
#ifndef USE_PTHREADS_EINTR
#define USE_PTHREADS_EINTR 0
#endif
#ifndef USE_RCS_IDS
#define USE_RCS_IDS 0
#endif
#ifndef USE_REENTRANT
#define USE_REENTRANT 0
#endif
#ifndef USE_SAFE_SPRINTF
#define USE_SAFE_SPRINTF 0
#endif
#ifndef USE_SCROLL_HINTS
#define USE_SCROLL_HINTS 0
#endif
#ifndef USE_SIGWINCH
#define USE_SIGWINCH 0
#endif
#ifndef USE_STRING_HACKS
#define USE_STRING_HACKS 0
#endif
#ifndef USE_SYMLINKS
#define USE_SYMLINKS 0
#endif
#ifndef USE_SYSMOUSE
#define USE_SYSMOUSE 0
#endif
#ifndef USE_WEAK_SYMBOLS
#define USE_WEAK_SYMBOLS 0
#endif
#ifndef USE_WIDEC_SUPPORT
#define USE_WIDEC_SUPPORT 0
#endif
#ifndef USE_XMC_SUPPORT
#define USE_XMC_SUPPORT 0
#endif
#endif /* NC_DEFINE_H */

264
include/ncurses_defs Normal file
View File

@@ -0,0 +1,264 @@
# $Id: ncurses_defs,v 1.97 2021/06/26 18:56:32 tom Exp $
##############################################################################
# Copyright 2018-2020,2021 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"), #
# 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. #
##############################################################################
#
# See "MKncurses_def.sh" for an explanation.
#
# (hint: don't try to define NDEBUG ;-)
BROKEN_LINKER
BSD_TPUTS
CGETENT_CONST /* nothing */
CPP_HAS_PARAM_INIT
CURSES_ACS_ARRAY acs_map
CURSES_WACS_ARRAY _nc_wacs
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_EXIT_CURSES 1
HAVE_EXIT_TERMINFO 1
HAVE_FCNTL_H
HAVE_FILTER 1
HAVE_FORM_H
HAVE_GETBEGX 1
HAVE_GETCURX 1
HAVE_GETCWD
HAVE_GETEGID
HAVE_GETEUID
HAVE_GETMAXX 1
HAVE_GETNSTR
HAVE_GETOPT_H
HAVE_GETPARX 1
HAVE_GETTIMEOFDAY
HAVE_GETTTYNAM
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
HAVE_ISSETUGID
HAVE_LANGINFO_CODESET
HAVE_LIBC_H
HAVE_LIBDBMALLOC
HAVE_LIBDMALLOC
HAVE_LIBFORM
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
HAVE_MBLEN
HAVE_MBRLEN
HAVE_MBRTOWC
HAVE_MBSRTOWCS
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_PCRE2POSIX_H
HAVE_PCREPOSIX_H
HAVE_POLL
HAVE_POLL_H
HAVE_PURIFY
HAVE_PUTENV
HAVE_PUTWC
HAVE_PUTWIN 1
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
HAVE_SETBUF
HAVE_SETBUFFER
HAVE_SETFSUID
HAVE_SETENV
HAVE_SETUPTERM 1
HAVE_SETVBUF
HAVE_SGTTY_H
HAVE_SIGACTION
HAVE_SIGVEC
HAVE_SIZECHANGE
HAVE_SLK_COLOR
HAVE_SLK_INIT 1
HAVE_SNPRINTF
HAVE_STDINT_H
HAVE_STRDUP
HAVE_STRLCAT
HAVE_STRLCPY
HAVE_STRSTR
HAVE_SYMLINK
HAVE_SYSCONF
HAVE_SYS_BSDTYPES_H
HAVE_SYS_IOCTL_H
HAVE_SYS_PARAM_H
HAVE_SYS_POLL_H
HAVE_SYS_SELECT_H
HAVE_SYS_TERMIO_H
HAVE_SYS_TIMES_H
HAVE_SYS_TIME_H
HAVE_SYS_TIME_SELECT
HAVE_TCGETATTR
HAVE_TCGETPGRP
HAVE_TELL
HAVE_TERMATTRS 1
HAVE_TERMCAP_H 1
HAVE_TERMIOS_H
HAVE_TERMIO_H
HAVE_TERMNAME 1
HAVE_TERM_ENTRY_H 1
HAVE_TERM_H 1
HAVE_TGETENT 1
HAVE_TIGETNUM 1
HAVE_TIGETSTR 1
HAVE_TIMES
HAVE_TPUTS_SP
HAVE_TSEARCH
HAVE_TTYENT_H
HAVE_TYPEAHEAD 1
HAVE_TYPEINFO
HAVE_TYPE_ATTR_T
HAVE_TYPE_SIGACTION
HAVE_UNCTRL_H 1
HAVE_UNISTD_H
HAVE_UNLINK
HAVE_USE_DEFAULT_COLORS
HAVE_USE_ENV 1
HAVE_USE_EXTENDED_NAMES
HAVE_USE_SCREEN
HAVE_USE_WINDOW
HAVE_VFSCANF
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 ':'
NCURSES_WIDECHAR
NEED_PTEM_H
NO_LEAKS
PURE_TERMINFO
STDC_HEADERS
SVR4_ACTION
SVR4_TERMIO
SYSTEM_NAME "unknown"
TERMINFO "none"
TERMPATH "none"
TIME_WITH_SYS_TIME
TYPEOF_CHTYPE
USE_COLORFGBG
USE_FOPEN_BIN_R
USE_GETCAP
USE_GETCAP_CACHE
USE_HARD_TABS
USE_HASHED_DB
USE_HASHMAP
USE_HOME_TERMINFO
USE_LINKS
USE_MY_MEMMOVE
USE_OK_BCOPY
USE_PTHREADS_EINTR
USE_RCS_IDS
USE_REENTRANT
USE_SAFE_SPRINTF
USE_SCROLL_HINTS
USE_SIGWINCH
USE_STRING_HACKS
USE_SYMLINKS
USE_SYSMOUSE
USE_WEAK_SYMBOLS
USE_WIDEC_SUPPORT
USE_XMC_SUPPORT

99
include/ncurses_dll.h Normal file
View File

@@ -0,0 +1,99 @@
/****************************************************************************
* 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 *
* "Software"), to deal in the Software without restriction, including *
* without limitation the rights to use, copy, modify, merge, publish, *
* distribute, distribute with modifications, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included *
* in all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
* Except as contained in this notice, the name(s) of the above copyright *
* holders shall not be used in advertising or otherwise to promote the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen 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 (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#ifdef trace
#undef trace
#define TRACE
#endif
#endif /* broken compiler */
#endif /* MingW */
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.
*/
#define NCURSES_PUBLIC_VAR(name) _nc_##name
#if defined(BUILDING_NCURSES)
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
/*
* These symbols hide dllimport/dllexport, for compilers which care about it.
*/
#if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
# if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# else
# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
# endif
# define NCURSES_API __cdecl
#else
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
#endif
#endif /* NCURSES_DLL_H_incl */

99
include/ncurses_dll.h.in Normal file
View File

@@ -0,0 +1,99 @@
/****************************************************************************
* 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 *
* "Software"), to deal in the Software without restriction, including *
* without limitation the rights to use, copy, modify, merge, publish, *
* distribute, distribute with modifications, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included *
* in all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
* Except as contained in this notice, the name(s) of the above copyright *
* holders shall not be used in advertising or otherwise to promote the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen 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 (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#ifdef trace
#undef trace
#define TRACE
#endif
#endif /* broken compiler */
#endif /* MingW */
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.
*/
#define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name
#if defined(BUILDING_NCURSES)
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
/*
* These symbols hide dllimport/dllexport, for compilers which care about it.
*/
#if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
# if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# else
# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
# endif
# define NCURSES_API __cdecl
#else
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
#endif
#endif /* NCURSES_DLL_H_incl */

82
include/ncurses_mingw.h Normal file
View File

@@ -0,0 +1,82 @@
/****************************************************************************
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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: Juergen Pfeifer, 2008-on *
****************************************************************************/
/* $Id: ncurses_mingw.h,v 1.7 2021/06/17 21:26:02 tom Exp $ */
/*
* This is a placeholder up to now and describes what needs to be implemented
* to support I/O to external terminals with ncurses on the Windows OS.
*/
#ifdef _WIN32
#ifndef _NC_MINGWH
#define _NC_MINGWH
#define USE_CONSOLE_DRIVER 1
#undef TERMIOS
#define TERMIOS 1
typedef unsigned char cc_t;
typedef unsigned int tcflag_t;
typedef unsigned int speed_t;
typedef unsigned short otcflag_t;
typedef unsigned char ospeed_t;
#define NCCS 18
struct termios
{
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
char c_line;
cc_t c_cc[NCCS];
speed_t c_ispeed;
speed_t c_ospeed;
};
extern NCURSES_EXPORT(int) _nc_mingw_tcsetattr(
int fd,
int optional_actions,
const struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcgetattr(
int fd,
struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
int fd,
int queue);
extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);
#endif /* _NC_MINGWH */
#endif /* _WIN32 */

100
include/panel.h Normal file
View File

@@ -0,0 +1,100 @@
/****************************************************************************
* 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 *
* "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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Juergen Pfeifer 1996-1999,2008 *
****************************************************************************/
/* $Id: panel.h,v 1.14 2020/07/04 20:38:43 tom Exp $ */
/* panel.h -- interface file for panels library */
#ifndef NCURSES_PANEL_H_incl
#define NCURSES_PANEL_H_incl 1
#include <curses.h>
typedef struct panel
#if !NCURSES_OPAQUE_PANEL
{
WINDOW *win;
struct panel *below;
struct panel *above;
NCURSES_CONST void *user;
}
#endif /* !NCURSES_OPAQUE_PANEL */
PANEL;
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(BUILDING_PANEL)
# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API
#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type
extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *);
extern PANEL_EXPORT(void) update_panels (void);
extern PANEL_EXPORT(int) hide_panel (PANEL *);
extern PANEL_EXPORT(int) show_panel (PANEL *);
extern PANEL_EXPORT(int) del_panel (PANEL *);
extern PANEL_EXPORT(int) top_panel (PANEL *);
extern PANEL_EXPORT(int) bottom_panel (PANEL *);
extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *);
extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *);
extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *);
extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *);
extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *);
extern PANEL_EXPORT(int) move_panel (PANEL *, int, int);
extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *);
extern PANEL_EXPORT(int) panel_hidden (const PANEL *);
#if NCURSES_SP_FUNCS
extern PANEL_EXPORT(PANEL *) ground_panel(SCREEN *);
extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *);
extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
#endif
#if defined(__cplusplus)
}
#endif
#endif /* NCURSES_PANEL_H_incl */
/* end of panel.h */

429
include/parametrized.h Normal file
View File

@@ -0,0 +1,429 @@
#ifndef PARAMETRIZED_H
#define PARAMETRIZED_H 1
/*
* parametrized.h --- is a termcap capability parametrized?
*
* Note: this file is generated using MKparametrized.sh, do not edit by hand.
* A value of -1 in the table means suppress both pad and % translations.
* A value of 0 in the table means do pad but not % translations.
* A value of 1 in the table means do both pad and % translations.
*/
static short const parametrized[] = {
0, /* cbt */
0, /* bel */
0, /* cr */
1, /* csr */
0, /* tbc */
0, /* clear */
0, /* el */
0, /* ed */
1, /* hpa */
0, /* cmdch */
1, /* cup */
0, /* cud1 */
0, /* home */
0, /* civis */
0, /* cub1 */
1, /* mrcup */
0, /* cnorm */
0, /* cuf1 */
0, /* ll */
0, /* cuu1 */
0, /* cvvis */
0, /* dch1 */
0, /* dl1 */
0, /* dsl */
0, /* hd */
0, /* smacs */
0, /* blink */
0, /* bold */
0, /* smcup */
0, /* smdc */
0, /* dim */
0, /* smir */
0, /* invis */
0, /* prot */
0, /* rev */
0, /* smso */
0, /* smul */
1, /* ech */
0, /* rmacs */
0, /* sgr0 */
0, /* rmcup */
0, /* rmdc */
0, /* rmir */
0, /* rmso */
0, /* rmul */
0, /* flash */
0, /* ff */
0, /* fsl */
0, /* is1 */
0, /* is2 */
0, /* is3 */
0, /* if */
0, /* ich1 */
0, /* il1 */
0, /* ip */
0, /* kbs */
0, /* ktbc */
0, /* kclr */
0, /* kctab */
0, /* kdch1 */
0, /* kdl1 */
0, /* kcud1 */
0, /* krmir */
0, /* kel */
0, /* ked */
0, /* kf0 */
0, /* kf1 */
0, /* kf10 */
0, /* kf2 */
0, /* kf3 */
0, /* kf4 */
0, /* kf5 */
0, /* kf6 */
0, /* kf7 */
0, /* kf8 */
0, /* kf9 */
0, /* khome */
0, /* kich1 */
0, /* kil1 */
0, /* kcub1 */
0, /* kll */
0, /* knp */
0, /* kpp */
0, /* kcuf1 */
0, /* kind */
0, /* kri */
0, /* khts */
0, /* kcuu1 */
0, /* rmkx */
0, /* smkx */
0, /* lf0 */
0, /* lf1 */
0, /* lf10 */
0, /* lf2 */
0, /* lf3 */
0, /* lf4 */
0, /* lf5 */
0, /* lf6 */
0, /* lf7 */
0, /* lf8 */
0, /* lf9 */
0, /* rmm */
0, /* smm */
0, /* nel */
0, /* pad */
1, /* dch */
1, /* dl */
1, /* cud */
1, /* ich */
1, /* indn */
1, /* il */
1, /* cub */
1, /* cuf */
1, /* rin */
1, /* cuu */
1, /* pfkey */
1, /* pfloc */
1, /* pfx */
0, /* mc0 */
0, /* mc4 */
0, /* mc5 */
1, /* rep */
0, /* rs1 */
0, /* rs2 */
0, /* rs3 */
0, /* rf */
0, /* rc */
1, /* vpa */
0, /* sc */
0, /* ind */
0, /* ri */
1, /* sgr */
0, /* hts */
1, /* wind */
0, /* ht */
1, /* tsl */
0, /* uc */
0, /* hu */
0, /* iprog */
0, /* ka1 */
0, /* ka3 */
0, /* kb2 */
0, /* kc1 */
0, /* kc3 */
1, /* mc5p */
0, /* rmp */
-1, /* acsc */
1, /* pln */
0, /* kcbt */
0, /* smxon */
0, /* rmxon */
0, /* smam */
0, /* rmam */
0, /* xonc */
0, /* xoffc */
0, /* enacs */
0, /* smln */
0, /* rmln */
0, /* kbeg */
0, /* kcan */
0, /* kclo */
0, /* kcmd */
0, /* kcpy */
0, /* kcrt */
0, /* kend */
0, /* kent */
0, /* kext */
0, /* kfnd */
0, /* khlp */
0, /* kmrk */
0, /* kmsg */
0, /* kmov */
0, /* knxt */
0, /* kopn */
0, /* kopt */
0, /* kprv */
0, /* kprt */
0, /* krdo */
0, /* kref */
0, /* krfr */
0, /* krpl */
0, /* krst */
0, /* kres */
0, /* ksav */
0, /* kspd */
0, /* kund */
0, /* kBEG */
0, /* kCAN */
0, /* kCMD */
0, /* kCPY */
0, /* kCRT */
0, /* kDC */
0, /* kDL */
0, /* kslt */
0, /* kEND */
0, /* kEOL */
0, /* kEXT */
0, /* kFND */
1, /* kHLP */
1, /* kHOM */
1, /* kIC */
1, /* kLFT */
0, /* kMSG */
0, /* kMOV */
0, /* kNXT */
0, /* kOPT */
0, /* kPRV */
0, /* kPRT */
0, /* kRDO */
0, /* kRPL */
0, /* kRIT */
0, /* kRES */
0, /* kSAV */
0, /* kSPD */
0, /* kUND */
0, /* rfi */
0, /* kf11 */
0, /* kf12 */
0, /* kf13 */
0, /* kf14 */
0, /* kf15 */
0, /* kf16 */
0, /* kf17 */
0, /* kf18 */
0, /* kf19 */
0, /* kf20 */
0, /* kf21 */
0, /* kf22 */
0, /* kf23 */
0, /* kf24 */
0, /* kf25 */
0, /* kf26 */
0, /* kf27 */
0, /* kf28 */
0, /* kf29 */
0, /* kf30 */
0, /* kf31 */
0, /* kf32 */
0, /* kf33 */
0, /* kf34 */
0, /* kf35 */
0, /* kf36 */
0, /* kf37 */
0, /* kf38 */
0, /* kf39 */
0, /* kf40 */
0, /* kf41 */
0, /* kf42 */
0, /* kf43 */
0, /* kf44 */
0, /* kf45 */
0, /* kf46 */
0, /* kf47 */
0, /* kf48 */
0, /* kf49 */
0, /* kf50 */
0, /* kf51 */
0, /* kf52 */
0, /* kf53 */
0, /* kf54 */
0, /* kf55 */
0, /* kf56 */
0, /* kf57 */
0, /* kf58 */
0, /* kf59 */
0, /* kf60 */
0, /* kf61 */
0, /* kf62 */
0, /* kf63 */
0, /* el1 */
0, /* mgc */
0, /* smgl */
0, /* smgr */
-1, /* fln */
1, /* sclk */
0, /* dclk */
0, /* rmclk */
1, /* cwin */
1, /* wingo */
0, /* hup */
1, /* dial */
1, /* qdial */
0, /* tone */
0, /* pulse */
0, /* hook */
0, /* pause */
0, /* wait */
1, /* u0 */
1, /* u1 */
1, /* u2 */
1, /* u3 */
1, /* u4 */
1, /* u5 */
1, /* u6 */
1, /* u7 */
1, /* u8 */
1, /* u9 */
0, /* op */
0, /* oc */
1, /* initc */
1, /* initp */
1, /* scp */
1, /* setf */
1, /* setb */
1, /* cpi */
1, /* lpi */
1, /* chr */
1, /* cvr */
1, /* defc */
0, /* swidm */
0, /* sdrfq */
0, /* sitm */
0, /* slm */
0, /* smicm */
0, /* snlq */
0, /* snrmq */
0, /* sshm */
0, /* ssubm */
0, /* ssupm */
0, /* sum */
0, /* rwidm */
0, /* ritm */
0, /* rlm */
0, /* rmicm */
0, /* rshm */
0, /* rsubm */
0, /* rsupm */
0, /* rum */
0, /* mhpa */
0, /* mcud1 */
0, /* mcub1 */
0, /* mcuf1 */
1, /* mvpa */
0, /* mcuu1 */
0, /* porder */
0, /* mcud */
0, /* mcub */
0, /* mcuf */
0, /* mcuu */
1, /* scs */
0, /* smgb */
1, /* smgbp */
1, /* smglp */
1, /* smgrp */
0, /* smgt */
1, /* smgtp */
0, /* sbim */
1, /* scsd */
0, /* rbim */
1, /* rcsd */
0, /* subcs */
0, /* supcs */
0, /* docr */
0, /* zerom */
1, /* csnm */
0, /* kmous */
0, /* minfo */
0, /* reqmp */
1, /* getm */
1, /* setaf */
1, /* setab */
1, /* pfxl */
0, /* devt */
0, /* csin */
0, /* s0ds */
0, /* s1ds */
0, /* s2ds */
0, /* s3ds */
1, /* smglr */
1, /* smgtb */
1, /* birep */
0, /* binel */
0, /* bicr */
1, /* colornm */
0, /* defbi */
0, /* endbi */
1, /* setcolor */
1, /* slines */
1, /* dispc */
0, /* smpch */
0, /* rmpch */
0, /* smsc */
0, /* rmsc */
0, /* pctrm */
0, /* scesc */
0, /* scesa */
0, /* ehhlm */
0, /* elhlm */
0, /* elohlm */
0, /* erhlm */
0, /* ethlm */
0, /* evhlm */
1, /* sgr1 */
1, /* slength */
0, /* OTi2 */
0, /* OTrs */
0, /* OTnl */
0, /* OTbc */
0, /* OTko */
0, /* OTma */
-1, /* OTG2 */
-1, /* OTG3 */
-1, /* OTG1 */
-1, /* OTG4 */
-1, /* OTGR */
-1, /* OTGL */
-1, /* OTGU */
-1, /* OTGD */
-1, /* OTGH */
-1, /* OTGV */
-1, /* OTGC */
0, /* meml */
0, /* memu */
0, /* box1 */
} /* 414 entries */;
#endif /* PARAMETRIZED_H */

874
include/term.h Normal file
View File

@@ -0,0 +1,874 @@
/****************************************************************************
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */
/* and: Eric S. Raymond <esr@snark.thyrsus.com> */
/* and: Thomas E. Dickey 1995-on */
/****************************************************************************/
/* $Id: MKterm.h.awk.in,v 1.82 2021/09/24 17:02:46 tom Exp $ */
/*
** term.h -- Definition of struct term
*/
#ifndef NCURSES_TERM_H_incl
#define NCURSES_TERM_H_incl 1
#undef NCURSES_VERSION
#define NCURSES_VERSION "6.3"
#include <ncurses_dll.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H
* definition (based on the system for which this was configured).
*/
#ifndef __NCURSES_H
typedef struct screen SCREEN;
#if 1
#undef NCURSES_SP_FUNCS
#define NCURSES_SP_FUNCS 20211021
#undef NCURSES_SP_NAME
#define NCURSES_SP_NAME(name) name##_sp
/* Define the sp-funcs helper function */
#undef NCURSES_SP_OUTC
#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
#endif
#endif /* __NCURSES_H */
#undef NCURSES_CONST
#define NCURSES_CONST const
#undef NCURSES_SBOOL
#define NCURSES_SBOOL char
#undef NCURSES_USE_DATABASE
#define NCURSES_USE_DATABASE 1
#undef NCURSES_USE_TERMCAP
#define NCURSES_USE_TERMCAP 0
#undef NCURSES_XNAMES
#define NCURSES_XNAMES 1
/* We will use these symbols to hide differences between
* termios/termio/sgttyb interfaces.
*/
#undef TTY
#undef SET_TTY
#undef GET_TTY
/* Assume POSIX termio if we have the header and function */
/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */
#if 1 && 1
#undef TERMIOS
#define TERMIOS 1
#include <termios.h>
#define TTY struct termios
#else /* !HAVE_TERMIOS_H */
/* #if HAVE_TERMIO_H */
#if 1
#undef TERMIOS
#define TERMIOS 1
#include <termio.h>
#define TTY struct termio
#else /* !HAVE_TERMIO_H */
#if (defined(_WIN32) || defined(_WIN64))
#if 0
#include <win32_curses.h>
#define TTY struct winconmode
#else
#include <ncurses_mingw.h>
#define TTY struct termios
#endif
#else
#undef TERMIOS
#include <sgtty.h>
#include <sys/ioctl.h>
#define TTY struct sgttyb
#endif /* MINGW32 */
#endif /* HAVE_TERMIO_H */
#endif /* HAVE_TERMIOS_H */
#ifdef TERMIOS
#define GET_TTY(fd, buf) tcgetattr(fd, buf)
#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)
#elif 0 && (defined(_WIN32) || defined(_WIN64))
#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)
#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),buf)
#else
#define GET_TTY(fd, buf) gtty(fd, buf)
#define SET_TTY(fd, buf) stty(fd, buf)
#endif
#ifndef GCC_NORETURN
#define GCC_NORETURN /* nothing */
#endif
#define NAMESIZE 256
/* The cast works because TERMTYPE is the first data in TERMINAL */
#define CUR ((TERMTYPE *)(cur_term))->
#define auto_left_margin CUR Booleans[0]
#define auto_right_margin CUR Booleans[1]
#define no_esc_ctlc CUR Booleans[2]
#define ceol_standout_glitch CUR Booleans[3]
#define eat_newline_glitch CUR Booleans[4]
#define erase_overstrike CUR Booleans[5]
#define generic_type CUR Booleans[6]
#define hard_copy CUR Booleans[7]
#define has_meta_key CUR Booleans[8]
#define has_status_line CUR Booleans[9]
#define insert_null_glitch CUR Booleans[10]
#define memory_above CUR Booleans[11]
#define memory_below CUR Booleans[12]
#define move_insert_mode CUR Booleans[13]
#define move_standout_mode CUR Booleans[14]
#define over_strike CUR Booleans[15]
#define status_line_esc_ok CUR Booleans[16]
#define dest_tabs_magic_smso CUR Booleans[17]
#define tilde_glitch CUR Booleans[18]
#define transparent_underline CUR Booleans[19]
#define xon_xoff CUR Booleans[20]
#define needs_xon_xoff CUR Booleans[21]
#define prtr_silent CUR Booleans[22]
#define hard_cursor CUR Booleans[23]
#define non_rev_rmcup CUR Booleans[24]
#define no_pad_char CUR Booleans[25]
#define non_dest_scroll_region CUR Booleans[26]
#define can_change CUR Booleans[27]
#define back_color_erase CUR Booleans[28]
#define hue_lightness_saturation CUR Booleans[29]
#define col_addr_glitch CUR Booleans[30]
#define cr_cancels_micro_mode CUR Booleans[31]
#define has_print_wheel CUR Booleans[32]
#define row_addr_glitch CUR Booleans[33]
#define semi_auto_right_margin CUR Booleans[34]
#define cpi_changes_res CUR Booleans[35]
#define lpi_changes_res CUR Booleans[36]
#define columns CUR Numbers[0]
#define init_tabs CUR Numbers[1]
#define lines CUR Numbers[2]
#define lines_of_memory CUR Numbers[3]
#define magic_cookie_glitch CUR Numbers[4]
#define padding_baud_rate CUR Numbers[5]
#define virtual_terminal CUR Numbers[6]
#define width_status_line CUR Numbers[7]
#define num_labels CUR Numbers[8]
#define label_height CUR Numbers[9]
#define label_width CUR Numbers[10]
#define max_attributes CUR Numbers[11]
#define maximum_windows CUR Numbers[12]
#define max_colors CUR Numbers[13]
#define max_pairs CUR Numbers[14]
#define no_color_video CUR Numbers[15]
#define buffer_capacity CUR Numbers[16]
#define dot_vert_spacing CUR Numbers[17]
#define dot_horz_spacing CUR Numbers[18]
#define max_micro_address CUR Numbers[19]
#define max_micro_jump CUR Numbers[20]
#define micro_col_size CUR Numbers[21]
#define micro_line_size CUR Numbers[22]
#define number_of_pins CUR Numbers[23]
#define output_res_char CUR Numbers[24]
#define output_res_line CUR Numbers[25]
#define output_res_horz_inch CUR Numbers[26]
#define output_res_vert_inch CUR Numbers[27]
#define print_rate CUR Numbers[28]
#define wide_char_size CUR Numbers[29]
#define buttons CUR Numbers[30]
#define bit_image_entwining CUR Numbers[31]
#define bit_image_type CUR Numbers[32]
#define back_tab CUR Strings[0]
#define bell CUR Strings[1]
#define carriage_return CUR Strings[2]
#define change_scroll_region CUR Strings[3]
#define clear_all_tabs CUR Strings[4]
#define clear_screen CUR Strings[5]
#define clr_eol CUR Strings[6]
#define clr_eos CUR Strings[7]
#define column_address CUR Strings[8]
#define command_character CUR Strings[9]
#define cursor_address CUR Strings[10]
#define cursor_down CUR Strings[11]
#define cursor_home CUR Strings[12]
#define cursor_invisible CUR Strings[13]
#define cursor_left CUR Strings[14]
#define cursor_mem_address CUR Strings[15]
#define cursor_normal CUR Strings[16]
#define cursor_right CUR Strings[17]
#define cursor_to_ll CUR Strings[18]
#define cursor_up CUR Strings[19]
#define cursor_visible CUR Strings[20]
#define delete_character CUR Strings[21]
#define delete_line CUR Strings[22]
#define dis_status_line CUR Strings[23]
#define down_half_line CUR Strings[24]
#define enter_alt_charset_mode CUR Strings[25]
#define enter_blink_mode CUR Strings[26]
#define enter_bold_mode CUR Strings[27]
#define enter_ca_mode CUR Strings[28]
#define enter_delete_mode CUR Strings[29]
#define enter_dim_mode CUR Strings[30]
#define enter_insert_mode CUR Strings[31]
#define enter_secure_mode CUR Strings[32]
#define enter_protected_mode CUR Strings[33]
#define enter_reverse_mode CUR Strings[34]
#define enter_standout_mode CUR Strings[35]
#define enter_underline_mode CUR Strings[36]
#define erase_chars CUR Strings[37]
#define exit_alt_charset_mode CUR Strings[38]
#define exit_attribute_mode CUR Strings[39]
#define exit_ca_mode CUR Strings[40]
#define exit_delete_mode CUR Strings[41]
#define exit_insert_mode CUR Strings[42]
#define exit_standout_mode CUR Strings[43]
#define exit_underline_mode CUR Strings[44]
#define flash_screen CUR Strings[45]
#define form_feed CUR Strings[46]
#define from_status_line CUR Strings[47]
#define init_1string CUR Strings[48]
#define init_2string CUR Strings[49]
#define init_3string CUR Strings[50]
#define init_file CUR Strings[51]
#define insert_character CUR Strings[52]
#define insert_line CUR Strings[53]
#define insert_padding CUR Strings[54]
#define key_backspace CUR Strings[55]
#define key_catab CUR Strings[56]
#define key_clear CUR Strings[57]
#define key_ctab CUR Strings[58]
#define key_dc CUR Strings[59]
#define key_dl CUR Strings[60]
#define key_down CUR Strings[61]
#define key_eic CUR Strings[62]
#define key_eol CUR Strings[63]
#define key_eos CUR Strings[64]
#define key_f0 CUR Strings[65]
#define key_f1 CUR Strings[66]
#define key_f10 CUR Strings[67]
#define key_f2 CUR Strings[68]
#define key_f3 CUR Strings[69]
#define key_f4 CUR Strings[70]
#define key_f5 CUR Strings[71]
#define key_f6 CUR Strings[72]
#define key_f7 CUR Strings[73]
#define key_f8 CUR Strings[74]
#define key_f9 CUR Strings[75]
#define key_home CUR Strings[76]
#define key_ic CUR Strings[77]
#define key_il CUR Strings[78]
#define key_left CUR Strings[79]
#define key_ll CUR Strings[80]
#define key_npage CUR Strings[81]
#define key_ppage CUR Strings[82]
#define key_right CUR Strings[83]
#define key_sf CUR Strings[84]
#define key_sr CUR Strings[85]
#define key_stab CUR Strings[86]
#define key_up CUR Strings[87]
#define keypad_local CUR Strings[88]
#define keypad_xmit CUR Strings[89]
#define lab_f0 CUR Strings[90]
#define lab_f1 CUR Strings[91]
#define lab_f10 CUR Strings[92]
#define lab_f2 CUR Strings[93]
#define lab_f3 CUR Strings[94]
#define lab_f4 CUR Strings[95]
#define lab_f5 CUR Strings[96]
#define lab_f6 CUR Strings[97]
#define lab_f7 CUR Strings[98]
#define lab_f8 CUR Strings[99]
#define lab_f9 CUR Strings[100]
#define meta_off CUR Strings[101]
#define meta_on CUR Strings[102]
#define newline CUR Strings[103]
#define pad_char CUR Strings[104]
#define parm_dch CUR Strings[105]
#define parm_delete_line CUR Strings[106]
#define parm_down_cursor CUR Strings[107]
#define parm_ich CUR Strings[108]
#define parm_index CUR Strings[109]
#define parm_insert_line CUR Strings[110]
#define parm_left_cursor CUR Strings[111]
#define parm_right_cursor CUR Strings[112]
#define parm_rindex CUR Strings[113]
#define parm_up_cursor CUR Strings[114]
#define pkey_key CUR Strings[115]
#define pkey_local CUR Strings[116]
#define pkey_xmit CUR Strings[117]
#define print_screen CUR Strings[118]
#define prtr_off CUR Strings[119]
#define prtr_on CUR Strings[120]
#define repeat_char CUR Strings[121]
#define reset_1string CUR Strings[122]
#define reset_2string CUR Strings[123]
#define reset_3string CUR Strings[124]
#define reset_file CUR Strings[125]
#define restore_cursor CUR Strings[126]
#define row_address CUR Strings[127]
#define save_cursor CUR Strings[128]
#define scroll_forward CUR Strings[129]
#define scroll_reverse CUR Strings[130]
#define set_attributes CUR Strings[131]
#define set_tab CUR Strings[132]
#define set_window CUR Strings[133]
#define tab CUR Strings[134]
#define to_status_line CUR Strings[135]
#define underline_char CUR Strings[136]
#define up_half_line CUR Strings[137]
#define init_prog CUR Strings[138]
#define key_a1 CUR Strings[139]
#define key_a3 CUR Strings[140]
#define key_b2 CUR Strings[141]
#define key_c1 CUR Strings[142]
#define key_c3 CUR Strings[143]
#define prtr_non CUR Strings[144]
#define char_padding CUR Strings[145]
#define acs_chars CUR Strings[146]
#define plab_norm CUR Strings[147]
#define key_btab CUR Strings[148]
#define enter_xon_mode CUR Strings[149]
#define exit_xon_mode CUR Strings[150]
#define enter_am_mode CUR Strings[151]
#define exit_am_mode CUR Strings[152]
#define xon_character CUR Strings[153]
#define xoff_character CUR Strings[154]
#define ena_acs CUR Strings[155]
#define label_on CUR Strings[156]
#define label_off CUR Strings[157]
#define key_beg CUR Strings[158]
#define key_cancel CUR Strings[159]
#define key_close CUR Strings[160]
#define key_command CUR Strings[161]
#define key_copy CUR Strings[162]
#define key_create CUR Strings[163]
#define key_end CUR Strings[164]
#define key_enter CUR Strings[165]
#define key_exit CUR Strings[166]
#define key_find CUR Strings[167]
#define key_help CUR Strings[168]
#define key_mark CUR Strings[169]
#define key_message CUR Strings[170]
#define key_move CUR Strings[171]
#define key_next CUR Strings[172]
#define key_open CUR Strings[173]
#define key_options CUR Strings[174]
#define key_previous CUR Strings[175]
#define key_print CUR Strings[176]
#define key_redo CUR Strings[177]
#define key_reference CUR Strings[178]
#define key_refresh CUR Strings[179]
#define key_replace CUR Strings[180]
#define key_restart CUR Strings[181]
#define key_resume CUR Strings[182]
#define key_save CUR Strings[183]
#define key_suspend CUR Strings[184]
#define key_undo CUR Strings[185]
#define key_sbeg CUR Strings[186]
#define key_scancel CUR Strings[187]
#define key_scommand CUR Strings[188]
#define key_scopy CUR Strings[189]
#define key_screate CUR Strings[190]
#define key_sdc CUR Strings[191]
#define key_sdl CUR Strings[192]
#define key_select CUR Strings[193]
#define key_send CUR Strings[194]
#define key_seol CUR Strings[195]
#define key_sexit CUR Strings[196]
#define key_sfind CUR Strings[197]
#define key_shelp CUR Strings[198]
#define key_shome CUR Strings[199]
#define key_sic CUR Strings[200]
#define key_sleft CUR Strings[201]
#define key_smessage CUR Strings[202]
#define key_smove CUR Strings[203]
#define key_snext CUR Strings[204]
#define key_soptions CUR Strings[205]
#define key_sprevious CUR Strings[206]
#define key_sprint CUR Strings[207]
#define key_sredo CUR Strings[208]
#define key_sreplace CUR Strings[209]
#define key_sright CUR Strings[210]
#define key_srsume CUR Strings[211]
#define key_ssave CUR Strings[212]
#define key_ssuspend CUR Strings[213]
#define key_sundo CUR Strings[214]
#define req_for_input CUR Strings[215]
#define key_f11 CUR Strings[216]
#define key_f12 CUR Strings[217]
#define key_f13 CUR Strings[218]
#define key_f14 CUR Strings[219]
#define key_f15 CUR Strings[220]
#define key_f16 CUR Strings[221]
#define key_f17 CUR Strings[222]
#define key_f18 CUR Strings[223]
#define key_f19 CUR Strings[224]
#define key_f20 CUR Strings[225]
#define key_f21 CUR Strings[226]
#define key_f22 CUR Strings[227]
#define key_f23 CUR Strings[228]
#define key_f24 CUR Strings[229]
#define key_f25 CUR Strings[230]
#define key_f26 CUR Strings[231]
#define key_f27 CUR Strings[232]
#define key_f28 CUR Strings[233]
#define key_f29 CUR Strings[234]
#define key_f30 CUR Strings[235]
#define key_f31 CUR Strings[236]
#define key_f32 CUR Strings[237]
#define key_f33 CUR Strings[238]
#define key_f34 CUR Strings[239]
#define key_f35 CUR Strings[240]
#define key_f36 CUR Strings[241]
#define key_f37 CUR Strings[242]
#define key_f38 CUR Strings[243]
#define key_f39 CUR Strings[244]
#define key_f40 CUR Strings[245]
#define key_f41 CUR Strings[246]
#define key_f42 CUR Strings[247]
#define key_f43 CUR Strings[248]
#define key_f44 CUR Strings[249]
#define key_f45 CUR Strings[250]
#define key_f46 CUR Strings[251]
#define key_f47 CUR Strings[252]
#define key_f48 CUR Strings[253]
#define key_f49 CUR Strings[254]
#define key_f50 CUR Strings[255]
#define key_f51 CUR Strings[256]
#define key_f52 CUR Strings[257]
#define key_f53 CUR Strings[258]
#define key_f54 CUR Strings[259]
#define key_f55 CUR Strings[260]
#define key_f56 CUR Strings[261]
#define key_f57 CUR Strings[262]
#define key_f58 CUR Strings[263]
#define key_f59 CUR Strings[264]
#define key_f60 CUR Strings[265]
#define key_f61 CUR Strings[266]
#define key_f62 CUR Strings[267]
#define key_f63 CUR Strings[268]
#define clr_bol CUR Strings[269]
#define clear_margins CUR Strings[270]
#define set_left_margin CUR Strings[271]
#define set_right_margin CUR Strings[272]
#define label_format CUR Strings[273]
#define set_clock CUR Strings[274]
#define display_clock CUR Strings[275]
#define remove_clock CUR Strings[276]
#define create_window CUR Strings[277]
#define goto_window CUR Strings[278]
#define hangup CUR Strings[279]
#define dial_phone CUR Strings[280]
#define quick_dial CUR Strings[281]
#define tone CUR Strings[282]
#define pulse CUR Strings[283]
#define flash_hook CUR Strings[284]
#define fixed_pause CUR Strings[285]
#define wait_tone CUR Strings[286]
#define user0 CUR Strings[287]
#define user1 CUR Strings[288]
#define user2 CUR Strings[289]
#define user3 CUR Strings[290]
#define user4 CUR Strings[291]
#define user5 CUR Strings[292]
#define user6 CUR Strings[293]
#define user7 CUR Strings[294]
#define user8 CUR Strings[295]
#define user9 CUR Strings[296]
#define orig_pair CUR Strings[297]
#define orig_colors CUR Strings[298]
#define initialize_color CUR Strings[299]
#define initialize_pair CUR Strings[300]
#define set_color_pair CUR Strings[301]
#define set_foreground CUR Strings[302]
#define set_background CUR Strings[303]
#define change_char_pitch CUR Strings[304]
#define change_line_pitch CUR Strings[305]
#define change_res_horz CUR Strings[306]
#define change_res_vert CUR Strings[307]
#define define_char CUR Strings[308]
#define enter_doublewide_mode CUR Strings[309]
#define enter_draft_quality CUR Strings[310]
#define enter_italics_mode CUR Strings[311]
#define enter_leftward_mode CUR Strings[312]
#define enter_micro_mode CUR Strings[313]
#define enter_near_letter_quality CUR Strings[314]
#define enter_normal_quality CUR Strings[315]
#define enter_shadow_mode CUR Strings[316]
#define enter_subscript_mode CUR Strings[317]
#define enter_superscript_mode CUR Strings[318]
#define enter_upward_mode CUR Strings[319]
#define exit_doublewide_mode CUR Strings[320]
#define exit_italics_mode CUR Strings[321]
#define exit_leftward_mode CUR Strings[322]
#define exit_micro_mode CUR Strings[323]
#define exit_shadow_mode CUR Strings[324]
#define exit_subscript_mode CUR Strings[325]
#define exit_superscript_mode CUR Strings[326]
#define exit_upward_mode CUR Strings[327]
#define micro_column_address CUR Strings[328]
#define micro_down CUR Strings[329]
#define micro_left CUR Strings[330]
#define micro_right CUR Strings[331]
#define micro_row_address CUR Strings[332]
#define micro_up CUR Strings[333]
#define order_of_pins CUR Strings[334]
#define parm_down_micro CUR Strings[335]
#define parm_left_micro CUR Strings[336]
#define parm_right_micro CUR Strings[337]
#define parm_up_micro CUR Strings[338]
#define select_char_set CUR Strings[339]
#define set_bottom_margin CUR Strings[340]
#define set_bottom_margin_parm CUR Strings[341]
#define set_left_margin_parm CUR Strings[342]
#define set_right_margin_parm CUR Strings[343]
#define set_top_margin CUR Strings[344]
#define set_top_margin_parm CUR Strings[345]
#define start_bit_image CUR Strings[346]
#define start_char_set_def CUR Strings[347]
#define stop_bit_image CUR Strings[348]
#define stop_char_set_def CUR Strings[349]
#define subscript_characters CUR Strings[350]
#define superscript_characters CUR Strings[351]
#define these_cause_cr CUR Strings[352]
#define zero_motion CUR Strings[353]
#define char_set_names CUR Strings[354]
#define key_mouse CUR Strings[355]
#define mouse_info CUR Strings[356]
#define req_mouse_pos CUR Strings[357]
#define get_mouse CUR Strings[358]
#define set_a_foreground CUR Strings[359]
#define set_a_background CUR Strings[360]
#define pkey_plab CUR Strings[361]
#define device_type CUR Strings[362]
#define code_set_init CUR Strings[363]
#define set0_des_seq CUR Strings[364]
#define set1_des_seq CUR Strings[365]
#define set2_des_seq CUR Strings[366]
#define set3_des_seq CUR Strings[367]
#define set_lr_margin CUR Strings[368]
#define set_tb_margin CUR Strings[369]
#define bit_image_repeat CUR Strings[370]
#define bit_image_newline CUR Strings[371]
#define bit_image_carriage_return CUR Strings[372]
#define color_names CUR Strings[373]
#define define_bit_image_region CUR Strings[374]
#define end_bit_image_region CUR Strings[375]
#define set_color_band CUR Strings[376]
#define set_page_length CUR Strings[377]
#define display_pc_char CUR Strings[378]
#define enter_pc_charset_mode CUR Strings[379]
#define exit_pc_charset_mode CUR Strings[380]
#define enter_scancode_mode CUR Strings[381]
#define exit_scancode_mode CUR Strings[382]
#define pc_term_options CUR Strings[383]
#define scancode_escape CUR Strings[384]
#define alt_scancode_esc CUR Strings[385]
#define enter_horizontal_hl_mode CUR Strings[386]
#define enter_left_hl_mode CUR Strings[387]
#define enter_low_hl_mode CUR Strings[388]
#define enter_right_hl_mode CUR Strings[389]
#define enter_top_hl_mode CUR Strings[390]
#define enter_vertical_hl_mode CUR Strings[391]
#define set_a_attributes CUR Strings[392]
#define set_pglen_inch CUR Strings[393]
#define BOOLWRITE 37
#define NUMWRITE 33
#define STRWRITE 394
/* older synonyms for some capabilities */
#define beehive_glitch no_esc_ctlc
#define teleray_glitch dest_tabs_magic_smso
/* HPUX-11 uses this name rather than the standard one */
#ifndef micro_char_size
#define micro_char_size micro_col_size
#endif
#ifdef __INTERNAL_CAPS_VISIBLE
#define termcap_init2 CUR Strings[394]
#define termcap_reset CUR Strings[395]
#define magic_cookie_glitch_ul CUR Numbers[33]
#define backspaces_with_bs CUR Booleans[37]
#define crt_no_scrolling CUR Booleans[38]
#define no_correctly_working_cr CUR Booleans[39]
#define carriage_return_delay CUR Numbers[34]
#define new_line_delay CUR Numbers[35]
#define linefeed_if_not_lf CUR Strings[396]
#define backspace_if_not_bs CUR Strings[397]
#define gnu_has_meta_key CUR Booleans[40]
#define linefeed_is_newline CUR Booleans[41]
#define backspace_delay CUR Numbers[36]
#define horizontal_tab_delay CUR Numbers[37]
#define number_of_function_keys CUR Numbers[38]
#define other_non_function_keys CUR Strings[398]
#define arrow_key_map CUR Strings[399]
#define has_hardware_tabs CUR Booleans[42]
#define return_does_clr_eol CUR Booleans[43]
#define acs_ulcorner CUR Strings[400]
#define acs_llcorner CUR Strings[401]
#define acs_urcorner CUR Strings[402]
#define acs_lrcorner CUR Strings[403]
#define acs_ltee CUR Strings[404]
#define acs_rtee CUR Strings[405]
#define acs_btee CUR Strings[406]
#define acs_ttee CUR Strings[407]
#define acs_hline CUR Strings[408]
#define acs_vline CUR Strings[409]
#define acs_plus CUR Strings[410]
#define memory_lock CUR Strings[411]
#define memory_unlock CUR Strings[412]
#define box_chars_1 CUR Strings[413]
#endif /* __INTERNAL_CAPS_VISIBLE */
/*
* Predefined terminfo array sizes
*/
#define BOOLCOUNT 44
#define NUMCOUNT 39
#define STRCOUNT 414
/* used by code for comparing entries */
#define acs_chars_index 146
typedef struct termtype { /* in-core form of terminfo data */
char *term_names; /* str_table offset of term names */
char *str_table; /* pointer to string table */
NCURSES_SBOOL *Booleans; /* array of boolean values */
short *Numbers; /* array of integer values */
char **Strings; /* array of string offsets */
#if NCURSES_XNAMES
char *ext_str_table; /* pointer to extended string table */
char **ext_Names; /* corresponding names */
unsigned short num_Booleans;/* count total Booleans */
unsigned short num_Numbers; /* count total Numbers */
unsigned short num_Strings; /* count total Strings */
unsigned short ext_Booleans;/* count extensions to Booleans */
unsigned short ext_Numbers; /* count extensions to Numbers */
unsigned short ext_Strings; /* count extensions to Strings */
#endif /* NCURSES_XNAMES */
} TERMTYPE;
/*
* The only reason these structures are visible is for read-only use.
* Programs which modify the data are not, never were, portable across
* curses implementations.
*
* The first field in TERMINAL is used in macros.
* The remaining fields are private.
*/
#ifdef NCURSES_INTERNALS
#undef TERMINAL
#define TERMINAL struct term
TERMINAL;
#undef TERMTYPE2
#define TERMTYPE2 TERMTYPE
#else
typedef struct term { /* describe an actual terminal */
TERMTYPE type; /* terminal type description */
} TERMINAL;
#endif /* NCURSES_INTERNALS */
#if 0 && !1
extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
#elif 1
NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);
#define cur_term NCURSES_PUBLIC_VAR(cur_term())
#else
extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
#endif
#if 0 || 1
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);
#define boolnames NCURSES_PUBLIC_VAR(boolnames())
#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())
#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())
#define numnames NCURSES_PUBLIC_VAR(numnames())
#define numcodes NCURSES_PUBLIC_VAR(numcodes())
#define numfnames NCURSES_PUBLIC_VAR(numfnames())
#define strnames NCURSES_PUBLIC_VAR(strnames())
#define strcodes NCURSES_PUBLIC_VAR(strcodes())
#define strfnames NCURSES_PUBLIC_VAR(strfnames())
#else
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
#endif
/*
* These entrypoints are used only by the ncurses utilities such as tic.
*/
#ifdef NCURSES_INTERNALS
extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);
extern NCURSES_EXPORT(int) _nc_read_entry2 (const char * const, char * const, TERMTYPE2 *const);
extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE2 *);
extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);
extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);
extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);
extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);
#endif /* NCURSES_INTERNALS */
/*
* These entrypoints are used by tack 1.07.
*/
extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);
extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);
/*
* Normal entry points
*/
extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);
extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);
/* miscellaneous entry points */
extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);
extern NCURSES_EXPORT(int) setupterm (const char *,int,int *);
/* terminfo entry points, also declared in curses.h */
#if !defined(__NCURSES_H)
extern NCURSES_EXPORT(char *) tigetstr (const char *);
extern NCURSES_EXPORT_VAR(char) ttytype[];
extern NCURSES_EXPORT(int) putp (const char *);
extern NCURSES_EXPORT(int) tigetflag (const char *);
extern NCURSES_EXPORT(int) tigetnum (const char *);
#if 1 /* NCURSES_TPARM_VARARGS */
extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
#else
extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
#endif /* __NCURSES_H */
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
#if !defined(NCURSES_TERMCAP_H_incl)
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 (const char *);
extern NCURSES_EXPORT(int) tgetnum (const char *);
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
#endif /* NCURSES_TERMCAP_H_incl */
/*
* Include curses.h before term.h to enable these extensions.
*/
#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);
#if 1 /* NCURSES_TPARM_VARARGS */
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */
#else
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */
#endif
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, const char *, char **);
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);
extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);
#endif /* NCURSES_SP_FUNCS */
/*
* Debugging features.
*/
extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);
#ifdef __cplusplus
}
#endif
#endif /* NCURSES_TERM_H_incl */

237
include/term_entry.h Normal file
View File

@@ -0,0 +1,237 @@
/****************************************************************************
* Copyright 2018-2020,2021 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 *
* "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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
/* $Id: term_entry.h,v 1.61 2021/09/04 10:52:55 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
*/
#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>
/*
* 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
#define NUM_STRINGS(tp) (tp)->num_Strings
#define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i]
#else
#define NUM_BOOLEANS(tp) BOOLCOUNT
#define NUM_NUMBERS(tp) NUMCOUNT
#define NUM_STRINGS(tp) STRCOUNT
#define EXT_NAMES(tp,i,limit,index,table) table[i]
#endif
#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++)
#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; (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)
#define MAX_LINE 132
#define NULLHOOK (bool(*)(ENTRY *))0
/*
* Note that WANTED and PRESENT are not simple inverses! If a capability
* has been explicitly cancelled, it is not considered WANTED.
*/
#define WANTED(s) ((s) == ABSENT_STRING)
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
#define ANDMISSING(p,q) \
{ \
if (PRESENT(p) && !PRESENT(q)) \
_nc_warning(#p " but no " #q); \
}
#define PAIRED(p,q) \
{ \
if (PRESENT(q) && !PRESENT(p)) \
_nc_warning(#q " but no " #p); \
if (PRESENT(p) && !PRESENT(q)) \
_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 (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 (TERMTYPE2 *, TERMTYPE2 *);
/* free_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
/* lib_termcap.c: trim sgr0 string for termcap users */
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
/* parse_entry.c: entry-parsing code */
#if NCURSES_XNAMES
extern NCURSES_EXPORT_VAR(bool) _nc_user_definable;
extern NCURSES_EXPORT_VAR(bool) _nc_disable_period;
#endif
extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
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 (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*));
extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
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)(TERMTYPE2 *, bool);
/* trace_xnames.c */
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
#endif /* NCURSES_INTERNALS */
/*
* These entrypoints were used by tack before 1.08.
*/
#undef NCURSES_TACK_1_08
#ifdef NCURSES_INTERNALS
#define NCURSES_TACK_1_08 /* nothing */
#else
#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08")
#endif
/* alloc_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *) NCURSES_TACK_1_08;
/* lib_acs.c */
extern NCURSES_EXPORT(void) _nc_init_acs (void) NCURSES_TACK_1_08; /* corresponds to traditional 'init_acs()' */
/* free_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *) NCURSES_TACK_1_08;
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif /* NCURSES_TERM_ENTRY_H_incl */

73
include/termcap.h Normal file
View File

@@ -0,0 +1,73 @@
/****************************************************************************
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: termcap.h.in,v 1.20 2021/06/17 21:26:02 tom Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
#undef NCURSES_VERSION
#define NCURSES_VERSION "6.3"
#include <ncurses_dll.h>
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#include <sys/types.h>
#undef NCURSES_OSPEED
#define NCURSES_OSPEED short
extern NCURSES_EXPORT_VAR(char) PC;
extern NCURSES_EXPORT_VAR(char *) UP;
extern NCURSES_EXPORT_VAR(char *) BC;
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
#if !defined(NCURSES_TERM_H_incl)
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 (const char *);
extern NCURSES_EXPORT(int) tgetnum (const char *);
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
#endif
#ifdef __cplusplus
}
#endif
#endif /* NCURSES_TERMCAP_H_incl */

73
include/termcap.h.in Normal file
View File

@@ -0,0 +1,73 @@
/****************************************************************************
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: termcap.h.in,v 1.20 2021/06/17 21:26:02 tom Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
#undef NCURSES_VERSION
#define NCURSES_VERSION "@NCURSES_MAJOR@.@NCURSES_MINOR@"
#include <ncurses_dll.h>
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#include <sys/types.h>
#undef NCURSES_OSPEED
#define NCURSES_OSPEED @NCURSES_OSPEED@
extern NCURSES_EXPORT_VAR(char) PC;
extern NCURSES_EXPORT_VAR(char *) UP;
extern NCURSES_EXPORT_VAR(char *) BC;
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
#if !defined(NCURSES_TERM_H_incl)
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 (const char *);
extern NCURSES_EXPORT(int) tgetnum (const char *);
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
#endif
#ifdef __cplusplus
}
#endif
#endif /* NCURSES_TERMCAP_H_incl */

397
include/tic.h Normal file
View File

@@ -0,0 +1,397 @@
/****************************************************************************
* Copyright 2018-2020,2021 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 *
* "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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996 on *
****************************************************************************/
/*
* $Id: tic.h,v 1.84 2021/08/21 00:24:45 tom Exp $
* tic.h - Global variables and structures for the terminfo compiler.
*/
#ifndef __TIC_H
#define __TIC_H
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
#include <ncurses_cfg.h>
#include <curses.h> /* for the _tracef() prototype, ERR/OK, bool defs */
/*
** 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
** Boolean Section, containing the values of all of the
** boolean capabilities
** A null byte may be inserted here to make
** sure that the Number Section begins on an
** even word boundary.
** Number Section, containing the values of all of the numeric
** capabilities, each as a short integer
** String Section, containing short integer offsets into the
** String Table, one per string capability
** 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.
**
** There is no structure definition here because it would only confuse
** matters. Terminfo format is a raw byte layout, not a structure
** dump. If you happen to be on a little-endian machine with 16-bit
** shorts that requires no padding between short members in a struct,
** then there is a natural C structure that captures the header, but
** not very helpfully.
*/
#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])
#define IS_NEG1(p) ((BYTE(p,0) == 0377) && (BYTE(p,1) == 0377))
#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 || 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_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
* least 14, since that corresponds to the older filename lengths. Newer
* systems allow longer aliases, though not many terminal descriptions are
* written to use them. The MAX_ALIAS symbol is used for warnings.
*/
#if HAVE_LONG_FILE_NAMES
#define MAX_ALIAS 32 /* smaller than POSIX minimum for PATH_MAX */
#else
#define MAX_ALIAS 14 /* SVr3 filename length */
#endif
/* location of user's personal info directory */
#define PRIVATE_INFO "%s/.terminfo" /* plug getenv("HOME") into %s */
/*
* Some traces are designed to be used via tic's verbose option (and similar in
* infocmp and toe) rather than the 'trace()' function. So we use the bits
* above the normal trace() parameter as a debug-level.
*/
#define MAX_DEBUG_LEVEL 15
#define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT)
#define set_trace_level(n) \
_nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \
+ DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \
_nc_tracing |= DEBUG_LEVEL(n)
#ifdef TRACE
#define DEBUG(n, a) if (_nc_tracing >= DEBUG_LEVEL(n)) _tracef a
#else
#define DEBUG(n, a) /*nothing*/
#endif
/*
* 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
* returns one of these values after loading the specifics into the global
* structure curr_token.
*/
#define BOOLEAN 0 /* Boolean capability */
#define NUMBER 1 /* Numeric capability */
#define STRING 2 /* String-valued capability */
#define CANCEL 3 /* Capability to be cancelled in following tc's */
#define NAMES 4 /* The names for a terminal type */
#define UNDEF 5 /* Undefined */
#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.
*/
struct token
{
char *tk_name; /* name of capability */
int tk_valnumber; /* value of capability (if a number) */
char *tk_valstring; /* value of capability (if a string) */
};
/*
* Offsets to string capabilities, with the corresponding functionkey codes.
*/
struct tinfo_fkeys {
unsigned offset;
chtype code;
};
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.
*/
struct name_table_entry
{
const char *nte_name; /* name to hash on */
int nte_type; /* BOOLEAN, NUMBER or STRING */
HashValue nte_index; /* index of associated variable in its array */
HashValue nte_link; /* index in table of next hash, or -1 */
};
/*
* Use this structure to hide differences between terminfo and termcap tables.
*/
typedef struct {
unsigned table_size;
const HashValue *table_data;
HashValue (*hash_of)(const char *);
int (*compare_names)(const char *, const char *);
} HashData;
struct alias
{
const char *from;
const char *to;
const char *source;
};
#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.
*/
/* out-of-band values for representing absent capabilities */
#define ABSENT_BOOLEAN ((signed char)-1) /* 255 */
#define ABSENT_NUMERIC (-1)
#define ABSENT_STRING (char *)0
/* out-of-band values for representing cancels */
#define CANCELLED_BOOLEAN ((signed char)-2) /* 254 */
#define CANCELLED_NUMERIC (-2)
#define CANCELLED_STRING (char *)(-1)
#define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */
#define VALID_NUMERIC(s) ((s) >= 0)
#define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING)
/* termcap entries longer than this may break old binaries */
#define MAX_TERMCAP_LENGTH 1023
/* this is a documented limitation of terminfo */
#define MAX_TERMINFO_LENGTH 4096
#ifndef TERMINFO
#define TERMINFO "/usr/share/terminfo"
#endif
#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 *);
extern NCURSES_EXPORT(bool) _nc_is_dir_path (const char *);
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_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_VAR(int) _nc_curr_col;
extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
extern NCURSES_EXPORT_VAR(int) _nc_syntax;
extern NCURSES_EXPORT_VAR(int) _nc_strict_bsd;
extern NCURSES_EXPORT_VAR(long) _nc_comment_end;
extern NCURSES_EXPORT_VAR(long) _nc_comment_start;
extern NCURSES_EXPORT_VAR(long) _nc_curr_file_pos;
extern NCURSES_EXPORT_VAR(long) _nc_start_line;
#define SYN_TERMINFO 0
#define SYN_TERMCAP 1
/* comp_error.c: warning & abort messages */
extern NCURSES_EXPORT(const char *) _nc_get_source (void);
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _nc_get_type (char *name);
extern NCURSES_EXPORT(void) _nc_set_source (const char *const);
extern NCURSES_EXPORT(void) _nc_set_type (const char *const);
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
/* comp_scan.c */
extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
/* 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);
extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int const);
/* 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
extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
extern NCURSES_EXPORT(int) _nc_tparm_analyze(TERMINAL *, const char *, char **, int *);
extern NCURSES_EXPORT(void) _nc_reset_tparm(TERMINAL *);
/* lib_trace.c */
extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
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 */
/* comp_main.c: compiler main */
extern const char * _nc_progname;
/* db_iterator.c */
extern NCURSES_EXPORT(const char *) _nc_next_db(DBDIRS *, int *);
extern NCURSES_EXPORT(const char *) _nc_tic_dir (const char *);
extern NCURSES_EXPORT(void) _nc_first_db(DBDIRS *, int *);
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
}
#endif
/* *INDENT-ON* */
#endif /* __TIC_H */

68
include/unctrl.h Normal file
View File

@@ -0,0 +1,68 @@
/****************************************************************************
* 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 *
* "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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/*
* unctrl.h
*
* Display a printable version of a control character.
* Control characters are displayed in caret notation (^x), DELETE is displayed
* as ^?. Printable characters are displayed as is.
*/
/* $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
#undef NCURSES_VERSION
#define NCURSES_VERSION "6.3"
#ifdef __cplusplus
extern "C" {
#endif
#include <curses.h>
#undef unctrl
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
#if 1
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
#endif
#ifdef __cplusplus
}
#endif
#endif /* NCURSES_UNCTRL_H_incl */

68
include/unctrl.h.in Normal file
View File

@@ -0,0 +1,68 @@
/****************************************************************************
* 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 *
* "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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/*
* unctrl.h
*
* Display a printable version of a control character.
* Control characters are displayed in caret notation (^x), DELETE is displayed
* as ^?. Printable characters are displayed as is.
*/
/* $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
#undef NCURSES_VERSION
#define NCURSES_VERSION "@NCURSES_MAJOR@.@NCURSES_MINOR@"
#ifdef __cplusplus
extern "C" {
#endif
#include <curses.h>
#undef unctrl
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
#if @NCURSES_SP_FUNCS@
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
#endif
#ifdef __cplusplus
}
#endif
#endif /* NCURSES_UNCTRL_H_incl */

75
include/win32_curses.h Normal file
View File

@@ -0,0 +1,75 @@
/****************************************************************************
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* 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: Juergen Pfeifer, 2008-on *
****************************************************************************/
/* $Id: win32_curses.h,v 1.3 2021/06/17 21:26:02 tom Exp $ */
/*
* This is the interface we use on Windows to mimic the control of the settings
* of what acts like the classic TTY - the Windows Console.
*/
#if (defined(_WIN32) || defined(_WIN64))
#ifndef _NC_WIN32_CURSES_H
#define _NC_WIN32_CURSES_H 1
struct winconmode
{
unsigned long dwFlagIn;
unsigned long dwFlagOut;
};
extern NCURSES_EXPORT(void*) _nc_console_fd2handle(int fd);
extern NCURSES_EXPORT(int) _nc_console_setmode(void* handle, const struct winconmode* arg);
extern NCURSES_EXPORT(int) _nc_console_getmode(void* handle, struct winconmode* arg);
extern NCURSES_EXPORT(int) _nc_console_flush(void* handle);
/*
A few definitions of Unix functions we need to emulate
*/
#define SIGHUP 1
#define SIGKILL 9
#undef getlogin
#define getlogin() getenv("USERNAME")
#undef ttyname
#define ttyname(fd) NULL
#undef sleep
#define sleep(n) Sleep((n) * 1000)
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#endif /* _NC_WIN32_CURSES_H */
#endif /* _WIN32||_WIN64 */