# HG changeset patch # User michaels # Date 1042368353 0 # Node ID c2569faae8edacbdb685a0e9de7266257216322f # Parent 6eeff8af17a2b3a749ae8a4462f83a2a11b9a710 [xemacs-hg @ 2003-01-12 10:45:53 by michaels] 2002-12-16 Ben Wing * lwlib-Xlw.c (xlw_update_one_widget): * lwlib-Xm.c (xm_update_one_widget): * lwlib-Xm.c (xm_update_one_value): * lwlib.c: * lwlib.c (merge_scrollbar_values): * xlwmenu.c: * xlwmenu.c (display_menu): * xlwmenu.c (XlwMenuInitialize): * xlwmenu.c (XlwMenuSetValues): * xlwradio.c: * xlwradio.c (RadioClassPartInit): * xlwradio.c (RadioSet): * xlwradio.c (RadioUnset): class -> class_, new -> new_. diff -r 6eeff8af17a2 -r c2569faae8ed lwlib/ChangeLog --- a/lwlib/ChangeLog Sat Jan 11 22:52:31 2003 +0000 +++ b/lwlib/ChangeLog Sun Jan 12 10:45:53 2003 +0000 @@ -1,3 +1,20 @@ +2002-12-16 Ben Wing + + * lwlib-Xlw.c (xlw_update_one_widget): + * lwlib-Xm.c (xm_update_one_widget): + * lwlib-Xm.c (xm_update_one_value): + * lwlib.c: + * lwlib.c (merge_scrollbar_values): + * xlwmenu.c: + * xlwmenu.c (display_menu): + * xlwmenu.c (XlwMenuInitialize): + * xlwmenu.c (XlwMenuSetValues): + * xlwradio.c: + * xlwradio.c (RadioClassPartInit): + * xlwradio.c (RadioSet): + * xlwradio.c (RadioUnset): + class -> class_, new -> new_. + 2003-01-04 Steve Youngs * XEmacs 21.5.10 "burdock" is released. diff -r 6eeff8af17a2 -r c2569faae8ed lwlib/lwlib-Xlw.c --- a/lwlib/lwlib-Xlw.c Sat Jan 11 22:52:31 2003 +0000 +++ b/lwlib/lwlib-Xlw.c Sun Jan 12 10:45:53 2003 +0000 @@ -535,12 +535,12 @@ xlw_update_one_widget (widget_instance* instance, Widget widget, widget_value* val, Boolean deep_p) { - WidgetClass class = XtClass (widget); + WidgetClass class_ = XtClass (widget); if (0) ; #ifdef LWLIB_MENUBARS_LUCID - else if (class == xlwMenuWidgetClass) + else if (class_ == xlwMenuWidgetClass) { XlwMenuWidget mw; Arg al [1]; @@ -553,13 +553,13 @@ } #endif #ifdef LWLIB_SCROLLBARS_LUCID - else if (class == xlwScrollBarWidgetClass) + else if (class_ == xlwScrollBarWidgetClass) { xlw_update_scrollbar (instance, widget, val); } #endif #ifdef LWLIB_TABS_LUCID - else if (class == tabsWidgetClass) + else if (class_ == tabsWidgetClass) { xlw_update_tab_control (instance, widget, val); } diff -r 6eeff8af17a2 -r c2569faae8ed lwlib/lwlib-Xm.c --- a/lwlib/lwlib-Xm.c Sat Jan 11 22:52:31 2003 +0000 +++ b/lwlib/lwlib-Xm.c Sun Jan 12 10:45:53 2003 +0000 @@ -824,7 +824,7 @@ xm_update_one_widget (widget_instance* instance, Widget widget, widget_value* val, Boolean deep_p) { - WidgetClass class; + WidgetClass class_; Arg al [20]; int ac = 0; @@ -840,25 +840,25 @@ /* Common to all label like widgets */ xm_safe_update_label (instance, widget, val); #endif - class = XtClass (widget); + class_ = XtClass (widget); /* Class specific things */ - if (class == xmPushButtonWidgetClass || - class == xmArrowButtonWidgetClass) + if (class_ == xmPushButtonWidgetClass || + class_ == xmArrowButtonWidgetClass) { xm_update_pushbutton (instance, widget, val); } #ifdef LWLIB_MENUBARS_MOTIF - else if (class == xmCascadeButtonWidgetClass) + else if (class_ == xmCascadeButtonWidgetClass) { xm_update_cascadebutton (instance, widget, val); } #endif - else if (class == xmToggleButtonWidgetClass - || class == xmToggleButtonGadgetClass) + else if (class_ == xmToggleButtonWidgetClass + || class_ == xmToggleButtonGadgetClass) { xm_update_toggle (instance, widget, val); } - else if (class == xmRowColumnWidgetClass) + else if (class_ == xmRowColumnWidgetClass) { Boolean radiobox = 0; @@ -872,31 +872,31 @@ xm_update_menu (instance, widget, val, deep_p); #endif } - else if (class == xmTextWidgetClass) + else if (class_ == xmTextWidgetClass) { xm_update_text (instance, widget, val); } - else if (class == xmTextFieldWidgetClass) + else if (class_ == xmTextFieldWidgetClass) { xm_update_text_field (instance, widget, val); } - else if (class == xmListWidgetClass) + else if (class_ == xmListWidgetClass) { xm_update_list (instance, widget, val); } #if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 - else if (class == xmComboBoxWidgetClass) + else if (class_ == xmComboBoxWidgetClass) { xm_update_combo_box (instance, widget, val); } #endif #ifdef LWLIB_SCROLLBARS_MOTIF - else if (class == xmScrollBarWidgetClass) + else if (class_ == xmScrollBarWidgetClass) { xm_update_scrollbar (instance, widget, val); } #endif - else if (class == xmScaleWidgetClass) + else if (class_ == xmScaleWidgetClass) { xm_update_progress (instance, widget, val); } @@ -910,7 +910,7 @@ xm_update_one_value (widget_instance* instance, Widget widget, widget_value* val) { - WidgetClass class = XtClass (widget); + WidgetClass class_ = XtClass (widget); widget_value *old_wv; /* copy the call_data slot into the "return" widget_value */ @@ -921,28 +921,28 @@ break; } - if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass) + if (class_ == xmToggleButtonWidgetClass || class_ == xmToggleButtonGadgetClass) { Arg al [1]; XtSetArg (al [0], XmNset, &val->selected); XtGetValues (widget, al, 1); val->edited = True; } - else if (class == xmTextWidgetClass) + else if (class_ == xmTextWidgetClass) { if (val->value) XtFree (val->value); val->value = XmTextGetString (widget); val->edited = True; } - else if (class == xmTextFieldWidgetClass) + else if (class_ == xmTextFieldWidgetClass) { if (val->value) XtFree (val->value); val->value = XmTextFieldGetString (widget); val->edited = True; } - else if (class == xmRowColumnWidgetClass) + else if (class_ == xmRowColumnWidgetClass) { Boolean radiobox = 0; { @@ -973,9 +973,9 @@ val->edited = True; } } - else if (class == xmListWidgetClass + else if (class_ == xmListWidgetClass #if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 - || class == xmComboBoxWidgetClass + || class_ == xmComboBoxWidgetClass #endif ) { @@ -983,7 +983,7 @@ int* pos_list; Widget list = widget; #if defined (LWLIB_WIDGETS_MOTIF) && XmVERSION > 1 - if (class == xmComboBoxWidgetClass) + if (class_ == xmComboBoxWidgetClass) list = CB_List (widget); #endif if (XmListGetSelectedPos (list, &pos_list, &pos_cnt)) @@ -1008,7 +1008,7 @@ } } #ifdef LWLIB_SCROLLBARS_MOTIF - else if (class == xmScrollBarWidgetClass) + else if (class_ == xmScrollBarWidgetClass) { /* This function is not used by the scrollbar. */ return; diff -r 6eeff8af17a2 -r c2569faae8ed lwlib/lwlib.c --- a/lwlib/lwlib.c Sat Jan 11 22:52:31 2003 +0000 +++ b/lwlib/lwlib.c Sun Jan 12 10:45:53 2003 +0000 @@ -196,24 +196,24 @@ * to new->scrollbar_data. */ static Boolean -merge_scrollbar_values (widget_value *old, widget_value *new) +merge_scrollbar_values (widget_value *old, widget_value *new_) { Boolean changed = False; - if (new->scrollbar_data && !old->scrollbar_data) + if (new_->scrollbar_data && !old->scrollbar_data) { - copy_scrollbar_values (new, old); + copy_scrollbar_values (new_, old); changed = True; } - else if (!new->scrollbar_data && old->scrollbar_data) + else if (!new_->scrollbar_data && old->scrollbar_data) { free (old->scrollbar_data); old->scrollbar_data = NULL; } - else if (new->scrollbar_data && old->scrollbar_data) + else if (new_->scrollbar_data && old->scrollbar_data) { scrollbar_values *old_sb = old->scrollbar_data; - scrollbar_values *new_sb = new->scrollbar_data; + scrollbar_values *new_sb = new_->scrollbar_data; if ((old_sb->line_increment != new_sb->line_increment) || (old_sb->page_increment != new_sb->page_increment) || @@ -836,6 +836,8 @@ } } +#if defined (NEED_LUCID) || defined (NEED_ATHENA) || defined (NEED_MOTIF) + /* strcasecmp() is not sufficiently portable or standard, and it's easier just to write our own. */ static int @@ -852,8 +854,6 @@ } } -#if defined (NEED_LUCID) || defined (NEED_ATHENA) || defined (NEED_MOTIF) - static widget_creation_function find_in_table (const char *type, const widget_creation_entry table[]) { diff -r 6eeff8af17a2 -r c2569faae8ed lwlib/xlwmenu.c --- a/lwlib/xlwmenu.c Sat Jan 11 22:52:31 2003 +0000 +++ b/lwlib/xlwmenu.c Sun Jan 12 10:45:53 2003 +0000 @@ -151,13 +151,13 @@ }; #undef offset -static Boolean XlwMenuSetValues (Widget current, Widget request, Widget new, +static Boolean XlwMenuSetValues (Widget current, Widget request, Widget new_, ArgList args, Cardinal *num_args); static void XlwMenuRealize (Widget w, Mask *valueMask, XSetWindowAttributes *attributes); static void XlwMenuRedisplay (Widget w, XEvent *ev, Region region); static void XlwMenuResize (Widget w); -static void XlwMenuInitialize (Widget request, Widget new, ArgList args, +static void XlwMenuInitialize (Widget request, Widget new_, ArgList args, Cardinal *num_args); static void XlwMenuDestroy (Widget w); static void XlwMenuClassInitialize (void); @@ -2200,7 +2200,7 @@ static void display_menu (XlwMenuWidget mw, int level, Boolean just_compute_p, XPoint *highlighted_pos, XPoint *hit, widget_value **hit_return, - widget_value *this, widget_value *that) + widget_value *this_, widget_value *that) { widget_value *val; widget_value *following_item; @@ -2272,7 +2272,7 @@ } just_compute_this_one_p = - just_compute_p || ((this || that) && val != this && val != that); + just_compute_p || ((this_ || that) && val != this_ && val != that); start.x = where.x; start.y = where.y; @@ -3000,11 +3000,11 @@ #endif /* NEED_MOTIF */ static void -XlwMenuInitialize (Widget request, Widget new, ArgList args, +XlwMenuInitialize (Widget request, Widget new_, ArgList args, Cardinal *num_args) { /* Get the GCs and the widget size */ - XlwMenuWidget mw = (XlwMenuWidget)new; + XlwMenuWidget mw = (XlwMenuWidget)new_; Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw))); Display *display = XtDisplay (mw); @@ -3163,11 +3163,11 @@ } static Boolean -XlwMenuSetValues (Widget current, Widget request, Widget new, ArgList args, +XlwMenuSetValues (Widget current, Widget request, Widget new_, ArgList args, Cardinal *num_args) { XlwMenuWidget oldmw = (XlwMenuWidget)current; - XlwMenuWidget newmw = (XlwMenuWidget)new; + XlwMenuWidget newmw = (XlwMenuWidget)new_; Boolean redisplay = False; int i; diff -r 6eeff8af17a2 -r c2569faae8ed lwlib/xlwradio.c --- a/lwlib/xlwradio.c Sat Jan 11 22:52:31 2003 +0000 +++ b/lwlib/xlwradio.c Sun Jan 12 10:45:53 2003 +0000 @@ -200,9 +200,9 @@ } static void -RadioClassPartInit (WidgetClass class) +RadioClassPartInit (WidgetClass class_) { - RadioWidgetClass c = (RadioWidgetClass) class ; + RadioWidgetClass c = (RadioWidgetClass) class_ ; RadioWidgetClass super = (RadioWidgetClass)c->core_class.superclass ; if( c->radio_class.drawDiamond == NULL || @@ -480,14 +480,14 @@ Cardinal *num_params) /* unused */ { RadioWidget rw = (RadioWidget)w; - RadioWidgetClass class = (RadioWidgetClass) w->core.widget_class ; + RadioWidgetClass class_ = (RadioWidgetClass) w->core.widget_class ; if( rw->command.set ) return ; rw->command.set = TRUE ; if( XtIsRealized(w) ) - class->radio_class.drawDiamond(w) ; + class_->radio_class.drawDiamond(w) ; } @@ -499,14 +499,14 @@ Cardinal *num_params) /* unused */ { RadioWidget rw = (RadioWidget)w; - RadioWidgetClass class = (RadioWidgetClass) w->core.widget_class ; + RadioWidgetClass class_ = (RadioWidgetClass) w->core.widget_class ; if( ! rw->command.set ) return ; rw->command.set = FALSE ; if( XtIsRealized(w) ) - class->radio_class.drawDiamond(w) ; + class_->radio_class.drawDiamond(w) ; }