Added RTL functions missing from WinCE to wxchar.h/cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,13 +74,7 @@ protected:
|
|||||||
|
|
||||||
static void** AllocTable( size_t sz )
|
static void** AllocTable( size_t sz )
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
|
||||||
void** ptr = (void **)malloc(sz * sizeof(void*));
|
|
||||||
memset( ptr, 0, sz * sizeof(void*));
|
|
||||||
return ptr;
|
|
||||||
#else
|
|
||||||
return (void **)calloc(sz, sizeof(void*));
|
return (void **)calloc(sz, sizeof(void*));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -927,6 +927,14 @@ WXDLLIMPEXP_BASE int wxSystem(const wxChar *psz);
|
|||||||
const wxChar *fmt, const struct tm *tm);
|
const wxChar *fmt, const struct tm *tm);
|
||||||
#endif // wxNEED_WX_TIME_H
|
#endif // wxNEED_WX_TIME_H
|
||||||
|
|
||||||
|
// missing functions in WinCE
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
WXDLLIMPEXP_BASE char* strdup(const char* s);
|
||||||
|
WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size );
|
||||||
|
WXDLLIMPEXP_BASE int isspace(int c);
|
||||||
|
WXDLLIMPEXP_BASE int isascii( int c );
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// multibyte to wide char conversion functions and macros
|
// multibyte to wide char conversion functions and macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -1013,10 +1013,6 @@ wxString::Replace(const wxChar *szOld, const wxChar *szNew, bool bReplaceAll)
|
|||||||
return uiCount;
|
return uiCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
|
||||||
inline int isascii(wxChar c) { return (c >= 0) && (c <=127); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool wxString::IsAscii() const
|
bool wxString::IsAscii() const
|
||||||
{
|
{
|
||||||
const wxChar *s = (const wxChar*) *this;
|
const wxChar *s = (const wxChar*) *this;
|
||||||
|
@@ -229,10 +229,6 @@ void wxTextValidator::SetExcludeList(const wxStringList& list)
|
|||||||
m_excludeList = list;
|
m_excludeList = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
|
||||||
inline int isascii(wxChar c) { return (c >= 0) && (c <=127); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void wxTextValidator::OnChar(wxKeyEvent& event)
|
void wxTextValidator::OnChar(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@@ -1408,3 +1408,31 @@ int isascii( int c )
|
|||||||
}
|
}
|
||||||
#endif // __MWERKS__
|
#endif // __MWERKS__
|
||||||
|
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
char* strdup(const char* s)
|
||||||
|
{
|
||||||
|
char *dest = (char*) malloc( strlen( s ) + 1 ) ;
|
||||||
|
if ( dest )
|
||||||
|
strcpy( dest , s ) ;
|
||||||
|
return dest ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *calloc( size_t num, size_t size )
|
||||||
|
{
|
||||||
|
void** ptr = (void **)malloc(num * size);
|
||||||
|
memset( ptr, 0, num * size);
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
int isspace(int c)
|
||||||
|
{
|
||||||
|
return (c == ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
int isascii( int c )
|
||||||
|
{
|
||||||
|
return ( c >= 0 && c < 128 ) ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -119,20 +119,6 @@ license is as follows:
|
|||||||
|
|
||||||
#include "wx/xpmdecod.h"
|
#include "wx/xpmdecod.h"
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
|
||||||
char* strdup(const char* s)
|
|
||||||
{
|
|
||||||
char* s2 = new char[strlen(s)];
|
|
||||||
strcpy(s2, s);
|
|
||||||
return s2;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isspace(char c)
|
|
||||||
{
|
|
||||||
return (c == ' ');
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_STREAMS
|
#if wxUSE_STREAMS
|
||||||
bool wxXPMDecoder::CanRead(wxInputStream& stream)
|
bool wxXPMDecoder::CanRead(wxInputStream& stream)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user