diff options
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r-- | lib-src/make-docfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index df9c6e069f5..006600e162d 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -322,8 +322,9 @@ scan_c_file (filename, mode) register int defvarperbufferflag; register int defvarflag; int minargs, maxargs; + int extension = filename[strlen (filename) - 1]; - if (filename[strlen (filename) - 1] == 'o') + if (extension == 'o') filename[strlen (filename) - 1] = 'c'; infile = fopen (filename, mode); @@ -335,6 +336,9 @@ scan_c_file (filename, mode) return 0; } + /* Reset extension to be able to detect duplicate files. */ + filename[strlen (filename) - 1] = extension; + c = '\n'; while (!feof (infile)) { |