stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r580982 - /incubator/stdcxx/trunk/src/time_put.cpp
Date Mon, 01 Oct 2007 14:59:49 GMT
Author: faridz
Date: Mon Oct  1 07:59:48 2007
New Revision: 580982

URL: http://svn.apache.org/viewvc?rev=580982&view=rev
Log:
2007-10-01  Farid Zaripov  <farid_zaripov@epam.com>

	* time_put.cpp (__rw_get_date_fmat): Convert char argument
	of isspace(), isdigit(), ispunct() to unsigned char.
	(__rw_get_time_fmat): Ditto.

Modified:
    incubator/stdcxx/trunk/src/time_put.cpp

Modified: incubator/stdcxx/trunk/src/time_put.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/time_put.cpp?rev=580982&r1=580981&r2=580982&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/time_put.cpp (original)
+++ incubator/stdcxx/trunk/src/time_put.cpp Mon Oct  1 07:59:48 2007
@@ -160,6 +160,7 @@
 
 #ifdef _RWSTD_NO_NL_LANGINFO
 
+typedef unsigned char UChar;
 
 // compute the format string corresponding to the "%x" format specifier
 // in the current locale (set by setlocale (LC_ALL, ...))
@@ -197,16 +198,16 @@
     for (char *ptmp = tmp; *ptmp; ) {
 
         // store all whitespace as part of format
-        for (; (isspace)(*ptmp); ++ptmp)
+        for (; (isspace)(UChar (*ptmp)); ++ptmp)
             *pfmt++ = *ptmp;
 
         const char *begin = ptmp;
 
         // skip over all non-digit characters
-        for (; *ptmp && !(isdigit)(*ptmp); ++ptmp) {
-            if ((ispunct)(*ptmp) || (isspace)(*ptmp)) {
+        for (; *ptmp && !(isdigit)(UChar (*ptmp)); ++ptmp) {
+            if ((ispunct)(UChar (*ptmp)) || (isspace)(UChar (*ptmp))) {
                 // store all punctuators as part of format
-                for ( ; (ispunct)(*ptmp) || (isspace)(*ptmp); ++ptmp)
+                for ( ; (ispunct)(UChar (*ptmp)) || (isspace)(UChar (*ptmp)); ++ptmp)
                     *pfmt++ = *ptmp;
                 break;
             }
@@ -258,9 +259,9 @@
             }
         }
 
-        if ((isdigit)(*ptmp)) {
+        if ((isdigit)(UChar (*ptmp))) {
 
-            for (begin = ptmp; (isdigit)(*ptmp); ++ptmp);
+            for (begin = ptmp; (isdigit)(UChar (*ptmp)); ++ptmp);
 
             *pfmt++ = '%';
             if (ptmp - begin == 1) {
@@ -322,16 +323,16 @@
 
     for (char *ptmp = tmp; *ptmp; ) {
 
-        for (; (isspace)(*ptmp); ++ptmp)
+        for (; (isspace)(UChar (*ptmp)); ++ptmp)
             *pfmt++ = *ptmp;
 
         const char *begin = ptmp;
 
-        for (; *ptmp && !(isdigit)(*ptmp); ++ptmp) {
-            if (   (ispunct)(*ptmp)
-                || (isspace)(*ptmp)) {
-                for (;    (ispunct)(*ptmp)
-                       || (isspace)(*ptmp); ++ptmp)
+        for (; *ptmp && !(isdigit)(UChar (*ptmp)); ++ptmp) {
+            if (   (ispunct)(UChar (*ptmp))
+                || (isspace)(UChar (*ptmp))) {
+                for (;    (ispunct)(UChar (*ptmp))
+                       || (isspace)(UChar (*ptmp)); ++ptmp)
                     *pfmt++ = *ptmp;
                 break;
             }
@@ -359,9 +360,9 @@
             }
         }
 
-        if ((isdigit)(*ptmp)) {
+        if ((isdigit)(UChar (*ptmp))) {
 
-            for (begin = ptmp; (isdigit)(*ptmp); ++ptmp);
+            for (begin = ptmp; (isdigit)(UChar (*ptmp)); ++ptmp);
 
             *pfmt++ = '%';
 



Mime
View raw message