Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 18502 invoked from network); 8 Mar 2007 21:43:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2007 21:43:56 -0000 Received: (qmail 52594 invoked by uid 500); 8 Mar 2007 21:44:05 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 52571 invoked by uid 500); 8 Mar 2007 21:44:05 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 52560 invoked by uid 99); 8 Mar 2007 21:44:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2007 13:44:04 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2007 13:43:55 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 927931A9838; Thu, 8 Mar 2007 13:43:34 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r516188 - /incubator/stdcxx/trunk/util/output.cpp Date: Thu, 08 Mar 2007 21:43:34 -0000 To: stdcxx-commits@incubator.apache.org From: ablack@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070308214334.927931A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ablack Date: Thu Mar 8 13:43:33 2007 New Revision: 516188 URL: http://svn.apache.org/viewvc?view=rev&rev=516188 Log: 2007-03-07 Andrew Black * util/output.cpp (check_compat_test): Rewrite FSM to eliminate seek to near end (was causing parsing issues on tests with output following result block). Modified: incubator/stdcxx/trunk/util/output.cpp Modified: incubator/stdcxx/trunk/util/output.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/output.cpp?view=diff&rev=516188&r1=516187&r2=516188 ============================================================================== --- incubator/stdcxx/trunk/util/output.cpp (original) +++ incubator/stdcxx/trunk/util/output.cpp Thu Mar 8 13:43:33 2007 @@ -145,9 +145,7 @@ assert (0 != data); assert (0 != status); - fseek (data, -70, SEEK_END); /* Seek near the end of the file */ - - for (tok = fgetc (data); fsm < 4 && !feof (data); tok = fgetc (data)) { + for (tok = fgetc (data); !feof (data); tok = fgetc (data)) { switch (tok) { case '\n': fsm = 1; @@ -159,20 +157,20 @@ fsm = 0; break; case ' ': - if (3 == fsm) { + if (3 == fsm) ++fsm; - break; - } + else + fsm = 0; + break; + case 'W': + if (4 == fsm && !feof (data)) /* leading "## W" eaten */ + read = fscanf (data, "arnings = %u\n## Assertions = %u\n" + "## FailedAssertions = %u", + &status->t_warn, &status->assert, &status->failed); default: fsm = 0; } } - if (!feof (data)) { /* leading "## W" eaten above */ - read = fscanf (data, "arnings = %u\n## Assertions = %u\n" - "## FailedAssertions = %u", - &status->t_warn, &status->assert, &status->failed); - } - if (3 != read) { status->status = ST_FORMAT; }