1
/* $Xorg: def.h,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $ */
4
Copyright (c) 1993, 1994, 1998 The Open Group.
6
Permission to use, copy, modify, distribute, and sell this software and its
7
documentation for any purpose is hereby granted without fee, provided that
8
the above copyright notice appear in all copies and that both that
9
copyright notice and this permission notice appear in supporting
12
The above copyright notice and this permission notice shall be included in
13
all copies or substantial portions of the Software.
15
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
Except as contained in this notice, the name of The Open Group shall not be
23
used in advertising or otherwise to promote the sale, use or other dealings
24
in this Software without prior written authorization from The Open Group.
27
/* $XFree86: xc/config/makedepend/def.h,v 3.14 2003/01/17 17:09:49 tsi Exp $ */
31
#include <X11/Xfuncproto.h>
44
#include <sys/types.h>
48
#define MAXDEFINES 512
50
#define MAXINCFILES 256 /* "-include" files */
52
#define SYMTABINC 10 /* must be > 1 for define() to work right */
56
/* the following must match the directives table in main.c */
73
#define INCLUDENEXT 16
74
#define IFFALSE 17 /* pseudo value --- never matched */
75
#define ELIFFALSE 18 /* pseudo value --- never matched */
76
#define INCLUDEDOT 19 /* pseudo value --- never matched */
77
#define IFGUESSFALSE 20 /* pseudo value --- never matched */
78
#define ELIFGUESSFALSE 21 /* pseudo value --- never matched */
79
#define INCLUDENEXTDOT 22 /* pseudo value --- never matched */
82
extern int _debugmask;
86
* 0 show ifn*(def)*,endif
87
* 1 trace defined/!defined
89
* 3 show #include SYMBOL
92
#define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
94
#define debug(level,arg) /**/
97
typedef unsigned char boolean;
104
/* possible i_flag */
105
#define DEFCHECKED (1<<0) /* whether defines have been checked */
106
#define NOTIFIED (1<<1) /* whether we have revealed includes */
107
#define MARKED (1<<2) /* whether it's in the makefile */
108
#define SEARCHED (1<<3) /* whether we have read this */
109
#define FINISHED (1<<4) /* whether we are done reading this */
110
#define INCLUDED_SYM (1<<5) /* whether #include SYMBOL was found
111
Can't use i_list if TRUE */
113
char *i_incstring; /* string from #include line */
114
char *i_file; /* path name of the include file */
115
struct inclist **i_list; /* list of files it itself includes */
116
int i_listlen; /* length of i_list */
117
struct symtab **i_defs; /* symbol table for this file and its
118
children when merged */
119
int i_ndefs; /* current # defines */
120
boolean *i_merged; /* whether we have merged child
122
unsigned char i_flags;
138
#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
139
char *malloc(), *realloc();
142
char *copy(char *str);
143
int match(char *str, char **list);
144
char *base_name(char *file);
145
char *getnextline(struct filepointer *fp);
146
struct symtab **slookup(char *symbol, struct inclist *file);
147
struct symtab **isdefined(char *symbol, struct inclist *file,
148
struct inclist **srcfile);
149
struct symtab **fdefined(char *symbol, struct inclist *file,
150
struct inclist **srcfile);
151
struct filepointer *getfile(char *file);
152
void included_by(struct inclist *ip,
153
struct inclist *newfile);
154
struct inclist *newinclude(char *newfile, char *incstring);
155
void inc_clean (void);
156
struct inclist *inc_path(char *file, char *include, int type);
158
void freefile(struct filepointer *fp);
160
void define2(char *name, char *val, struct inclist *file);
161
void define(char *def, struct inclist *file);
162
void undefine(char *symbol, struct inclist *file);
163
int find_includes(struct filepointer *filep,
164
struct inclist *file,
165
struct inclist *file_red,
166
int recursion, boolean failOK);
168
void recursive_pr_include(struct inclist *head,
169
char *file, char *base);
170
void add_include(struct filepointer *filep,
171
struct inclist *file,
172
struct inclist *file_red,
173
char *include, int type,
176
int cppsetup(char *filename,
178
struct filepointer *filep,
179
struct inclist *inc);
182
extern void fatalerr(char *, ...);
183
extern void warning(char *, ...);
184
extern void warning1(char *, ...);