comparison anagram/support/assert.h @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children f5acaf0c8a29
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 /*
2 * AnaGram, A System for Syntax Directed Programming
3 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
4 * Copyright 2006, 2007 David A. Holland. All Rights Reserved.
5 * See the file COPYING for license and usage terms.
6 *
7 * assert.h
8 */
9
10 #ifndef ASSERT_H
11 #define ASSERT_H
12
13 // to prevent recursive asserting
14 extern int no_assertions;
15
16 void badAssertion(const char *file, int line);
17 #define assert(p) \
18 (((volatile int)(p)) ? (void)0 : badAssertion(__FILE__, __LINE__))
19
20
21 /*
22 * This must be provided by each user interface and is NOT defined in
23 * assert.cpp.
24 */
25
26 void bailOut(const char *msg);
27
28 #endif /* ASSERT_H */