From: Ove Kaaven Date: Tue, 13 Apr 1999 06:53:41 +0000 (+0000) Subject: wxAtof independent of wxNEED_WX_STDLIB_H, used by Visual C++ in Unicode mode, X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a982ddd2020a7fbfa84c8e96feca2e6d1f1e967a wxAtof independent of wxNEED_WX_STDLIB_H, used by Visual C++ in Unicode mode, defined to atof in non-Unicode mode. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index e1342aecc7..63d5a33204 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -104,7 +104,9 @@ typedef _TUCHAR wxUChar; #define wxVsprintf _vstprintf // stdlib.h functions -#define wxAtof(s) atof(wxString(s).mb_str()) +#if !wxUSE_UNICODE +#define wxAtof atof +#endif #define wxAtoi _ttoi #define wxAtol _ttol #define wxGetenv _tgetenv @@ -365,8 +367,11 @@ int WXDLLEXPORT wxSprintf(wxChar *buf, const wxChar *fmt, ...); int WXDLLEXPORT wxVsprintf(wxChar *buf, const wxChar *fmt, va_list argptr); #endif -#ifdef wxNEED_WX_STDLIB_H +#ifndef wxAtof double WXDLLEXPORT wxAtof(const wxChar *psz); +#endif + +#ifdef wxNEED_WX_STDLIB_H int WXDLLEXPORT wxAtoi(const wxChar *psz); long WXDLLEXPORT wxAtol(const wxChar *psz); wxChar * WXDLLEXPORT wxGetenv(const wxChar *name);