Use SSDATA when the context wants char *.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Jan 2011 22:17:44 +0000 (14:17 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Jan 2011 22:17:44 +0000 (14:17 -0800)
* alloc.c, buffer.c, bytecode.c, callproc.c, dired.c:
* dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c:
* fns.c, font.c, frame.c, image.c, indent.c, keyboard.c:
* lread.c, minibuf.c, print.c, process.c, search.c, widget.c:
* xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c:
Use SSDATA (not SDATA) when the context of the expression wants
char * (not unsigned char *).

30 files changed:
src/ChangeLog
src/alloc.c
src/buffer.c
src/bytecode.c
src/callproc.c
src/dired.c
src/dispnew.c
src/doc.c
src/editfns.c
src/emacs.c
src/fileio.c
src/filelock.c
src/fns.c
src/font.c
src/frame.c
src/image.c
src/indent.c
src/keyboard.c
src/lread.c
src/minibuf.c
src/print.c
src/process.c
src/search.c
src/widget.c
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xml.c
src/xselect.c
src/xterm.c

index 50a7a21..aea3d94 100644 (file)
@@ -1,3 +1,14 @@
+2011-01-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use SSDATA when the context wants char *.
+       * alloc.c, buffer.c, bytecode.c, callproc.c, dired.c:
+       * dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c:
+       * fns.c, font.c, frame.c, image.c, indent.c, keyboard.c:
+       * lread.c, minibuf.c, print.c, process.c, search.c, widget.c:
+       * xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c:
+       Use SSDATA (not SDATA) when the context of the expression wants
+       char * (not unsigned char *).
+
 2011-01-30  Andreas Schwab  <schwab@linux-m68k.org>
 
        * font.c (PROP_MATCH): Remove parameter N and use strlen instead.
index d5c9f30..67d34d2 100644 (file)
@@ -4756,7 +4756,7 @@ Does not copy symbols.  Copies strings without text properties.  */)
   else if (FLOATP (obj))
     obj = make_pure_float (XFLOAT_DATA (obj));
   else if (STRINGP (obj))
-    obj = make_pure_string (SDATA (obj), SCHARS (obj),
+    obj = make_pure_string (SSDATA (obj), SCHARS (obj),
                            SBYTES (obj),
                            STRING_MULTIBYTE (obj));
   else if (COMPILEDP (obj) || VECTORP (obj))
@@ -6276,4 +6276,3 @@ The time is in seconds as a floating point value.  */);
   defsubr (&Sgc_status);
 #endif
 }
-
index 9b036a1..2c6eb7b 100644 (file)
@@ -1638,7 +1638,7 @@ the current buffer's major mode.  */)
   CHECK_BUFFER (buffer);
 
   if (STRINGP (XBUFFER (buffer)->name)
-      && strcmp (SDATA (XBUFFER (buffer)->name), "*scratch*") == 0)
+      && strcmp (SSDATA (XBUFFER (buffer)->name), "*scratch*") == 0)
     function = find_symbol_value (intern ("initial-major-mode"));
   else
     {
@@ -5229,7 +5229,7 @@ init_buffer (void)
         because of the ange-ftp completion handler.
         However, it is not necessary to turn / into /:/.
         So avoid doing that.  */
-      && strcmp ("/", SDATA (current_buffer->directory)))
+      && strcmp ("/", SSDATA (current_buffer->directory)))
     current_buffer->directory
       = concat2 (build_string ("/:"), current_buffer->directory);
 
@@ -6208,4 +6208,3 @@ keys_of_buffer (void)
      initialized when that function gets called.  */
   Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt);
 }
-
index 038050c..fd2680e 100644 (file)
@@ -871,7 +871,7 @@ If the third argument is incorrect, Emacs may crash.  */)
        case Btemp_output_buffer_setup:
          BEFORE_POTENTIAL_GC ();
          CHECK_STRING (TOP);
-         temp_output_buffer_setup (SDATA (TOP));
+         temp_output_buffer_setup (SSDATA (TOP));
          AFTER_POTENTIAL_GC ();
          TOP = Vstandard_output;
          break;
@@ -1709,4 +1709,3 @@ integer, it is incremented each time that symbol's function is called.  */);
   }
 #endif
 }
-
index 8ce8002..09d0ca5 100644 (file)
@@ -349,7 +349,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
 
   display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]);
 
-  filefd = emacs_open (SDATA (infile), O_RDONLY, 0);
+  filefd = emacs_open (SSDATA (infile), O_RDONLY, 0);
   if (filefd < 0)
     {
       infile = DECODE_FILE (infile);
@@ -465,11 +465,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
     else if (STRINGP (error_file))
       {
 #ifdef DOS_NT
-       fd_error = emacs_open (SDATA (error_file),
+       fd_error = emacs_open (SSDATA (error_file),
                               O_WRONLY | O_TRUNC | O_CREAT | O_TEXT,
                               S_IREAD | S_IWRITE);
 #else  /* not DOS_NT */
-       fd_error = creat (SDATA (error_file), 0666);
+       fd_error = creat (SSDATA (error_file), 0666);
 #endif /* not DOS_NT */
       }
 
@@ -1079,7 +1079,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
          CONSP (tem) && STRINGP (XCAR (tem));
          tem = XCDR (tem))
       {
-       if (strncmp (SDATA (XCAR (tem)), "DISPLAY", 7) == 0
+       if (strncmp (SSDATA (XCAR (tem)), "DISPLAY", 7) == 0
            && (SDATA (XCAR (tem)) [7] == '\0'
                || SDATA (XCAR (tem)) [7] == '='))
          /* DISPLAY is specified in process-environment.  */
@@ -1111,10 +1111,10 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
 
     if (STRINGP (display))
       {
-       int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1;
+       int vlen = strlen ("DISPLAY=") + strlen (SSDATA (display)) + 1;
        char *vdata = (char *) alloca (vlen);
        strcpy (vdata, "DISPLAY=");
-       strcat (vdata, SDATA (display));
+       strcat (vdata, SSDATA (display));
        new_env = add_env (env, new_env, vdata);
       }
 
@@ -1122,7 +1122,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
     for (tem = Vprocess_environment;
         CONSP (tem) && STRINGP (XCAR (tem));
         tem = XCDR (tem))
-      new_env = add_env (env, new_env, SDATA (XCAR (tem)));
+      new_env = add_env (env, new_env, SSDATA (XCAR (tem)));
 
     *new_env = 0;
 
@@ -1340,13 +1340,13 @@ If optional parameter ENV is a list, then search this list instead of
   CHECK_STRING (variable);
   if (CONSP (env))
     {
-      if (getenv_internal_1 (SDATA (variable), SBYTES (variable),
+      if (getenv_internal_1 (SSDATA (variable), SBYTES (variable),
                             &value, &valuelen, env))
        return value ? make_string (value, valuelen) : Qt;
       else
        return Qnil;
     }
-  else if (getenv_internal (SDATA (variable), SBYTES (variable),
+  else if (getenv_internal (SSDATA (variable), SBYTES (variable),
                            &value, &valuelen, env))
     return make_string (value, valuelen);
   else
@@ -1459,13 +1459,13 @@ init_callproc (void)
 #endif
     {
       tempdir = Fdirectory_file_name (Vexec_directory);
-      if (access (SDATA (tempdir), 0) < 0)
+      if (access (SSDATA (tempdir), 0) < 0)
        dir_warning ("Warning: arch-dependent data dir (%s) does not exist.\n",
                     Vexec_directory);
     }
 
   tempdir = Fdirectory_file_name (Vdata_directory);
-  if (access (SDATA (tempdir), 0) < 0)
+  if (access (SSDATA (tempdir), 0) < 0)
     dir_warning ("Warning: arch-independent data dir (%s) does not exist.\n",
                 Vdata_directory);
 
index 0f1b07a..08aa230 100644 (file)
@@ -176,7 +176,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m
      which might compile a new regexp until we're done with the loop!  */
 
   BLOCK_INPUT;
-  d = opendir (SDATA (dirfilename));
+  d = opendir (SSDATA (dirfilename));
   UNBLOCK_INPUT;
   if (d == NULL)
     report_file_error ("Opening directory", Fcons (directory, Qnil));
@@ -258,7 +258,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m
          QUIT;
 
          if (NILP (match)
-             || (0 <= re_search (bufp, SDATA (name), len, 0, len, 0)))
+             || (0 <= re_search (bufp, SSDATA (name), len, 0, len, 0)))
            wanted = 1;
 
          immediate_quit = 0;
@@ -498,7 +498,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v
   encoded_dir = ENCODE_FILE (dirname);
 
   BLOCK_INPUT;
-  d = opendir (SDATA (Fdirectory_file_name (encoded_dir)));
+  d = opendir (SSDATA (Fdirectory_file_name (encoded_dir)));
   UNBLOCK_INPUT;
   if (!d)
     report_file_error ("Opening directory", Fcons (dirname, Qnil));
@@ -970,7 +970,7 @@ so last access time will always be midnight of that day.  */)
   encoded = ENCODE_FILE (filename);
   UNGCPRO;
 
-  if (lstat (SDATA (encoded), &s) < 0)
+  if (lstat (SSDATA (encoded), &s) < 0)
     return Qnil;
 
   switch (s.st_mode & S_IFMT)
@@ -1099,4 +1099,3 @@ It ignores directory names if they match any string in this list which
 ends in a slash.  */);
   Vcompletion_ignored_extensions = Qnil;
 }
-
index 8980e6a..1aef70f 100644 (file)
@@ -5849,7 +5849,7 @@ FILE = nil means just close any termscript file currently open.  */)
   if (! NILP (file))
     {
       file = Fexpand_file_name (file, Qnil);
-      tty->termscript = fopen (SDATA (file), "w");
+      tty->termscript = fopen (SSDATA (file), "w");
       if (tty->termscript == 0)
        report_file_error ("Opening termscript", Fcons (file, Qnil));
     }
index 6e53545..b47bf81 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -120,8 +120,8 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
       if (minsize < 8)
        minsize = 8;
       name = (char *) alloca (minsize + SCHARS (file) + 8);
-      strcpy (name, SDATA (Vdoc_directory));
-      strcat (name, SDATA (file));
+      strcpy (name, SSDATA (Vdoc_directory));
+      strcat (name, SSDATA (file));
     }
   else
     {
@@ -137,7 +137,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
          /* Preparing to dump; DOC file is probably not installed.
             So check in ../etc. */
          strcpy (name, "../etc/");
-         strcat (name, SDATA (file));
+         strcat (name, SSDATA (file));
 
          fd = emacs_open (name, O_RDONLY, 0);
        }
@@ -559,9 +559,9 @@ the same file name is found in the `doc-directory'.  */)
       CHECK_STRING (Vdoc_directory);
       name = (char *) alloca (SCHARS (filename)
                          + SCHARS (Vdoc_directory) + 1);
-      strcpy (name, SDATA (Vdoc_directory));
+      strcpy (name, SSDATA (Vdoc_directory));
     }
-  strcat (name, SDATA (filename));     /*** Add this line ***/
+  strcat (name, SSDATA (filename));    /*** Add this line ***/
 
   /* Vbuild_files is nil when temacs is run, and non-nil after that.  */
   if (NILP (Vbuild_files))
index 5407cd7..a5f3987 100644 (file)
@@ -1345,7 +1345,7 @@ name, or nil if there is no such user.  */)
   else if (STRINGP (uid))
     {
       BLOCK_INPUT;
-      pw = (struct passwd *) getpwnam (SDATA (uid));
+      pw = (struct passwd *) getpwnam (SSDATA (uid));
       UNBLOCK_INPUT;
     }
   else
@@ -1372,7 +1372,7 @@ name, or nil if there is no such user.  */)
       r = (unsigned char *) alloca (strlen (p) + SCHARS (login) + 1);
       memcpy (r, p, q - p);
       r[q - p] = 0;
-      strcat (r, SDATA (login));
+      strcat (r, SSDATA (login));
       r[q - p] = UPCASE (r[q - p]);
       strcat (r, q + 1);
       full = build_string (r);
@@ -1680,7 +1680,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z".  */)
 
       buf[0] = '\1';
       BLOCK_INPUT;
-      result = emacs_memftimeu (buf, size, SDATA (format_string),
+      result = emacs_memftimeu (buf, size, SSDATA (format_string),
                                SBYTES (format_string),
                                tm, ut);
       UNBLOCK_INPUT;
@@ -1691,7 +1691,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z".  */)
       /* If buffer was too small, make it bigger and try again.  */
       BLOCK_INPUT;
       result = emacs_memftimeu (NULL, (size_t) -1,
-                               SDATA (format_string),
+                               SSDATA (format_string),
                                SBYTES (format_string),
                                tm, ut);
       UNBLOCK_INPUT;
index ae3c318..e696c82 100644 (file)
@@ -755,8 +755,8 @@ main (int argc, char **argv)
            }
          else
            {
-             version = SDATA (tem);
-             copyright = SDATA (tem2);
+             version = SSDATA (tem);
+             copyright = SSDATA (tem2);
            }
        }
       else
@@ -1988,7 +1988,7 @@ all of which are called before Emacs is actually killed.  */)
      kill it because we are exiting Emacs deliberately (not crashing).
      Do it after shut_down_emacs, which does an auto-save.  */
   if (STRINGP (Vauto_save_list_file_name))
-    unlink (SDATA (Vauto_save_list_file_name));
+    unlink (SSDATA (Vauto_save_list_file_name));
 
   exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS);
 }
@@ -2169,7 +2169,7 @@ You must run Emacs in batch mode in order to dump it.  */)
 #ifdef USE_MMAP_FOR_BUFFERS
   mmap_set_vars (0);
 #endif
-  unexec (SDATA (filename), !NILP (symfile) ? SDATA (symfile) : 0);
+  unexec (SSDATA (filename), !NILP (symfile) ? SSDATA (symfile) : 0);
 #ifdef USE_MMAP_FOR_BUFFERS
   mmap_set_vars (1);
 #endif
index 84e32a6..3c61ee5 100644 (file)
@@ -500,7 +500,7 @@ For a Unix-syntax file name, just appends a slash.  */)
     return call2 (handler, Qfile_name_as_directory, file);
 
   buf = (char *) alloca (SBYTES (file) + 10);
-  file_name_as_directory (buf, SDATA (file));
+  file_name_as_directory (buf, SSDATA (file));
   return make_specified_string (buf, -1, strlen (buf),
                                STRING_MULTIBYTE (file));
 }
@@ -559,7 +559,7 @@ In Unix-syntax, this function just removes the final slash.  */)
     return call2 (handler, Qdirectory_file_name, directory);
 
   buf = (char *) alloca (SBYTES (directory) + 20);
-  directory_file_name (SDATA (directory), buf);
+  directory_file_name (SSDATA (directory), buf);
   return make_specified_string (buf, -1, strlen (buf),
                                STRING_MULTIBYTE (directory));
 }
@@ -935,7 +935,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
 #ifdef WINDOWSNT
          if (IS_DIRECTORY_SEP (nm[1]))
            {
-             if (strcmp (nm, SDATA (name)) != 0)
+             if (strcmp (nm, SSDATA (name)) != 0)
                name = make_specified_string (nm, -1, strlen (nm), multibyte);
            }
          else
@@ -951,7 +951,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
            }
          return name;
 #else /* not DOS_NT */
-         if (strcmp (nm, SDATA (name)) == 0)
+         if (strcmp (nm, SSDATA (name)) == 0)
            return name;
          return make_specified_string (nm, -1, strlen (nm), multibyte);
 #endif /* not DOS_NT */
@@ -1685,13 +1685,13 @@ those `/' is discarded.  */)
            orig = make_unibyte_string (o, orig_length);
            decoded = DECODE_FILE (orig);
            decoded_length = SBYTES (decoded);
-           strncpy (x, SDATA (decoded), decoded_length);
+           strncpy (x, SSDATA (decoded), decoded_length);
            x += decoded_length;
 
            /* If environment variable needed decoding, return value
               needs to be multibyte.  */
            if (decoded_length != orig_length
-               || strncmp (SDATA (decoded), o, orig_length))
+               || strncmp (SSDATA (decoded), o, orig_length))
              multibyte = 1;
          }
       }
@@ -1761,7 +1761,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, const unsigned char *querystr
 
   /* stat is a good way to tell whether the file exists,
      regardless of what access permissions it has.  */
-  if (lstat (SDATA (encoded_filename), &statbuf) >= 0)
+  if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
     {
       if (! interactive)
        xsignal2 (Qfile_already_exists,
@@ -1859,7 +1859,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME.  */)
       || INTEGERP (ok_if_already_exists))
     barf_or_query_if_file_exists (newname, "copy to it",
                                  INTEGERP (ok_if_already_exists), &out_st, 0);
-  else if (stat (SDATA (encoded_newname), &out_st) < 0)
+  else if (stat (SSDATA (encoded_newname), &out_st) < 0)
     out_st.st_mode = 0;
 
 #ifdef WINDOWSNT
@@ -1892,7 +1892,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME.  */)
     }
 #else /* not WINDOWSNT */
   immediate_quit = 1;
-  ifd = emacs_open (SDATA (encoded_file), O_RDONLY, 0);
+  ifd = emacs_open (SSDATA (encoded_file), O_RDONLY, 0);
   immediate_quit = 0;
 
   if (ifd < 0)
@@ -1942,7 +1942,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME.  */)
                    | (NILP (ok_if_already_exists) ? O_EXCL : 0),
                    S_IREAD | S_IWRITE);
 #else  /* not MSDOS */
-  ofd = emacs_open (SDATA (encoded_newname),
+  ofd = emacs_open (SSDATA (encoded_newname),
                    O_WRONLY | O_TRUNC | O_CREAT
                    | (NILP (ok_if_already_exists) ? O_EXCL : 0),
                    0666);
@@ -1993,7 +1993,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME.  */)
          EMACS_TIME atime, mtime;
          EMACS_SET_SECS_USECS (atime, st.st_atime, 0);
          EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
-         if (set_file_times (SDATA (encoded_newname),
+         if (set_file_times (SSDATA (encoded_newname),
                              atime, mtime))
            xsignal2 (Qfile_date_error,
                      build_string ("Cannot set file date"), newname);
@@ -2109,7 +2109,7 @@ With a prefix argument, TRASH is nil.  */)
 
   encoded_file = ENCODE_FILE (filename);
 
-  if (0 > unlink (SDATA (encoded_file)))
+  if (0 > unlink (SSDATA (encoded_file)))
     report_file_error ("Removing old name", list1 (filename));
   return Qnil;
 }
@@ -2190,7 +2190,7 @@ This is what happens in interactive use with M-x.  */)
       || INTEGERP (ok_if_already_exists))
     barf_or_query_if_file_exists (newname, "rename to it",
                                  INTEGERP (ok_if_already_exists), 0, 0);
-  if (0 > rename (SDATA (encoded_file), SDATA (encoded_newname)))
+  if (0 > rename (SSDATA (encoded_file), SSDATA (encoded_newname)))
     {
       if (errno == EXDEV)
        {
@@ -2277,8 +2277,8 @@ This is what happens in interactive use with M-x.  */)
     barf_or_query_if_file_exists (newname, "make it a new name",
                                  INTEGERP (ok_if_already_exists), 0, 0);
 
-  unlink (SDATA (newname));
-  if (0 > link (SDATA (encoded_file), SDATA (encoded_newname)))
+  unlink (SSDATA (newname));
+  if (0 > link (SSDATA (encoded_file), SSDATA (encoded_newname)))
     report_file_error ("Adding new name", list2 (file, newname));
 
   UNGCPRO;
@@ -2336,15 +2336,15 @@ This happens for interactive use with M-x.  */)
       || INTEGERP (ok_if_already_exists))
     barf_or_query_if_file_exists (linkname, "make it a link",
                                  INTEGERP (ok_if_already_exists), 0, 0);
-  if (0 > symlink (SDATA (encoded_filename),
-                  SDATA (encoded_linkname)))
+  if (0 > symlink (SSDATA (encoded_filename),
+                  SSDATA (encoded_linkname)))
     {
       /* If we didn't complain already, silently delete existing file.  */
       if (errno == EEXIST)
        {
-         unlink (SDATA (encoded_linkname));
-         if (0 <= symlink (SDATA (encoded_filename),
-                           SDATA (encoded_linkname)))
+         unlink (SSDATA (encoded_linkname));
+         if (0 <= symlink (SSDATA (encoded_filename),
+                           SSDATA (encoded_linkname)))
            {
              UNGCPRO;
              return Qnil;
@@ -2444,7 +2444,7 @@ Use `file-symlink-p' to test for such links.  */)
 
   absname = ENCODE_FILE (absname);
 
-  return (stat (SDATA (absname), &statbuf) >= 0) ? Qt : Qnil;
+  return (stat (SSDATA (absname), &statbuf) >= 0) ? Qt : Qnil;
 }
 
 DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0,
@@ -2466,7 +2466,7 @@ For a directory, this means you can access files in that directory.  */)
 
   absname = ENCODE_FILE (absname);
 
-  return (check_executable (SDATA (absname)) ? Qt : Qnil);
+  return (check_executable (SSDATA (absname)) ? Qt : Qnil);
 }
 
 DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0,
@@ -2503,13 +2503,13 @@ See also `file-exists-p' and `file-attributes'.  */)
   /* Opening a fifo without O_NONBLOCK can wait.
      We don't want to wait.  But we don't want to mess wth O_NONBLOCK
      except in the case of a fifo, on a system which handles it.  */
-  desc = stat (SDATA (absname), &statbuf);
+  desc = stat (SSDATA (absname), &statbuf);
   if (desc < 0)
     return Qnil;
   if (S_ISFIFO (statbuf.st_mode))
     flags |= O_NONBLOCK;
 #endif
-  desc = emacs_open (SDATA (absname), flags, 0);
+  desc = emacs_open (SSDATA (absname), flags, 0);
   if (desc < 0)
     return Qnil;
   emacs_close (desc);
@@ -2537,8 +2537,8 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
     return call2 (handler, Qfile_writable_p, absname);
 
   encoded = ENCODE_FILE (absname);
-  if (stat (SDATA (encoded), &statbuf) >= 0)
-    return (check_writable (SDATA (encoded))
+  if (stat (SSDATA (encoded), &statbuf) >= 0)
+    return (check_writable (SSDATA (encoded))
            ? Qt : Qnil);
 
   dir = Ffile_name_directory (absname);
@@ -2583,9 +2583,9 @@ If there is no error, returns nil.  */)
 
   encoded_filename = ENCODE_FILE (absname);
 
-  fd = emacs_open (SDATA (encoded_filename), O_RDONLY, 0);
+  fd = emacs_open (SSDATA (encoded_filename), O_RDONLY, 0);
   if (fd < 0)
-    report_file_error (SDATA (string), Fcons (filename, Qnil));
+    report_file_error (SSDATA (string), Fcons (filename, Qnil));
   emacs_close (fd);
 
   return Qnil;
@@ -2629,7 +2629,7 @@ points to a nonexistent file.  */)
       memset (buf, 0, bufsize);
 
       errno = 0;
-      valsize = readlink (SDATA (filename), buf, bufsize);
+      valsize = readlink (SSDATA (filename), buf, bufsize);
       if (valsize == -1)
        {
 #ifdef ERANGE
@@ -2678,7 +2678,7 @@ See `file-symlink-p' to distinguish symlinks.  */)
 
   absname = ENCODE_FILE (absname);
 
-  if (stat (SDATA (absname), &st) < 0)
+  if (stat (SSDATA (absname), &st) < 0)
     return Qnil;
   return (st.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
 }
@@ -2746,7 +2746,7 @@ See `file-symlink-p' to distinguish symlinks.  */)
     return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
   }
 #else
-  if (stat (SDATA (absname), &st) < 0)
+  if (stat (SSDATA (absname), &st) < 0)
     return Qnil;
   return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
 #endif
@@ -2903,7 +2903,7 @@ Return nil, if file does not exist or is not accessible.  */)
 
   absname = ENCODE_FILE (absname);
 
-  if (stat (SDATA (absname), &st) < 0)
+  if (stat (SSDATA (absname), &st) < 0)
     return Qnil;
 
   return make_number (st.st_mode & 07777);
@@ -2933,7 +2933,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils.  */)
 
   encoded_absname = ENCODE_FILE (absname);
 
-  if (chmod (SDATA (encoded_absname), XINT (mode)) < 0)
+  if (chmod (SSDATA (encoded_absname), XINT (mode)) < 0)
     report_file_error ("Doing chmod", Fcons (absname, Qnil));
 
   return Qnil;
@@ -3000,7 +3000,7 @@ Use the current time if TIME is nil.  TIME is in the format of
     EMACS_SET_SECS (t, sec);
     EMACS_SET_USECS (t, usec);
 
-    if (set_file_times (SDATA (encoded_absname), t, t))
+    if (set_file_times (SSDATA (encoded_absname), t, t))
       {
 #ifdef DOS_NT
         struct stat st;
@@ -3063,12 +3063,12 @@ otherwise, if FILE2 does not exist, the answer is t.  */)
   absname2 = ENCODE_FILE (absname2);
   UNGCPRO;
 
-  if (stat (SDATA (absname1), &st) < 0)
+  if (stat (SSDATA (absname1), &st) < 0)
     return Qnil;
 
   mtime1 = st.st_mtime;
 
-  if (stat (SDATA (absname2), &st) < 0)
+  if (stat (SSDATA (absname2), &st) < 0)
     return Qt;
 
   return (mtime1 > st.st_mtime) ? Qt : Qnil;
@@ -3250,12 +3250,12 @@ variable `last-coding-system-used' to the coding system actually used.  */)
 
     /* Tell stat to use expensive method to get accurate info.  */
     Vw32_get_true_file_attributes = Qt;
-    total = stat (SDATA (filename), &st);
+    total = stat (SSDATA (filename), &st);
     Vw32_get_true_file_attributes = tem;
   }
   if (total < 0)
 #else
-  if (stat (SDATA (filename), &st) < 0)
+  if (stat (SSDATA (filename), &st) < 0)
 #endif /* WINDOWSNT */
     {
       if (fd >= 0) emacs_close (fd);
@@ -3287,7 +3287,7 @@ variable `last-coding-system-used' to the coding system actually used.  */)
 #endif
 
   if (fd < 0)
-    if ((fd = emacs_open (SDATA (filename), O_RDONLY, 0)) < 0)
+    if ((fd = emacs_open (SSDATA (filename), O_RDONLY, 0)) < 0)
       goto badopen;
 
   /* Replacement should preserve point as it preserves markers.  */
@@ -4975,8 +4975,8 @@ e_write (int desc, Lisp_Object string, int start, int end, struct coding_system
          coding->produced -=
            emacs_write (desc,
                         STRINGP (coding->dst_object)
-                        ? SDATA (coding->dst_object)
-                        : BYTE_POS_ADDR (coding->dst_pos_byte),
+                        ? SSDATA (coding->dst_object)
+                        : (char *) BYTE_POS_ADDR (coding->dst_pos_byte),
                         coding->produced);
 
          if (coding->produced)
@@ -5021,7 +5021,7 @@ See Info node `(elisp)Modification Time' for more details.  */)
 
   filename = ENCODE_FILE (b->filename);
 
-  if (stat (SDATA (filename), &st) < 0)
+  if (stat (SSDATA (filename), &st) < 0)
     {
       /* If the file doesn't exist now and didn't exist before,
         we say that it isn't modified, provided the error is a tame one.  */
@@ -5098,7 +5098,7 @@ An argument specifies the modification time value to use
 
       filename = ENCODE_FILE (filename);
 
-      if (stat (SDATA (filename), &st) >= 0)
+      if (stat (SSDATA (filename), &st) >= 0)
         {
          current_buffer->modtime = st.st_mtime;
           current_buffer->modtime_size = st.st_size;
@@ -5155,7 +5155,7 @@ auto_save_1 (void)
   /* Get visited file's mode to become the auto save file's mode.  */
   if (! NILP (current_buffer->filename))
     {
-      if (stat (SDATA (current_buffer->filename), &st) >= 0)
+      if (stat (SSDATA (current_buffer->filename), &st) >= 0)
        /* But make sure we can overwrite it later!  */
        auto_save_mode_bits = st.st_mode | 0600;
       else if ((modes = Ffile_modes (current_buffer->filename),
@@ -5278,7 +5278,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.  */)
          UNGCPRO;
        }
 
-      stream = fopen (SDATA (listfile), "w");
+      stream = fopen (SSDATA (listfile), "w");
     }
 
   record_unwind_protect (do_auto_save_unwind,
index c23a9fe..8fa871f 100644 (file)
@@ -214,9 +214,9 @@ get_boot_time (void)
 
       if (! NILP (filename))
        {
-         get_boot_time_1 (SDATA (filename), 1);
+         get_boot_time_1 (SSDATA (filename), 1);
          if (delete_flag)
-           unlink (SDATA (filename));
+           unlink (SSDATA (filename));
        }
     }
 
@@ -315,7 +315,7 @@ fill_in_lock_file_name (register char *lockfile, register Lisp_Object fn)
   struct stat st;
   int count = 0;
 
-  strcpy (lockfile, SDATA (fn));
+  strcpy (lockfile, SSDATA (fn));
 
   /* Shift the nondirectory part of the file name (including the null)
      right two characters.  Here is one of the places where we'd have to
@@ -475,7 +475,7 @@ current_lock_owner (lock_info_type *owner, char *lfname)
 
   /* On current host?  */
   if (STRINGP (Fsystem_name ())
-      && strcmp (owner->host, SDATA (Fsystem_name ())) == 0)
+      && strcmp (owner->host, SSDATA (Fsystem_name ())) == 0)
     {
       if (owner->pid == getpid ())
         ret = 2; /* We own it.  */
index 218f089..e2853c2 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -908,7 +908,7 @@ string_to_multibyte (Lisp_Object string)
   /* If all the chars are ASCII, they won't need any more bytes once
      converted.  */
   if (nbytes == SBYTES (string))
-    return make_multibyte_string (SDATA (string), nbytes, nbytes);
+    return make_multibyte_string (SSDATA (string), nbytes, nbytes);
 
   SAFE_ALLOCA (buf, unsigned char *, nbytes);
   memcpy (buf, SDATA (string), SBYTES (string));
@@ -1171,7 +1171,7 @@ value is a new vector that contains the elements between index FROM
 
   if (STRINGP (string))
     {
-      res = make_specified_string (SDATA (string) + from_byte,
+      res = make_specified_string (SSDATA (string) + from_byte,
                                   to_char - from_char, to_byte - from_byte,
                                   STRING_MULTIBYTE (string));
       copy_text_properties (make_number (from_char), make_number (to_char),
@@ -1235,7 +1235,7 @@ With one argument, just copy STRING without its properties.  */)
     args_out_of_range_3 (string, make_number (from_char),
                         make_number (to_char));
 
-  return make_specified_string (SDATA (string) + from_byte,
+  return make_specified_string (SSDATA (string) + from_byte,
                                to_char - from_char, to_byte - from_byte,
                                STRING_MULTIBYTE (string));
 }
@@ -1266,7 +1266,7 @@ substring_both (Lisp_Object string, EMACS_INT from, EMACS_INT from_byte,
 
   if (STRINGP (string))
     {
-      res = make_specified_string (SDATA (string) + from_byte,
+      res = make_specified_string (SSDATA (string) + from_byte,
                                   to - from, to_byte - from_byte,
                                   STRING_MULTIBYTE (string));
       copy_text_properties (make_number (from), make_number (to),
@@ -2496,12 +2496,12 @@ is nil, and `use-dialog-box' is non-nil.  */)
       ans = Fdowncase (Fread_from_minibuffer (prompt, Qnil, Qnil, Qnil,
                                              Qyes_or_no_p_history, Qnil,
                                              Qnil));
-      if (SCHARS (ans) == 3 && !strcmp (SDATA (ans), "yes"))
+      if (SCHARS (ans) == 3 && !strcmp (SSDATA (ans), "yes"))
        {
          UNGCPRO;
          return Qt;
        }
-      if (SCHARS (ans) == 2 && !strcmp (SDATA (ans), "no"))
+      if (SCHARS (ans) == 2 && !strcmp (SSDATA (ans), "no"))
        {
          UNGCPRO;
          return Qnil;
@@ -3038,7 +3038,7 @@ into shorter lines.  */)
   /* We need to allocate enough room for decoding the text. */
   SAFE_ALLOCA (encoded, char *, allength);
 
-  encoded_length = base64_encode_1 (SDATA (string),
+  encoded_length = base64_encode_1 (SSDATA (string),
                                    encoded, length, NILP (no_line_break),
                                    STRING_MULTIBYTE (string));
   if (encoded_length > allength)
@@ -3233,7 +3233,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string,
   SAFE_ALLOCA (decoded, char *, length);
 
   /* The decoded result should be unibyte. */
-  decoded_length = base64_decode_1 (SDATA (string), decoded, length,
+  decoded_length = base64_decode_1 (SSDATA (string), decoded, length,
                                    0, NULL);
   if (decoded_length > length)
     abort ();
@@ -4745,7 +4745,7 @@ guesswork fails.  Normally, an error is signaled in such case.  */)
        object = code_convert_string (object, coding_system, Qnil, 1, 0, 0);
     }
 
-  md5_buffer (SDATA (object) + start_byte,
+  md5_buffer (SSDATA (object) + start_byte,
              SBYTES (object) - (size_byte - end_byte),
              digest);
 
@@ -4936,4 +4936,3 @@ void
 init_fns (void)
 {
 }
-
index 58d8dc9..9072715 100644 (file)
@@ -3591,7 +3591,7 @@ font_filter_properties (Lisp_Object font,
       {
         Lisp_Object key = XCAR (XCAR (it));
         Lisp_Object val = XCDR (XCAR (it));
-        char *keystr = SDATA (SYMBOL_NAME (key));
+        char *keystr = SSDATA (SYMBOL_NAME (key));
 
         if (strcmp (boolean_properties[i], keystr) == 0)
           {
@@ -3616,7 +3616,7 @@ font_filter_properties (Lisp_Object font,
       {
         Lisp_Object key = XCAR (XCAR (it));
         Lisp_Object val = XCDR (XCAR (it));
-        char *keystr = SDATA (SYMBOL_NAME (key));
+        char *keystr = SSDATA (SYMBOL_NAME (key));
         if (strcmp (non_boolean_properties[i], keystr) == 0)
           Ffont_put (font, key, val);
       }
index 961c42c..20bad4c 100644 (file)
@@ -693,7 +693,7 @@ affects all frames on the same terminal device.  */)
       if (!NILP (tty))
         {
           name = (char *) alloca (SBYTES (tty) + 1);
-          strncpy (name, SDATA (tty), SBYTES (tty));
+          strncpy (name, SSDATA (tty), SBYTES (tty));
           name[SBYTES (tty)] = 0;
         }
 
@@ -704,7 +704,7 @@ affects all frames on the same terminal device.  */)
       if (!NILP (tty_type))
         {
           type = (char *) alloca (SBYTES (tty_type) + 1);
-          strncpy (type, SDATA (tty_type), SBYTES (tty_type));
+          strncpy (type, SSDATA (tty_type), SBYTES (tty_type));
           type[SBYTES (tty_type)] = 0;
         }
 
@@ -2176,7 +2176,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
 
       /* Check for no change needed in this very common case
         before we do any consing.  */
-      if (frame_name_fnn_p (SDATA (f->name),
+      if (frame_name_fnn_p (SSDATA (f->name),
                            SBYTES (f->name)))
        return;
 
@@ -2194,7 +2194,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
 
       /* Don't allow the user to set the frame name to F<num>, so it
         doesn't clash with the names we generate for terminal frames.  */
-      if (frame_name_fnn_p (SDATA (name), SBYTES (name)))
+      if (frame_name_fnn_p (SSDATA (name), SBYTES (name)))
        error ("Frame names of the form F<num> are usurped by Emacs");
     }
 
@@ -2321,11 +2321,11 @@ If FRAME is omitted, return information on the currently selected frame.  */)
       elt = Fassq (Qforeground_color, alist);
       if (CONSP (elt) && STRINGP (XCDR (elt)))
        {
-         if (strncmp (SDATA (XCDR (elt)),
+         if (strncmp (SSDATA (XCDR (elt)),
                       unspecified_bg,
                       SCHARS (XCDR (elt))) == 0)
            store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg));
-         else if (strncmp (SDATA (XCDR (elt)),
+         else if (strncmp (SSDATA (XCDR (elt)),
                            unspecified_fg,
                            SCHARS (XCDR (elt))) == 0)
            store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg));
@@ -2335,11 +2335,11 @@ If FRAME is omitted, return information on the currently selected frame.  */)
       elt = Fassq (Qbackground_color, alist);
       if (CONSP (elt) && STRINGP (XCDR (elt)))
        {
-         if (strncmp (SDATA (XCDR (elt)),
+         if (strncmp (SSDATA (XCDR (elt)),
                       unspecified_fg,
                       SCHARS (XCDR (elt))) == 0)
            store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg));
-         else if (strncmp (SDATA (XCDR (elt)),
+         else if (strncmp (SSDATA (XCDR (elt)),
                            unspecified_bg,
                            SCHARS (XCDR (elt))) == 0)
            store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg));
@@ -2428,7 +2428,7 @@ If FRAME is nil, describe the currently selected frame.  */)
 
                  if (EQ (parameter, Qbackground_color))
                    {
-                     color_name = SDATA (value);
+                     color_name = SSDATA (value);
                      csz = SCHARS (value);
                      if (strncmp (color_name, unspecified_bg, csz) == 0)
                        value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f));
@@ -2437,7 +2437,7 @@ If FRAME is nil, describe the currently selected frame.  */)
                    }
                  else if (EQ (parameter, Qforeground_color))
                    {
-                     color_name = SDATA (value);
+                     color_name = SSDATA (value);
                      csz = SCHARS (value);
                      if (strncmp (color_name, unspecified_fg, csz) == 0)
                        value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f));
@@ -3307,16 +3307,16 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
       fontset = fs_query_fontset (arg, 0);
       if (fontset < 0)
        {
-         font_object = font_open_by_name (f, SDATA (arg));
+         font_object = font_open_by_name (f, SSDATA (arg));
          if (NILP (font_object))
-           error ("Font `%s' is not defined", SDATA (arg));
+           error ("Font `%s' is not defined", SSDATA (arg));
          arg = AREF (font_object, FONT_NAME_INDEX);
        }
       else if (fontset > 0)
        {
          Lisp_Object ascii_font = fontset_ascii (fontset);
 
-         font_object = font_open_by_name (f, SDATA (ascii_font));
+         font_object = font_open_by_name (f, SSDATA (ascii_font));
          if (NILP (font_object))
            error ("Font `%s' is not defined", SDATA (arg));
          arg = AREF (font_object, FONT_NAME_INDEX);
@@ -3394,7 +3394,7 @@ x_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
       char *p0, *p1;
 
       CHECK_STRING (new_value);
-      p0 = p1 = SDATA (new_value);
+      p0 = p1 = SSDATA (new_value);
       new_value = Qnil;
       while (*p0)
        {
@@ -3771,23 +3771,23 @@ xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Li
 
   /* Start with emacs.FRAMENAME for the name (the specific one)
      and with `Emacs' for the class key (the general one).  */
-  strcpy (name_key, SDATA (Vx_resource_name));
-  strcpy (class_key, SDATA (Vx_resource_class));
+  strcpy (name_key, SSDATA (Vx_resource_name));
+  strcpy (class_key, SSDATA (Vx_resource_class));
 
   strcat (class_key, ".");
-  strcat (class_key, SDATA (class));
+  strcat (class_key, SSDATA (class));
 
   if (!NILP (component))
     {
       strcat (class_key, ".");
-      strcat (class_key, SDATA (subclass));
+      strcat (class_key, SSDATA (subclass));
 
       strcat (name_key, ".");
-      strcat (name_key, SDATA (component));
+      strcat (name_key, SSDATA (component));
     }
 
   strcat (name_key, ".");
-  strcat (name_key, SDATA (attribute));
+  strcat (name_key, SSDATA (attribute));
 
   value = x_get_string_resource (rdb, name_key, class_key);
 
@@ -3904,25 +3904,25 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
          switch (type)
            {
            case RES_TYPE_NUMBER:
-             return make_number (atoi (SDATA (tem)));
+             return make_number (atoi (SSDATA (tem)));
 
            case RES_TYPE_BOOLEAN_NUMBER:
-             if (!strcmp (SDATA (tem), "on")
-                 || !strcmp (SDATA (tem), "true"))
+             if (!strcmp (SSDATA (tem), "on")
+                 || !strcmp (SSDATA (tem), "true"))
                return make_number (1);
-             return make_number (atoi (SDATA (tem)));
+             return make_number (atoi (SSDATA (tem)));
               break;
 
            case RES_TYPE_FLOAT:
-             return make_float (atof (SDATA (tem)));
+             return make_float (atof (SSDATA (tem)));
 
            case RES_TYPE_BOOLEAN:
              tem = Fdowncase (tem);
-             if (!strcmp (SDATA (tem), "on")
+             if (!strcmp (SSDATA (tem), "on")
 #ifdef HAVE_NS
-                  || !strcmp(SDATA(tem), "yes")
+                  || !strcmp (SSDATA (tem), "yes")
 #endif
-                 || !strcmp (SDATA (tem), "true"))
+                 || !strcmp (SSDATA (tem), "true"))
                return Qt;
              else
                return Qnil;
@@ -3936,17 +3936,17 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
              {
                Lisp_Object lower;
                lower = Fdowncase (tem);
-               if (!strcmp (SDATA (lower), "on")
+               if (!strcmp (SSDATA (lower), "on")
 #ifdef HAVE_NS
-                    || !strcmp(SDATA(lower), "yes")
+                    || !strcmp (SSDATA (lower), "yes")
 #endif
-                   || !strcmp (SDATA (lower), "true"))
+                   || !strcmp (SSDATA (lower), "true"))
                  return Qt;
-               else if (!strcmp (SDATA (lower), "off")
+               else if (!strcmp (SSDATA (lower), "off")
 #ifdef HAVE_NS
-                      || !strcmp(SDATA(lower), "no")
+                      || !strcmp (SSDATA (lower), "no")
 #endif
-                     || !strcmp (SDATA (lower), "false"))
+                     || !strcmp (SSDATA (lower), "false"))
                  return Qnil;
                else
                  return Fintern (tem, Qnil);
index 67de90e..d533d7e 100644 (file)
@@ -376,7 +376,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
   dpyinfo->bitmaps[id - 1].depth = 1;
   dpyinfo->bitmaps[id - 1].height = height;
   dpyinfo->bitmaps[id - 1].width = width;
-  strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file));
+  strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file));
 
   return id;
 #endif /* HAVE_X_WINDOWS */
@@ -770,7 +770,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
 
       /* Find key in KEYWORDS.  Error if not found.  */
       for (i = 0; i < nkeywords; ++i)
-       if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0)
+       if (strcmp (keywords[i].name, SSDATA (SYMBOL_NAME (key))) == 0)
          break;
 
       if (i == nkeywords)
@@ -1366,7 +1366,7 @@ x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
 
   xassert (STRINGP (color_name));
 
-  if (x_defined_color (f, SDATA (color_name), &color, 1))
+  if (x_defined_color (f, SSDATA (color_name), &color, 1))
     {
       /* This isn't called frequently so we get away with simply
         reallocating the color vector to the needed size, here.  */
@@ -2857,7 +2857,7 @@ xbm_load (struct frame *f, struct image *img)
          return 0;
        }
 
-      contents = slurp_file (SDATA (file), &size);
+      contents = slurp_file (SSDATA (file), &size);
       if (contents == NULL)
        {
          image_error ("Error loading XBM image `%s'", img->spec, Qnil);
@@ -2934,7 +2934,7 @@ xbm_load (struct frame *f, struct image *img)
                }
            }
          else if (STRINGP (data))
-           bits = SDATA (data);
+           bits = SSDATA (data);
          else
            bits = XBOOL_VECTOR (data)->data;
 
@@ -3441,14 +3441,14 @@ xpm_load (struct frame *f, struct image *img)
          if (STRINGP (name))
            {
              xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1);
-             strcpy (xpm_syms[i].name, SDATA (name));
+             strcpy (xpm_syms[i].name, SSDATA (name));
            }
          else
            xpm_syms[i].name = "";
          if (STRINGP (color))
            {
              xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1);
-             strcpy (xpm_syms[i].value, SDATA (color));
+             strcpy (xpm_syms[i].value, SSDATA (color));
            }
          else
            xpm_syms[i].value = "";
@@ -3491,7 +3491,7 @@ xpm_load (struct frame *f, struct image *img)
                                  &attrs);
 #else
       rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                               SDATA (file), &img->pixmap, &img->mask,
+                               SSDATA (file), &img->pixmap, &img->mask,
                                &attrs);
 #endif /* HAVE_NTGUI */
     }
@@ -3514,7 +3514,7 @@ xpm_load (struct frame *f, struct image *img)
                                        &attrs);
 #else
       rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                                     SDATA (buffer),
+                                     SSDATA (buffer),
                                      &img->pixmap, &img->mask,
                                      &attrs);
 #endif /* HAVE_NTGUI */
@@ -5101,7 +5101,7 @@ pbm_load (struct frame *f, struct image *img)
          return 0;
        }
 
-      contents = slurp_file (SDATA (file), &size);
+      contents = slurp_file (SSDATA (file), &size);
       if (contents == NULL)
        {
          image_error ("Error reading `%s'", file, Qnil);
@@ -5603,7 +5603,7 @@ png_load (struct frame *f, struct image *img)
        }
 
       /* Open the image file.  */
-      fp = fopen (SDATA (file), "rb");
+      fp = fopen (SSDATA (file), "rb");
       if (!fp)
        {
          image_error ("Cannot open image file `%s'", file, Qnil);
@@ -5740,7 +5740,7 @@ png_load (struct frame *f, struct image *img)
        /* The user specified `:background', use that.  */
        {
          XColor color;
-         if (x_defined_color (f, SDATA (specified_bg), &color, 0))
+         if (x_defined_color (f, SSDATA (specified_bg), &color, 0))
            {
              png_color_16 user_bg;
 
@@ -6321,7 +6321,7 @@ jpeg_load (struct frame *f, struct image *img)
          return 0;
        }
 
-      fp = fopen (SDATA (file), "rb");
+      fp = fopen (SSDATA (file), "rb");
       if (fp == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
@@ -6756,7 +6756,7 @@ tiff_load (struct frame *f, struct image *img)
 
       /* Try to open the image file.  Casting return value avoids a
         GCC warning on W32.  */
-      tiff = (TIFF *)fn_TIFFOpen (SDATA (file), "r");
+      tiff = (TIFF *)fn_TIFFOpen (SSDATA (file), "r");
       if (tiff == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
index e2cd0fc..b40cb9f 100644 (file)
@@ -2046,7 +2046,7 @@ whether or not it is currently displayed in some window.  */)
            it_overshoot_expected = 1;
          else if (it.method == GET_FROM_STRING)
            {
-             const char *s = SDATA (it.string);
+             const char *s = SSDATA (it.string);
              const char *e = s + SBYTES (it.string);
              while (s < e && *s != '\n')
                ++s;
@@ -2164,4 +2164,3 @@ syms_of_indent (void)
   defsubr (&Svertical_motion);
   defsubr (&Scompute_motion);
 }
-
index 3283fd4..d533213 100644 (file)
@@ -6025,7 +6025,7 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
 
 #define MULTI_LETTER_MOD(BIT, NAME, LEN)                       \
          if (i + LEN + 1 <= SBYTES (name)                      \
-             && ! strncmp (SDATA (name) + i, NAME, LEN))       \
+             && ! strncmp (SSDATA (name) + i, NAME, LEN))      \
            {                                                   \
              this_mod_end = i + LEN;                           \
              this_mod = BIT;                                   \
@@ -6063,13 +6063,13 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
   if (! (modifiers & (down_modifier | drag_modifier
                      | double_modifier | triple_modifier))
       && i + 7 == SBYTES (name)
-      && strncmp (SDATA (name) + i, "mouse-", 6) == 0
+      && strncmp (SSDATA (name) + i, "mouse-", 6) == 0
       && ('0' <= SREF (name, i + 6) && SREF (name, i + 6) <= '9'))
     modifiers |= click_modifier;
 
   if (! (modifiers & (double_modifier | triple_modifier))
       && i + 6 < SBYTES (name)
-      && strncmp (SDATA (name) + i, "wheel-", 6) == 0)
+      && strncmp (SSDATA (name) + i, "wheel-", 6) == 0)
     modifiers |= click_modifier;
 
   if (modifier_end)
@@ -6187,7 +6187,7 @@ parse_modifiers (Lisp_Object symbol)
       Lisp_Object unmodified;
       Lisp_Object mask;
 
-      unmodified = Fintern (make_string (SDATA (SYMBOL_NAME (symbol)) + end,
+      unmodified = Fintern (make_string (SSDATA (SYMBOL_NAME (symbol)) + end,
                                         SBYTES (SYMBOL_NAME (symbol)) - end),
                            Qnil);
 
@@ -6255,7 +6255,7 @@ apply_modifiers (int modifiers, Lisp_Object base)
     {
       /* We have to create the symbol ourselves.  */
       new_symbol = apply_modifiers_uncached (modifiers,
-                                            SDATA (SYMBOL_NAME (base)),
+                                            SSDATA (SYMBOL_NAME (base)),
                                             SCHARS (SYMBOL_NAME (base)),
                                             SBYTES (SYMBOL_NAME (base)));
 
@@ -8084,7 +8084,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
   item = XCDR (item);
   if (!CONSP (item))
     {
-      if (menu_separator_name_p (SDATA (caption)))
+      if (menu_separator_name_p (SSDATA (caption)))
        {
          PROP (TOOL_BAR_ITEM_TYPE) = Qt;
 #if !defined (USE_GTK) && !defined (HAVE_NS)
@@ -8439,7 +8439,7 @@ read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps)
   menu = read_char_minibuf_menu_text;
 
   /* Prompt string always starts with map's prompt, and a space.  */
-  strcpy (menu, SDATA (name));
+  strcpy (menu, SSDATA (name));
   nlength = SBYTES (name);
   menu[nlength++] = ':';
   menu[nlength++] = ' ';
@@ -10562,7 +10562,7 @@ If FILE is nil, close any open dribble file.  */)
   if (!NILP (file))
     {
       file = Fexpand_file_name (file, Qnil);
-      dribble = fopen (SDATA (file), "w");
+      dribble = fopen (SSDATA (file), "w");
       if (dribble == 0)
        report_file_error ("Opening dribble", Fcons (file, Qnil));
     }
index 6ebd13e..ca2f6cf 100644 (file)
@@ -963,10 +963,10 @@ Return t if the file exists and loads successfully.  */)
        {
          /* Don't insist on adding a suffix if FILE already ends with one.  */
          if (size > 3
-             && !strcmp (SDATA (file) + size - 3, ".el"))
+             && !strcmp (SSDATA (file) + size - 3, ".el"))
            must_suffix = Qnil;
          else if (size > 4
-                  && !strcmp (SDATA (file) + size - 4, ".elc"))
+                  && !strcmp (SSDATA (file) + size - 4, ".elc"))
            must_suffix = Qnil;
          /* Don't insist on adding a suffix
             if the argument includes a directory name.  */
@@ -1348,19 +1348,19 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto
              && SREF (filename, 0) == '/'
              && SREF (filename, 1) == ':')
            {
-             strncpy (fn, SDATA (filename) + 2,
+             strncpy (fn, SSDATA (filename) + 2,
                       SBYTES (filename) - 2);
              fn[SBYTES (filename) - 2] = 0;
            }
          else
            {
-             strncpy (fn, SDATA (filename),
+             strncpy (fn, SSDATA (filename),
                       SBYTES (filename));
              fn[SBYTES (filename)] = 0;
            }
 
          if (lsuffix != 0)  /* Bug happens on CCI if lsuffix is 0.  */
-           strncat (fn, SDATA (XCAR (tail)), lsuffix);
+           strncat (fn, SSDATA (XCAR (tail)), lsuffix);
 
          /* Check that the file exists and is not a directory.  */
          /* We used to only check for handlers on non-absolute file names:
@@ -1395,7 +1395,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto
              const char *pfn;
 
              encoded_fn = ENCODE_FILE (string);
-             pfn = SDATA (encoded_fn);
+             pfn = SSDATA (encoded_fn);
              exists = (stat (pfn, &st) >= 0
                        && (st.st_mode & S_IFMT) != S_IFDIR);
              if (exists)
@@ -3527,7 +3527,7 @@ it defaults to the value of `obarray'.  */)
 
   CHECK_STRING (string);
 
-  tem = oblookup (obarray, SDATA (string),
+  tem = oblookup (obarray, SSDATA (string),
                  SCHARS (string),
                  SBYTES (string));
   if (!INTEGERP (tem))
@@ -3580,7 +3580,7 @@ it defaults to the value of `obarray'.  */)
   else
     string = SYMBOL_NAME (name);
 
-  tem = oblookup (obarray, SDATA (string), SCHARS (string), SBYTES (string));
+  tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string));
   if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
     return Qnil;
   else
@@ -3609,7 +3609,7 @@ OBARRAY defaults to the value of the variable `obarray'.  */)
       string = name;
     }
 
-  tem = oblookup (obarray, SDATA (string),
+  tem = oblookup (obarray, SSDATA (string),
                  SCHARS (string),
                  SBYTES (string));
   if (INTEGERP (tem))
@@ -4055,7 +4055,7 @@ init_lread (void)
          if (STRINGP (dirfile))
            {
              dirfile = Fdirectory_file_name (dirfile);
-             if (access (SDATA (dirfile), 0) < 0)
+             if (access (SSDATA (dirfile), 0) < 0)
                dir_warning ("Warning: Lisp directory `%s' does not exist.\n",
                             XCAR (path_tail));
            }
index e4d4e47..921657b 100644 (file)
@@ -1762,7 +1762,7 @@ the values STRING, PREDICATE and `lambda'.  */)
     {
       /* Bypass intern-soft as that loses for nil.  */
       tem = oblookup (collection,
-                     SDATA (string),
+                     SSDATA (string),
                      SCHARS (string),
                      SBYTES (string));
       if (!SYMBOLP (tem))
@@ -1773,7 +1773,7 @@ the values STRING, PREDICATE and `lambda'.  */)
            string = Fstring_make_multibyte (string);
 
          tem = oblookup (collection,
-                         SDATA (string),
+                         SSDATA (string),
                          SCHARS (string),
                          SBYTES (string));
        }
@@ -2185,4 +2185,3 @@ properties.  */);
   defsubr (&Sassoc_string);
   defsubr (&Scompleting_read);
 }
-
index 79ff8ba..8bef7a7 100644 (file)
@@ -411,7 +411,7 @@ print_string (Lisp_Object string, Lisp_Object printcharfun)
        }
       else
        /* No need to copy, since output to print_buffer can't GC.  */
-       strout (SDATA (string),
+       strout (SSDATA (string),
                chars, SBYTES (string),
                printcharfun, STRING_MULTIBYTE (string));
     }
@@ -584,7 +584,7 @@ usage: (with-output-to-temp-buffer BUFNAME BODY...)  */)
   GCPRO1(args);
   name = Feval (Fcar (args));
   CHECK_STRING (name);
-  temp_output_buffer_setup (SDATA (name));
+  temp_output_buffer_setup (SSDATA (name));
   buf = Vstandard_output;
   UNGCPRO;
 
@@ -1097,7 +1097,7 @@ float_to_string (unsigned char *buf, double data)
       if (cp[1] != 0)
        goto lose;
 
-      sprintf (buf, SDATA (Vfloat_output_format), data);
+      sprintf (buf, SSDATA (Vfloat_output_format), data);
     }
 
   /* Make sure there is a decimal point with digit after, or an
@@ -1511,7 +1511,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
                  PRINTCHAR ('f');
                }
              else if (multibyte
-                      && (CHAR_BYTE8_P (c) 
+                      && (CHAR_BYTE8_P (c)
                           || (! ASCII_CHAR_P (c) && print_escape_multibyte)))
                {
                  /* When multibyte is disabled,
@@ -1933,7 +1933,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
          if (NATNUMP (Vprint_length)
              && XFASTINT (Vprint_length) < size)
            size = XFASTINT (Vprint_length);
-         
+
          PRINTCHAR ('(');
          for (i = 0; i < size; i++)
            if (!NILP (HASH_HASH (h, i)))
@@ -2311,4 +2311,3 @@ priorities.  */);
 
   defsubr (&Swith_output_to_temp_buffer);
 }
-
index 22446fb..ca29145 100644 (file)
@@ -498,7 +498,7 @@ status_message (struct Lisp_Process *p)
          if (! NILP (Vlocale_coding_system))
            string = (code_convert_string_norecord
                      (string, Vlocale_coding_system, 0));
-         c1 = STRING_CHAR (SSDATA (string));
+         c1 = STRING_CHAR (SDATA (string));
          c2 = DOWNCASE (c1);
          if (c1 != c2)
            Faset (string, make_number (0), make_number (c2));
@@ -1447,7 +1447,7 @@ list_processes_1 (Lisp_Object query_only)
          Lisp_Object speed = Fplist_get (p->childp, QCspeed);
          insert_string ("(serial port ");
          if (STRINGP (port))
-           insert_string (SDATA (port));
+           insert_string (SSDATA (port));
          else
            insert_string ("?");
          if (INTEGERP (speed))
@@ -3262,7 +3262,7 @@ usage: (make-network-process &rest ARGS)  */)
       CHECK_STRING (service);
       memset (&address_un, 0, sizeof address_un);
       address_un.sun_family = AF_LOCAL;
-      strncpy (address_un.sun_path, SDATA (service), sizeof address_un.sun_path);
+      strncpy (address_un.sun_path, SSDATA (service), sizeof address_un.sun_path);
       ai.ai_addr = (struct sockaddr *) &address_un;
       ai.ai_addrlen = sizeof address_un;
       goto open_socket;
@@ -3298,7 +3298,7 @@ usage: (make-network-process &rest ARGS)  */)
       else
        {
          CHECK_STRING (service);
-         portstring = SDATA (service);
+         portstring = SSDATA (service);
        }
 
       immediate_quit = 1;
@@ -3313,12 +3313,12 @@ usage: (make-network-process &rest ARGS)  */)
       res_init ();
 #endif
 
-      ret = getaddrinfo (SDATA (host), portstring, &hints, &res);
+      ret = getaddrinfo (SSDATA (host), portstring, &hints, &res);
       if (ret)
 #ifdef HAVE_GAI_STRERROR
-       error ("%s/%s %s", SDATA (host), portstring, gai_strerror (ret));
+       error ("%s/%s %s", SSDATA (host), portstring, gai_strerror (ret));
 #else
-       error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret);
+       error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret);
 #endif
       immediate_quit = 0;
 
@@ -3337,7 +3337,7 @@ usage: (make-network-process &rest ARGS)  */)
     {
       struct servent *svc_info;
       CHECK_STRING (service);
-      svc_info = getservbyname (SDATA (service),
+      svc_info = getservbyname (SSDATA (service),
                                (socktype == SOCK_DGRAM ? "udp" : "tcp"));
       if (svc_info == 0)
        error ("Unknown service: %s", SDATA (service));
@@ -5807,7 +5807,7 @@ emacs_get_tty_pgrp (struct Lisp_Process *p)
       int fd;
       /* Some OS:es (Solaris 8/9) does not allow TIOCGPGRP from the
         master side.  Try the slave side.  */
-      fd = emacs_open (SDATA (p->tty_name), O_RDONLY, 0);
+      fd = emacs_open (SSDATA (p->tty_name), O_RDONLY, 0);
 
       if (fd != -1)
        {
index 76c04a2..c0f8d80 100644 (file)
@@ -148,7 +148,7 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object tra
                       | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
 
   if (STRINGP (Vsearch_spaces_regexp))
-    re_set_whitespace_regexp (SDATA (Vsearch_spaces_regexp));
+    re_set_whitespace_regexp (SSDATA (Vsearch_spaces_regexp));
   else
     re_set_whitespace_regexp (NULL);
 
index a8c3413..3053cea 100644 (file)
@@ -560,7 +560,7 @@ setup_frame_gcs (EmacsFrame ew)
   if (STRINGP (font))
     {
       XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display,
-                                          SDATA (font));
+                                          SSDATA (font));
       if (xfont)
        {
          gc_values.font = xfont->fid;
@@ -840,4 +840,3 @@ widget_store_internal_border (Widget widget)
 
   ew->emacs_frame.internal_border_width = f->internal_border_width;
 }
-
index 8ec1296..5f86a59 100644 (file)
@@ -2778,7 +2778,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
      to 16 in 22.1 to make this a lesser problem.  */
   for (i = 0; i < it->n_overlay_strings && i < OVERLAY_STRING_CHUNK_SIZE; ++i)
     {
-      const char *s = SDATA (it->overlay_strings[i]);
+      const char *s = SSDATA (it->overlay_strings[i]);
       const char *e = s + SBYTES (it->overlay_strings[i]);
 
       while (s < e && *s != '\n')
@@ -20077,7 +20077,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
     {
       if (SCHARS (SYMBOL_NAME (prop)) == 2)
        {
-         char *unit =  SDATA (SYMBOL_NAME (prop));
+         char *unit = SSDATA (SYMBOL_NAME (prop));
 
          if (unit[0] == 'i' && unit[1] == 'n')
            pixels = 1.0;
index c7467b0..f1d21c0 100644 (file)
@@ -979,7 +979,7 @@ load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h
       h = XINT (Fcar (Fcdr (name)));
       bits = Fcar (Fcdr (Fcdr (name)));
 
-      bitmap_id = x_create_bitmap_from_data (f, SDATA (bits),
+      bitmap_id = x_create_bitmap_from_data (f, SSDATA (bits),
                                             w, h);
     }
   else
@@ -1271,7 +1271,7 @@ If FRAME is nil or omitted, use the selected frame.  */)
   else
     CHECK_FRAME (frame);
   f = XFRAME (frame);
-  return face_color_gray_p (f, SDATA (color)) ? Qt : Qnil;
+  return face_color_gray_p (f, SSDATA (color)) ? Qt : Qnil;
 }
 
 
@@ -1292,7 +1292,7 @@ COLOR must be a valid color name.  */)
   else
     CHECK_FRAME (frame);
   f = XFRAME (frame);
-  if (face_color_supported_p (f, SDATA (color), !NILP (background_p)))
+  if (face_color_supported_p (f, SSDATA (color), !NILP (background_p)))
     return Qt;
   return Qnil;
 }
@@ -1322,7 +1322,7 @@ load_color (struct frame *f, struct face *face, Lisp_Object name, enum lface_att
 
   /* if the color map is full, defined_color will return a best match
      to the values in an existing cell. */
-  if (!defined_color (f, SDATA (name), &color, 1))
+  if (!defined_color (f, SSDATA (name), &color, 1))
     {
       add_to_log ("Unable to load color \"%s\"", name, Qnil);
 
@@ -1399,7 +1399,7 @@ load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs)
      face_color_supported_p is smart enough to know that grays are
      "supported" as background because we are supposed to use stipple
      for them.  */
-  if (!face_color_supported_p (f, SDATA (bg), 0)
+  if (!face_color_supported_p (f, SSDATA (bg), 0)
       && !NILP (Fbitmap_spec_p (Vface_default_stipple)))
     {
       x_destroy_bitmap (f, face->stipple);
@@ -1586,7 +1586,7 @@ compare_fonts_by_sort_order (const void *v1, const void *v2)
       if (idx <= FONT_REGISTRY_INDEX)
        {
          if (STRINGP (val1))
-           result = STRINGP (val2) ? strcmp (SDATA (val1), SDATA (val2)) : -1;
+           result = STRINGP (val2) ? strcmp (SSDATA (val1), SSDATA (val2)) : -1;
          else
            result = STRINGP (val2) ? 1 : 0;
        }
@@ -2031,7 +2031,7 @@ resolve_face_name (Lisp_Object face_name, int signal_p)
   Lisp_Object tortoise, hare;
 
   if (STRINGP (face_name))
-    face_name = intern (SDATA (face_name));
+    face_name = intern (SSDATA (face_name));
 
   if (NILP (face_name) || !SYMBOLP (face_name))
     return face_name;
@@ -3502,7 +3502,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource",
   else if (EQ (attr, QCbold) || EQ (attr, QCitalic))
     value = face_boolean_x_resource_value (value, 1);
   else if (EQ (attr, QCweight) || EQ (attr, QCslant) || EQ (attr, QCwidth))
-    value = intern (SDATA (value));
+    value = intern (SSDATA (value));
   else if (EQ (attr, QCreverse_video) || EQ (attr, QCinverse_video))
     value = face_boolean_x_resource_value (value, 1);
   else if (EQ (attr, QCunderline)
@@ -3547,7 +3547,7 @@ x_update_menu_appearance (struct frame *f)
       char line[512];
       Lisp_Object lface = lface_from_face_name (f, Qmenu, 1);
       struct face *face = FACE_FROM_ID (f, MENU_FACE_ID);
-      const char *myname = SDATA (Vx_resource_name);
+      const char *myname = SSDATA (Vx_resource_name);
       int changed_p = 0;
 #ifdef USE_MOTIF
       const char *popup_path = "popup_menu";
@@ -3608,7 +3608,7 @@ x_update_menu_appearance (struct frame *f)
          if (! NILP (xlfd))
            {
 #if defined HAVE_X_I18N
-             char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif);
+             char *fontsetname = xic_create_fontsetname (SSDATA (xlfd), motif);
 #else
              char *fontsetname = SSDATA (xlfd);
 #endif
@@ -4204,10 +4204,10 @@ If FRAME is unspecified or nil, the current frame is used.  */)
   f = XFRAME (frame);
 
   if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
-      && !(STRINGP (color1) && defined_color (f, SDATA (color1), &cdef1, 0)))
+      && !(STRINGP (color1) && defined_color (f, SSDATA (color1), &cdef1, 0)))
     signal_error ("Invalid color", color1);
   if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2))
-      && !(STRINGP (color2) && defined_color (f, SDATA (color2), &cdef2, 0)))
+      && !(STRINGP (color2) && defined_color (f, SSDATA (color2), &cdef2, 0)))
     signal_error ("Invalid color", color2);
 
   return make_number (color_distance (&cdef1, &cdef2));
index b962e1b..f8ac7c3 100644 (file)
@@ -670,7 +670,7 @@ x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color)
 
   /* x_defined_color is responsible for coping with failures
      by looking for a near-miss.  */
-  if (x_defined_color (f, SDATA (color_name), &cdef, 1))
+  if (x_defined_color (f, SSDATA (color_name), &cdef, 1))
     return cdef.pixel;
 
   signal_error ("Undefined color", color_name);
@@ -1603,7 +1603,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
                         FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
                         FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
                         8, PropModeReplace,
-                        SSDATA (encoded_name),
+                        SDATA (encoded_name),
                         SBYTES (encoded_name));
 #endif /* not USE_GTK */
 
@@ -1612,7 +1612,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
                         FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
                         FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
                         8, PropModeReplace,
-                        SSDATA (encoded_icon_name),
+                        SDATA (encoded_icon_name),
                         SBYTES (encoded_icon_name));
 
        if (do_free_icon_value)
@@ -1658,7 +1658,7 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
       /* Check for no change needed in this very common case
         before we do any consing.  */
       if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name,
-                  SDATA (f->name)))
+                  SSDATA (f->name)))
        return;
       name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name);
     }
@@ -3549,7 +3549,7 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
 
   CHECK_STRING (color);
 
-  if (x_defined_color (f, SDATA (color), &foo, 0))
+  if (x_defined_color (f, SSDATA (color), &foo, 0))
     return Qt;
   else
     return Qnil;
@@ -3564,7 +3564,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
 
   CHECK_STRING (color);
 
-  if (x_defined_color (f, SDATA (color), &foo, 0))
+  if (x_defined_color (f, SSDATA (color), &foo, 0))
     return list3 (make_number (foo.red),
                  make_number (foo.green),
                  make_number (foo.blue));
@@ -3965,7 +3965,7 @@ select_visual (struct x_display_info *dpyinfo)
       int i, class = -1;
       XVisualInfo vinfo;
 
-      strcpy (s, SDATA (value));
+      strcpy (s, SSDATA (value));
       dash = strchr (s, '-');
       if (dash)
        {
@@ -4244,11 +4244,11 @@ FRAME.  Default is to change on the edit X window.  */)
     }
 
   BLOCK_INPUT;
-  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False);
+  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
   if (! NILP (type))
     {
       CHECK_STRING (type);
-      target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False);
+      target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
     }
 
   if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f);
@@ -4279,7 +4279,7 @@ FRAME nil or omitted means use the selected frame.  Value is PROP.  */)
 
   CHECK_STRING (prop);
   BLOCK_INPUT;
-  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False);
+  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
   XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), prop_atom);
 
   /* Make sure the property is removed when we return.  */
@@ -4343,13 +4343,13 @@ no value of TYPE (always string in the MS Windows case).  */)
   BLOCK_INPUT;
   if (STRINGP (type))
     {
-      if (strcmp ("AnyPropertyType", SDATA (type)) == 0)
+      if (strcmp ("AnyPropertyType", SSDATA (type)) == 0)
         target_type = AnyPropertyType;
       else
-        target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False);
+        target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
     }
 
-  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False);
+  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
   rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
                           prop_atom, 0, 0, False, target_type,
                           &actual_type, &actual_format, &actual_size,
index 43eef26..16907d4 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -96,7 +96,7 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
   if (! NILP (base_url))
     {
       CHECK_STRING (base_url);
-      burl = SDATA (base_url);
+      burl = SSDATA (base_url);
     }
 
   bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart);
index ea0282a..96c8b9c 100644 (file)
@@ -2502,7 +2502,7 @@ are ignored.  */)
   CHECK_STRING (message_type);
   x_send_client_event(display, dest, from,
                       XInternAtom (dpyinfo->display,
-                                   SDATA (message_type),
+                                   SSDATA (message_type),
                                    False),
                       format, values);
 
@@ -2538,9 +2538,9 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, At
     }
   else if (STRINGP (dest))
     {
-      if (strcmp (SDATA (dest), "PointerWindow") == 0)
+      if (strcmp (SSDATA (dest), "PointerWindow") == 0)
         wdest = PointerWindow;
-      else if (strcmp (SDATA (dest), "InputFocus") == 0)
+      else if (strcmp (SSDATA (dest), "InputFocus") == 0)
         wdest = InputFocus;
       else
         error ("DEST as a string must be one of PointerWindow or InputFocus");
index 4f5563b..b6e596b 100644 (file)
@@ -7949,7 +7949,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
       && (FRAME_XIC_STYLE (f) & (XIMPreeditPosition | XIMStatusArea)))
     {
       BLOCK_INPUT;
-      xic_set_xfontset (f, SDATA (fontset_ascii (fontset)));
+      xic_set_xfontset (f, SSDATA (fontset_ascii (fontset)));
       UNBLOCK_INPUT;
     }
 #endif
@@ -9873,7 +9873,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
       ++x_initialized;
     }
 
-  if (! x_display_ok (SDATA (display_name)))
+  if (! x_display_ok (SSDATA (display_name)))
     error ("Display %s can't be opened", SDATA (display_name));
 
 #ifdef USE_GTK
@@ -9965,7 +9965,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
        argv[argc++] = xrm_option;
       }
     turn_on_atimers (0);
-    dpy = XtOpenDisplay (Xt_app_con, SDATA (display_name),
+    dpy = XtOpenDisplay (Xt_app_con, SSDATA (display_name),
                         resource_name, EMACS_CLASS,
                         emacs_options, XtNumber (emacs_options),
                         &argc, argv);
@@ -10004,8 +10004,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
     for (share = x_display_list, tail = x_display_name_list; share;
         share = share->next, tail = XCDR (tail))
-      if (same_x_server (SDATA (XCAR (XCAR (tail))),
-                        SDATA (display_name)))
+      if (same_x_server (SSDATA (XCAR (XCAR (tail))),
+                        SSDATA (display_name)))
        break;
     if (share)
       terminal->kboard = share->terminal->kboard;
@@ -10066,7 +10066,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
   /* Set the name of the terminal. */
   terminal->name = (char *) xmalloc (SBYTES (display_name) + 1);
-  strncpy (terminal->name, SDATA (display_name), SBYTES (display_name));
+  strncpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
   terminal->name[SBYTES (display_name)] = 0;
 
 #if 0
@@ -10157,8 +10157,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
                                          build_string ("PrivateColormap"),
                                          Qnil, Qnil);
          if (STRINGP (value)
-             && (!strcmp (SDATA (value), "true")
-                 || !strcmp (SDATA (value), "on")))
+             && (!strcmp (SSDATA (value), "true")
+                 || !strcmp (SSDATA (value), "on")))
            dpyinfo->cmap = XCopyColormapAndFree (dpyinfo->display, dpyinfo->cmap);
        }
     }
@@ -10355,8 +10355,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
                                    build_string ("Synchronous"),
                                    Qnil, Qnil);
     if (STRINGP (value)
-       && (!strcmp (SDATA (value), "true")
-           || !strcmp (SDATA (value), "on")))
+       && (!strcmp (SSDATA (value), "true")
+           || !strcmp (SSDATA (value), "on")))
       XSynchronize (dpyinfo->display, True);
   }
 
@@ -10368,13 +10368,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
                                    Qnil, Qnil);
 #ifdef USE_XIM
     if (STRINGP (value)
-       && (!strcmp (SDATA (value), "false")
-           || !strcmp (SDATA (value), "off")))
+       && (!strcmp (SSDATA (value), "false")
+           || !strcmp (SSDATA (value), "off")))
       use_xim = 0;
 #else
     if (STRINGP (value)
-       && (!strcmp (SDATA (value), "true")
-           || !strcmp (SDATA (value), "on")))
+       && (!strcmp (SSDATA (value), "true")
+           || !strcmp (SSDATA (value), "on")))
       use_xim = 1;
 #endif
   }