]> git.saurik.com Git - wxWidgets.git/commitdiff
Changes related to stream includes
authorJulian Smart <julian@anthemion.co.uk>
Mon, 12 Oct 1998 07:46:15 +0000 (07:46 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 12 Oct 1998 07:46:15 +0000 (07:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

29 files changed:
include/wx/docview.h
include/wx/event.h
include/wx/log.h
include/wx/memory.h
include/wx/msw/notebook.h
include/wx/object.h
include/wx/postscrp.h
include/wx/string.h
include/wx/utils.h
include/wx/variant.h
include/wx/wxexpr.h
src/common/docview.cpp
src/common/memory.cpp
src/common/object.cpp
src/common/postscrp.cpp
src/common/string.cpp
src/common/time.cpp
src/common/utilscmn.cpp
src/common/variant.cpp
src/common/wxexpr.cpp
src/msw/dc.cpp
src/msw/dcprint.cpp
src/msw/pnghand.cpp
src/msw/textctrl.cpp
src/ntwxwin.mak
src/png/makefile.nt
src/zlib/makefile.nt
utils/nplugin/samples/gui/makefile.nt
utils/nplugin/samples/simple/makefile.nt

index dc25795242e6e33309b8ca597b0a2988c7f7a9cc..160d51a50c31f1cefce4e4c830f870e43c07369c 100644 (file)
@@ -36,8 +36,16 @@ class WXDLLEXPORT wxCommandProcessor;
 class WXDLLEXPORT wxFileHistory;
 class WXDLLEXPORT wxConfigBase;
 
-class WXDLLIMPORT ostream;
-class WXDLLIMPORT istream;
+#if wxUSE_IOSTREAMH
+#  include <istream.h>
+#  include <ostream.h>
+#else
+#  include <istream>
+#  include <ostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 // Document manager flags
 #define wxDOC_SDI       1
index 1c58d1541c7749c0de0089e748d599d471d99cb6..8524f893903d9748076ba6e7fa89da7851020029 100644 (file)
@@ -186,6 +186,8 @@ const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING =          wxEVT_FIRST + 801;
 const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED =     wxEVT_FIRST + 802;
 const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING =    wxEVT_FIRST + 803;
 
+const wxEventType wxEVT_USER_FIRST =                        wxEVT_FIRST + 2000;
+
 // Compatibility
 
 #if WXWIN_COMPATIBILITY
index 0c178347d97c90d603fc2c3292b0c23010832408..1b78ba5b04e7c1b9ad7526f52a6e4ca1dcd3a43f 100644 (file)
@@ -52,10 +52,18 @@ typedef unsigned long wxLogLevel;
 // ----------------------------------------------------------------------------
 // forward declarations
 // ----------------------------------------------------------------------------
-class wxTextCtrl;
-class wxLogFrame;
-class wxFrame;
-class ostream;
+class WXDLLEXPORT wxTextCtrl;
+class WXDLLEXPORT wxLogFrame;
+class WXDLLEXPORT wxFrame;
+
+#if wxUSE_IOSTREAMH
+#  include <ostream.h>
+#else
+#  include <ostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 // ----------------------------------------------------------------------------
 // derive from this class to redirect (or suppress, or ...) log messages
@@ -166,7 +174,6 @@ private:
 };
 
 // log everything to an "ostream", cerr by default
-class ostream;
 class WXDLLEXPORT wxLogStream : public wxLog
 {
 public:
@@ -357,9 +364,6 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode);
 //  parts of the program only)
 WXDLLEXPORT_DATA(extern bool) g_bVerbose;
 
-// fwd decl to avoid including iostream.h here
-class ostream;
-
 // ----------------------------------------------------------------------------
 // get error code/error message from system in a portable way
 // ----------------------------------------------------------------------------
index 95d016c850c1ca4606e308df1b8fb97b5ea37b3d..8f5c81ae95b4657ac0118b83ee75e5174e055872 100644 (file)
 #include <stddef.h>
 
 #if wxUSE_IOSTREAMH
-#include <iostream.h>
+#  include <ostream.h>
 #else
-#include <iostream>
+#  include <ostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
 #include "wx/string.h"
index c4ebd06ffee7d530439e960c50e7d3ddaf91885d..82d90dcffe67c9b06730ed974db4463fd12b5bf3 100644 (file)
 // ----------------------------------------------------------------------------
 
 // fwd declarations
-class wxImageList;
-class wxWindow;
+class WXDLLEXPORT wxImageList;
+class WXDLLEXPORT wxWindow;
 
 // array of notebook pages
-typedef wxWindow wxNotebookPage;  // so far, any window can be a page
+typedef wxWindow WXDLLEXPORT wxNotebookPage;  // so far, any window can be a page
 WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages);
 
 // ----------------------------------------------------------------------------
index ffe51a481c3a5566261932dcb6287cf2f20eb482..b5af8484bbd9acbb186dbf899669384bfcb44281 100644 (file)
@@ -30,13 +30,21 @@ class WXDLLEXPORT wxObject;
 #endif
 
 class WXDLLEXPORT wxClassInfo;
-class WXDLLIMPORT ostream;
 class WXDLLEXPORT wxInputStream;
 class WXDLLEXPORT wxObjectInputStream;
 class WXDLLEXPORT wxObjectOutputStream;
 class WXDLLEXPORT wxHashTable;
 class WXDLLEXPORT wxObject_Serialize;
 
+#if wxUSE_IOSTREAMH
+#  include <ostream.h>
+#else
+#  include <ostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
+
 /*
  * Dynamic object system declarations
  */
index 07731f41fd884353ca0aa3c8179fa73e2f82029b..bd222d87154d3e9ed4124173eb825c4c0861cb13 100644 (file)
@@ -34,7 +34,15 @@ public:
     void OnExit();
 };
 
-class WXDLLIMPORT ofstream;
+#if wxUSE_IOSTREAMH
+#  include <fstream.h>
+#else
+#  include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
+
 class WXDLLEXPORT wxPostScriptDC: public wxDC
 {
   DECLARE_DYNAMIC_CLASS(wxPostScriptDC)
index 477586d7fc319ebf7e97ccfec80980ba2b4381dd..94ef9cb88eb1e1ecb37d43e6a31e9ddc8f0a6ccf 100644 (file)
@@ -919,7 +919,17 @@ inline bool operator>=(const char  * s1, const wxString& s2) { return s2.Cmp(s1)
 #ifdef  STD_STRING_COMPATIBILITY
 
 // fwd decl
-class WXDLLEXPORT istream;
+// Known not to work with wxUSE_IOSTREAMH set to 0, so
+// replacing with includes (on advice of ungod@pasdex.com.au)
+// class WXDLLEXPORT istream;
+#if wxUSE_IOSTREAMH
+#include <istream.h>
+#else
+#include <istream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 istream& WXDLLEXPORT operator>>(istream& is, wxString& str);
 
index 8a05c97a83e11c67c0cdcf7775bb0248caac0734..3d9a31ddb35a6d0e722b375c9548d7543871d0b2 100644 (file)
@@ -27,6 +27,9 @@
 #include <iostream.h>
 #else
 #include <iostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
 #ifdef __X__
index 5c565aba18a7588939e073be97c042a074b47674..b2e1673301a2c16428902367619eac93d5e88a2f 100644 (file)
@@ -25,6 +25,9 @@
 #include <iostream.h>
 #else
 #include <iostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
 /*
index 01e0d6d375a7db9349edbee6718c5790fd1b9de8..a07e6f31710acc683195133653cf8af28e078fb5 100644 (file)
@@ -25,6 +25,9 @@
 #include <iostream.h>
 #else
 #include <iostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
 #include "wx/list.h"
index e686d80d9b76c65d03513ae98d01a2f1762ad584..24a1e59eac0421445fe0865572f83aa6a15dc26a 100644 (file)
 
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
+#include <fstream.h>
 #else
 #include <iostream>
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
-#include "fstream.h"
-
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler)
 IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler)
index d3771ff98c2de795ace8fb835a40a5c3129926f5..1d44a664e922b181d95600550817aadcd3e70d06 100644 (file)
 
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
+#include <fstream.h>
 #else
 #include <iostream>
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
-#include <fstream.h>
 
 #if !defined(__WATCOMC__) && !defined(__VMS__)
 #include <memory.h>
index d26826ebe253cafe90d60334d53445afacf1b774..6950dc80ccf1250149af7f01ee4c610dcd67dc26 100644 (file)
 
 #if WXDEBUG || wxUSE_DEBUG_CONTEXT
   // for wxObject::Dump
-  #include <iostream.h>
+#if wxUSE_IOSTREAMH
+#  include <iostream.h>
+#else
+#  include <iostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 #endif
 
 #if !USE_SHARED_LIBRARY
index 2660eddec966484536a0ddb071fca61132a08fbb..0a6dd57b7f82a83259faf4271493ffa1726237d5 100644 (file)
 
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
+#include <fstream.h>
 #else
 #include <iostream>
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
-#include <fstream.h>
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
index 8b44df09b8f8fbebe4f851f4508dacccdd4c00d8..3cb10f3186b4bbdb43bc1e6df2db84fa6d54028c 100644 (file)
@@ -96,6 +96,18 @@ extern const char *g_szNul = &g_strEmpty.dummy;
   #define   NAMESPACE
 #endif  //Visual C++
 
+#if wxUSE_IOSTREAMH
+#include <iostream.h>
+#define   NAMESPACE
+#else
+#include <iostream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#define   NAMESPACE   std::
+#endif
+
+
 NAMESPACE istream& operator>>(NAMESPACE istream& is, wxString& WXUNUSED(str))
 {
 #if 0
index ecd30b9ac0a9fc7e25012e80afd68d823ff87d14..1d30d65da07673d941f072528ee08a58eaf7bffc 100644 (file)
@@ -36,11 +36,15 @@ seconds since January 1, 1901, GMT.
 
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
+#include <iomanip.h>
 #else
 #include <iostream>
+#include <iomanip>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
-#include <iomanip.h>
 #include <string.h>
 
 #if !USE_SHARED_LIBRARY
index cb7890e7a8dd666d256acd63895bcd00fd4db1b9..b76359d8d9f97d427faa840f2f197600b88e1bdd 100644 (file)
 
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
+#include <fstream.h>
 #else
 #include <iostream>
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
-#include <fstream.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
index e259e9ef2f821267a5c8dc069dc78957959244ec..b514bf1cd9236aca63729fc3a72dc5c3e9845791 100644 (file)
 #pragma hdrstop
 #endif
 
+#if wxUSE_IOSTREAMH
 #include <fstream.h>
+#else
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 #include "wx/string.h"
 #include "wx/variant.h"
index f03b2900b784ab04bf943b00bbd3d1b9c9b3eb3d..3d4979ef4c92b331799343b0399da1bb7d888392 100644 (file)
 #pragma hdrstop
 #endif
 
+#if wxUSE_IOSTREAMH
 #include <fstream.h>
+#else
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
+
 #include <stdarg.h>
 #include <ctype.h>
 #include <string.h>
index 674ca49a1933f6535b716a31654c184b12a1a030..7e1e5a36aff29e31c574a1f1ad63a1c25f30f8b6 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <string.h>
 #include <math.h>
-#include <fstream.h>
 
 #if wxUSE_COMMON_DIALOGS
 #include <commdlg.h>
index 147f52054561b174e55229e83acacfa7d196adf9..dd2a5488130dbbb84c9941629446ff0df56dc6d2 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "wx/dcprint.h"
 #include "math.h"
-#include "fstream.h"
 
 #include <windows.h>
 
index 2fb019783b42bad611343cc1d5e5b76c7d1ffd13..bea92c61381bead90e66e34f545bf02d2d572ce3 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+
+#if wxUSE_IOSTREAMH
 #include <fstream.h>
+#else
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
+
 #include <windows.h>
 #include <wx/msw/pngread.h>
 #include <wx/msw/dibutils.h>
index 706acfcb0afc0972665b8e88307b69d7ef4bbc0f..d9ae39cc62de128eb3546aebd0bb0583e2cea17e 100644 (file)
 
 #include <windows.h>
 #include <stdlib.h>
-#include "fstream.h"
+
+#if wxUSE_IOSTREAMH
+#include <fstream.h>
+#else
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -508,7 +516,8 @@ bool wxTextCtrl::LoadFile(const wxString& file)
 
   Clear();
 
-  ifstream input(WXSTRINGCAST file, ios::nocreate | ios::in);
+//  ifstream input(WXSTRINGCAST file, ios::nocreate | ios::in);
+  ifstream input(WXSTRINGCAST file, ios::in);
 
   if (!input.bad())
   {
index 64e3987fe7c97b531cb9f47df03f99d05d51feae..de0ab064ae251a90a27f73120cb1bc6583f26dab 100644 (file)
@@ -29,7 +29,7 @@ CPU=i386
 OBJSUFF=obj
 SRCSUFF=cpp
 
-WINFLAGS=-c -W3 -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION)
+WINFLAGS=-c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION)
 #WINLINKFLAGS=/NODEFAULTLIB /INCREMENTAL:NO /NOLOGO -align:0x1000 -machine:$(CPU) -subsystem:windows,$(APPVER)
 WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -align:0x1000 -machine:$(CPU) -subsystem:windows,$(APPVER)
 #WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib libc.lib oldnames.lib\
@@ -169,7 +169,3 @@ LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll #
 
 DUMMYOBJ=$(WXDIR)\src\msw\$(DUMMY).obj
 
-
-
-
-
index 4973db4f38a7dfe484e4b67166b5e42f3052e2f5..a4c8b19d4be52c611076c60b563c013609270657 100644 (file)
@@ -31,14 +31,14 @@ PRECOMP=/YuWX.H
 
 !if "$(FINAL)" == "0"
 OPT = /Od
-CPPFLAGS= /W4 /Zi /MDd /GX $(ZOPTION) $(OPT) /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch
-CFLAGS= /W4 /Zi /MDd /GX /Od /Dwx_msw $(INC)
+CPPFLAGS= /W4 /Zi /MD /GX $(ZOPTION) $(OPT) /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch
+CFLAGS= /W4 /Zi /MD /GX /Od /Dwx_msw $(INC)
 LINKFLAGS=/NOD /CO /ONERROR:NOEXE
 !else
 # /Ox for real FINAL version
 OPT = /O2
-CPPFLAGS= /W4 /MDd /GX /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch
-CFLAGS= /W4 /MDd /GX /Dwx_msw $(INC)
+CPPFLAGS= /W4 /MD /GX /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch
+CFLAGS= /W4 /MD /GX /Dwx_msw $(INC)
 LINKFLAGS=/NOD /ONERROR:NOEXE
 !endif
 
@@ -59,6 +59,8 @@ $(OBJECTS)
   cl -DWIN32 $(OPT) $(CFLAGS) /c $*.c
 
 clean:
-        erase *.obj *.exe *.lib
+        erase *.obj
+        erase *.exe
+        erase *.lib
 
 cleanall:      clean
index ab0304c547d8afa978521875bf895dc71b4d4aa8..fa57b5c76bf11ee3df2f8cf560272cacd0fca9b3 100644 (file)
@@ -10,7 +10,7 @@
 # See zconf.h for details about the memory requirements.
 
 # ------------- Turbo C++, Borland C++ -------------
-CFLAGS=-O2 /MDd /GX
+CFLAGS=-O2 /MD /GX
 CC=cl
 LD=cl
 LIB=tlib
@@ -82,7 +82,7 @@ $(LIBOBJECTS)
 <<
 
 clean:
-       -erase *.obj
-       -erase *.exe
-        -erase *.sbr
-        -erase $(LIBTARGET)
+    -erase *.obj
+    -erase *.exe
+    -erase *.sbr
+    -erase $(LIBTARGET)
index 2487d04e371e3dae7610f2b58abd5a229f3103f6..b488b0c624ad142d996c4051fd10daefbbb63ec4 100644 (file)
@@ -43,7 +43,7 @@ $(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRA
     -out:$(PROGRAM).dll   \
     -def:$(PROGRAM).def \
     $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \
-    $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib
+    $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib
 
 gui.obj:      gui.$(SRCSUFF) gui.h $(DUMMYOBJ)
         $(cc) @<<
index 896d59b83c226d5d6238de1ff9bfe54d4d4ea72d..0697a4184ef6dbd528dadd0421c5fa1cc80f2432 100644 (file)
@@ -43,7 +43,7 @@ $(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRA
     -out:$(PROGRAM).dll   \
     -def:$(PROGRAM).def \
     $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \
-    $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib ole32.lib
+    $(guilibsdll) lib shell32.lib comctl32.lib ctl3d32.lib ole32.lib
 
 simple.obj:      simple.$(SRCSUFF) $(DUMMYOBJ)
         $(cc) @<<