Mercurial > emacs
changeset 11413:9cd115f44483
(scan_c_file): At end, restore file name last char to its original value.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 13 Apr 1995 16:05:43 +0000 |
parents | 513d8c69dc6f |
children | 60d40ca8c16b |
files | lib-src/make-docfile.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/make-docfile.c Thu Apr 13 16:03:08 1995 +0000 +++ b/lib-src/make-docfile.c Thu Apr 13 16:05:43 1995 +0000 @@ -322,8 +322,9 @@ 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 @@ return 0; } + /* Reset extension to be able to detect duplicate files. */ + filename[strlen (filename) - 1] = extension; + c = '\n'; while (!feof (infile)) {