* 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 */
| 161 | * Returns 0 in case of error, the index in the stack otherwise |
| 162 | */ |
| 163 | static int |
| 164 | htmlnamePush(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 |
no test coverage detected