shithub: scc

Download patch

ref: 79d964bda2ecafb7be9fc4f4454248e4f064fb39
parent: 8c89b0304d6dc5652ccbd9249b1bf0b1e9271d03
author: Michael Forney <mforney@mforney.org>
date: Wed Feb 15 06:35:00 EST 2017

Use LINESIZ instead of MAXLINE (200)

The cc1 output of libutil/unescape.c from sbase exceeds the 200
character limit (longest line is 205).

Also, make `line` static.

--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -10,7 +10,6 @@
 
 #include "cc2.h"
 
-#define MAXLINE     200
 #define STACKSIZ     50
 
 extern Type int8type, int16type, int32type, int64type,
@@ -311,7 +310,7 @@
 static int
 nextline(void)
 {
-	char line[MAXLINE];
+	static char line[LINESIZ];
 	size_t len;
 	int c;
 	void (*fun)(void);