stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r580483 [42/42] - in /incubator/stdcxx/branches/4.2.0: ./ bin/ doc/ doc/stdlibref/ doc/stdlibug/ etc/config/ etc/config/src/ etc/config/windows/ etc/nls/charmaps/ etc/nls/posix/charmaps/ etc/nls/posix/src/ etc/nls/src/ examples/manual/ exam...
Date Fri, 28 Sep 2007 20:57:41 GMT
Modified: incubator/stdcxx/branches/4.2.0/tests/strings/21.string.find.last.of.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/strings/21.string.find.last.of.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/tests/strings/21.string.find.last.of.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/strings/21.string.find.last.of.cpp Fri Sep 28 13:55:52 2007
@@ -424,10 +424,10 @@
     TEST ("abcdefghij", "abc",        10,  3,    2,       0),
     TEST ("abcdefghij", "cba",        10,  1,    2,       0),
 
-    TEST ("",           "cba",         0, -1,    0,       1),
-    TEST ("abcdefghij", "cba",         0, -1,    0,       1),
-    TEST ("x@4096",     "xxx",         0, -1,    0,       1),
-    TEST ("abcdefghij", "x@4096",      0, -1,    0,       1),
+    TEST ("",           "cba",         0, -1, NPOS,       0),
+    TEST ("abcdefghij", "cbaj",        9, -1,    9,       0),
+    TEST ("x@4096",     "xxx",      4095, -1, 4095,       0),
+    TEST ("abcdefghij", "jx@4096",     9, -1,    9,       0),
 
     TEST ("last test", "test",         9,  4,    8,       0)
 };

Copied: incubator/stdcxx/branches/4.2.0/tests/support/18.csetjmp.cpp (from r580189, incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp)
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/support/18.csetjmp.cpp?p2=incubator/stdcxx/branches/4.2.0/tests/support/18.csetjmp.cpp&p1=incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp&r1=580189&r2=580483&rev=580483&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/support/18.csetjmp.cpp Fri Sep 28 13:55:52 2007
@@ -2,7 +2,7 @@
  *
  * 18.csetjmp.cpp - test exercising [support.runtime], header <csetjmp>
  *
- * $Id:$
+ * $Id$
  *
  ***************************************************************************
  *

Modified: incubator/stdcxx/branches/4.2.0/tests/support/18.exception.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/support/18.exception.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/tests/support/18.exception.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/support/18.exception.cpp Fri Sep 28 13:55:52 2007
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -727,6 +727,15 @@
     E_bad_alloc, E_bad_cast, E_bad_exception, E_bad_typeid, E_error
 };
 
+
+// helper classes used by the bad_cast test
+// defined at namespace scope rather than at local scope
+// to work around an Intel C++ 10.0 ICE (see STDCXX-475)
+struct Base { virtual ~Base () { } };
+struct Derived1: Base { };
+struct Derived2: Base { };
+
+
 // induce the language runtime into throwing an exception
 // returns e if exception cannot bee thrown
 static RuntimeExceptionId
@@ -801,14 +810,11 @@
 
 #ifndef _RWSTD_NO_DYNAMIC_CAST
 
-        struct A { virtual ~A () { } };
-        struct B: A { } b;
-        struct C: A { };
-
-        A &a = b;
+        Derived1 b;
+        Base &a = b;
 
         // induce bad_cast
-        dynamic_cast<C&>(a);
+        dynamic_cast<Derived2&>(a);
 
         return E_error;
 

Modified: incubator/stdcxx/branches/4.2.0/tests/support/18.limits.cvqual.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/support/18.limits.cvqual.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/tests/support/18.limits.cvqual.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/support/18.limits.cvqual.cpp Fri Sep 28 13:55:52 2007
@@ -1,28 +1,32 @@
-// -*- C++ -*-
 /***************************************************************************
  *
- * 18.limits.cvqual.cpp - test exercising lib.numeric.limits
+ * 18.limits.cvqual.cpp:
+ *
+ *   Test exercising lib.numeric.limits, numeric_limits specializations
+ *   on cv-qualified scalar types. See DR 559 for details:
+ *   http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559
  *
  * $Id$
  *
  ***************************************************************************
  *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
- *
- * Copyright 2006 Rogue Wave Software.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  License); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2006-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -52,6 +56,8 @@
     typedef std::numeric_limits<T>            limits;
     typedef std::numeric_limits<CVQualifiedT> cv_limits;
 
+   // verify that the member has the same value as the same member
+   // of a specialization of numeric_limits on the cv-qualified T
 #  define TEST(member)                                                      \
       rw_assert (limits::member == cv_limits::member, 0, __LINE__,          \
                  "numeric_limits<%s>::%s == numeric_limits<%s %1$s>::%2$s", \
@@ -61,6 +67,9 @@
     typedef std::numeric_limits<UserType<T> > limits;
     typedef std::numeric_limits<CVQualifiedT> cv_limits;
 
+   // verify that the member has the same value as the same member
+   // of a specialization of numeric_limits on some user-defined T
+   // (i.e., the primary template)
 #  define TEST(member)                                                      \
       rw_assert (limits::member == cv_limits::member, 0, __LINE__,          \
                  "numeric_limits<%s>::%s == numeric_limits<%s %1$s>::%2$s", \
@@ -98,7 +107,13 @@
         TEST (signaling_NaN ());
     }
     else {
-        // test NaN
+        const bool expect = limits::has_quiet_NaN;
+
+        rw_assert (expect == (limits::quiet_NaN () != cv_limits::quiet_NaN ()),
+                   0, __LINE__,
+                   "numeric_limits<%s>::qNaN() %{?}!=%{:}==%{;} "
+                   "numeric_limits<%s %1$s>::qNaN ()",
+                   tname, expect, quals);
     }
 
     TEST (denorm_min ());
@@ -120,7 +135,8 @@
     typedef volatile T       volatile_T;
     typedef const volatile T const_volatile_T;
     
-    rw_info (0, 0, 0, "std::numeric_limits<T> with T = cv-qualified %s", tname);
+    rw_info (0, 0, __LINE__,
+             "std::numeric_limits<T> with T = cv-qualified %s", tname);
 
     test_limits ((T*)0, (const_T*)0, tname, "const");
     test_limits ((T*)0, (volatile_T*)0, tname, "volatile");
@@ -184,5 +200,5 @@
                     "specializations on cv-qualifed types",
                     run_test,
                     0,
-                    0);
+                    (void*)0);
 }

Copied: incubator/stdcxx/branches/4.2.0/tests/support/18.setjmp.cpp (from r580185, incubator/stdcxx/trunk/tests/support/18.setjmp.cpp)
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/support/18.setjmp.cpp?p2=incubator/stdcxx/branches/4.2.0/tests/support/18.setjmp.cpp&p1=incubator/stdcxx/trunk/tests/support/18.setjmp.cpp&r1=580185&r2=580483&rev=580483&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.setjmp.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/support/18.setjmp.cpp Fri Sep 28 13:55:52 2007
@@ -2,7 +2,7 @@
  *
  * 18.setjmp.cpp - test exercising [support.runtime], header <setjmp.h>
  *
- * $Id:$
+ * $Id$
  *
  ***************************************************************************
  *

Modified: incubator/stdcxx/branches/4.2.0/tests/support/atomic_xchg.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/support/atomic_xchg.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/tests/support/atomic_xchg.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/support/atomic_xchg.cpp Fri Sep 28 13:55:52 2007
@@ -294,11 +294,15 @@
         }
     }
 
-    // compute the expected result
+    // compute the expected result, "skipping" zeros by incrementing
+    // expect twice when it overflows and wraps around to 0 (zero is
+    // used as the lock variable in thread_routine() above)
     intT expect = intT (1);
 
-    for (unsigned long i = 0; i != (Args::nthreads_ * Args::nincr_) / 2U; ++i) {
-        if (!++expect)
+    const unsigned long nincr = (Args::nthreads_ * Args::nincr_) / 2U;
+        
+    for (unsigned long i = 0; i != nincr; ++i) {
+        if (intT () == ++expect)
             ++expect;
     }
 

Modified: incubator/stdcxx/branches/4.2.0/tests/utilities/20.temp.buffer.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/tests/utilities/20.temp.buffer.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/tests/utilities/20.temp.buffer.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/tests/utilities/20.temp.buffer.cpp Fri Sep 28 13:55:52 2007
@@ -33,6 +33,10 @@
 #include <cstdio>      // for sprintf()
 #include <cstring>     // for memset()
 
+#ifdef _MSC_VER
+#  include <climits>     // for INT_MAX
+#endif
+
 #include <rw_new.h>
 #include <driver.h>
 
@@ -385,7 +389,7 @@
 struct MyStruct { };
 typedef void (MyStruct::*MemberPointer)();
 
-template <unsigned long N>
+template <std::size_t N>
 struct BigStruct { char dummy [N]; };
 
 /**************************************************************************/
@@ -440,12 +444,20 @@
 #if    (!defined (__IBMCPP__) || __IBMCPP__ > 700) \
     && !defined (__HP_aCC)
 
+#  ifndef _MSC_VER
+    const std::size_t MAX_SIZE = _RWSTD_PTRDIFF_MAX;
+#  else
+    // the MSVC and ICC/Windows has maximum size of
+    // the array equal to 0x7fffffff bytes
+    const std::size_t MAX_SIZE = INT_MAX;
+#  endif
+
     // avoid instantiating test on very large structs
     // to prevent failures (at compile or run-time) due
     // to compiler bugs
-    test_failure ((BigStruct<_RWSTD_PTRDIFF_MAX / 2>*)0, 0);
-    test_failure ((BigStruct<_RWSTD_PTRDIFF_MAX - 1>*)0, 0);
-    test_failure ((BigStruct<_RWSTD_PTRDIFF_MAX>*)0, 0);
+    test_failure ((BigStruct<MAX_SIZE / 2>*)0, 0);
+    test_failure ((BigStruct<MAX_SIZE - 1>*)0, 0);
+    test_failure ((BigStruct<MAX_SIZE>*)0, 0);
 
 #else
 

Modified: incubator/stdcxx/branches/4.2.0/util/aliases.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/aliases.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/aliases.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/aliases.cpp Fri Sep 28 13:55:52 2007
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -42,7 +42,7 @@
 #include <cstdio>
 #include <cstring>   // for memcpy(), strlen()
 #include <clocale>   // for setlocale()
-#include <locale>
+#include <locale>    // for tolower()
 #include <iostream>
 #include <string>
 #include <vector>
@@ -349,8 +349,8 @@
     std::string::const_iterator it1 = s1.begin ();
     std::string::const_iterator it2 = s2.begin ();
     for (; it1 != s1.end () && it2 != s2.end (); it1++, it2++)
-        if (std::tolower(*it1, std::locale ()) !=
-            std::tolower(*it2, std::locale ()))
+        if (   (std::tolower)(*it1, std::locale ())
+            != (std::tolower)(*it2, std::locale ()))
             return (*it1 - *it2);
 
     return 0;

Modified: incubator/stdcxx/branches/4.2.0/util/charmap.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/charmap.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/charmap.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/charmap.cpp Fri Sep 28 13:55:52 2007
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -73,7 +73,7 @@
 // the numeric values cannot be greater then 3 digits long
 #define MAX_BYTE_LEN 5
 
-#ifndef _MSC_VER
+#ifndef _RWSTD_NO_ICONV
 
 static iconv_t
 my_iconv_open (const char *to_codeset, const char *from_codeset)
@@ -163,7 +163,7 @@
 }
 
 #  endif   // _RWSTD_NO_ISO_10646_WCHAR_T
-#endif  // _MSC_VER
+#endif   // _RWSTD_NO_ICONV
 
 
 // utf8_decode translates the UTF-8 encoded character (specified
@@ -433,20 +433,21 @@
 }
 
 
-#ifndef _MSC_VER
 char* Charmap::convert_to_utf8 (const char *inbuf, size_t inbuf_s, 
                                 char *outbuf, size_t outbuf_s) const
 {
+#ifndef _RWSTD_NO_ICONV
+
     if (ic_to_utf8_ == iconv_t (-1))
         return 0;
 
     char* outbufp = outbuf;
 
-#ifndef _RWSTD_NO_ICONV_CONST_CHAR
+#  ifndef _RWSTD_NO_ICONV_CONST_CHAR
     const char* inbufp = inbuf;
-#else
+#  else
     char* inbufp = _RWSTD_CONST_CAST(char*, inbuf);
-#endif   // _RWSTD_NO_ICONV_CONST_CHAR
+#  endif   // _RWSTD_NO_ICONV_CONST_CHAR
     
     if (std::size_t (-1) == 
         iconv (ic_to_utf8_, &inbufp, &inbuf_s, &outbufp, &outbuf_s)) {
@@ -460,8 +461,15 @@
     }
 
     return outbufp;
+
+#else   // if defined (_RWSTD_NO_ICONV)
+
+    return 0;
+
+#endif   // _RWSTD_NO_ICONV
+
 }
-#endif  // _MSC_VER
+
 
 
 std::string Charmap::get_charmap_name () const
@@ -643,7 +651,7 @@
 
     const unsigned long val = std::strtoul (&*++it, (char**)0, 16);
 
-    if (_RWSTD_WCHAR_T_MAX <= val)
+    if (_RWSTD_WCHAR_MAX <= val)
         issue_diag (E_UCS, true, 0, 
                     "UCS value %lu of symbolic character %s out of range.\n",
                     val, sym.c_str ());
@@ -988,10 +996,10 @@
        reverse_maps (create_reverse_maps),
        UCS4_internal_ (use_UCS4)
 {
-#ifndef _MSC_VER
+#ifndef _RWSTD_NO_ICONV
     ic_to_utf8_ = 0;
     ic_to_ext_ = 0;
-#endif  // _MSC_VER
+#endif   // _RWSTD_NO_ICONV
 
     scanner_.open (fname, '#', '\\');
 
@@ -1020,21 +1028,26 @@
 
             // we always need a iconv to utf8 so that we can create
             // the utf8_charmap unless we are on windows
-#if !defined (_MSC_VER)
+#ifndef _RWSTD_NO_ICONV
             if (!in_utf8_) {
                 ic_to_utf8_ = open_iconv_to_utf8 ();
 #  if !defined (_RWSTD_NO_ISO_10646_WCHAR_T)
                 ic_to_ext_ = open_iconv_to_ext ();
 #  endif   // _RWSTD_NO_ISO_10646_WCHAR_T
             }
-#else
+
+#else   // if defined (_RWSTD_NO_ICONV)
+
+#  ifdef _MSC_VER
             codepage_ = get_codepage (code_set_name_);
             if (codepage_ == 0) {
                 issue_diag (W_ICONV, false, 0, 
                             "iconv_open (%s to UTF-8) failed\n",
                             code_set_name_.c_str());
             }
-#endif     // _MSC_VER
+
+#  endif   // _MSC_VER
+#endif   // _RWSTD_NO_ICONV
 
             scanner_.ignore_line ();
             break;

Modified: incubator/stdcxx/branches/4.2.0/util/charmap.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/charmap.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/charmap.h (original)
+++ incubator/stdcxx/branches/4.2.0/util/charmap.h Fri Sep 28 13:55:52 2007
@@ -22,24 +22,23 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
 
-#ifndef _RWSTD_LOC_CHARMAP_H_INCLUDED
-#define _RWSTD_LOC_CHARMAP_H_INCLUDED
+#ifndef _RWSTD_CHARMAP_H_INCLUDED
+#define _RWSTD_CHARMAP_H_INCLUDED
 
 #include <string>
 #include <list>
 #include <map>
 #include <set>
 
-#ifndef _MSC_VER
-#  ifndef _RWSTD_NO_ICONV
-#    include <iconv.h>
-#  endif
-#endif  // _MSC_VER
+#ifndef _RWSTD_NO_ICONV
+#  include <iconv.h>
+#endif   // _RWSTD_NO_ICONV
+
 
 #include "scanner.h"
 
@@ -162,10 +161,10 @@
     // are defined in the character map
     void verify_portable_charset () const;
 
-#ifndef _MSC_VER
+#ifndef _RWSTD_NO_ICONV
     // open the iconv descriptor to convert to utf8
     iconv_t open_iconv_to_utf8 () const;
-#endif  // _MSC_VER
+#endif   // _RWSTD_NO_ICONV
 
     // convert a human-readable encoding of a character
     // to its raw multibyte character representation
@@ -175,13 +174,14 @@
     char* convert_to_utf8 (const char *inbuf, std::size_t inbuf_s, 
                            char *outbuf, std::size_t outbuf_s) const;
 
-#ifndef _MSC_VER
+#ifndef _RWSTD_NO_ICONV
 #  ifndef _RWSTD_NO_ISO_10646_WCHAR_T    
+
     // open the iconv descriptor to convert from utf8 to the external encoding
     iconv_t open_iconv_to_ext ();
 
 #  endif   // _RWSTD_NO_ISO_10646_WCHAR_T
-#endif  // _MSC_VER
+#endif   // _RWSTD_NO_ICONV
     
     // add the symbolic name of a character and the raw multibyte
     // character corresponding to it to the character maps
@@ -225,13 +225,13 @@
     // the number of bytes in the largest multi-byte value
     int mb_cur_max_;
 
-#ifndef _MSC_VER
+#ifndef _RWSTD_NO_ICONV
     // the iconv file descriptor that converts to utf8
     iconv_t ic_to_utf8_;
 
     // the iconv file descriptor that converts from utf8 to external
     iconv_t ic_to_ext_;
-#endif  // _MSC_VER
+#endif   // _RWSTD_NO_ICONV
 
     // the name of the character map file
     std::string charmap_name_;
@@ -260,5 +260,5 @@
 };
 
 
-#endif   // _RWSTD_LOC_CHARMAP_H_INCLUDED
+#endif   // _RWSTD_CHARMAP_H_INCLUDED
 

Modified: incubator/stdcxx/branches/4.2.0/util/cmdopt.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/cmdopt.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/cmdopt.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/cmdopt.cpp Fri Sep 28 13:55:52 2007
@@ -72,7 +72,15 @@
 const char default_path_sep = '\\';
 const char suffix_sep = '.';
 const size_t exe_suffix_len = 4; /* strlen(".exe") == 4 */
-const float TICKS_PER_SEC = 10000000; /* 100 nanosecond units in a second */
+const float TICKS_PER_SEC = CLOCKS_PER_SEC;
+
+#  ifndef _WIN32_WINNT
+#    define _WIN32_WINNT 0x0500
+#  endif
+
+#  if _WIN32_WINNT >= 0x0500
+#    define RLIMIT_AS
+#  endif
 #endif
 
 static const char
@@ -81,6 +89,8 @@
     "\n"
     "  Treats each token in targets as the path to an executable. Each target\n"
     "  enumerated is executed, and the output is processed after termination.\n"
+    "  If target prepended by '@' character, target is treated as text file\n"
+    "  with list of targets (one target per line).\n"
     "  If the execution takes longer than a certain (configurable) amount of\n"
     "  time, the process is killed.\n"
     "\n"
@@ -345,8 +355,8 @@
 
                 /* determine whether the hard limit and/or the soft limit
                    should be set. */
-                const bool hard = isupper (arg [0]);
-                const bool soft = islower (arg [1]);
+                const bool hard = 0 != isupper (arg [0]);
+                const bool soft = 0 != islower (arg [1]);
 
                 arg += limits [i].len + 1;
 
@@ -495,11 +505,15 @@
     const char opt_signal[]   = "--signal";
     const char opt_sleep[]    = "--sleep";
     const char opt_ulimit[]   = "--ulimit";
+    const char opt_verbose[]  = "--verbose";
     const char opt_warn[]     = "--warn";
 
     int i;
 
     assert (0 != argv);
+    assert (0 != defaults);
+
+    memset (defaults, 0, sizeof (target_opts));
 
     /* The chain of preprocesor logic below initializes the defaults->c_warn 
        and defaults->l_warn values.
@@ -544,13 +558,15 @@
         char* end = 0;
 
         switch (argv [i][1]) {
-        case '?':
+        case '?':   /* display help and exit with status of 0 */
         case 'h':
             show_usage (0);
+
         case 'r':
             ++i; /* Ignore -r option (makefile compat) */
             break;
-        case 't':
+
+        case 't':   /* executable timeout in seconds */
             optname = opt_timeout;
             optarg  = get_short_val (argv, &i);
             if (optarg) {
@@ -567,19 +583,26 @@
 
             break;
 
-        case 'd':
+        case 'd':   /* directory containing example reference files */
             optname = opt_data_dir;
             defaults->data_dir = get_short_val (argv, &i);
             if (!defaults->data_dir)
                 missing_value (optname);
             break;
-        case 'x':
+
+        case 'v':   /* enable verbose mode */
+            optname = opt_verbose;
+            ++defaults->verbose;
+            break;
+
+        case 'x':   /* command line options to pass to targets */
             optname  = opt_t_flags;
             *exe_opts = get_short_val (argv, &i);
             if (!*exe_opts)
                 missing_value (optname);
             break;
-        case '-':
+
+        case '-':   /* long options */
         {
             const size_t arglen = strlen (argv [i]);
 
@@ -589,16 +612,19 @@
 
             if (   sizeof opt_compat - 1 == arglen
                 && !memcmp (opt_compat, argv [i], sizeof opt_compat)) {
+                /* enter compatibility mode */
                 defaults->compat = 1;
                 break;
             }
             else if (   sizeof opt_nocompat - 1 == arglen
                      && !memcmp (opt_nocompat, argv [i], sizeof opt_nocompat)) {
+                /* exit compatibility mode */
                 defaults->compat = 0;
                 break;
             }
             else if (   sizeof opt_exit - 1 <= arglen
                      && !memcmp (opt_exit, argv [i], sizeof opt_exit - 1)) {
+                /* exit immediately with the specified status */
                 optname = opt_exit;
                 optarg  = get_long_val (argv, &i, sizeof opt_exit - 1);
                 if (optarg && *optarg) {
@@ -613,12 +639,14 @@
             }
             else if (   sizeof opt_help - 1 == arglen
                      && !memcmp (opt_help, argv [i], sizeof opt_help - 1)) {
+                /* display help and exit with status of 0 */
                 optname = opt_help;
                 show_usage (0);
                 break;
             }
             else if (   sizeof opt_sleep - 1 <= arglen
                      && !memcmp (opt_sleep, argv [i], sizeof opt_sleep - 1)) {
+                /* sleep for the specified number of seconds */ 
                 optname = opt_sleep;
                 optarg  = get_long_val (argv, &i, sizeof opt_sleep - 1);
                 if (optarg && *optarg) {
@@ -635,6 +663,7 @@
             }
             else if (   sizeof opt_signal - 1 <= arglen
                      && !memcmp (opt_signal, argv [i], sizeof opt_signal - 1)) {
+                /* send ourselves the specified signal */
                 optname = opt_signal;
                 optarg  = get_long_val (argv, &i, sizeof opt_signal - 1);
                 if (optarg && *optarg) {
@@ -649,6 +678,7 @@
             }
             else if (   sizeof opt_ignore - 1 <= arglen
                      && !memcmp (opt_ignore, argv [i], sizeof opt_ignore - 1)) {
+                /* ignore the specified signal */
                 optname = opt_ignore;
                 optarg  = get_long_val (argv, &i, sizeof opt_ignore - 1);
                 if (optarg && *optarg) {
@@ -663,6 +693,7 @@
             }
             else if (   sizeof opt_ulimit - 1 <= arglen
                      && !memcmp (opt_ulimit, argv [i], sizeof opt_ulimit - 1)) {
+                /* set child process resource utilization limits */
                 optname = opt_ulimit;
                 optarg  = get_long_val (argv, &i, sizeof opt_ulimit - 1);
                 if (optarg && *optarg) {
@@ -673,6 +704,7 @@
             }
             else if (   sizeof opt_warn - 1 <= arglen
                      && !memcmp (opt_warn, argv [i], sizeof opt_warn - 1)) {
+                /* set compiler warning mode */
                 optname = opt_warn;
                 optarg  = get_long_val (argv, &i, sizeof opt_warn - 1);
                 if (optarg && *optarg) {

Modified: incubator/stdcxx/branches/4.2.0/util/ctype.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/ctype.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/ctype.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/ctype.cpp Fri Sep 28 13:55:52 2007
@@ -55,7 +55,7 @@
 
     long w = std::strtol (t.name.substr (2, t.name.size ()).c_str (),
                                0, 16);
-    if (w > _RWSTD_WCHAR_T_MAX) {
+    if (w > _RWSTD_WCHAR_MAX) {
         // issue_diag intercepted in process_transliteration_statement
         // but will render -w switch useless; just throw here
         throw loc_exception ("symbol could not be converted to UCS-4 "

Modified: incubator/stdcxx/branches/4.2.0/util/display.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/display.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/display.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/display.cpp Fri Sep 28 13:55:52 2007
@@ -26,31 +26,156 @@
 
 #include <assert.h>
 #include <stdio.h>      /* for fflush(), printf(), puts(), ... */
+#include <string.h>     /* for strchr() */
 
 #include "cmdopt.h" /* for target_name -should this be moved? */
 #include "exec.h" /* for get_signame */
 
 #include "display.h"
+#include "target.h"   /* for target_status */
+
+
+/**
+   ProcessStatus enum lookup table for 'short' (6 character) strings.
+*/
+static const char* const
+short_st_name [ST_LAST] = {
+    "OK", /*ST_OK*/
+    "COMP", /*ST_COMPILE*/
+    "LINK", /*ST_LINK*/
+    "EXIST", /*ST_EXIST*/
+    "XPERM", /*ST_EXECUTE_FLAG*/
+    "EXEC", /*ST_EXECUTE*/
+    "NOUT", /*ST_NO_OUTPUT*/
+    "OUTPUT", /*ST_NO_REF*/
+    "BREF", /*ST_BAD_REF*/
+    "DIFF", /*ST_BAD_OUTPUT*/
+    "FORMAT", /*ST_FORMAT*/
+    "OFLOW", /*ST_OVERFLOW*/
+    "ERROR", /*ST_SYSTEM_ERROR*/
+    "KILLED", /*ST_KILLED*/
+    "NKILL" /*ST_NOT_KILLED*/
+};
+
+
+/**
+   ProcessStatus enum lookup table for descriptive strings.
+*/
+static const char* const
+verbose_st_name [ST_LAST] = {
+    "OK", /*ST_OK*/
+    "Program failed to compile.", /*ST_COMPILE*/
+    "Program failed to link.", /*ST_LINK*/
+    "Program executable not found.", /*ST_EXIST*/
+    "Program not executable.", /*ST_EXECUTE_FLAG*/
+    "Program failed to execute.", /*ST_EXECUTE*/
+    "Program generated no output.", /*ST_NO_OUTPUT*/
+    "Program reference output missing.", /*ST_NO_REF*/
+    "Bad reference.", /*ST_BAD_REF*/
+    "Program produced unexpected output.", /*ST_BAD_OUTPUT*/
+    "Program produced output in unexpected format.", /*ST_FORMAT*/
+    "Arithmetic overflow.", /*ST_OVERFLOW*/
+    "System error occurred.", /*ST_SYSTEM_ERROR*/
+    "Process killed after a timeout.", /*ST_KILLED*/
+    "Failed to kill process after a timeout." /*ST_NOT_KILLED*/
+};
+
+
+/**
+   Prints an argv array, quoting elelemnts containing spaces.
+*/
+static int
+print_argv (const char* const argv[], int newline)
+{
+    assert (0 != argv);
+
+    const char* const* parg = argv;
+
+    int nchars = 0;
+
+    for (parg = argv; *parg; ++parg) {
+
+        const char *fmt = "%s ";
+
+        if (strchr (*parg, ' '))
+            fmt = "\"%s\" ";
+
+        nchars += printf (fmt, *parg);
+    }
+
+    if (newline)
+        puts ("");
+
+    return nchars;
+}
+
 
 /**
    Generates output header, designed for text output and console viewing.
 */
-static void print_header_plain ()
+static void
+print_header_plain (const char* const argv[])
 {
+    (void)&argv;
+
     puts ("NAME                           STATUS WARN ASSERTS FAILED PERCNT"
           "    USER     SYS    REAL");
 }
 
+
+/**
+   Generates output header in verbose mode.
+*/
+static void
+print_header_verbose (const char* const argv[])
+{
+    print_argv (argv, 1 /* append newline */);
+}
+
+
+
 /**
    Generates target name listing, designed for text output and console viewing.
 */
-static void print_target_plain (const struct target_opts*)
+static void
+print_target_plain (const struct target_opts *defaults)
 {
     const char* const target_name = get_target ();
+
+    assert (0 == defaults->verbose);
+
     printf ("%-30.30s ", target_name);
+
+    /* flush to prevent killing a signal from not displaying the text */
+    fflush (stdout);
+}
+
+
+/**
+   Generates target name listing, designed for text output and console viewing.
+*/
+static void
+print_target_verbose (const struct target_opts *defaults)
+{
+    assert (defaults->verbose);
+
+    printf ("%s ", "Executing \"");
+    print_argv (defaults->argv, 0 /* no newline */);
+
+    /* print stdin, stdout, and stderr redirections */
+    if (defaults->infname && *defaults->infname)
+        printf (" <%s", defaults->infname);
+
+    if (defaults->outfname && *defaults->outfname)
+        printf (" >%s 2>&1", defaults->outfname);
+
+    puts ("\"");
+
+    /* flush to prevent killing a signal from not displaying the text */
     fflush (stdout);
 }
 
+
 /**
    Generates target result listing, designed for text output and console 
    viewing.
@@ -103,32 +228,122 @@
         puts ("");
 }
 
+
+/**
+   Generates verbose target result listing.
+*/
+static void
+print_status_verbose (const struct target_status* status)
+{
+    unsigned valid_timing;
+
+    assert (0 != status);
+    assert (ST_OK <= status->status && ST_LAST > status->status);
+
+    valid_timing = status->user && status->sys
+        && ST_NOT_KILLED != status->status;
+
+    if (status->status) /* if status is set, print it */
+        printf ("  Status: %s\n", verbose_st_name [status->status]);
+    else if (status->signaled) /* if exit signal is non-zero, print it */
+        printf ("  Process signalled:    %s\n", get_signame (status->exit));
+    else {
+        printf ("  Exit status:          %6d%s\n"
+                "  Compiler warnings:    %6u\n"
+                "  Linker warnings:      %6u\n"
+                "  Runtime warnings:     %6u\n",
+                status->exit, 0 == status->exit ? " (success)" : "",
+                status->c_warn,
+                status->l_warn,
+                status->t_warn);
+
+        /* Print assetions, if any registered */
+        if ((unsigned)-1 != status->assert && status->assert) {
+            printf ("  Failed assertions:    %6u\n"
+                    "  Total assertions:     %6u\n",
+                    status->failed, status->assert);
+        }
+    }
+
+    /* Print timings, if available */
+    if (valid_timing) {
+        const float wall = status->wall ? *status->wall / TICKS_PER_SEC : -1;
+        const float user = status->user ? *status->user / TICKS_PER_SEC : -1;
+        const float sys  = status->sys  ? *status->sys  / TICKS_PER_SEC : -1;
+
+        printf ("  Times:\n"
+                "    Real               %7.3fs\n"
+                "    User               %7.3fs\n"
+                "    Sys                %7.3fs\n",
+                wall, user, sys);
+    }
+
+    puts ("");
+}
+
+
 /**
    Placholder output footer function, unneeded for text output and console 
    viewing.
 */
-static void print_footer_plain () {}
+static void
+print_footer_plain (int count, const struct target_status *summary)
+{
+    printf ("PROGRAM SUMMARY:\n"
+            "  Programs:             %6d\n"
+            "  Non-zero exit status: %6d\n"
+            "  Signalled:            %6d\n"
+            "  Compiler warnings:    %6u\n"
+            "  Linker warnings:      %6u\n"
+            "  Runtime warnings:     %6u\n",
+            count,
+            summary->exit,
+            summary->signaled,
+            summary->c_warn,
+            summary->l_warn,
+            summary->t_warn);
+
+    if ((unsigned)-1 != summary->assert) {
+        /* print assertion counters only when they're valid */
+        printf ("  Assertions:           %6u\n"
+                "  Failed assertions:    %6u\n",
+                summary->assert,
+                summary->failed);
+    }
+}
 
-const char* const short_st_name [ST_LAST] = {
-    "OK", /*ST_OK*/
-    "COMP", /*ST_COMPILE*/
-    "LINK", /*ST_LINK*/
-    "EXIST", /*ST_EXIST*/
-    "XPERM", /*ST_EXECUTE_FLAG*/
-    "EXEC", /*ST_EXECUTE*/
-    "NOUT", /*ST_NO_OUTPUT*/
-    "OUTPUT", /*ST_NO_REF*/
-    "BREF", /*ST_BAD_REF*/
-    "DIFF", /*ST_BAD_OUTPUT*/
-    "FORMAT", /*ST_FORMAT*/
-    "OFLOW", /*ST_OVERFLOW*/
-    "ERROR", /*ST_SYSTEM_ERROR*/
-    "KILLED", /*ST_KILLED*/
-    "NKILL" /*ST_NOT_KILLED*/
-};
+
+static void
+print_footer_verbose (int count, const struct target_status *summary)
+{
+    print_footer_plain (count, summary);
+}
+
+
+/**
+   Sets the output functions referenced.
+*/
+void set_output_format (enum OutputFmt format)
+{
+    if (FMT_VERBOSE == format) {
+        print_header = print_header_verbose;
+        print_target = print_target_verbose;
+        print_status = print_status_verbose;
+        print_footer = print_footer_verbose;
+    }
+    else {
+        /* only two formats implemented */
+        assert (FMT_PLAIN == format);
+
+        print_header = print_header_plain;
+        print_target = print_target_plain;
+        print_status = print_status_plain;
+        print_footer = print_footer_plain;
+    }
+}
 
 
-void (*print_header) () = print_header_plain;
+void (*print_header) (const char* const[]) = print_header_plain;
 void (*print_target) (const struct target_opts*) = print_target_plain;
-void (*print_status) (const struct target_status* status)  = print_status_plain;
-void (*print_footer) () = print_footer_plain;
+void (*print_status) (const struct target_status*) = print_status_plain;
+void (*print_footer) (int, const struct target_status*) = print_footer_plain;

Modified: incubator/stdcxx/branches/4.2.0/util/display.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/display.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/display.h (original)
+++ incubator/stdcxx/branches/4.2.0/util/display.h Fri Sep 28 13:55:52 2007
@@ -43,11 +43,6 @@
 };
 
 /**
-   ProcessStatus enum lookup table for 'short' (6 character) strings.
-*/
-extern const char* const short_st_name [ST_LAST];
-
-/**
    Sets the output functions referenced.
 */
 void set_output_format (enum OutputFmt format);
@@ -62,7 +57,7 @@
 /**
    Prints the table preamble formatting, followed by the formatted header row.
 */
-extern void (*print_header) ();
+extern void (*print_header) (const char* const argv[]);
 
 /**
    Prints the formatted header column for a target row.
@@ -94,6 +89,7 @@
 /**
    Prints the closing formatting for the table.
 */
-extern void (*print_footer) ();
+extern void (*print_footer) (int count, const struct target_status* status);
+
 
 #endif   /* RW_DISPLAY_H */

Modified: incubator/stdcxx/branches/4.2.0/util/exec.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/exec.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/exec.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/exec.cpp Fri Sep 28 13:55:52 2007
@@ -45,8 +45,31 @@
 #    include <sys/resource.h> /* for setlimit(), RLIMIT_CORE, ... */
 #  endif
 #else
-#  include <windows.h> /* for PROCESS_INFORMATION, ... */
-#  include <process.h> /* for CreateProcess, ... */
+#  ifndef _WIN32_WINNT
+#    define _WIN32_WINNT 0x0500
+#  endif
+#  include <windows.h> /* for PROCESS_INFORMATION, CreateProcess, ... */
+#  ifndef SIGTRAP
+#    define SIGTRAP   5   // STATUS_BREAKPOINT translated into SIGTRAP
+#  endif
+#  ifndef SIGBUS
+#    define SIGBUS    10  // STATUS_IN_PAGE_ERROR translated into SIGBUS
+#  endif
+#  ifndef SIGSYS
+#    define SIGSYS    12  // STATUS_INVALID_PARAMETER translated into SIGSYS
+#  endif
+#  ifndef SIGSTKFLT
+#    define SIGSTKFLT 16  // STATUS_FLOAT_STACK_CHECK translated into SIGSTKFLT
+#  endif
+#  ifndef STATUS_INVALID_PARAMETER
+#    define STATUS_INVALID_PARAMETER          ((DWORD)0xC000000DL)
+#  endif
+#  ifndef STATUS_STACK_BUFFER_OVERRUN
+#    define STATUS_STACK_BUFFER_OVERRUN       ((DWORD)0xC0000409L)
+#  endif
+#  ifndef STATUS_INVALID_CRUNTIME_PARAMETER
+#    define STATUS_INVALID_CRUNTIME_PARAMETER ((DWORD)0xC0000417L)
+#  endif
 #endif
 #include <sys/stat.h> /* for S_* */
 #include <sys/types.h>
@@ -612,80 +635,6 @@
     }
 }
 
-/**
-   Opens an input file, based on exec_name
-
-   Takes a data directory and an executable name, and tries to open an input 
-   file based on these variables.  If a file is found in neither of two 
-   locattions derived from these variables, this method tries to fall back on 
-   /dev/null.
-
-   Source file locations:
-     - [data_dir]/manual/in/[exec_name].in
-     - [data_dir]/tutorial/in/[exec_name].in
-     - /dev/null
-
-   @param data_dir the path of the reference data directory
-   @param exec_name the name of executable being run
-   @returns the file descriptor of the opened file
-*/
-static int
-open_input (const char* data_dir, const char* exec_name)
-{
-    int intermit = -1;
-
-    assert (0 != exec_name);
-    assert (0 != data_dir);
-
-    if (strlen (data_dir)) {
-        char* tmp_name;
-
-        /* Try data_dir/manual/in/exec_name.in */
-        tmp_name = reference_name (data_dir, "manual", "in");
-        intermit = open (tmp_name, O_RDONLY);
-    
-        /* If we opened the file, return the descriptor */
-        if (0 <= intermit) {
-            free (tmp_name);
-            return intermit;
-        }
-
-        /* If the file exists (errno isn't ENOENT), exit */
-        if (ENOENT != errno)
-            terminate (1, "open (%s) failed: %s\n", tmp_name, 
-                       strerror (errno));
-
-        /* Try data_dir/tutorial/in/exec_name.in */
-        free (tmp_name);
-        tmp_name = reference_name (data_dir, "tutorial", "in");
-        intermit = open (tmp_name, O_RDONLY);
-
-        /* If we opened the file, return the descriptor */
-        if (0 <= intermit) {
-            free (tmp_name);
-            return intermit;
-        }
-
-        /* If the file exists (errno isn't ENOENT), exit */
-        if (-1 == intermit && ENOENT != errno)
-            terminate (1, "open (%s) failed: %s\n", tmp_name, 
-                       strerror (errno));
-
-        free (tmp_name);
-    }
-
-    /* If we didn't find a source file, open /dev/null */
-
-    intermit = open ("/dev/null", O_RDONLY);
-
-    /* If we opened the file, return the descriptor */
-    if (0 <= intermit)
-        return intermit;
-
-    /* otherwise, print an error message and exit */
-    terminate (1, "open (/dev/null) failed: %s\n", strerror (errno));
-    return -1; /* silence a compiler warning */
-}
 
 /**
    Replaces one file descriptor with a second, closing second after replacing
@@ -768,7 +717,7 @@
         { 0, 0, 0 }
     };
 
-    for (size_t i = 0; limits [i].limit; ++i) {
+    for (size_t i = 0; limits [i].name; ++i) {
         struct rlimit local;
 
         if (!limits [i].limit)
@@ -867,25 +816,23 @@
 
         /* Redirect stdin */
         {
-            const int intermit = open_input (options->data_dir, target_name);
+            const int intermit = open (options->infname, O_RDONLY);
             replace_file (intermit, 0, "stdin");
         }
 
         /* Redirect stdout */
         {
-            char* const tmp_name = output_name (options->argv [0]);
             int intermit;
 
-            intermit = open (tmp_name, O_WRONLY | O_CREAT | O_TRUNC, 
+            intermit = open (options->outfname,
+                             O_WRONLY | O_CREAT | O_TRUNC, 
                              S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
             if (-1 == intermit)
                 terminate (1, "Error opening %s for output redirection: "
-                           "%s\n", tmp_name, strerror (errno));
+                           "%s\n", options->outfname, strerror (errno));
 
             replace_file (intermit, 1, "stdout");
-
-            free (tmp_name);
         }
 
         /* Redirect stderr */
@@ -922,69 +869,32 @@
     }
 }
 #else  /* _WIN{32,64} */
-/**
-   Opens an input file, based on exec_name, using the child_sa security 
-   setting.
-
-   Takes a data directory, an executable name and security setting, and tries 
-   to open an input file based on these variables.
-   If a file is found in neither of two locations derived from these 
-   variables, or if data_dir is a null string, it returns null.
-   If a file system error occurs when opening a file, INVALID_HANDLE_VALUE
-   is returned (and should be checked for).
-
-   Source file locations:
-     - [data_dir]/manual/in/[exec_name].in
-     - [data_dir]/tutorial/in/[exec_name].in
-
-   @param data_dir the path of the reference data directory
-   @param exec_name the name of executable being run
-   @param child_sa pointer to a SECURITY_ATTRIBUTES    structure
-   @returns the file descriptor of the opened file
-*/
-static HANDLE
-open_input (const char* data_dir, const char* exec_name, 
-            SECURITY_ATTRIBUTES* child_sa)
-{
-    HANDLE intermit;
-    DWORD error;
-    char* tmp_name;
 
-    assert (0 != exec_name);
-    assert (0 != data_dir);
-    assert (0 != child_sa);
-
-    if (!strlen (data_dir)) 
-        return 0;
-
-    /* Try data_dir\manual\in\exec_name.in */
-    tmp_name = reference_name (data_dir, "manual", "in");
-
-    intermit = CreateFile (tmp_name, GENERIC_READ, FILE_SHARE_READ, child_sa, 
-        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
-    error = GetLastError ();
-    /* If we found the file, return the descriptor */
-    if (INVALID_HANDLE_VALUE != intermit || (2 != error && 3 != error)) {
-        free (tmp_name);
-        return intermit;
-    }
-
-    /* Try data_dir\tutorial\in\exec_name.in */
-    free (tmp_name);
-    tmp_name = reference_name (data_dir, "tutorial", "in");
-    intermit = CreateFile (tmp_name, GENERIC_READ, FILE_SHARE_READ, child_sa, 
-        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
-    /* If we didn't find the file, null out the handle to return */
-    error = GetLastError ();
-    if (INVALID_HANDLE_VALUE == intermit && (2 == error || 3 == error)) {
-        intermit = 0;
-    }
+// map between NT_STATUS value and corresponding UNIX signal
+static const struct {
+    DWORD nt_status;
+    int   signal;
+} nt_status_map [] = {
+    { STATUS_BREAKPOINT,                 SIGTRAP   },
+    { STATUS_ACCESS_VIOLATION,           SIGSEGV   },
+    { STATUS_STACK_OVERFLOW,             SIGSEGV   },
+    { STATUS_STACK_BUFFER_OVERRUN,       SIGSEGV   },
+    { STATUS_IN_PAGE_ERROR,              SIGBUS    },
+    { STATUS_ILLEGAL_INSTRUCTION,        SIGILL    },
+    { STATUS_PRIVILEGED_INSTRUCTION,     SIGILL    },
+    { STATUS_FLOAT_DENORMAL_OPERAND,     SIGFPE    },
+    { STATUS_FLOAT_DIVIDE_BY_ZERO,       SIGFPE    },
+    { STATUS_FLOAT_INEXACT_RESULT,       SIGFPE    },
+    { STATUS_FLOAT_INVALID_OPERATION,    SIGFPE    },
+    { STATUS_FLOAT_OVERFLOW,             SIGFPE    },
+    { STATUS_FLOAT_UNDERFLOW,            SIGFPE    },
+    { STATUS_INTEGER_DIVIDE_BY_ZERO,     SIGFPE    },
+    { STATUS_INTEGER_OVERFLOW,           SIGFPE    },
+    { STATUS_FLOAT_STACK_CHECK,          SIGSTKFLT },
+    { STATUS_INVALID_PARAMETER,          SIGSYS    },
+    { STATUS_INVALID_CRUNTIME_PARAMETER, SIGSYS    }
+};
 
-    free (tmp_name);
-    return intermit;
-}
 
 /**
    Convert an argv array into a string that can be passed to CreateProcess.
@@ -1117,6 +1027,15 @@
         warn_last_error ("Waiting for child process");
 }
 
+/* FILETIME to ULONGLONG */
+inline ULONGLONG fttoull (const FILETIME& ft)
+{
+    ULARGE_INTEGER __ft;
+    __ft.LowPart  = ft.dwLowDateTime;
+    __ft.HighPart = ft.dwHighDateTime;
+    return __ft.QuadPart;
+}
+
 void exec_file (const struct target_opts* options, struct target_status* result)
 {
     char* merged;
@@ -1141,9 +1060,8 @@
     /* Create I/O handles */
     {
         /* Output redirection */
-        char* const tmp_name = output_name (options->argv [0]);
 
-        context.hStdOutput = CreateFile (tmp_name, GENERIC_WRITE, 
+        context.hStdOutput = CreateFile (options->outfname, GENERIC_WRITE, 
                 FILE_SHARE_WRITE, &child_sa, CREATE_ALWAYS, 
                 FILE_ATTRIBUTE_NORMAL, NULL);
         if (INVALID_HANDLE_VALUE == context.hStdOutput) { 
@@ -1153,11 +1071,12 @@
         }
 
         context.hStdError = context.hStdOutput;
-        free (tmp_name);
 
         /* Input redirection */
-        context.hStdInput = open_input (options->data_dir, get_target (), 
-                                        &child_sa);
+        context.hStdInput =
+            CreateFile (options->infname, GENERIC_READ, FILE_SHARE_READ, 
+                        &child_sa, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
         if (INVALID_HANDLE_VALUE == context.hStdInput) { 
             CloseHandle (context.hStdOutput);
             result->status = ST_SYSTEM_ERROR;
@@ -1174,12 +1093,9 @@
     UINT old_mode = SetErrorMode (SEM_FAILCRITICALERRORS
                                 | SEM_NOGPFAULTERRORBOX);
 
-    /* Check the wall clock before creating the process */
-    GetSystemTimeAsFileTime(&start);
-
-    /* Create the child process */
+    /* Create the child process in suspended state */
     if (0 == CreateProcess (options->argv [0], merged, 0, 0, 1, 
-        CREATE_NEW_PROCESS_GROUP, 0, 0, &context, &child)) {
+        CREATE_NEW_PROCESS_GROUP | CREATE_SUSPENDED, 0, 0, &context, &child)) {
         /* record the status if we failed to create the process */
         result->status = ST_SYSTEM_ERROR;
         warn_last_error ("Creating child process");;
@@ -1202,6 +1118,41 @@
     if (ST_SYSTEM_ERROR == result->status)
         return;
 
+#if _WIN32_WINNT >= 0x0500
+    if (options->as) {
+        if (HANDLE hJob = CreateJobObject (NULL, NULL)) {
+            if (AssignProcessToJobObject (hJob, child.hProcess)) {
+                JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_info = { 0 };
+                
+                job_info.BasicLimitInformation.LimitFlags =
+                    JOB_OBJECT_LIMIT_PROCESS_MEMORY;
+                
+                const rw_rlimit* as = options->as;
+                job_info.ProcessMemoryLimit =
+                    as->rlim_cur < as->rlim_max ? as->rlim_cur : as->rlim_max;
+
+                if (!SetInformationJobObject (hJob,
+                                              JobObjectExtendedLimitInformation,
+                                              &job_info, sizeof (job_info)))
+                    warn_last_error ("Setting process limits");
+            }
+            else 
+                warn_last_error ("Assigning process to job object");
+
+            if (!CloseHandle (hJob))
+                warn_last_error ("Closing job object handle");
+        }
+        else
+            warn_last_error ("Creating job object");
+    }
+#endif   // _WIN32_WINNT >= 0x0500
+
+    /* Check the wall clock before resuming the process */
+    GetSystemTimeAsFileTime(&start);
+
+    if (DWORD (-1) == ResumeThread (child.hThread))
+        warn_last_error ("Resuming process");
+
     if (0 == CloseHandle (child.hThread))
         warn_last_error ("Closing child main thread handle");
 
@@ -1225,9 +1176,27 @@
     /* Calculate wall clock time elapsed while the process ran */
     GetSystemTimeAsFileTime(&end);
 
-    /* We're ignoring dwHighDateTime, as it's outside the percision of clock_t 
-     */
-    wall = end.dwLowDateTime - start.dwLowDateTime;
+    /* 100 nanosecond units in a second */
+    const DWORD UNITS_PER_SEC = 10000000;
+    const DWORD UNITS_PER_CLOCK = UNITS_PER_SEC / CLOCKS_PER_SEC;
+    assert (UNITS_PER_CLOCK * CLOCKS_PER_SEC == UNITS_PER_SEC);
+
+#if _WIN32_WINNT >= 0x0500
+    FILETIME stime, utime;
+    static clock_t user, sys;
+    if (GetProcessTimes (child.hProcess, &start, &end, &stime, &utime)) {
+        user = clock_t (fttoull (utime) / UNITS_PER_CLOCK);
+        sys  = clock_t (fttoull (stime) / UNITS_PER_CLOCK);
+
+        /* Link the delta */
+        result->user = &user;
+        result->sys  = &sys;
+    }
+    else
+        warn_last_error ("Getting child process times");
+#endif  // _WIN32_WINNT >= 0x0500
+
+    wall = clock_t ((fttoull (end) - fttoull (start)) / UNITS_PER_CLOCK);
 
     /* Link the delta */
     result->wall = &wall;
@@ -1240,9 +1209,12 @@
     if (0 == CloseHandle (child.hProcess))
         warn_last_error ("Closing child process handle");
 
-    if (STATUS_ACCESS_VIOLATION == result->exit) {
-        result->exit = SIGSEGV;
-        result->signaled = 1;
+    for (int i = 0; i < sizeof (nt_status_map) / sizeof (*nt_status_map); ++i) {
+        if (nt_status_map [i].nt_status == DWORD (result->exit)) {
+            result->exit = nt_status_map [i].signal;
+            result->signaled = 1;
+            break;
+        }
     }
 }
 

Modified: incubator/stdcxx/branches/4.2.0/util/locale.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/locale.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/locale.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/locale.cpp Fri Sep 28 13:55:52 2007
@@ -34,6 +34,14 @@
 #include <rw/_defs.h>
 #include _RWSTD_SYS_TYPES_H
 
+#if _RWSTD_PATH_SEP == '/'
+#  define SLASH      "/"
+#  define LS_1       "ls -1 "
+#else
+#  define SLASH      "\\"
+#  define LS_1       "dir /B /A:D"
+#endif
+
 #ifndef _MSC_VER
 #  include <sys/mman.h>   // for mmap()
 #  include <unistd.h>     // for close ()
@@ -2362,7 +2370,7 @@
     const char* const locale_root = std::getenv ("RWSTD_LOCALE_ROOT");
 
     if (0 != locale_root) {
-        const std::string cmd = std::string ("ls -1 ") + locale_root;
+        const std::string cmd = std::string (LS_1) + locale_root;
 
         std::system (cmd.c_str ());
     }
@@ -2377,7 +2385,7 @@
 
     if (0 != locale_root) {
         const std::string cmd =
-            std::string ("ls -1 ") + locale_root + "/charmaps";
+            std::string (LS_1) + locale_root + SLASH "charmaps";
 
         std::system (cmd.c_str());
     }

Modified: incubator/stdcxx/branches/4.2.0/util/output.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/output.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/output.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/output.cpp Fri Sep 28 13:55:52 2007
@@ -342,7 +342,7 @@
         status->status = ST_NO_OUTPUT;
     }
     else {
-        if (!strlen (options->data_dir)) {
+        if (0 == options->data_dir || '\0' == *options->data_dir) {
             /* If there is not an input directory, look at the assertion tags */
 
             if (!options->compat)

Modified: incubator/stdcxx/branches/4.2.0/util/path.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/path.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/path.h (original)
+++ incubator/stdcxx/branches/4.2.0/util/path.h Fri Sep 28 13:55:52 2007
@@ -1,3 +1,31 @@
+/**************************************************************************
+ *
+ * path.h
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  License); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
+ * 
+ **************************************************************************/
+
 #ifndef RWSTD_PATH_H_INCLUDED
 #define RWSTD_PATH_H_INCLUDED
 

Modified: incubator/stdcxx/branches/4.2.0/util/runall.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/runall.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/runall.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/runall.cpp Fri Sep 28 13:55:52 2007
@@ -31,13 +31,11 @@
 #include <stdio.h>      /* for FILE, fopen(), ... */
 
 #include <ctype.h>      /* for isspace */
+#include <limits.h>     /* for PATH_MAX */
 #include <sys/types.h>
 #include <sys/stat.h>
 #if !defined (_WIN32) && !defined (_WIN64)
 #  include <sys/wait.h>   /* for WIFEXITED(), ... */
-#else
-#  include <signal.h>     /* for SIGSEGV */
-#  include <windows.h>    /* for STATUS_ACCESS_VIOLATION */
 #endif
 
 #include "cmdopt.h"
@@ -64,6 +62,12 @@
 #  define S_IXOTH 0001
 #endif   /* S_IXOTH */
 
+#if !defined (PATH_MAX) || PATH_MAX < 128 || 4096 < PATH_MAX
+   // deal  with undefined, bogus, or excessive values
+#  undef  PATH_MAX
+#  define PATH_MAX   1024
+#endif
+
 /**
    Utility function to rework the argv array
 
@@ -90,7 +94,7 @@
    @return processed argv array, usable in exec ()
 */
 static char**
-merge_argv (char* const target, char* const argv [])
+merge_argv (const char* target, char* const argv [])
 {
     size_t tlen;
     char ** split;
@@ -423,7 +427,9 @@
    @see process_results
 */
 static void
-run_target (char* target, const struct target_opts *target_template)
+run_target (struct target_status     *summary,
+            const char               *target,
+            const struct target_opts *target_template)
 {
     struct target_opts options;
     struct target_status results;
@@ -435,6 +441,7 @@
     memcpy (&options, target_template, sizeof options);
     memset (&results, 0, sizeof results);
 
+    /* create the argv array for this target */
     options.argv = merge_argv (target, options.argv);
 
     assert (0 != options.argv);
@@ -442,6 +449,10 @@
 
     target_name = rw_basename (options.argv [0]);
 
+    /* create the names of files to redirect stdin and stdout */
+    options.infname  = input_name (options.data_dir, target_name);
+    options.outfname = output_name (options.argv [0]);
+
     print_target (&options);
 
     if (check_target_ok (options.argv [0], &results)) {
@@ -452,10 +463,31 @@
 
     print_status (&results);
 
+    if (summary) {
+        /* increment summary counters */
+        if (0 == results.signaled && results.exit)
+            ++summary->exit;
+
+        summary->signaled += results.signaled;
+        summary->c_warn   += results.c_warn;
+        summary->l_warn   += results.l_warn;
+        summary->t_warn   += results.t_warn;
+
+        if ((unsigned)-1 != results.assert) {
+            /* increment assertion counters only when they're valid */
+            summary->assert += results.assert;
+            summary->failed += results.failed;
+        }
+    }
+
+    /* free data dynamically allocated for this target alone */
     free (options.argv [0]);
     free (options.argv);
+    free ((char*)options.infname);
+    free ((char*)options.outfname);
 }
 
+
 /**
    Entry point to the application.
 
@@ -472,12 +504,9 @@
 {
     struct target_opts target_template;
     const char* exe_opts = "";
+    const char* const* const saved_argv = (const char* const*)argv;
 
     exe_name = argv [0];
-    memset (&target_template, 0, sizeof target_template);
-
-    target_template.timeout = 10;
-    target_template.data_dir = "";
 
     if (1 < argc && '-' == argv [1][0]) {
         const int nopts =
@@ -490,23 +519,76 @@
         argv += nopts;
     }
     else {
+        /* initialize data members */
+        memset (&target_template, 0, sizeof target_template);
+
         --argc;
         ++argv;
     }
 
+    /* set the program output mode */
+    if (target_template.verbose)
+        set_output_format (FMT_VERBOSE);
+    else
+        set_output_format (FMT_PLAIN);
+
     if (0 < argc) {
         int i;
         target_template.argv = split_opt_string (exe_opts);
 
         assert (0 != target_template.argv);
 
-        print_header ();
+        /* print out the program's argv array in verbose mode */
+        print_header (target_template.verbose ? saved_argv : 0);
+
+        struct target_status summary;
+        memset (&summary, 0, sizeof summary);
+
+        /* number of program's executed */
+        int progs_count = 0;
 
         for (i = 0; i < argc; ++i) {
-            run_target (argv [i], &target_template);
+            const char* target = argv [i];
+
+            if ('@' == target [0]) {
+                /* read targets from specified file */
+                const char* lst_name = target + 1;
+                FILE* lst = fopen (lst_name, "r");
+                if (0 == lst) {
+                    warn ("Error opening %s: %s\n", lst_name, strerror (errno));
+                    break;
+                }
+
+                while (!feof (lst)) {
+                    char buf [PATH_MAX];
+                    target = fgets (buf, sizeof (buf), lst);
+
+                    if (ferror (lst)) {
+                        warn ("Error reading %s: %s\n", lst_name, strerror (errno));
+                        break;
+                    }
+
+                    if (target) {
+                        /* remove terminating newline character if present */
+                        assert (buf == target);
+                        if (char* pos = strchr (buf, '\n'))
+                            *pos = '\0';
+                        if (*target) {
+                            ++progs_count;
+                            run_target (&summary, target, &target_template);
+                        }
+                    }
+                }
+
+                fclose (lst);
+            }
+            else {
+                ++progs_count;
+                run_target (&summary, target, &target_template);
+            }
         }
 
-        print_footer ();
+        print_footer (progs_count, &summary);
 
         if (target_template.argv [0])
             free (target_template.argv [0]);

Modified: incubator/stdcxx/branches/4.2.0/util/target.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/target.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/target.h (original)
+++ incubator/stdcxx/branches/4.2.0/util/target.h Fri Sep 28 13:55:52 2007
@@ -78,7 +78,10 @@
     const char* data_dir; /**< Root dir for reference input/output files. */
     const char* c_warn; /**< Warning flag string when compiling. */
     const char* l_warn; /**< Warning flag string when linking. */
+    const char* infname; /**< Input file to redirect stdin from. */
+    const char* outfname; /**< Output file to redirect stdout to. */
     int compat; /**< Test suite compatability mode switch. */
+    int verbose; /**< Verbose mode. */
     rw_rlimit* core;
     rw_rlimit* cpu;
     rw_rlimit* data;

Modified: incubator/stdcxx/branches/4.2.0/util/util.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/util.cpp?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/util.cpp (original)
+++ incubator/stdcxx/branches/4.2.0/util/util.cpp Fri Sep 28 13:55:52 2007
@@ -1,22 +1,26 @@
 /************************************************************************
  *
- * util.cpp - Utility function definitions for the runall utility
+ * util.cpp - Utility function definitions for the exec utility
  *
  * $Id$
  *
  ************************************************************************
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
  * 
  **************************************************************************/
 
@@ -26,12 +30,22 @@
 #include <stdlib.h> /* for exit, malloc */
 #include <stdarg.h> /* for va_* */
 #include <string.h> /* for strerror */
+
+#include <sys/stat.h> /* for stat() */
 #include <sys/types.h> /* for size_t */
 
 #include "cmdopt.h" /* for exe_name, target_name */
 
 #include "util.h"
 
+
+#ifdef _WIN32
+#  define DEV_NULL   "NUL:"
+#else
+#  define DEV_NULL   "/dev/null"
+#endif   // _WIN32
+
+
 void
 warn (const char* const format, ...)
 {
@@ -114,12 +128,11 @@
     char* tail;
     const char* const target_name = get_target ();
 
-    assert (0 != data_dir);
     assert (0 != target_name);
     assert (0 != subdir);
     assert (0 != mode);
 
-    root_len = strlen (data_dir);
+    root_len = data_dir ? strlen (data_dir) : 0;
     cmp_len = strlen (target_name) - exe_suffix_len;
     dir_len = strlen (subdir);
     mode_len = strlen (mode);
@@ -146,6 +159,61 @@
 
     return ref_name;
 }
+
+
+/**
+   Composes the name of an input file, based on target
+
+   Takes a data directory and an executable name, and tries to open an input 
+   file based on these variables.  If a file is found in neither of two 
+   locattions derived from these variables, this method tries to fall back on 
+   /dev/null.
+
+   Source file locations:
+     - [data_dir]/manual/in/[target].in
+     - [data_dir]/tutorial/in/[target].in
+     - /dev/null
+
+   @param data_dir the path of the reference data directory
+   @param target the name of executable being run
+   @returns the name of the file
+*/
+char*
+input_name (const char* data_dir, const char* target)
+{
+    char* fname = 0;
+    int stat_result = 0;
+    struct stat sb;
+
+    assert (0 != target);
+
+    if (data_dir && *data_dir) {
+
+        /* Try data_dir/manual/in/target.in */
+        fname       = reference_name (data_dir, "manual", "in");
+        stat_result = stat (fname, &sb);
+    
+        if (0 == stat_result)
+            return fname;
+
+        free (fname);
+
+        /* Try data_dir/tutorial/in/target.in */
+        fname       = reference_name (data_dir, "tutorial", "in");
+        stat_result = stat (fname, &sb);
+
+        if (0 == stat_result)
+            return fname;
+
+        free (fname);
+    }
+
+    /* If we didn't find a source file, use /dev/null */
+    fname = (char*)RW_MALLOC (sizeof DEV_NULL);
+    strcpy (fname, DEV_NULL);
+    return fname;
+}
+
 
 char*
 output_name (const char* target)

Modified: incubator/stdcxx/branches/4.2.0/util/util.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/util/util.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/util/util.h (original)
+++ incubator/stdcxx/branches/4.2.0/util/util.h Fri Sep 28 13:55:52 2007
@@ -89,6 +89,26 @@
                       const char* mode);
 
 /**
+   Composes the name of an input file, based on exec_name
+
+   Takes a data directory and an executable name, and tries to open an input 
+   file based on these variables.  If a file is found in neither of two 
+   locattions derived from these variables, this method tries to fall back on 
+   /dev/null.
+
+   Source file locations:
+     - [data_dir]/manual/in/[exec_name].in
+     - [data_dir]/tutorial/in/[exec_name].in
+     - /dev/null
+
+   @param data_dir the path of the reference data directory
+   @param exec_name the name of executable being run
+   @returns the name of the file
+*/
+char* input_name (const char* data_dir, const char* target);
+
+
+/**
    Generates the name of the output file for the executable target.
 
    This function allocates memory which is to be freed by the caller.
@@ -97,4 +117,5 @@
    @return translation of 'target.out'
 */
 char* output_name (const char* target);
+
 #endif   /* RW_UTIL_H */



Mime
View raw message