]> git.imager.perl.org - imager.git/blame - imerror.h
update img16.c to avoid mm_log()
[imager.git] / imerror.h
CommitLineData
af070d99
TC
1#ifndef IMAGER_IMERROR_H
2#define IMAGER_IMERROR_H
3
4/* error handling
5 see error.c for documentation
6 the error information is currently global
7*/
8typedef struct {
9 char *msg;
10 int code;
11} i_errmsg;
12
13typedef void (*i_error_cb)(int code, char const *msg);
14typedef void (*i_failed_cb)(i_errmsg *msgs);
15extern i_error_cb i_set_error_cb(i_error_cb);
16extern i_failed_cb i_set_failed_cb(i_failed_cb);
17extern void i_set_argv0(char const *);
18extern int i_set_errors_fatal(int new_fatal);
19extern i_errmsg *i_errors(void);
20
156699af 21extern void im_push_error(pIMCTX, int code, char const *msg);
8d14daab 22extern void i_push_errorf(int code, char const *fmt, ...) I_FORMAT_ATTR(2, 3);
156699af 23extern void im_push_errorf(pIMCTX, int code, char const *fmt, ...) I_FORMAT_ATTR(3, 4);
a482206e 24extern void im_push_errorvf(im_context_t ctx, int code, char const *fmt, va_list);
156699af 25extern void im_clear_error(pIMCTX);
af070d99
TC
26extern int i_failed(int code, char const *msg);
27
28#endif