Author: faridz Date: Tue Oct 30 09:08:09 2007 New Revision: 590134 URL: http://svn.apache.org/viewvc?rev=590134&view=rev Log: 2007-10-30 Farid Zaripov <[EMAIL PROTECTED]>
Merged r580982 from trunk * 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/branches/4.2.x/src/time_put.cpp Modified: incubator/stdcxx/branches/4.2.x/src/time_put.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/src/time_put.cpp?rev=590134&r1=590133&r2=590134&view=diff ============================================================================== --- incubator/stdcxx/branches/4.2.x/src/time_put.cpp (original) +++ incubator/stdcxx/branches/4.2.x/src/time_put.cpp Tue Oct 30 09:08:09 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++ = '%';