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