blob: 43df1c302fce63638a83803b45263d2c7772bbf1 (
plain) (
blame)
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
28
29
30
31
32
33
34
|
/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
*
* See the LICENSE file
*
* The origin of this software must not be misrepresented, either by
* explicit claim or by omission. Since few users ever read sources,
* credits must appear in the documentation.
*
* date: Wed Oct 9 19:56:22 GMT 2002
*
* -- Error functions
*
*/
#include "error.h"
const char *libws_error_table[]={
"Memory error",
"Filesystem error",
"Network error"
};
void libws_error(unsigned int code, const char *fmt, ...) {
va_list args;
va_start(args,fmt);
fprintf(stderr,"%s: ",libws_error_table[code]);
vfprintf(stderr,fmt,args);
va_end(args);
fflush(stderr);
};
|