From b62bf6d5e27745da9a5842c6ac96356eb2b8f101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 30 Mar 2000 01:54:18 -0800 Subject: [PATCH] line numbering bugfix Rev: src/cpp.c:1.62 Rev: src/testsuite.in:1.290 --- src/cpp.c | 6 +++++- src/testsuite.in | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cpp.c b/src/cpp.c index 11425bfcd9..bb288e2a66 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -5,7 +5,7 @@ \*/ /* - * $Id: cpp.c,v 1.61 2000/03/09 16:46:03 jhs Exp $ + * $Id: cpp.c,v 1.62 2000/03/30 09:54:18 hubbe Exp $ */ #include "global.h" #include "language.h" @@ -416,11 +416,15 @@ while(1) \ if(data[pos+1]=='\n') \ { \ pos++; \ + this->current_line++; \ + PUTNL(); \ continue; \ } \ if(data[pos+1]=='\r' && data[pos+2]=='\n') \ { \ pos+=2; \ + this->current_line++; \ + PUTNL(); \ continue; \ } \ READCHAR(tmp); \ diff --git a/src/testsuite.in b/src/testsuite.in index bdeff0af5d..82df86fadb 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.289 2000/03/30 08:43:07 hubbe Exp $"]]); +test_true([["$Id: testsuite.in,v 1.290 2000/03/30 09:54:18 hubbe Exp $"]]); cond([[all_constants()->_verify_internals]], [[ @@ -24,6 +24,8 @@ test_eq(-2147483648*-1, -2147483648/-1); test_true([[1.0e-40]]); test_eq([[#"foo bar"]],[["foo\nbar"]]); +test_eq([[#"foo\ +bar"]],[["foobar"]]); test_true([[stringp(#string "Makefile")]]); test_any([[class Bar { array(int) foo = ({}); }; class Foo { inherit Bar; array(int) foo = ({1}); }; return sizeof(Foo()->foo);]],1); -- GitLab