summaryrefslogtreecommitdiff
path: root/src/preproc/eqn/lex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/preproc/eqn/lex.cpp')
-rw-r--r--src/preproc/eqn/lex.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index b328801d..899ecaeb 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -1,6 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005, 2007,
- 2008, 2009
+/* Copyright (C) 1989-1992, 2000-2003, 2005, 2007-2009, 2013
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -1058,6 +1057,9 @@ void do_ifdef()
}
}
+char start_delim_saved = '\0';
+char end_delim_saved = '\0';
+
void do_delim()
{
int c = get_char();
@@ -1069,8 +1071,14 @@ void do_delim()
else {
if (c == 'o' && d == 'f' && peek_char() == 'f') {
(void)get_char();
+ start_delim_saved = start_delim;
+ end_delim_saved = end_delim;
start_delim = end_delim = '\0';
}
+ else if (c == 'o' && d == 'n' && !compatible_flag) {
+ start_delim = start_delim_saved;
+ end_delim = end_delim_saved;
+ }
else {
start_delim = c;
end_delim = d;