X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba1e9d6cede4073faf42e3e290a030965a2205c3..8cf73271dd6f442a98e86b559d4a55c37e25b99f:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index ad9d353990..6a047fe88a 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -2,7 +2,7 @@ * Name: wx/wxchar.h * Purpose: Declarations common to wx char/wchar_t usage (wide chars) * Author: Joel Farley, Ove Kåven - * Modified by: Vadim Zeitlin, Robert Roebling + * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee * Created: 1998/06/12 * RCS-ID: $Id$ * Copyright: (c) 1998-2002 wxWindows dev team @@ -76,6 +76,11 @@ #define HAVE_WCHAR_H #endif #endif +#if defined(__MWERKS__) && !defined(__MACH__) + #ifndef HAVE_WCSLEN + #define HAVE_WCSLEN + #endif +#endif #if wxUSE_WCHAR_T #ifdef HAVE_WCHAR_H @@ -303,16 +308,17 @@ #define wxPuts _putts #define wxScanf _tscanf #if defined(__DMC__) - /* Digital Mars adds count to _stprintf (C99) so it does not fit wxWindows needs */ - /* Instead of it we can use function from MSW api (FIXME: doesn't work) */ - #ifdef wxUSE_UNICODE - #define wxSprintf wsprintfW + #if wxUSE_UNICODE + /* Digital Mars adds count to _stprintf (C99) so prototype conversion see wxchar.cpp */ + int wxSprintf (wchar_t * __RESTRICT s, const wchar_t * __RESTRICT format, ... ) ; #else - #define wxSprintf wsprintfA + /* and there is a bug in D Mars tchar.h prior to 8.39.4n, so define as sprintf */ + #define wxSprintf sprintf #endif #else - #define wxSprintf _stprintf + #define wxSprintf _stprintf #endif + #define wxSscanf _stscanf #define wxTmpnam _ttmpnam #define wxUngetc _tungetc @@ -357,7 +363,7 @@ #include /* this is probably glibc-specific */ - #if defined(__WCHAR_TYPE__) + #if defined(__WCHAR_TYPE__) && !defined(__MWERKS__) /* ctype.h functions (wctype.h) */ #define wxIsalnum iswalnum #define wxIsalpha iswalpha @@ -505,21 +511,6 @@ #define wxCtime wctime /* #define wxStrftime wcsftime */ - /* - #define wxNEED_FPUTWC - - #include - - int wxFputs(const wxChar *ch, FILE *stream); - int wxPutc(wxChar ch, FILE *stream); - - #define wxPuts(ws) wxFputs(ws, stdout) - #define wxPutchar(wch) wxPutc(wch, stdout) - - #define wxNEED_PRINTF_CONVERSION - #define wxNEED_WX_STDIO_H - #define wxNEED_WX_STDLIB_H - */ #define wxNEED_WX_TIME_H #else /* !metrowerks for apple */ #error "Please define wide character functions for your environment" @@ -932,6 +923,12 @@ WXDLLIMPEXP_BASE int wxSystem(const wxChar *psz); const wxChar *fmt, const struct tm *tm); #endif /* wxNEED_WX_TIME_H */ +#ifndef wxCtime +#include +WXDLLIMPEXP_BASE wxChar *wxCtime(const time_t *timep); +#endif + + /* missing functions in some WinCE versions */ #ifdef _WIN32_WCE #if (_WIN32_WCE < 300)