]> git.saurik.com Git - wxWidgets.git/commitdiff
Compilation fixes for WXWIN_COMPATIBILITY_2_4.
authorMattia Barbon <mbarbon@cpan.org>
Sat, 13 Sep 2003 16:11:09 +0000 (16:11 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 13 Sep 2003 16:11:09 +0000 (16:11 +0000)
  Don't include wx/wx.h, use the much smaller set of
required headers instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/tex2rtf/src/htmlutil.cpp
utils/tex2rtf/src/maths.cpp
utils/tex2rtf/src/readshg.cpp
utils/tex2rtf/src/rtfutils.cpp
utils/tex2rtf/src/table.cpp
utils/tex2rtf/src/tex2any.cpp
utils/tex2rtf/src/tex2any.h
utils/tex2rtf/src/tex2rtf.cpp
utils/tex2rtf/src/tex2rtf.h
utils/tex2rtf/src/texutils.cpp
utils/tex2rtf/src/xlputils.cpp

index 1029c3060372fd442fdebe394fa69f8e78ac132d..b384cf9a46a6e113a321f21022bb9b7e3ef705ae 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include "tex2any.h"
 #include "tex2rtf.h"
 #include "table.h"
 
+#if !WXWIN_COMPATIBILITY_2_4
+static inline wxChar* copystring(const wxChar* s)
+    { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+#endif
 
 extern wxHashTable TexReferences;
 
index cba6dc2ece28ae0b19aa6a2f089ae7f3ddcb771b..1999b3b9167fdf534f2d12591be234752a750e90 100644 (file)
@@ -15,7 +15,6 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include <ctype.h>
index 2a62d48bc5459366fae63878b8000a017da6dba1..76b557290803158b4960cbe2300271dc32182ce6 100644 (file)
@@ -25,7 +25,6 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include <stdio.h>
index e4e08c30bbefe225afceff8783fbed389dbd835a..55a0a1e04f1b8f48018dd318467b648fb339ceea 100644 (file)
@@ -21,7 +21,6 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include "tex2any.h"
 #include "bmputils.h"
 #include "table.h"
 
+#if !WXWIN_COMPATIBILITY_2_4
+static inline wxChar* copystring(const wxChar* s)
+    { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+#endif
+
 wxList itemizeStack;
 static int indentLevel = 0;
 static int forbidParindent = 0; // if > 0, no parindent (e.g. in center environment)
index fa4168114027c5760b3ae5e7494e58792d934fbe..6d4b41dd425e0694af66cf68a611e9799fc1e3b7 100644 (file)
@@ -21,7 +21,6 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include "wx/hash.h"
index 64fee2941bdee280afd28aebf0a5ebb7aea6c551..2e5df17be9c157c8707aacd1e1d18409de66b986 100644 (file)
@@ -21,7 +21,6 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include <ctype.h>
 #include <stdlib.h>
 #include <time.h>
 
+#if !WXWIN_COMPATIBILITY_2_4
+static inline wxChar* copystring(const wxChar* s)
+    { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+#endif
+
 /*
  * Variables accessible from clients
  *
index d1942884023518dd896a1bf0f68f793fd4dada74..81d7c9e8500ac10d6c526f565159ec5c3ad9c619 100644 (file)
@@ -10,7 +10,6 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #include <stdio.h>
-#include "wx/wx.h"
 #include "wx/utils.h"
 #include "wx/list.h"
 #include "wx/hash.h"
@@ -511,9 +510,9 @@ class CustomMacro: public wxObject
   inline CustomMacro(char *name, int args, char *body)
   {
     noArgs = args;
-    macroName = copystring(name);
+    macroName = strcpy(new char[strlen(name) + 1], name);
     if (body)
-      macroBody = copystring(body);
+      macroBody = strcpy(new char[strlen(body) + 1], body);
     else
       macroBody = NULL;
   }
index 89d58fed6e738a44e6a0ca0c91a632ad891f8dd9..f48428cc4c3f5bd236774d4e3b0ccc300f1b8a40 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+    #ifndef NO_GUI
+        #include "wx/menu.h"
+        #include "wx/textctrl.h"
+        #include "wx/filedlg.h"
+        #include "wx/msgdlg.h"
+    #endif
 #endif
 
 #ifndef NO_GUI
 #include "tex2rtf.xpm"
 #endif
 
+#if !WXWIN_COMPATIBILITY_2_4
+static inline wxChar* copystring(const wxChar* s)
+    { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+#endif
+
 const float versionNo = TEX2RTF_VERSION_NUMBER;
 
 TexChunk *currentMember = NULL;
index b25cf8997051812c98da69872cea87f98241ce94..6ef32e33027909c2f20e45ff24480d58527d604a 100644 (file)
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef NO_GUI
+#include "wx/app.h"
+#include "wx/frame.h"
+
+class WXDLLEXPORT wxTextCtrl;
+
 // Define a new application type
 class MyApp: public wxApp
 { public:
index be0c83a28cfa969a989cf6b8b790854d05c27d9e..604b6da8fc92d9674d53dc3813caed88aa9998db 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+    #include "wx/log.h"
 #endif
 
 #include "wx/hash.h"
@@ -42,6 +42,16 @@ using namespace std;
 #include <ctype.h>
 #include "tex2any.h"
 
+#if !WXWIN_COMPATIBILITY_2_4
+static inline wxChar* copystring(const wxChar* s)
+    { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+static inline void StringToInt (const wxChar *s, int *number)
+{
+  if (s && *s && number)
+    *number = (int) wxStrtol (s, (wxChar **) NULL, 10);
+}
+#endif
+
 wxHashTable TexReferences(wxKEY_STRING);
 wxList BibList(wxKEY_STRING);
 wxStringList CitationList;
index 217f0416c953ab1d268af3f9387339ba3a71f360..99c7fbd3ad9a103a568b942a88482cae25ccdecf 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
 #include "tex2any.h"
 #include "tex2rtf.h"
 #include <ctype.h>
 
+#if !WXWIN_COMPATIBILITY_2_4
+static inline wxChar* copystring(const wxChar* s)
+    { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+#endif
+
 long currentBlockId = -1;
 static TexChunk *descriptionItemArg = NULL;
 static int indentLevel = 0;