mirror of
https://review.haiku-os.org/haiku
synced 2025-02-07 06:16:11 +01:00
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37277 a95241bf-73f2-0310-859d-f6bbb57e9c96
32 lines
609 B
C
32 lines
609 B
C
/*
|
|
Copyright 1999, Be Incorporated. All Rights Reserved.
|
|
This file may be used under the terms of the Be Sample Code License.
|
|
*/
|
|
|
|
#ifndef ERROR_H
|
|
#define ERROR_H
|
|
|
|
#include <stdio.h>
|
|
|
|
extern void fatalerror(const char *);
|
|
|
|
#define DEBUGGING 1
|
|
|
|
#ifdef DEBUGGING
|
|
|
|
#define assert(a) if (!(a)) { \
|
|
printf("%s:%d: Failed assertion `"#a"'\n",__FILE__,__LINE__); \
|
|
fatalerror("Failed assertion!"); };
|
|
|
|
#define checkpoint printf("%s:%d: Checkpoint...\n",__FILE__,__LINE__);\
|
|
fflush(stdout);
|
|
|
|
#else //DEBUGGING
|
|
|
|
#define assert(a)
|
|
#define checkpoint
|
|
|
|
#endif //DEBUGGING
|
|
|
|
#endif // ERROR_H
|