Mercurial > emacs
diff src/filelock.c @ 46370:40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
| author | Ken Raeburn <raeburn@raeburn.org> |
|---|---|
| date | Mon, 15 Jul 2002 00:00:41 +0000 |
| parents | a3df29430166 |
| children | 23a1cea22d13 |
line wrap: on
line diff
--- a/src/filelock.c Sun Jul 14 23:54:05 2002 +0000 +++ b/src/filelock.c Mon Jul 15 00:00:41 2002 +0000 @@ -222,7 +222,7 @@ args[3] = Qnil; args[4] = build_string ("-c"); sprintf (cmd_string, "gunzip < %s.%d.gz > %s", - WTMP_FILE, counter, XSTRING (tempname)->data); + WTMP_FILE, counter, SDATA (tempname)); args[5] = build_string (cmd_string); Fcall_process (6, args); filename = tempname; @@ -232,9 +232,9 @@ if (! NILP (filename)) { - get_boot_time_1 (XSTRING (filename)->data, 1); + get_boot_time_1 (SDATA (filename), 1); if (delete_flag) - unlink (XSTRING (filename)->data); + unlink (SDATA (filename)); } } @@ -325,7 +325,7 @@ trailing period plus one for the digit after it plus one for the null. */ #define MAKE_LOCK_NAME(lock, file) \ - (lock = (char *) alloca (STRING_BYTES (XSTRING (file)) + 2 + 1 + 1 + 1), \ + (lock = (char *) alloca (SBYTES (file) + 2 + 1 + 1 + 1), \ fill_in_lock_file_name (lock, (file))) static void @@ -337,7 +337,7 @@ struct stat st; int count = 0; - strcpy (lockfile, XSTRING (fn)->data); + strcpy (lockfile, SDATA (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 @@ -378,11 +378,11 @@ char *lock_info_str; if (STRINGP (Fuser_login_name (Qnil))) - user_name = (char *)XSTRING (Fuser_login_name (Qnil))->data; + user_name = (char *)SDATA (Fuser_login_name (Qnil)); else user_name = ""; if (STRINGP (Fsystem_name ())) - host_name = (char *)XSTRING (Fsystem_name ())->data; + host_name = (char *)SDATA (Fsystem_name ()); else host_name = ""; lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) @@ -503,7 +503,7 @@ /* On current host? */ if (STRINGP (Fsystem_name ()) - && strcmp (owner->host, XSTRING (Fsystem_name ())->data) == 0) + && strcmp (owner->host, SDATA (Fsystem_name ())) == 0) { if (owner->pid == getpid ()) ret = 2; /* We own it. */
