| 3590 | } |
| 3591 | |
| 3592 | static enum XML_Error PTRCALL |
| 3593 | entityValueProcessor(XML_Parser parser, |
| 3594 | const char *s, |
| 3595 | const char *end, |
| 3596 | const char **nextPtr) |
| 3597 | { |
| 3598 | const char *start = s; |
| 3599 | const char *next = s; |
| 3600 | const ENCODING *enc = encoding; |
| 3601 | int tok; |
| 3602 | |
| 3603 | for (;;) { |
| 3604 | tok = XmlPrologTok(enc, start, end, &next); |
| 3605 | if (tok <= 0) { |
| 3606 | if (!ps_finalBuffer && tok != XML_TOK_INVALID) { |
| 3607 | *nextPtr = s; |
| 3608 | return XML_ERROR_NONE; |
| 3609 | } |
| 3610 | switch (tok) { |
| 3611 | case XML_TOK_INVALID: |
| 3612 | return XML_ERROR_INVALID_TOKEN; |
| 3613 | case XML_TOK_PARTIAL: |
| 3614 | return XML_ERROR_UNCLOSED_TOKEN; |
| 3615 | case XML_TOK_PARTIAL_CHAR: |
| 3616 | return XML_ERROR_PARTIAL_CHAR; |
| 3617 | case XML_TOK_NONE: /* start == end */ |
| 3618 | default: |
| 3619 | break; |
| 3620 | } |
| 3621 | /* found end of entity value - can store it now */ |
| 3622 | return storeEntityValue(parser, enc, s, end); |
| 3623 | } |
| 3624 | start = next; |
| 3625 | } |
| 3626 | } |
| 3627 | |
| 3628 | #endif /* XML_DTD */ |
| 3629 |
no test coverage detected