1 /* $XTermId: luit.h,v 1.23 2018/06/27 09:25:47 tom Exp $ */
2 
3 /*
4 Copyright 2010-2013,2018 by Thomas E. Dickey
5 Copyright (c) 2001 by Juliusz Chroboczek
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 THE SOFTWARE.
24 */
25 
26 #ifndef LUIT_LUIT_H
27 #define LUIT_LUIT_H 1
28 
29 #include <config.h>
30 
31 #include <stdlib.h>
32 #include <stdio.h>
33 #include <string.h>
34 #include <ctype.h>
35 #include <assert.h>
36 #include <stdarg.h>
37 #include <sys/types.h>
38 
39 #ifndef GCC_UNUSED
40 #define GCC_UNUSED		/* ARGSUSED */
41 #endif
42 
43 #ifndef GCC_NORETURN
44 #define GCC_NORETURN		/* nothing */
45 #endif
46 
47 #ifndef GCC_PRINTFLIKE
48 #define GCC_PRINTFLIKE(a,b)	/* nothing */
49 #endif
50 
51 extern const char *locale_alias;
52 extern int fill_fontenc;
53 extern int ignore_locale;
54 extern int iso2022;
55 extern int sevenbit;
56 extern int ilog;
57 extern int olog;
58 extern int verbose;
59 
60 #define MAXCOLS 78
61 
62 void Message(const char *f,...) GCC_PRINTFLIKE(1,2);
63 void Warning(const char *f,...) GCC_PRINTFLIKE(1,2);
64 void FatalError(const char *f,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
65 
66 #define VERBOSE(level,params) if (verbose >= level) Message params
67 
68 #define IsEmpty(s) ((s) == 0 || (*(s)) == '\0')
69 #define NonNull(s) ((s) ? (s) : "<null>")
70 
71 #endif /* LUIT_LUIT_H */
72