1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-05 20:43:08 +00:00

* make-docfile.c (search_lisp_doc_at_eol): Unget last read

character.
This commit is contained in:
Andreas Schwab 2012-06-08 23:33:58 +02:00
parent f81298f8af
commit 7cb70fd73e
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-06-08 Andreas Schwab <schwab@linux-m68k.org>
* make-docfile.c (search_lisp_doc_at_eol): Unget last read
character.
2012-06-06 Glenn Morris <rgm@gnu.org>
* Makefile.in (STAMP_INST_SCRIPTS, STAMP_SCRIPTS, insrcdir)

View File

@ -1025,7 +1025,7 @@ search_lisp_doc_at_eol (FILE *infile)
char c = 0, c1 = 0, c2 = 0;
/* Skip until the end of line; remember two previous chars. */
while (c != '\n' && c != '\r' && c >= 0)
while (c != '\n' && c != '\r' && c != EOF)
{
c2 = c1;
c1 = c;
@ -1040,6 +1040,8 @@ search_lisp_doc_at_eol (FILE *infile)
fprintf (stderr, "## non-docstring in %s (%s)\n",
buffer, filename);
#endif
if (c != EOF)
ungetc (c, infile);
return 0;
}
return 1;