From fcc0658730e541477fa60995d8bd82ff87163b92 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 19 Jan 2017 18:30:07 +0100 Subject: Separate sock_/tcp_ like regexbattle --- global.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 global.c (limited to 'global.c') diff --git a/global.c b/global.c new file mode 100644 index 0000000..27f522c --- /dev/null +++ b/global.c @@ -0,0 +1,16 @@ +#define _GNU_SOURCE +#include +#include +#include +#include "global.h" + +__attribute__((noreturn, format (printf, 1, 2))) +void throw(const char *format,...){ + char *buf; + va_list ap; + va_start(ap,format); + vasprintf(&buf,format,ap); + va_end(ap); + fprintf(stderr,"THROW: %s\n",buf); + exit(1); +} -- cgit v1.2.3-54-g00ecf