* htmlNodeInfoPop: * @ctxt: an HTML parser context * * Pops the top element name from the node info stack * * Returns 0 in case of error, the pointer to NodeInfo otherwise */
| 203 | * Returns 0 in case of error, the pointer to NodeInfo otherwise |
| 204 | */ |
| 205 | static htmlParserNodeInfo * |
| 206 | htmlNodeInfoPop(htmlParserCtxtPtr ctxt) |
| 207 | { |
| 208 | if (ctxt->nodeInfoNr <= 0) |
| 209 | return (NULL); |
| 210 | ctxt->nodeInfoNr--; |
| 211 | if (ctxt->nodeInfoNr < 0) |
| 212 | return (NULL); |
| 213 | if (ctxt->nodeInfoNr > 0) |
| 214 | ctxt->nodeInfo = &ctxt->nodeInfoTab[ctxt->nodeInfoNr - 1]; |
| 215 | else |
| 216 | ctxt->nodeInfo = NULL; |
| 217 | return &ctxt->nodeInfoTab[ctxt->nodeInfoNr]; |
| 218 | } |
| 219 | |
| 220 | /* |
| 221 | * Macros for accessing the content. Those should be used only by the parser, |
no outgoing calls
no test coverage detected