From 9fbd4783a71a74f885cc0ab3e3cfca0f4f4fcdc3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 15 Nov 1993 09:29:39 +0000 Subject: [PATCH] Fixed bug with "/*" --- util/cpp/skip.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/util/cpp/skip.c b/util/cpp/skip.c index de2be7eb7..3416b7541 100644 --- a/util/cpp/skip.c +++ b/util/cpp/skip.c @@ -62,6 +62,28 @@ skipline() LoadChar(c); while (class(c) != STNL && c != EOI) { + if (class(c) == STSTR || class(c) == STCHAR) { + register int stopc = c; + int escaped; + do { + escaped = 0; + LoadChar(c); + if (class(c) == STNL || c == EOI) { + break; + } + if (c == '\\') { + LoadChar(c); + if (c == '\n') { + ++LineNumber; + } + else escaped = 1; + } + } while (escaped || c != stopc); + if (class(c) != STNL && c != EOI) { + LoadChar(c); + } + continue; + } if (c == '\\') { LoadChar(c); if (class(c) == STNL) -- 2.34.1