1 #ifndef _CLAIM_H_
2 #define _CLAIM_H_
3 
4 /* The macro claim works like the standard C macro assert except that when
5    it fails it provokes a segmentation fault, which makes it possible to
6    use a gdb */
7 
8 #ifdef DEBUG
9 #define CLAIM
10 #endif
11 
12 #include <stdio.h>
13 #ifdef CLAIM
14 #define claim(ex) ((void) ((ex) || (fprintf(stderr, "%s:%d: Claim `%s' failed\n", __FILE__, __LINE__, #ex), (*(char *)-1)=7)))
15 #else
16 #define claim(ex) ((void) 0)
17 #endif
18 
19 #endif
20