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 #if defined(__cplusplus)
13 extern "C" {
14 #endif
15 
16 extern void hoc_execerror(const char*, const char*);
17 
18 #if defined(__cplusplus)
19 }
20 #endif
21 
22 
23 #if defined(__STDC__)
24 # define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__,__LINE__);hoc_execerror(#ex, (char *)0);}}
25 #else
26 # define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__,__LINE__);hoc_execerror("ex", (char *)0);}}
27 #endif
28 # else
29 # define _assert(ex) ;
30 # define assert(ex) ;
31 # endif
32 #endif
void hoc_execerror(const char *, const char *)
Definition: hoc.cpp:741