1 /* FILE: basics.c
2 * PURPOSE: basic functions
3 * AUTHOR: Piet Tutelaers
4 * VERSION: 1.7 (December 2014)
5 */
6
7 #include "basics.h"
8
9 /* Give up ... */
fatal(const char * fmt,...)10 void fatal(const char *fmt, ...)
11 { va_list args;
12
13 va_start(args, fmt);
14 vfprintf(stderr, fmt, args);
15 va_end(args);
16 exit(1);
17 }
18
19 /* Give a message ... */
msg(const char * fmt,...)20 void msg(const char *fmt, ...)
21 { va_list args;
22
23 va_start(args, fmt);
24 vfprintf(stderr, fmt, args);
25 fflush(stderr);
26 va_end(args);
27 }
28