aboutsummaryrefslogtreecommitdiffstats
path: root/src/filelock.c
diff options
context:
space:
mode:
authorKen Raeburn2002-07-15 00:01:34 +0000
committerKen Raeburn2002-07-15 00:01:34 +0000
commitd5db40779d7505244d37476b4f046641f07eea2b (patch)
tree5c8bf4dad41639287e722cb7cbdc0709e47a9e53 /src/filelock.c
parent491c2516d32fa8b9ba9422ec142c8925dd82af00 (diff)
downloademacs-d5db40779d7505244d37476b4f046641f07eea2b.tar.gz
emacs-d5db40779d7505244d37476b4f046641f07eea2b.zip
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.
Diffstat (limited to 'src/filelock.c')
-rw-r--r--src/filelock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/filelock.c b/src/filelock.c
index b85f0a68a0e..33de9a4e7db 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -222,7 +222,7 @@ get_boot_time ()
222 args[3] = Qnil; 222 args[3] = Qnil;
223 args[4] = build_string ("-c"); 223 args[4] = build_string ("-c");
224 sprintf (cmd_string, "gunzip < %s.%d.gz > %s", 224 sprintf (cmd_string, "gunzip < %s.%d.gz > %s",
225 WTMP_FILE, counter, XSTRING (tempname)->data); 225 WTMP_FILE, counter, SDATA (tempname));
226 args[5] = build_string (cmd_string); 226 args[5] = build_string (cmd_string);
227 Fcall_process (6, args); 227 Fcall_process (6, args);
228 filename = tempname; 228 filename = tempname;
@@ -232,9 +232,9 @@ get_boot_time ()
232 232
233 if (! NILP (filename)) 233 if (! NILP (filename))
234 { 234 {
235 get_boot_time_1 (XSTRING (filename)->data, 1); 235 get_boot_time_1 (SDATA (filename), 1);
236 if (delete_flag) 236 if (delete_flag)
237 unlink (XSTRING (filename)->data); 237 unlink (SDATA (filename));
238 } 238 }
239 } 239 }
240 240
@@ -325,7 +325,7 @@ typedef struct
325 trailing period plus one for the digit after it plus one for the 325 trailing period plus one for the digit after it plus one for the
326 null. */ 326 null. */
327#define MAKE_LOCK_NAME(lock, file) \ 327#define MAKE_LOCK_NAME(lock, file) \
328 (lock = (char *) alloca (STRING_BYTES (XSTRING (file)) + 2 + 1 + 1 + 1), \ 328 (lock = (char *) alloca (SBYTES (file) + 2 + 1 + 1 + 1), \
329 fill_in_lock_file_name (lock, (file))) 329 fill_in_lock_file_name (lock, (file)))
330 330
331static void 331static void
@@ -337,7 +337,7 @@ fill_in_lock_file_name (lockfile, fn)
337 struct stat st; 337 struct stat st;
338 int count = 0; 338 int count = 0;
339 339
340 strcpy (lockfile, XSTRING (fn)->data); 340 strcpy (lockfile, SDATA (fn));
341 341
342 /* Shift the nondirectory part of the file name (including the null) 342 /* Shift the nondirectory part of the file name (including the null)
343 right two characters. Here is one of the places where we'd have to 343 right two characters. Here is one of the places where we'd have to
@@ -378,11 +378,11 @@ lock_file_1 (lfname, force)
378 char *lock_info_str; 378 char *lock_info_str;
379 379
380 if (STRINGP (Fuser_login_name (Qnil))) 380 if (STRINGP (Fuser_login_name (Qnil)))
381 user_name = (char *)XSTRING (Fuser_login_name (Qnil))->data; 381 user_name = (char *)SDATA (Fuser_login_name (Qnil));
382 else 382 else
383 user_name = ""; 383 user_name = "";
384 if (STRINGP (Fsystem_name ())) 384 if (STRINGP (Fsystem_name ()))
385 host_name = (char *)XSTRING (Fsystem_name ())->data; 385 host_name = (char *)SDATA (Fsystem_name ());
386 else 386 else
387 host_name = ""; 387 host_name = "";
388 lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) 388 lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name)
@@ -503,7 +503,7 @@ current_lock_owner (owner, lfname)
503 503
504 /* On current host? */ 504 /* On current host? */
505 if (STRINGP (Fsystem_name ()) 505 if (STRINGP (Fsystem_name ())
506 && strcmp (owner->host, XSTRING (Fsystem_name ())->data) == 0) 506 && strcmp (owner->host, SDATA (Fsystem_name ())) == 0)
507 { 507 {
508 if (owner->pid == getpid ()) 508 if (owner->pid == getpid ())
509 ret = 2; /* We own it. */ 509 ret = 2; /* We own it. */