Annotation of src/usr.bin/tic/dump_entry.h, Revision 1.7
1.7 ! nicm 1: /* $OpenBSD: dump_entry.h,v 1.6 2010/01/12 23:22:14 nicm Exp $ */
1.1 millert 2:
3: /****************************************************************************
1.7 ! nicm 4: * Copyright 2018-2020,2021 Thomas E. Dickey *
! 5: * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
1.1 millert 6: * *
7: * Permission is hereby granted, free of charge, to any person obtaining a *
8: * copy of this software and associated documentation files (the *
9: * "Software"), to deal in the Software without restriction, including *
10: * without limitation the rights to use, copy, modify, merge, publish, *
11: * distribute, distribute with modifications, sublicense, and/or sell *
12: * copies of the Software, and to permit persons to whom the Software is *
13: * furnished to do so, subject to the following conditions: *
14: * *
15: * The above copyright notice and this permission notice shall be included *
16: * in all copies or substantial portions of the Software. *
17: * *
18: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
19: * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
20: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
21: * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
22: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
23: * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
24: * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
25: * *
26: * Except as contained in this notice, the name(s) of the above copyright *
27: * holders shall not be used in advertising or otherwise to promote the *
28: * sale, use or other dealings in this Software without prior written *
29: * authorization. *
30: ****************************************************************************/
31:
32: /****************************************************************************
33: * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
34: * and: Eric S. Raymond <esr@snark.thyrsus.com> *
1.6 nicm 35: * and: Thomas E. Dickey 1996-on *
1.1 millert 36: ****************************************************************************/
37:
38: /*
1.7 ! nicm 39: * $Id: dump_entry.h,v 1.6 2010/01/12 23:22:14 nicm Exp $
1.6 nicm 40: *
1.1 millert 41: * Dump control definitions and variables
42: */
43:
1.6 nicm 44: #ifndef DUMP_ENTRY_H
45: #define DUMP_ENTRY_H 1
46:
1.7 ! nicm 47: #define NCURSES_OPAQUE 0
! 48: #define NCURSES_INTERNALS 1
! 49: #include <curses.h>
! 50: #include <term.h>
! 51:
1.1 millert 52: /* capability output formats */
53: #define F_TERMINFO 0 /* use terminfo names */
54: #define F_VARIABLE 1 /* use C variable names */
55: #define F_TERMCAP 2 /* termcap names with capability conversion */
56: #define F_TCONVERR 3 /* as T_TERMCAP, no skip of untranslatables */
57: #define F_LITERAL 4 /* like F_TERMINFO, but no smart defaults */
58:
59: /* capability sort modes */
60: #define S_DEFAULT 0 /* sort by terminfo name (implicit) */
61: #define S_NOSORT 1 /* don't sort */
62: #define S_TERMINFO 2 /* sort by terminfo names (explicit) */
63: #define S_VARIABLE 3 /* sort by C variable names */
64: #define S_TERMCAP 4 /* sort by termcap names */
65:
1.5 millert 66: /* capability types for the comparison hook */
67: #define CMP_BOOLEAN 0 /* comparison on booleans */
68: #define CMP_NUMBER 1 /* comparison on numerics */
69: #define CMP_STRING 2 /* comparison on strings */
70: #define CMP_USE 3 /* comparison on use capabilities */
71:
1.7 ! nicm 72: #ifndef _TERMSORT_H
1.6 nicm 73: typedef unsigned PredType;
74: typedef unsigned PredIdx;
1.7 ! nicm 75: #endif
! 76:
! 77: typedef int (*PredFunc) (PredType, PredIdx);
! 78: typedef void (*PredHook) (PredType, PredIdx, const char *);
1.6 nicm 79:
1.1 millert 80: extern NCURSES_CONST char *nametrans(const char *);
1.7 ! nicm 81: extern bool has_params(const char *, bool);
! 82: extern int fmt_entry(TERMTYPE2 *, PredFunc, int, int, int, int);
1.6 nicm 83: extern int show_entry(void);
1.7 ! nicm 84: extern void compare_entry(PredHook, TERMTYPE2 *, bool);
! 85: extern void dump_entry(TERMTYPE2 *, int, int, int, PredFunc);
! 86: extern void dump_init(const char *, int, int, bool, int, int, unsigned, bool,
! 87: bool, int);
1.6 nicm 88: extern void dump_uses(const char *, bool);
1.7 ! nicm 89: extern void repair_acsc(TERMTYPE2 *tp);
! 90:
! 91: #define L_CURL "{"
! 92: #define R_CURL "}"
1.1 millert 93:
94: #define FAIL -1
1.6 nicm 95:
96: #endif /* DUMP_ENTRY_H */