#ifdef wxLongLong_t
wxPAT_LONGLONGINT, // %Ld, etc
#endif
- wxPAT_SIZET, // %Zd, etc
+ wxPAT_SIZET, // %zd, etc
wxPAT_DOUBLE, // %e, %E, %f, %g, %G
wxPAT_LONGDOUBLE, // %le, etc
#ifdef wxLongLong_t
wxLongLong_t pad_longlongint; // %Ld, etc
#endif
- size_t pad_sizet; // %Zd, etc
+ size_t pad_sizet; // %zd, etc
double pad_double; // %e, %E, %f, %g, %G
long double pad_longdouble; // %le, etc
// it's task of the caller ensure that memory is still valid !
const CharType *m_pArgEnd;
- // a little buffer where formatting flags like #+\.hlqLZ are stored by Parse()
+ // a little buffer where formatting flags like #+\.hlqLz are stored by Parse()
// for use in Process()
char m_szFlags[wxMAX_SVNPRINTF_FLAGBUFFER_LEN];
// integer conversion specifier for MSVC compatibility
// (it behaves exactly as '%lli' or '%Li' or '%qi')
case wxT('I'):
- if (*(m_pArgEnd+1) != wxT('6') ||
- *(m_pArgEnd+2) != wxT('4'))
- return false; // bad format
-
- m_pArgEnd++;
- m_pArgEnd++;
+ if (*(m_pArgEnd+1) == wxT('6') &&
+ *(m_pArgEnd+2) == wxT('4'))
+ {
+ m_pArgEnd++;
+ m_pArgEnd++;
- ilen = 2;
- CHECK_PREC
- m_szFlags[flagofs++] = char(ch);
- m_szFlags[flagofs++] = '6';
- m_szFlags[flagofs++] = '4';
- break;
+ ilen = 2;
+ CHECK_PREC
+ m_szFlags[flagofs++] = char(ch);
+ m_szFlags[flagofs++] = '6';
+ m_szFlags[flagofs++] = '4';
+ break;
+ }
+ // else: fall-through, 'I' is MSVC equivalent of C99 'z'
#endif // __WXMSW__
+ case wxT('z'):
case wxT('Z'):
+ // 'z' is C99 standard for size_t and ptrdiff_t, 'Z' was used
+ // for this purpose in libc5 and by wx <= 2.8
ilen = 3;
CHECK_PREC
m_szFlags[flagofs++] = char(ch);