dump_entry.h revision 184989
1248693Sgleb/**************************************************************************** 2248693Sgleb * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * 3248693Sgleb * * 4248693Sgleb * Permission is hereby granted, free of charge, to any person obtaining a * 5248693Sgleb * copy of this software and associated documentation files (the * 6248693Sgleb * "Software"), to deal in the Software without restriction, including * 7248693Sgleb * without limitation the rights to use, copy, modify, merge, publish, * 8248693Sgleb * distribute, distribute with modifications, sublicense, and/or sell * 9248693Sgleb * copies of the Software, and to permit persons to whom the Software is * 10248693Sgleb * furnished to do so, subject to the following conditions: * 11248693Sgleb * * 12248693Sgleb * The above copyright notice and this permission notice shall be included * 13248693Sgleb * in all copies or substantial portions of the Software. * 14248693Sgleb * * 15248693Sgleb * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 16248693Sgleb * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 17248693Sgleb * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 18248693Sgleb * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 19248693Sgleb * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 20248693Sgleb * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 21248693Sgleb * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 22248693Sgleb * * 23248693Sgleb * Except as contained in this notice, the name(s) of the above copyright * 24248693Sgleb * holders shall not be used in advertising or otherwise to promote the * 25248693Sgleb * sale, use or other dealings in this Software without prior written * 26248693Sgleb * authorization. * 27248693Sgleb ****************************************************************************/ 28248693Sgleb 29248693Sgleb/**************************************************************************** 30248693Sgleb * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 31248693Sgleb * and: Eric S. Raymond <esr@snark.thyrsus.com> * 32248693Sgleb * and: Thomas E. Dickey 1996-on * 33248693Sgleb ****************************************************************************/ 34248693Sgleb 35248693Sgleb 36248693Sgleb/* 37248693Sgleb * $Id: dump_entry.h,v 1.30 2008/07/12 20:23:03 tom Exp $ 38248693Sgleb * 39248693Sgleb * Dump control definitions and variables 40248693Sgleb */ 41248693Sgleb 42248693Sgleb#ifndef DUMP_ENTRY_H 43248693Sgleb#define DUMP_ENTRY_H 1 44248693Sgleb 45248693Sgleb/* capability output formats */ 46248693Sgleb#define F_TERMINFO 0 /* use terminfo names */ 47248693Sgleb#define F_VARIABLE 1 /* use C variable names */ 48248693Sgleb#define F_TERMCAP 2 /* termcap names with capability conversion */ 49248693Sgleb#define F_TCONVERR 3 /* as T_TERMCAP, no skip of untranslatables */ 50248693Sgleb#define F_LITERAL 4 /* like F_TERMINFO, but no smart defaults */ 51248693Sgleb 52248693Sgleb/* capability sort modes */ 53248693Sgleb#define S_DEFAULT 0 /* sort by terminfo name (implicit) */ 54248693Sgleb#define S_NOSORT 1 /* don't sort */ 55248693Sgleb#define S_TERMINFO 2 /* sort by terminfo names (explicit) */ 56248693Sgleb#define S_VARIABLE 3 /* sort by C variable names */ 57248693Sgleb#define S_TERMCAP 4 /* sort by termcap names */ 58248693Sgleb 59248693Sgleb/* capability types for the comparison hook */ 60248693Sgleb#define CMP_BOOLEAN 0 /* comparison on booleans */ 61248693Sgleb#define CMP_NUMBER 1 /* comparison on numerics */ 62248693Sgleb#define CMP_STRING 2 /* comparison on strings */ 63248693Sgleb#define CMP_USE 3 /* comparison on use capabilities */ 64248693Sgleb 65248693Sglebtypedef unsigned PredType; 66248693Sglebtypedef unsigned PredIdx; 67typedef int (*PredFunc)(PredType, PredIdx); 68 69extern NCURSES_CONST char *nametrans(const char *); 70extern int fmt_entry(TERMTYPE *, PredFunc, bool, bool, bool, int); 71extern int show_entry(void); 72extern void compare_entry(void (*)(PredType, PredIdx, const char *), TERMTYPE *, bool); 73extern void dump_entry(TERMTYPE *, bool, bool, int, PredFunc); 74extern void dump_init(const char *, int, int, int, int, bool); 75extern void dump_uses(const char *, bool); 76extern void repair_acsc(TERMTYPE * tp); 77 78#define FAIL -1 79 80#endif /* DUMP_ENTRY_H */ 81