ref: f8e816da535fa77a818bf85ac8ce0ab879ef1e84
parent: 54e92032ca6a63fe2175a9784eaa656e09b03774
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Aug 8 10:51:10 EDT 2014
Use a define for the size of line Remember Roberto, it is not a good idea to use magic numbers!
--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -10,9 +10,7 @@
#include "cc2.h"
-#define STR(x) XSTR(x)
-#define XSTR(x) #x
-
+#define MAXLINE 200
#define NR_STACKSIZ 32
#define NR_NODEPOOL 128
#define NR_EXPRESSIONS 64
@@ -231,7 +229,7 @@
void (*fun)(char *tok);
uint8_t len;
int c;
- char line[200];
+ char line[MAXLINE];
for (;;) {
switch (c = getchar()) {