shithub: scc

Download patch

ref: 626153ccaa05ac4a5ae9ecab8854c30980485b50
parent: acfcdefc522706869302970518bb7b06c1455867
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Mar 30 09:30:18 EDT 2014

Move definition of linenum, filenam and columnum to error.c

This file is the only one who use them, so it is better do not
show them to the other files

--- a/cc.h
+++ b/cc.h
@@ -7,11 +7,6 @@
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
 
-extern unsigned linenum;
-extern unsigned columnum;
-extern const char *filename;
-
-
 struct user_opt {
 	unsigned char implicit;
 	unsigned char c99;
--- a/error.c
+++ b/error.c
@@ -6,8 +6,9 @@
 
 #include "cc.h"
 
-
-
+extern unsigned linenum;
+extern unsigned columnum;
+extern const char *filename;
 
 static void
 warn_helper(char flag, const char *fmt, va_list va)