fixes and workarounds to return value of our own wxVsnprintf_() implementation: handle -1 as error and not an indication that there is not enough space (patch 1623077)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-01-07 16:17:28 +00:00
parent d2aa263fd1
commit f2bbe5b675
4 changed files with 78 additions and 17 deletions

View File

@@ -982,13 +982,18 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
#endif /* wxUSE_PRINTF_POS_PARAMS/!wxUSE_PRINTF_POS_PARAMS */
#ifndef wxSnprintf_
/* no [v]snprintf(), cook our own */
/* no snprintf(), cook our own */
WXDLLIMPEXP_BASE int
wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, ...) ATTRIBUTE_PRINTF_3;
#endif
#ifndef wxVsnprintf_
/* no (suitable) vsnprintf(), cook our own */
WXDLLIMPEXP_BASE int
wxVsnprintf_(wxChar *buf, size_t len, const wxChar *format, va_list argptr);
#define wxUSE_WXVSNPRINTF 1
#else
#define wxUSE_WXVSNPRINTF 0
#endif
/*