/[ascend]/trunk/base/generic/utilities/ascPanic.h
ViewVC logotype

Diff of /trunk/base/generic/utilities/ascPanic.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 976 by johnpye, Tue Dec 19 13:52:51 2006 UTC revision 977 by johnpye, Wed Dec 20 00:39:52 2006 UTC
# Line 62  NORETURN ASC_DLLSPEC(void) asc_panic( Line 62  NORETURN ASC_DLLSPEC(void) asc_panic(
62  */  */
63  #ifdef ASC_NO_ASSERTIONS  #ifdef ASC_NO_ASSERTIONS
64  # define asc_assert(x) ((void)0)  # define asc_assert(x) ((void)0)
65    # define ASC_ASSERT_LT(A,B) ((void)0)
66    # define ASC_ASSERT_EQ(A,B) ((void)0)
67    # define ASC_ASSERT_RANGE(A,B,C) ((void)0)
68    
69  #else  #else
70  # define asc_assert(cond) \  # define asc_assert(cond) \
# Line 83  NORETURN ASC_DLLSPEC(void) asc_panic( Line 86  NORETURN ASC_DLLSPEC(void) asc_panic(
86          , #A, #B \          , #A, #B \
87          , (float)A, (float)B))          , (float)A, (float)B))
88    
89    #define ASC_ASSERT_RANGE(A,B,C) \
90        ((A) >= (B) && (A) < (C) ? (void)0 : asc_panic_line(ASCERR_ASSERTION_FAILED\
91            , __FILE__, __LINE__, __FUNCTION__\
92            ,"Assertion failed: %s < %s < %s (val = %f, low = %f, up = %f)" \
93            , #B, #A, #C \
94            , (float)A, (float)B), (float)C)
95    
96  #endif  #endif
97    
98  /**< Print fatal error message, run callback function & (usually) exit the program.  /**< Print fatal error message, run callback function & (usually) exit the program.

Legend:
Removed from v.976  
changed lines
  Added in v.977

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22