MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / htmlnamePush

Function htmlnamePush

Externals/LibXML/HTMLparser.c:163–180  ·  view source on GitHub ↗

* htmlnamePush: * @ctxt: an HTML parser context * @value: the element name * * Pushes a new element name on top of the name stack * * Returns 0 in case of error, the index in the stack otherwise */

Source from the content-addressed store, hash-verified

161 * Returns 0 in case of error, the index in the stack otherwise
162 */
163static int
164htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value)
165{
166 if (ctxt->nameNr >= ctxt->nameMax) {
167 ctxt->nameMax *= 2;
168 ctxt->nameTab = (const xmlChar * *)
169 xmlRealloc((xmlChar * *)ctxt->nameTab,
170 ctxt->nameMax *
171 sizeof(ctxt->nameTab[0]));
172 if (ctxt->nameTab == NULL) {
173 htmlErrMemory(ctxt, NULL);
174 return (0);
175 }
176 }
177 ctxt->nameTab[ctxt->nameNr] = value;
178 ctxt->name = value;
179 return (ctxt->nameNr++);
180}
181/**
182 * htmlnamePop:
183 * @ctxt: an HTML parser context

Callers 3

htmlCheckImpliedFunction · 0.85
htmlCheckParagraphFunction · 0.85
htmlParseStartTagFunction · 0.85

Calls 1

htmlErrMemoryFunction · 0.85

Tested by

no test coverage detected