emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c
Date: Fri, 08 Feb 2002 14:16:31 -0500

Index: emacs/src/fileio.c
diff -c emacs/src/fileio.c:1.437 emacs/src/fileio.c:1.438
*** emacs/src/fileio.c:1.437    Sun Feb  3 05:36:49 2002
--- emacs/src/fileio.c  Fri Feb  8 14:16:31 2002
***************
*** 2025,2030 ****
--- 2025,2031 ----
    int total = 0;
    int substituted = 0;
    unsigned char *xnm;
+   struct passwd *pw;
    Lisp_Object handler;
  
    CHECK_STRING (filename);
***************
*** 2063,2070 ****
  #endif /* VMS */
              || IS_DIRECTORY_SEP (p[-1])))
        {
!         nm = p;
!         substituted = 1;
        }
  #ifdef DOS_NT
        /* see comment in expand-file-name about drive specifiers */
--- 2064,2090 ----
  #endif /* VMS */
              || IS_DIRECTORY_SEP (p[-1])))
        {
!         for (s = p; *s && (!IS_DIRECTORY_SEP (*s)
! #ifdef VMS
!                             && *s != ':'
! #endif /* VMS */
!                             ); s++);
!         if (s > p + 1)
!           {
!             o = (unsigned char *) alloca (s - p + 1);
!             bcopy ((char *) p, o, s - p);
!             o [s - p] = 0;
! 
!             pw = (struct passwd *) getpwnam (o + 1);
!           }
!         /* If we have ~/ or ~user and `user' exists, discard
!            everything up to ~.  But if `user' does not exist, leave
!            ~user alone, it might be a literal file name.  */
!         if (s == p + 1 || pw)
!           {
!             nm = p;
!             substituted = 1;
!           }
        }
  #ifdef DOS_NT
        /* see comment in expand-file-name about drive specifiers */



reply via email to

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