Browse Source

* updates for libxml2
* disabled legacy mode in libxml2 headers

git-svn-id: trunk@11646 -

ivost 17 years ago
parent
commit
d392b8de35

+ 2 - 5
packages/libxml/examples/test1.xml

@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="MapSource 6.14.1" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="MapSource 6.14.1" version="1.1" xsi:schemaLocation="http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www8.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
   <metadata>
     <link href="http://www.garmin.com">
       <text>Garmin International</text>
@@ -8,7 +7,6 @@
     <time>2008-07-31T12:26:34Z</time>
     <bounds maxlat="47.5625744" maxlon="9.0921307" minlat="47.4293518" minlon="8.7876463"/>
   </metadata>
-
   <rte>
     <name>Islikon bis EllikonAnDerThu</name>
     <extensions>
@@ -2074,5 +2072,4 @@
       </extensions>
     </rtept>
   </rte>
-
 </gpx>

File diff suppressed because it is too large
+ 0 - 0
packages/libxml/examples/test2.xml


+ 1 - 0
packages/libxml/examples/tree2.pas

@@ -45,6 +45,7 @@ begin
    * of root_node node.
    *)
   xmlNewChild(root_node, nil, BAD_CAST('node1'), BAD_CAST('content of node 1'));
+
   (*
    * The same as above, but the new child node doesn't have a content
    *)

+ 10 - 0
packages/libxml/src/libxml2.pas

@@ -277,6 +277,16 @@ begin
 end;
 
 
+(*
+ * macros from xmlversion.inc
+ *)
+
+function BAD_CAST(str: pchar): xmlCharPtr;
+begin
+  result := xmlCharPtr(str);
+end;
+
+
 (*
  * macros from chvalid.inc
  *)

+ 4 - 4
packages/libxml/src/tree.inc

@@ -768,15 +768,15 @@ function xmlReconciliateNs(doc: xmlDocPtr; tree: xmlNodePtr): cint; XMLCALL; XML
 (*
  * Saving.
  *)
-procedure xmlDocDumpFormatMemory(cur: xmlDocPtr; mem: xmlCharPtrPtr; size: pcint; format: cint); XMLCALL; XMLPUBFUN;
+procedure xmlDocDumpFormatMemory(cur: xmlDocPtr; var mem: xmlCharPtr; var size: cint; format: cint); XMLCALL; XMLPUBFUN;
 procedure xmlDocDumpMemory(cur: xmlDocPtr; var mem: xmlCharPtr; var size: cint); XMLCALL; XMLPUBFUN;
 procedure xmlDocDumpMemoryEnc(out_doc: xmlDocPtr; var doc_txt_ptr: xmlCharPtr; var doc_txt_len: cint; txt_encoding: pchar); XMLCALL; XMLPUBFUN;
-procedure xmlDocDumpFormatMemoryEnc(out_doc: xmlDocPtr; doc_txt_ptr: xmlCharPtrPtr; doc_txt_len: pcint; txt_encoding: pchar; format: cint); XMLCALL; XMLPUBFUN;
+procedure xmlDocDumpFormatMemoryEnc(out_doc: xmlDocPtr; var doc_txt_ptr: xmlCharPtr; var doc_txt_len: cint; txt_encoding: pchar; format: cint); XMLCALL; XMLPUBFUN;
 function xmlDocFormatDump(f: PFILE; cur: xmlDocPtr; format: cint): cint; XMLCALL; XMLPUBFUN;
 function xmlDocDump(f: PFILE; cur: xmlDocPtr): cint; XMLCALL; XMLPUBFUN;
 function xmlElemDump(f: PFILE; doc: xmlDocPtr; cur: xmlNodePtr): cint; XMLCALL; XMLPUBFUN;
-function xmlSaveFile(filename: pchar; cur: xmlDocPtr; format: cint): cint; XMLCALL; XMLPUBFUN;
-function xmlSaveFormatFile(filename: pchar; cur: xmlDocPtr): cint; XMLCALL; XMLPUBFUN;
+function xmlSaveFormatFile(filename: pchar; cur: xmlDocPtr; format: cint): cint; XMLCALL; XMLPUBFUN;
+function xmlSaveFile(filename: pchar; cur: xmlDocPtr): cint; XMLCALL; XMLPUBFUN;
 function xmlNodeDump(buf: xmlBufferPtr; doc: xmlDocPtr; cur: xmlNodePtr; level, format: cint): cint; XMLCALL; XMLPUBFUN;
 function xmlSaveFileTo(buf: xmlOutputBufferPtr; cur: xmlDocPtr; encoding: pchar): cint; XMLCALL; XMLPUBFUN;
 function xmlSaveFormatFileTo(buf: xmlOutputBufferPtr; cur: xmlDocPtr; encoding: pchar; format: cint): cint; XMLCALL; XMLPUBFUN;

+ 2 - 2
packages/libxml/src/xmlstring.inc

@@ -24,14 +24,14 @@
   xmlChar = cchar;
 {$ENDIF}
 
+{$IFDEF FUNCTION}
 (**
  * BAD_CAST:
  *
  * Macro to cast a string to an xmlChar * when one know its safe.
  *)
-//#define BAD_CAST (xmlChar *)
+function BAD_CAST(str: pchar): xmlCharPtr; inline;
 
-{$IFDEF FUNCTION}
 (*
  * xmlChar handling
  *)

+ 2 - 1
packages/libxml/src/xmlversion.inc

@@ -145,7 +145,8 @@ procedure LIBXML_TEST_VERSION;
  *
  * Whether the deprecated APIs are compiled in for compatibility
  *)
-{$DEFINE LIBXML_LEGACY_ENABLED}
+{.$DEFINE LIBXML_LEGACY_ENABLED}
+{$WARNING 'libxml legacy mode disabled!'}
 
 (**
  * LIBXML_C14N_ENABLED:

Some files were not shown because too many files changed in this diff