aboutsummaryrefslogtreecommitdiffstats
path: root/os400
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2014-05-06 13:39:40 +0200
committerDaniel Veillard <veillard@redhat.com>2014-10-04 21:13:48 +0800
commit5378ff9378833f9aac764c1d296cf8f16179ecf5 (patch)
tree2b5bb605724a1e19b47cc96bafdf23f33d1253cf /os400
parentbce6a61e68eca99575d4720a9b524ecbc30b04b1 (diff)
downloadandroid_external_libxml2-5378ff9378833f9aac764c1d296cf8f16179ecf5.tar.gz
android_external_libxml2-5378ff9378833f9aac764c1d296cf8f16179ecf5.tar.bz2
android_external_libxml2-5378ff9378833f9aac764c1d296cf8f16179ecf5.zip
OS400: Add some more C macros equivalent procedures.
Diffstat (limited to 'os400')
-rw-r--r--os400/libxmlrpg/HTMLparser.rpgle16
-rw-r--r--os400/libxmlrpg/xpath.rpgle8
-rw-r--r--os400/rpgsupport.c38
-rw-r--r--os400/rpgsupport.h9
4 files changed, 63 insertions, 8 deletions
diff --git a/os400/libxmlrpg/HTMLparser.rpgle b/os400/libxmlrpg/HTMLparser.rpgle
index 6290b333..7b4a6269 100644
--- a/os400/libxmlrpg/HTMLparser.rpgle
+++ b/os400/libxmlrpg/HTMLparser.rpgle
@@ -383,5 +383,21 @@
d #param1 value like(htmlNodePtr)
d #param2 10i 0 value
+ * C macros implemented as procedures for ILE/RPG support.
+
+ d htmlDefaultSubelement...
+ d pr * extproc('__htmlDefaultSubelement') const char *
+ d elt * value const htmlElemDesc *
+
+ d htmlElementAllowedHereDesc...
+ d pr 10i 0 extproc(
+ d '__htmlElementAllowedHereDesc')
+ d parent * value const htmlElemDesc *
+ d elt * value const htmlElemDesc *
+
+ d htmlRequiredAttrs...
+ d pr * extproc('__htmlRequiredAttrs') const char * *
+ d elt * value const htmlElemDesc *
+
/endif LIBXML_HTML_ENABLED
/endif HTML_PARSER_H__
diff --git a/os400/libxmlrpg/xpath.rpgle b/os400/libxmlrpg/xpath.rpgle
index a31a4acb..3f3be326 100644
--- a/os400/libxmlrpg/xpath.rpgle
+++ b/os400/libxmlrpg/xpath.rpgle
@@ -628,20 +628,20 @@
/undefine XML_TESTVAL
/endif
- *
+
* C macros implemented as procedures for ILE/RPG support.
- *
+
/if defined(LIBXML_XPATH_ENABLED)
d xmlXPathNodeSetGetLength...
d pr 10i 0 extproc('__xmlXPathNodeSetGetLength')
d ns value like(xmlNodeSetPtr)
- *
+
d xmlXPathNodeSetItem...
d pr extproc('__xmlXPathNodeSetItem')
d like(xmlNodePtr)
d ns value like(xmlNodeSetPtr)
d index 10i 0 value
- *
+
d xmlXPathNodeSetIsEmpty...
d pr 10i 0 extproc('__xmlXPathNodeSetIsEmpty')
d ns value like(xmlNodeSetPtr)
diff --git a/os400/rpgsupport.c b/os400/rpgsupport.c
index a5454831..a3609c02 100644
--- a/os400/rpgsupport.c
+++ b/os400/rpgsupport.c
@@ -13,12 +13,13 @@
#include "libxml/xmlmemory.h"
#include "libxml/xpath.h"
#include "libxml/parser.h"
+#include "libxml/HTMLparser.h"
#include "rpgsupport.h"
/**
-*** ILE/RPG cannot directly derefence a pointer value an has no macros.
+*** ILE/RPG cannot directly derefence a pointer and has no macros.
*** The following additional procedures supply these functions.
*** In addition, the following code is adjusted for threads control at
*** compile time via the C macros.
@@ -215,7 +216,7 @@ __xmlVaEnd(char * * list)
#ifdef LIBXML_XPATH_ENABLED
int
-__xmlXPathNodeSetGetLength(xmlNodeSetPtr ns)
+__xmlXPathNodeSetGetLength(const xmlNodeSet * ns)
{
return xmlXPathNodeSetGetLength(ns);
@@ -223,7 +224,7 @@ __xmlXPathNodeSetGetLength(xmlNodeSetPtr ns)
xmlNodePtr
-__xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index)
+__xmlXPathNodeSetItem(const xmlNodeSet * ns, int index)
{
return xmlXPathNodeSetItem(ns, index);
@@ -231,10 +232,39 @@ __xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index)
int
-__xmlXPathNodeSetIsEmpty(xmlNodeSetPtr ns)
+__xmlXPathNodeSetIsEmpty(const xmlNodeSet * ns)
{
return xmlXPathNodeSetIsEmpty(ns);
}
#endif
+
+
+#ifdef LIBXML_HTML_ENABLED
+
+const char *
+__htmlDefaultSubelement(const htmlElemDesc * elt)
+
+{
+ return htmlDefaultSubelement(elt);
+}
+
+
+int
+__htmlElementAllowedHereDesc(const htmlElemDesc * parent,
+ const htmlElemDesc * elt)
+
+{
+ return htmlElementAllowedHereDesc(parent, elt);
+}
+
+
+const char * *
+__htmlRequiredAttrs(const htmlElemDesc * elt)
+
+{
+ return htmlRequiredAttrs(elt);
+}
+
+#endif
diff --git a/os400/rpgsupport.h b/os400/rpgsupport.h
index 20752f51..6725b599 100644
--- a/os400/rpgsupport.h
+++ b/os400/rpgsupport.h
@@ -13,6 +13,7 @@
#include <libxml/xmlmemory.h>
#include <libxml/xpath.h>
+#include "libxml/HTMLparser.h"
XMLPUBFUN xmlFreeFunc __get_xmlFree(void);
@@ -145,4 +146,12 @@ XMLPUBFUN xmlNodePtr __xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index);
XMLPUBFUN int __xmlXPathNodeSetIsEmpty(xmlNodeSetPtr ns);
#endif
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN const char * __htmlDefaultSubelement(const htmlElemDesc * elt);
+XMLPUBFUN int __htmlElementAllowedHereDesc(const htmlElemDesc * parent,
+ const htmlElemDesc * elt);
+XMLPUBFUN const char * *
+ __htmlRequiredAttrs(const htmlElemDesc * elt);
+#endif
+
#endif