X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=int%2Finterface_linux.c;h=1ec9347f46cfc532458986a8fb43ad781b8b4200;hb=64f379e7446a716257f6030157f2cb254200aa7b;hp=33fd00349f3bea4eb8949fbf76d4007da6297e71;hpb=fb5465ae10e39a9505634e0aaf8e1cab9710f5d7;p=mTask.git diff --git a/int/interface_linux.c b/int/interface_linux.c index 33fd003..1ec9347 100644 --- a/int/interface_linux.c +++ b/int/interface_linux.c @@ -144,7 +144,25 @@ void setup(void) pdie("accept"); } -void test(void) +void debug(char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); +} +void pdie(char *s) +{ + perror(s); + die(""); +} + +void die(char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + exit(EXIT_FAILURE); }