scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit dc7f23a3bbdfa0953f60809d4fc9588c1f1efe4a
parent e18d6203bb1c9ebba5d6cfc3300423b15aaf2338
Author: Michael Forney <mforney@mforney.org>
Date:   Sat, 20 Apr 2019 09:47:19 -0700

Remove obsolete 'fp' parameter to nextline

Diffstat:
Msrc/cmd/as/as.h | 2+-
Msrc/cmd/as/main.c | 3+--
Msrc/cmd/as/parser.c | 2+-
3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/cmd/as/as.h b/src/cmd/as/as.h @@ -163,7 +163,7 @@ extern Node **getargs(char *s); extern void error(char *msg, ...); /* Avoid errors in files where stdio is not included */ #ifdef stdin -extern int nextline(FILE *fp, struct line *linep); +extern int nextline(struct line *linep); #endif extern void unexpected(void); extern void expect(int token); diff --git a/src/cmd/as/main.c b/src/cmd/as/main.c @@ -92,7 +92,6 @@ static int dopass(char *fname) { struct line line; - FILE *fp; extern int nerrors; extern jmp_buf recover; @@ -101,7 +100,7 @@ dopass(char *fname) endpass = 0; setjmp(recover); - while (!endpass && nextline(fp, &line)) { + while (!endpass && nextline(&line)) { linesym = NULL; if (line.label) diff --git a/src/cmd/as/parser.c b/src/cmd/as/parser.c @@ -428,7 +428,7 @@ getline(FILE *fp, char buff[MAXLINE]) } int -nextline(FILE *fp, struct line *lp) +nextline(struct line *lp) { struct input *ip; size_t n;