X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/8c74a125c85da08e34dceedb271b71b5f09ce690..93160ec3928b5efd654824dfc727d1bbec3c0aec:/lwlib/lwlib-Xm.c diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index acd11aec6b..4d48e64cb1 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -1,6 +1,6 @@ /* The lwlib interface to Motif widgets. -Copyright (C) 1994-1997, 1999-2012 Free Software Foundation, Inc. +Copyright (C) 1994-1997, 1999-2014 Free Software Foundation, Inc. Copyright (C) 1992 Lucid, Inc. This file is part of the Lucid Widget Library. @@ -16,9 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ +along with GNU Emacs. If not, see . */ #include @@ -81,7 +79,6 @@ static destroyed_instance *make_destroyed_instance (char *, char *, Boolean); static void free_destroyed_instance (destroyed_instance*); Widget first_child (Widget); -Boolean lw_motif_widget_p (Widget); static XmString resource_motif_string (Widget, char *); static void destroy_all_children (Widget, int); static void xm_update_label (widget_instance *, Widget, widget_value *); @@ -101,7 +98,6 @@ static void xm_update_menu (widget_instance *, Widget, widget_value *, static void xm_update_text (widget_instance *, Widget, widget_value *); static void xm_update_text_field (widget_instance *, Widget, widget_value *); -void xm_update_one_value (widget_instance *, Widget, widget_value *); static void activate_button (Widget, XtPointer, XtPointer); static Widget make_dialog (char *, Widget, Boolean, char *, char *, Boolean, Boolean, Boolean, int, int); @@ -109,21 +105,16 @@ static destroyed_instance* find_matching_instance (widget_instance*); static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer); static void recenter_widget (Widget); static Widget recycle_instance (destroyed_instance*); -Widget xm_create_dialog (widget_instance*); static Widget make_menubar (widget_instance*); static void remove_grabs (Widget, XtPointer, XtPointer); static Widget make_popup_menu (widget_instance*); static Widget make_main (widget_instance*); -void xm_destroy_instance (widget_instance*); -void xm_popup_menu (Widget, XEvent *); static void set_min_dialog_size (Widget); static void do_call (Widget, XtPointer, enum do_call_type); static void xm_generic_callback (Widget, XtPointer, XtPointer); static void xm_nosel_callback (Widget, XtPointer, XtPointer); static void xm_pull_down_callback (Widget, XtPointer, XtPointer); static void xm_pop_down_callback (Widget, XtPointer, XtPointer); -void xm_set_keyboard_focus (Widget, Widget); -void xm_set_main_areas (Widget, Widget, Widget); static void xm_internal_update_other_instances (Widget, XtPointer, XtPointer); static void xm_arm_callback (Widget, XtPointer, XtPointer); @@ -172,8 +163,8 @@ make_destroyed_instance (char* name, { destroyed_instance* instance = (destroyed_instance*) xmalloc (sizeof (destroyed_instance)); - instance->name = safe_strdup (name); - instance->type = safe_strdup (type); + instance->name = xstrdup (name); + instance->type = xstrdup (type); instance->widget = widget; instance->parent = parent; instance->pop_up_p = pop_up_p; @@ -490,7 +481,6 @@ make_menu_in_widget (widget_instance* instance, int child_index; widget_value* cur; Widget button = 0; - Widget title = 0; Widget menu; Arg al [256]; int ac; @@ -554,7 +544,7 @@ make_menu_in_widget (widget_instance* instance, { ac = 0; XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++; - title = button = XmCreateLabel (widget, cur->name, al, ac); + button = XmCreateLabel (widget, cur->name, al, ac); } else if (lw_separator_p (cur->name, &separator, 1)) { @@ -956,10 +946,7 @@ xm_update_one_value (widget_instance* instance, XtVaGetValues (toggle, XmNset, &set, NULL); if (set) - { - xfree (val->value); - val->value = safe_strdup (XtName (toggle)); - } + dupstring (&val->value, XtName (toggle)); } val->edited = True; } @@ -982,7 +969,7 @@ xm_update_one_value (widget_instance* instance, if (pos_list [j] == i) { cur->selected = True; - val->value = safe_strdup (cur->name); + val->value = xstrdup (cur->name); } } val->edited = 1;