X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fscrollbar-x.c;h=53d4c24b1405fa873d933628810e7944abdb2814;hb=463048f456b381d707c6287f343d87aa9cd3f42e;hp=7034321cd8688dd87e74a579b99eaefe955c18bb;hpb=ea1ea793fe6e244ef5555ed983423a204101af13;p=chise%2Fxemacs-chise.git diff --git a/src/scrollbar-x.c b/src/scrollbar-x.c index 7034321..53d4c24 100644 --- a/src/scrollbar-x.c +++ b/src/scrollbar-x.c @@ -23,6 +23,8 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ +/* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-8-00. */ + #include #include "lisp.h" @@ -215,6 +217,7 @@ scrollbar_instance_to_widget_value (struct scrollbar_instance *instance) wv->scrollbar_data = xnew (scrollbar_values); wv->name = SCROLLBAR_X_NAME (instance); + wv->name = xstrdup (wv->name); wv->value = 0; wv->key = 0; wv->enabled = instance->scrollbar_is_active; @@ -277,10 +280,8 @@ x_update_scrollbar_instance_status (struct window *w, int active, int size, } } - if (!wv->scrollbar_data) abort (); - xfree (wv->scrollbar_data); - wv->scrollbar_data = 0; - free_widget_value (wv); + if (!wv->scrollbar_data) ABORT (); + free_widget_value_tree (wv); } else if (managed) { @@ -365,7 +366,7 @@ x_scrollbar_loop (enum x_scrollbar_loop type, Lisp_Object window, } break; default: - abort (); + ABORT (); } } @@ -407,6 +408,9 @@ x_update_vertical_scrollbar_callback (Widget widget, LWLIB_ID id, return; mirror = find_scrollbar_window_mirror (f, id); + if (!mirror) + return; + win = real_window (mirror, 1); if (NILP (win)) @@ -610,6 +614,9 @@ x_update_horizontal_scrollbar_callback (Widget widget, LWLIB_ID id, return; mirror = find_scrollbar_window_mirror (f, id); + if (!mirror) + return; + win = real_window (mirror, 1); if (NILP (win)) @@ -678,13 +685,13 @@ x_scrollbar_pointer_changed_in_window (struct window *w) void x_update_frame_scrollbars (struct frame *f) { - /* Consider this code to be "in_display" so that we abort() if Fsignal() + /* Consider this code to be "in_display" so that we ABORT() if Fsignal() gets called. */ in_display++; x_scrollbar_loop (X_UPDATE_FRAME_SCROLLBARS, f->root_window, f->root_mirror, 0, (Window) NULL); in_display--; - if (in_display < 0) abort (); + if (in_display < 0) ABORT (); } #ifdef MEMORY_USAGE_STATS