scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

die.c (250B)


      1 #include <stdarg.h>
      2 #include <stdlib.h>
      3 #include <stdio.h>
      4 
      5 #include <scc/scc.h>
      6 
      7 int failure;
      8 
      9 void
     10 die(const char *fmt, ...)
     11 {
     12 	failure = 1;
     13 	va_list va;
     14 	va_start(va, fmt);
     15 	vfprintf(stderr, fmt, va);
     16 	putc('\n', stderr);
     17 	va_end(va);
     18 	exit(1);
     19 }