comparison lwlib/lwlib.c @ 1201:c2569faae8ed

[xemacs-hg @ 2003-01-12 10:45:53 by michaels] 2002-12-16 Ben Wing <ben@xemacs.org> * 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_.
author michaels
date Sun, 12 Jan 2003 10:45:53 +0000
parents 79c6ff3eef26
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
1200:6eeff8af17a2 1201:c2569faae8ed
194 /* 194 /*
195 * Return true if old->scrollbar_data were not equivalent 195 * Return true if old->scrollbar_data were not equivalent
196 * to new->scrollbar_data. 196 * to new->scrollbar_data.
197 */ 197 */
198 static Boolean 198 static Boolean
199 merge_scrollbar_values (widget_value *old, widget_value *new) 199 merge_scrollbar_values (widget_value *old, widget_value *new_)
200 { 200 {
201 Boolean changed = False; 201 Boolean changed = False;
202 202
203 if (new->scrollbar_data && !old->scrollbar_data) 203 if (new_->scrollbar_data && !old->scrollbar_data)
204 { 204 {
205 copy_scrollbar_values (new, old); 205 copy_scrollbar_values (new_, old);
206 changed = True; 206 changed = True;
207 } 207 }
208 else if (!new->scrollbar_data && old->scrollbar_data) 208 else if (!new_->scrollbar_data && old->scrollbar_data)
209 { 209 {
210 free (old->scrollbar_data); 210 free (old->scrollbar_data);
211 old->scrollbar_data = NULL; 211 old->scrollbar_data = NULL;
212 } 212 }
213 else if (new->scrollbar_data && old->scrollbar_data) 213 else if (new_->scrollbar_data && old->scrollbar_data)
214 { 214 {
215 scrollbar_values *old_sb = old->scrollbar_data; 215 scrollbar_values *old_sb = old->scrollbar_data;
216 scrollbar_values *new_sb = new->scrollbar_data; 216 scrollbar_values *new_sb = new_->scrollbar_data;
217 217
218 if ((old_sb->line_increment != new_sb->line_increment) || 218 if ((old_sb->line_increment != new_sb->line_increment) ||
219 (old_sb->page_increment != new_sb->page_increment) || 219 (old_sb->page_increment != new_sb->page_increment) ||
220 (old_sb->minimum != new_sb->minimum) || 220 (old_sb->minimum != new_sb->minimum) ||
221 (old_sb->maximum != new_sb->maximum) || 221 (old_sb->maximum != new_sb->maximum) ||
834 if (val->args) 834 if (val->args)
835 val->args->args_changed = False; 835 val->args->args_changed = False;
836 } 836 }
837 } 837 }
838 838
839 #if defined (NEED_LUCID) || defined (NEED_ATHENA) || defined (NEED_MOTIF)
840
839 /* strcasecmp() is not sufficiently portable or standard, 841 /* strcasecmp() is not sufficiently portable or standard,
840 and it's easier just to write our own. */ 842 and it's easier just to write our own. */
841 static int 843 static int
842 ascii_strcasecmp (const char *s1, const char *s2) 844 ascii_strcasecmp (const char *s1, const char *s2)
843 { 845 {
849 if (c2 >= 'A' && c2 <= 'Z') c2 += 'a' - 'A'; 851 if (c2 >= 'A' && c2 <= 'Z') c2 += 'a' - 'A';
850 if (c1 != c2) return c1 - c2; 852 if (c1 != c2) return c1 - c2;
851 if (c1 == '\0') return 0; 853 if (c1 == '\0') return 0;
852 } 854 }
853 } 855 }
854
855 #if defined (NEED_LUCID) || defined (NEED_ATHENA) || defined (NEED_MOTIF)
856 856
857 static widget_creation_function 857 static widget_creation_function
858 find_in_table (const char *type, const widget_creation_entry table[]) 858 find_in_table (const char *type, const widget_creation_entry table[])
859 { 859 {
860 const widget_creation_entry *cur; 860 const widget_creation_entry *cur;