Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 386:4af0ddfb7c5b r21-2-8
Import from CVS: tag r21-2-8
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:08:50 +0200 |
parents | 8626e4521993 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
385:bc48d89bf15c | 386:4af0ddfb7c5b |
---|---|
979 if (nm[0] == '~') /* prefix ~ */ | 979 if (nm[0] == '~') /* prefix ~ */ |
980 { | 980 { |
981 if (IS_DIRECTORY_SEP (nm[1]) | 981 if (IS_DIRECTORY_SEP (nm[1]) |
982 || nm[1] == 0) /* ~ by itself */ | 982 || nm[1] == 0) /* ~ by itself */ |
983 { | 983 { |
984 if (!(newdir = (Bufbyte *) get_home_directory())) | 984 char * newdir_external = get_home_directory (); |
985 | |
986 if (newdir_external == NULL) | |
985 newdir = (Bufbyte *) ""; | 987 newdir = (Bufbyte *) ""; |
988 else | |
989 GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (newdir_external, newdir); | |
990 | |
986 nm++; | 991 nm++; |
987 #ifdef WINDOWSNT | 992 #ifdef WINDOWSNT |
988 collapse_newdir = 0; | 993 collapse_newdir = 0; |
989 #endif | 994 #endif |
990 } | 995 } |
1253 target[0] = DRIVE_LETTER (drive); | 1258 target[0] = DRIVE_LETTER (drive); |
1254 target[1] = ':'; | 1259 target[1] = ':'; |
1255 } | 1260 } |
1256 else | 1261 else |
1257 { | 1262 { |
1258 if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1]))) | 1263 assert (IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])); |
1259 abort (); | |
1260 } | 1264 } |
1261 CORRECT_DIR_SEPS (target); | 1265 CORRECT_DIR_SEPS (target); |
1262 #endif /* WINDOWSNT */ | 1266 #endif /* WINDOWSNT */ |
1263 | 1267 |
1264 return make_string (target, o - target); | 1268 return make_string (target, o - target); |