diff src/frame-x.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
line wrap: on
line diff
--- a/src/frame-x.c	Mon Aug 13 11:32:27 2007 +0200
+++ b/src/frame-x.c	Mon Aug 13 11:33:38 2007 +0200
@@ -113,7 +113,7 @@
 
   /* We used to map over all frames here and then map over all widgets
      belonging to that frame. However it turns out that this was very fragile
-     as it requires our display stuctures to be in sync _and_ that the 
+     as it requires our display stuctures to be in sync _and_ that the
      loop is told about every new widget somebody adds. Therefore we
      now let Xt find it for us (which does a bottom-up search which
      could even be faster) */
@@ -661,13 +661,15 @@
       {
         CONST char * tmp;
         encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
-        GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA ((CONST char *) value, tmp);
+	TO_EXTERNAL_FORMAT (C_STRING, value,
+			    C_STRING_ALLOCA, tmp,
+			    Qctext);
         new_XtValue = (String) tmp;
         break;
       }
 #endif /* MULE */
 
-  /* ### Caching is device-independent - belongs in update_frame_title. */
+  /* #### Caching is device-independent - belongs in update_frame_title. */
   Xt_GET_VALUE (FRAME_X_SHELL_WIDGET (f), Xt_resource_name, &old_XtValue);
   if (!old_XtValue || strcmp (new_XtValue, old_XtValue))
     {
@@ -763,13 +765,17 @@
 	  if (XSTRING_LENGTH (prop) == 0)
 	    continue;
 
-	  GET_C_STRING_CTEXT_DATA_ALLOCA (prop, extprop);
+	  TO_EXTERNAL_FORMAT (LISP_STRING, prop,
+			      C_STRING_ALLOCA, extprop,
+			      Qctext);
 	  if (STRINGP (val))
 	    {
 	      CONST Extbyte *extval;
 	      Extcount extvallen;
 
-	      GET_STRING_CTEXT_DATA_ALLOCA (val, extval, extvallen);
+	      TO_EXTERNAL_FORMAT (LISP_STRING, val,
+				  ALLOCA, (extval, extvallen),
+				  Qctext);
 	      XtVaSetValues (w, XtVaTypedArg, extprop,
 			     XtRString, extval, extvallen + 1,
 			     (XtArgVal) NULL);
@@ -1103,7 +1109,7 @@
       unsigned int modifier = 0, state = 0;
       char *Ctext;
       int numItems = 0, textlen = 0, pos = 0;
-      struct Lisp_Event *lisp_event = XEVENT(event);
+      Lisp_Event *lisp_event = XEVENT (event);
       Lisp_Object item = Qnil;
       struct gcpro gcpro1;
 
@@ -1255,7 +1261,7 @@
 	{
 	  filePath = transferInfo->dropData->data.files[ii];
 	  hurl = dnd_url_hexify_string ((char *)filePath, "file:");
-          /* ### Mule-izing required */
+          /* #### Mule-izing required */
 	  l_data = Fcons (make_string ((Bufbyte* )hurl,
 				       strlen (hurl)),
 			  l_data);
@@ -1330,7 +1336,7 @@
       char *dnd_data = NULL;
       unsigned long dnd_len = 0;
       int dnd_typ = DndText, dnd_dealloc = 0;
-      struct Lisp_Event *lisp_event = XEVENT(event);
+      Lisp_Event *lisp_event = XEVENT (event);
 
       /* only drag if this is really a press */
       if (EVENT_TYPE(lisp_event) != button_press_event)
@@ -1866,7 +1872,9 @@
 #endif
 
   if (STRINGP (f->name))
-    GET_C_STRING_CTEXT_DATA_ALLOCA (f->name, name);
+    TO_EXTERNAL_FORMAT (LISP_STRING, f->name,
+			C_STRING_ALLOCA, name,
+			Qctext);
   else
     name = "emacs";
 
@@ -2664,7 +2672,7 @@
 #else
   XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
   /* make sure the windows are really gone! */
-  /* ### Is this REALLY necessary? */
+  /* #### Is this REALLY necessary? */
   XFlush (dpy);
 #endif /* EXTERNAL_WIDGET */