+#ifndef __ERROR_H
+#define __ERROR_H
+
/* error.h:
*
* Error flagging routines
char *source;
};
-void Error(char *source, int severity, char *reason, ... );
+typedef void (*CoreHandlerFn)(void *arg);
+
+typedef struct corehandler {
+ void *arg;
+ CoreHandlerFn fn;
+ struct corehandler *prev, *next;
+} corehandler;
+
+void Error(char *source, int severity, char *reason, ... ) __attribute__ ((format (printf, 3, 4)));
+
+corehandler *registercorehandler(CoreHandlerFn fn, void *arg);
+void deregistercorehandler(corehandler *c);
+
+#endif