XEmacs 21.2.29 "Hestia".
[chise/xemacs-chise.git.1] / src / gui-x.c
index 9714d02..58fb4f3 100644 (file)
@@ -143,7 +143,7 @@ widget_value_unwind (Lisp_Object closure)
   widget_value *wv = (widget_value *) get_opaque_ptr (closure);
   free_opaque_ptr (closure);
   if (wv)
-    free_widget_value (wv);
+    free_widget_value_tree (wv);
   return Qnil;
 }
 
@@ -186,6 +186,7 @@ free_popup_widget_value_tree (widget_value *wv)
   if (! wv) return;
   if (wv->key) xfree (wv->key);
   if (wv->value) xfree (wv->value);
+  if (wv->name) xfree (wv->name);
 
   wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
 
@@ -274,9 +275,9 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id,
 #endif
 
 char *
-menu_separator_style (CONST char *s)
+menu_separator_style (const char *s)
 {
-  CONST char *p;
+  const char *p;
   char first;
 
   if (!s || s[0] == '\0')
@@ -312,7 +313,7 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv,
   /* !!#### This function has not been Mule-ized */
   /* This function cannot GC because gc_currently_forbidden is set when
      it's called */
-  struct Lisp_Gui_Item* pgui = 0;
+  Lisp_Gui_Item* pgui = 0;
 
   /* degenerate case */
   if (STRINGP (gui_item))
@@ -345,7 +346,7 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv,
 
   if (!NILP (pgui->suffix))
     {
-      CONST char *const_bogosity;
+      const char *const_bogosity;
       Lisp_Object suffix2;
 
       /* Shortcut to avoid evaluating suffix each time */
@@ -357,7 +358,9 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv,
          CHECK_STRING (suffix2);
        }
 
-      GET_C_STRING_FILENAME_DATA_ALLOCA (suffix2, const_bogosity);
+      TO_EXTERNAL_FORMAT (LISP_STRING, suffix2,
+                         C_STRING_ALLOCA, const_bogosity,
+                         Qfile_name);
       wv->value = (char *) const_bogosity;
       wv->value = xstrdup (wv->value);
     }
@@ -465,17 +468,17 @@ gui_items_to_widget_values_1 (Lisp_Object items, widget_value* parent,
       wv = xmalloc_widget_value();
       if (parent)
        parent->contents = wv;
-      else 
+      else
        prev->next = wv;
       if (!button_item_to_widget_value (items, wv, 0, 1))
        {
-         free_widget_value (wv);
+         free_widget_value_tree (wv);
          if (parent)
            parent->contents = 0;
-         else 
+         else
            prev->next = 0;
        }
-      else 
+      else
        {
          wv->value = xstrdup (wv->name);       /* what a mess... */
        }
@@ -546,7 +549,7 @@ gui_items_to_widget_values (Lisp_Object items)
   control = control->contents;
   tmp->next = 0;
   tmp->contents = 0;
-  free_widget_value (tmp);
+  free_widget_value_tree (tmp);
 
   /* No more need to free the half-filled-in structures. */
   set_opaque_ptr (wv_closure, 0);