From 83965726d5757ad4a68c8e2e756e6a31d59a614d Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 7 Mar 2020 22:17:23 -0800 Subject: 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. --- pp.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'pp.c') 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) { -- cgit v1.2.3