Lines Matching refs:cur
138 unsigned int cur; /* current position in the input */
221 static void xmlTextReaderFreeNode(xmlTextReaderPtr reader, xmlNodePtr cur);
222 static void xmlTextReaderFreeNodeList(xmlTextReaderPtr reader, xmlNodePtr cur);
281 * @cur: the node
286 xmlTextReaderFreeProp(xmlTextReaderPtr reader, xmlAttrPtr cur) {
293 if (cur == NULL) return;
296 xmlDeregisterNodeDefaultValue((xmlNodePtr) cur);
299 if ((cur->parent != NULL) && (cur->parent->doc != NULL) &&
300 ((cur->parent->doc->intSubset != NULL) ||
301 (cur->parent->doc->extSubset != NULL))) {
302 if (xmlIsID(cur->parent->doc, cur->parent, cur))
303 xmlTextReaderRemoveID(cur->parent->doc, cur);
305 if (cur->children != NULL)
306 xmlTextReaderFreeNodeList(reader, cur->children);
308 DICT_FREE(cur->name);
311 cur->next = reader->ctxt->freeAttrs;
312 reader->ctxt->freeAttrs = cur;
315 xmlFree(cur);
322 * @cur: the first property in the list
327 xmlTextReaderFreePropList(xmlTextReaderPtr reader, xmlAttrPtr cur) {
330 while (cur != NULL) {
331 next = cur->next;
332 xmlTextReaderFreeProp(reader, cur);
333 cur = next;
340 * @cur: the first node in the list
346 xmlTextReaderFreeNodeList(xmlTextReaderPtr reader, xmlNodePtr cur) {
354 if (cur == NULL) return;
355 if (cur->type == XML_NAMESPACE_DECL) {
356 xmlFreeNsList((xmlNsPtr) cur);
359 if ((cur->type == XML_DOCUMENT_NODE) ||
360 (cur->type == XML_HTML_DOCUMENT_NODE)) {
361 xmlFreeDoc((xmlDocPtr) cur);
364 while (cur != NULL) {
365 next = cur->next;
367 if (cur->type != XML_DTD_NODE) {
369 if ((cur->children != NULL) &&
370 (cur->type != XML_ENTITY_REF_NODE)) {
371 if (cur->children->parent == cur)
372 xmlTextReaderFreeNodeList(reader, cur->children);
373 cur->children = NULL;
377 xmlDeregisterNodeDefaultValue(cur);
379 if (((cur->type == XML_ELEMENT_NODE) ||
380 (cur->type == XML_XINCLUDE_START) ||
381 (cur->type == XML_XINCLUDE_END)) &&
382 (cur->properties != NULL))
383 xmlTextReaderFreePropList(reader, cur->properties);
384 if ((cur->content != (xmlChar *) &(cur->properties)) &&
385 (cur->type != XML_ELEMENT_NODE) &&
386 (cur->type != XML_XINCLUDE_START) &&
387 (cur->type != XML_XINCLUDE_END) &&
388 (cur->type != XML_ENTITY_REF_NODE)) {
389 DICT_FREE(cur->content);
391 if (((cur->type == XML_ELEMENT_NODE) ||
392 (cur->type == XML_XINCLUDE_START) ||
393 (cur->type == XML_XINCLUDE_END)) &&
394 (cur->nsDef != NULL))
395 xmlFreeNsList(cur->nsDef);
400 if ((cur->type != XML_TEXT_NODE) &&
401 (cur->type != XML_COMMENT_NODE))
402 DICT_FREE(cur->name);
403 if (((cur->type == XML_ELEMENT_NODE) ||
404 (cur->type == XML_TEXT_NODE)) &&
407 cur->next = reader->ctxt->freeElems;
408 reader->ctxt->freeElems = cur;
411 xmlFree(cur);
414 cur = next;
421 * @cur: the node
427 xmlTextReaderFreeNode(xmlTextReaderPtr reader, xmlNodePtr cur) {
434 if (cur->type == XML_DTD_NODE) {
435 xmlFreeDtd((xmlDtdPtr) cur);
438 if (cur->type == XML_NAMESPACE_DECL) {
439 xmlFreeNs((xmlNsPtr) cur);
442 if (cur->type == XML_ATTRIBUTE_NODE) {
443 xmlTextReaderFreeProp(reader, (xmlAttrPtr) cur);
447 if ((cur->children != NULL) &&
448 (cur->type != XML_ENTITY_REF_NODE)) {
449 if (cur->children->parent == cur)
450 xmlTextReaderFreeNodeList(reader, cur->children);
451 cur->children = NULL;
455 xmlDeregisterNodeDefaultValue(cur);
457 if (((cur->type == XML_ELEMENT_NODE) ||
458 (cur->type == XML_XINCLUDE_START) ||
459 (cur->type == XML_XINCLUDE_END)) &&
460 (cur->properties != NULL))
461 xmlTextReaderFreePropList(reader, cur->properties);
462 if ((cur->content != (xmlChar *) &(cur->properties)) &&
463 (cur->type != XML_ELEMENT_NODE) &&
464 (cur->type != XML_XINCLUDE_START) &&
465 (cur->type != XML_XINCLUDE_END) &&
466 (cur->type != XML_ENTITY_REF_NODE)) {
467 DICT_FREE(cur->content);
469 if (((cur->type == XML_ELEMENT_NODE) ||
470 (cur->type == XML_XINCLUDE_START) ||
471 (cur->type == XML_XINCLUDE_END)) &&
472 (cur->nsDef != NULL))
473 xmlFreeNsList(cur->nsDef);
478 if ((cur->type != XML_TEXT_NODE) &&
479 (cur->type != XML_COMMENT_NODE))
480 DICT_FREE(cur->name);
482 if (((cur->type == XML_ELEMENT_NODE) ||
483 (cur->type == XML_TEXT_NODE)) &&
486 cur->next = reader->ctxt->freeElems;
487 reader->ctxt->freeElems = cur;
490 xmlFree(cur);
508 * @cur: pointer to the document
513 xmlTextReaderFreeDoc(xmlTextReaderPtr reader, xmlDocPtr cur) {
516 if (cur == NULL) return;
519 xmlDeregisterNodeDefaultValue((xmlNodePtr) cur);
524 if (cur->ids != NULL) xmlTextReaderFreeIDTable((xmlIDTablePtr) cur->ids);
525 cur->ids = NULL;
526 if (cur->refs != NULL) xmlFreeRefTable((xmlRefTablePtr) cur->refs);
527 cur->refs = NULL;
528 extSubset = cur->extSubset;
529 intSubset = cur->intSubset;
533 xmlUnlinkNode((xmlNodePtr) cur->extSubset);
534 cur->extSubset = NULL;
538 xmlUnlinkNode((xmlNodePtr) cur->intSubset);
539 cur->intSubset = NULL;
543 if (cur->children != NULL) xmlTextReaderFreeNodeList(reader, cur->children);
545 if (cur->version != NULL) xmlFree((char *) cur->version);
546 if (cur->name != NULL) xmlFree((char *) cur->name);
547 if (cur->encoding != NULL) xmlFree((char *) cur->encoding);
548 if (cur->oldNs != NULL) xmlFreeNsList(cur->oldNs);
549 if (cur->URL != NULL) xmlFree((char *) cur->URL);
550 if (cur->dict != NULL) xmlDictFree(cur->dict);
552 xmlFree(cur);
574 fprintf(stderr, " input: base %d, cur %d, depth %d: ",
575 reader->base, reader->cur, reader->ctxt->nodeNr);
581 &reader->input->buffer->content[reader->cur]);
670 (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
671 (ctxt->input->cur[1] == '>'))
735 (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
736 (ctxt->input->cur[1] == '>'))
839 if (xmlBufUse(inbuf) < reader->cur + CHUNK_SIZE) {
847 if (xmlBufUse(inbuf) == reader->cur) {
870 if (xmlBufUse(inbuf) >= reader->cur + CHUNK_SIZE) {
872 (const char *) xmlBufContent(inbuf) + reader->cur,
874 reader->cur += CHUNK_SIZE;
880 s = xmlBufUse(inbuf) - reader->cur;
882 (const char *) xmlBufContent(inbuf) + reader->cur,
884 reader->cur += s;
896 if ((reader->cur >= 4096) &&
897 (xmlBufUse(inbuf) - reader->cur <= CHUNK_SIZE)) {
898 val = xmlBufShrink(inbuf, reader->cur);
900 reader->cur -= val;
912 s = xmlBufUse(inbuf) - reader->cur;
914 (const char *) xmlBufContent(inbuf) + reader->cur,
916 reader->cur = xmlBufUse(inbuf);
1175 * @cur: the current node
1182 xmlTextReaderGetSuccessor(xmlNodePtr cur) {
1183 if (cur == NULL) return(NULL) ; /* ERROR */
1184 if (cur->next != NULL) return(cur->next) ;
1186 cur = cur->parent;
1187 if (cur == NULL) break;
1188 if (cur->next != NULL) return(cur->next);
1189 } while (cur != NULL);
1190 return(cur);
1666 xmlNodePtr cur;
1672 cur = reader->node;
1673 if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE))
1677 if (cur->extra & NODE_IS_EMPTY)
1683 } while (reader->node != cur);
2140 ret->cur = 4;
2144 ret->cur = 0;
2339 xmlAttrPtr cur;
2359 cur = reader->node->properties;
2360 if (cur == NULL)
2363 cur = cur->next;
2364 if (cur == NULL)
2369 ret = xmlNodeListGetString(reader->node->doc, cur->children, 1);
2583 xmlAttrPtr cur;
2605 cur = reader->node->properties;
2606 if (cur == NULL)
2609 cur = cur->next;
2610 if (cur == NULL)
2615 reader->curnode = (xmlNodePtr) cur;
3947 xmlNodePtr cur, parent;
3953 cur = reader->curnode;
3955 cur = reader->node;
3956 if (cur == NULL)
3959 if ((cur->type != XML_DOCUMENT_NODE) && (cur->type != XML_DTD_NODE)) {
3960 cur->extra |= NODE_IS_PRESERVED;
3961 cur->extra |= NODE_IS_SPRESERVED;
3965 parent = cur->parent;;
3971 return(cur);
5202 reader->cur = 4;
5207 reader->cur = 0;
5232 reader->cur = 0;
5361 ret->cur = 0;
5371 * @cur: a pointer to a zero terminated string
5382 xmlReaderForDoc(const xmlChar * cur, const char *URL, const char *encoding,
5387 if (cur == NULL)
5389 len = xmlStrlen(cur);
5392 ((const char *) cur, len, URL, encoding, options));
5563 reader->cur = 0;
5579 * @cur: a pointer to a zero terminated string
5591 xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar * cur,
5597 if (cur == NULL)
5602 len = xmlStrlen(cur);
5603 return (xmlReaderNewMemory(reader, (const char *)cur, len,
5780 unsigned char cur; /* the current value read from in[] */
5786 int is_ignore; /* cur should be ignored */
5807 cur = in[incur++];
5809 if ((cur >= 'A') && (cur <= 'Z'))
5810 cur = cur - 'A';
5811 else if ((cur >= 'a') && (cur <= 'z'))
5812 cur = cur - 'a' + 26;
5813 else if ((cur >= '0') && (cur <= '9'))
5814 cur = cur - '0' + 52;
5815 else if (cur == '+')
5816 cur = 62;
5817 else if (cur == '/')
5818 cur = 63;
5819 else if (cur == '.')
5820 cur = 0;
5821 else if (cur == '=') /*no op , end of the base64 stream */
5844 intmp[nbintmp++] = cur;