aboutsummaryrefslogtreecommitdiffstats
path: root/os400/rpgsupport.c
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2014-05-05 18:16:22 +0200
committerDaniel Veillard <veillard@redhat.com>2014-10-04 21:13:48 +0800
commit02fd12987418007568cd9bad12eef08a75fb134b (patch)
tree62d9e4b35d626f6fde6510d078ac45def28a53c3 /os400/rpgsupport.c
parent917e353f2b1f881bd80fe8905f13a728ee99848c (diff)
downloadandroid_external_libxml2-02fd12987418007568cd9bad12eef08a75fb134b.tar.gz
android_external_libxml2-02fd12987418007568cd9bad12eef08a75fb134b.tar.bz2
android_external_libxml2-02fd12987418007568cd9bad12eef08a75fb134b.zip
OS400: implement XPath macros as procedures for ILE/RPG support.
Diffstat (limited to 'os400/rpgsupport.c')
-rw-r--r--os400/rpgsupport.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/os400/rpgsupport.c b/os400/rpgsupport.c
index 189212b5..74f3859e 100644
--- a/os400/rpgsupport.c
+++ b/os400/rpgsupport.c
@@ -11,6 +11,7 @@
#include <stdarg.h>
#include "libxml/xmlmemory.h"
+#include "libxml/xpath.h"
#include "libxml/parser.h"
#include "rpgsupport.h"
@@ -204,8 +205,35 @@ __xmlVaArg(char * * list, void * dest, size_t argsize)
void
-_xmlVaEnd(char * * list)
+__xmlVaEnd(char * * list)
{
/* Nothing to do. */
}
+
+
+#ifdef LIBXML_XPATH_ENABLED
+int
+__xmlXPathNodeSetGetLength(xmlNodeSetPtr ns)
+
+{
+ return ns? ns->nodeNr: 0;
+}
+
+
+xmlNodePtr
+__xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index)
+
+{
+ return ns && index >= 0 && index < ns->nodeNr && ns->nodeTab?
+ ns->nodeTab[index]: 0;
+}
+
+
+int
+__xmlXPathNodeSetIsEmpty(xmlNodeSetPtr ns)
+
+{
+ return !ns || !ns->nodeNr || !ns->nodeTab;
+}
+#endif