aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 7c049568a2a..9a17863c457 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -110,6 +110,13 @@ extern int errno;
110#define intoken(arg) (_itk[arg]) /* T if char can be in token */ 110#define intoken(arg) (_itk[arg]) /* T if char can be in token */
111#define endtoken(arg) (_etk[arg]) /* T if char ends tokens */ 111#define endtoken(arg) (_etk[arg]) /* T if char ends tokens */
112 112
113#ifdef DOS_NT
114# define absolutefn(fn) (fn[0] == '/' || (isalpha (fn[0]) && fn[1] == ':'))
115#else
116# define absolutefn(fn) (fn[0] == '/')
117#endif
118
119
113/* 120/*
114 * xnew -- allocate storage 121 * xnew -- allocate storage
115 * 122 *
@@ -392,7 +399,7 @@ struct lang_entry lang_extensions[] =
392 { "cs", Cstar_entries }, 399 { "cs", Cstar_entries },
393 { "hs", Cstar_entries }, 400 { "hs", Cstar_entries },
394 401
395 /* .f and .for are FORTRAN. */ 402 /* .F, .f and .for are FORTRAN. */
396 { "F", Fortran_functions }, 403 { "F", Fortran_functions },
397 { "f", Fortran_functions }, 404 { "f", Fortran_functions },
398 { "for", Fortran_functions }, 405 { "for", Fortran_functions },
@@ -1033,11 +1040,7 @@ process_file (file)
1033 { 1040 {
1034 char *filename; 1041 char *filename;
1035 1042
1036#ifdef DOS_NT 1043 if (absolutefn (file))
1037 if (file[0] == '/' || (isalpha (file[0]) && file[1] == ':'))
1038#else
1039 if (file[0] == '/')
1040#endif
1041 { 1044 {
1042 /* file is an absolute filename. Canonicalise it. */ 1045 /* file is an absolute filename. Canonicalise it. */
1043 filename = absolute_filename (file, cwd); 1046 filename = absolute_filename (file, cwd);
@@ -1131,7 +1134,10 @@ find_entries (file, inf)
1131 1134
1132 /* No Fortran entries found. Try C. */ 1135 /* No Fortran entries found. Try C. */
1133 if (old_last_node == last_node) 1136 if (old_last_node == last_node)
1134 default_C_entries (inf); 1137 {
1138 rewind (inf);
1139 default_C_entries (inf);
1140 }
1135 fclose (inf); 1141 fclose (inf);
1136} 1142}
1137 1143
@@ -3751,11 +3757,7 @@ absolute_filename (file, cwd)
3751{ 3757{
3752 char *slashp, *cp, *res; 3758 char *slashp, *cp, *res;
3753 3759
3754#ifdef DOS_NT 3760 if (absolutefn (file))
3755 if (file[0] == '/' || (isalpha (file[0]) && file[1] == ':'))
3756#else
3757 if (file[0] == '/')
3758#endif
3759 res = concat (file, "", ""); 3761 res = concat (file, "", "");
3760 else 3762 else
3761 res = concat (cwd, file, ""); 3763 res = concat (cwd, file, "");