aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-01 12:45:47 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:00 -0700
commit80b880d61d0cbcee8bb6561d14f7cae841cfa2e2 (patch)
tree1ae6bfc6867a4e767d04ed35f62b32ab50806272 /token.h
parentImplement "include_next" (diff)
downloadsparse-80b880d61d0cbcee8bb6561d14f7cae841cfa2e2.tar.gz
sparse-80b880d61d0cbcee8bb6561d14f7cae841cfa2e2.tar.bz2
sparse-80b880d61d0cbcee8bb6561d14f7cae841cfa2e2.zip
Make "next_path" be per-stream for better "include_next".
Maybe this makes us gcc-compatible. Maybe it doesn't.
Diffstat (limited to 'token.h')
-rw-r--r--token.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/token.h b/token.h
index 5fe81b2..ecb8ea0 100644
--- a/token.h
+++ b/token.h
@@ -30,9 +30,12 @@ enum constantfile {
CONSTANT_FILE_YES // Yes
};
+extern const char *includepath[];
+
struct stream {
int fd;
const char *name;
+ const char **next_path;
/* Use these to check for "already parsed" */
enum constantfile constant;
@@ -176,7 +179,7 @@ extern int preprocessing, verbose;
extern struct token eof_token_entry;
#define eof_token(x) ((x) == &eof_token_entry)
-extern int init_stream(const char *, int fd);
+extern int init_stream(const char *, int fd, const char **next_path);
extern struct ident *hash_ident(struct ident *);
extern struct ident *built_in_ident(const char *);
extern struct token *built_in_token(int, const char *);
@@ -184,7 +187,7 @@ extern const char *show_special(int);
extern const char *show_ident(const struct ident *);
extern const char *show_string(const struct string *string);
extern const char *show_token(const struct token *);
-extern struct token * tokenize(const char *, int, struct token *);
+extern struct token * tokenize(const char *, int, struct token *, const char **next_path);
extern struct token * tokenize_buffer(unsigned char *, unsigned long, struct token *);
extern void die(const char *, ...);