emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/filelock.c


From: Ken Raeburn
Subject: [Emacs-diffs] Changes to emacs/src/filelock.c
Date: Sun, 14 Jul 2002 20:00:50 -0400

Index: emacs/src/filelock.c
diff -c emacs/src/filelock.c:1.96 emacs/src/filelock.c:1.97
*** emacs/src/filelock.c:1.96   Wed Feb  6 10:44:28 2002
--- emacs/src/filelock.c        Sun Jul 14 20:00:36 2002
***************
*** 222,228 ****
              args[3] = Qnil;
              args[4] = build_string ("-c");
              sprintf (cmd_string, "gunzip < %s.%d.gz > %s",
!                      WTMP_FILE, counter, XSTRING (tempname)->data);
              args[5] = build_string (cmd_string);
              Fcall_process (6, args);
              filename = tempname;
--- 222,228 ----
              args[3] = Qnil;
              args[4] = build_string ("-c");
              sprintf (cmd_string, "gunzip < %s.%d.gz > %s",
!                      WTMP_FILE, counter, SDATA (tempname));
              args[5] = build_string (cmd_string);
              Fcall_process (6, args);
              filename = tempname;
***************
*** 232,240 ****
  
        if (! NILP (filename))
        {
!         get_boot_time_1 (XSTRING (filename)->data, 1);
          if (delete_flag)
!           unlink (XSTRING (filename)->data);
        }
      }
  
--- 232,240 ----
  
        if (! NILP (filename))
        {
!         get_boot_time_1 (SDATA (filename), 1);
          if (delete_flag)
!           unlink (SDATA (filename));
        }
      }
  
***************
*** 325,331 ****
     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), \
     fill_in_lock_file_name (lock, (file)))
  
  static void
--- 325,331 ----
     trailing period plus one for the digit after it plus one for the
     null.  */
  #define MAKE_LOCK_NAME(lock, file) \
!   (lock = (char *) alloca (SBYTES (file) + 2 + 1 + 1 + 1), \
     fill_in_lock_file_name (lock, (file)))
  
  static void
***************
*** 337,343 ****
    struct stat st;
    int count = 0;
  
!   strcpy (lockfile, XSTRING (fn)->data);
  
    /* 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
--- 337,343 ----
    struct stat st;
    int count = 0;
  
!   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,388 ****
    char *lock_info_str;
  
    if (STRINGP (Fuser_login_name (Qnil)))
!     user_name = (char *)XSTRING (Fuser_login_name (Qnil))->data;
    else
      user_name = "";
    if (STRINGP (Fsystem_name ()))
!     host_name = (char *)XSTRING (Fsystem_name ())->data;
    else
      host_name = "";
    lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name)
--- 378,388 ----
    char *lock_info_str;
  
    if (STRINGP (Fuser_login_name (Qnil)))
!     user_name = (char *)SDATA (Fuser_login_name (Qnil));
    else
      user_name = "";
    if (STRINGP (Fsystem_name ()))
!     host_name = (char *)SDATA (Fsystem_name ());
    else
      host_name = "";
    lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name)
***************
*** 503,509 ****
    
    /* On current host?  */
    if (STRINGP (Fsystem_name ())
!       && strcmp (owner->host, XSTRING (Fsystem_name ())->data) == 0)
      {
        if (owner->pid == getpid ())
          ret = 2; /* We own it.  */
--- 503,509 ----
    
    /* On current host?  */
    if (STRINGP (Fsystem_name ())
!       && strcmp (owner->host, SDATA (Fsystem_name ())) == 0)
      {
        if (owner->pid == getpid ())
          ret = 2; /* We own it.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]