Lines Matching refs:cur
106 ctxt->context->lastError.int1 = ctxt->cur - ctxt->base; in xmlXPtrErr()
116 ctxt->cur - ctxt->base, 0, in xmlXPtrErr()
127 xmlNodePtr xmlXPtrAdvanceNode(xmlNodePtr cur, int *level);
135 xmlXPtrGetArity(xmlNodePtr cur) { in xmlXPtrGetArity() argument
137 if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) in xmlXPtrGetArity()
139 cur = cur->children; in xmlXPtrGetArity()
140 for (i = 0;cur != NULL;cur = cur->next) { in xmlXPtrGetArity()
141 if ((cur->type == XML_ELEMENT_NODE) || in xmlXPtrGetArity()
142 (cur->type == XML_DOCUMENT_NODE) || in xmlXPtrGetArity()
143 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlXPtrGetArity()
158 xmlXPtrGetIndex(xmlNodePtr cur) { in xmlXPtrGetIndex() argument
160 if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) in xmlXPtrGetIndex()
162 for (i = 1;cur != NULL;cur = cur->prev) { in xmlXPtrGetIndex()
163 if ((cur->type == XML_ELEMENT_NODE) || in xmlXPtrGetIndex()
164 (cur->type == XML_DOCUMENT_NODE) || in xmlXPtrGetIndex()
165 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlXPtrGetIndex()
180 xmlXPtrGetNthChild(xmlNodePtr cur, int no) { in xmlXPtrGetNthChild() argument
182 if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) in xmlXPtrGetNthChild()
183 return(cur); in xmlXPtrGetNthChild()
184 cur = cur->children; in xmlXPtrGetNthChild()
185 for (i = 0;i <= no;cur = cur->next) { in xmlXPtrGetNthChild()
186 if (cur == NULL) in xmlXPtrGetNthChild()
187 return(cur); in xmlXPtrGetNthChild()
188 if ((cur->type == XML_ELEMENT_NODE) || in xmlXPtrGetNthChild()
189 (cur->type == XML_DOCUMENT_NODE) || in xmlXPtrGetNthChild()
190 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlXPtrGetNthChild()
196 return(cur); in xmlXPtrGetNthChild()
642 xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val) { in xmlXPtrLocationSetAdd() argument
645 if ((cur == NULL) || (val == NULL)) return; in xmlXPtrLocationSetAdd()
650 for (i = 0;i < cur->locNr;i++) { in xmlXPtrLocationSetAdd()
651 if (xmlXPtrRangesEqual(cur->locTab[i], val)) { in xmlXPtrLocationSetAdd()
660 if (cur->locMax == 0) { in xmlXPtrLocationSetAdd()
661 cur->locTab = (xmlXPathObjectPtr *) xmlMalloc(XML_RANGESET_DEFAULT * in xmlXPtrLocationSetAdd()
663 if (cur->locTab == NULL) { in xmlXPtrLocationSetAdd()
667 memset(cur->locTab, 0 , in xmlXPtrLocationSetAdd()
669 cur->locMax = XML_RANGESET_DEFAULT; in xmlXPtrLocationSetAdd()
670 } else if (cur->locNr == cur->locMax) { in xmlXPtrLocationSetAdd()
673 cur->locMax *= 2; in xmlXPtrLocationSetAdd()
674 temp = (xmlXPathObjectPtr *) xmlRealloc(cur->locTab, cur->locMax * in xmlXPtrLocationSetAdd()
680 cur->locTab = temp; in xmlXPtrLocationSetAdd()
682 cur->locTab[cur->locNr++] = val; in xmlXPtrLocationSetAdd()
720 xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val) { in xmlXPtrLocationSetDel() argument
723 if (cur == NULL) return; in xmlXPtrLocationSetDel()
729 for (i = 0;i < cur->locNr;i++) in xmlXPtrLocationSetDel()
730 if (cur->locTab[i] == val) break; in xmlXPtrLocationSetDel()
732 if (i >= cur->locNr) { in xmlXPtrLocationSetDel()
739 cur->locNr--; in xmlXPtrLocationSetDel()
740 for (;i < cur->locNr;i++) in xmlXPtrLocationSetDel()
741 cur->locTab[i] = cur->locTab[i + 1]; in xmlXPtrLocationSetDel()
742 cur->locTab[cur->locNr] = NULL; in xmlXPtrLocationSetDel()
753 xmlXPtrLocationSetRemove(xmlLocationSetPtr cur, int val) { in xmlXPtrLocationSetRemove() argument
754 if (cur == NULL) return; in xmlXPtrLocationSetRemove()
755 if (val >= cur->locNr) return; in xmlXPtrLocationSetRemove()
756 cur->locNr--; in xmlXPtrLocationSetRemove()
757 for (;val < cur->locNr;val++) in xmlXPtrLocationSetRemove()
758 cur->locTab[val] = cur->locTab[val + 1]; in xmlXPtrLocationSetRemove()
759 cur->locTab[cur->locNr] = NULL; in xmlXPtrLocationSetRemove()
901 #define CUR (*ctxt->cur)
902 #define SKIP(val) ctxt->cur += (val)
903 #define NXT(val) ctxt->cur[(val)]
904 #define CUR_PTR ctxt->cur
907 while (IS_BLANK_CH(*(ctxt->cur))) NEXT
909 #define CURRENT (*ctxt->cur)
910 #define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
922 xmlNodePtr cur = NULL; in xmlXPtrGetChildNo() local
934 cur = xmlXPtrGetNthChild(oldset->nodeTab[0], indx); in xmlXPtrGetChildNo()
935 if (cur == NULL) { in xmlXPtrGetChildNo()
940 oldset->nodeTab[0] = cur; in xmlXPtrGetChildNo()
980 xmlChar *buffer, *cur; in xmlXPtrEvalXPtrPart() local
994 len = xmlStrlen(ctxt->cur); in xmlXPtrEvalXPtrPart()
1002 cur = buffer; in xmlXPtrEvalXPtrPart()
1017 *cur++ = CUR; in xmlXPtrEvalXPtrPart()
1020 *cur = 0; in xmlXPtrEvalXPtrPart()
1085 value = xmlParseURI((const char *)ctxt->cur); in xmlXPtrEvalXPtrPart()
1440 xmlNodePtr start, cur, end; in xmlXPtrBuildRangeNodeList() local
1457 cur = start; in xmlXPtrBuildRangeNodeList()
1460 while (cur != NULL) { in xmlXPtrBuildRangeNodeList()
1461 if (cur == end) { in xmlXPtrBuildRangeNodeList()
1462 if (cur->type == XML_TEXT_NODE) { in xmlXPtrBuildRangeNodeList()
1463 const xmlChar *content = cur->content; in xmlXPtrBuildRangeNodeList()
1470 if ((cur == start) && (index1 > 1)) { in xmlXPtrBuildRangeNodeList()
1489 tmp = xmlCopyNode(cur, 0); in xmlXPtrBuildRangeNodeList()
1502 end = xmlXPtrGetNthChild(cur, index2 - 1); in xmlXPtrBuildRangeNodeList()
1505 if ((cur == start) && (index1 > 1)) { in xmlXPtrBuildRangeNodeList()
1506 cur = xmlXPtrGetNthChild(cur, index1 - 1); in xmlXPtrBuildRangeNodeList()
1509 cur = cur->children; in xmlXPtrBuildRangeNodeList()
1516 } else if ((cur == start) && in xmlXPtrBuildRangeNodeList()
1518 if ((cur->type == XML_TEXT_NODE) || in xmlXPtrBuildRangeNodeList()
1519 (cur->type == XML_CDATA_SECTION_NODE)) { in xmlXPtrBuildRangeNodeList()
1520 const xmlChar *content = cur->content; in xmlXPtrBuildRangeNodeList()
1532 if ((cur == start) && (index1 > 1)) { in xmlXPtrBuildRangeNodeList()
1533 tmp = xmlCopyNode(cur, 0); in xmlXPtrBuildRangeNodeList()
1537 cur = xmlXPtrGetNthChild(cur, index1 - 1); in xmlXPtrBuildRangeNodeList()
1544 tmp = xmlCopyNode(cur, 1); in xmlXPtrBuildRangeNodeList()
1551 switch (cur->type) { in xmlXPtrBuildRangeNodeList()
1570 tmp = xmlCopyNode(cur, 1); in xmlXPtrBuildRangeNodeList()
1593 cur = xmlXPtrAdvanceNode(cur, NULL); in xmlXPtrBuildRangeNodeList()
2250 const xmlChar *cur; in xmlXPtrRangeToFunction() local
2268 cur = ctxt->cur; in xmlXPtrRangeToFunction()
2272 ctxt->cur = cur; in xmlXPtrRangeToFunction()
2329 xmlXPtrAdvanceNode(xmlNodePtr cur, int *level) { in xmlXPtrAdvanceNode() argument
2331 if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) in xmlXPtrAdvanceNode()
2333 if (cur->children != NULL) { in xmlXPtrAdvanceNode()
2334 cur = cur->children ; in xmlXPtrAdvanceNode()
2340 if (cur->next != NULL) { in xmlXPtrAdvanceNode()
2341 cur = cur->next; in xmlXPtrAdvanceNode()
2345 cur = cur->parent; in xmlXPtrAdvanceNode()
2348 if (cur == NULL) return(NULL); in xmlXPtrAdvanceNode()
2349 if (cur->next != NULL) { in xmlXPtrAdvanceNode()
2350 cur = cur->next; in xmlXPtrAdvanceNode()
2353 } while (cur != NULL); in xmlXPtrAdvanceNode()
2356 if ((cur->type != XML_ELEMENT_NODE) && in xmlXPtrAdvanceNode()
2357 (cur->type != XML_TEXT_NODE) && in xmlXPtrAdvanceNode()
2358 (cur->type != XML_DOCUMENT_NODE) && in xmlXPtrAdvanceNode()
2359 (cur->type != XML_HTML_DOCUMENT_NODE) && in xmlXPtrAdvanceNode()
2360 (cur->type != XML_CDATA_SECTION_NODE)) { in xmlXPtrAdvanceNode()
2361 if (cur->type == XML_ENTITY_REF_NODE) { /* Shouldn't happen */ in xmlXPtrAdvanceNode()
2367 return(cur); in xmlXPtrAdvanceNode()
2382 xmlNodePtr cur; in xmlXPtrAdvanceChar() local
2388 cur = *node; in xmlXPtrAdvanceChar()
2389 if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) in xmlXPtrAdvanceChar()
2398 while ((cur != NULL) && in xmlXPtrAdvanceChar()
2399 ((cur->type == XML_ELEMENT_NODE) || in xmlXPtrAdvanceChar()
2400 (cur->type == XML_DOCUMENT_NODE) || in xmlXPtrAdvanceChar()
2401 (cur->type == XML_HTML_DOCUMENT_NODE))) { in xmlXPtrAdvanceChar()
2403 cur = xmlXPtrGetNthChild(cur, pos); in xmlXPtrAdvanceChar()
2406 cur = xmlXPtrAdvanceNode(cur, NULL); in xmlXPtrAdvanceChar()
2411 if (cur == NULL) { in xmlXPtrAdvanceChar()
2422 *node = cur; in xmlXPtrAdvanceChar()
2430 if ((cur->type != XML_ELEMENT_NODE) && in xmlXPtrAdvanceChar()
2431 (cur->content != NULL)) { in xmlXPtrAdvanceChar()
2432 len = xmlStrlen(cur->content); in xmlXPtrAdvanceChar()
2441 cur = xmlXPtrAdvanceNode(cur, NULL); in xmlXPtrAdvanceChar()
2445 *node = cur; in xmlXPtrAdvanceChar()
2472 xmlNodePtr cur; in xmlXPtrMatchString() local
2485 cur = start; in xmlXPtrMatchString()
2490 if ((cur == *end) && (pos + stringlen > *endindex)) in xmlXPtrMatchString()
2493 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xmlXPtrMatchString()
2494 len = xmlStrlen(cur->content); in xmlXPtrMatchString()
2496 match = (!xmlStrncmp(&cur->content[pos], string, stringlen)); in xmlXPtrMatchString()
2502 xmlDebugDumpString(stdout, cur->content); in xmlXPtrMatchString()
2505 *end = cur; in xmlXPtrMatchString()
2513 match = (!xmlStrncmp(&cur->content[pos], string, sub)); in xmlXPtrMatchString()
2519 xmlDebugDumpString(stdout, cur->content); in xmlXPtrMatchString()
2529 cur = xmlXPtrAdvanceNode(cur, NULL); in xmlXPtrMatchString()
2530 if (cur == NULL) in xmlXPtrMatchString()
2556 xmlNodePtr cur; in xmlXPtrSearchString() local
2569 cur = *start; in xmlXPtrSearchString()
2573 while (cur != NULL) { in xmlXPtrSearchString()
2574 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xmlXPtrSearchString()
2575 len = xmlStrlen(cur->content); in xmlXPtrSearchString()
2578 str = xmlStrchr(&cur->content[pos], first); in xmlXPtrSearchString()
2580 pos = (str - (xmlChar *)(cur->content)); in xmlXPtrSearchString()
2585 xmlDebugDumpString(stdout, cur->content); in xmlXPtrSearchString()
2588 if (xmlXPtrMatchString(string, cur, pos + 1, in xmlXPtrSearchString()
2590 *start = cur; in xmlXPtrSearchString()
2608 xmlDebugDumpString(stdout, cur->content); in xmlXPtrSearchString()
2611 *start = cur; in xmlXPtrSearchString()
2613 *end = cur; in xmlXPtrSearchString()
2619 if ((cur == *end) && (pos >= *endindex)) in xmlXPtrSearchString()
2621 cur = xmlXPtrAdvanceNode(cur, NULL); in xmlXPtrSearchString()
2622 if (cur == NULL) in xmlXPtrSearchString()
2640 xmlNodePtr cur; in xmlXPtrGetLastChar() local
2646 cur = *node; in xmlXPtrGetLastChar()
2649 if ((cur->type == XML_ELEMENT_NODE) || in xmlXPtrGetLastChar()
2650 (cur->type == XML_DOCUMENT_NODE) || in xmlXPtrGetLastChar()
2651 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlXPtrGetLastChar()
2653 cur = xmlXPtrGetNthChild(cur, pos); in xmlXPtrGetLastChar()
2656 while (cur != NULL) { in xmlXPtrGetLastChar()
2657 if (cur->last != NULL) in xmlXPtrGetLastChar()
2658 cur = cur->last; in xmlXPtrGetLastChar()
2659 else if ((cur->type != XML_ELEMENT_NODE) && in xmlXPtrGetLastChar()
2660 (cur->content != NULL)) { in xmlXPtrGetLastChar()
2661 len = xmlStrlen(cur->content); in xmlXPtrGetLastChar()
2667 if (cur == NULL) in xmlXPtrGetLastChar()
2669 *node = cur; in xmlXPtrGetLastChar()
2929 const xmlChar *cur; in xmlXPtrEvalRangePredicate() local
2969 cur = ctxt->cur; in xmlXPtrEvalRangePredicate()
2973 ctxt->cur = cur; in xmlXPtrEvalRangePredicate()