From c7b707c2663477128e7bc4bb4c89363ef79d8ff1 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 28 Oct 1994 15:26:36 +0000 Subject: [PATCH] SkipToNewLine() fixed: did not work with a / at the end of a line --- lang/cem/cemcom.ansi/skip.c | 3 ++- lang/cem/cpp.ansi/skip.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lang/cem/cemcom.ansi/skip.c b/lang/cem/cemcom.ansi/skip.c index f96878a74..c3687fd0a 100644 --- a/lang/cem/cemcom.ansi/skip.c +++ b/lang/cem/cemcom.ansi/skip.c @@ -81,12 +81,13 @@ SkipToNewLine() delim = ch; garbage = 1; } else if (ch == '/') { - if ((ch = GetChar()) == '*' + if (GetChar() == '*' && !InputLevel ) { skipcomment(); continue; } + else UnGetChar(); } else if (ch == TOKSEP && InputLevel) { continue; diff --git a/lang/cem/cpp.ansi/skip.c b/lang/cem/cpp.ansi/skip.c index f03089b65..e9990ced2 100644 --- a/lang/cem/cpp.ansi/skip.c +++ b/lang/cem/cpp.ansi/skip.c @@ -74,10 +74,11 @@ SkipToNewLine() delim = ch; garbage = 1; } else if (ch == '/') { - if ((ch = GetChar()) == '*' && !InputLevel) { + if (GetChar() == '*' && !InputLevel) { skipcomment(); continue; } + else UnGetChar(); } else if (ch == TOKSEP && InputLevel) { continue; -- 2.34.1