aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2015-04-16 16:04:06 +0800
committerDaniel Veillard <veillard@redhat.com>2015-04-16 16:04:06 +0800
commit22b0415a8945a5e166457c6f8e3785f89339c533 (patch)
tree284392723764d10d562b0b440e35c1ea9e489368
parent213f1fe0d76d30eaed6e5853057defc43e6df2c9 (diff)
downloadandroid_external_libxml2-22b0415a8945a5e166457c6f8e3785f89339c533.tar.gz
android_external_libxml2-22b0415a8945a5e166457c6f8e3785f89339c533.tar.bz2
android_external_libxml2-22b0415a8945a5e166457c6f8e3785f89339c533.zip
os400: fix various ILE/RPG types definitions. Adjust build scripts.
- A typo caused an undefined symbol reference. - A structure field name did not match the corresponding C name due to a typo. - Some structured fields were not properly aligned. - The long/ulong types were wrongly mapped to 64-bit types. - A typo in a /include directive caused a compilation error. - Doc files copy now converts from UTF-8 and split long lines. - Adjust /include file name mapping translation for proper prefix handling.
-rw-r--r--os400/libxmlrpg/HTMLparser.rpgle15
-rw-r--r--os400/libxmlrpg/SAX.rpgle6
-rw-r--r--os400/libxmlrpg/SAX2.rpgle8
-rw-r--r--os400/libxmlrpg/chvalid.rpgle5
-rw-r--r--os400/libxmlrpg/dict.rpgle9
-rw-r--r--os400/libxmlrpg/encoding.rpgle8
-rw-r--r--os400/libxmlrpg/globals.rpgle30
-rw-r--r--os400/libxmlrpg/nanoftp.rpgle2
-rw-r--r--os400/libxmlrpg/parser.rpgle41
-rw-r--r--os400/libxmlrpg/parserInternals.rpgle2
-rw-r--r--os400/libxmlrpg/schematron.rpgle2
-rw-r--r--os400/libxmlrpg/tree.rpgle28
-rw-r--r--os400/libxmlrpg/xmlIO.rpgle6
-rw-r--r--os400/libxmlrpg/xmlTypesC.rpgle24
-rw-r--r--os400/libxmlrpg/xmlmemory.rpgle19
-rw-r--r--os400/libxmlrpg/xmlreader.rpgle4
-rw-r--r--os400/libxmlrpg/xmlsave.rpgle7
-rw-r--r--os400/libxmlrpg/xmlschemastypes.rpgle10
-rw-r--r--os400/libxmlrpg/xmlstdarg.rpgle6
-rw-r--r--os400/libxmlrpg/xmlstring.rpgle4
-rw-r--r--os400/libxmlrpg/xpath.rpgle6
-rw-r--r--os400/make-rpg.sh13
-rw-r--r--os400/make.sh11
23 files changed, 165 insertions, 101 deletions
diff --git a/os400/libxmlrpg/HTMLparser.rpgle b/os400/libxmlrpg/HTMLparser.rpgle
index 7b4a6269..d4c5f8d9 100644
--- a/os400/libxmlrpg/HTMLparser.rpgle
+++ b/os400/libxmlrpg/HTMLparser.rpgle
@@ -12,6 +12,7 @@
/define HTML_PARSER_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/parser"
/if defined(LIBXML_HTML_ENABLED)
@@ -63,13 +64,13 @@
d htmlElemDesc ds based(htmlElemDescPtr)
d align qualified
d name * const char *
- d startTag 3u 0 Start tag implied ?
- d endTag 3u 0 End tag implied ?
- d saveEndTag 3u 0 Save end tag ?
- d empty 3u 0 Empty element ?
- d depr 3u 0 Deprecated element ?
- d dtd 3u 0 Loose DTD/Frameset
- d isinline 3u 0 Block 0/inline elem?
+ d startTag like(xmlCchar) Start tag implied ?
+ d endTag like(xmlCchar) End tag implied ?
+ d saveEndTag like(xmlCchar) Save end tag ?
+ d empty like(xmlCchar) Empty element ?
+ d depr like(xmlCchar) Deprecated element ?
+ d dtd like(xmlCchar) Loose DTD/Frameset
+ d isinline like(xmlCchar) Block 0/inline elem?
d desc * const char *
*
* New fields encapsulating HTML structure
diff --git a/os400/libxmlrpg/SAX.rpgle b/os400/libxmlrpg/SAX.rpgle
index 18f851dd..85f15ccf 100644
--- a/os400/libxmlrpg/SAX.rpgle
+++ b/os400/libxmlrpg/SAX.rpgle
@@ -186,19 +186,19 @@
/if defined(LIBXML_SAX1_ENABLED)
d initxmlDefaultSAXHandler...
d pr extproc('initxmlDefaultSAXHandler')
- d hdlr like(xmlSAXHandlerV1)
+ d hdlr likeds(xmlSAXHandlerV1)
d warning 10i 0 value
/if defined(LIBXML_HTML_ENABLED)
d inithtmlDefaultSAXHandler...
d pr extproc('inithtmlDefaultSAXHandler')
- d hdlr like(xmlSAXHandlerV1)
+ d hdlr likeds(xmlSAXHandlerV1)
/endif
/if defined(LIBXML_DOCB_ENABLED)
d initdocbDefaultSAXHandler...
d pr extproc('initdocbDefaultSAXHandler')
- d hdlr like(xmlSAXHandlerV1)
+ d hdlr likeds(xmlSAXHandlerV1)
/endif
/endif LIBXML_SAX1_ENABLED
diff --git a/os400/libxmlrpg/SAX2.rpgle b/os400/libxmlrpg/SAX2.rpgle
index c9ab9d10..fb687e99 100644
--- a/os400/libxmlrpg/SAX2.rpgle
+++ b/os400/libxmlrpg/SAX2.rpgle
@@ -213,20 +213,20 @@
/endif LIBXML_SAX1_ENABLED
d xmlSAXVersion pr 10i 0 extproc('xmlSAXVersion')
- d hdlr like(xmlSAXHandler)
+ d hdlr likeds(xmlSAXHandler)
d version 10i 0 value
d xmlSAX2InitDefaultSAXHandler...
d pr extproc(
d 'xmlSAX2InitDefaultSAXHandler')
- d hdlr like(xmlSAXHandler)
+ d hdlr likeds(xmlSAXHandler)
d warning 10i 0 value
/if defined(LIBXML_HTML_ENABLED)
d xmlSAX2InitHtmlDefaultSAXHandler...
d pr extproc(
d 'xmlSAX2InitHtmlDefaultSAXHandler')
- d hdlr like(xmlSAXHandler)
+ d hdlr likeds(xmlSAXHandler)
d htmlDefaultSAXHandlerInit...
d pr extproc('htmlDefaultSAXHandlerInit')
@@ -236,7 +236,7 @@
d xmlSAX2InitDocbDefaultSAXHandler...
d pr extproc(
d 'xmlSAX2InitDocbDefaultSAXHandler')
- d hdlr like(xmlSAXHandler)
+ d hdlr likeds(xmlSAXHandler)
d docbDefaultSAXHandlerInit...
d pr extproc('docbDefaultSAXHandlerInit')
diff --git a/os400/libxmlrpg/chvalid.rpgle b/os400/libxmlrpg/chvalid.rpgle
index 33393f6f..444d1cb2 100644
--- a/os400/libxmlrpg/chvalid.rpgle
+++ b/os400/libxmlrpg/chvalid.rpgle
@@ -10,6 +10,7 @@
/define XML_CHVALID_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/xmlstring"
* Define our typedefs and structures
@@ -18,8 +19,8 @@
d xmlChSRange ds based(xmlChSRangePtr)
d align qualified
- d low 5u 0
- d high 5u 0
+ d low like(xmlCushort)
+ d high like(xmlCushort)
d xmlChLRangePtr s * based(######typedef######)
diff --git a/os400/libxmlrpg/dict.rpgle b/os400/libxmlrpg/dict.rpgle
index cd36f50f..bcb6576e 100644
--- a/os400/libxmlrpg/dict.rpgle
+++ b/os400/libxmlrpg/dict.rpgle
@@ -10,6 +10,7 @@
/define XML_DICT_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"
* The dictionary.
@@ -27,12 +28,14 @@
d like(xmlDictPtr)
d xmlDictSetLimit...
- d pr 10u 0 extproc('xmlDictSetLimit') size_t
+ d pr extproc('xmlDictSetLimit')
+ d like(xmlCsize_t)
d dict value like(xmlDictPtr)
- d limit 10u 0 value size_t
+ d limit value like(xmlCsize_t)
d xmlDictGetUsage...
- d pr 10u 0 extproc('xmlDictGetUsage') size_t
+ d pr extproc('xmlDictGetUsage')
+ d like(xmlCsize_t)
d dict value like(xmlDictPtr)
d xmlDictCreateSub...
diff --git a/os400/libxmlrpg/encoding.rpgle b/os400/libxmlrpg/encoding.rpgle
index 80970fb0..c0ed7e65 100644
--- a/os400/libxmlrpg/encoding.rpgle
+++ b/os400/libxmlrpg/encoding.rpgle
@@ -234,25 +234,25 @@
d xmlCharEncOutFunc...
d pr 10i 0 extproc('xmlCharEncOutFunc')
- d handler like(xmlCharEncodingHandler)
+ d handler likeds(xmlCharEncodingHandler)
d out value like(xmlBufferPtr)
d in value like(xmlBufferPtr)
d xmlCharEncInFunc...
d pr 10i 0 extproc('xmlCharEncInFunc')
- d handler like(xmlCharEncodingHandler)
+ d handler likeds(xmlCharEncodingHandler)
d out value like(xmlBufferPtr)
d in value like(xmlBufferPtr)
d xmlCharEncFirstLine...
d pr 10i 0 extproc('xmlCharEncFirstLine')
- d handler like(xmlCharEncodingHandler)
+ d handler likeds(xmlCharEncodingHandler)
d out value like(xmlBufferPtr)
d in value like(xmlBufferPtr)
d xmlCharEncCloseFunc...
d pr 10i 0 extproc('xmlCharEncCloseFunc')
- d handler like(xmlCharEncodingHandler)
+ d handler likeds(xmlCharEncodingHandler)
* Export a few useful functions
diff --git a/os400/libxmlrpg/globals.rpgle b/os400/libxmlrpg/globals.rpgle
index 80dadcac..e51182fb 100644
--- a/os400/libxmlrpg/globals.rpgle
+++ b/os400/libxmlrpg/globals.rpgle
@@ -94,13 +94,13 @@
d xmlParserVersion...
d * const char *
d xmlDefaultSAXLocator...
- d like(xmlSAXLocator)
+ d likeds(xmlSAXLocator)
d xmlDefaultSAXHandler...
- d like(xmlSAXHandlerV1)
+ d likeds(xmlSAXHandlerV1)
d docbDefaultSAXHandler...
- d like(xmlSAXHandlerV1)
+ d likeds(xmlSAXHandlerV1)
d htmlDefaultSAXHandler...
- d like(xmlSAXHandlerV1)
+ d likeds(xmlSAXHandlerV1)
d xmlFree like(xmlFreeFunc)
d xmlMalloc like(xmlMallocFunc)
d xmlMemStrdup like(xmlStrdupFunc)
@@ -145,7 +145,7 @@
d like(xmlDeregisterNodeFunc)
d xmlMallocAtomic...
d like(xmlMallocFunc)
- d xmlLastError like(xmlError)
+ d xmlLastError likeds(xmlError)
d xmlParserInputBufferCreateFilenameValue...
d like(xmlParserInputBuffer...
d CreateFilenameFunc)
@@ -215,33 +215,33 @@
d get_docbDefaultSAXHandler...
d pr extproc(
d '__get_docbDefaultSAXHandler')
- d like(xmlSAXHandlerV1)
+ d likeds(xmlSAXHandlerV1)
d set_docbDefaultSAXHandler...
d pr extproc(
d '__set_docbDefaultSAXHandler')
- d value value like(xmlSAXHandlerV1)
+ d value value likeds(xmlSAXHandlerV1)
/endif
/if defined(LIBXML_HTML_ENABLED)
d get_htmlDefaultSAXHandler...
d pr extproc(
d '__get_htmlDefaultSAXHandler')
- d like(xmlSAXHandlerV1)
+ d likeds(xmlSAXHandlerV1)
d set_htmlDefaultSAXHandler...
d pr extproc(
d '__set_htmlDefaultSAXHandler')
- d value value like(xmlSAXHandlerV1)
+ d value value likeds(xmlSAXHandlerV1)
/endif
d get_xmlLastError...
d pr extproc('__get_xmlLastError')
- d like(xmlError)
+ d likeds(xmlError)
d set_xmlLastError...
d pr extproc('__set_xmlLastError')
- d value value like(xmlError)
+ d value value likeds(xmlError)
d get_oldXMLWDcompatibility...
d pr 10i 0 extproc(
@@ -278,19 +278,19 @@
d get_xmlDefaultSAXHandler...
d pr extproc('__get_xmlDefaultSAXHandler')
- d like(xmlSAXHandlerV1)
+ d likeds(xmlSAXHandlerV1)
d set_xmlDefaultSAXHandler...
d pr extproc('__set_xmlDefaultSAXHandler')
- d value value like(xmlSAXHandlerV1)
+ d value value likeds(xmlSAXHandlerV1)
d get_xmlDefaultSAXLocator...
d pr extproc('__get_xmlDefaultSAXLocator')
- d like(xmlSAXLocator)
+ d likeds(xmlSAXLocator)
d set_xmlDefaultSAXLocator...
d pr extproc('__set_xmlDefaultSAXLocator')
- d value value like(xmlSAXLocator)
+ d value value likeds(xmlSAXLocator)
d get_xmlDoValidityCheckingDefaultValue...
d pr 10i 0 extproc('__get_xmlDoValidity+
diff --git a/os400/libxmlrpg/nanoftp.rpgle b/os400/libxmlrpg/nanoftp.rpgle
index 0637562e..d8d5ef97 100644
--- a/os400/libxmlrpg/nanoftp.rpgle
+++ b/os400/libxmlrpg/nanoftp.rpgle
@@ -9,7 +9,7 @@
/if not defined(NANO_FTP_H__)
/define NANO_FTP_H__
- /include /libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlversion"
/if defined(LIBXML_FTP_ENABLED)
diff --git a/os400/libxmlrpg/parser.rpgle b/os400/libxmlrpg/parser.rpgle
index 7f29e31e..f04aa2eb 100644
--- a/os400/libxmlrpg/parser.rpgle
+++ b/os400/libxmlrpg/parser.rpgle
@@ -9,6 +9,7 @@
/define XML_PARSER_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"
/include "libxmlrpg/dict"
/include "libxmlrpg/hash"
@@ -60,7 +61,7 @@
* so even if there is an overflow this should not give troubles
* for parsing very large instances.
*
- d consumed 20u 0 # consumed xmlChars
+ d consumed like(xmlCulong) # consumed xmlChars
d free like(xmlParserInputDeallocate) base deallocator
d encoding * const xmlChar *
d version * const xmlChar *
@@ -81,10 +82,10 @@
d align qualified
d node like(xmlNodePtr) const
* Position & line # that text that created the node begins & ends on
- d begin_pos 20u 0
- d begin_line 20u 0
- d end_pos 20u 0
- d end_line 20u 0
+ d begin_pos like(xmlCulong)
+ d begin_line like(xmlCulong)
+ d end_pos like(xmlCulong)
+ d end_line like(xmlCulong)
d xmlParserNodeInfoSeqPtr...
d s * based(######typedef######)
@@ -92,8 +93,8 @@
d xmlParserNodeInfoSeq...
d ds based(xmlParserNodeInfoSeqPtr)
d align qualified
- d maximum 20u 0
- d length 20u 0
+ d maximum like(xmlCulong)
+ d length like(xmlCulong)
d buffer like(xmlParserNodeInfoPtr)
* xmlParserInputState:
@@ -221,18 +222,18 @@
d nodeTab * xmlNodePtr *
*
d record_info 10i 0 Keep node info ?
- d node_seq like(xmlParserNodeInfoSeq) Parsed nodes info
+ d node_seq likeds(xmlParserNodeInfoSeq) Parsed nodes info
*
d errNo 10i 0 Error code
*
d hasExternalSubset...
d 10i 0
- d hashPErefs 10i 0
+ d hasPErefs 10i 0
d external 10i 0 Parsing ext. entity?
*
d valid 10i 0 Valid document ?
d validate 10i 0 Try to validate ?
- d vctxt like(xmlValidCtxt) Validity context
+ d vctxt likeds(xmlValidCtxt) Validity context
*
d instate like(xmlParserInputState) Current input type
d token 10i 0 Next look-ahead char
@@ -246,8 +247,8 @@
d nameMax 10i 0 Max stack depth
d nameTab * const xmlChar * *
*
- d nbChars 20i 0 # xmlChars processed
- d checkIndex 20i 0 4 progressive parse
+ d nbChars like(xmlClong) # xmlChars processed
+ d checkIndex like(xmlClong) 4 progressive parse
d keepBlanks 10i 0 Ugly but ...
d disableSAX 10i 0 Disable SAX cllbacks
d inSubset 10i 0 In int 1/ext 2 sbset
@@ -309,20 +310,20 @@
*
* the complete error informations for the last error.
*
- d lastError like(xmlError)
+ d lastError likeds(xmlError)
d parseMode like(xmlParserMode) The parser mode
- d nbentities 20u 0 # entity references
- d sizeentities 20u 0 Parsed entities size
+ d nbentities like(xmlCulong) # entity references
+ d sizeentities like(xmlCulong) Parsed entities size
*
* for use by HTML non-recursive parser
*
- d nodeInfo like(xmlParserNodeInfo) Current NodeInfo
+ d nodeInfo like(xmlParserNodeInfoPtr) Current NodeInfo
d nodeInfoNr 10i 0 Parsing stack depth
d nodeInfoMax 10i 0 Max stack depth
d nodeInfoTab * xmlParserNodeInfo *
*
d input_id 10i 0 Label inputs ?
- d sizeentcopy 20u 0 Entity copy volume
+ d sizeentcopy like(xmlCulong) Entity copy volume
* xmlSAXLocator:
*
@@ -1151,7 +1152,8 @@
d seq value like(xmlParserNodeInfoSeqPtr)
d xmlParserFindNodeInfoIndex...
- d pr 20u 0 extproc('xmlParserFindNodeInfoIndex')
+ d pr extproc('xmlParserFindNodeInfoIndex')
+ d like(xmlCulong)
d seq value like(xmlParserNodeInfoSeqPtr)
d node value like(xmlNodePtr) const
@@ -1180,7 +1182,8 @@
* Index lookup, actually implemented in the encoding module
d xmlByteConsumed...
- d pr 20i 0 extproc('xmlByteConsumed')
+ d pr extproc('xmlByteConsumed')
+ d like(xmlClong)
d ctxt value like(xmlParserCtxtPtr)
* New set of simpler/more flexible APIs
diff --git a/os400/libxmlrpg/parserInternals.rpgle b/os400/libxmlrpg/parserInternals.rpgle
index 6942b7dd..26913977 100644
--- a/os400/libxmlrpg/parserInternals.rpgle
+++ b/os400/libxmlrpg/parserInternals.rpgle
@@ -89,7 +89,7 @@
d s 9 import('xmlStringTextNoenc') \0 in 10th byte
d xmlStringComment...
- d s 7 import('xmlStringTextComment') \0 in 8th byte
+ d s 7 import('xmlStringComment') \0 in 8th byte
* Function to finish the work of the macros where needed.
diff --git a/os400/libxmlrpg/schematron.rpgle b/os400/libxmlrpg/schematron.rpgle
index ff8ea625..c987cd5e 100644
--- a/os400/libxmlrpg/schematron.rpgle
+++ b/os400/libxmlrpg/schematron.rpgle
@@ -101,7 +101,7 @@
d err value
d like(xmlSchematronValidityErrorFunc)
d warn value like(
- d xmlSchematronValidityWarningFunc)
+ d xmlSchematronValidityWarningFunc)
d ctx * value void *
d xmlSchematronGetParserErrors...
diff --git a/os400/libxmlrpg/tree.rpgle b/os400/libxmlrpg/tree.rpgle
index 8b4981ab..5c67f4fa 100644
--- a/os400/libxmlrpg/tree.rpgle
+++ b/os400/libxmlrpg/tree.rpgle
@@ -11,6 +11,7 @@
/define XML_TREE_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/xmlstring"
@@ -109,12 +110,14 @@
d xmlBufEnd pr * extproc('xmlBufEnd') xmlChar *
d buf value like(xmlBufPtr) const
- d xmlBufUse pr 10u 0 extproc('xmlBufUse') size_t
+ d xmlBufUse pr extproc('xmlBufUse')
+ d like(xmlCsize_t)
d buf value like(xmlBufPtr) const
- d xmlBufShrink pr 10u 0 extproc('xmlBufShrink') size_t
+ d xmlBufShrink pr extproc('xmlBufShrink')
+ d like(xmlCsize_t)
d buf value like(xmlBufPtr)
- d len 10u 0 value size_t
+ d len value like(xmlCsize_t)
* LIBXML2_NEW_BUFFER:
*
@@ -503,8 +506,8 @@
d properties like(xmlAttrPtr) Properties list
d nsDef like(xmlNsPtr) Node ns definitions
d psvi * Type/PSVI info
- d line 5u 0 Line number
- d extra 5u 0 Data for XPath/XSLT
+ d line like(xmlCushort)
+ d extra like(xmlCushort) Data for XPath/XSLT
* xmlDocProperty
*
@@ -681,18 +684,18 @@
d xmlBufferCreateSize...
d pr extproc('xmlBufferCreateSize')
d like(xmlBufferPtr)
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d xmlBufferCreateStatic...
d pr extproc('xmlBufferCreateStatic')
d like(xmlBufferPtr)
d mem * value
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d xmlBufferResize...
d pr 10i 0 extproc('xmlBufferResize')
d buf value like(xmlBufferPtr)
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d xmlBufferFree pr extproc('xmlBufferFree')
d buf value like(xmlBufferPtr)
@@ -1030,7 +1033,8 @@
* Navigating.
d xmlNewDocFragment...
- d xmlGetLineNo pr 20i 0 extproc('xmlGetLineNo')
+ d xmlGetLineNo pr extproc('xmlGetLineNo')
+ d like(xmlClong)
d node value like(xmlNodePtr)
/if defined(LIBXML_TREE_ENABLED)
@@ -1476,7 +1480,8 @@
d cur value like(xmlDocPtr)
d format 10i 0 value
- d xmlBufNodeDump pr 10u 0 extproc('xmlBufNodeDump') size_t
+ d xmlBufNodeDump pr extproc('xmlBufNodeDump')
+ d like(xmlCsize_t)
d buf value like(xmlBufPtr)
d doc value like(xmlDocPtr)
d cur value like(xmlNodePtr)
@@ -1597,7 +1602,8 @@
* traversal.
d xmlChildElementCount...
- d pr 20u 0 extproc('xmlChildElementCount')
+ d pr extproc('xmlChildElementCount')
+ d like(xmlClong)
d parent value like(xmlNodePtr)
d xmlNextElementSibling...
diff --git a/os400/libxmlrpg/xmlIO.rpgle b/os400/libxmlrpg/xmlIO.rpgle
index 72911bc0..261b0e22 100644
--- a/os400/libxmlrpg/xmlIO.rpgle
+++ b/os400/libxmlrpg/xmlIO.rpgle
@@ -9,6 +9,7 @@
/define XML_IO_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
* Those are the functions and datatypes for the parser input
* I/O structures.
@@ -131,7 +132,7 @@
d raw like(xmlBufPtr) Raw input buffer
d compressed 10i 0
d error 10i 0
- d rawconsumed 20u 0
+ d rawconsumed like(xmlCulong)
/if defined(LIBXML_OUTPUT_ENABLED)
d xmlOutputBuffer...
@@ -307,7 +308,8 @@
d out value like(xmlOutputBufferPtr)
d xmlOutputBufferGetSize...
- d pr 10u 0 extproc('xmlOutputBufferGetSize') size_t
+ d pr extproc('xmlOutputBufferGetSize')
+ d like(xmlCsize_t)
d out value like(xmlOutputBufferPtr)
d xmlOutputBufferWrite...
diff --git a/os400/libxmlrpg/xmlTypesC.rpgle b/os400/libxmlrpg/xmlTypesC.rpgle
new file mode 100644
index 00000000..798d74d3
--- /dev/null
+++ b/os400/libxmlrpg/xmlTypesC.rpgle
@@ -0,0 +1,24 @@
+ * Eqivalent of C data types.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XMLTYPESC_H__)
+ /define XMLTYPESC_H__
+
+ d xmlCchar s 3i 0 based(######typedef######)
+ d xmlCuchar s 3u 0 based(######typedef######)
+ d xmlCshort s 5i 0 based(######typedef######)
+ d xmlCushort s 5u 0 based(######typedef######)
+ d xmlCint s 10i 0 based(######typedef######)
+ d xmlCuInt s 10u 0 based(######typedef######)
+ d xmlClong s 10i 0 based(######typedef######)
+ d xmlCulong s 10u 0 based(######typedef######)
+ d xmlClonglong s 20i 0 based(######typedef######)
+ d xmlCulonglong s 20u 0 based(######typedef######)
+ d xmlCenum s 10i 0 based(######typedef######)
+ d xmlCssize_t s 10i 0 based(######typedef######)
+ d xmlCsize_t s 10u 0 based(######typedef######)
+
+ /endif
diff --git a/os400/libxmlrpg/xmlmemory.rpgle b/os400/libxmlrpg/xmlmemory.rpgle
index 165eacac..3c791038 100644
--- a/os400/libxmlrpg/xmlmemory.rpgle
+++ b/os400/libxmlrpg/xmlmemory.rpgle
@@ -10,6 +10,7 @@
/define DEBUG_MEMORY_ALLOC__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
* DEBUG_MEMORY:
*
@@ -96,7 +97,7 @@
d func value like(xmlMallocFunc)
d xmlMalloc pr * extproc('__call_xmlMalloc') void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d get_xmlMallocAtomic...
d pr extproc('__get_xmlMallocAtomic')
@@ -108,7 +109,7 @@
d xmlMallocAtomic...
d pr * extproc('__call_xmlMallocAtomic') void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d get_xmlRealloc pr extproc('__get_xmlRealloc')
d like(xmlReallocFunc)
@@ -118,7 +119,7 @@
d xmlRealloc pr * extproc('__call_xmlRealloc') void *
d mem * value void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d get_xmlMemStrdup...
d pr extproc('__get_xmlMemStrdup')
@@ -184,7 +185,7 @@
d xmlMmDisplayLast...
d pr extproc('xmlMemDisplayLast')
d fp * value FILE *
- d nbBytes 20i 0 value
+ d nbBytes value like(xmlClong)
d xmlMemShow pr extproc('xmlMemShow')
d fp * value FILE *
@@ -193,11 +194,11 @@
d xmlMemoryDump pr extproc('xmlMemoryDump')
d xmlMemMalloc pr * extproc('xmlMemMalloc') void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d xmlMemRealloc pr * extproc('xmlMemRealloc') void *
d ptr * value void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d xmlMemFree pr extproc('xmlMemFree')
d ptr * value void *
@@ -207,19 +208,19 @@
d str * value options(*string) const char *
d xmlMallocLoc pr * extproc('xmlMallocLoc') void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d file * value options(*string) const char *
d line 10i 0 value
d xmlReallocLoc pr * extproc('xmlReallocLoc') void *
d ptr * value void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d file * value options(*string) const char *
d line 10i 0 value
d xmlMallocAtomicLoc...
d pr * extproc('xmlMallocAtomicLoc') void *
- d size 10u 0 value size_t
+ d size value like(xmlCsize_t)
d file * value options(*string) const char *
d line 10i 0 value
diff --git a/os400/libxmlrpg/xmlreader.rpgle b/os400/libxmlrpg/xmlreader.rpgle
index eccd37c4..5084fc86 100644
--- a/os400/libxmlrpg/xmlreader.rpgle
+++ b/os400/libxmlrpg/xmlreader.rpgle
@@ -9,6 +9,7 @@
/define XML_XMLREADER_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"
/include "libxmlrpg/xmlIO"
@@ -472,7 +473,8 @@
* Index lookup
d xmlTextReaderByteConsumed...
- d pr 20i 0 extproc('xmlTextReaderByteConsumed')
+ d pr extproc('xmlTextReaderByteConsumed')
+ d like(xmlClong)
d reader value like(xmlTextReaderPtr)
* New more complete APIs for simpler creation and reuse of readers
diff --git a/os400/libxmlrpg/xmlsave.rpgle b/os400/libxmlrpg/xmlsave.rpgle
index efcb09fb..764dceb6 100644
--- a/os400/libxmlrpg/xmlsave.rpgle
+++ b/os400/libxmlrpg/xmlsave.rpgle
@@ -9,6 +9,7 @@
/define XML_XMLSAVE_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/tree"
/include "libxmlrpg/encoding"
/include "libxmlrpg/xmlIO"
@@ -68,11 +69,13 @@
d encoding * value options(*string) const char *
d options 10i 0 value
- d xmlSaveDoc pr 20i 0 extproc('xmlSaveDoc')
+ d xmlSaveDoc pr extproc('xmlSaveDoc')
+ d like(xmlClong)
d ctxt value like(xmlSaveCtxtPtr)
d doc value like(xmlDocPtr)
- d xmlSaveTree pr 20i 0 extproc('xmlSaveTree')
+ d xmlSaveTree pr extproc('xmlSaveTree')
+ d like(xmlClong)
d ctxt value like(xmlSaveCtxtPtr)
d node value like(xmlNodePtr)
diff --git a/os400/libxmlrpg/xmlschemastypes.rpgle b/os400/libxmlrpg/xmlschemastypes.rpgle
index 6433c329..0bf0f709 100644
--- a/os400/libxmlrpg/xmlschemastypes.rpgle
+++ b/os400/libxmlrpg/xmlschemastypes.rpgle
@@ -10,6 +10,7 @@
/define XML_SCHEMA_TYPES_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/if defined(LIBXML_SCHEMAS_ENABLED)
@@ -107,7 +108,7 @@
d TypeFacet')
d facet value like(xmlSchemaFacetPtr)
d value * value options(*string) const xmlChar *
- d actualLen 20u 0 value
+ d actualLen value like(xmlCulong)
d expectedLen * value unsigned long *
d xmlSchemaGetBuiltInType...
@@ -130,8 +131,9 @@
d value * value options(*string) const xmlChar *
d xmlSchemaGetFacetValueAsULong...
- d pr 20u 0 extproc(
+ d pr extproc(
d 'xmlSchemaGetFacetValueAsULong')
+ d like(xmlCulong)
d facet value like(xmlSchemaFacetPtr)
d xmlSchemaValidateLengthFacet...
@@ -141,7 +143,7 @@
d facet value like(xmlSchemaFacetPtr)
d value * value options(*string) const xmlChar *
d val value like(xmlSchemaValPtr)
- d length 20u 0
+ d length like(xmlCulong)
d xmlSchemaValidateLengthFacetWhtsp...
d pr 10i 0 extproc(
@@ -150,7 +152,7 @@
d valType value like(xmlSchemaValType)
d value * value options(*string) const xmlChar *
d val value like(xmlSchemaValPtr)
- d length 20u 0
+ d length like(xmlCulong)
d ws value
d like(xmlSchemaWhitespaceValueType)
diff --git a/os400/libxmlrpg/xmlstdarg.rpgle b/os400/libxmlrpg/xmlstdarg.rpgle
index 4e6f121d..9e45a4c8 100644
--- a/os400/libxmlrpg/xmlstdarg.rpgle
+++ b/os400/libxmlrpg/xmlstdarg.rpgle
@@ -19,16 +19,16 @@
* Procedures.
d xmlVaStart pr extproc('__xmlVaStart')
- d list like(xmlVaList)
+ d list likeds(xmlVaList)
d lastargaddr * value
d lastargsize 10u 0 value
d xmlVaArg pr * extproc('__xmlVaArg')
- d list like(xmlVaList)
+ d list likeds(xmlVaList)
d dest * value
d argsize 10i 0 value
d xmlVaEnd pr extproc('__xmlVaEnd')
- d list like(xmlVaList)
+ d list likeds(xmlVaList)
/endif XML_STDARG_H__
diff --git a/os400/libxmlrpg/xmlstring.rpgle b/os400/libxmlrpg/xmlstring.rpgle
index 41e9eb51..5b863e45 100644
--- a/os400/libxmlrpg/xmlstring.rpgle
+++ b/os400/libxmlrpg/xmlstring.rpgle
@@ -10,6 +10,7 @@
/define XML_STRING_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/include "libxmlrpg/xmlstdarg"
* xmlChar:
@@ -18,7 +19,8 @@
* It's unsigned allowing to pinpoint case where char * are assigned
* to xmlChar * (possibly making serialization back impossible).
- d xmlChar s 3u 0 based(######typedef######)
+ d xmlChar s based(######typedef######)
+ d like(xmlCuchar)
* xmlChar handling
diff --git a/os400/libxmlrpg/xpath.rpgle b/os400/libxmlrpg/xpath.rpgle
index 3f3be326..1784fada 100644
--- a/os400/libxmlrpg/xpath.rpgle
+++ b/os400/libxmlrpg/xpath.rpgle
@@ -18,6 +18,7 @@
/define XML_XPATH_H__
/include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlTypesC"
/if defined(LIBXML_XPATH_ENABLED)
@@ -366,7 +367,7 @@
*
d userData * void *
d error like(xmlStructuredErrorFunc) Error callback
- d lastError like(xmlError) The last error
+ d lastError likeds(xmlError) The last error
d debugNode like(xmlNodePtr) XSLT source node
*
* dictionary
@@ -550,7 +551,8 @@
* Evaluation functions.
d xmlXPathOrderDocElems...
- d pr 20i 0 extproc('xmlXPathOrderDocElems')
+ d pr extproc('xmlXPathOrderDocElems')
+ d like(xmlClong)
d doc value like(xmlDocPtr)
d xmlXPathSetContextNode...
diff --git a/os400/make-rpg.sh b/os400/make-rpg.sh
index 95d3249c..664b47bf 100644
--- a/os400/make-rpg.sh
+++ b/os400/make-rpg.sh
@@ -25,8 +25,6 @@ fi
# Map file names to DB2 name syntax.
-> tmpsubstfile
-
for HFILE in *.rpgle *.rpgle.in
do NAME="`basename \"${HFILE}\" .in`"
VAR="`basename \"${NAME}\" .rpgle`"
@@ -36,9 +34,14 @@ do NAME="`basename \"${HFILE}\" .in`"
then VAL=SCHMTYPES
fi
- echo "s/${VAR}/${VAL}/g" >> tmpsubstfile
eval "VAR_${VAR}=\"${VAL}\""
-done
+ echo "${VAR} s/${VAR}/${VAL}/g"
+done > tmpsubstfile1
+
+# Order substitution commands so that a prefix appears after all
+# file names beginning with the prefix.
+
+sort -r tmpsubstfile1 | sed 's/^[^ ]*[ ]*//' > tmpsubstfile2
change_include()
@@ -47,7 +50,7 @@ change_include()
sed -e '\#^....../include *"libxmlrpg/#{' \
-e 's///' \
-e 's/".*//' \
- -f tmpsubstfile \
+ -f tmpsubstfile2 \
-e 's#.*# /include libxmlrpg,&#' \
-e '}'
}
diff --git a/os400/make.sh b/os400/make.sh
index 864e72b2..95a35a28 100644
--- a/os400/make.sh
+++ b/os400/make.sh
@@ -42,7 +42,16 @@ do if [ -f "${TEXT}" ]
MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
if action_needed "${MEMBER}" "${TEXT}"
- then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}')"
+ then # Sources are in UTF-8.
+ rm -f "${TOPDIR}/tmpfile"[12]
+ CMD="CPY OBJ('${TEXT}') TOOBJ('${TOPDIR}/tmpfile1')"
+ CMD="${CMD} FROMCCSID(1208) TOCCSID(${TGTCCSID})"
+ CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
+ system "${CMD}"
+ # Make sure all lines are < 100 characters.
+ sed -e 's/.\{99\}/&\
+/g' -e 's/\n$//' "${TOPDIR}/tmpfile1" > "${TOPDIR}/tmpfile2"
+ CMD="CPY OBJ('${TOPDIR}/tmpfile2') TOOBJ('${MEMBER}')"
CMD="${CMD} TOCCSID(${TGTCCSID})"
CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
system "${CMD}"