Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/usr/include
File: term_entry.h
/****************************************************************************
[0] Fix | Delete
* Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. *
[1] Fix | Delete
* *
[2] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a *
[3] Fix | Delete
* copy of this software and associated documentation files (the *
[4] Fix | Delete
* "Software"), to deal in the Software without restriction, including *
[5] Fix | Delete
* without limitation the rights to use, copy, modify, merge, publish, *
[6] Fix | Delete
* distribute, distribute with modifications, sublicense, and/or sell *
[7] Fix | Delete
* copies of the Software, and to permit persons to whom the Software is *
[8] Fix | Delete
* furnished to do so, subject to the following conditions: *
[9] Fix | Delete
* *
[10] Fix | Delete
* The above copyright notice and this permission notice shall be included *
[11] Fix | Delete
* in all copies or substantial portions of the Software. *
[12] Fix | Delete
* *
[13] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
[14] Fix | Delete
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
[15] Fix | Delete
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
[16] Fix | Delete
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
[17] Fix | Delete
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
[18] Fix | Delete
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
[19] Fix | Delete
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
[20] Fix | Delete
* *
[21] Fix | Delete
* Except as contained in this notice, the name(s) of the above copyright *
[22] Fix | Delete
* holders shall not be used in advertising or otherwise to promote the *
[23] Fix | Delete
* sale, use or other dealings in this Software without prior written *
[24] Fix | Delete
* authorization. *
[25] Fix | Delete
****************************************************************************/
[26] Fix | Delete
[27] Fix | Delete
/****************************************************************************
[28] Fix | Delete
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
[29] Fix | Delete
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
[30] Fix | Delete
* and: Thomas E. Dickey 1998-on *
[31] Fix | Delete
****************************************************************************/
[32] Fix | Delete
[33] Fix | Delete
/* $Id: term_entry.h,v 1.55 2017/04/06 22:45:34 tom Exp $ */
[34] Fix | Delete
[35] Fix | Delete
/*
[36] Fix | Delete
* term_entry.h -- interface to entry-manipulation code
[37] Fix | Delete
*/
[38] Fix | Delete
[39] Fix | Delete
#ifndef NCURSES_TERM_ENTRY_H_incl
[40] Fix | Delete
#define NCURSES_TERM_ENTRY_H_incl 1
[41] Fix | Delete
/* *INDENT-OFF* */
[42] Fix | Delete
[43] Fix | Delete
#ifdef __cplusplus
[44] Fix | Delete
extern "C" {
[45] Fix | Delete
#endif
[46] Fix | Delete
[47] Fix | Delete
#include <term.h>
[48] Fix | Delete
[49] Fix | Delete
/*
[50] Fix | Delete
* These macros may be used by programs that know about TERMTYPE:
[51] Fix | Delete
*/
[52] Fix | Delete
#if NCURSES_XNAMES
[53] Fix | Delete
#define NUM_BOOLEANS(tp) (tp)->num_Booleans
[54] Fix | Delete
#define NUM_NUMBERS(tp) (tp)->num_Numbers
[55] Fix | Delete
#define NUM_STRINGS(tp) (tp)->num_Strings
[56] Fix | Delete
#define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i]
[57] Fix | Delete
#else
[58] Fix | Delete
#define NUM_BOOLEANS(tp) BOOLCOUNT
[59] Fix | Delete
#define NUM_NUMBERS(tp) NUMCOUNT
[60] Fix | Delete
#define NUM_STRINGS(tp) STRCOUNT
[61] Fix | Delete
#define EXT_NAMES(tp,i,limit,index,table) table[i]
[62] Fix | Delete
#endif
[63] Fix | Delete
[64] Fix | Delete
#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
[65] Fix | Delete
[66] Fix | Delete
#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
[67] Fix | Delete
#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++)
[68] Fix | Delete
#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
[69] Fix | Delete
[70] Fix | Delete
#if NCURSES_XNAMES
[71] Fix | Delete
#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; (int) n < (int) NUM_BOOLEANS(tp); n++)
[72] Fix | Delete
#define for_each_ext_number(n,tp) for(n = NUMCOUNT; (int) n < (int) NUM_NUMBERS(tp); n++)
[73] Fix | Delete
#define for_each_ext_string(n,tp) for(n = STRCOUNT; (int) n < (int) NUM_STRINGS(tp); n++)
[74] Fix | Delete
#endif
[75] Fix | Delete
[76] Fix | Delete
#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
[77] Fix | Delete
#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
[78] Fix | Delete
#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
[79] Fix | Delete
[80] Fix | Delete
/*
[81] Fix | Delete
* The remaining type-definitions and macros are used only internally by the
[82] Fix | Delete
* ncurses utilities.
[83] Fix | Delete
*/
[84] Fix | Delete
#ifdef NCURSES_INTERNALS
[85] Fix | Delete
[86] Fix | Delete
/*
[87] Fix | Delete
* see db_iterator.c - this enumeration lists the places searched for a
[88] Fix | Delete
* terminal description and defines the order in which they are searched.
[89] Fix | Delete
*/
[90] Fix | Delete
typedef enum {
[91] Fix | Delete
dbdTIC = 0, /* special, used by tic when writing entry */
[92] Fix | Delete
#if NCURSES_USE_DATABASE
[93] Fix | Delete
dbdEnvOnce, /* the $TERMINFO environment variable */
[94] Fix | Delete
dbdHome, /* $HOME/.terminfo */
[95] Fix | Delete
dbdEnvList, /* the $TERMINFO_DIRS environment variable */
[96] Fix | Delete
dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
[97] Fix | Delete
dbdCfgOnce, /* the compiled-in TERMINFO value */
[98] Fix | Delete
#endif
[99] Fix | Delete
#if NCURSES_USE_TERMCAP
[100] Fix | Delete
dbdEnvOnce2, /* the $TERMCAP environment variable */
[101] Fix | Delete
dbdEnvList2, /* the $TERMPATH environment variable */
[102] Fix | Delete
dbdCfgList2, /* the compiled-in TERMPATH */
[103] Fix | Delete
#endif
[104] Fix | Delete
dbdLAST
[105] Fix | Delete
} DBDIRS;
[106] Fix | Delete
[107] Fix | Delete
#define MAX_USES 32
[108] Fix | Delete
#define MAX_CROSSLINKS 16
[109] Fix | Delete
[110] Fix | Delete
typedef struct entry ENTRY;
[111] Fix | Delete
[112] Fix | Delete
typedef struct {
[113] Fix | Delete
char *name;
[114] Fix | Delete
ENTRY *link;
[115] Fix | Delete
long line;
[116] Fix | Delete
} ENTRY_USES;
[117] Fix | Delete
[118] Fix | Delete
struct entry {
[119] Fix | Delete
TERMTYPE2 tterm;
[120] Fix | Delete
unsigned nuses;
[121] Fix | Delete
ENTRY_USES uses[MAX_USES];
[122] Fix | Delete
int ncrosslinks;
[123] Fix | Delete
ENTRY *crosslinks[MAX_CROSSLINKS];
[124] Fix | Delete
long cstart;
[125] Fix | Delete
long cend;
[126] Fix | Delete
long startline;
[127] Fix | Delete
ENTRY *next;
[128] Fix | Delete
ENTRY *last;
[129] Fix | Delete
};
[130] Fix | Delete
[131] Fix | Delete
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
[132] Fix | Delete
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
[133] Fix | Delete
#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
[134] Fix | Delete
[135] Fix | Delete
#define MAX_LINE 132
[136] Fix | Delete
[137] Fix | Delete
#define NULLHOOK (bool(*)(ENTRY *))0
[138] Fix | Delete
[139] Fix | Delete
/*
[140] Fix | Delete
* Note that WANTED and PRESENT are not simple inverses! If a capability
[141] Fix | Delete
* has been explicitly cancelled, it's not considered WANTED.
[142] Fix | Delete
*/
[143] Fix | Delete
#define WANTED(s) ((s) == ABSENT_STRING)
[144] Fix | Delete
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
[145] Fix | Delete
[146] Fix | Delete
#define ANDMISSING(p,q) \
[147] Fix | Delete
{ \
[148] Fix | Delete
if (PRESENT(p) && !PRESENT(q)) \
[149] Fix | Delete
_nc_warning(#p " but no " #q); \
[150] Fix | Delete
}
[151] Fix | Delete
[152] Fix | Delete
#define PAIRED(p,q) \
[153] Fix | Delete
{ \
[154] Fix | Delete
if (PRESENT(q) && !PRESENT(p)) \
[155] Fix | Delete
_nc_warning(#q " but no " #p); \
[156] Fix | Delete
if (PRESENT(p) && !PRESENT(q)) \
[157] Fix | Delete
_nc_warning(#p " but no " #q); \
[158] Fix | Delete
}
[159] Fix | Delete
[160] Fix | Delete
/*
[161] Fix | Delete
* These entrypoints are used only by the ncurses utilities such as tic.
[162] Fix | Delete
*/
[163] Fix | Delete
[164] Fix | Delete
/* alloc_entry.c: elementary allocation code */
[165] Fix | Delete
extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
[166] Fix | Delete
extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
[167] Fix | Delete
extern NCURSES_EXPORT(void) _nc_init_entry (ENTRY *const);
[168] Fix | Delete
extern NCURSES_EXPORT(void) _nc_merge_entry (ENTRY *const, ENTRY *const);
[169] Fix | Delete
extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
[170] Fix | Delete
[171] Fix | Delete
/* alloc_ttype.c: elementary allocation code */
[172] Fix | Delete
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
[173] Fix | Delete
[174] Fix | Delete
/* free_ttype.c: elementary allocation code */
[175] Fix | Delete
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
[176] Fix | Delete
[177] Fix | Delete
/* lib_termcap.c: trim sgr0 string for termcap users */
[178] Fix | Delete
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
[179] Fix | Delete
[180] Fix | Delete
/* parse_entry.c: entry-parsing code */
[181] Fix | Delete
#if NCURSES_XNAMES
[182] Fix | Delete
extern NCURSES_EXPORT_VAR(bool) _nc_user_definable;
[183] Fix | Delete
extern NCURSES_EXPORT_VAR(bool) _nc_disable_period;
[184] Fix | Delete
#endif
[185] Fix | Delete
extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
[186] Fix | Delete
extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
[187] Fix | Delete
[188] Fix | Delete
/* write_entry.c: writing an entry to the file system */
[189] Fix | Delete
extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
[190] Fix | Delete
extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE2 *const);
[191] Fix | Delete
extern NCURSES_EXPORT(int) _nc_write_object (TERMTYPE2 *, char *, unsigned *, unsigned);
[192] Fix | Delete
[193] Fix | Delete
/* comp_parse.c: entry list handling */
[194] Fix | Delete
extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
[195] Fix | Delete
extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
[196] Fix | Delete
extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
[197] Fix | Delete
extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
[198] Fix | Delete
extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
[199] Fix | Delete
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
[200] Fix | Delete
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE2 *, bool);
[201] Fix | Delete
[202] Fix | Delete
/* trace_xnames.c */
[203] Fix | Delete
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
[204] Fix | Delete
[205] Fix | Delete
#endif /* NCURSES_INTERNALS */
[206] Fix | Delete
[207] Fix | Delete
/*
[208] Fix | Delete
* These entrypoints are used by tack.
[209] Fix | Delete
*/
[210] Fix | Delete
[211] Fix | Delete
/* alloc_ttype.c: elementary allocation code */
[212] Fix | Delete
extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *);
[213] Fix | Delete
[214] Fix | Delete
/* lib_acs.c */
[215] Fix | Delete
extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
[216] Fix | Delete
[217] Fix | Delete
/* free_ttype.c: elementary allocation code */
[218] Fix | Delete
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
[219] Fix | Delete
[220] Fix | Delete
#ifdef __cplusplus
[221] Fix | Delete
}
[222] Fix | Delete
#endif
[223] Fix | Delete
[224] Fix | Delete
/* *INDENT-ON* */
[225] Fix | Delete
[226] Fix | Delete
#endif /* NCURSES_TERM_ENTRY_H_incl */
[227] Fix | Delete
[228] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function