| 1 | #ifndef WARNING_H__LOADED
|
|---|
| 2 |
|
|---|
| 3 | #define WARNING_H_LOADED 1
|
|---|
| 4 |
|
|---|
| 5 | #ifdef __cplusplus
|
|---|
| 6 | extern "C" {
|
|---|
| 7 | #endif
|
|---|
| 8 |
|
|---|
| 9 | void warn_f_warning ARGLIST((const char *text, const char *origin,
|
|---|
| 10 | int level, int msgno));
|
|---|
| 11 | int set_warning ARGLIST((int level, int mode));
|
|---|
| 12 | int set_default_warning ARGLIST((int level, int mode));
|
|---|
| 13 | void warning_status ARGLIST((int *plevel, int *pmode));
|
|---|
| 14 | void set_logging_function ARGLIST(( void (*user_function) ARGLIST((
|
|---|
| 15 | const char *, const char *, int, int)) ));
|
|---|
| 16 | void set_default_logging_function ARGLIST(( void (*user_function) ARGLIST((
|
|---|
| 17 | const char *, const char *, int, int)) ));
|
|---|
| 18 | int set_log_file ARGLIST((const char *fname));
|
|---|
| 19 | void warn_f_output_text ARGLIST((const char *text));
|
|---|
| 20 | void flush_output ARGLIST((void));
|
|---|
| 21 | void set_output_function ARGLIST(( void (*user_function) ARGLIST((
|
|---|
| 22 | const char *)) ));
|
|---|
| 23 | void set_default_output_function ARGLIST(( void (*user_function) ARGLIST((
|
|---|
| 24 | const char *)) ));
|
|---|
| 25 | void set_aux_warning_function ARGLIST(( char *(*auxfunc) ARGLIST((
|
|---|
| 26 | void)) ));
|
|---|
| 27 | void set_default_aux_warning_function ARGLIST(( char *(*auxfunc) ARGLIST((
|
|---|
| 28 | void)) ));
|
|---|
| 29 | char *warn_f_get_message_buffer ARGLIST((void));
|
|---|
| 30 |
|
|---|
| 31 | #ifndef WARNING_ORIGIN
|
|---|
| 32 | # define WARNING_ORIGIN (char *) NULL
|
|---|
| 33 | #endif
|
|---|
| 34 |
|
|---|
| 35 | #define Information(string) warn_f_warning(string,WARNING_ORIGIN,0,0)
|
|---|
| 36 | #define Warning(string) warn_f_warning(string,WARNING_ORIGIN,10,0)
|
|---|
| 37 | #define Error(string) warn_f_warning(string,WARNING_ORIGIN,20,0)
|
|---|
| 38 |
|
|---|
| 39 | #define Output(string) warn_f_output_text(string)
|
|---|
| 40 |
|
|---|
| 41 | #ifdef __cplusplus
|
|---|
| 42 | }
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 | #endif /* __WARNING_LOADED */
|
|---|