| 2223 | } |
| 2224 | |
| 2225 | static int spacePush(xmlParserCtxtPtr ctxt, int val) { |
| 2226 | if (ctxt->spaceNr >= ctxt->spaceMax) { |
| 2227 | int *tmp; |
| 2228 | |
| 2229 | ctxt->spaceMax *= 2; |
| 2230 | tmp = (int *) xmlRealloc(ctxt->spaceTab, |
| 2231 | ctxt->spaceMax * sizeof(ctxt->spaceTab[0])); |
| 2232 | if (tmp == NULL) { |
| 2233 | xmlErrMemory(ctxt); |
| 2234 | ctxt->spaceMax /=2; |
| 2235 | return(-1); |
| 2236 | } |
| 2237 | ctxt->spaceTab = tmp; |
| 2238 | } |
| 2239 | ctxt->spaceTab[ctxt->spaceNr] = val; |
| 2240 | ctxt->space = &ctxt->spaceTab[ctxt->spaceNr]; |
| 2241 | return(ctxt->spaceNr++); |
| 2242 | } |
| 2243 | |
| 2244 | static int spacePop(xmlParserCtxtPtr ctxt) { |
| 2245 | int ret; |
no test coverage detected