[libxml2] os400: use like() for double type.



commit ae0b22409006acc643f989c019fcd426227b5b4c
Author: Patrick Monnerat <pm datasphere ch>
Date:   Wed Apr 1 19:35:39 2015 +0200

    os400: use like() for double type.

 os400/libxmlrpg/globals.rpgle        |   10 ++++----
 os400/libxmlrpg/xmlTypesC.rpgle      |    2 +
 os400/libxmlrpg/xpath.rpgle          |   35 +++++++++++++++++++++------------
 os400/libxmlrpg/xpathInternals.rpgle |    8 ++++--
 4 files changed, 34 insertions(+), 21 deletions(-)
---
diff --git a/os400/libxmlrpg/globals.rpgle b/os400/libxmlrpg/globals.rpgle
index 78f4bea..3fe3a9b 100644
--- a/os400/libxmlrpg/globals.rpgle
+++ b/os400/libxmlrpg/globals.rpgle
@@ -305,7 +305,7 @@
      d                 pr                  extproc('__set_xmlDoValidity+
      d                                       CheckingDefaultValue')
      d  value                              value like(xmlCint)
-    
+
      d xmlThrDefDoValidityCheckingDefaultValue...
      d                 pr                  extproc('xmlThrDefDoValidity+
      d                                       CheckingDefaultValue')
@@ -331,7 +331,7 @@
      d xmlStructuredError...
      d                 pr                  extproc('__call_xmlStructuredError')
      d  userData                       *   value options(*string)               void *
-     d  error                              value like(xmlErrorPtr) 
+     d  error                              value like(xmlErrorPtr)
 
      d get_xmlGenericErrorContext...
      d                 pr                  extproc(
@@ -388,19 +388,19 @@
      d set_xmlTreeIndentString...
      d                 pr                  extproc('__set_xmlTreeIndentString')
      d  value                          *   value options(*string)               const char *
- 
+
      d xmlThrDefTreeIndentString...
      d                 pr              *   extproc('xmlThrDefTreeIndentString') const char *
      d  v                              *   value options(*string)               const char *
 
      d get_xmlKeepBlanksDefaultValue...
      d                 pr                  extproc(
-     d                                       '__get_xmlKeepBlanksDefaultValue') 
+     d                                       '__get_xmlKeepBlanksDefaultValue')
      d                                     like(xmlCint)
 
      d set_xmlKeepBlanksDefaultValue...
      d                 pr                  extproc(
-     d                                       '__set_xmlKeepBlanksDefaultValue') 
+     d                                       '__set_xmlKeepBlanksDefaultValue')
      d  value                              value like(xmlCint)
 
      d xmlThrDefKeepBlanksDefaultValue...
diff --git a/os400/libxmlrpg/xmlTypesC.rpgle b/os400/libxmlrpg/xmlTypesC.rpgle
index 798d74d..48a23bf 100644
--- a/os400/libxmlrpg/xmlTypesC.rpgle
+++ b/os400/libxmlrpg/xmlTypesC.rpgle
@@ -20,5 +20,7 @@
      d xmlCenum        s             10i 0 based(######typedef######)
      d xmlCssize_t     s             10i 0 based(######typedef######)
      d xmlCsize_t      s             10u 0 based(######typedef######)
+     d xmlCfloat       s              4f   based(######typedef######)
+     d xmlCdouble      s              8f   based(######typedef######)
 
       /endif
diff --git a/os400/libxmlrpg/xpath.rpgle b/os400/libxmlrpg/xpath.rpgle
index 5001e5e..6e591ee 100644
--- a/os400/libxmlrpg/xpath.rpgle
+++ b/os400/libxmlrpg/xpath.rpgle
@@ -134,7 +134,7 @@
      d  type                               like(xmlXPathObjectType)
      d  nodesetval                         like(xmlNodeSetPtr)
      d  boolval                            like(xmlCint)
-     d  floatval                      8f
+     d  floatval                           like(xmlCdouble)
      d  stringval                      *                                        xmlChar *
      d  user                           *                                        void *
      d  index                              like(xmlCint)
@@ -420,9 +420,14 @@
 
       * Objects and Nodesets handling
 
-     d xmlXPathNAN     s              8f   import('xmlXPathNAN')
-     d xmlXPathPINF    s              8f   import('xmlXPathPINF')
-     d xmlXPathNINF    s              8f   import('xmlXPathNINF')
+     d xmlXPathNAN     s                   import('xmlXPathNAN')
+     d                                     like(xmlCdouble)
+
+     d xmlXPathPINF    s                   import('xmlXPathPINF')
+     d                                     like(xmlCdouble)
+
+     d xmlXPathNINF    s                   import('xmlXPathNINF')
+     d                                     like(xmlCdouble)
 
      d xmlXPathFreeObject...
      d                 pr                  extproc('xmlXPathFreeObject')
@@ -458,7 +463,7 @@
      d                 pr                  extproc(
      d                                      'xmlXPathCastNumberToBoolean')
      d                                     like(xmlCint)
-     d val                            8f   value
+     d val                                 value like(xmlCdouble)
 
      d xmlXPathCastStringToBoolean...
      d                 pr                  extproc(
@@ -480,24 +485,28 @@
      d xmlXPathCastBooleanToNumber...
      d                 pr                  extproc(
      d                                      'xmlXPathCastBooleanToNumber')
-     d                                8f
+     d                                     like(xmlCdouble)
      d val                                 value like(xmlCint)
 
      d xmlXPathCastStringToNumber...
-     d                 pr             8f   extproc('xmlXPathCastStringToNumber')
+     d                 pr                  extproc('xmlXPathCastStringToNumber')
+     d                                     like(xmlCdouble)
      d val                             *   value options(*string)               const xmlChar *
 
      d xmlXPathCastNodeToNumber...
-     d                 pr             8f   extproc('xmlXPathCastNodeToNumber')
+     d                 pr                  extproc('xmlXPathCastNodeToNumber')
+     d                                     like(xmlCdouble)
      d node                                value like(xmlNodePtr)
 
      d xmlXPathCastNodeSetToNumber...
-     d                 pr             8f   extproc(
+     d                 pr                  extproc(
      d                                      'xmlXPathCastNodeSetToNumber')
+     d                                     like(xmlCdouble)
      d ns                                  value like(xmlNodeSetPtr)
 
      d xmlXPathCastToNumber...
-     d                 pr             8f   extproc('xmlXPathCastToNumber')
+     d                 pr                  extproc('xmlXPathCastToNumber')
+     d                                     like(xmlCdouble)
      d val                                 value like(xmlXPathObjectPtr)
 
      d xmlXPathCastBooleanToString...
@@ -507,7 +516,7 @@
 
      d xmlXPathCastNumberToString...
      d                 pr              *   extproc('xmlXPathCastNumberToString')xmlChar *
-     d val                            8f   value
+     d val                                 value like(xmlCdouble)
 
      d xmlXPathCastNodeToString...
      d                 pr              *   extproc('xmlXPathCastNodeToString')  xmlChar *
@@ -635,11 +644,11 @@
 
      d xmlXPathIsNaN   pr                  extproc('xmlXPathIsNaN')
      d                                     like(xmlCint)
-     d val                            8f   value
+     d val                                 value like(xmlCdouble)
 
      d xmlXPathIsInf   pr                  extproc('xmlXPathIsInf')
      d                                     like(xmlCint)
-     d val                            8f   value
+     d val                                 value like(xmlCdouble)
 
       /undefine XML_TESTVAL
       /endif
diff --git a/os400/libxmlrpg/xpathInternals.rpgle b/os400/libxmlrpg/xpathInternals.rpgle
index 3ea9642..a6d12e1 100644
--- a/os400/libxmlrpg/xpathInternals.rpgle
+++ b/os400/libxmlrpg/xpathInternals.rpgle
@@ -32,7 +32,8 @@
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathPopNumber...
-     d                 pr             8f   extproc('xmlXPathPopNumber')
+     d                 pr                  extproc('xmlXPathPopNumber')
+     d                                     like(xmlCdouble)
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathPopString...
@@ -311,7 +312,7 @@
      d xmlXPathNewFloat...
      d                 pr                  extproc('xmlXPathNewFloat')
      d                                     like(xmlXPathObjectPtr)
-     d  val                           8f   value
+     d  val                                value like(xmlCdouble)
 
      d xmlXPathNewBoolean...
      d                 pr                  extproc('xmlXPathNewBoolean')
@@ -369,7 +370,8 @@
       * Existing functions.
 
      d xmlXPathStringEvalNumber...
-     d                 pr             8f   extproc('xmlXPathStringEvalNumber')
+     d                 pr                  extproc('xmlXPathStringEvalNumber')
+     d                                     like(xmlCdouble)
      d  str                            *   value options(*string)               const xmlChar *
 
      d xmlXPathEvaluatePredicateResult...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]