comparison lib-src/etags.c @ 12242:4fa8c6b3f192

(process_file,absolute_filename): Handle filenames starting with a drive letter.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 Jun 1995 15:30:58 +0000
parents e550e0d13e83
children 7e7941d8cceb
comparison
equal deleted inserted replaced
12241:f92938c6b7c9 12242:4fa8c6b3f192
1031 1031
1032 if (!CTAGS) 1032 if (!CTAGS)
1033 { 1033 {
1034 char *filename; 1034 char *filename;
1035 1035
1036 #ifdef DOS_NT
1037 if (file[0] == '/' || (isalpha (file[0]) && file[1] == ':'))
1038 #else
1036 if (file[0] == '/') 1039 if (file[0] == '/')
1040 #endif
1037 { 1041 {
1038 /* file is an absolute filename. Canonicalise it. */ 1042 /* file is an absolute filename. Canonicalise it. */
1039 filename = absolute_filename (file, cwd); 1043 filename = absolute_filename (file, cwd);
1040 } 1044 }
1041 else 1045 else
3745 absolute_filename (file, cwd) 3749 absolute_filename (file, cwd)
3746 char *file, *cwd; 3750 char *file, *cwd;
3747 { 3751 {
3748 char *slashp, *cp, *res; 3752 char *slashp, *cp, *res;
3749 3753
3754 #ifdef DOS_NT
3755 if (file[0] == '/' || (isalpha (file[0]) && file[1] == ':'))
3756 #else
3750 if (file[0] == '/') 3757 if (file[0] == '/')
3758 #endif
3751 res = concat (file, "", ""); 3759 res = concat (file, "", "");
3752 else 3760 else
3753 res = concat (cwd, file, ""); 3761 res = concat (cwd, file, "");
3754 3762
3755 /* Delete the "/dirname/.." and "/." substrings. */ 3763 /* Delete the "/dirname/.." and "/." substrings. */