summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2019-02-19 05:33:04 +0100
committerQuentin Rameau <quinq@fifth.space>2020-11-01 16:59:11 +0100
commit8d5e2b3a40a86d463d666cbf61906cf22febde34 (patch)
treec2edf2220d3c05f5979281fced8a9726bd4f4a28 /surf.c
parent21fcbc004e16a9de46424fb21ad9c32270779a0d (diff)
Remove common
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c12
1 files changed, 12 insertions, 0 deletions
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);
@@ -302,6 +303,17 @@ static ParamName loadfinished[] = {
#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)
{
die("usage: surf [-bBdDfFgGiIkKmMnNpPsStTvwxX]\n"