* xmlParseCRNGDropTokens: * @ctxt: a compact RNG parser context * @nr: the number of token marked as read * * mark a number of token as read and consumed. * * Returns -1 in case of error and 0 otherwise */
| 396 | * Returns -1 in case of error and 0 otherwise |
| 397 | */ |
| 398 | static int |
| 399 | xmlParseCRNGDropTokens(xmlCRelaxNGParserCtxtPtr ctxt, int nr) { |
| 400 | if ((nr <= 0) || (nr >= MAX_TOKEN)) return(-1); |
| 401 | while ((ctxt->nbTokens >0) && (nr > 0)) { |
| 402 | ctxt->firstToken++; |
| 403 | nr--; |
| 404 | ctxt->nbTokens--; |
| 405 | ctxt->totalToken++; |
| 406 | if (ctxt->totalToken == 384) |
| 407 | fprintf(stderr, "found\n"); |
| 408 | } |
| 409 | ctxt->firstToken = ctxt->firstToken % MAX_TOKEN; |
| 410 | return(0); |
| 411 | } |
| 412 | |
| 413 | static void |
| 414 | xmlParseCRNGTokenize(xmlCRelaxNGParserCtxtPtr ctxt) { |
no test coverage detected