[hackers] [scc] Use LINESIZ instead of MAXLINE (200) || Michael Forney

From: <git_AT_suckless.org>
Date: Wed, 15 Feb 2017 21:52:27 +0100 (CET)

commit 38178a4bd93825581a30edfe490aa173c1fdb59b
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Wed Feb 15 11:35:00 2017 -0800
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Feb 15 21:52:02 2017 +0100

    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.

diff --git a/cc2/parser.c b/cc2/parser.c
index 7a51941..8dd0e75 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -10,7 +10,6 @@ static char sccsid[] = "@(#) ./cc2/parser.c";
 
 #include "cc2.h"
 
-#define MAXLINE 200
 #define STACKSIZ 50
 
 extern Type int8type, int16type, int32type, int64type,
_AT_@ -311,7 +310,7 @@ eval(char *tok)
 static int
 nextline(void)
 {
- char line[MAXLINE];
+ static char line[LINESIZ];
         size_t len;
         int c;
         void (*fun)(void);
Received on Wed Feb 15 2017 - 21:52:27 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 15 2017 - 22:00:19 CET