summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
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"