You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/06/08 23:42:46 UTC

svn commit: r545641 - in /incubator/stdcxx/trunk/util: display.cpp output.cpp

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  <se...@roguewave.com>

	* 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;