X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lwlib%2Flwlib-internal.h;h=b20223094a4dad5c7ae9467e6ceb554941e8fc16;hb=79d2db7d65205bc85d471590726d0cf3af5598e0;hp=85dff5a339c70b116707556c30d5027d4d3dcdfa;hpb=59eec5f21669e81977b5b1fe9bf717cab49cf7fb;p=chise%2Fxemacs-chise.git.1 diff --git a/lwlib/lwlib-internal.h b/lwlib/lwlib-internal.h index 85dff5a..b202230 100644 --- a/lwlib/lwlib-internal.h +++ b/lwlib/lwlib-internal.h @@ -3,6 +3,20 @@ #include "lwlib.h" +#ifdef USE_ASSERTIONS +/* Highly dubious kludge */ +/* (thanks, Jamie, I feel better now -- ben) */ +void assert_failed (const char *, int, const char *); +# define abort() (assert_failed (__FILE__, __LINE__, "abort()")) +# define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) +#else +# ifdef DEBUG_XEMACS +# define assert(x) ((x) ? (void) 0 : (void) abort ()) +# else +# define assert(x) +# endif +#endif + /* This represents a single widget within a widget tree. All the widgets in a widget tree are chained through the `next' field. `info' is a back pointer to the widget tree. */