shithub: scc

Download patch

ref: 8445aa34b12fc07d8bb64247dd8a6ebada174dfe
parent: 6361870fd0ee92b786a5738cef533e4d58e45497
author: Michael Forney <mforney@mforney.org>
date: Sat Apr 20 05:47:19 EDT 2019

Remove obsolete 'fp' parameter to nextline

--- a/src/cmd/as/as.h
+++ b/src/cmd/as/as.h
@@ -163,7 +163,7 @@
 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);
--- a/src/cmd/as/main.c
+++ b/src/cmd/as/main.c
@@ -92,7 +92,6 @@
 dopass(char *fname)
 {
 	struct line line;
-	FILE *fp;
 	extern int nerrors;
 	extern jmp_buf recover;
 
@@ -101,7 +100,7 @@
 
 	endpass = 0;
 	setjmp(recover);
-	while (!endpass && nextline(fp, &line)) {
+	while (!endpass && nextline(&line)) {
 		linesym = NULL;
 
 		if (line.label)
--- a/src/cmd/as/parser.c
+++ b/src/cmd/as/parser.c
@@ -428,7 +428,7 @@
 }
 
 int
-nextline(FILE *fp, struct line *lp)
+nextline(struct line *lp)
 {
 	struct input *ip;
 	size_t n;