NEURON
hocassrt.h
Go to the documentation of this file.
1 
2 #ifndef hocassrt_h
3 #define hocassrt_h
4 #include <assert.h>
5 #undef assert
6 #undef _assert
7 #ifndef NDEBUG
8 #ifndef stderr
9 #include <stdio.h>
10 #endif
11 
12 #include "oc_ansi.h"
13 #if defined(__STDC__)
14 #undef assert
15 #define assert(ex) \
16  { \
17  if (!(ex)) { \
18  fprintf(stderr, "Assertion failed: file %s, line %d\n", __FILE__, __LINE__); \
19  hoc_execerror(#ex, (char*) 0); \
20  } \
21  }
22 #else
23 #undef assert
24 #define assert(ex) \
25  { \
26  if (!(ex)) { \
27  fprintf(stderr, "Assertion failed: file %s, line %d\n", __FILE__, __LINE__); \
28  hoc_execerror("ex", (char*) 0); \
29  } \
30  }
31 #endif
32 #else
33 #define _assert(ex) ;
34 #define assert(ex) ;
35 #endif
36 #endif
HOC interpreter function declarations (included by hocdec.h)