X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lwlib%2Flwlib-internal.h;h=b20223094a4dad5c7ae9467e6ceb554941e8fc16;hb=e9cdc675ebf6c37c74534adc024b5c723a81ccba;hp=1c6ffd9845ed71b764e1c4836a41337084bc1710;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/lwlib/lwlib-internal.h b/lwlib/lwlib-internal.h index 1c6ffd9..b202230 100644 --- a/lwlib/lwlib-internal.h +++ b/lwlib/lwlib-internal.h @@ -1,8 +1,22 @@ -#ifndef LWLIB_INTERNAL_H -#define LWLIB_INTERNAL_H +#ifndef INCLUDED_lwlib_internal_h_ +#define INCLUDED_lwlib_internal_h_ #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. */ @@ -39,12 +53,12 @@ typedef Widget typedef struct _widget_creation_entry { - CONST char* type; + const char* type; widget_creation_function function; } 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); @@ -55,5 +69,4 @@ lw_get_widget_value_for_widget (widget_instance* instance, Widget w); widget_info *lw_get_widget_info (LWLIB_ID id); -#endif /* LWLIB_INTERNAL_H */ - +#endif /* INCLUDED_lwlib_internal_h_ */