2019-04-19 11:32:13 -05:00
|
|
|
// 19 april 2019
|
|
|
|
|
2019-04-21 14:08:09 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-04-19 11:32:13 -05:00
|
|
|
// init.c
|
2019-05-09 11:07:28 -05:00
|
|
|
extern const char **uiprivSysInitErrors(void);
|
|
|
|
extern int uiprivSysInit(void *options, uiInitError *err);
|
2019-04-19 11:32:13 -05:00
|
|
|
extern int uiprivInitReturnError(uiInitError *err, const char *msg);
|
2019-04-21 13:49:16 -05:00
|
|
|
extern int uiprivInitReturnErrorf(uiInitError *err, const char *msg, ...);
|
2019-04-21 14:08:09 -05:00
|
|
|
|
2019-05-16 22:02:03 -05:00
|
|
|
// alloc.c
|
|
|
|
extern void *uiprivAlloc(size_t n, const char *what);
|
|
|
|
extern void *uiprivRealloc(void *p, size_t old, size_t new, const char *what);
|
|
|
|
extern void uiprivFree(void *p);
|
|
|
|
|
2019-05-13 09:46:42 -05:00
|
|
|
// errors.c
|
2019-05-13 20:30:18 -05:00
|
|
|
extern void uiprivInternalError(const char *fmt, ...);
|
2019-05-12 21:17:24 -05:00
|
|
|
enum {
|
|
|
|
uiprivProgrammerErrorWrongStructSize, // arguments: size_t badSize, const char *structName
|
|
|
|
uiprivProgrammerErrorIndexOutOfRange, // arguments: int badIndex, __func__
|
2019-05-13 05:37:19 -05:00
|
|
|
uiprivProgrammerErrorNullPointer, // arguments: const char *paramDesc, __func__
|
|
|
|
uiprivProgrammerErrorIntIDNotFound, // arguments: const char *idDesc, int badID, __func__
|
|
|
|
// TODO type mismatch
|
2019-05-16 11:27:04 -05:00
|
|
|
uiprivProgrammerErrorBadSenderForEvent, // arguments: const char *senderDesc, const char *eventDesc, __func__
|
2019-05-14 10:02:23 -05:00
|
|
|
uiprivProgrammerErrorChangingEventDuringFire, // arguments: __func__
|
|
|
|
uiprivProgrammerErrorRecursiveEventFire, // no arguments
|
2019-05-12 21:17:24 -05:00
|
|
|
uiprivNumProgrammerErrors,
|
|
|
|
};
|
|
|
|
extern void uiprivProgrammerError(unsigned int which, ...);
|
2019-05-13 20:30:18 -05:00
|
|
|
extern void uiprivReportError(const char *prefix, const char *msg, const char *suffix, bool internal);
|
2019-05-12 21:17:24 -05:00
|
|
|
|
2019-04-21 14:08:09 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|