diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-01-19 18:30:07 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-01-19 18:30:07 +0100 |
commit | fcc0658730e541477fa60995d8bd82ff87163b92 (patch) | |
tree | 7e993fd0cbc54791d3e641badf8965d0d3a2952f /global.c | |
parent | 89f613475b8da3076aff70a6cef6b41df551d567 (diff) |
Separate sock_/tcp_ like regexbattle
Diffstat (limited to 'global.c')
-rw-r--r-- | global.c | 16 |
1 files changed, 16 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#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); +} |