more MSLU fixes and moved MSLU stuff into separate file

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-02-17 23:29:25 +00:00
parent 6af638ed35
commit 3d5231db07
16 changed files with 57 additions and 41 deletions

View File

@@ -314,6 +314,7 @@ metafile.cpp MSW
mimetype.cpp MSW Win32Only,Base mimetype.cpp MSW Win32Only,Base
minifram.cpp MSW minifram.cpp MSW
msgdlg.cpp MSW msgdlg.cpp MSW
mslu.cpp MSW
nativdlg.cpp MSW nativdlg.cpp MSW
notebook.cpp MSW Win32Only notebook.cpp MSW Win32Only
oleutils.cpp MSW OLE oleutils.cpp MSW OLE
@@ -874,6 +875,7 @@ mimetype.h WXH Base
minifram.h WXH minifram.h WXH
module.h WXH Base module.h WXH Base
msgdlg.h WXH msgdlg.h WXH
mslu.cpp MSW
mstream.h WXH Base mstream.h WXH Base
notebook.h WXH notebook.h WXH
object.h WXH Base object.h WXH Base
@@ -1264,6 +1266,7 @@ metafile.h MSWH
mimetype.h MSWH Win32Only,Base mimetype.h MSWH Win32Only,Base
minifram.h MSWH minifram.h MSWH
msgdlg.h MSWH msgdlg.h MSWH
mslu.h MSWH
msvcrt.h MSWH msvcrt.h MSWH
notebook.h MSWH notebook.h MSWH
palette.h MSWH palette.h MSWH

View File

@@ -81,23 +81,23 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#if wxUSE_UNICODE #if wxUSE_UNICODE
#if wxUSE_UNICODE_MSLU #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 #else
#define wxOpen _wopen #define wxOpen _wopen
#define wxAccess _waccess
#define wxMkDir _wmkdir
#define wxRmDir _wrmdir
#define wxStat _wstat
#endif #endif
#define wxAccess _waccess
#define wxMkDir _wmkdir
#define wxRmDir _wrmdir
#define wxStat _wstat
#else // !wxUSE_UNICODE #else // !wxUSE_UNICODE
#define wxOpen _open #define wxOpen _open
#define wxAccess _access #define wxAccess _access
#define wxMkDir _mkdir #define wxMkDir _mkdir
#define wxRmDir _rmdir #define wxRmDir _rmdir
#define wxStat _stat #define wxStat _stat
#endif #endif

View File

@@ -28,6 +28,9 @@
// undefine conflicting symbols which were defined in windows.h // undefine conflicting symbols which were defined in windows.h
#include "wx/msw/winundef.h" #include "wx/msw/winundef.h"
// Include fixes for MSLU:
#include "wx/msw/mslu.h"
#include "wx/log.h" #include "wx/log.h"
class WXDLLEXPORT wxFont; class WXDLLEXPORT wxFont;

View File

@@ -202,6 +202,13 @@ typedef _TUCHAR wxUChar;
// stdio.h functions // stdio.h functions
#ifndef wxNO_TCHAR_STDIO #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 wxFgetc _fgettc
# define wxFgetchar _fgettchar # define wxFgetchar _fgettchar
# define wxFgets _fgetts # define wxFgets _fgetts
@@ -219,8 +226,6 @@ typedef _TUCHAR wxUChar;
# define wxPutc _puttc # define wxPutc _puttc
# define wxPutchar _puttchar # define wxPutchar _puttchar
# define wxPuts _putts # define wxPuts _putts
# define wxRemove _tremove
# define wxRename _trename
# define wxScanf _tscanf # define wxScanf _tscanf
# define wxSprintf _stprintf # define wxSprintf _stprintf
# define wxSscanf _stscanf # define wxSscanf _stscanf

View File

@@ -50,10 +50,8 @@
#include "wx/mac/private.h" // includes mac headers #include "wx/mac/private.h" // includes mac headers
#endif #endif
// _WINDOWS_ is defined when windows.h is included, #if defined(__WXMSW__)
// __WXMSW__ is defined for MS Windows compilation #include "wx/msw/private.h"
#if defined(__WXMSW__) && !defined(_WINDOWS_)
#include <windows.h>
#endif //windows.h #endif //windows.h
#if defined(__WXPM__) #if defined(__WXPM__)
#define INCL_DOS #define INCL_DOS

View File

@@ -114,7 +114,8 @@
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#include <windows.h> #include <windows.h>
#include "wx/msw/mslu.h"
// sys/cygwin.h is needed for cygwin_conv_to_full_win32_path() // sys/cygwin.h is needed for cygwin_conv_to_full_win32_path()
// //
// note that it must be included after <windows.h> // 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__ #ifdef __VISUALC__
#pragma warning(default:4706) // assignment within conditional expression #pragma warning(default:4706) // assignment within conditional expression
#endif // VC++ #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

View File

@@ -514,6 +514,7 @@ ALL_HEADERS = \
msw/mimetype.h \ msw/mimetype.h \
msw/minifram.h \ msw/minifram.h \
msw/msgdlg.h \ msw/msgdlg.h \
msw/mslu.h \
msw/msvcrt.h \ msw/msvcrt.h \
msw/notebook.h \ msw/notebook.h \
msw/palette.h \ msw/palette.h \

View File

@@ -221,6 +221,7 @@ ALL_SOURCES = \
msw/mimetype.cpp \ msw/mimetype.cpp \
msw/minifram.cpp \ msw/minifram.cpp \
msw/msgdlg.cpp \ msw/msgdlg.cpp \
msw/mslu.cpp \
msw/nativdlg.cpp \ msw/nativdlg.cpp \
msw/notebook.cpp \ msw/notebook.cpp \
msw/ole/oleutils.cpp \ msw/ole/oleutils.cpp \
@@ -572,6 +573,7 @@ ALL_HEADERS = \
msw/mimetype.h \ msw/mimetype.h \
msw/minifram.h \ msw/minifram.h \
msw/msgdlg.h \ msw/msgdlg.h \
msw/mslu.h \
msw/msvcrt.h \ msw/msvcrt.h \
msw/notebook.h \ msw/notebook.h \
msw/palette.h \ msw/palette.h \
@@ -899,6 +901,7 @@ GUIOBJS = \
mimetype.o \ mimetype.o \
minifram.o \ minifram.o \
msgdlg.o \ msgdlg.o \
mslu.o \
nativdlg.o \ nativdlg.o \
notebook.o \ notebook.o \
ownerdrw.o \ ownerdrw.o \

View File

@@ -305,6 +305,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\mimetype.obj \ $(MSWDIR)\mimetype.obj \
$(MSWDIR)\minifram.obj \ $(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \ $(MSWDIR)\msgdlg.obj \
$(MSWDIR)\mslu.obj \
$(MSWDIR)\nativdlg.obj \ $(MSWDIR)\nativdlg.obj \
$(MSWDIR)\notebook.obj \ $(MSWDIR)\notebook.obj \
$(MSWDIR)\oleutils.obj \ $(MSWDIR)\oleutils.obj \
@@ -558,6 +559,8 @@ $(MSWDIR)\minifram.obj: $(MSWDIR)\minifram.$(SRCSUFF)
$(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF) $(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF)
$(MSWDIR)\mslu.obj: $(MSWDIR)\mslu.$(SRCSUFF)
$(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF) $(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF)
$(MSWDIR)\notebook.obj: $(MSWDIR)\notebook.$(SRCSUFF) $(MSWDIR)\notebook.obj: $(MSWDIR)\notebook.$(SRCSUFF)

View File

@@ -266,6 +266,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\metafile.obj \ $(MSWDIR)\metafile.obj \
$(MSWDIR)\minifram.obj \ $(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \ $(MSWDIR)\msgdlg.obj \
$(MSWDIR)\mslu.obj \
$(MSWDIR)\nativdlg.obj \ $(MSWDIR)\nativdlg.obj \
$(MSWDIR)\ownerdrw.obj \ $(MSWDIR)\ownerdrw.obj \
$(MSWDIR)\palette.obj \ $(MSWDIR)\palette.obj \
@@ -440,6 +441,8 @@ $(MSWDIR)\minifram.obj: $(MSWDIR)\minifram.$(SRCSUFF)
$(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF) $(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF)
$(MSWDIR)\mslu.obj: $(MSWDIR)\mslu.$(SRCSUFF)
$(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF) $(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF)
$(MSWDIR)\ownerdrw.obj: $(MSWDIR)\ownerdrw.$(SRCSUFF) $(MSWDIR)\ownerdrw.obj: $(MSWDIR)\ownerdrw.$(SRCSUFF)

View File

@@ -254,6 +254,7 @@ MSWOBJS1 = $(MSWDIR)\accel.obj \
$(MSWDIR)\metafile.obj \ $(MSWDIR)\metafile.obj \
$(MSWDIR)\minifram.obj \ $(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \ $(MSWDIR)\msgdlg.obj \
$(MSWDIR)\mslu.obj \
$(MSWDIR)\nativdlg.obj \ $(MSWDIR)\nativdlg.obj \
$(MSWDIR)\ownerdrw.obj $(MSWDIR)\ownerdrw.obj
@@ -633,6 +634,11 @@ $(MSWDIR)/msgdlg.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<< <<
$(MSWDIR)/mslu.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(MSWDIR)/nativdlg.obj: $*.$(SRCSUFF) $(MSWDIR)/nativdlg.obj: $*.$(SRCSUFF)
cl @<< cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)

View File

@@ -337,6 +337,7 @@ MSWOBJS = \
$(MSWDIR)/metafile.$(OBJSUFF) \ $(MSWDIR)/metafile.$(OBJSUFF) \
$(MSWDIR)/minifram.$(OBJSUFF) \ $(MSWDIR)/minifram.$(OBJSUFF) \
$(MSWDIR)/msgdlg.$(OBJSUFF) \ $(MSWDIR)/msgdlg.$(OBJSUFF) \
$(MSWDIR)/mslu.$(OBJSUFF) \
$(MSWDIR)/nativdlg.$(OBJSUFF) \ $(MSWDIR)/nativdlg.$(OBJSUFF) \
$(MSWDIR)/notebook.$(OBJSUFF) \ $(MSWDIR)/notebook.$(OBJSUFF) \
$(MSWDIR)/ownerdrw.$(OBJSUFF) \ $(MSWDIR)/ownerdrw.$(OBJSUFF) \

View File

@@ -248,6 +248,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\mimetype.obj \ $(MSWDIR)\mimetype.obj \
$(MSWDIR)\minifram.obj \ $(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \ $(MSWDIR)\msgdlg.obj \
$(MSWDIR)\mslu.obj \
$(MSWDIR)\nativdlg.obj \ $(MSWDIR)\nativdlg.obj \
$(MSWDIR)\ole\oleutils.obj \ $(MSWDIR)\ole\oleutils.obj \
$(MSWDIR)\ownerdrw.obj \ $(MSWDIR)\ownerdrw.obj \

View File

@@ -326,6 +326,7 @@ MSWOBJS = $(MSWDIR)\$D\accel.obj \
$(MSWDIR)\$D\mimetype.obj \ $(MSWDIR)\$D\mimetype.obj \
$(MSWDIR)\$D\minifram.obj \ $(MSWDIR)\$D\minifram.obj \
$(MSWDIR)\$D\msgdlg.obj \ $(MSWDIR)\$D\msgdlg.obj \
$(MSWDIR)\$D\mslu.obj \
$(MSWDIR)\$D\nativdlg.obj \ $(MSWDIR)\$D\nativdlg.obj \
$(MSWDIR)\$D\notebook.obj \ $(MSWDIR)\$D\notebook.obj \
$(OLEDIR)\$D\oleutils.obj \ $(OLEDIR)\$D\oleutils.obj \

View File

@@ -290,6 +290,7 @@ MSWOBJS = accel.obj &
mimetype.obj & mimetype.obj &
minifram.obj & minifram.obj &
msgdlg.obj & msgdlg.obj &
mslu.obj &
nativdlg.obj & nativdlg.obj &
notebook.obj & notebook.obj &
oleutils.obj & oleutils.obj &
@@ -595,6 +596,9 @@ minifram.obj: $(MSWDIR)\minifram.cpp
msgdlg.obj: $(MSWDIR)\msgdlg.cpp msgdlg.obj: $(MSWDIR)\msgdlg.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
mslu.obj: $(MSWDIR)\mslu.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
nativdlg.obj: $(MSWDIR)\nativdlg.cpp nativdlg.obj: $(MSWDIR)\nativdlg.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@@ -1217,6 +1217,10 @@ SOURCE=.\msw\msgdlg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\msw\mslu.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\nativdlg.cpp SOURCE=.\msw\nativdlg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -2639,6 +2643,10 @@ SOURCE=..\include\wx\msw\msgdlg.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\msw\mslu.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\msw\msvcrt.h SOURCE=..\include\wx\msw\msvcrt.h
# End Source File # End Source File
# Begin Source File # Begin Source File