aboutsummaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-03-07 22:17:23 -0800
committerMichael Forney <mforney@mforney.org>2020-03-16 02:20:34 -0700
commit83965726d5757ad4a68c8e2e756e6a31d59a614d (patch)
treed9148b444e2974dd9d066ceee88cf8baf6bd7c37 /pp.c
parent717d4f68f426d1edbf10b846448c63390840ffc5 (diff)
Allow multiple inputs to main compiler process
This way, we can implement -include in the driver by just passing an additional input to the compiler.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/pp.c b/pp.c
index 8db0848..a92ee26 100644
--- a/pp.c
+++ b/pp.c
@@ -9,6 +9,12 @@
static struct token pending;
+void
+ppinit(void)
+{
+ next();
+}
+
static void
keyword(struct token *tok)
{
@@ -92,14 +98,6 @@ keyword(struct token *tok)
}
}
-void
-ppinit(const char *file)
-{
- if (scanfrom(file) < 0)
- fatal("open %s:", file);
- next();
-}
-
static void
nextinto(struct token *t)
{