]> git.saurik.com Git - wxWidgets.git/commitdiff
more MSLU fixes and moved MSLU stuff into separate file
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 17 Feb 2002 23:29:25 +0000 (23:29 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 17 Feb 2002 23:29:25 +0000 (23:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

16 files changed:
distrib/msw/tmake/filelist.txt
include/wx/filefn.h
include/wx/msw/private.h
include/wx/wxchar.h
src/common/fileconf.cpp
src/common/filefn.cpp
src/microwin/files.lst
src/msw/files.lst
src/msw/makefile.b32
src/msw/makefile.bcc
src/msw/makefile.dos
src/msw/makefile.g95
src/msw/makefile.sc
src/msw/makefile.vc
src/msw/makefile.wat
src/wxWindows.dsp

index 246786f91864353c1a7fbb5966a6fd2c370fefe6..8f3c52b261d70aa59b209ff5d9beab1ff4a76fe0 100644 (file)
@@ -314,6 +314,7 @@ metafile.cpp        MSW
 mimetype.cpp   MSW     Win32Only,Base
 minifram.cpp   MSW
 msgdlg.cpp     MSW
+mslu.cpp       MSW
 nativdlg.cpp   MSW
 notebook.cpp   MSW     Win32Only
 oleutils.cpp   MSW     OLE
@@ -874,6 +875,7 @@ mimetype.h  WXH     Base
 minifram.h     WXH
 module.h       WXH     Base
 msgdlg.h       WXH
+mslu.cpp       MSW
 mstream.h      WXH     Base
 notebook.h     WXH
 object.h       WXH     Base
@@ -1264,6 +1266,7 @@ metafile.h        MSWH
 mimetype.h     MSWH    Win32Only,Base
 minifram.h     MSWH
 msgdlg.h       MSWH
+mslu.h MSWH
 msvcrt.h       MSWH
 notebook.h     MSWH
 palette.h      MSWH
index e590ff3fe87198927954d999222d0ea470bca6b5..b1df9ded523c7ca4b8121617dd2cd97330adf9c1 100644 (file)
@@ -81,23 +81,23 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
 
     #if wxUSE_UNICODE
         #if wxUSE_UNICODE_MSLU
-            WXDLLEXPORT int wxOpen(const wxChar *name, int flags, int mode);
+            #define   wxOpen       wxMSLU__wopen
+            #define   wxAccess     wxMSLU__waccess
+            #define   wxMkDir      wxMSLU__wmkdir
+            #define   wxRmDir      wxMSLU__wrmdir
+            #define   wxStat       wxMSLU__wstat
         #else
             #define   wxOpen       _wopen
+            #define   wxAccess     _waccess
+            #define   wxMkDir      _wmkdir
+            #define   wxRmDir      _wrmdir
+            #define   wxStat       _wstat
         #endif
-        #define   wxAccess     _waccess
-
-        #define   wxMkDir      _wmkdir
-        #define   wxRmDir      _wrmdir
-
-        #define   wxStat       _wstat
     #else // !wxUSE_UNICODE
         #define   wxOpen       _open
         #define   wxAccess     _access
-
         #define   wxMkDir      _mkdir
         #define   wxRmDir      _rmdir
-
         #define   wxStat       _stat
     #endif
 
index 23aaba1766f26b9e2c65bcfbe623a19fa484403b..5fe1bbfbef6d082f4283bfe2688af48373c4f415 100644 (file)
@@ -28,6 +28,9 @@
 // undefine conflicting symbols which were defined in windows.h
 #include "wx/msw/winundef.h"
 
+// Include fixes for MSLU:
+#include "wx/msw/mslu.h"
+
 #include "wx/log.h"
 
 class WXDLLEXPORT wxFont;
index df2130d45d4c53a3b47cd90b2abc2b815584e370..462da579d693fa6f274d85ad7f92216eb8960cfa 100644 (file)
@@ -202,6 +202,13 @@ typedef  _TUCHAR     wxUChar;
 
    // stdio.h functions
 #ifndef wxNO_TCHAR_STDIO
+#  if wxUSE_UNICODE_MSLU
+#    define  wxRemove    wxMSLU__tremove
+#    define  wxRename    wxMSLU__trename
+#  else
+#    define  wxRemove    _tremove
+#    define  wxRename    _trename
+#  endif
 #  define  wxFgetc     _fgettc
 #  define  wxFgetchar  _fgettchar
 #  define  wxFgets     _fgetts
@@ -219,8 +226,6 @@ typedef  _TUCHAR     wxUChar;
 #  define  wxPutc      _puttc
 #  define  wxPutchar   _puttchar
 #  define  wxPuts      _putts
-#  define  wxRemove    _tremove
-#  define  wxRename    _trename
 #  define  wxScanf     _tscanf
 #  define  wxSprintf   _stprintf
 #  define  wxSscanf    _stscanf
index e976daf434c03c9fbb24a314d26733540e8c9059..45ea8251d03830a30654293c25fae60f26b1f71a 100644 (file)
   #include  "wx/mac/private.h"  // includes mac headers
 #endif
 
-// _WINDOWS_ is defined when windows.h is included,
-// __WXMSW__ is defined for MS Windows compilation
-#if       defined(__WXMSW__) && !defined(_WINDOWS_)
-  #include  <windows.h>
+#if defined(__WXMSW__)
+  #include "wx/msw/private.h"
 #endif  //windows.h
 #if defined(__WXPM__)
   #define INCL_DOS
index 319f1a6d66157fc934a72f9964370ae6bc84b8af..9d83a8dbac599be85a86b7c438649020b77730d2 100644 (file)
 
 #ifdef __WINDOWS__
     #include <windows.h>
-
+    #include "wx/msw/mslu.h"
+    
     // sys/cygwin.h is needed for cygwin_conv_to_full_win32_path()
     //
     // note that it must be included after <windows.h>
@@ -1803,28 +1804,3 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 #ifdef __VISUALC__
     #pragma warning(default:4706)   // assignment within conditional expression
 #endif // VC++
-
-//------------------------------------------------------------------------
-// Missing functions in Unicode for Win9x
-//------------------------------------------------------------------------
-
-// NB: MSLU only covers Win32 API, it doesn't provide Unicode implementation of
-//     libc functions. Unfortunately, some of MSVCRT wchar_t functions
-//     (e.g. _wopen) don't work on Windows 9x, so we have to workaround it
-//     by calling the char version. We still want to use wchar_t version on
-//     NT/2000/XP, though, because they allow for Unicode file names.
-#if wxUSE_UNICODE_MSLU
-
-    #if defined( __VISUALC__ ) \
-        || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
-        || ( defined(__MWERKS__) && defined(__WXMSW__) )
-    WXDLLEXPORT int wxOpen(const wxChar *name, int flags, int mode)
-    {
-        if ( wxGetOsVersion() == wxWINDOWS_NT )
-            return _wopen(name, flags, mode);
-        else
-            return _open(wxConvFile.cWX2MB(name), flags, mode);
-    }
-    #endif
-
-#endif // wxUSE_UNICODE_MSLU
index 7f43e3e584918de209e60ed88a80724d95004613..31cce0384f6e69af033f0834c6f580eda6b78957 100644 (file)
@@ -514,6 +514,7 @@ ALL_HEADERS = \
                msw/mimetype.h \
                msw/minifram.h \
                msw/msgdlg.h \
+               msw/mslu.h \
                msw/msvcrt.h \
                msw/notebook.h \
                msw/palette.h \
index 38148cdac4145e29cb1fe1f6a742bd891b050217..8e68f25ebb95386772037ef66c617cfcc561cd17 100644 (file)
@@ -221,6 +221,7 @@ ALL_SOURCES = \
                msw/mimetype.cpp \
                msw/minifram.cpp \
                msw/msgdlg.cpp \
+               msw/mslu.cpp \
                msw/nativdlg.cpp \
                msw/notebook.cpp \
                msw/ole/oleutils.cpp \
@@ -572,6 +573,7 @@ ALL_HEADERS = \
                msw/mimetype.h \
                msw/minifram.h \
                msw/msgdlg.h \
+               msw/mslu.h \
                msw/msvcrt.h \
                msw/notebook.h \
                msw/palette.h \
@@ -899,6 +901,7 @@ GUIOBJS = \
                mimetype.o \
                minifram.o \
                msgdlg.o \
+               mslu.o \
                nativdlg.o \
                notebook.o \
                ownerdrw.o \
index f395edd2324d13c2edd34fad374f0a4a035049c6..68da71476605be0c5bf6f2dfe4ded2380e2fda6a 100644 (file)
@@ -305,6 +305,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
                $(MSWDIR)\mimetype.obj \
                $(MSWDIR)\minifram.obj \
                $(MSWDIR)\msgdlg.obj \
+               $(MSWDIR)\mslu.obj \
                $(MSWDIR)\nativdlg.obj \
                $(MSWDIR)\notebook.obj \
                $(MSWDIR)\oleutils.obj \
@@ -558,6 +559,8 @@ $(MSWDIR)\minifram.obj: $(MSWDIR)\minifram.$(SRCSUFF)
 
 $(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF)
 
+$(MSWDIR)\mslu.obj: $(MSWDIR)\mslu.$(SRCSUFF)
+
 $(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF)
 
 $(MSWDIR)\notebook.obj: $(MSWDIR)\notebook.$(SRCSUFF)
index 6ec16f2814f8e0e26ed5e221e21a9aae5c932f6b..526845f116aa93f498da3d485b8ed42b8fa14437 100644 (file)
@@ -266,6 +266,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
                $(MSWDIR)\metafile.obj \
                $(MSWDIR)\minifram.obj \
                $(MSWDIR)\msgdlg.obj \
+               $(MSWDIR)\mslu.obj \
                $(MSWDIR)\nativdlg.obj \
                $(MSWDIR)\ownerdrw.obj \
                $(MSWDIR)\palette.obj \
@@ -440,6 +441,8 @@ $(MSWDIR)\minifram.obj: $(MSWDIR)\minifram.$(SRCSUFF)
 
 $(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF)
 
+$(MSWDIR)\mslu.obj: $(MSWDIR)\mslu.$(SRCSUFF)
+
 $(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF)
 
 $(MSWDIR)\ownerdrw.obj: $(MSWDIR)\ownerdrw.$(SRCSUFF)
index 30ccd68365d261a5af5328bee72ac68dc975c9a9..628d8a1bc9267d5f8aa3e4460568f204d9d4321b 100644 (file)
@@ -254,6 +254,7 @@ MSWOBJS1 = $(MSWDIR)\accel.obj \
                $(MSWDIR)\metafile.obj \
                $(MSWDIR)\minifram.obj \
                $(MSWDIR)\msgdlg.obj \
+               $(MSWDIR)\mslu.obj \
                $(MSWDIR)\nativdlg.obj \
                $(MSWDIR)\ownerdrw.obj
 
@@ -633,6 +634,11 @@ $(MSWDIR)/msgdlg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(MSWDIR)/mslu.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(MSWDIR)/nativdlg.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
index 59b8a9c1fffab66c00247d42b5aebaf67dcce26d..f0b9403606b407a9b1962c38ae760ecafc38a5d6 100644 (file)
@@ -337,6 +337,7 @@ MSWOBJS     = \
                $(MSWDIR)/metafile.$(OBJSUFF) \
                $(MSWDIR)/minifram.$(OBJSUFF) \
                $(MSWDIR)/msgdlg.$(OBJSUFF) \
+               $(MSWDIR)/mslu.$(OBJSUFF) \
                $(MSWDIR)/nativdlg.$(OBJSUFF) \
                $(MSWDIR)/notebook.$(OBJSUFF) \
                $(MSWDIR)/ownerdrw.$(OBJSUFF) \
index a7a3ae40e19c01edd33bd6f5623d834e02997a6d..c555f891b47d1a01fe0c3c7aae6ace8de45e8953 100644 (file)
@@ -248,6 +248,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
                $(MSWDIR)\mimetype.obj \
                $(MSWDIR)\minifram.obj \
                $(MSWDIR)\msgdlg.obj \
+               $(MSWDIR)\mslu.obj \
                $(MSWDIR)\nativdlg.obj \
                $(MSWDIR)\ole\oleutils.obj \
                $(MSWDIR)\ownerdrw.obj \
index b12c0ffbbcbf0a2f9ba5c8f19881127961824bae..e5c5a967d00136b2b57a1fddf94184395709ec08 100644 (file)
@@ -326,6 +326,7 @@ MSWOBJS = $(MSWDIR)\$D\accel.obj \
                $(MSWDIR)\$D\mimetype.obj \
                $(MSWDIR)\$D\minifram.obj \
                $(MSWDIR)\$D\msgdlg.obj \
+               $(MSWDIR)\$D\mslu.obj \
                $(MSWDIR)\$D\nativdlg.obj \
                $(MSWDIR)\$D\notebook.obj \
                $(OLEDIR)\$D\oleutils.obj \
index 5f2d58f03ffb33171c04880306fb7f24d0ec3125..ce15e03732d30a85813cc54eb6dfb4dcb98d4924 100644 (file)
@@ -290,6 +290,7 @@ MSWOBJS = accel.obj &
        mimetype.obj &
        minifram.obj &
        msgdlg.obj &
+       mslu.obj &
        nativdlg.obj &
        notebook.obj &
        oleutils.obj &
@@ -595,6 +596,9 @@ minifram.obj:     $(MSWDIR)\minifram.cpp
 msgdlg.obj:     $(MSWDIR)\msgdlg.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+mslu.obj:     $(MSWDIR)\mslu.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 nativdlg.obj:     $(MSWDIR)\nativdlg.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
index 753b51cf44e44be9b235a7755c8be987337d93ec..dd069a2f0af3179f7d1ba224e4877df5b9489be4 100644 (file)
@@ -1217,6 +1217,10 @@ SOURCE=.\msw\msgdlg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\msw\mslu.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\msw\nativdlg.cpp
 # End Source File
 # Begin Source File
@@ -2639,6 +2643,10 @@ SOURCE=..\include\wx\msw\msgdlg.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\include\wx\msw\mslu.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\include\wx\msw\msvcrt.h
 # End Source File
 # Begin Source File