1: #ifndef NDEBUG 2: #define _assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);exit(1);}} 3: #define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);exit(1);}} 4: #else 5: #define _assert(ex) ; 6: #define assert(ex) ; 7: #endif