(strcasecmp(cur_locale + strlen(cur_locale) - 4, "utf8")) ||
(strcasecmp(cur_locale + strlen(cur_locale) - 5, "utf-8"))) {
// nope, don't use libc conversion
- return FALSE;
+ return false;
}
}
#endif
- return TRUE;
+ return true;
}
// ============================================================================
{
static char s_szFlags[256] = "%";
size_t flagofs = 1;
- bool adj_left = FALSE,
- in_prec = FALSE,
- prec_dot = FALSE,
- done = FALSE;
+ bool adj_left = false,
+ in_prec = false,
+ prec_dot = false,
+ done = false;
int ilen = 0;
size_t min_width = 0,
max_width = wxSTRING_MAXLEN;
if (in_prec && !prec_dot) \
{ \
s_szFlags[flagofs++] = '.'; \
- prec_dot = TRUE; \
+ prec_dot = true; \
}
#define APPEND_CH(ch) \
case wxT('\0'):
APPEND_CH(_T('\0'));
- done = TRUE;
+ done = true;
break;
case wxT('%'):
APPEND_CH(_T('%'));
- done = TRUE;
+ done = true;
break;
case wxT('#'):
case wxT('-'):
CHECK_PREC
- adj_left = TRUE;
+ adj_left = true;
s_szFlags[flagofs++] = ch;
break;
case wxT('.'):
CHECK_PREC
- in_prec = TRUE;
- prec_dot = FALSE;
+ in_prec = true;
+ prec_dot = false;
max_width = 0;
// dot will be auto-added to s_szFlags if non-negative
// number follows
APPEND_STR(tmp);
}
- done = TRUE;
+ done = true;
break;
case wxT('e'):
APPEND_STR(tmp);
}
- done = TRUE;
+ done = true;
break;
case wxT('p'):
wxConvLibc.cMB2WX(szScratch);
APPEND_STR(tmp);
- done = TRUE;
+ done = true;
}
break;
for (i = 1; i < min_width; i++)
APPEND_CH(_T(' '));
- done = TRUE;
+ done = true;
}
break;
for (i = len; i < min_width; i++)
APPEND_CH(_T(' '));
- done = TRUE;
+ done = true;
}
break;
long int *val = va_arg(argptr, long int *);
*val = lenCur;
}
- done = TRUE;
+ done = true;
break;
default:
// bad format, leave unchanged
APPEND_CH(_T('%'));
APPEND_CH(ch);
- done = TRUE;
+ done = true;
break;
}
}
// implement the standard IO functions for wide char if libc doesn't have them
// ----------------------------------------------------------------------------
-#ifdef wxNEED_FPUTWC
-
+#ifdef wxNEED_FPUTS
int wxFputs(const wchar_t *ws, FILE *stream)
{
// counting the number of wide characters written isn't worth the trouble,
// simply distinguish between ok and error
return fputs(wxConvLibc.cWC2MB(ws), stream) == -1 ? -1 : 0;
}
+#endif // wxNEED_FPUTS
+#ifdef wxNEED_PUTC
int /* not wint_t */ wxPutc(wchar_t wc, FILE *stream)
{
wchar_t ws[2] = { wc, L'\0' };
return wxFputs(ws, stream);
}
-
-#endif // wxNEED_FPUTWC
+#endif // wxNEED_PUTC
// NB: we only implement va_list functions here, the ones taking ... are
// defined below for wxNEED_PRINTF_CONVERSION case anyhow and we reuse