comparison src/fileio.c @ 10499:6368f8d9bf07

(file_name_as_directory, Ffile_name_directory) (Ffile_name_nondirectory): Delete special MSDOG code now covered by macros.
author Richard M. Stallman <rms@gnu.org>
date Fri, 20 Jan 1995 23:36:07 +0000
parents ce5ab980a14f
children 40ae63b409f4
comparison
equal deleted inserted replaced
10498:8fb25f247533 10499:6368f8d9bf07
304 304
305 while (p != beg && !IS_ANY_SEP (p[-1]) 305 while (p != beg && !IS_ANY_SEP (p[-1])
306 #ifdef VMS 306 #ifdef VMS
307 && p[-1] != ':' && p[-1] != ']' && p[-1] != '>' 307 && p[-1] != ':' && p[-1] != ']' && p[-1] != '>'
308 #endif /* VMS */ 308 #endif /* VMS */
309 #ifdef MSDOS
310 && p[-1] != ':' && p[-1] != '\\'
311 #endif
312 ) p--; 309 ) p--;
313 310
314 if (p == beg) 311 if (p == beg)
315 return Qnil; 312 return Qnil;
316 #ifdef DOS_NT 313 #ifdef DOS_NT
370 367
371 while (p != beg && !IS_ANY_SEP (p[-1]) 368 while (p != beg && !IS_ANY_SEP (p[-1])
372 #ifdef VMS 369 #ifdef VMS
373 && p[-1] != ':' && p[-1] != ']' && p[-1] != '>' 370 && p[-1] != ':' && p[-1] != ']' && p[-1] != '>'
374 #endif /* VMS */ 371 #endif /* VMS */
375 #ifdef MSDOS
376 && p[-1] != ':'
377 #endif
378 ) p--; 372 ) p--;
379 373
380 return make_string (p, end - p); 374 return make_string (p, end - p);
381 } 375 }
382 376
468 out[size++] = brack; 462 out[size++] = brack;
469 out[size] = '\0'; 463 out[size] = '\0';
470 } 464 }
471 #else /* not VMS */ 465 #else /* not VMS */
472 /* For Unix syntax, Append a slash if necessary */ 466 /* For Unix syntax, Append a slash if necessary */
473 #ifdef MSDOS
474 if (out[size] != ':' && out[size] != '/' && out[size] != '\\')
475 #else /* not MSDOS */
476 if (!IS_ANY_SEP (out[size])) 467 if (!IS_ANY_SEP (out[size]))
477 { 468 {
478 out[size + 1] = DIRECTORY_SEP; 469 out[size + 1] = DIRECTORY_SEP;
479 out[size + 2] = '\0'; 470 out[size + 2] = '\0';
480 } 471 }
481 #endif /* not MSDOS */
482 #endif /* not VMS */ 472 #endif /* not VMS */
483 return out; 473 return out;
484 } 474 }
485 475
486 DEFUN ("file-name-as-directory", Ffile_name_as_directory, 476 DEFUN ("file-name-as-directory", Ffile_name_as_directory,