Compilation fixes for WXWIN_COMPATIBILITY_2_4.

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
This commit is contained in:
Mattia Barbon
2003-09-13 16:11:09 +00:00
parent a7b1654d9d
commit ea172e69cf
11 changed files with 48 additions and 12 deletions

View File

@@ -21,13 +21,16 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "tex2any.h" #include "tex2any.h"
#include "tex2rtf.h" #include "tex2rtf.h"
#include "table.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; extern wxHashTable TexReferences;

View File

@@ -15,7 +15,6 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include <ctype.h> #include <ctype.h>

View File

@@ -25,7 +25,6 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include <stdio.h> #include <stdio.h>

View File

@@ -21,7 +21,6 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "tex2any.h" #include "tex2any.h"
@@ -37,6 +36,11 @@
#include "bmputils.h" #include "bmputils.h"
#include "table.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; wxList itemizeStack;
static int indentLevel = 0; static int indentLevel = 0;
static int forbidParindent = 0; // if > 0, no parindent (e.g. in center environment) static int forbidParindent = 0; // if > 0, no parindent (e.g. in center environment)

View File

@@ -21,7 +21,6 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/hash.h" #include "wx/hash.h"

View File

@@ -21,7 +21,6 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include <ctype.h> #include <ctype.h>
@@ -29,6 +28,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <time.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 * Variables accessible from clients
* *

View File

@@ -10,7 +10,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include <stdio.h> #include <stdio.h>
#include "wx/wx.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/list.h" #include "wx/list.h"
#include "wx/hash.h" #include "wx/hash.h"
@@ -511,9 +510,9 @@ class CustomMacro: public wxObject
inline CustomMacro(char *name, int args, char *body) inline CustomMacro(char *name, int args, char *body)
{ {
noArgs = args; noArgs = args;
macroName = copystring(name); macroName = strcpy(new char[strlen(name) + 1], name);
if (body) if (body)
macroBody = copystring(body); macroBody = strcpy(new char[strlen(body) + 1], body);
else else
macroBody = NULL; macroBody = NULL;
} }

View File

@@ -21,7 +21,12 @@
#endif #endif
#ifndef WX_PRECOMP #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 #endif
#ifndef NO_GUI #ifndef NO_GUI
@@ -50,6 +55,11 @@
#include "tex2rtf.xpm" #include "tex2rtf.xpm"
#endif #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; const float versionNo = TEX2RTF_VERSION_NUMBER;
TexChunk *currentMember = NULL; TexChunk *currentMember = NULL;

View File

@@ -10,6 +10,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef NO_GUI #ifndef NO_GUI
#include "wx/app.h"
#include "wx/frame.h"
class WXDLLEXPORT wxTextCtrl;
// Define a new application type // Define a new application type
class MyApp: public wxApp class MyApp: public wxApp
{ public: { public:

View File

@@ -21,7 +21,7 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/log.h"
#endif #endif
#include "wx/hash.h" #include "wx/hash.h"
@@ -42,6 +42,16 @@ using namespace std;
#include <ctype.h> #include <ctype.h>
#include "tex2any.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); wxHashTable TexReferences(wxKEY_STRING);
wxList BibList(wxKEY_STRING); wxList BibList(wxKEY_STRING);
wxStringList CitationList; wxStringList CitationList;

View File

@@ -21,13 +21,17 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "tex2any.h" #include "tex2any.h"
#include "tex2rtf.h" #include "tex2rtf.h"
#include <ctype.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; long currentBlockId = -1;
static TexChunk *descriptionItemArg = NULL; static TexChunk *descriptionItemArg = NULL;
static int indentLevel = 0; static int indentLevel = 0;