From: Paul Eggert Date: Sat, 16 Apr 2011 01:36:46 +0000 (-0700) Subject: * xlwmenu.c (XlwMenuSetValues): Rename/ move locals to avoid shadowing. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~268^2~57 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b7d36d143a6874439fa143ae93dc071f0b77275;p=emacs.git * xlwmenu.c (XlwMenuSetValues): Rename/ move locals to avoid shadowing. --- diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 64ae2fe085d..f083f64990a 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2011-04-16 Paul Eggert + + * xlwmenu.c (XlwMenuSetValues): Rename/ move locals to avoid shadowing. + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 5b97f2bf999..507d1f168af 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -1220,9 +1220,9 @@ display_menu (XlwMenuWidget mw, { if (val->enabled) *hit_return = val; - else + else no_return = 1; - if (mw->menu.inside_entry != val) + if (mw->menu.inside_entry != val) { if (mw->menu.inside_entry) XtCallCallbackList ((Widget)mw, mw->menu.leave, @@ -1426,7 +1426,7 @@ fit_to_screen (XlwMenuWidget mw, static void create_pixmap_for_menu (window_state* ws, XlwMenuWidget mw) { - if (ws->pixmap != None) + if (ws->pixmap != None) { XFreePixmap (XtDisplay (ws->w), ws->pixmap); ws->pixmap = None; @@ -1592,9 +1592,9 @@ map_event_to_widget_value (XlwMenuWidget mw, } } - if (!inside) + if (!inside) { - if (mw->menu.inside_entry != NULL) + if (mw->menu.inside_entry != NULL) XtCallCallbackList ((Widget)mw, mw->menu.leave, (XtPointer) mw->menu.inside_entry); mw->menu.inside_entry = NULL; @@ -1881,7 +1881,7 @@ openXftFont (XlwMenuWidget mw) if (!mw->menu.font) { mw->menu.xft_font = XftFontOpenName (XtDisplay (mw), screen, fname); - if (!mw->menu.xft_font) + if (!mw->menu.xft_font) { fprintf (stderr, "Can't find font '%s'\n", fname); mw->menu.xft_font = getDefaultXftFont (mw); @@ -1930,19 +1930,19 @@ XlwMenuInitialize (Widget request, Widget w, ArgList args, Cardinal *num_args) if (!mw->menu.font) { mw->menu.font = XLoadQueryFont (display, "fixed"); - if (!mw->menu.font) + if (!mw->menu.font) { fprintf (stderr, "Menu font fixed not found, can't continue.\n"); abort (); } } } - + #ifdef HAVE_X_I18N if (mw->menu.fontSet) mw->menu.font_extents = XExtentsOfFontSet (mw->menu.fontSet); #endif - + make_drawing_gcs (mw); make_shadow_gcs (mw); @@ -2118,12 +2118,12 @@ XlwMenuDestroy (Widget w) XftFontClose (XtDisplay (mw), mw->menu.xft_font); #endif - if (mw->menu.windows [0].pixmap != None) + if (mw->menu.windows [0].pixmap != None) XFreePixmap (XtDisplay (mw), mw->menu.windows [0].pixmap); /* start from 1 because the one in slot 0 is w->core.window */ for (i = 1; i < mw->menu.windows_length; i++) { - if (mw->menu.windows [i].pixmap != None) + if (mw->menu.windows [i].pixmap != None) XFreePixmap (XtDisplay (mw), mw->menu.windows [i].pixmap); #ifdef HAVE_XFT if (mw->menu.windows [i].xft_draw) @@ -2153,18 +2153,17 @@ XlwMenuSetValues (Widget current, Widget request, Widget new, { XlwMenuWidget oldmw = (XlwMenuWidget)current; XlwMenuWidget newmw = (XlwMenuWidget)new; - Boolean redisplay = False; - int i; + Boolean do_redisplay = False; if (newmw->menu.contents && newmw->menu.contents->contents && newmw->menu.contents->contents->change >= VISIBLE_CHANGE) - redisplay = True; + do_redisplay = True; /* Do redisplay if the contents are entirely eliminated. */ if (newmw->menu.contents && newmw->menu.contents->contents == 0 && newmw->menu.contents->change >= VISIBLE_CHANGE) - redisplay = True; + do_redisplay = True; if (newmw->core.background_pixel != oldmw->core.background_pixel || newmw->menu.foreground != oldmw->menu.foreground @@ -2179,6 +2178,7 @@ XlwMenuSetValues (Widget current, Widget request, Widget new, #endif ) { + int i; release_drawing_gcs (newmw); make_drawing_gcs (newmw); @@ -2188,7 +2188,7 @@ XlwMenuSetValues (Widget current, Widget request, Widget new, newmw->menu.bottom_shadow_color = -1; make_shadow_gcs (newmw); - redisplay = True; + do_redisplay = True; if (XtIsRealized (current)) /* If the menu is currently displayed, change the display. */ @@ -2229,12 +2229,12 @@ XlwMenuSetValues (Widget current, Widget request, Widget new, #ifdef HAVE_X_I18N if (newmw->menu.fontSet != oldmw->menu.fontSet && newmw->menu.fontSet != NULL) { - redisplay = True; + do_redisplay = True; newmw->menu.font_extents = XExtentsOfFontSet (newmw->menu.fontSet); } #endif - return redisplay; + return do_redisplay; } static void