]> git.saurik.com Git - wxWidgets.git/commitdiff
applied patch #421410:
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 4 May 2001 23:53:03 +0000 (23:53 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 4 May 2001 23:53:03 +0000 (23:53 +0000)
1. Mingw and BCC makefiles
2. compilation fixes

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

contrib/src/xml/makefile.b32
contrib/src/xml/makefile.g95
contrib/src/xml/xh_cald.cpp
contrib/src/xml/xml.cpp
contrib/src/xml/xmlexpat.cpp

index 0078a6370de95ef3a3cf1d0de24208ce71fdc949..0d68e0b28b5379f33ced5598719865d159cf9dfb 100644 (file)
@@ -9,34 +9,19 @@
 
 WXDIR = $(WXWIN)
 
 
 WXDIR = $(WXWIN)
 
+expat_dir = $(WXDIR)\contrib\src\xml\expat
+XMLPARSEDIR = $(expat_dir)\xmlparse 
+XMLTOKDIR = $(expat_dir)\xmltok
 
 
-# Do not specify the 'libxml' directory on
-# this -I line, as the #includes use
-# <libxml/xxxx.h>.  If your libxml is installed
-# in "d:\libxml\libxml2-2.1.1\libxml" you would use:
-# wxLIBXMLDIR=/Id:\libxml\libxml2-2.1.1\include
-wxLIBXMLDIR=/Ic:\progra~1\libxml\libxml2-2.3.3\include
-
-!if "$(wxLIBXMLDIR)" == ""
-!message
-!message SETUP REQUIRED
-!message
-!message You must set the wxLIBXMLDIR variable in makefile.b32 before compiling
-!message
-!message If you do not have the libxml library, you will need to obtain & install
-!message it before compiling the wxXML code.  You can obtain libxml from:
-!message http://www.xmlsoft.org
-!message
-!error
-!endif
-
-# Set this to where your libxml directory is
-EXTRACPPFLAGS=$(wxLIBXMLDIR)
+EXPAT_DEFS=-I$(expat_dir)\xmlparse -I$(expat_dir)\xmltok
+EXPAT_OBJECTS=xmltok.obj xmlrole.obj xmlparse.obj
 
 
+EXTRACPPFLAGS=$(wxLIBXMLDIR) $(EXPAT_DEFS)
 
 LIBTARGET=$(WXDIR)\lib\wxxml.lib
 
 
 LIBTARGET=$(WXDIR)\lib\wxxml.lib
 
-OBJECTS=xml.obj xmlbin.obj xmlbinz.obj xmlpars.obj xmlres.obj xmlrsall.obj \
+OBJECTS=$(EXPAT_OBJECTS) \
+        xml.obj xmlbin.obj xmlbinz.obj xmlexpat.obj xmlwrite.obj xmlres.obj xmlrsall.obj \
         xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj \
         xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj \
         xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \
         xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj \
         xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj \
         xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \
@@ -46,3 +31,10 @@ OBJECTS=xml.obj xmlbin.obj xmlbinz.obj xmlpars.obj xmlres.obj xmlrsall.obj \
 
 !include $(WXDIR)\src\makelib.b32
 
 
 !include $(WXDIR)\src\makelib.b32
 
+{$(XMLPARSEDIR)}.c.obj:
+       bcc32 $(EXPAT_DEFS) -c -w-ccc -w-rch -w-par {$< }
+
+{$(XMLTOKDIR)}.c.obj:
+       bcc32 $(EXPAT_DEFS) -c -w-ccc -w-rch -w-par {$< }
+
+
index 1739ab320c384cc25e9fbe112c412bbe2e957e8b..44a0025a336c6042ca299536f141906e303d860d 100644 (file)
@@ -9,10 +9,20 @@
 
 WXDIR = ../../..
 
 
 WXDIR = ../../..
 
-EXTRACPPFLAGS=-Ic:/progra~1/libxml/libxml2-2.3.3/include
+expat_dir = $(WXDIR)/contrib/src/xml/expat
+XMLPARSEDIR = $(expat_dir)/xmlparse
+XMLTOKDIR=$(expat_dir)/xmltok
+
+EXPAT_DEFS=-I$(expat_dir)/xmlparse -I$(expat_dir)/xmltok
+
+EXTRACPPFLAGS=$(EXPAT_DEFS)
+XMLPARSEDIR_OBJECTS=xmlparse.o
+XMLTOKDIR_OBJECTS=xmltok.o xmlrole.o
+
 LIBTARGET=$(WXDIR)/lib/libwxxml.a
 
 LIBTARGET=$(WXDIR)/lib/libwxxml.a
 
-OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
+OBJECTS= $(XMLPARSEDIR_OBJECTS) $(XMLTOKDIR_OBJECTS) \
+        xml.o xmlbin.o xmlbinz.o xmlexpat.o xmlwrite.o xmlres.o xmlrsall.o \
         xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
         xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \
         xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
         xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
         xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \
         xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
@@ -22,3 +32,9 @@ OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
 
 include $(WXDIR)/src/makelib.g95
 
 
 include $(WXDIR)/src/makelib.g95
 
+$(XMLPARSEDIR_OBJECTS):
+       $(CC) -g $(EXPAT_DEFS) -c -o $@ $(XMLPARSEDIR)/$(patsubst %.o,%.c, $@)
+
+$(XMLTOKDIR_OBJECTS):
+       $(CC) -g $(EXPAT_DEFS) -c -o $@ $(XMLTOKDIR)/$(patsubst %.o,%.c, $@)
index 0101a610abc3b7172e470680aaf76c708164c0e6..dbd0a05122bfd5dcd726b4761f0b6fd031bed4c6 100644 (file)
@@ -20,6 +20,7 @@
 #endif
 
 #include "wx/xml/xh_cald.h"
 #endif
 
 #include "wx/xml/xh_cald.h"
+#include "wx/event.h"
 #include "wx/calctrl.h"
 
 
 #include "wx/calctrl.h"
 
 
index 022ab9b9a4ff2f26b8d3f58cb093babb7dc8866e..5f722221b0c1e898933939fd350a9ebc08a406ee 100644 (file)
@@ -406,7 +406,9 @@ void wxXmlDocument::CleanUpHandlers()
 void wxXmlDocument::InitStandardHandlers()
 {
     AddHandler(new wxXmlIOHandlerBin);
 void wxXmlDocument::InitStandardHandlers()
 {
     AddHandler(new wxXmlIOHandlerBin);
+#if wxUSE_ZLIB
     AddHandler(new wxXmlIOHandlerBinZ);
     AddHandler(new wxXmlIOHandlerBinZ);
+#endif
     AddHandler(new wxXmlIOHandlerExpat);
     AddHandler(new wxXmlIOHandlerWriter);
 }
     AddHandler(new wxXmlIOHandlerExpat);
     AddHandler(new wxXmlIOHandlerWriter);
 }
index 95443131d33cee6d7555f1e559265068f30238fe..f16fcfaa66ebe32fa9da8214ab57dcf5a4ab0e5f 100644 (file)
@@ -148,10 +148,10 @@ static void DefaultHnd(void *userData, const char *s, int len)
         int pos;
         pos = buf.Find(wxT("encoding="));
         if (pos != wxNOT_FOUND)
         int pos;
         pos = buf.Find(wxT("encoding="));
         if (pos != wxNOT_FOUND)
-            ctx->encoding = buf.Mid(pos + 10).BeforeFirst(buf[pos+9]);
+            ctx->encoding = buf.Mid(pos + 10).BeforeFirst(buf.c_str()[pos+9]);
         pos = buf.Find(wxT("version="));
         if (pos != wxNOT_FOUND)
         pos = buf.Find(wxT("version="));
         if (pos != wxNOT_FOUND)
-            ctx->version = buf.Mid(pos + 9).BeforeFirst(buf[pos+8]);
+            ctx->version = buf.Mid(pos + 9).BeforeFirst(buf.c_str()[pos+8]);
     }    
 }
 
     }    
 }