]> git.imager.perl.org - imager.git/commitdiff
added declarations for error handling code
authorTony Cook <tony@develop=help.com>
Tue, 10 Apr 2001 04:31:46 +0000 (04:31 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 10 Apr 2001 04:31:46 +0000 (04:31 +0000)
image.h

diff --git a/image.h b/image.h
index 01888386f4c2b7fa835b3c10ba46177427a2a1e2..1da3deb328d61bf4cffe6eb5180cf592a5126978 100644 (file)
--- a/image.h
+++ b/image.h
@@ -440,6 +440,27 @@ typedef struct {
 
 } symbol_table_t;
 
 
 } 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
 
 
 #endif