/* types for callout */
enum OnigCalloutIn {
- ONIG_CALLOUT_IN_PROGRESS = 0,
- ONIG_CALLOUT_IN_RETRACTION = 1,
+ ONIG_CALLOUT_IN_PROGRESS = 1, /* 1<<0 */
+ ONIG_CALLOUT_IN_RETRACTION = 2 /* 1<<1 */
};
enum OnigCalloutOf {
ONIG_CALLOUT_OF_CODE = 0,
- ONIG_CALLOUT_OF_NAME = 1,
+ ONIG_CALLOUT_OF_NAME = 1
};
#define ONIG_NO_NAME_ID -1
GET_POINTER_INC(content_start, p);
GET_POINTER_INC(content_end, p);
- if (IS_NOT_NULL(func) && (dirs & CALLOUT_IN_PROGRESS) != 0) {
+ if (IS_NOT_NULL(func) && (dirs & ONIG_CALLOUT_IN_PROGRESS) != 0) {
CALLOUT_BODY(func, ONIG_CALLOUT_IN_PROGRESS, of, name_id,
num, content_start, content_end,
msa->mp->callout_user_data, args, call_result);
}
else {
retraction_callout2:
- if ((dirs & CALLOUT_IN_RETRACTION) != 0) {
+ if ((dirs & ONIG_CALLOUT_IN_RETRACTION) != 0) {
if (of == ONIG_CALLOUT_OF_NAME) {
func = onig_get_callout_func_from_id(name_id);
if (IS_NOT_NULL(func)) {
UPDATE_VAR_RIGHT_RANGE_INIT = 4,
};
-#ifdef USE_CALLOUT
-enum CalloutDirectionFlagType {
- CALLOUT_IN_PROGRESS = 1, /* == 1<<ONIG_CALLOUT_IN_PROGRESS */
- CALLOUT_IN_RETRACTION = 2 /* == 1<<ONIG_CALLOUT_IN_RETRACTION */
-};
-#endif
-
typedef int RelAddrType;
typedef int AbsAddrType;
typedef int LengthType;
if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN;
}
- dirs = CALLOUT_IN_PROGRESS;
+ dirs = ONIG_CALLOUT_IN_PROGRESS;
code_start = p;
while (1) {
if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN;
if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PFETCH_S(c);
if (c == '+') {
- dirs |= CALLOUT_IN_RETRACTION;
+ dirs |= ONIG_CALLOUT_IN_RETRACTION;
if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PFETCH_S(c);
}
else if (c == '-') {
- dirs = CALLOUT_IN_RETRACTION;
+ dirs = ONIG_CALLOUT_IN_RETRACTION;
if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PFETCH_S(c);
}
if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN;
node = 0;
- dirs = CALLOUT_IN_PROGRESS;
+ dirs = ONIG_CALLOUT_IN_PROGRESS;
name_start = p;
while (! PEND) {
name_end = p;
PFETCH_S(c);
if (c == '+' || c == '-') {
- if (c == '+') dirs |= CALLOUT_IN_RETRACTION;
- else dirs = CALLOUT_IN_RETRACTION;
+ if (c == '+') dirs |= ONIG_CALLOUT_IN_RETRACTION;
+ else dirs = ONIG_CALLOUT_IN_RETRACTION;
if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PFETCH_S(c);