diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-04-13 16:05:43 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-04-13 16:05:43 +0000 |
commit | 1feb8ae1f5de89da5e38b1764772b4effe1e2b0e (patch) | |
tree | aba4f4bfc5f23bf85416a2cc279200ae98ac00bf /lib-src/make-docfile.c | |
parent | 0731825e49a03ee06473fcb398e21eed23721c78 (diff) | |
download | emacs-1feb8ae1f5de89da5e38b1764772b4effe1e2b0e.tar.gz |
(scan_c_file): At end, restore file name last char to its original value.
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)) { |