diff options
author | Jan D <jan.h.d@swipnet.se> | 2010-07-08 12:29:51 +0200 |
---|---|---|
committer | Jan D <jan.h.d@swipnet.se> | 2010-07-08 12:29:51 +0200 |
commit | c825c0b6473c1bd995dbef43cc07087609607cda (patch) | |
tree | 0f67889373ab35bd69e133046f61dfd7bc189343 /lwlib/lwlib.c | |
parent | 0216627eb39f77958e30f4750f581714fdfd7faf (diff) |
Change function definition from K&R to prototype. Fix prototype warnings.
* lwlib-Xaw.c (xaw_generic_callback, command_reset)
(xaw_update_one_value): Reformat.
(xaw_update_one_widget): Reformat and remove dead code.
(xaw_scrollbar_scroll, xaw_scrollbar_jump, xaw_create_scrollbar)
(xaw_update_scrollbar): Remove (not used).
(make_dialog): Change from K&R to prototype. Remove dead code.
(xaw_creation_table): Remove scrollbar entry.
* lwlib-Xlw.c (x_print_complete_resource_name): Change from K&R to
prototype.
(xlw_update_one_value): Reformat.
* lwlib-Xm.c (x_print_complete_resource_name)
(make_destroyed_instance, free_destroyed_instance, first_child)
(lw_motif_widget_p, resource_motif_string, destroy_all_children)
(xm_arm_callback, xm_update_label, xm_update_list)
(xm_update_pushbutton, xm_update_cascadebutton)
(xm_update_toggle, xm_update_radiobox, make_menu_in_widget)
(update_one_menu_entry, xm_update_menu, xm_update_text)
(xm_update_text_field, xm_update_one_widget)
(xm_update_one_value, activate_button, dialog_key_cb)
(make_dialog, mark_dead_instance_destroyed)
(find_matching_instance, recenter_widget, recycle_instance)
(xm_create_dialog, make_menubar, remove_grabs, make_popup_menu)
(make_main, xm_destroy_instance, xm_popup_menu)
(set_min_dialog_size, xm_pop_instance, do_call)
(xm_internal_update_other_instances, xm_generic_callback)
(xm_nosel_callback, xm_pull_down_callback, xm_pop_down_callback)
(xm_set_keyboard_focus, xm_set_main_areas, xm_manage_resizing): Change
from K&R to prototype.
* lwlib-int.h (widget_creation_function): Fix prototype.
* lwlib.c (allocate_widget_info, lw_register_widget): Change from K&R
to prototype.
(lw_internal_update_other_instances, merge_widget_value): Reformat.
* xlwmenu.c (size_menu_item): Change from K&R to prototype.
Change label_width and height to int.
(draw_arrow, draw_shadow_rectangle, draw_shadow_rhombus)
(draw_separator, display_menu, fit_to_screen, motion_event_is_in_menu)
(map_event_to_widget_value): Reformat.
(display_menu_item): Change from K&R to prototype.
Diffstat (limited to 'lwlib/lwlib.c')
-rw-r--r-- | lwlib/lwlib.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index fe228b9a69..2b72f54bb1 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -249,16 +249,14 @@ copy_widget_value_tree (widget_value *val, change_type change) } static widget_info * -allocate_widget_info (type, name, id, val, pre_activate_cb, - selection_cb, post_activate_cb, highlight_cb) - char* type; - char* name; - LWLIB_ID id; - widget_value* val; - lw_callback pre_activate_cb; - lw_callback selection_cb; - lw_callback post_activate_cb; - lw_callback highlight_cb; +allocate_widget_info (char* type, + char* name, + LWLIB_ID id, + widget_value* val, + lw_callback pre_activate_cb, + lw_callback selection_cb, + lw_callback post_activate_cb, + lw_callback highlight_cb) { widget_info* info = (widget_info*)malloc (sizeof (widget_info)); info->type = safe_strdup (type); @@ -431,7 +429,10 @@ safe_strcmp (char *s1, char *s2) static widget_value * -merge_widget_value (widget_value *val1, widget_value *val2, int level, int *change_p) +merge_widget_value (widget_value *val1, + widget_value *val2, + int level, + int *change_p) { change_type change, this_one_change; widget_value* merged_next; @@ -822,16 +823,14 @@ instantiate_widget_instance (widget_instance *instance) } void -lw_register_widget (type, name, id, val, pre_activate_cb, - selection_cb, post_activate_cb, highlight_cb) - char* type; - char* name; - LWLIB_ID id; - widget_value* val; - lw_callback pre_activate_cb; - lw_callback selection_cb; - lw_callback post_activate_cb; - lw_callback highlight_cb; +lw_register_widget (char* type, + char* name, + LWLIB_ID id, + widget_value* val, + lw_callback pre_activate_cb, + lw_callback selection_cb, + lw_callback post_activate_cb, + lw_callback highlight_cb) { if (!get_widget_info (id, False)) allocate_widget_info (type, name, id, val, pre_activate_cb, selection_cb, @@ -1162,7 +1161,9 @@ static Boolean lwlib_updating; modified to update other instances of the widgets. Closure should be the widget_instance. */ void -lw_internal_update_other_instances (Widget widget, XtPointer closure, XtPointer call_data) +lw_internal_update_other_instances (Widget widget, + XtPointer closure, + XtPointer call_data) { widget_instance* instance = (widget_instance*)closure; char* name = XtName (widget); |