diff options
author | dd <dd@FreeBSD.org> | 2001-07-12 02:08:51 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-07-12 02:08:51 +0000 |
commit | b5164c6585fabc3c848ff92ada3f6ffb64a9e8f2 (patch) | |
tree | 6e5c6a1c595fde5e5c90b1af74b8c2880c887a37 /usr.sbin/config/main.c | |
parent | 93faa5d597dce09f52a652cb24242bd11e6b6682 (diff) | |
download | FreeBSD-src-b5164c6585fabc3c848ff92ada3f6ffb64a9e8f2.zip FreeBSD-src-b5164c6585fabc3c848ff92ada3f6ffb64a9e8f2.tar.gz |
Introduce an "include" directive. It takes one argument, a filename
to be included into this one. This works the same way as #include
does in C; as far as the user is concerned, the included file is
inlined into the current one.
Since config(8) is no longer limited to working on one user-supplied
file, printing just a line number in an error message is not
sufficient. The new global variable yyfile represents the file
currently being parsed, and must be printed as well.
Reviewed by: imp
Obtained from: OpenBSD
Diffstat (limited to 'usr.sbin/config/main.c')
-rw-r--r-- | usr.sbin/config/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 3a0fff5..2e52846 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -144,6 +144,7 @@ main(int argc, char **argv) errx(2, "%s isn't a directory", p); dtab = NULL; + yyfile = *argv; if (yyparse()) exit(3); if (machinename == NULL) { |