diff src/xsmfns.c @ 112434:9de5a68b57e1

Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 22 Jan 2011 18:56:06 -0800
parents 42e22c4f06b7
children
line wrap: on
line diff
--- a/src/xsmfns.c	Sat Jan 22 17:09:09 2011 -0800
+++ b/src/xsmfns.c	Sat Jan 22 18:56:06 2011 -0800
@@ -39,9 +39,6 @@
 #include "termopts.h"
 #include "xterm.h"
 
-/* Avoid "differ in sign" warnings */
-#define SSDATA(x)  ((char *) SDATA (x))
-
 /* This is the event used when SAVE_SESSION_EVENT occurs.  */
 
 static struct input_event emacs_event;
@@ -232,7 +229,7 @@
   props[props_idx]->vals[2].value = NOSPLASH_OPT;
 
   cwd = get_current_dir_name ();
-  if (cwd) 
+  if (cwd)
     {
       chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1);
       strcpy (chdir_opt, CHDIR_OPT);
@@ -394,8 +391,8 @@
                            -1, -1, 1, 1,
                            CopyFromParent, CopyFromParent, CopyFromParent);
 
-  class_hints.res_name = (char *) SDATA (Vx_resource_name);
-  class_hints.res_class = (char *) SDATA (Vx_resource_class);
+  class_hints.res_name = SSDATA (Vx_resource_name);
+  class_hints.res_class = SSDATA (Vx_resource_class);
   XSetClassHint (dpyinfo->display, w, &class_hints);
   XStoreName (dpyinfo->display, w, class_hints.res_name);
 
@@ -537,10 +534,10 @@
       SmcCloseConnection (smc_conn, 0, 0);
       ice_connection_closed ();
     }
-  
+
   return Qnil;
 }
-  
+
 
 
 /***********************************************************************
@@ -584,4 +581,3 @@
 }
 
 #endif /* HAVE_X_SM */
-