commit | author | age
|
d7639a
|
1 |
#include<stdio.h> |
SP |
2 |
#include<stdlib.h> |
|
3 |
#include "general.h" |
|
4 |
#include<stdarg.h> |
|
5 |
|
|
6 |
ts_uint ts_fprintf(FILE *fd, char *fmt, va_list ap){ |
|
7 |
if(quiet) return TS_SUCCESS; |
|
8 |
fprintf(fd, fmt, ap); /* Call vprintf */ |
|
9 |
va_end(ap); /* Cleanup the va_list */ |
|
10 |
return TS_SUCCESS; |
|
11 |
} |
|
12 |
|
|
13 |
void err(char *text){ |
|
14 |
ts_fprintf(stderr,"Err: %s\n", text); |
|
15 |
} |
|
16 |
|
|
17 |
void fatal(char *text, ts_int errcode){ |
|
18 |
ts_fprintf(stderr,"Fatal: %s. TERMINATED!\n", text); |
|
19 |
exit(errcode); |
|
20 |
} |
|
21 |
|
|
22 |
|