From 848ba81a3d815aab6a8c18653628c9a2f73118da Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Tue, 10 Apr 2001 04:31:46 +0000 Subject: [PATCH] added declarations for error handling code --- image.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/image.h b/image.h index 01888386..1da3deb3 100644 --- a/image.h +++ b/image.h @@ -440,6 +440,27 @@ typedef struct { } symbol_table_t; +/* error handling + see error.c for documentation + the error information is currently global +*/ +typedef struct { + char *msg; + int code; +} i_errmsg; +typedef void (*i_error_cb)(int code, char const *msg); +typedef void (*i_failed_cb)(i_errmsg *msgs); +extern i_error_cb i_set_error_cb(i_error_cb); +extern i_failed_cb i_set_failed_cb(i_failed_cb); +extern void i_set_argv0(char const *); +extern int i_set_errors_fatal(int new_fatal); +extern i_errmsg *i_errors(); + +extern void i_push_error(int code, char const *msg); +extern void i_push_errorf(int code, char const *fmt, ...); +extern void i_push_errorvf(int code, char const *fmt, va_list); +extern void i_clear_error(); +extern int i_failed(int code, char const *msg); #endif -- 2.39.5