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); |
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 */ |