From b5164c6585fabc3c848ff92ada3f6ffb64a9e8f2 Mon Sep 17 00:00:00 2001
From: dd
Date: Thu, 12 Jul 2001 02:08:51 +0000
Subject: 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
---
usr.sbin/config/main.c | 1 +
1 file changed, 1 insertion(+)
(limited to 'usr.sbin/config/main.c')
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) {
--
cgit v1.1