15f4613f2SJohn Marino /**************************************************************************** 2*32bb5217SDaniel Fojt * Copyright 2018,2020 Thomas E. Dickey * 3*32bb5217SDaniel Fojt * Copyright 1998-2016,2017 Free Software Foundation, Inc. * 45f4613f2SJohn Marino * * 55f4613f2SJohn Marino * Permission is hereby granted, free of charge, to any person obtaining a * 65f4613f2SJohn Marino * copy of this software and associated documentation files (the * 75f4613f2SJohn Marino * "Software"), to deal in the Software without restriction, including * 85f4613f2SJohn Marino * without limitation the rights to use, copy, modify, merge, publish, * 95f4613f2SJohn Marino * distribute, distribute with modifications, sublicense, and/or sell * 105f4613f2SJohn Marino * copies of the Software, and to permit persons to whom the Software is * 115f4613f2SJohn Marino * furnished to do so, subject to the following conditions: * 125f4613f2SJohn Marino * * 135f4613f2SJohn Marino * The above copyright notice and this permission notice shall be included * 145f4613f2SJohn Marino * in all copies or substantial portions of the Software. * 155f4613f2SJohn Marino * * 165f4613f2SJohn Marino * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 175f4613f2SJohn Marino * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 185f4613f2SJohn Marino * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 195f4613f2SJohn Marino * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 205f4613f2SJohn Marino * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 215f4613f2SJohn Marino * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 225f4613f2SJohn Marino * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 235f4613f2SJohn Marino * * 245f4613f2SJohn Marino * Except as contained in this notice, the name(s) of the above copyright * 255f4613f2SJohn Marino * holders shall not be used in advertising or otherwise to promote the * 265f4613f2SJohn Marino * sale, use or other dealings in this Software without prior written * 275f4613f2SJohn Marino * authorization. * 285f4613f2SJohn Marino ****************************************************************************/ 295f4613f2SJohn Marino 305f4613f2SJohn Marino /**************************************************************************** 315f4613f2SJohn Marino * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 325f4613f2SJohn Marino * and: Eric S. Raymond <esr@snark.thyrsus.com> * 335f4613f2SJohn Marino * and: Thomas E. Dickey 1996-on * 345f4613f2SJohn Marino ****************************************************************************/ 355f4613f2SJohn Marino 365f4613f2SJohn Marino /* 37*32bb5217SDaniel Fojt * $Id: dump_entry.h,v 1.42 2020/02/02 23:34:34 tom Exp $ 385f4613f2SJohn Marino * 395f4613f2SJohn Marino * Dump control definitions and variables 405f4613f2SJohn Marino */ 415f4613f2SJohn Marino 425f4613f2SJohn Marino #ifndef DUMP_ENTRY_H 435f4613f2SJohn Marino #define DUMP_ENTRY_H 1 445f4613f2SJohn Marino 45*32bb5217SDaniel Fojt #define NCURSES_OPAQUE 0 46*32bb5217SDaniel Fojt #define NCURSES_INTERNALS 1 47*32bb5217SDaniel Fojt #include <curses.h> 48*32bb5217SDaniel Fojt #include <term.h> 49*32bb5217SDaniel Fojt 505f4613f2SJohn Marino /* capability output formats */ 515f4613f2SJohn Marino #define F_TERMINFO 0 /* use terminfo names */ 525f4613f2SJohn Marino #define F_VARIABLE 1 /* use C variable names */ 535f4613f2SJohn Marino #define F_TERMCAP 2 /* termcap names with capability conversion */ 545f4613f2SJohn Marino #define F_TCONVERR 3 /* as T_TERMCAP, no skip of untranslatables */ 555f4613f2SJohn Marino #define F_LITERAL 4 /* like F_TERMINFO, but no smart defaults */ 565f4613f2SJohn Marino 575f4613f2SJohn Marino /* capability sort modes */ 585f4613f2SJohn Marino #define S_DEFAULT 0 /* sort by terminfo name (implicit) */ 595f4613f2SJohn Marino #define S_NOSORT 1 /* don't sort */ 605f4613f2SJohn Marino #define S_TERMINFO 2 /* sort by terminfo names (explicit) */ 615f4613f2SJohn Marino #define S_VARIABLE 3 /* sort by C variable names */ 625f4613f2SJohn Marino #define S_TERMCAP 4 /* sort by termcap names */ 635f4613f2SJohn Marino 645f4613f2SJohn Marino /* capability types for the comparison hook */ 655f4613f2SJohn Marino #define CMP_BOOLEAN 0 /* comparison on booleans */ 665f4613f2SJohn Marino #define CMP_NUMBER 1 /* comparison on numerics */ 675f4613f2SJohn Marino #define CMP_STRING 2 /* comparison on strings */ 685f4613f2SJohn Marino #define CMP_USE 3 /* comparison on use capabilities */ 695f4613f2SJohn Marino 705f4613f2SJohn Marino typedef unsigned PredType; 715f4613f2SJohn Marino typedef unsigned PredIdx; 725f4613f2SJohn Marino typedef int (*PredFunc) (PredType, PredIdx); 733468e90cSJohn Marino typedef void (*PredHook) (PredType, PredIdx, const char *); 745f4613f2SJohn Marino 755f4613f2SJohn Marino extern NCURSES_CONST char *nametrans(const char *); 763468e90cSJohn Marino extern bool has_params(const char *src); 77*32bb5217SDaniel Fojt extern int fmt_entry(TERMTYPE2 *, PredFunc, int, int, int, int); 785f4613f2SJohn Marino extern int show_entry(void); 79*32bb5217SDaniel Fojt extern void compare_entry(PredHook, TERMTYPE2 *, bool); 80*32bb5217SDaniel Fojt extern void dump_entry(TERMTYPE2 *, int, int, int, PredFunc); 81*32bb5217SDaniel Fojt extern void dump_init(const char *, int, int, bool, int, int, unsigned, bool, 823468e90cSJohn Marino bool, int); 835f4613f2SJohn Marino extern void dump_uses(const char *, bool); 84*32bb5217SDaniel Fojt extern void repair_acsc(TERMTYPE2 *tp); 85*32bb5217SDaniel Fojt 86*32bb5217SDaniel Fojt #define L_CURL "{" 87*32bb5217SDaniel Fojt #define R_CURL "}" 885f4613f2SJohn Marino 895f4613f2SJohn Marino #define FAIL -1 905f4613f2SJohn Marino 915f4613f2SJohn Marino #endif /* DUMP_ENTRY_H */ 92