/[emacs]/emacs/src/fileio.c
ViewVC logotype

Diff of /emacs/src/fileio.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.437 by rms, Sun Feb 3 10:36:49 2002 UTC revision 1.438 by eliz, Fri Feb 8 19:16:31 2002 UTC
# Line 2025  duplicates what `expand-file-name' does. Line 2025  duplicates what `expand-file-name' does.
2025    int total = 0;    int total = 0;
2026    int substituted = 0;    int substituted = 0;
2027    unsigned char *xnm;    unsigned char *xnm;
2028      struct passwd *pw;
2029    Lisp_Object handler;    Lisp_Object handler;
2030    
2031    CHECK_STRING (filename);    CHECK_STRING (filename);
# Line 2063  duplicates what `expand-file-name' does. Line 2064  duplicates what `expand-file-name' does.
2064  #endif /* VMS */  #endif /* VMS */
2065                || IS_DIRECTORY_SEP (p[-1])))                || IS_DIRECTORY_SEP (p[-1])))
2066          {          {
2067            nm = p;            for (s = p; *s && (!IS_DIRECTORY_SEP (*s)
2068            substituted = 1;  #ifdef VMS
2069                                  && *s != ':'
2070    #endif /* VMS */
2071                                  ); s++);
2072              if (s > p + 1)
2073                {
2074                  o = (unsigned char *) alloca (s - p + 1);
2075                  bcopy ((char *) p, o, s - p);
2076                  o [s - p] = 0;
2077    
2078                  pw = (struct passwd *) getpwnam (o + 1);
2079                }
2080              /* If we have ~/ or ~user and `user' exists, discard
2081                 everything up to ~.  But if `user' does not exist, leave
2082                 ~user alone, it might be a literal file name.  */
2083              if (s == p + 1 || pw)
2084                {
2085                  nm = p;
2086                  substituted = 1;
2087                }
2088          }          }
2089  #ifdef DOS_NT  #ifdef DOS_NT
2090        /* see comment in expand-file-name about drive specifiers */        /* see comment in expand-file-name about drive specifiers */

Legend:
Removed from v.1.437  
changed lines
  Added in v.1.438

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26