summary refs log tree commit diff
path: root/parse.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-30 12:04:43 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-31 09:15:50 -0400
commit729aa97b799f72afdec3604f96526760701f36bc (patch)
tree35761b52e15fe48abe779a07766852717e4e9d6c /parse.c
parentbeec05cd3b6c85af3f3cc8956f4583d9027d569d (diff)
downloadroux-729aa97b799f72afdec3604f96526760701f36bc.tar.gz
cleanup error handling
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/parse.c b/parse.c
index 2590971..1fd032a 100644
--- a/parse.c
+++ b/parse.c
@@ -159,18 +159,14 @@ static int ntyp;
 void
 err(char *s, ...)
 {
-	char buf[100], *p, *end;
 	va_list ap;
 
-	p = buf;
-	end = buf + sizeof(buf);
-
 	va_start(ap, s);
-	p += snprintf(p, end - p, "%s:%d: ", inpath, lnum);
-	p += vsnprintf(p, end - p, s, ap);
+	fprintf(stderr, "%s:%d: ", inpath, lnum);
+	vfprintf(stderr, s, ap);
+	fprintf(stderr, "\n");
 	va_end(ap);
-
-	diag(buf);
+	exit(1);
 }
 
 static int