Add a file for shared functions

New common.[hc] files where shared functions between surf and
webkitextension will be put. First addition is die().
This commit is contained in:
Quentin Rameau
2016-01-04 16:09:12 +01:00
parent 7ea0c2f7f8
commit 1901359efa
5 changed files with 24 additions and 18 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
void
die(const char *errstr, ...)
{
va_list ap;
va_start(ap, errstr);
vfprintf(stderr, errstr, ap);
va_end(ap);
exit(1);
}