* htmlnamePop: * @ctxt: an HTML parser context * * Pops the top element name from the name stack * * Returns the name just removed */
| 187 | * Returns the name just removed |
| 188 | */ |
| 189 | static const xmlChar * |
| 190 | htmlnamePop(htmlParserCtxtPtr ctxt) |
| 191 | { |
| 192 | const xmlChar *ret; |
| 193 | |
| 194 | if (ctxt->nameNr <= 0) |
| 195 | return (NULL); |
| 196 | ctxt->nameNr--; |
| 197 | if (ctxt->nameNr < 0) |
| 198 | return (NULL); |
| 199 | if (ctxt->nameNr > 0) |
| 200 | ctxt->name = ctxt->nameTab[ctxt->nameNr - 1]; |
| 201 | else |
| 202 | ctxt->name = NULL; |
| 203 | ret = ctxt->nameTab[ctxt->nameNr]; |
| 204 | ctxt->nameTab[ctxt->nameNr] = NULL; |
| 205 | return (ret); |
| 206 | } |
| 207 | |
| 208 | /* |
| 209 | * Macros for accessing the content. Those should be used only by the parser, |
no outgoing calls
no test coverage detected