1 /* $XConsortium: def.h,v 1.25 94/04/17 20:10:33 gildea Exp $ */
4 Copyright (c) 1993, 1994 X Consortium
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, 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:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of the X Consortium shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from the X Consortium.
30 #include <X11/Xosdefs.h>
32 #include <X11/Xw32defs.h>
35 #include <X11/Xfuncproto.h>
50 #include <sys/types.h>
55 #define S_IFDIR 0040000
59 #define S_IFREG 0100000
62 #define MAXDEFINES 512
63 #define MAXFILES 2048 /* Increased from 512. -mcafee */
64 /* Increased from 1024. -mh */
66 #define SYMHASHSEED 131 /* 131 1313 13131 ... */
67 #define SYMHASHMEMBERS 64 /* must be 2^x to work right */
71 /* the following must match the directives table in main.c */
87 #define IFFALSE 15 /* pseudo value --- never matched */
88 #define ELIFFALSE 16 /* pseudo value --- never matched */
89 #define INCLUDEDOT 17 /* pseudo value --- never matched */
90 #define IFGUESSFALSE 18 /* pseudo value --- never matched */
91 #define ELIFGUESSFALSE 19 /* pseudo value --- never matched */
94 extern int _debugmask
;
98 * 0 show ifn*(def)*,endif
99 * 1 trace defined/!defined
101 * 3 show #include SYMBOL
104 #define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
106 #define debug(level,arg) /**/
109 // VG: a C++ class for information about directories
110 #include "collectdircontent.hxx"
112 typedef unsigned char boolean
;
121 struct pair
*s_pairs
[SYMHASHMEMBERS
];
125 char *i_incstring
; /* string from #include line */
126 char *i_file
; /* path name of the include file */
127 struct inclist
**i_list
; /* list of files it itself includes */
128 int i_listlen
; /* length of i_list */
129 boolean i_defchecked
; /* whether defines have been checked */
130 boolean i_notified
; /* whether we have revealed includes */
131 boolean i_marked
; /* whether it's in the makefile */
132 boolean i_searched
; /* whether we have read this */
133 boolean i_included_sym
; /* whether #include SYMBOL was found */
134 /* Can't use i_list if TRUE */
145 #ifndef X_NOT_STDC_ENV
147 #if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
148 char *malloc(), *realloc();
159 struct filepointer
*getfile();
160 struct inclist
*newinclude();
161 struct inclist
*inc_path();
163 void define( char *def
, struct symhash
**symbols
);
164 void hash_define(char *name
, char * val
, struct symhash
**symbols
);
165 struct symhash
*hash_copy( struct symhash
*symbols
);
166 void hash_free( struct symhash
*symbols
);
168 #if NeedVarargsPrototypes
169 extern fatalerr(char *, ...);
170 extern warning(char *, ...);
171 extern warning1(char *, ...);
174 void convert_slashes(char *);
175 char *append_slash(char *);