mailmap: add mail alias
[transsip-mirror.git] / src / die.h
blob227f948e23de4cd88f04917a2fa848c3863f2081
1 /*
2 * transsip - the telephony toolkit
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011, 2012 Daniel Borkmann <dborkma@tik.ee.ethz.ch>
5 * Subject to the GPL, version 2.
6 */
8 #ifndef DIE_H
9 #define DIE_H
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <stdarg.h>
14 #include <string.h>
15 #include <errno.h>
16 #include <unistd.h>
18 static inline void die(void)
20 exit(EXIT_FAILURE);
23 static inline void panic(char *msg, ...)
25 va_list vl;
27 va_start(vl, msg);
28 vfprintf(stderr, msg, vl);
29 va_end(vl);
31 fflush(stderr);
33 die();
36 static inline void whine(char *msg, ...)
38 va_list vl;
40 va_start(vl, msg);
41 vfprintf(stderr, msg, vl);
42 va_end(vl);
44 fflush(stderr);
47 #endif /* DIE_H */