scc

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

die.c (303B)


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