]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxFopen to the MSLU code.
authorRobert Roebling <robert@roebling.de>
Fri, 7 Jan 2005 18:48:30 +0000 (18:48 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 7 Jan 2005 18:48:30 +0000 (18:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/mslu.h
include/wx/wxchar.h
src/msw/mslu.cpp

index 348ef3e8a45ec1c8c64d791a8a91aa3e3a343f38..ed8b9423e8200ef0125148c0922aae7d5172d4a9 100644 (file)
@@ -51,6 +51,7 @@ WXDLLEXPORT int wxMSLU_GetSaveFileNameW(void *ofn);
 
 WXDLLIMPEXP_BASE int wxMSLU__trename(const wxChar *oldname, const wxChar *newname);
 WXDLLIMPEXP_BASE int wxMSLU__tremove(const wxChar *name);
+WXDLLIMPEXP_BASE FILE* wxMSLU__tfopen(const wxChar *name, const wxChar *mode);
 
 #if defined( __VISUALC__ ) \
     || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
index fdfb0da05f1d19ab6bbb4d56f89ed91fdb33c9d6..45ccbc1c168c7894019619c2a2957f2a45f57dc7 100644 (file)
     #define  wxFgetc     _fgettc
     #define  wxFgetchar  _fgettchar
     #define  wxFgets     _fgetts
-    #define  wxFopen     _tfopen
+    #if wxUSE_UNICODE_MSLU
+        #define  wxFopen    wxMSLU__tfopen
+    #else
+        #define  wxFopen     _tfopen
+    #endif
     #define  wxFputc     _fputtc
     #define  wxFputchar  _fputtchar
     #define  wxFprintf   _ftprintf
index eba45e13d7a619a1e3f843430da573047fa6a47a..f6f373a965cae8e2b10c0c1b17b281e95a136eea 100644 (file)
@@ -169,6 +169,14 @@ WXDLLIMPEXP_BASE int wxMSLU__tremove(const wxChar *name)
         return _tremove(name);
 }
 
+WXDLLIMPEXP_BASE FILE* wxMSLU__tfopen(const wxChar *name,const wxChar* mode)
+{
+    if ( wxUsingUnicowsDll() )
+        return fopen(wxConvFile.cWX2MB(name),wxConvFile.cWX2MB(mode));
+    else
+        return _tfopen(name,mode);
+}
+
 #if defined( __VISUALC__ ) \
     || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
     || ( defined(__MWERKS__) && defined(__WXMSW__) ) \