fixed wxVsnprintf_() compilation in ASCII mode

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-08-27 09:02:12 +00:00
parent d4ea46dbad
commit f778d781eb

View File

@ -163,13 +163,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
buf[lenCur++] = ch
#define APPEND_STR(s) \
for ( const char *p = s; *p; p++ ) \
{ \
APPEND_CH((wchar_t)(*p)); \
}
#define APPEND_WSTR(s) \
for ( const wchar_t *p = s; *p; p++ ) \
for ( const wxChar *p = s; *p; p++ ) \
{ \
APPEND_CH(*p); \
}
@ -305,7 +299,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
::sprintf(szScratch, s_szFlags, val);
}
APPEND_STR(szScratch);
APPEND_STR(wxConvLibc.cMB2WX(szScratch));
done = TRUE;
break;
@ -326,7 +320,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
::sprintf(szScratch, s_szFlags, val);
}
APPEND_STR(szScratch);
APPEND_STR(wxConvLibc.cMB2WX(szScratch));
done = TRUE;
break;
@ -339,7 +333,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
s_szFlags[flagofs] = '\0';
::sprintf(szScratch, s_szFlags, val);
APPEND_STR(szScratch);
APPEND_STR(wxConvLibc.cMB2WX(szScratch));
done = TRUE;
}
@ -372,7 +366,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
if (s.Len() < min_width)
s.Pad(min_width - s.Len(), wxT(' '), adj_left);
APPEND_WSTR(s);
APPEND_STR(s);
} else {
wxChar *val = va_arg(argptr, wxChar *);
size_t len = wxSTRING_MAXLEN;
@ -383,7 +377,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
if (s.Len() < min_width)
s.Pad(min_width - s.Len(), wxT(' '), adj_left);
APPEND_WSTR(s);
APPEND_STR(s);
}
done = TRUE;
break;