Lines Matching full:val1
3650 * @val1: the first NodeSet or NULL
3653 * Merges two nodesets, all nodes from @val2 are added to @val1
3654 * if @val1 is NULL, a new set is created and copied from @val2
3656 * Returns @val1 once extended or NULL in case of error.
3659 xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
3663 if (val2 == NULL) return(val1);
3664 if (val1 == NULL) {
3665 val1 = xmlXPathNodeSetCreate(NULL);
3666 if (val1 == NULL)
3681 val1 = xmlXPathNodeSetCreateSize(val2->nodeNr);
3682 if (val1 == NULL)
3686 *(val1->nodeTab) = *(val2->nodeTab);
3688 memcpy(val1->nodeTab, val2->nodeTab,
3691 val1->nodeNr = val2->nodeNr;
3693 return(val1);
3698 initNr = val1->nodeNr;
3707 n1 = val1->nodeTab[j];
3728 if (val1->nodeMax == 0) {
3729 val1->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
3731 if (val1->nodeTab == NULL) {
3735 memset(val1->nodeTab, 0 ,
3737 val1->nodeMax = XML_NODESET_DEFAULT;
3738 } else if (val1->nodeNr == val1->nodeMax) {
3741 val1->nodeMax *= 2;
3742 val1->nodeTab, val1->nodeMax *
3748 val1->nodeTab = temp;
3753 val1->nodeTab[val1->nodeNr++] =
3756 val1->nodeTab[val1->nodeNr++] = n2;
3759 return(val1);
3765 * @val1: the first NodeSet or NULL
3768 * Merges two nodesets, all nodes from @val2 are added to @val1
3769 * if @val1 is NULL, a new set is created and copied from @val2
3771 * Returns @val1 once extended or NULL in case of error.
3774 xmlXPathNodeSetMergeUnique(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
3777 if (val2 == NULL) return(val1);
3778 if (val1 == NULL) {
3779 val1 = xmlXPathNodeSetCreate(NULL);
3781 if (val1 == NULL)
3790 if (val1->nodeMax == 0) {
3791 val1->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
3793 if (val1->nodeTab == NULL) {
3797 memset(val1->nodeTab, 0 ,
3799 val1->nodeMax = XML_NODESET_DEFAULT;
3800 } else if (val1->nodeNr == val1->nodeMax) {
3803 val1->nodeMax *= 2;
3804 temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax *
3810 val1->nodeTab = temp;
3815 val1->nodeTab[val1->nodeNr++] =
3818 val1->nodeTab[val1->nodeNr++] = val2->nodeTab[i];
3821 return(val1);
6471 double val1;
6511 val1 = xmlXPathCastNodeToNumber(ns1->nodeTab[i]);
6512 if (xmlXPathIsNaN(val1))
6521 ret = (val1 < values2[j]);
6523 ret = (val1 <= values2[j]);
6525 ret = (val1 > values2[j]);
6527 ret = (val1 >= values2[j]);