stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r652396 - /stdcxx/trunk/tests/src/printf.cpp
Date Wed, 30 Apr 2008 15:24:11 GMT
Author: faridz
Date: Wed Apr 30 08:24:10 2008
New Revision: 652396

URL: http://svn.apache.org/viewvc?rev=652396&view=rev
Log:
2008-04-30 Farid Zaripov <farid_zaripov@epam.com>

	* tests/src/printf.cpp (__rw_fmtfloating): Process width and precision
	specifiers before the size specifiers.
	[_MSC_VER]: Decrement len after removing redundant zero.

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

Modified: stdcxx/trunk/tests/src/printf.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/printf.cpp?rev=652396&r1=652395&r2=652396&view=diff
==============================================================================
--- stdcxx/trunk/tests/src/printf.cpp (original)
+++ stdcxx/trunk/tests/src/printf.cpp Wed Apr 30 08:24:10 2008
@@ -1424,6 +1424,13 @@
     if (spec.fl_zero)
         *pf++ = '0';
 
+    if (spec.mod != spec.mod_ext_A && 0 <= spec.width) {
+        pf += sprintf (pf, "%i", spec.width);
+    }
+
+    if (0 <= spec.prec)
+        pf += sprintf (pf, ".%i", spec.prec);
+
     if (spec.mod == spec.mod_h)
         *pf++ = 'h';
     else if (spec.mod == spec.mod_hh) {
@@ -1451,13 +1458,6 @@
         pf += strlen (pf);
     }
 
-    if (spec.mod != spec.mod_ext_A && 0 <= spec.width) {
-        pf += sprintf (pf, "%i", spec.width);
-    }
-
-    if (0 <= spec.prec)
-        pf += sprintf (pf, ".%i", spec.prec);
-
     *pf++ = char (spec.cvtspec);
     *pf   = '\0';
 
@@ -1499,6 +1499,7 @@
             buffer [len - 3] = buffer [len - 2];
             buffer [len - 2] = buffer [len - 1];
             buffer [len - 1] = buffer [len];
+            --len;
         }
     }
 



Mime
View raw message