]> git.saurik.com Git - wxWidgets.git/commitdiff
OS/2 PM Fixeups for fonts, validators, and html
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 8 Nov 1999 05:20:31 +0000 (05:20 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 8 Nov 1999 05:20:31 +0000 (05:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

25 files changed:
src/common/ctrlcmn.cpp
src/common/validate.cpp
src/common/wincmn.cpp
src/generic/listctrl.cpp
src/generic/treectrl.cpp
src/html/helpfrm.cpp
src/makelib.vc
src/makeprog.vc
src/makevc.env
src/os2/bmpbuttn.cpp
src/os2/button.cpp
src/os2/checkbox.cpp
src/os2/checklst.cpp
src/os2/choice.cpp
src/os2/combobox.cpp
src/os2/gauge.cpp
src/os2/listbox.cpp
src/os2/radiobox.cpp
src/os2/radiobut.cpp
src/os2/scrolbar.cpp
src/os2/slider.cpp
src/os2/textctrl.cpp
src/os2/thread.cpp
src/os2/utils.cpp
src/zlib/MAKEFILE.VA

index 8e99dd0b174b334cabb12f0826cdfae27f3c34f0..be7735196dbd9c357e5849d8fdc142ff7154abac 100644 (file)
@@ -42,7 +42,13 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
                                   const wxPoint& pos,
                                   const wxSize& size,
                                   long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                                  const wxValidator* validator,
+#  else
                                   const wxValidator& validator,
+#  endif
+#endif
                                   const wxString& name)
 {
     // even if it's possible to create controls without parents in some port,
index bc40a4b82b0204dc20f9978636d56d777d462e93..50d072c6b28c6ea975a717bdd48eac65f09e721e 100644 (file)
@@ -36,7 +36,7 @@
 // treated as a static global class by VA and thus cannot use in this form.
 // Defined as a pointer and then explicity allocated and deallocated
 // by user if desired
-const wxValidator* wxDefaultValidator;
+const wxValidator* wxDefaultValidator = NULL;
 #else
 const wxValidator wxDefaultValidator;
 #endif
index 7af94827f8e059b9553afb5925111f753c752076..5f7b55bbebbb53ca322d7515c18dc5750f764c5a 100644 (file)
@@ -154,7 +154,13 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
                               const wxPoint& WXUNUSED(pos),
                               const wxSize& WXUNUSED(size),
                               long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                              const wxValidator* validator,
+#  else
                               const wxValidator& validator,
+#  endif
+#endif
                               const wxString& name)
 {
     // m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
@@ -589,6 +595,18 @@ void wxWindowBase::SetCaret(wxCaret *caret)
 // validators
 // ----------------------------------------------------------------------------
 
+#  if defined(__VISAGECPP__)
+void wxWindowBase::SetValidator(const wxValidator* validator)
+{
+    if ( m_windowValidator )
+        delete m_windowValidator;
+
+    m_windowValidator = (wxValidator *)validator->Clone();
+
+    if ( m_windowValidator )
+        m_windowValidator->SetWindow(this) ;
+}
+#  else
 void wxWindowBase::SetValidator(const wxValidator& validator)
 {
     if ( m_windowValidator )
@@ -599,6 +617,7 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
     if ( m_windowValidator )
         m_windowValidator->SetWindow(this) ;
 }
+#  endif // __VISAGECPP__
 #endif // wxUSE_VALIDATORS
 
 // ----------------------------------------------------------------------------
@@ -895,14 +914,14 @@ bool wxWindowBase::Layout()
 {
     int w, h;
     GetClientSize(&w, &h);
-    
+
     // If there is a sizer, use it instead of the constraints
     if ( GetSizer() )
     {
         GetSizer()->SetDimension( 0, 0, w, h );
         return TRUE;
     }
-    
+
     if ( GetConstraints() )
     {
         GetConstraints()->width.SetValue(w);
@@ -914,7 +933,7 @@ bool wxWindowBase::Layout()
     DoPhase(1);           // Just one phase need if no sizers involved
     DoPhase(2);
     SetConstraintSizes(); // Recursively set the real window sizes
-    
+
     return TRUE;
 }
 
index 35952dc2a11010dbd78896c917624a0a89808370..9c67a8be91ccd574781fce8e6fe17ed04680a3a5 100644 (file)
@@ -956,7 +956,13 @@ END_EVENT_TABLE()
 wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
     bool *accept, wxString *res, wxListMainWindow *owner,
     const wxString &value, const wxPoint &pos, const wxSize &size,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+    int style, const wxValidator* validator, const wxString &name ) :
+#  else
     int style, const wxValidator& validator, const wxString &name ) :
+#  endif
+#endif
   wxTextCtrl( parent, id, value, pos, size, style, validator, name )
 {
     m_res = res;
@@ -2497,7 +2503,13 @@ wxListCtrl::~wxListCtrl()
 
 bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
       const wxPoint &pos, const wxSize &size,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+      long style, const wxValidator *validator,
+#  else
       long style, const wxValidator &validator,
+#  endif
+#endif
       const wxString &name )
 {
     m_imageListNormal = (wxImageList *) NULL;
index 386ce6a72b6dea5efc5325c1ffa698f16253357e..98d1ab42ea11bea5c13dbc658272d2dfd35bb5f4 100644 (file)
@@ -196,7 +196,13 @@ END_EVENT_TABLE()
 wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
     bool *accept, wxString *res, wxTreeCtrl *owner,
     const wxString &value, const wxPoint &pos, const wxSize &size,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+    int style, const wxValidator* validator, const wxString &name ) :
+#  else
     int style, const wxValidator& validator, const wxString &name ) :
+#  endif
+#endif
   wxTextCtrl( parent, id, value, pos, size, style, validator, name )
 {
     m_res = res;
@@ -522,7 +528,13 @@ void wxTreeCtrl::Init()
 bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
                         const wxPoint& pos, const wxSize& size,
                         long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+            const wxValidator *validator,
+#  else
             const wxValidator &validator,
+#  endif
+#endif
             const wxString& name )
 {
   Init();
index 9d290055dad3d42cb950882f6f853d567734ea78..614eea26417d8b78fbbf4b00414e6c4641bc9e39 100644 (file)
@@ -142,6 +142,14 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
 
     wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
 
+#if defined(__WXMSW__) || (__WXPM__)
+    wxIcon frameIcon("wxhelp", wxBITMAP_TYPE_ICO_RESOURCE, 32, 32);
+#else
+    wxIcon frameIcon(help_xpm);
+#endif
+    if (frameIcon.Ok())
+        SetIcon(frameIcon);
+
     GetPosition(&m_Cfg.x, &m_Cfg.y);
 
     SetIcon(wxICON(help));
@@ -157,7 +165,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
         toolBar -> SetMargins(2, 2);
         wxBitmap* toolBarBitmaps[3];
 
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || (__WXPM__)
         toolBarBitmaps[0] = new wxBitmap("panel");
         toolBarBitmaps[1] = new wxBitmap("back");
         toolBarBitmaps[2] = new wxBitmap("forward");
@@ -614,7 +622,7 @@ void wxHtmlHelpFrame::OnContentsSel(wxTreeEvent& event)
 
 void wxHtmlHelpFrame::OnIndexSel(wxCommandEvent& WXUNUSED(event))
 {
-    wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection());    
+    wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection());
     m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
 }
 
index 8b5b459d80da5836bed4538cae6d904d3c62881a..f4ce264a9da71e0bb46564805b346f5b2e84e96a 100644 (file)
@@ -10,7 +10,7 @@
 # info
 
 # Set WXDIR for your system
-WXDIR = $(WXWIN)
+WXDIR = j:\dev\wx2\wxWindows
 
 !include $(WXDIR)\src\makevc.env
 
index b3eb9138b2cc02e66a182eacb542a191685158a8..d7c0d79be48b734ba103a022c6e73f065aab80cb 100644 (file)
 # info
 
 # Set WXDIR for your system
-WXDIR = $(WXWIN)
+WXDIR = j:\dev\wx2\wxWindows
 
 WXUSINGDLL=0
 
 !include $(WXDIR)\src\makevc.env
 
-all:    $(PROGRAM).exe $(EXTRATARGETS)
+all:    $(PROGRAM).exe
 
 wx:
         cd $(WXDIR)\src\msw
@@ -29,17 +29,14 @@ wxclean:
         nmake -f makefile.vc clean
 #        cd $(THISDIR)
 
-$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) 
        $(link) @<<
 -out:$(PROGRAM).exe
 $(LINKFLAGS)
-$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(DUMMYOBJ) $(OBJECTS)
 $(LIBS)
 <<
 
-$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
-    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
-
 clean:
         -erase $(OBJECTS)
         -erase *.exe
index 88fd65a0048996ea770511d2ff076c706f93c707..68e7bf0b16509de17266cfcc0ce7d90d9dcc4c02 100644 (file)
@@ -43,7 +43,7 @@ WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib sh
  comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib # libci.lib # libci.lib required for VC++ 4.2
 
 # Change this to your WXWIN directory
-WXDIR=$(WXWIN)
+WXDIR=j:\dev\wx2\wxWindows
 
 WXSRC=$(WXDIR)\src\msw
 WXINC=$(WXDIR)\include
index c41f2a9fb6be6b94a5b4b9ae66900fb440bcd69c..0035901c3b372d6cc9ea82830214d2277e629958 100644 (file)
@@ -28,12 +28,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
 bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     m_buttonBitmap = bitmap;
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
 
     parent->AddChild(this);
 
index 8650e1002699470374e1a205830c822705038ce5..dc33b17225f21cc0a7cb97bb756afac70368ca1d 100644 (file)
@@ -32,11 +32,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
 bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     m_windowStyle = style;
 
     parent->AddChild((wxButton *)this);
index 6e9787ba075d881e7447af37cff30fa96aabe5c0..035c4504cc34c7e5e012ccaf670e0eade745ad98 100644 (file)
@@ -49,11 +49,19 @@ bool wxCheckBox::OS2Command(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
 bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     if (parent) parent->AddChild(this);
 
     SetBackgroundColour(parent->GetBackgroundColour()) ;
@@ -176,11 +184,19 @@ void wxCheckBox::Command (wxCommandEvent & event)
 bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     if (parent) parent->AddChild(this);
 
     SetBackgroundColour(parent->GetBackgroundColour()) ;
index 654dc3a1fc5be1ec01c0b3e638f375644fc910d8..e53cf202841a4c493f8de6870c3462bb20bd8466 100644 (file)
@@ -259,7 +259,13 @@ wxCheckListBox::wxCheckListBox() : wxListBox()
 wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
                                const wxPoint& pos, const wxSize& size,
                                int nStrings, const wxString choices[],
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                               long style, const wxValidator* val,
+#  else
                                long style, const wxValidator& val,
+#  endif
+#endif
                                const wxString& name)
               : wxListBox()
 {
index fc8428ffe5e6b6aefa260c1803cec43fb8c1b2a3..dbfeedf60a77a9849e3f28595e593689e81eb05f 100644 (file)
@@ -30,7 +30,13 @@ bool wxChoice::Create(wxWindow *parent,
                       const wxSize& size,
                       int n, const wxString choices[],
                       long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                      const wxValidator* validator,
+#  else
                       const wxValidator& validator,
+#  endif
+#endif
                       const wxString& name)
 {
     if ( !CreateControl(parent, id, pos, size, style, validator, name) )
index 6e4dc8074d3ce45d224b10f805e64ddd304d55a7..d8b0bd0e6d594563c4ef5cdbce475666c6a27fb0 100644 (file)
@@ -63,11 +63,19 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
                         const wxSize& size,
                         int n, const wxString choices[],
                         long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                        const wxValidator* validator,
+#  else
                         const wxValidator& validator,
+#  endif
+#endif
                         const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif
   if (parent) parent->AddChild(this);
   SetBackgroundColour(parent->GetBackgroundColour()) ;
   SetForegroundColour(parent->GetForegroundColour()) ;
index 00ab8236bff185b5fc7f7f968cb61b8cc3550f5e..8bce479cecd965c78e7f6da8f8f478dc6f7ce386 100644 (file)
@@ -57,7 +57,13 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size,
            long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     static bool wxGaugeOS2Initialised = FALSE;
@@ -73,7 +79,9 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
     }
 
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     if (parent) parent->AddChild(this);
     m_rangeMax = range;
     m_gaugePos = 0;
index 76ab92fbe84c9ccc8ded78d5b5827634987cd98f..7fa3750188190c708dc3cefb8954b675551ee7ff 100644 (file)
@@ -80,7 +80,13 @@ bool wxListBox::Create(wxWindow *parent,
                        const wxSize& size,
                        int n, const wxString choices[],
                        long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                       const wxValidator* validator,
+#  else
                        const wxValidator& validator,
+#  endif
+#endif
                        const wxString& name)
 {
     m_noItems = 0;
@@ -88,7 +94,9 @@ bool wxListBox::Create(wxWindow *parent,
     m_selected = 0;
 
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
 
     if (parent)
         parent->AddChild(this);
index 6048148d4acc4be20e84e81214cfba4049b09c2f..43bcd15f5e95a680fe63a4df3e064be843e0955d 100644 (file)
@@ -143,14 +143,21 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
         const wxPoint& pos, const wxSize& size,
         int n, const wxString choices[],
         int majorDim, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+        const wxValidator* val, const wxString& name)
+#  else
         const wxValidator& val, const wxString& name)
+#  endif
+#endif
 {
     m_selectedButton = -1;
     m_noItems = n;
 
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(val);
-
+#endif
     parent->AddChild(this);
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
index 72cadb989a6e6981ca9789fb9cbf16c92b6e8f00..5453a8ec5287cf119e7c7f1286394a856d1d82fa 100644 (file)
@@ -46,11 +46,19 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
            const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
 
     if (parent) parent->AddChild(this);
 
@@ -150,11 +158,19 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
        const wxBitmap *bitmap,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif
 
   if (parent) parent->AddChild(this);
   SetBackgroundColour(parent->GetBackgroundColour());
index 00225e72ed4d6947e6edc03909d302cabf3fe791..a279ce36127331f617165e1fae9b511491069b5f 100644 (file)
@@ -35,14 +35,22 @@ END_EVENT_TABLE()
 bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     if (!parent)
         return FALSE;
     parent->AddChild(this);
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
 
     SetBackgroundColour(parent->GetBackgroundColour()) ;
     SetForegroundColour(parent->GetForegroundColour()) ;
index 130472e6adab6fa092a9228677b8f63d8396d5a8..e0a6852d4aa74d6ecba6dc633099d4e97bdee5d5 100644 (file)
@@ -46,11 +46,19 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
            int value, int minValue, int maxValue,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+           const wxValidator* validator,
+#  else
            const wxValidator& validator,
+#  endif
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
 
     if (parent) parent->AddChild(this);
 
index 82022466ef52497a47301cf2e9ad75ef14ca2965..c9d836f4ea81bfa8f922d979a9d5af0204ec0202 100644 (file)
@@ -87,7 +87,13 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
                         const wxPoint& pos,
                         const wxSize& size,
                         long style,
+#if wxUSE_VALIDATORS
+#  if defined(__VISAGECPP__)
+                        const wxValidator* validator,
+#  else
                         const wxValidator& validator,
+#  endif
+#endif
                         const wxString& name)
 {
     // base initialization
index a2b10041725236f46c96946897fa913d1f389f70..80eef6b2e2dc60e88844396744aec0a1a6347f8e 100644 (file)
@@ -100,8 +100,7 @@ wxMutex::~wxMutex()
     if (m_locked > 0)
         wxLogDebug(wxT("Warning: freeing a locked mutex (%d locks)."), m_locked);
     ::DosCloseMutexSem(p_internal->m_vMutex);
-    delete p_internal;
-    p_internal = NULL;
+    p_internal->m_vMutex = NULL;
 }
 
 wxMutexError wxMutex::Lock()
@@ -244,6 +243,34 @@ void wxCondition::Broadcast()
 // wxCriticalSection implementation
 // ----------------------------------------------------------------------------
 
+class wxCriticalSectionInternal
+{
+public:
+    // init the critical section object
+    wxCriticalSectionInternal()
+        { }
+
+    // free the associated ressources
+    ~wxCriticalSectionInternal()
+        { }
+
+private:
+};
+
+// ----------------------------------------------------------------------------
+// wxCriticalSection implementation
+// ----------------------------------------------------------------------------
+
+wxCriticalSection::wxCriticalSection()
+{
+    m_critsect = new wxCriticalSectionInternal;
+}
+
+wxCriticalSection::~wxCriticalSection()
+{
+    delete m_critsect;
+}
+
 void wxCriticalSection::Enter()
 {
     ::DosEnterCritSec();
index f6adb6b772ffef2f99bf37f8b435ae02d07e41a9..2bae71d97b58f55aba721de4f0990cba91b54144 100644 (file)
@@ -195,10 +195,9 @@ bool wxShell(
 }
 
 // Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
-long wxGetFreeMemory(
-  void*                             pMemptr
-)
+long wxGetFreeMemory()
 {
+    void*                           pMemptr;
     ULONG                           lSize;
     ULONG                           lMemFlags;
     APIRET                          rc;
@@ -309,14 +308,17 @@ int wxGetOsVersion(
 )
 {
     ULONG                           ulSysInfo[QSV_MAX] = {0};
-
-    if (::DosQuerySysInfo( 1L
-                          ,QSV_MAX
-                          ,(PVOID)ulSysInfo
-                          ,sizeof(ULONG) * QSV_MAX
-                         ))
+    APIRET                          ulrc;
+
+    ulrc = ::DosQuerySysInfo( 1L
+                             ,QSV_MAX
+                             ,(PVOID)ulSysInfo
+                             ,sizeof(ULONG) * QSV_MAX
+                            );
+    if (ulrc == 0L)
     {
         *pMajorVsn = ulSysInfo[QSV_VERSION_MAJOR];
+        *pMajorVsn = *pMajorVsn/10;
         *pMinorVsn = ulSysInfo[QSV_VERSION_MINOR];
         return wxWINDOWS_OS2;
     }
@@ -427,10 +429,10 @@ bool wxGetResource(
                                               ,(PSZ)WXSTRINGCAST rSection
                                               ,(PSZ)WXSTRINGCAST rEntry
                                               ,(PSZ)zDefunkt
-                                              ,(void*)wxBuffer
+                                              ,(void*)*ppValue
                                               ,1000
                                              );
-            if (n == 0L || wxStrcmp(wxBuffer, zDefunkt) == 0)
+            if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
                 return FALSE;
         }
         else
@@ -442,15 +444,12 @@ bool wxGetResource(
                                           ,(PSZ)WXSTRINGCAST rSection
                                           ,(PSZ)WXSTRINGCAST rEntry
                                           ,(PSZ)zDefunkt
-                                          ,(void*)wxBuffer
+                                          ,(void*)*ppValue
                                           ,1000
                                          );
-        if (n == 0L || wxStrcmp(wxBuffer, zDefunkt) == 0)
+        if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
             return FALSE;
     }
-    if (*ppValue)
-        delete[] (*ppValue);
-    *ppValue = copystring(wxBuffer);
     return TRUE;
 }
 
index 165b8e9eceea732ef97e0b136494e25bdbc70a90..3e4fcdf3eb608c230a851e3c0a9c0c25a8755e11 100644 (file)
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
 OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
 
 # Change WXDIR or WXWIN to wherever wxWindows is found
-WXDIR = h:\dev\wx2\wxWindows
+WXDIR = j:\dev\wx2\wxWindows
 
 OS2ZLIBDIR=$(WXDIR)\src\zlib
 OS2ZLIBINC=$(WINPNGDIR)