emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108532: * make-docfile.c (search_lis


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108532: * make-docfile.c (search_lisp_doc_at_eol): Unget last read
Date: Fri, 08 Jun 2012 23:33:58 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108532
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Fri 2012-06-08 23:33:58 +0200
message:
  * make-docfile.c (search_lisp_doc_at_eol): Unget last read
  character.
modified:
  lib-src/ChangeLog
  lib-src/make-docfile.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2012-06-06 01:38:04 +0000
+++ b/lib-src/ChangeLog 2012-06-08 21:33:58 +0000
@@ -1,3 +1,8 @@
+2012-06-08  Andreas Schwab  <address@hidden>
+
+       * make-docfile.c (search_lisp_doc_at_eol): Unget last read
+       character.
+
 2012-06-06  Glenn Morris  <address@hidden>
 
        * Makefile.in (STAMP_INST_SCRIPTS, STAMP_SCRIPTS, insrcdir)

=== modified file 'lib-src/make-docfile.c'
--- a/lib-src/make-docfile.c    2012-05-30 03:59:42 +0000
+++ b/lib-src/make-docfile.c    2012-06-08 21:33:58 +0000
@@ -1025,7 +1025,7 @@
   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 @@
       fprintf (stderr, "## non-docstring in %s (%s)\n",
               buffer, filename);
 #endif
+      if (c != EOF)
+       ungetc (c, infile);
       return 0;
     }
   return 1;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]