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/11/22 01:09:55 UTC

svn commit: r597271 - /incubator/stdcxx/trunk/tests/src/printf.cpp

Author: sebor
Date: Wed Nov 21 16:09:54 2007
New Revision: 597271

URL: http://svn.apache.org/viewvc?rev=597271&view=rev
Log:
2007-11-16 Travis Vitek <vi...@roguewave.com>

	Merged rev 597267 with a fix for STDCXX-649 from branches/4.2.x.
	* tests/src/printf.cpp (_rw_fmtinteger): Implement `z' format
	specifier support to avoid issues on platforms where size_t is
	not the same size as int.

Modified:
    incubator/stdcxx/trunk/tests/src/printf.cpp

Modified: incubator/stdcxx/trunk/tests/src/printf.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/printf.cpp?rev=597271&r1=597270&r2=597271&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/printf.cpp Wed Nov 21 16:09:54 2007
@@ -1297,6 +1297,10 @@
             spec.param.diff_ = PARAM (diff_, pva);
             len = rw_fmtinteger (spec, buf, spec.param.diff_);
         }
+        else if (spec.mod == spec.mod_z) {
+            spec.param.diff_ = PARAM (diff_, pva);
+            len = rw_fmtinteger (spec, buf, spec.param.diff_);
+        }
         else if (1 == spec.iwidth) {
             spec.param.int_ = PARAM (int_, pva);
             const _RWSTD_INT8_T val = spec.param.int_;
@@ -1383,6 +1387,10 @@
             len = rw_fmtinteger (spec, buf, val);
         }
         else if (spec.mod == spec.mod_t) {
+            spec.param.size_ = PARAM (size_, pva);
+            len = rw_fmtinteger (spec, buf, spec.param.size_);
+        }
+        else if (spec.mod == spec.mod_z) {
             spec.param.size_ = PARAM (size_, pva);
             len = rw_fmtinteger (spec, buf, spec.param.size_);
         }