remove any repeated '?', which hopefully will satisfy everybody.
*/
for (i = start = 0; i < size; i++) {
- if ((data[i] < 0x20 || data[i] >= 0x7f || data[i] == '?') &&
- (data[i] != '\t' && data[i] != '\n')) {
- /* remove repeated '?' */
- if (start < i || (i == 0 && !ctx->prev_was_questionmark)) {
- method->loop(context, data + start, i-start);
- method->loop(context, "?", 1);
+ switch (data[i]) {
+ case '\t':
+ case '\n':
+ break;
+ default:
+ if (data[i] < 0x20 || data[i] >= 0x7f || data[i] == '?') {
+ /* remove repeated '?' */
+ if (start < i || (i == 0 && !ctx->prev_was_questionmark)) {
+ method->loop(context, data + start, i-start);
+ method->loop(context, "?", 1);
+ }
+ start = i+1;
}
- start = i+1;
+ break;
}
}
ctx->prev_was_questionmark = start == i;