1fdd4e1e0SJan Lentfer /**************************************************************************** 2*32bb5217SDaniel Fojt * Copyright 2018-2019,2020 Thomas E. Dickey * 3*32bb5217SDaniel Fojt * Copyright 1998-2012,2017 Free Software Foundation, Inc. * 4fdd4e1e0SJan Lentfer * * 5fdd4e1e0SJan Lentfer * Permission is hereby granted, free of charge, to any person obtaining a * 6fdd4e1e0SJan Lentfer * copy of this software and associated documentation files (the * 7fdd4e1e0SJan Lentfer * "Software"), to deal in the Software without restriction, including * 8fdd4e1e0SJan Lentfer * without limitation the rights to use, copy, modify, merge, publish, * 9fdd4e1e0SJan Lentfer * distribute, distribute with modifications, sublicense, and/or sell * 10fdd4e1e0SJan Lentfer * copies of the Software, and to permit persons to whom the Software is * 11fdd4e1e0SJan Lentfer * furnished to do so, subject to the following conditions: * 12fdd4e1e0SJan Lentfer * * 13fdd4e1e0SJan Lentfer * The above copyright notice and this permission notice shall be included * 14fdd4e1e0SJan Lentfer * in all copies or substantial portions of the Software. * 15fdd4e1e0SJan Lentfer * * 16fdd4e1e0SJan Lentfer * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 17fdd4e1e0SJan Lentfer * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 18fdd4e1e0SJan Lentfer * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 19fdd4e1e0SJan Lentfer * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 20fdd4e1e0SJan Lentfer * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 21fdd4e1e0SJan Lentfer * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 22fdd4e1e0SJan Lentfer * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 23fdd4e1e0SJan Lentfer * * 24fdd4e1e0SJan Lentfer * Except as contained in this notice, the name(s) of the above copyright * 25fdd4e1e0SJan Lentfer * holders shall not be used in advertising or otherwise to promote the * 26fdd4e1e0SJan Lentfer * sale, use or other dealings in this Software without prior written * 27fdd4e1e0SJan Lentfer * authorization. * 28fdd4e1e0SJan Lentfer ****************************************************************************/ 29fdd4e1e0SJan Lentfer 30fdd4e1e0SJan Lentfer /**************************************************************************** 31fdd4e1e0SJan Lentfer * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 32fdd4e1e0SJan Lentfer * and: Eric S. Raymond <esr@snark.thyrsus.com> * 331d102085SJan Lentfer * and: Thomas E. Dickey 1996 on * 34fdd4e1e0SJan Lentfer ****************************************************************************/ 35fdd4e1e0SJan Lentfer 36fdd4e1e0SJan Lentfer /* 37*32bb5217SDaniel Fojt * $Id: tic.h,v 1.81 2020/02/02 23:34:34 tom Exp $ 38*32bb5217SDaniel Fojt * tic.h - Global variables and structures for the terminfo compiler. 39fdd4e1e0SJan Lentfer */ 40fdd4e1e0SJan Lentfer 41fdd4e1e0SJan Lentfer #ifndef __TIC_H 42fdd4e1e0SJan Lentfer #define __TIC_H 433468e90cSJohn Marino /* *INDENT-OFF* */ 44fdd4e1e0SJan Lentfer #ifdef __cplusplus 45fdd4e1e0SJan Lentfer extern "C" { 46fdd4e1e0SJan Lentfer #endif 47fdd4e1e0SJan Lentfer 48*32bb5217SDaniel Fojt #include <ncurses_cfg.h> 49*32bb5217SDaniel Fojt 50fdd4e1e0SJan Lentfer #include <curses.h> /* for the _tracef() prototype, ERR/OK, bool defs */ 51fdd4e1e0SJan Lentfer 52fdd4e1e0SJan Lentfer /* 53*32bb5217SDaniel Fojt ** The format of SVr2 compiled terminfo files is as follows: 54fdd4e1e0SJan Lentfer ** 55fdd4e1e0SJan Lentfer ** Header (12 bytes), containing information given below 56fdd4e1e0SJan Lentfer ** Names Section, containing the names of the terminal 57fdd4e1e0SJan Lentfer ** Boolean Section, containing the values of all of the 58fdd4e1e0SJan Lentfer ** boolean capabilities 59fdd4e1e0SJan Lentfer ** A null byte may be inserted here to make 60fdd4e1e0SJan Lentfer ** sure that the Number Section begins on an 61fdd4e1e0SJan Lentfer ** even word boundary. 62fdd4e1e0SJan Lentfer ** Number Section, containing the values of all of the numeric 63fdd4e1e0SJan Lentfer ** capabilities, each as a short integer 64fdd4e1e0SJan Lentfer ** String Section, containing short integer offsets into the 65fdd4e1e0SJan Lentfer ** String Table, one per string capability 66fdd4e1e0SJan Lentfer ** String Table, containing the actual characters of the string 67fdd4e1e0SJan Lentfer ** capabilities. 68fdd4e1e0SJan Lentfer ** 69*32bb5217SDaniel Fojt ** In the SVr2 format, "short" means signed 16-bit numbers, which is sometimes 70*32bb5217SDaniel Fojt ** inconvenient. The numbers are signed, to provide for absent and canceled 71*32bb5217SDaniel Fojt ** values. ncurses6.1 introduced an extension to this compiled format, by 72*32bb5217SDaniel Fojt ** making the Number Section a list of signed 32-bit integers. 73*32bb5217SDaniel Fojt ** 74fdd4e1e0SJan Lentfer ** NOTE that all short integers in the file are stored using VAX/PDP-style 75fdd4e1e0SJan Lentfer ** byte-order, i.e., least-significant byte first. 76fdd4e1e0SJan Lentfer ** 77fdd4e1e0SJan Lentfer ** There is no structure definition here because it would only confuse 78fdd4e1e0SJan Lentfer ** matters. Terminfo format is a raw byte layout, not a structure 79fdd4e1e0SJan Lentfer ** dump. If you happen to be on a little-endian machine with 16-bit 80fdd4e1e0SJan Lentfer ** shorts that requires no padding between short members in a struct, 81fdd4e1e0SJan Lentfer ** then there is a natural C structure that captures the header, but 82fdd4e1e0SJan Lentfer ** not very helpfully. 83fdd4e1e0SJan Lentfer */ 84fdd4e1e0SJan Lentfer 85fdd4e1e0SJan Lentfer #define MAGIC 0432 /* first two bytes of a compiled entry */ 86*32bb5217SDaniel Fojt #define MAGIC2 01036 /* first two bytes of a compiled 32-bit entry */ 87fdd4e1e0SJan Lentfer 881d102085SJan Lentfer #undef BYTE 891d102085SJan Lentfer #define BYTE(p,n) (unsigned char)((p)[n]) 901d102085SJan Lentfer 911d102085SJan Lentfer #define IS_NEG1(p) ((BYTE(p,0) == 0377) && (BYTE(p,1) == 0377)) 921d102085SJan Lentfer #define IS_NEG2(p) ((BYTE(p,0) == 0376) && (BYTE(p,1) == 0377)) 931d102085SJan Lentfer #define LOW_MSB(p) (BYTE(p,0) + 256*BYTE(p,1)) 941d102085SJan Lentfer 95*32bb5217SDaniel Fojt #define IS_TIC_MAGIC(p) (LOW_MSB(p) == MAGIC || LOW_MSB(p) == MAGIC2) 96*32bb5217SDaniel Fojt 97*32bb5217SDaniel Fojt #define quick_prefix(s) (!strncmp((s), "b64:", (size_t)4) || !strncmp((s), "hex:", (size_t)4)) 981d102085SJan Lentfer 99fdd4e1e0SJan Lentfer /* 100fdd4e1e0SJan Lentfer * The "maximum" here is misleading; XSI guarantees minimum values, which a 101fdd4e1e0SJan Lentfer * given implementation may exceed. 102fdd4e1e0SJan Lentfer */ 103fdd4e1e0SJan Lentfer #define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */ 104*32bb5217SDaniel Fojt #define MAX_ENTRY_SIZE1 4096 /* maximum legal entry size (SVr2) */ 105*32bb5217SDaniel Fojt #define MAX_ENTRY_SIZE2 32768 /* maximum legal entry size (ncurses6.1) */ 106*32bb5217SDaniel Fojt 107*32bb5217SDaniel Fojt #if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR 108*32bb5217SDaniel Fojt #define MAX_ENTRY_SIZE MAX_ENTRY_SIZE2 109*32bb5217SDaniel Fojt #else 110*32bb5217SDaniel Fojt #define MAX_ENTRY_SIZE MAX_ENTRY_SIZE1 111*32bb5217SDaniel Fojt #endif 112fdd4e1e0SJan Lentfer 113fdd4e1e0SJan Lentfer /* 114fdd4e1e0SJan Lentfer * The maximum size of individual name or alias is guaranteed in XSI to be at 115fdd4e1e0SJan Lentfer * least 14, since that corresponds to the older filename lengths. Newer 116fdd4e1e0SJan Lentfer * systems allow longer aliases, though not many terminal descriptions are 117fdd4e1e0SJan Lentfer * written to use them. The MAX_ALIAS symbol is used for warnings. 118fdd4e1e0SJan Lentfer */ 119fdd4e1e0SJan Lentfer #if HAVE_LONG_FILE_NAMES 120fdd4e1e0SJan Lentfer #define MAX_ALIAS 32 /* smaller than POSIX minimum for PATH_MAX */ 121fdd4e1e0SJan Lentfer #else 122fdd4e1e0SJan Lentfer #define MAX_ALIAS 14 /* SVr3 filename length */ 123fdd4e1e0SJan Lentfer #endif 124fdd4e1e0SJan Lentfer 125fdd4e1e0SJan Lentfer /* location of user's personal info directory */ 126fdd4e1e0SJan Lentfer #define PRIVATE_INFO "%s/.terminfo" /* plug getenv("HOME") into %s */ 127fdd4e1e0SJan Lentfer 128fdd4e1e0SJan Lentfer /* 129fdd4e1e0SJan Lentfer * Some traces are designed to be used via tic's verbose option (and similar in 130fdd4e1e0SJan Lentfer * infocmp and toe) rather than the 'trace()' function. So we use the bits 131fdd4e1e0SJan Lentfer * above the normal trace() parameter as a debug-level. 132fdd4e1e0SJan Lentfer */ 133fdd4e1e0SJan Lentfer 134fdd4e1e0SJan Lentfer #define MAX_DEBUG_LEVEL 15 135fdd4e1e0SJan Lentfer #define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT) 136fdd4e1e0SJan Lentfer 137fdd4e1e0SJan Lentfer #define set_trace_level(n) \ 138*32bb5217SDaniel Fojt _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \ 139*32bb5217SDaniel Fojt + DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \ 140fdd4e1e0SJan Lentfer _nc_tracing |= DEBUG_LEVEL(n) 141fdd4e1e0SJan Lentfer 142fdd4e1e0SJan Lentfer #ifdef TRACE 143fdd4e1e0SJan Lentfer #define DEBUG(n, a) if (_nc_tracing >= DEBUG_LEVEL(n)) _tracef a 144fdd4e1e0SJan Lentfer #else 145fdd4e1e0SJan Lentfer #define DEBUG(n, a) /*nothing*/ 146fdd4e1e0SJan Lentfer #endif 147fdd4e1e0SJan Lentfer 148fdd4e1e0SJan Lentfer /* 149fdd4e1e0SJan Lentfer * These are the types of tokens returned by the scanner. The first 150fdd4e1e0SJan Lentfer * three are also used in the hash table of capability names. The scanner 151fdd4e1e0SJan Lentfer * returns one of these values after loading the specifics into the global 152fdd4e1e0SJan Lentfer * structure curr_token. 153fdd4e1e0SJan Lentfer */ 154fdd4e1e0SJan Lentfer 155fdd4e1e0SJan Lentfer #define BOOLEAN 0 /* Boolean capability */ 156fdd4e1e0SJan Lentfer #define NUMBER 1 /* Numeric capability */ 157fdd4e1e0SJan Lentfer #define STRING 2 /* String-valued capability */ 158fdd4e1e0SJan Lentfer #define CANCEL 3 /* Capability to be cancelled in following tc's */ 159fdd4e1e0SJan Lentfer #define NAMES 4 /* The names for a terminal type */ 160fdd4e1e0SJan Lentfer #define UNDEF 5 /* Undefined */ 161fdd4e1e0SJan Lentfer 162fdd4e1e0SJan Lentfer #define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */ 163fdd4e1e0SJan Lentfer 164fdd4e1e0SJan Lentfer /* 165fdd4e1e0SJan Lentfer * The global structure in which the specific parts of a 166fdd4e1e0SJan Lentfer * scanned token are returned. 167fdd4e1e0SJan Lentfer */ 168fdd4e1e0SJan Lentfer 169fdd4e1e0SJan Lentfer struct token 170fdd4e1e0SJan Lentfer { 171fdd4e1e0SJan Lentfer char *tk_name; /* name of capability */ 172fdd4e1e0SJan Lentfer int tk_valnumber; /* value of capability (if a number) */ 173fdd4e1e0SJan Lentfer char *tk_valstring; /* value of capability (if a string) */ 174fdd4e1e0SJan Lentfer }; 175fdd4e1e0SJan Lentfer 176fdd4e1e0SJan Lentfer /* 177*32bb5217SDaniel Fojt * Offsets to string capabilities, with the corresponding functionkey codes. 178fdd4e1e0SJan Lentfer */ 179fdd4e1e0SJan Lentfer struct tinfo_fkeys { 180fdd4e1e0SJan Lentfer unsigned offset; 181fdd4e1e0SJan Lentfer chtype code; 182fdd4e1e0SJan Lentfer }; 183fdd4e1e0SJan Lentfer 18400d8f3c4SJohn Marino typedef short HashValue; 18500d8f3c4SJohn Marino 186fdd4e1e0SJan Lentfer /* 187*32bb5217SDaniel Fojt * The file comp_captab.c contains an array of these structures, one per 188*32bb5217SDaniel Fojt * possible capability. These are indexed by a hash table array of pointers to 189*32bb5217SDaniel Fojt * the same structures for use by the parser. 190fdd4e1e0SJan Lentfer */ 191fdd4e1e0SJan Lentfer struct name_table_entry 192fdd4e1e0SJan Lentfer { 193fdd4e1e0SJan Lentfer const char *nte_name; /* name to hash on */ 194fdd4e1e0SJan Lentfer int nte_type; /* BOOLEAN, NUMBER or STRING */ 19500d8f3c4SJohn Marino HashValue nte_index; /* index of associated variable in its array */ 19600d8f3c4SJohn Marino HashValue nte_link; /* index in table of next hash, or -1 */ 197fdd4e1e0SJan Lentfer }; 198fdd4e1e0SJan Lentfer 19900d8f3c4SJohn Marino /* 200*32bb5217SDaniel Fojt * Use this structure to hide differences between terminfo and termcap tables. 20100d8f3c4SJohn Marino */ 20200d8f3c4SJohn Marino typedef struct { 20300d8f3c4SJohn Marino unsigned table_size; 20400d8f3c4SJohn Marino const HashValue *table_data; 20500d8f3c4SJohn Marino HashValue (*hash_of)(const char *); 20600d8f3c4SJohn Marino int (*compare_names)(const char *, const char *); 20700d8f3c4SJohn Marino } HashData; 20800d8f3c4SJohn Marino 209fdd4e1e0SJan Lentfer struct alias 210fdd4e1e0SJan Lentfer { 211fdd4e1e0SJan Lentfer const char *from; 212fdd4e1e0SJan Lentfer const char *to; 213fdd4e1e0SJan Lentfer const char *source; 214fdd4e1e0SJan Lentfer }; 215fdd4e1e0SJan Lentfer 216fdd4e1e0SJan Lentfer #define NOTFOUND ((struct name_table_entry *) 0) 217fdd4e1e0SJan Lentfer 2183468e90cSJohn Marino /* 219*32bb5217SDaniel Fojt * The file comp_userdefs.c contains an array of these structures, one per 220*32bb5217SDaniel Fojt * possible capability. These are indexed by a hash table array of pointers to 221*32bb5217SDaniel Fojt * the same structures for use by the parser. 222*32bb5217SDaniel Fojt */ 223*32bb5217SDaniel Fojt struct user_table_entry 224*32bb5217SDaniel Fojt { 225*32bb5217SDaniel Fojt const char *ute_name; /* name to hash on */ 226*32bb5217SDaniel Fojt int ute_type; /* mask (BOOLEAN, NUMBER, STRING) */ 227*32bb5217SDaniel Fojt unsigned ute_argc; /* number of parameters */ 228*32bb5217SDaniel Fojt unsigned ute_args; /* bit-mask for string parameters */ 229*32bb5217SDaniel Fojt HashValue ute_index; /* index of associated variable in its array */ 230*32bb5217SDaniel Fojt HashValue ute_link; /* index in table of next hash, or -1 */ 231*32bb5217SDaniel Fojt }; 232*32bb5217SDaniel Fojt 233*32bb5217SDaniel Fojt /* 2343468e90cSJohn Marino * The casts are required for correct sign-propagation with systems such as 2353468e90cSJohn Marino * AIX, IRIX64, Solaris which default to unsigned characters. The C standard 2363468e90cSJohn Marino * leaves this detail unspecified. 2373468e90cSJohn Marino */ 2383468e90cSJohn Marino 239fdd4e1e0SJan Lentfer /* out-of-band values for representing absent capabilities */ 2401d102085SJan Lentfer #define ABSENT_BOOLEAN ((signed char)-1) /* 255 */ 241fdd4e1e0SJan Lentfer #define ABSENT_NUMERIC (-1) 242fdd4e1e0SJan Lentfer #define ABSENT_STRING (char *)0 243fdd4e1e0SJan Lentfer 244fdd4e1e0SJan Lentfer /* out-of-band values for representing cancels */ 2451d102085SJan Lentfer #define CANCELLED_BOOLEAN ((signed char)-2) /* 254 */ 246fdd4e1e0SJan Lentfer #define CANCELLED_NUMERIC (-2) 247fdd4e1e0SJan Lentfer #define CANCELLED_STRING (char *)(-1) 248fdd4e1e0SJan Lentfer 249fdd4e1e0SJan Lentfer #define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */ 250fdd4e1e0SJan Lentfer #define VALID_NUMERIC(s) ((s) >= 0) 251fdd4e1e0SJan Lentfer #define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING) 252fdd4e1e0SJan Lentfer 253fdd4e1e0SJan Lentfer /* termcap entries longer than this may break old binaries */ 254fdd4e1e0SJan Lentfer #define MAX_TERMCAP_LENGTH 1023 255fdd4e1e0SJan Lentfer 256fdd4e1e0SJan Lentfer /* this is a documented limitation of terminfo */ 257fdd4e1e0SJan Lentfer #define MAX_TERMINFO_LENGTH 4096 258fdd4e1e0SJan Lentfer 259fdd4e1e0SJan Lentfer #ifndef TERMINFO 260fdd4e1e0SJan Lentfer #define TERMINFO "/usr/share/terminfo" 261fdd4e1e0SJan Lentfer #endif 262fdd4e1e0SJan Lentfer 2633468e90cSJohn Marino #ifdef NCURSES_TERM_ENTRY_H_incl 2643468e90cSJohn Marino 265*32bb5217SDaniel Fojt /* 266*32bb5217SDaniel Fojt * These entrypoints are used only by the ncurses utilities such as tic. 267*32bb5217SDaniel Fojt */ 268*32bb5217SDaniel Fojt #ifdef NCURSES_INTERNALS 269fdd4e1e0SJan Lentfer /* access.c */ 270fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *); 2711d102085SJan Lentfer extern NCURSES_EXPORT(bool) _nc_is_abs_path (const char *); 2721d102085SJan Lentfer extern NCURSES_EXPORT(bool) _nc_is_dir_path (const char *); 2731d102085SJan Lentfer extern NCURSES_EXPORT(bool) _nc_is_file_path (const char *); 274fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(char *) _nc_basename (char *); 275fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(char *) _nc_rootname (char *); 276fdd4e1e0SJan Lentfer 277*32bb5217SDaniel Fojt /* comp_captab.c */ 278*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool); 279*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool); 280*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool); 281*32bb5217SDaniel Fojt 282fdd4e1e0SJan Lentfer /* comp_hash.c: name lookup */ 283fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry 28400d8f3c4SJohn Marino (const char *, int, bool); 285*32bb5217SDaniel Fojt extern NCURSES_EXPORT(struct user_table_entry const *) _nc_find_user_entry 286*32bb5217SDaniel Fojt (const char *); 287fdd4e1e0SJan Lentfer 288fdd4e1e0SJan Lentfer /* comp_scan.c: lexical analysis */ 289fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(int) _nc_get_token (bool); 290fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(void) _nc_panic_mode (char); 291fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(void) _nc_push_token (int); 292fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(int) _nc_curr_col; 293fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(int) _nc_curr_line; 294fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(int) _nc_syntax; 2953468e90cSJohn Marino extern NCURSES_EXPORT_VAR(int) _nc_strict_bsd; 296fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(long) _nc_comment_end; 297fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(long) _nc_comment_start; 298fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(long) _nc_curr_file_pos; 299fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(long) _nc_start_line; 300fdd4e1e0SJan Lentfer #define SYN_TERMINFO 0 301fdd4e1e0SJan Lentfer #define SYN_TERMCAP 1 302fdd4e1e0SJan Lentfer 303fdd4e1e0SJan Lentfer /* comp_error.c: warning & abort messages */ 3041d102085SJan Lentfer extern NCURSES_EXPORT(const char *) _nc_get_source (void); 305fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; 3061d102085SJan Lentfer extern NCURSES_EXPORT(void) _nc_get_type (char *name); 3071d102085SJan Lentfer extern NCURSES_EXPORT(void) _nc_set_source (const char *const); 3081d102085SJan Lentfer extern NCURSES_EXPORT(void) _nc_set_type (const char *const); 3091d102085SJan Lentfer extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; 310fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2); 311fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings; 312fdd4e1e0SJan Lentfer 313*32bb5217SDaniel Fojt /* comp_scan.c */ 314*32bb5217SDaniel Fojt extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token; 315fdd4e1e0SJan Lentfer 316*32bb5217SDaniel Fojt /* comp_userdefs.c */ 317*32bb5217SDaniel Fojt NCURSES_EXPORT(const struct user_table_entry *) _nc_get_userdefs_table (void); 318*32bb5217SDaniel Fojt NCURSES_EXPORT(const HashData *) _nc_get_hash_user (void); 319fdd4e1e0SJan Lentfer 320fdd4e1e0SJan Lentfer /* captoinfo.c: capability conversion */ 321fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const); 322fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int const); 323fdd4e1e0SJan Lentfer 3241d102085SJan Lentfer /* home_terminfo.c */ 3251d102085SJan Lentfer extern NCURSES_EXPORT(char *) _nc_home_terminfo (void); 3261d102085SJan Lentfer 327*32bb5217SDaniel Fojt /* init_keytry.c */ 328*32bb5217SDaniel Fojt #if BROKEN_LINKER 329*32bb5217SDaniel Fojt #define _nc_tinfo_fkeys _nc_tinfo_fkeysf() 330*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void); 331*32bb5217SDaniel Fojt #else 332*32bb5217SDaniel Fojt extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[]; 333*32bb5217SDaniel Fojt #endif 334*32bb5217SDaniel Fojt 335fdd4e1e0SJan Lentfer /* lib_tparm.c */ 336fdd4e1e0SJan Lentfer #define NUM_PARM 9 337fdd4e1e0SJan Lentfer 338fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(int) _nc_tparm_err; 339fdd4e1e0SJan Lentfer 3401d102085SJan Lentfer extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *); 341fdd4e1e0SJan Lentfer 342*32bb5217SDaniel Fojt /* lib_trace.c */ 343*32bb5217SDaniel Fojt extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing; 344*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); 345*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *); 346*32bb5217SDaniel Fojt 347fdd4e1e0SJan Lentfer /* lib_tputs.c */ 348fdd4e1e0SJan Lentfer extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */ 349fdd4e1e0SJan Lentfer 350fdd4e1e0SJan Lentfer /* comp_main.c: compiler main */ 351fdd4e1e0SJan Lentfer extern const char * _nc_progname; 352fdd4e1e0SJan Lentfer 3531d102085SJan Lentfer /* db_iterator.c */ 3541d102085SJan Lentfer extern NCURSES_EXPORT(const char *) _nc_next_db(DBDIRS *, int *); 355fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(const char *) _nc_tic_dir (const char *); 3561d102085SJan Lentfer extern NCURSES_EXPORT(void) _nc_first_db(DBDIRS *, int *); 3571d102085SJan Lentfer extern NCURSES_EXPORT(void) _nc_last_db(void); 358fdd4e1e0SJan Lentfer 359fdd4e1e0SJan Lentfer /* write_entry.c */ 360fdd4e1e0SJan Lentfer extern NCURSES_EXPORT(int) _nc_tic_written (void); 361fdd4e1e0SJan Lentfer 362*32bb5217SDaniel Fojt #endif /* NCURSES_INTERNALS */ 363*32bb5217SDaniel Fojt 364*32bb5217SDaniel Fojt /* 365*32bb5217SDaniel Fojt * These entrypoints were used by tack before 1.08. 366*32bb5217SDaniel Fojt */ 367*32bb5217SDaniel Fojt 368*32bb5217SDaniel Fojt #undef NCURSES_TACK_1_08 369*32bb5217SDaniel Fojt #ifdef NCURSES_INTERNALS 370*32bb5217SDaniel Fojt #define NCURSES_TACK_1_08 /* nothing */ 371*32bb5217SDaniel Fojt #else 372*32bb5217SDaniel Fojt #define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08") 373*32bb5217SDaniel Fojt #endif 374*32bb5217SDaniel Fojt 375*32bb5217SDaniel Fojt /* comp_hash.c: name lookup */ 376*32bb5217SDaniel Fojt extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry 377*32bb5217SDaniel Fojt (const char *, const HashValue *) NCURSES_TACK_1_08; 378*32bb5217SDaniel Fojt extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool) NCURSES_TACK_1_08; 379*32bb5217SDaniel Fojt 380*32bb5217SDaniel Fojt /* comp_scan.c: lexical analysis */ 381*32bb5217SDaniel Fojt extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *) NCURSES_TACK_1_08; 382*32bb5217SDaniel Fojt 383*32bb5217SDaniel Fojt /* comp_expand.c: expand string into readable form */ 384*32bb5217SDaniel Fojt extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int) NCURSES_TACK_1_08; 385*32bb5217SDaniel Fojt 386*32bb5217SDaniel Fojt /* comp_scan.c: decode string from readable form */ 387*32bb5217SDaniel Fojt extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *) NCURSES_TACK_1_08; 388*32bb5217SDaniel Fojt 3893468e90cSJohn Marino #endif /* NCURSES_TERM_ENTRY_H_incl */ 3903468e90cSJohn Marino 391fdd4e1e0SJan Lentfer #ifdef __cplusplus 392fdd4e1e0SJan Lentfer } 393fdd4e1e0SJan Lentfer #endif 394fdd4e1e0SJan Lentfer 3953468e90cSJohn Marino /* *INDENT-ON* */ 396fdd4e1e0SJan Lentfer #endif /* __TIC_H */ 397