From 1901359efa10fe2e18794df34fc33b81da03a6f5 Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Mon, 4 Jan 2016 16:09:12 +0100 Subject: Add a file for shared functions New common.[hc] files where shared functions between surf and webkitextension will be put. First addition is die(). --- surf.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'surf.c') diff --git a/surf.c b/surf.c index 25940f9..d48fbc9 100644 --- a/surf.c +++ b/surf.c @@ -30,10 +30,10 @@ #include #include "arg.h" +#include "common.h" #define LENGTH(x) (sizeof(x) / sizeof(x[0])) #define CLEANMASK(mask) (mask & (MODKEY|GDK_SHIFT_MASK)) -#define MSGBUFSZ 32 enum { AtomFind, AtomGo, AtomUri, AtomLast }; @@ -142,7 +142,6 @@ typedef struct { /* Surf */ static void usage(void); -static void die(const char *errstr, ...); static void setup(void); static void sigchld(int unused); static void sighup(int unused); @@ -310,17 +309,6 @@ usage(void) "[-r scriptfile] [-u useragent] [-z zoomlevel] [uri]\n"); } -void -die(const char *errstr, ...) -{ - va_list ap; - - va_start(ap, errstr); - vfprintf(stderr, errstr, ap); - va_end(ap); - exit(1); -} - void setup(void) { -- cgit v1.2.3