Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 288:e11d67e05968 r21-0b42
Import from CVS: tag r21-0b42
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:54 +0200 |
parents | 57709be46d1b |
children | c9fe270a4101 |
comparison
equal
deleted
inserted
replaced
287:13a0bd77a29d | 288:e11d67e05968 |
---|---|
986 if (nm[0] == '~') /* prefix ~ */ | 986 if (nm[0] == '~') /* prefix ~ */ |
987 { | 987 { |
988 if (IS_DIRECTORY_SEP (nm[1]) | 988 if (IS_DIRECTORY_SEP (nm[1]) |
989 || nm[1] == 0) /* ~ by itself */ | 989 || nm[1] == 0) /* ~ by itself */ |
990 { | 990 { |
991 if (!(newdir = (Bufbyte *) egetenv ("HOME"))) | 991 if (!(newdir = (Bufbyte *) get_home_directory())) |
992 newdir = (Bufbyte *) ""; | 992 newdir = (Bufbyte *) ""; |
993 nm++; | 993 nm++; |
994 #ifdef WINDOWSNT | 994 #ifdef WINDOWSNT |
995 collapse_newdir = 0; | 995 collapse_newdir = 0; |
996 #endif | 996 #endif |
1013 /* Now if the file given is "~foo/file" and HOME="c:/", then | 1013 /* Now if the file given is "~foo/file" and HOME="c:/", then |
1014 we want the file to be named "c:/file" ("~foo" becomes | 1014 we want the file to be named "c:/file" ("~foo" becomes |
1015 "c:/"). The variable o has "~foo", so we can use the | 1015 "c:/"). The variable o has "~foo", so we can use the |
1016 length of that string to offset nm. August Hill, 31 Aug | 1016 length of that string to offset nm. August Hill, 31 Aug |
1017 1998. */ | 1017 1998. */ |
1018 newdir = (Bufbyte *) egetenv ("HOME"); | 1018 newdir = (Bufbyte *) get_home_directory(); |
1019 dostounix_filename (newdir); | 1019 dostounix_filename (newdir); |
1020 nm += strlen(o) + 1; | 1020 nm += strlen(o) + 1; |
1021 #else /* not WINDOWSNT */ | 1021 #else /* not WINDOWSNT */ |
1022 /* Jamie reports that getpwnam() can get wedged by SIGIO/SIGALARM | 1022 /* Jamie reports that getpwnam() can get wedged by SIGIO/SIGALARM |
1023 occurring in it. (It can call select()). */ | 1023 occurring in it. (It can call select()). */ |