diff options
author | harti <harti@FreeBSD.org> | 2005-03-30 15:18:58 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-03-30 15:18:58 +0000 |
commit | 495f1f48a81f03592552def7f2e50b2e699d8473 (patch) | |
tree | 76bd8e21601dfeeab94e4aab0aa1b9ce981e46a9 /usr.bin/make/parse.h | |
parent | cf97e03db75b91cbf2215cb833a5d278f152fd6e (diff) | |
download | FreeBSD-src-495f1f48a81f03592552def7f2e50b2e699d8473.zip FreeBSD-src-495f1f48a81f03592552def7f2e50b2e699d8473.tar.gz |
Make the structure for handling the input stack local to the parse
module. The only module accessing it (the current line number) was the
condition module, so pass the current line number as a function argument.
Centralize the pushing of new input sources into one function
ParsePushInput() and rename the function handling the popping from ParseEOF()
to ParsePopInput(). Make the entire thing a little bit clearer, by holding
the current input source in the top element of the stack instead of
using extra variables for this. Use a type-safe intrusive list for the
input stack.
Diffstat (limited to 'usr.bin/make/parse.h')
-rw-r--r-- | usr.bin/make/parse.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/usr.bin/make/parse.h b/usr.bin/make/parse.h index 04c4df7..867835b 100644 --- a/usr.bin/make/parse.h +++ b/usr.bin/make/parse.h @@ -48,26 +48,12 @@ struct GNode; struct Lst; -/* - * Definitions for handling #include specifications - */ -typedef struct { - char *str; - char *ptr; -} PTR; -typedef struct IFile { - char *fname; /* name of previous file */ - int lineno; /* saved line number */ - FILE *F; /* the open stream */ - PTR *p; /* the char pointer */ -} IFile; - void Parse_Error(int, const char *, ...); Boolean Parse_AnyExport(void); Boolean Parse_IsVar(char *); void Parse_DoVar(char *, struct GNode *); void Parse_AddIncludeDir(char *); -void Parse_File(char *, FILE *); +void Parse_File(const char *, FILE *); void Parse_Init(void); void Parse_FromString(char *, int); void Parse_MainName(struct Lst *); |