X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lwlib%2Flwlib-internal.h;h=b20223094a4dad5c7ae9467e6ceb554941e8fc16;hp=5ec3bc94a0a094e22230763b7bf76aa1e08c7015;hb=2ca6e0cfed5bee07c2dc1ab478699e14d1b38621;hpb=3e447015251ce6dcde843cbed10d9033d5538622 diff --git a/lwlib/lwlib-internal.h b/lwlib/lwlib-internal.h index 5ec3bc9..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. */ @@ -44,7 +58,7 @@ typedef struct _widget_creation_entry } widget_creation_entry; /* update all other instances of a widget. Can be used in a callback when - a wiget has been used by the user */ + a widget has been used by the user */ void lw_internal_update_other_instances (Widget widget, XtPointer closure, XtPointer call_data);