5 |
|
|
6 |
|
#ifndef _RAD_RTERROR_H_ |
7 |
|
#define _RAD_RTERROR_H_ |
8 |
+ |
|
9 |
+ |
#include <errno.h> |
10 |
+ |
|
11 |
|
#ifdef __cplusplus |
12 |
|
extern "C" { |
13 |
|
#endif |
14 |
|
|
12 |
– |
#include <errno.h> |
15 |
|
/* error codes */ |
16 |
|
#define WARNING 0 /* non-fatal error */ |
17 |
|
#define USER 1 /* fatal user-caused error */ |
23 |
|
/* error struct */ |
24 |
|
extern struct erract { |
25 |
|
char pre[16]; /* prefix message */ |
26 |
< |
void (*pf)(); /* put function (resettable) */ |
26 |
> |
void (*pf)(const char *s); /* put function (resettable) */ |
27 |
|
int ec; /* exit code (0 means non-fatal) */ |
28 |
|
} erract[NERRS]; /* list of error actions */ |
29 |
|
|
44 |
|
#define DCHECK(be,et,em) (void)0 |
45 |
|
#endif |
46 |
|
/* defined in error.c */ |
47 |
< |
extern void error(int etype, char *emsg); |
47 |
> |
extern void error(int etype, const char *emsg); |
48 |
|
/* error & warning output & exit */ |
49 |
< |
extern void eputs(char *s); |
50 |
< |
extern void wputs(char *s); |
49 |
> |
extern void eputs(const char *s); |
50 |
> |
extern void wputs(const char *s); |
51 |
|
extern void quit(int code); |
52 |
|
|
53 |
|
#ifdef __cplusplus |