[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Fix Savannah bug #42151.
From: |
Werner LEMBERG |
Subject: |
[groff] 01/01: Fix Savannah bug #42151. |
Date: |
Sun, 19 Oct 2014 21:00:25 +0000 |
wl pushed a commit to branch master
in repository groff.
commit 1b5af3cc0b05ac1c64814f31af44f4429c87e41d
Author: Doug McIlroy <address@hidden>
Date: Sun Oct 19 22:57:53 2014 +0200
Fix Savannah bug #42151.
* src/preproc/eqn/lex.cpp (file_input::read_line): Handle CR/LF.
* src/preproc/pic/pic.cpp (file_input::read_line): Ditto.
---
ChangeLog | 7 +++++++
src/preproc/eqn/lex.cpp | 5 +++++
src/preproc/pic/lex.cpp | 5 +++++
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 122c767..cff0423 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-19 Doug McIlroy <address@hidden>
+
+ Fix Savannah bug #42151.
+
+ * src/preproc/eqn/lex.cpp (file_input::read_line): Handle CR/LF.
+ * src/preproc/pic/pic.cpp (file_input::read_line): Ditto.
+
2014-10-18 Werner LEMBERG <address@hidden>
[mdoc] Add Darwin version string for OS X 10.10.
diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index 9f99132..b6f15bd 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -413,6 +413,11 @@ int file_input::read_line()
lineno++;
for (;;) {
int c = getc(fp);
+ if (c == '\r') {
+ c = getc(fp);
+ if (c != '\n')
+ lex_error("invalid input character code %1", '\r');
+ }
if (c == EOF)
break;
else if (invalid_input_char(c))
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index f7f868d..2ebd28a 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -90,6 +90,11 @@ int file_input::read_line()
lineno++;
for (;;) {
int c = getc(fp);
+ if (c == '\r') {
+ c = getc(fp);
+ if (c != '\n')
+ lex_error("invalid input character code %1", '\r');
+ }
if (c == EOF)
break;
else if (invalid_input_char(c))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Fix Savannah bug #42151.,
Werner LEMBERG <=