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 2008/01/16 07:20:57 UTC
svn commit: r612364 - in /stdcxx/trunk: tests/localization/ tests/support/
tests/utilities/ util/
Author: sebor
Date: Tue Jan 15 22:20:53 2008
New Revision: 612364
URL: http://svn.apache.org/viewvc?rev=612364&view=rev
Log:
2008-01-15 Martin Sebor <se...@roguewave.com>
STDCXX-700
* tests/localization/22.locale.codecvt.out.cpp (<cstdio>): Removed
#include directive.
(get_mb_chars, find_mb_locale): Replaced calls to std::fprintf()
with rw_fprintf().
* tests/localization/22.locale.time.put.cpp (make_LC_TIME): Silenced
HP aCC 6 warning #2181-D: argument is incompatible with corresponding
format string conversion.
* tests/localization/22.locale.time.put.cpp (make_LC_TIME): Same.
* tests/utilities/20.temp.buffer.mt.cpp (thr_func): Same.
* tests/support/18.numeric.special.int.cpp (Limits<unsigned short>::
compute_digits10): Same.
* util/locale.cpp (print_ce_info, print_charmap): Same.
* util/ctype.cpp (process_sym_ellipsis): Same.
Modified:
stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp
stdcxx/trunk/tests/localization/22.locale.time.get.cpp
stdcxx/trunk/tests/localization/22.locale.time.put.cpp
stdcxx/trunk/tests/support/18.numeric.special.int.cpp
stdcxx/trunk/tests/utilities/20.temp.buffer.mt.cpp
stdcxx/trunk/util/ctype.cpp
stdcxx/trunk/util/locale.cpp
Modified: stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp Tue Jan 15 22:20:53 2008
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2005-2006 Rogue Wave Software.
+ * Copyright 2005-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -35,7 +35,6 @@
#include <climits> // for MB_LEN_MAX
#include <clocale> // for LC_CTYPE, setlocale()
-#include <cstdio> // for sprintf()
#include <cstdlib> // for MB_CUR_MAX, free(), size_t
#include <cstring> // for strcpy(), strlen()
#include <cwchar> // for codecvt
@@ -218,9 +217,10 @@
std::size_t (-1));
if (!mbc) {
- std::fprintf (stderr, "*** unable to find any multibyte characters "
- "in locale \"%s\" with MB_CUR_MAX = %u\n",
- std::setlocale (LC_CTYPE, 0), MB_CUR_MAX);
+ rw_fprintf (rw_stderr, "*** unable to find any multibyte characters "
+ "in locale \"%s\" with MB_CUR_MAX = %u\n",
+ std::setlocale (LC_CTYPE, 0),
+ unsigned (MB_CUR_MAX));
return 0;
}
@@ -240,9 +240,10 @@
if (0 == mbc) {
if (i < mb_cur_max) {
- std::fprintf (stderr, "*** unable to find %u-byte characters "
- "in locale \"%s\" with MB_CUR_MAX = %u\n",
- i + 1, std::setlocale (LC_CTYPE, 0), MB_CUR_MAX);
+ rw_fprintf (rw_stderr, "*** unable to find %zu-byte characters"
+ " in locale \"%s\" with MB_CUR_MAX = %u\n",
+ i + 1, std::setlocale (LC_CTYPE, 0),
+ unsigned (MB_CUR_MAX));
mb_cur_max = 0;
break;
}
@@ -265,7 +266,7 @@
RW_ASSERT (0 != mb_chars);
if (2 > MB_LEN_MAX) {
- std::fprintf (stderr, "MB_LEN_MAX = %d, giving up\n", MB_LEN_MAX);
+ rw_fprintf (rw_stderr, "MB_LEN_MAX = %d, giving up\n", MB_LEN_MAX);
return 0;
}
@@ -299,9 +300,9 @@
}
if (*mb_cur_max < 2) {
- std::fprintf (stderr, "*** unable to find a full set of multibyte "
- "characters in locale \"%s\" with MB_CUR_MAX = %u "
- "(computed)", mb_locale_name, *mb_cur_max);
+ rw_fprintf (rw_stderr, "*** unable to find a full set of multibyte "
+ "characters in locale \"%s\" with MB_CUR_MAX = %u "
+ "(computed)", mb_locale_name, *mb_cur_max);
mb_locale_name = 0;
}
else {
Modified: stdcxx/trunk/tests/localization/22.locale.time.get.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.time.get.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.time.get.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.time.get.cpp Tue Jan 15 22:20:53 2008
@@ -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-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -1228,7 +1228,7 @@
char segment [256];
- std::sprintf (segment, "%c:%u:%04d/%02d/%02d:",
+ std::sprintf (segment, "%c:%d:%04d/%02d/%02d:",
td->era [i].offset < 0 ? '-' : '+',
td->era [i].offset < 0 ? -td->era [i].offset
: td->era [i].offset,
Modified: stdcxx/trunk/tests/localization/22.locale.time.put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.time.put.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.time.put.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.time.put.cpp Tue Jan 15 22:20:53 2008
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2002-2006 Rogue Wave Software.
+ * Copyright 2002-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -583,7 +583,7 @@
char segment [256];
- std::sprintf (segment, "%c:%u:%04d/%02d/%02d:",
+ std::sprintf (segment, "%c:%d:%04d/%02d/%02d:",
td->era [i].offset < 0 ? '-' : '+',
td->era [i].offset < 0 ? -td->era [i].offset
: td->era [i].offset,
Modified: stdcxx/trunk/tests/support/18.numeric.special.int.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/support/18.numeric.special.int.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/tests/support/18.numeric.special.int.cpp (original)
+++ stdcxx/trunk/tests/support/18.numeric.special.int.cpp Tue Jan 15 22:20:53 2008
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2004-2007 Rogue Wave Software, Inc.
+ * Copyright 2004-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -321,7 +321,7 @@
static int compute_digits10 () {
char buf [80];
- return std::sprintf (buf, "%u", USHRT_MAX) - 1;
+ return std::sprintf (buf, "%u", unsigned (USHRT_MAX)) - 1;
}
};
Modified: stdcxx/trunk/tests/utilities/20.temp.buffer.mt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.temp.buffer.mt.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/tests/utilities/20.temp.buffer.mt.cpp (original)
+++ stdcxx/trunk/tests/utilities/20.temp.buffer.mt.cpp Tue Jan 15 22:20:53 2008
@@ -126,7 +126,7 @@
{
thr_args* const targs = (thr_args*)arg;
- std::printf ("thread %d starting...\n", targs->threadno_);
+ std::printf ("thread %ld starting...\n", targs->threadno_);
#ifndef _RWSTD_INT64_T
Modified: stdcxx/trunk/util/ctype.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/ctype.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/util/ctype.cpp (original)
+++ stdcxx/trunk/util/ctype.cpp Tue Jan 15 22:20:53 2008
@@ -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-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -252,7 +252,7 @@
num++;
}
else {
- len = std::sprintf (next_num, "%ld", num++);
+ len = std::sprintf (next_num, "%lu", num++);
}
sym_name = begin;
Modified: stdcxx/trunk/util/locale.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/locale.cpp?rev=612364&r1=612363&r2=612364&view=diff
==============================================================================
--- stdcxx/trunk/util/locale.cpp (original)
+++ stdcxx/trunk/util/locale.cpp Tue Jan 15 22:20:53 2008
@@ -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-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -922,7 +922,7 @@
// sym is sized at 13 because there will never be more then
// 99,999 collating elements
char sym [13];
- std::sprintf (sym, "<RW_CE_%d>", ce_num++);
+ std::sprintf (sym, "<RW_CE_%u>", ce_num++);
ce_map.insert (std::make_pair (sym, elem));
std::cout << "collating-element " << sym << " from \"";
@@ -2610,7 +2610,7 @@
print_ellipsis (mbchar, last_byte, last_ucs4, last_wchar);
// process subsequent maps
- for (std::size_t i = 0; i != UCHAR_MAX + 1U; ++i) {
+ for (unsigned i = 0; i != UCHAR_MAX + 1U; ++i) {
if (UINT_MAX == tab [i]) {
// invalid multibyte sequence (i.e., unused slot)