summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2016-01-04 16:09:12 +0100
committerQuentin Rameau <quinq@fifth.space>2018-10-08 11:38:03 +0200
commit1901359efa10fe2e18794df34fc33b81da03a6f5 (patch)
tree5f0267eb93763156d9b4348db7b62056bb064c12 /surf.c
parent7ea0c2f7f8c5cc4616d8dc0676f7b4b59351667b (diff)
downloadsurf-1901359efa10fe2e18794df34fc33b81da03a6f5.tar.gz
surf-1901359efa10fe2e18794df34fc33b81da03a6f5.tar.bz2
surf-1901359efa10fe2e18794df34fc33b81da03a6f5.zip
Add a file for shared functions
New common.[hc] files where shared functions between surf and webkitextension will be put. First addition is die().
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/surf.c b/surf.c
index 25940f9..d48fbc9 100644
--- a/surf.c
+++ b/surf.c
@@ -30,10 +30,10 @@
#include <glib.h>
#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);
@@ -311,17 +310,6 @@ usage(void)
}
void
-die(const char *errstr, ...)
-{
- va_list ap;
-
- va_start(ap, errstr);
- vfprintf(stderr, errstr, ap);
- va_end(ap);
- exit(1);
-}
-
-void
setup(void)
{
GIOChannel *gchanin;