summaryrefslogtreecommitdiff
path: root/def.h
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:18 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:18 +0000
commit399a057630f4aadf9a1d3a4b897c21e7e4c44932 (patch)
tree26b5e2d5670359b095209d199c53d8a099d11e31 /def.h
parentac5d447a2f18bdd07d5f97bb27cd9d065e30f683 (diff)
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'def.h')
-rw-r--r--def.h81
1 files changed, 58 insertions, 23 deletions
diff --git a/def.h b/def.h
index 63f6bd0..f80c9d2 100644
--- a/def.h
+++ b/def.h
@@ -24,22 +24,28 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/config/makedepend/def.h,v 3.14 2003/01/17 17:09:49 tsi Exp $ */
#include "Xos.h"
#include "Xfuncproto.h"
+#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
+#if 0
#ifndef X_NOT_POSIX
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#endif
#endif
+#endif
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#define MAXDEFINES 512
#define MAXFILES 1024
+#define MAXINCFILES 128 /* "-include" files */
#define MAXDIRS 64
#define SYMTABINC 10 /* must be > 1 for define() to work right */
#define TRUE 1
@@ -61,12 +67,14 @@ in this Software without prior written authorization from The Open Group.
#define SCCS 12
#define ELIF 13
#define EJECT 14
-#define WARNING 15
-#define IFFALSE 16 /* pseudo value --- never matched */
-#define ELIFFALSE 17 /* pseudo value --- never matched */
-#define INCLUDEDOT 18 /* pseudo value --- never matched */
-#define IFGUESSFALSE 19 /* pseudo value --- never matched */
-#define ELIFGUESSFALSE 20 /* pseudo value --- never matched */
+#define WARNING 15
+#define INCLUDENEXT 16
+#define IFFALSE 17 /* pseudo value --- never matched */
+#define ELIFFALSE 18 /* pseudo value --- never matched */
+#define INCLUDEDOT 19 /* pseudo value --- never matched */
+#define IFGUESSFALSE 20 /* pseudo value --- never matched */
+#define ELIFGUESSFALSE 21 /* pseudo value --- never matched */
+#define INCLUDENEXTDOT 22 /* pseudo value --- never matched */
#ifdef DEBUG
extern int _debugmask;
@@ -113,35 +121,62 @@ struct inclist {
};
struct filepointer {
+ char *f_name;
char *f_p;
char *f_base;
char *f_end;
long f_len;
long f_line;
+ long cmdinc_count;
+ char **cmdinc_list;
+ long cmdinc_line;
};
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
char *malloc(), *realloc();
#endif /* macII */
-#else
-char *malloc();
-char *realloc();
-#endif
-char *copy();
-char *base_name();
-char *getline();
-struct symtab **slookup();
-struct symtab **isdefined();
-struct symtab **fdefined();
-struct filepointer *getfile();
-struct inclist *newinclude();
-struct inclist *inc_path();
-
-#if NeedVarargsPrototypes
+char *copy(char *str);
+int match(char *str, char **list);
+char *base_name(char *file);
+char *getnextline(struct filepointer *fp);
+struct symtab **slookup(char *symbol, struct inclist *file);
+struct symtab **isdefined(char *symbol, struct inclist *file,
+ struct inclist **srcfile);
+struct symtab **fdefined(char *symbol, struct inclist *file,
+ struct inclist **srcfile);
+struct filepointer *getfile(char *file);
+void included_by(struct inclist *ip,
+ struct inclist *newfile);
+struct inclist *newinclude(char *newfile, char *incstring);
+void inc_clean (void);
+struct inclist *inc_path(char *file, char *include, int type);
+
+void freefile(struct filepointer *fp);
+
+void define2(char *name, char *val, struct inclist *file);
+void define(char *def, struct inclist *file);
+void undefine(char *symbol, struct inclist *file);
+int find_includes(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
+ int recursion, boolean failOK);
+
+void recursive_pr_include(struct inclist *head,
+ char *file, char *base);
+void add_include(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
+ char *include, int type,
+ boolean failOK);
+
+int cppsetup(char *filename,
+ char *line,
+ struct filepointer *filep,
+ struct inclist *inc);
+
+
extern void fatalerr(char *, ...);
extern void warning(char *, ...);
extern void warning1(char *, ...);
-#endif