texk/ps2pk/basics.c
raw| 1 | /* FILE: basics.c |
| 2 | * PURPOSE: basic functions |
| 3 | * AUTHOR: Piet Tutelaers |
| 4 | * (see README for license) |
| 5 | */ |
| 6 | |
| 7 | #include "basics.h" |
| 8 | |
| 9 | /* Give up ... */ |
| 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 ... */ |
| 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 | } |