22 #ifndef OLDGAA_GL_INTERNAL_ERR_H
25 extern int gl__is_out_of_memory;
26 void oldgaa_gl__fout_of_memory(
const char file[],
int lineno);
31 extern void (*gl_out_of_memory_handler)(
const char file[],
int line);
36 #define interr_buffer_full() \
37 gl__function_internal_error_helper(__FILE__, __LINE__, "A buffer filled up");
48 #define assert(expr) do { \
50 gl__function_internal_error_helper(__FILE__, __LINE__, "assertion violated: " #expr); \
53 #define assert(expr) do {;} while(0)
62 #define internal_error(msg) \
63 gl__function_internal_error_helper(__FILE__, __LINE__, msg)
90 #define gl__macro_internal_error_helper(file,line,msg) \
94 write(2, "Internal error in file " file " (line " #line "): ",\
95 sizeof "Internal error in file " file " (line " #line "): " -1);\
97 write(2, msg, strlen(msg)); \
101 if (internal_error_handler) \
102 (*internal_error_handler)(file, line, msg); \
112 void gl__function_internal_error_helper(
const char file[],
int linenumber,
const char mesg[]);
119 extern int (*internal_error_handler)(
const char file[],
int linenumber,
const char mesg[]);
121 void gl_function_arguments_error(
const char *format, ...);