]> git.saurik.com Git - wxWidgets.git/commitdiff
Various changes for 16-bit compilation
authorJulian Smart <julian@anthemion.co.uk>
Thu, 2 Jul 1998 15:16:56 +0000 (15:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 2 Jul 1998 15:16:56 +0000 (15:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
src/common/config.cpp
src/common/datstrm.cpp
src/common/log.cpp
src/common/memory.cpp
src/generic/gridg.cpp
src/msw/makefile.b32
src/msw/makefile.dos
src/msw/makefile.nt
src/msw/ole/dataobj.cpp
src/msw/ownerdrw.cpp
src/msw/scrolbar.cpp
src/msw/utilsexc.cpp

index 9eae6aafa1374e1f773c1ef89b935b81c84d35f5..96f6a9c197be40783f215ed583feacbb38fbeef0 100644 (file)
@@ -38,6 +38,7 @@
 #include  <wx/textfile.h>
 #include  <wx/config.h>
 #include  <wx/fileconf.h>
+#include <stdlib.h>
 
 #include  <ctype.h>       // for isalnum()
 
index 048b3c50dc9c2a0c72a14a182083d4ca7aae73f5..980a280c137fad6de0d7a56705225cede7b596a6 100644 (file)
@@ -87,10 +87,11 @@ unsigned char wxDataStream::Read8()
   return (unsigned char)buf;
 }
 
+// Must be at global scope for VC++ 5
+extern "C" double ConvertFromIeeeExtended(const unsigned char *bytes);
+
 double wxDataStream::ReadDouble()
 {
-  extern "C" double ConvertFromIeeeExtended(const unsigned char *bytes);
-
 #if USE_APPLE_IEEE
   char buf[10];
 
@@ -159,9 +160,11 @@ void wxDataStream::WriteLine(const wxString& line)
   m_ostream->write((const char *) tmp_string, tmp_string.Length());
 }
 
+// Must be at global scope for VC++ 5
+extern "C" void ConvertToIeeeExtended(double num, unsigned char *bytes);
+
 void wxDataStream::WriteDouble(double d)
 {
-  extern "C" void ConvertToIeeeExtended(double num, unsigned char *bytes)
   char buf[10];
 
   if (!m_ostream)
index 5c4b30f179221e4be41b5a2887bb544fd2ae4cde..dd32729b419b90546f4528f30e6502f257191206 100644 (file)
@@ -496,6 +496,7 @@ public:
 
   // menu callbacks
   void OnClose(wxCommandEvent& event);
+  void OnCloseWindow(wxCloseEvent& event);
   void OnSave (wxCommandEvent& event);
   void OnClear(wxCommandEvent& event);
 
@@ -521,7 +522,7 @@ BEGIN_EVENT_TABLE(wxLogFrame, wxFrame)
   EVT_MENU(Menu_Save,  wxLogFrame::OnSave)
   EVT_MENU(Menu_Clear, wxLogFrame::OnClear)
 
-  EVT_CLOSE(wxLogFrame::OnClose)
+  EVT_CLOSE(wxLogFrame::OnCloseWindow)
 END_EVENT_TABLE() 
 
 wxLogFrame::wxLogFrame(const char *szTitle)
@@ -563,6 +564,12 @@ void wxLogFrame::OnClose(wxCommandEvent& event)
   Show(FALSE);
 }
 
+void wxLogFrame::OnCloseWindow(wxCloseEvent& event)
+{
+  // just hide the window
+  Show(FALSE);
+}
+
 void wxLogFrame::OnSave(wxCommandEvent& event)
 {
   // get the file name
index 28256329b4a501e2ed10b231d685c717d738d285..fee8108d5086c9796a63a2e0b9175010ee9e4363 100644 (file)
@@ -884,6 +884,7 @@ void * operator new (size_t size, char * fileName, int lineNum)
 #endif
 }
 
+#if !( defined (_MSC_VER) && (_MSC_VER <= 800) )
 void * operator new[] (size_t size, char * fileName, int lineNum)
 {
 #ifdef NO_DEBUG_ALLOCATION
@@ -892,6 +893,7 @@ void * operator new[] (size_t size, char * fileName, int lineNum)
   return wxDebugAlloc(size, fileName, lineNum, FALSE, TRUE);
 #endif
 }
+#endif
 
 void operator delete (void * buf)
 {
@@ -902,6 +904,7 @@ void operator delete (void * buf)
 #endif
 }
 
+#if !( defined (_MSC_VER) && (_MSC_VER <= 800) )
 void operator delete[] (void * buf)
 {
 #ifdef NO_DEBUG_ALLOCATION
@@ -910,6 +913,7 @@ void operator delete[] (void * buf)
   wxDebugFree(buf, TRUE);
 #endif
 }
+#endif
 
 #endif
 
index 1526c1931819a94bfcd4987d66d8fcb3c6567a28..cb34fb1325da8dc9092e2aa174958de81fa85016 100644 (file)
@@ -436,7 +436,7 @@ void wxGenericGrid::OnPaint(wxPaintEvent& WXUNUSED(event))
   {
     wxPaintDC paintDC(this);
     wxMemoryDC dc(& paintDC);
-    dc.SelectObject(m_doubleBufferingBitmap);
+    dc.SelectObject(m_doubleBufferingBitmap);
 
     PaintGrid(dc);
 
index 623cd3687fcf220387c399067b3c9a1d876a1ee1..7bfc10906a3ba497060baf2c761e64cf71f2f146 100644 (file)
@@ -140,7 +140,6 @@ MSWOBJS = \
   $(MSWDIR)\font.obj \
   $(MSWDIR)\fontdlg.obj \
   $(MSWDIR)\frame.obj \
-  $(MSWDIR)\gauge.obj \
   $(MSWDIR)\gauge95.obj \
   $(MSWDIR)\gaugemsw.obj \
   $(MSWDIR)\gdiobj.obj \
index f49efaa1a7092d59e0a28f2e79911cd275ee8242..4f06021518defda5ffd40944a1fe206c0ba1f785 100644 (file)
@@ -151,7 +151,7 @@ MSWOBJS = \
   $(MSWDIR)\listctrl.obj \
   $(MSWDIR)\main.obj \
   $(MSWDIR)\mdi.obj \
-  $(MSWDIR)\menu.obj \
+  $(MSWDIR)\menu.obj\
   $(MSWDIR)\menuitem.obj \
   $(MSWDIR)\metafile.obj \
   $(MSWDIR)\minifram.obj \
@@ -178,6 +178,7 @@ MSWOBJS = \
   $(MSWDIR)\timer.obj \
   $(MSWDIR)\treectrl.obj \
   $(MSWDIR)\utils.obj \
+  $(MSWDIR)\utilsexc.obj \
   $(MSWDIR)\wave.obj \
   $(MSWDIR)\window.obj \
   $(OLEDIR)\droptgt.obj \
@@ -585,6 +586,11 @@ $(MSWDIR)/utils.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(MSWDIR)/utilsexc.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(MSWDIR)/wave.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -815,7 +821,7 @@ $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 
 $(COMMDIR)/extended.obj:     $*.c
         cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.c
+$(CPPFLAGS2) /Fo$@ /c /Tp $*.c
 <<
 
 $(COMMDIR)/y_tab.obj:     $*.c $(COMMDIR)/lex_yy.c
index 015e7e48b64da125c32c4320a93c69e99ea45216..9e92f8eaa345455153b561ef1e770dbcd94fefa8 100644 (file)
@@ -894,7 +894,7 @@ $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 
 $(COMMDIR)/extended.obj:     $*.c
         cl @<<
-$(CPPFLAGS) /c /Tp $*.c /Fo$@
+$(CPPFLAGS2) /c /Tp $*.c /Fo$@
 <<
 
 $(COMMDIR)/y_tab.obj:     $*.c $(COMMDIR)/lex_yy.c
index 708fc1767bbd91092c222f91714bccfcbef73fa4..941748b0928004cd8ea8b0b2cb0f0a6ab942642a 100644 (file)
   #pragma hdrstop
 #endif
 
+#include  <wx/defs.h>
+
+#ifdef __WIN32__
+
 #include  <wx/log.h>
 #include  <wx/msw/ole/oleutils.h>
 #include  <wx/msw/ole/dataobj.h>
@@ -400,3 +404,6 @@ static const char *GetTymedName(DWORD tymed)
       return s_szBuf;
   }
 }
+
+#endif
+
index 22c152f23d69f2a0dd9c2056e6dc388204ff1be9..87e3ba77b65b96013b2d21fc849a29dfcf66ef5a 100644 (file)
@@ -162,7 +162,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
   if ( IsCheckable() && !m_bmpChecked.Ok() ) {
     if ( st & wxODChecked ) {
       // using native APIs for performance and simplicity
-      #ifdef  O_DRAW_NATIVE_API
+#ifdef  O_DRAW_NATIVE_API
       // what goes on: DrawFrameControl creates a b/w mask, 
       // then we copy it to screen to have right colors
 
@@ -179,10 +179,10 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
       BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight, 
              hdcMem, 0, 0, SRCCOPY);
       DeleteDC(hdcMem);
-      #else
+#else
         // #### to do: perhaps using Marlett font (create equiv. font under X)
-        wxFAIL("not implemented");
-      #endif  //O_DRAW_NATIVE_API
+//        wxFAIL("not implemented");
+#endif  //O_DRAW_NATIVE_API
     }
   }
   else {
index 3514ea22450a595619ab1c0c84c36c6b29ff84c2..d934d96d8a5de59908776a4888438a2568f8831e 100644 (file)
@@ -100,7 +100,7 @@ bool wxScrollBar::Create(wxWindow *parent, const wxWindowID id,
     ::SetScrollPos(scroll_bar, SB_CTL, 0, FALSE);
     ShowWindow(scroll_bar, SW_SHOW);
 
-    SetFont(parent->GetFont());
+    SetFont(parent->GetFont());
 
     m_hWnd = (WXHWND)scroll_bar;
 
index ac3c249d08c5f8a650b70037d325cefbcf7fe078..ef2e39750b0571ea05522e4af2bcf3d28ab1d2ad 100644 (file)
 #endif
 #include <stdarg.h>
 
+IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
+
+
 #define wxEXECUTE_WIN_MESSAGE 10000
 
 struct wxExecuteData {
@@ -72,6 +76,8 @@ struct wxExecuteData {
   char state;
 };
 
+
+#ifdef __WIN32__
 static DWORD wxExecuteThread(wxExecuteData *data)
 {
   WaitForSingleObject(data->process, INFINITE);
@@ -81,6 +87,8 @@ static DWORD wxExecuteThread(wxExecuteData *data)
 
   return 0;
 }
+#endif
+
 
 LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message,
                                             WPARAM wParam, LPARAM lParam)