rcx

miscellaneous C library
git clone git://git.rr3.xyz/rcx
Log | Files | Refs | README | LICENSE

debug.c (340B)


      1 #define _POSIX_C_SOURCE 199506L /* flockfile, funlockfile */
      2 
      3 #include <stdio.h>
      4 #include <stdlib.h>
      5 
      6 #include "debug.h"
      7 #include "rcx.h"
      8 
      9 noreturn void
     10 r_throw(char *fmt, ...) {
     11 	va_list args;
     12 	va_start(args, fmt);
     13 
     14 	flockfile(stderr);
     15 	vfprintf(stderr, fmt, args);
     16 	fputc('\n', stderr);
     17 	funlockfile(stderr);
     18 
     19 	va_end(args);
     20 
     21 	abort();
     22 }