Mercurial > hg > xemacs-beta
changeset 3466:4d52aea479a2
[xemacs-hg @ 2006-06-21 17:30:33 by james]
Fix various problems found by static checkers. Also, but back the CURCHARSIZE
macro in window.c to preserve the abstraction.
<m3mzc6wh85.fsf_-_@jerrypc.cs.usu.edu>
author | james |
---|---|
date | Wed, 21 Jun 2006 17:30:37 +0000 |
parents | af932b7bc2ee |
children | 6ec949a32bfb |
files | src/ChangeLog src/device-x.c src/dialog-x.c src/emacs.c src/extents.c src/glyphs-widget.c src/window.c |
diffstat | 7 files changed, 29 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Jun 20 21:51:21 2006 +0000 +++ b/src/ChangeLog Wed Jun 21 17:30:37 2006 +0000 @@ -1,3 +1,17 @@ +2006-06-19 Jerry James <james@xemacs.org> + + * device-x.c (x_IO_error_handler): Do not dereference d if it is + NULL. + * dialog-x.c (dbox_selection_callback): Ensure f is non-NULL, then + dereference it, not the other way around. + * emacs.c (main_1): restart is always 0 here. + * extents.c (detach_all_extents): Call extent_list_delete_all with + a non-NULL parameter only. + * glyphs-widget.c (widget_query_geometry): Guard against possibly + NULL width and height. + * window.c (change_window_height): Restore use of CURCHARSIZE + removed by 2006-06-16 change, to preserve the abstraction. + 2006-06-19 Jerry James <james@xemacs.org> * frame-x.c (x_set_frame_properties): Remove casts to silence GCC
--- a/src/device-x.c Tue Jun 20 21:51:21 2006 +0000 +++ b/src/device-x.c Wed Jun 21 17:30:37 2006 +0000 @@ -1215,8 +1215,10 @@ Xlib might just decide to exit(). So we mark the offending console for deletion and throw to top level. */ if (d) - enqueue_magic_eval_event (io_error_delete_device, dev); - DEVICE_X_BEING_DELETED (d) = 1; + { + enqueue_magic_eval_event (io_error_delete_device, dev); + DEVICE_X_BEING_DELETED (d) = 1; + } Fthrow (Qtop_level, Qnil); RETURN_NOT_REACHED (0);
--- a/src/dialog-x.c Tue Jun 20 21:51:21 2006 +0000 +++ b/src/dialog-x.c Wed Jun 21 17:30:37 2006 +0000 @@ -104,7 +104,7 @@ ourselves. */ #ifdef EXTERNAL_WIDGET /* #### Not sure if this special case is necessary. */ - if (!FRAME_X_EXTERNAL_WINDOW_P (f) && f) + if (f && !FRAME_X_EXTERNAL_WINDOW_P (f)) #else if (f) #endif
--- a/src/emacs.c Tue Jun 20 21:51:21 2006 +0000 +++ b/src/emacs.c Wed Jun 21 17:30:37 2006 +0000 @@ -1395,7 +1395,7 @@ inhibit_site_modules = inhibit_site_modules_save; if (initialized) - run_temacs_argc = restart ? -2 : -1; + run_temacs_argc = -1; else purify_flag = 1; }
--- a/src/extents.c Tue Jun 20 21:51:21 2006 +0000 +++ b/src/extents.c Wed Jun 21 17:30:37 2006 +0000 @@ -1455,11 +1455,11 @@ set_extent_start (e, -1); set_extent_end (e, -1); } + + /* But we need to clear all the lists containing extents or + havoc will result. */ + extent_list_delete_all (data->extents); } - - /* But we need to clear all the lists containing extents or - havoc will result. */ - extent_list_delete_all (data->extents); soe_invalidate (object); } }
--- a/src/glyphs-widget.c Tue Jun 20 21:51:21 2006 +0000 +++ b/src/glyphs-widget.c Wed Jun 21 17:30:37 2006 +0000 @@ -569,21 +569,21 @@ IMAGE_INSTANCE_WIDGET_FACE (ii), &w, &h, domain); /* Adjust the size for borders. */ - if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii)) + if (width && IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii)) *width = w + 2 * widget_instance_border_width (ii); - if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)) + if (height && IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)) *height = h + 2 * widget_instance_border_width (ii); } } /* Finish off with dynamic sizing. */ - if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii))) + if (width && !NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii))) { dynamic_width = eval_within_redisplay (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)); if (INTP (dynamic_width)) *width = XINT (dynamic_width); } - if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii))) + if (height && !NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii))) { dynamic_height = eval_within_redisplay (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii));
--- a/src/window.c Tue Jun 20 21:51:21 2006 +0000 +++ b/src/window.c Wed Jun 21 17:30:37 2006 +0000 @@ -4380,7 +4380,7 @@ { int new_pixsize; sizep = &CURSIZE (w); - dim = window_char_width (w, 0); + dim = CURCHARSIZE (w); new_pixsize = inpixels?(*sizep + delta):(dim+delta); set_window_pixsize (window, new_pixsize, 0, 0); return;