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