diff options
author | harti <harti@FreeBSD.org> | 2005-04-11 07:20:10 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-04-11 07:20:10 +0000 |
commit | e0e1cda47d1ab672740932980f0528e49c020775 (patch) | |
tree | 60d3956bc33947fb68e3718f818abf16c726d320 /usr.bin/make/parse.h | |
parent | f2968c80c994b77c5c1dafc45fce7be685d043e1 (diff) | |
download | FreeBSD-src-e0e1cda47d1ab672740932980f0528e49c020775.zip FreeBSD-src-e0e1cda47d1ab672740932980f0528e49c020775.tar.gz |
Rework the directive parsing code. Instead of using a lot of strcmp()s
on every line that starts with a dot use a minimal perfect hash
function and a single strcmp() on the first word after the dot
to find out whether it is really a directive call and, if yes, which
one. Then directly dispatch to a handler function for that directive
(or fall through to the dependency handling code). This makes the
directive parse a little bit more strict about the syntax: the directive
word must be followed by a character that is not alphanumerical and not
an underline (making .undefFOO illegal); .endif and .else can only be
followed by comments.
Diffstat (limited to 'usr.bin/make/parse.h')
-rw-r--r-- | usr.bin/make/parse.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/usr.bin/make/parse.h b/usr.bin/make/parse.h index 867835b..7917440 100644 --- a/usr.bin/make/parse.h +++ b/usr.bin/make/parse.h @@ -54,7 +54,6 @@ Boolean Parse_IsVar(char *); void Parse_DoVar(char *, struct GNode *); void Parse_AddIncludeDir(char *); void Parse_File(const char *, FILE *); -void Parse_Init(void); void Parse_FromString(char *, int); void Parse_MainName(struct Lst *); |