31 #ifndef WARNING_H__LOADED 33 #define WARNING_H__LOADED 1 40 int level,
int msgno);
42 int set_default_warning (
int level,
int mode);
45 const char *,
const char *,
int,
int) );
46 void set_default_logging_function (
void (*user_function) (
47 const char *,
const char *,
int,
int) );
53 void set_default_output_function (
void (*user_function) (
57 void set_default_aux_warning_function (
char *(*auxfunc) (
59 char *warn_f_get_message_buffer (
void);
61 #ifndef WARNING_ORIGIN 62 # define WARNING_ORIGIN (char *) NULL 66 inline void Information(
const char *str) {
warn_f_warning(str,WARNING_ORIGIN,0,0); }
67 inline void Warning(
const char *str) {
warn_f_warning(str,WARNING_ORIGIN,10,0); }
68 inline void Error(
const char *str) {
warn_f_warning(str,WARNING_ORIGIN,20,0); }
71 #define WITH_INLINE_WARNING 1 73 #define Information(string) warn_f_warning(string,WARNING_ORIGIN,0,0) 74 #define Warning(string) warn_f_warning(string,WARNING_ORIGIN,10,0) 75 #define Error(string) warn_f_warning(string,WARNING_ORIGIN,20,0) 77 #define Output(string) warn_f_output_text(string) void set_output_function(void(*user_function)(const char *))
Set a user-defined function as the function to be used for normal text output.
Definition: warning.c:591
void set_logging_function(void(*user_function)(const char *, const char *, int, int))
Set user-defined function for logging warnings and errors.
Definition: warning.c:427
void warn_f_output_text(const char *text)
Print a text string (without appending a newline etc.) on the screen or send it to a controlling proc...
Definition: warning.c:518
void warn_f_warning(const char *text, const char *origin, int level, int msgno)
Issue a warning to screen or other configured target.
Definition: warning.c:229
int set_warning(int level, int mode)
Set a specific warning level and mode.
Definition: warning.c:358
void flush_output(void)
Flush buffered output.
Definition: warning.c:564
void set_aux_warning_function(char *(*auxfunc)(void))
Set an auxilliary function for warnings.
Definition: warning.c:629
void warning_status(int *plevel, int *pmode)
Inquire status of warning settings.
Definition: warning.c:397
int set_log_file(const char *fname)
Set a new log file name and save it in local storage.
Definition: warning.c:464