Index: src/dialog-x.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/dialog-x.c,v retrieving revision 1.6.2.4 diff -u -r1.6.2.4 dialog-x.c --- src/dialog-x.c 2000/02/16 02:06:42 1.6.2.4 +++ src/dialog-x.c 2000/04/06 21:53:50 @@ -166,7 +166,7 @@ wv = xmalloc_widget_value (); gui_item = gui_parse_item_keywords (button); - if (!button_item_to_widget_value (gui_item, wv, allow_text_p, 1)) + if (!button_item_to_widget_value (gui_item, wv, allow_text_p, 1, 0)) { free_widget_value_tree (wv); continue; Index: src/glyphs-x.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-x.c,v retrieving revision 1.49.2.63 diff -u -r1.49.2.63 glyphs-x.c --- src/glyphs-x.c 2000/04/04 10:50:50 1.49.2.63 +++ src/glyphs-x.c 2000/04/06 21:54:13 @@ -2542,7 +2542,7 @@ Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image); widget_value* wv = xmalloc_widget_value (); - button_item_to_widget_value (gui, wv, 1, 1); + button_item_to_widget_value (gui, wv, 1, 1, 0); if (!NILP (glyph)) { @@ -2619,7 +2619,7 @@ Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); widget_value* wv = xmalloc_widget_value (); - button_item_to_widget_value (gui, wv, 1, 1); + button_item_to_widget_value (gui, wv, 1, 1, 0); x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "progress", wv); @@ -2654,7 +2654,7 @@ Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); widget_value* wv = xmalloc_widget_value (); - button_item_to_widget_value (gui, wv, 1, 1); + button_item_to_widget_value (gui, wv, 1, 1, 0); x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "text-field", wv); @@ -2733,7 +2733,7 @@ Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); widget_value* wv = xmalloc_widget_value (); - button_item_to_widget_value (gui, wv, 1, 1); + button_item_to_widget_value (gui, wv, 1, 1, 0); x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "button", wv); Index: src/gmalloc.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/gmalloc.c,v retrieving revision 1.12.2.3 diff -u -r1.12.2.3 gmalloc.c --- src/gmalloc.c 2000/03/06 20:57:46 1.12.2.3 +++ src/gmalloc.c 2000/04/06 21:54:17 @@ -4,6 +4,9 @@ /* Get the configuration files if we're being compiled for Emacs. */ #ifdef emacs # include +#ifdef ERROR_CHECK_MALLOC +# define assert(x) ((x) ? (void) 0 : (void) abort ()) +#endif # include "getpagesize.h" # ifndef HAVE_CONFIG_H # define HAVE_CONFIG_H @@ -664,6 +667,9 @@ _heapinfo[block].busy.info.size = blocks; ++_chunks_used; _bytes_used += blocks * BLOCKSIZE; +#ifdef ERROR_CHECK_MALLOC + assert ((char*)result > (char*)_heapinfo); +#endif return result; } } @@ -703,6 +709,9 @@ _bytes_free -= blocks * BLOCKSIZE; } +#ifdef ERROR_CHECK_MALLOC + assert ((char*)result > (char*)_heapinfo); +#endif return result; } @@ -932,6 +941,9 @@ { return; } +#ifdef ERROR_CHECK_MALLOC + assert ((char*)ptr > (char*)_heapinfo); +#endif for (l = _aligned_blocks; l != NULL; l = l->next) if (l->aligned == ptr) @@ -1036,7 +1048,11 @@ int type; __malloc_size_t block, blocks, oldlimit; - if (PURE_DATA(ptr)) +#ifdef ERROR_CHECK_MALLOC + if (!PURE_DATA (ptr) && ptr != NULL) + assert ((char*)ptr > (char*)_heapinfo); +#endif + if (PURE_DATA (ptr)) { result = malloc (size); memcpy(result, ptr, size); Index: src/gui-x.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/gui-x.c,v retrieving revision 1.14.2.21 diff -u -r1.14.2.21 gui-x.c --- src/gui-x.c 2000/03/16 11:21:53 1.14.2.21 +++ src/gui-x.c 2000/04/06 21:54:20 @@ -338,7 +338,8 @@ */ int button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, - int allow_text_field_p, int no_keys_p) + int allow_text_field_p, int no_keys_p, + int menu_entry_p) { /* !!#### This function has not been Mule-ized */ /* This function cannot GC because gc_currently_forbidden is set when @@ -362,7 +363,7 @@ signal_simple_error(":filter keyword not permitted on leaf nodes", gui_item); #ifdef HAVE_MENUBARS - if (!gui_item_included_p (gui_item, Vmenubar_configuration)) + if (menu_entry_p && !gui_item_included_p (gui_item, Vmenubar_configuration)) { /* the include specification says to ignore this item. */ return 0; @@ -406,7 +407,7 @@ if (no_keys_p #ifdef HAVE_MENUBARS - || !menubar_show_keybindings + || (menu_entry_p && !menubar_show_keybindings) #endif ) wv->key = 0; @@ -503,7 +504,7 @@ parent->contents = wv; else prev->next = wv; - if (!button_item_to_widget_value (items, wv, 0, 1)) + if (!button_item_to_widget_value (items, wv, 0, 1, 0)) { free_widget_value_tree (wv); if (parent) Index: src/gui-x.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/gui-x.h,v retrieving revision 1.5.2.6 diff -u -r1.5.2.6 gui-x.h --- src/gui-x.h 2000/03/13 07:27:59 1.5.2.6 +++ src/gui-x.h 2000/04/06 21:54:20 @@ -70,7 +70,8 @@ XtPointer client_data); char *strdup_and_add_accel (char *name); int button_item_to_widget_value (Lisp_Object desc, widget_value *wv, - int allow_text_field_p, int no_keys_p); + int allow_text_field_p, int no_keys_p, + int menu_item_p); widget_value * gui_items_to_widget_values (Lisp_Object items); Lisp_Object menu_name_to_accelerator (char *name); char *menu_separator_style (const char *s); Index: src/menubar-x.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/menubar-x.c,v retrieving revision 1.18.2.14 diff -u -r1.18.2.14 menubar-x.c --- src/menubar-x.c 2000/03/13 08:16:19 1.18.2.14 +++ src/menubar-x.c 2000/04/06 21:54:24 @@ -141,7 +141,7 @@ Lisp_Object gui_item = gui_parse_item_keywords (desc); if (!button_item_to_widget_value (gui_item, wv, 1, (menu_type == MENUBAR_TYPE - && depth <= 1))) + && depth <= 1), 1)) { /* :included form was nil */ wv = NULL; Index: lwlib/lwlib-Xaw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/lwlib-Xaw.c,v retrieving revision 1.9.2.11 diff -u -r1.9.2.11 lwlib-Xaw.c --- lwlib/lwlib-Xaw.c 2000/04/05 19:07:31 1.9.2.11 +++ lwlib/lwlib-Xaw.c 2000/04/06 21:54:28 @@ -69,8 +69,8 @@ || XtIsSubclass (widget, labelWidgetClass) || XtIsSubclass (widget, toggleWidgetClass) || XtIsSubclass (widget, gaugeWidgetClass) -#if 0 - || XtIsSubclass (widget, textWidgetClass) +#ifndef NEED_MOTIF + || XtIsSubclass (widget, asciiTextWidgetClass) #endif #endif );