DMC work round
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,6 +19,10 @@
|
|||||||
#include "wx/wxcrtbase.h"
|
#include "wx/wxcrtbase.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
|
#if defined (__VISUALC__) || defined (__DMC__)
|
||||||
|
#define HAVE_NO_VSSCANF 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// misc functions
|
// misc functions
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
@@ -625,7 +625,20 @@ int wxVsprintf(char *str, const wxString& format, va_list argptr)
|
|||||||
int wxVsprintf(wchar_t *str, const wxString& format, va_list argptr)
|
int wxVsprintf(wchar_t *str, const wxString& format, va_list argptr)
|
||||||
{
|
{
|
||||||
#if wxUSE_UNICODE_WCHAR
|
#if wxUSE_UNICODE_WCHAR
|
||||||
|
#ifdef __DMC__
|
||||||
|
/*
|
||||||
|
This fails with a bug similar to
|
||||||
|
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=c++.beta&artnum=680
|
||||||
|
in DMC 8.49 and 8.50
|
||||||
|
I don't see it being used in the wxWidgets sources at present (oct 2007) CE
|
||||||
|
*/
|
||||||
|
#pragma message ( "warning ::::: wxVsprintf(wchar_t *str, const wxString& format, va_list argptr) not yet implemented" )
|
||||||
|
wxFAIL_MSG( _T("TODO") );
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
#else
|
||||||
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
|
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
|
||||||
|
#endif //DMC
|
||||||
#else // wxUSE_UNICODE_UTF8
|
#else // wxUSE_UNICODE_UTF8
|
||||||
#if !wxUSE_UTF8_LOCALE_ONLY
|
#if !wxUSE_UTF8_LOCALE_ONLY
|
||||||
if ( !wxLocaleIsUtf8 )
|
if ( !wxLocaleIsUtf8 )
|
||||||
@@ -1243,7 +1256,7 @@ wchar_t *wxFgets(wchar_t *s, int size, FILE *stream)
|
|||||||
// wxScanf() and friends
|
// wxScanf() and friends
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef __VISUALC__
|
#ifndef HAVE_NO_VSSCANF // __VISUALC__ and __DMC__ see wx/crt.h
|
||||||
int wxVsscanf(const char *str, const char *format, va_list ap)
|
int wxVsscanf(const char *str, const char *format, va_list ap)
|
||||||
{ return wxCRT_VsscanfA(str, format, ap); }
|
{ return wxCRT_VsscanfA(str, format, ap); }
|
||||||
int wxVsscanf(const wchar_t *str, const wchar_t *format, va_list ap)
|
int wxVsscanf(const wchar_t *str, const wchar_t *format, va_list ap)
|
||||||
@@ -1260,4 +1273,4 @@ int wxVsscanf(const wxCStrData& str, const char *format, va_list ap)
|
|||||||
{ return wxCRT_VsscanfA(str.AsCharBuf(), format, ap); }
|
{ return wxCRT_VsscanfA(str.AsCharBuf(), format, ap); }
|
||||||
int wxVsscanf(const wxCStrData& str, const wchar_t *format, va_list ap)
|
int wxVsscanf(const wxCStrData& str, const wchar_t *format, va_list ap)
|
||||||
{ return wxCRT_VsscanfW(str.AsWCharBuf(), format, ap); }
|
{ return wxCRT_VsscanfW(str.AsWCharBuf(), format, ap); }
|
||||||
#endif // !__VISUALC__
|
#endif // HAVE_NO_VSSCANF
|
||||||
|
Reference in New Issue
Block a user