ref: babb36b25d4bb677fbebbd21209d6b5cbbee8669
parent: b286e242b2717f9a178e27ff97d30a65ac2ff648
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Aug 24 07:25:11 EDT 2019
Change debug to sccdebug Debug is a too good name to be used in a global variable used in every program.
--- a/include/scc/scc/scc.h
+++ b/include/scc/scc/scc.h
@@ -1,10 +1,10 @@
#include <stddef.h>
-extern int debug;
+extern int enadebug;
#ifndef NDEBUG
#define DBG(...) dbg(__VA_ARGS__)
-#define DBGON() (debug = 1)
+#define DBGON() (enadebug = 1)
#else
#define DBG(...)
#define DBGON()
--- a/src/cmd/scc/cc1/fold.c
+++ b/src/cmd/scc/cc1/fold.c
@@ -637,7 +637,7 @@
if (!np)
return NULL;
- if (debug)
+ if (enadebug)
prtree(np);
l = np->left = simplify(np->left);
--- a/src/libscc/debug.c
+++ b/src/libscc/debug.c
@@ -3,12 +3,12 @@
#include <scc/scc.h>
-int debug;
+int enadebug;
void
dbg(const char *fmt, ...)
{
- if (!debug)
+ if (!enadebug)
return;
va_list va;
va_start(va, fmt);