Lines Matching refs:ctxt

103  * @ctxt:  an XML parser context
109 xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
111 if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
112 (ctxt->instate == XML_PARSER_EOF))
114 if (ctxt != NULL) {
115 ctxt->errNo = XML_ERR_NO_MEMORY;
116 ctxt->instate = XML_PARSER_EOF;
117 ctxt->disableSAX = 1;
120 __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
125 __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
132 * @ctxt: an XML parser context
141 __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
144 if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
145 (ctxt->instate == XML_PARSER_EOF))
147 if (ctxt != NULL)
148 ctxt->errNo = xmlerr;
150 ctxt, NULL, XML_FROM_PARSER, xmlerr, XML_ERR_FATAL,
153 if (ctxt != NULL) {
154 ctxt->wellFormed = 0;
155 if (ctxt->recovery == 0)
156 ctxt->disableSAX = 1;
162 * @ctxt: an XML parser context
169 xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str)
171 if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
172 (ctxt->instate == XML_PARSER_EOF))
174 if (ctxt != NULL)
175 ctxt->errNo = XML_ERR_INTERNAL_ERROR;
177 ctxt, NULL, XML_FROM_PARSER, XML_ERR_INTERNAL_ERROR,
180 if (ctxt != NULL) {
181 ctxt->wellFormed = 0;
182 if (ctxt->recovery == 0)
183 ctxt->disableSAX = 1;
189 * @ctxt: an XML parser context
197 xmlErrEncodingInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
200 if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
201 (ctxt->instate == XML_PARSER_EOF))
203 if (ctxt != NULL)
204 ctxt->errNo = error;
206 ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_FATAL,
208 if (ctxt != NULL) {
209 ctxt->wellFormed = 0;
210 if (ctxt->recovery == 0)
211 ctxt->disableSAX = 1;
413 * @ctxt: the XML parser context
419 xmlNextChar(xmlParserCtxtPtr ctxt)
421 if ((ctxt == NULL) || (ctxt->instate == XML_PARSER_EOF) ||
422 (ctxt->input == NULL))
425 if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
426 if ((*ctxt->input->cur == 0) &&
427 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0) &&
428 (ctxt->instate != XML_PARSER_COMMENT)) {
435 xmlPopInput(ctxt);
446 if (*(ctxt->input->cur) == '\n') {
447 ctxt->input->line++; ctxt->input->col = 1;
449 ctxt->input->col++;
462 cur = ctxt->input->cur;
469 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
470 cur = ctxt->input->cur;
478 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
479 cur = ctxt->input->cur;
485 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
486 cur = ctxt->input->cur;
492 ctxt->input->cur += 4;
499 ctxt->input->cur += 3;
507 xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
513 ctxt->input->cur += 2;
516 ctxt->input->cur++;
518 ctxt->nbChars++;
519 if (*ctxt->input->cur == 0)
520 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
529 if (*(ctxt->input->cur) == '\n') {
530 ctxt->input->line++; ctxt->input->col = 1;
532 ctxt->input->col++;
533 ctxt->input->cur++;
534 ctxt->nbChars++;
535 if (*ctxt->input->cur == 0)
536 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
538 if ((*ctxt->input->cur == '%') && (!ctxt->html))
539 xmlParserHandlePEReference(ctxt);
540 if ((*ctxt->input->cur == 0) &&
541 (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
542 xmlPopInput(ctxt);
552 if ((ctxt == NULL) || (ctxt->input == NULL) ||
553 (ctxt->input->end - ctxt->input->cur < 4)) {
554 __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
561 ctxt->input->cur[0], ctxt->input->cur[1],
562 ctxt->input->cur[2], ctxt->input->cur[3]);
563 __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
567 ctxt->charset = XML_CHAR_ENCODING_8859_1;
568 ctxt->input->cur++;
574 * @ctxt: the XML parser context
591 xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
592 if ((ctxt == NULL) || (len == NULL) || (ctxt->input == NULL)) return(0);
593 if (ctxt->instate == XML_PARSER_EOF)
596 if ((*ctxt->input->cur >= 0x20) && (*ctxt->input->cur <= 0x7F)) {
598 return((int) *ctxt->input->cur);
600 if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
612 const unsigned char *cur = ctxt->input->cur;
621 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
622 cur = ctxt->input->cur;
628 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
629 cur = ctxt->input->cur;
635 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
636 cur = ctxt->input->cur;
667 xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
674 if (*ctxt->input->cur == 0)
675 xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
676 if ((*ctxt->input->cur == 0) &&
677 (ctxt->input->end > ctxt->input->cur)) {
678 xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
681 if (*ctxt->input->cur == 0xD) {
682 if (ctxt->input->cur[1] == 0xA) {
683 ctxt->nbChars++;
684 ctxt->input->cur++;
688 return((int) *ctxt->input->cur);
697 if (*ctxt->input->cur == 0xD) {
698 if (ctxt->input->cur[1] == 0xA) {
699 ctxt->nbChars++;
700 ctxt->input->cur++;
704 return((int) *ctxt->input->cur);
711 if (ctxt->input->end - ctxt->input->cur < 4) {
727 ctxt->input->cur[0], ctxt->input->cur[1],
728 ctxt->input->cur[2], ctxt->input->cur[3]);
729 __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
733 ctxt->charset = XML_CHAR_ENCODING_8859_1;
735 return((int) *ctxt->input->cur);
740 * @ctxt: the XML parser context
751 xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar * cur, int *len)
754 if ((ctxt == NULL) || (ctxt->charset == XML_CHAR_ENCODING_UTF8)) {
800 xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
824 if ((ctxt == NULL) || (ctxt->input == NULL) ||
825 (ctxt->input->end - ctxt->input->cur < 4)) {
840 ctxt->input->cur[0], ctxt->input->cur[1],
841 ctxt->input->cur[2], ctxt->input->cur[3]);
842 __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
920 xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
923 xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
927 * @ctxt: the parser context
936 xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
941 if (ctxt == NULL) return(-1);
944 __xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
949 ctxt->charset = XML_CHAR_ENCODING_UTF8;
953 ctxt->charset = XML_CHAR_ENCODING_UTF8;
960 if ((ctxt->input != NULL) &&
961 (ctxt->input->cur[0] == 0xEF) &&
962 (ctxt->input->cur[1] == 0xBB) &&
963 (ctxt->input->cur[2] == 0xBF)) {
964 ctxt->input->cur += 3;
972 *ctxt->input->cur to contain UTF-8 encoded characters.
977 if ((ctxt->input != NULL) && (ctxt->input->cur != NULL) &&
978 (ctxt->input->cur[0] == 0xEF) &&
979 (ctxt->input->cur[1] == 0xBB) &&
980 (ctxt->input->cur[2] == 0xBF)) {
981 ctxt->input->cur += 3;
1019 ctxt->charset = XML_CHAR_ENCODING_UTF8;
1026 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1031 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1036 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1041 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1046 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1051 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1070 if ((ctxt->inputNr == 1) &&
1071 (ctxt->encoding == NULL) &&
1072 (ctxt->input != NULL) &&
1073 (ctxt->input->encoding != NULL)) {
1074 ctxt->encoding = xmlStrdup(ctxt->input->encoding);
1076 ctxt->charset = enc;
1079 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1084 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1089 __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
1099 ctxt->charset = XML_CHAR_ENCODING_UTF8;
1100 return(xmlSwitchToEncodingInt(ctxt, handler, len));
1105 * @ctxt: the parser context
1116 xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
1200 if (ctxt->html) {
1215 xmlErrInternal(ctxt,
1229 xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
1237 * @ctxt: the parser context
1247 xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
1249 return(xmlSwitchInputEncodingInt(ctxt, input, handler, -1));
1254 * @ctxt: the parser context
1266 xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
1271 if (ctxt->input != NULL) {
1272 ret = xmlSwitchInputEncodingInt(ctxt, ctxt->input, handler, len);
1274 xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
1281 ctxt->charset = XML_CHAR_ENCODING_UTF8;
1289 * @ctxt: the parser context
1298 xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
1300 return (xmlSwitchToEncodingInt(ctxt, handler, -1));
1332 * @ctxt: an XML parser context
1339 xmlNewInputStream(xmlParserCtxtPtr ctxt) {
1344 xmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
1357 if (ctxt != NULL)
1358 input->id = ctxt->input_id++;
1365 * @ctxt: an XML parser context
1375 xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input,
1382 inputStream = xmlNewInputStream(ctxt);
1391 xmlSwitchEncoding(ctxt, enc);
1399 * @ctxt: an XML parser context
1407 xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
1411 xmlErrInternal(ctxt, "xmlNewEntityInputStream entity = NULL\n",
1421 xmlErrInternal(ctxt, "Cannot parse entity %s\n",
1427 (char *) entity->ExternalID, ctxt));
1429 xmlErrInternal(ctxt,
1434 xmlErrInternal(ctxt,
1439 xmlErrInternal(ctxt,
1446 input = xmlNewInputStream(ctxt);
1461 * @ctxt: an XML parser context
1468 xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) {
1472 xmlErrInternal(ctxt, "xmlNewStringInputStream string = NULL\n",
1479 input = xmlNewInputStream(ctxt);
1481 xmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
1493 * @ctxt: an XML parser context
1501 xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
1510 if (ctxt == NULL) return(NULL);
1514 __xmlLoaderErr(ctxt,
1518 __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
1523 inputStream = xmlNewInputStream(ctxt);
1528 inputStream = xmlCheckHTTPInput(ctxt, inputStream);
1543 if ((ctxt->directory == NULL) && (directory != NULL))
1544 ctxt->directory = (char *) xmlStrdup((const xmlChar *) directory);
1556 * @ctxt: an XML parser context
1564 xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
1568 if(ctxt==NULL) {
1575 if (ctxt->dict == NULL)
1576 ctxt->dict = xmlDictCreate();
1577 if (ctxt->dict == NULL) {
1581 xmlDictSetLimit(ctxt->dict, XML_MAX_DICTIONARY_LIMIT);
1583 if (ctxt->sax == NULL)
1584 ctxt->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
1585 if (ctxt->sax == NULL) {
1590 xmlSAXVersion(ctxt->sax, 2);
1592 ctxt->maxatts = 0;
1593 ctxt->atts = NULL;
1595 if (ctxt->inputTab == NULL) {
1596 ctxt->inputTab = (xmlParserInputPtr *)
1598 ctxt->inputMax = 5;
1600 if (ctxt->inputTab == NULL) {
1602 ctxt->inputNr = 0;
1603 ctxt->inputMax = 0;
1604 ctxt->input = NULL;
1607 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
1610 ctxt->inputNr = 0;
1611 ctxt->input = NULL;
1613 ctxt->version = NULL;
1614 ctxt->encoding = NULL;
1615 ctxt->standalone = -1;
1616 ctxt->hasExternalSubset = 0;
1617 ctxt->hasPErefs = 0;
1618 ctxt->html = 0;
1619 ctxt->external = 0;
1620 ctxt->instate = XML_PARSER_START;
1621 ctxt->token = 0;
1622 ctxt->directory = NULL;
1625 if (ctxt->nodeTab == NULL) {
1626 ctxt->nodeTab = (xmlNodePtr *) xmlMalloc(10 * sizeof(xmlNodePtr));
1627 ctxt->nodeMax = 10;
1629 if (ctxt->nodeTab == NULL) {
1631 ctxt->nodeNr = 0;
1632 ctxt->nodeMax = 0;
1633 ctxt->node = NULL;
1634 ctxt->inputNr = 0;
1635 ctxt->inputMax = 0;
1636 ctxt->input = NULL;
1639 ctxt->nodeNr = 0;
1640 ctxt->node = NULL;
1643 if (ctxt->nameTab == NULL) {
1644 ctxt->nameTab = (const xmlChar **) xmlMalloc(10 * sizeof(xmlChar *));
1645 ctxt->nameMax = 10;
1647 if (ctxt->nameTab == NULL) {
1649 ctxt->nodeNr = 0;
1650 ctxt->nodeMax = 0;
1651 ctxt->node = NULL;
1652 ctxt->inputNr = 0;
1653 ctxt->inputMax = 0;
1654 ctxt->input = NULL;
1655 ctxt->nameNr = 0;
1656 ctxt->nameMax = 0;
1657 ctxt->name = NULL;
1660 ctxt->nameNr = 0;
1661 ctxt->name = NULL;
1664 if (ctxt->spaceTab == NULL) {
1665 ctxt->spaceTab = (int *) xmlMalloc(10 * sizeof(int));
1666 ctxt->spaceMax = 10;
1668 if (ctxt->spaceTab == NULL) {
1670 ctxt->nodeNr = 0;
1671 ctxt->nodeMax = 0;
1672 ctxt->node = NULL;
1673 ctxt->inputNr = 0;
1674 ctxt->inputMax = 0;
1675 ctxt->input = NULL;
1676 ctxt->nameNr = 0;
1677 ctxt->nameMax = 0;
1678 ctxt->name = NULL;
1679 ctxt->spaceNr = 0;
1680 ctxt->spaceMax = 0;
1681 ctxt->space = NULL;
1684 ctxt->spaceNr = 1;
1685 ctxt->spaceMax = 10;
1686 ctxt->spaceTab[0] = -1;
1687 ctxt->space = &ctxt->spaceTab[0];
1688 ctxt->userData = ctxt;
1689 ctxt->myDoc = NULL;
1690 ctxt->wellFormed = 1;
1691 ctxt->nsWellFormed = 1;
1692 ctxt->valid = 1;
1693 ctxt->loadsubset = xmlLoadExtDtdDefaultValue;
1694 ctxt->validate = xmlDoValidityCheckingDefaultValue;
1695 ctxt->pedantic = xmlPedanticParserDefaultValue;
1696 ctxt->linenumbers = xmlLineNumbersDefaultValue;
1697 ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
1698 if (ctxt->keepBlanks == 0)
1699 ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
1701 ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_0;
1702 ctxt->vctxt.userData = ctxt;
1703 ctxt->vctxt.error = xmlParserValidityError;
1704 ctxt->vctxt.warning = xmlParserValidityWarning;
1705 if (ctxt->validate) {
1707 ctxt->vctxt.warning = NULL;
1709 ctxt->vctxt.warning = xmlParserValidityWarning;
1710 ctxt->vctxt.nodeMax = 0;
1712 ctxt->replaceEntities = xmlSubstituteEntitiesDefaultValue;
1713 ctxt->record_info = 0;
1714 ctxt->nbChars = 0;
1715 ctxt->checkIndex = 0;
1716 ctxt->inSubset = 0;
1717 ctxt->errNo = XML_ERR_OK;
1718 ctxt->depth = 0;
1719 ctxt->charset = XML_CHAR_ENCODING_UTF8;
1720 ctxt->catalogs = NULL;
1721 ctxt->nbentities = 0;
1722 ctxt->sizeentities = 0;
1723 ctxt->sizeentcopy = 0;
1724 ctxt->input_id = 1;
1725 xmlInitNodeInfoSeq(&ctxt->node_seq);
1731 * @ctxt: an XML parser context
1734 * document in ctxt->myDoc is not freed.
1738 xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
1742 if (ctxt == NULL) return;
1744 while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
1747 if (ctxt->spaceTab != NULL) xmlFree(ctxt->spaceTab);
1748 if (ctxt->nameTab != NULL) xmlFree((xmlChar * *)ctxt->nameTab);
1749 if (ctxt->nodeTab != NULL) xmlFree(ctxt->nodeTab);
1750 if (ctxt->nodeInfoTab != NULL) xmlFree(ctxt->nodeInfoTab);
1751 if (ctxt->inputTab != NULL) xmlFree(ctxt->inputTab);
1752 if (ctxt->version != NULL) xmlFree((char *) ctxt->version);
1753 if (ctxt->encoding != NULL) xmlFree((char *) ctxt->encoding);
1754 if (ctxt->extSubURI != NULL) xmlFree((char *) ctxt->extSubURI);
1755 if (ctxt->extSubSystem != NULL) xmlFree((char *) ctxt->extSubSystem);
1757 if ((ctxt->sax != NULL) &&
1758 (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler))
1760 if (ctxt->sax != NULL)
1762 xmlFree(ctxt->sax);
1763 if (ctxt->directory != NULL) xmlFree((char *) ctxt->directory);
1764 if (ctxt->vctxt.nodeTab != NULL) xmlFree(ctxt->vctxt.nodeTab);
1765 if (ctxt->atts != NULL) xmlFree((xmlChar * *)ctxt->atts);
1766 if (ctxt->dict != NULL) xmlDictFree(ctxt->dict);
1767 if (ctxt->nsTab != NULL) xmlFree((char *) ctxt->nsTab);
1768 if (ctxt->pushTab != NULL) xmlFree(ctxt->pushTab);
1769 if (ctxt->attallocs != NULL) xmlFree(ctxt->attallocs);
1770 if (ctxt->attsDefault != NULL)
1771 xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
1772 if (ctxt->attsSpecial != NULL)
1773 xmlHashFree(ctxt->attsSpecial, NULL);
1774 if (ctxt->freeElems != NULL) {
1777 cur = ctxt->freeElems;
1784 if (ctxt->freeAttrs != NULL) {
1787 cur = ctxt->freeAttrs;
1797 if (ctxt->lastError.message != NULL)
1798 xmlFree(ctxt->lastError.message);
1799 if (ctxt->lastError.file != NULL)
1800 xmlFree(ctxt->lastError.file);
1801 if (ctxt->lastError.str1 != NULL)
1802 xmlFree(ctxt->lastError.str1);
1803 if (ctxt->lastError.str2 != NULL)
1804 xmlFree(ctxt->lastError.str2);
1805 if (ctxt->lastError.str3 != NULL)
1806 xmlFree(ctxt->lastError.str3);
1809 if (ctxt->catalogs != NULL)
1810 xmlCatalogFreeLocal(ctxt->catalogs);
1812 xmlFree(ctxt);
1826 xmlParserCtxtPtr ctxt;
1828 ctxt = (xmlParserCtxtPtr) xmlMalloc(sizeof(xmlParserCtxt));
1829 if (ctxt == NULL) {
1833 memset(ctxt, 0, sizeof(xmlParserCtxt));
1834 if (xmlInitParserCtxt(ctxt) < 0) {
1835 xmlFreeParserCtxt(ctxt);
1838 return(ctxt);
1849 * @ctxt: an XML parser context
1855 xmlClearParserCtxt(xmlParserCtxtPtr ctxt)
1857 if (ctxt==NULL)
1859 xmlClearNodeInfoSeq(&ctxt->node_seq);
1860 xmlCtxtReset(ctxt);
1968 * @ctxt: an XML parser context
1974 xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
1979 if ((ctxt == NULL) || (info == NULL)) return;
1982 pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
1985 if ((pos < ctxt->node_seq.length) &&
1986 (ctxt->node_seq.buffer != NULL) &&
1987 (ctxt->node_seq.buffer[pos].node == info->node)) {
1988 ctxt->node_seq.buffer[pos] = *info;
1993 if (ctxt->node_seq.length + 1 > ctxt->node_seq.maximum) {
1997 if (ctxt->node_seq.maximum == 0)
1998 ctxt->node_seq.maximum = 2;
1999 byte_size = (sizeof(*ctxt->node_seq.buffer) *
2000 (2 * ctxt->node_seq.maximum));
2002 if (ctxt->node_seq.buffer == NULL)
2006 (xmlParserNodeInfo *) xmlRealloc(ctxt->node_seq.buffer,
2010 xmlErrMemory(ctxt, "failed to allocate buffer\n");
2013 ctxt->node_seq.buffer = tmp_buffer;
2014 ctxt->node_seq.maximum *= 2;
2018 if (pos != ctxt->node_seq.length) {
2021 for (i = ctxt->node_seq.length; i > pos; i--)
2022 ctxt->node_seq.buffer[i] = ctxt->node_seq.buffer[i - 1];
2026 ctxt->node_seq.buffer[pos] = *info;
2027 ctxt->node_seq.length++;