From 8d5e2b3a40a86d463d666cbf61906cf22febde34 Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Tue, 19 Feb 2019 05:33:04 +0100 Subject: Remove common --- surf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'surf.c') diff --git a/surf.c b/surf.c index 2b54e3c..42927e9 100644 --- a/surf.c +++ b/surf.c @@ -141,6 +141,7 @@ typedef struct { } SiteSpecific; /* Surf */ +static void die(const char *errstr, ...); static void usage(void); static void setup(void); static void sigchld(int unused); @@ -301,6 +302,17 @@ static ParamName loadfinished[] = { /* configuration, allows nested code to access above variables */ #include "config.h" +void +die(const char *errstr, ...) +{ + va_list ap; + + va_start(ap, errstr); + vfprintf(stderr, errstr, ap); + va_end(ap); + exit(1); +} + void usage(void) { -- cgit v1.2.3