error logger headaches
This commit is contained in:
@ -25,6 +25,28 @@ static const int amsmathutil25_maxthreads = 50;
|
||||
static const int amsmathutil25_threadpsz = 5000;
|
||||
|
||||
|
||||
|
||||
//Global Changeable Error Logger //
|
||||
//Using accessor pattern
|
||||
|
||||
//pointer to function of signature void errorlogger(const char *errmsg, int errcode, void *errglobal);
|
||||
extern void (*amsmathutil25_errlogger)(const char *, int, void *);
|
||||
extern void* amsmathutil25_errglobal;
|
||||
|
||||
typedef void (*amsmathutil25_errloggerptr_t)(const char *, int, void *);
|
||||
amsmathutil25_errloggerptr_t amsmathutil25_get_errlogger(); //call this to get the error logger to log errors
|
||||
|
||||
// //the other way to do this
|
||||
// // return type "pointer to function(const char*, int, void*) returning void"
|
||||
// void (*amsmathutil25_get_errlogger(void))(const char *, int, void *);
|
||||
// //not exactly clear....
|
||||
|
||||
void amsmathutil25_set_errlogger(
|
||||
void(*errloggerpointer)(const char *, int, void *),
|
||||
void* errglobal
|
||||
);
|
||||
//End Error Logger
|
||||
|
||||
};
|
||||
|
||||
//Library subsections
|
||||
|
||||
Reference in New Issue
Block a user