repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / glteapot / error.h
blob1e655d36cbe01b2c9db1c10f98b87a66016046e1
1 /*
2 Copyright 1999, Be Incorporated. All Rights Reserved.
3 This file may be used under the terms of the Be Sample Code License.
4 */
6 #ifndef ERROR_H
7 #define ERROR_H
9 #include <stdio.h>
11 extern void fatalerror(const char *);
13 #define DEBUGGING 1
15 #undef assert
17 #ifdef DEBUGGING
19 #define assert(a) if (!(a)) { \
20 printf("%s:%d: Failed assertion `"#a"'\n",__FILE__,__LINE__); \
21 fatalerror("Failed assertion!"); };
23 #define checkpoint printf("%s:%d: Checkpoint...\n",__FILE__,__LINE__);\
24 fflush(stdout);
26 #else //DEBUGGING
28 #define assert(a)
29 #define checkpoint
31 #endif //DEBUGGING
33 #endif // ERROR_H