From stdcxx-commits-return-1376-apmail-incubator-stdcxx-commits-archive=incubator.apache.org@incubator.apache.org Fri Jun 08 21:43:07 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 1696 invoked from network); 8 Jun 2007 21:43:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jun 2007 21:43:07 -0000 Received: (qmail 9671 invoked by uid 500); 8 Jun 2007 21:43:11 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 9659 invoked by uid 500); 8 Jun 2007 21:43:10 -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 9648 invoked by uid 99); 8 Jun 2007 21:43:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2007 14:43:10 -0700 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; Fri, 08 Jun 2007 14:43:06 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 5D6EB1A981C; Fri, 8 Jun 2007 14:42:46 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r545641 - in /incubator/stdcxx/trunk/util: display.cpp output.cpp Date: Fri, 08 Jun 2007 21:42:46 -0000 To: stdcxx-commits@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070608214246.5D6EB1A981C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Fri Jun 8 14:42:45 2007 New Revision: 545641 URL: http://svn.apache.org/viewvc?view=rev&rev=545641 Log: 2007-06-08 Martin Sebor * display.cpp (print_header_plain, print_target_plain): Increased the width of the first column (NAME) to 30 characters. * output.cpp (check_test, check_test_compat): Set the state of targets that produce an empty output file to ST_NO_OUTPUT. Modified: incubator/stdcxx/trunk/util/display.cpp incubator/stdcxx/trunk/util/output.cpp Modified: incubator/stdcxx/trunk/util/display.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/display.cpp?view=diff&rev=545641&r1=545640&r2=545641 ============================================================================== --- incubator/stdcxx/trunk/util/display.cpp (original) +++ incubator/stdcxx/trunk/util/display.cpp Fri Jun 8 14:42:45 2007 @@ -37,8 +37,8 @@ */ static void print_header_plain () { - puts ("NAME STATUS WARN ASSERTS FAILED PERCNT " - "USER SYS REAL"); + puts ("NAME STATUS WARN ASSERTS FAILED PERCNT" + " USER SYS REAL"); } /** @@ -47,7 +47,7 @@ static void print_target_plain (const struct target_opts*) { const char* const target_name = get_target (); - printf ("%-25.25s ", target_name); + printf ("%-30.30s ", target_name); fflush (stdout); } Modified: incubator/stdcxx/trunk/util/output.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/output.cpp?view=diff&rev=545641&r1=545640&r2=545641 ============================================================================== --- incubator/stdcxx/trunk/util/output.cpp (original) +++ incubator/stdcxx/trunk/util/output.cpp Fri Jun 8 14:42:45 2007 @@ -58,10 +58,14 @@ static void check_test (FILE* data, struct target_status* status) { - unsigned r_lvl = 0, r_active = 0, r_total = 0; - int fmt_ok = 0; - unsigned fsm = 0; - char tok; + unsigned r_lvl = 0; /* diagnostic severity level */ + unsigned r_active = 0; /* number of active diagnostics */ + unsigned r_total = 0; /* total number of diagnostics */ + + int fmt_ok = 0; /* is output format okay? */ + + unsigned fsm = 0; /* state */ + char tok; /* current character */ const char* const target_name = get_target (); @@ -69,7 +73,15 @@ assert (0 != data); assert (0 != status); - for (tok = fgetc (data); fsm < 6 && !feof (data); tok = fgetc (data)) { + tok = fgetc (data); + + if (feof (data)) { + /* target produced no output (regression test?) */ + status->status = ST_NO_OUTPUT; + return; + } + + for ( ; fsm < 6 && !feof (data); tok = fgetc (data)) { switch (tok) { case '\n': fsm = 1; @@ -145,7 +157,15 @@ assert (0 != data); assert (0 != status); - for (tok = fgetc (data); !feof (data); tok = fgetc (data)) { + tok = fgetc (data); + + if (feof (data)) { + /* target produced no output (regression test?) */ + status->status = ST_NO_OUTPUT; + return; + } + + for ( ; !feof (data); tok = fgetc (data)) { switch (tok) { case '\n': fsm = 1;