test(encs[0], mp, "abc(.(*COUNT[x]))*(*FAIL)", "abcdefg");
test(encs[0], mp, "abc(.(*COUNT[_any_]))*(.(*COUNT[x]))*d", "abcdefg");
/* fail count */
- test(encs[0], mp, "abc(.(*COUNT[x]{f}))*f", "abcdefg");
+ test(encs[0], mp, "abc(.(*COUNT[x]{-}))*f", "abcdefg");
/* success count */
- test(encs[0], mp, "abc(.(*COUNT[x]{s}))*f", "abcdefg");
+ test(encs[0], mp, "abc(.(*COUNT[x]{+}))*f", "abcdefg");
/* passed count */
test(encs[0], mp, "abc(.(*COUNT[x]))*f", "abcdefg");
test(encs[0], mp, "a(.(*COUNT[x]))*z", "abcd\nabcdz");
name = "ERROR"; BC1_P(name, error, &t_long);
name = "MAX"; BC1_B(name, max, &t_long);
name = "COUNT";
- args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p';
+ args[0] = ONIG_TYPE_CHAR; opts[0].c = ' ';
BC_B_O(name, count, 1, args, 1, opts);
name = "TOTAL_COUNT";
- args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p';
+ args[0] = ONIG_TYPE_CHAR; opts[0].c = ' ';
BC_B_O(name, total_count, 1, args, 1, opts);
#endif /* USE_CALLOUT */
if (r != ONIG_NORMAL) return r;
count_type = aval.c;
- if (count_type != 'p' && count_type != 's' && count_type != 'f')
+ if (count_type != ' ' && count_type != '+' && count_type != '-')
return ONIGERR_INVALID_CALLOUT_ARG;
slot = 0;
}
if (args->in == ONIG_CALLOUT_IN_RETRACTION) {
- if (count_type == 'f')
+ if (count_type == '-')
val.l++;
- else if (count_type == 's')
+ else if (count_type == '+')
val.l--;
}
else {
- if (count_type != 'f')
+ if (count_type != '-')
val.l++;
}
name = "\000M\000A\000X\000\000"; BC1_B(name, max, &t_long);
name = "\000C\000O\000U\000N\000T\000\000";
- args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p';
+ args[0] = ONIG_TYPE_CHAR; opts[0].c = ' ';
BC_B_O(name, count, 1, args, 1, opts);
name = "\000T\000O\000T\000A\000L\000_\000C\000O\000U\000N\000T\000\000";
- args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p';
+ args[0] = ONIG_TYPE_CHAR; opts[0].c = ' ';
BC_B_O(name, total_count, 1, args, 1, opts);
#endif /* USE_CALLOUT */
name = "M\000A\000X\000\000\000"; BC1_B(name, max, &t_long);
name = "C\000O\000U\000N\000T\000\000\000";
- args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p';
+ args[0] = ONIG_TYPE_CHAR; opts[0].c = ' ';
BC_B_O(name, count, 1, args, 1, opts);
name = "T\000O\000T\000A\000L\000_\000C\000O\000U\000N\000T\000\000\000";
- args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p';
+ args[0] = ONIG_TYPE_CHAR; opts[0].c = ' ';
BC_B_O(name, total_count, 1, args, 1, opts);
#endif /* USE_CALLOUT */