scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

debug.c (291B)


      1 static char sccsid[] = "@(#) ./lib/scc/debug.c";
      2 #include <stdarg.h>
      3 #include <stdio.h>
      4 
      5 #include "../../inc/scc.h"
      6 
      7 int debug;
      8 
      9 void
     10 dbg(const char *fmt, ...)
     11 {
     12 	if (!debug)
     13 		return;
     14 	va_list va;
     15 	va_start(va, fmt);
     16 	vfprintf(stderr, fmt, va);
     17 	putc('\n', stderr);
     18 	va_end(va);
     19 	return;
     20 }