int i;
CalloutData* d;
- num = onig_get_callout_num_from_tag(reg, tag, tag_end);
+ num = onig_get_callout_num_by_tag(reg, tag, tag_end);
if (num < 0) return num;
if (num == 0) return ONIGERR_INVALID_CALLOUT_TAG_NAME;
int i;
CalloutData* d;
- num = onig_get_callout_num_from_tag(reg, tag, tag_end);
+ num = onig_get_callout_num_by_tag(reg, tag, tag_end);
if (num < 0) return num;
if (num == 0) return ONIGERR_INVALID_CALLOUT_TAG_NAME;
}\
else {\
aof = ONIG_CALLOUT_OF_NAME;\
- func = onig_get_callout_start_func_from_name_id(stk->zid);\
+ func = onig_get_callout_start_func_by_name_id(stk->zid);\
}\
RETRACTION_CALLOUT(func, aof, stk->zid, stk->u.callout.num, msa->mp->callout_user_data);\
}
of = ONIG_CALLOUT_OF_NAME;
GET_MEMNUM_INC(name_id, p);
- func = onig_get_callout_start_func_from_name_id(name_id);
+ func = onig_get_callout_start_func_by_name_id(name_id);
callout_common_entry:
GET_MEMNUM_INC(num, p);
retraction_callout2:
if ((in & ONIG_CALLOUT_IN_RETRACTION) != 0) {
if (of == ONIG_CALLOUT_OF_NAME) {
- func = onig_get_callout_start_func_from_name_id(name_id);
+ func = onig_get_callout_start_func_by_name_id(name_id);
if (IS_NOT_NULL(func)) {
STACK_PUSH_CALLOUT_NAME(name_id, num);
}
}
static int
-get_callout_name_id_from_name(OnigEncoding enc, int is_not_single,
- UChar* name, UChar* name_end, int* rid)
+get_callout_name_id_by_name(OnigEncoding enc, int is_not_single,
+ UChar* name, UChar* name_end, int* rid)
{
int r;
CalloutNameEntry* e;
extern OnigCalloutType
-onig_get_callout_type_from_name_id(int name_id)
+onig_get_callout_type_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].type;
}
extern OnigCalloutFunc
-onig_get_callout_start_func_from_name_id(int name_id)
+onig_get_callout_start_func_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].start_func;
}
extern OnigCalloutFunc
-onig_get_callout_end_func_from_name_id(int name_id)
+onig_get_callout_end_func_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].end_func;
}
extern int
-onig_get_callout_in_from_name_id(int name_id)
+onig_get_callout_in_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].in;
}
static int
-get_callout_arg_num_from_name_id(int name_id)
+get_callout_arg_num_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].arg_num;
}
static int
-get_callout_opt_arg_num_from_name_id(int name_id)
+get_callout_opt_arg_num_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].opt_arg_num;
}
static OnigType
-get_callout_arg_type_from_name_id(int name_id, int index)
+get_callout_arg_type_by_name_id(int name_id, int index)
{
return GlobalCalloutNameList->v[name_id].arg_types[index];
}
static OnigValue
-get_callout_opt_default_from_name_id(int name_id, int index)
+get_callout_opt_default_by_name_id(int name_id, int index)
{
return GlobalCalloutNameList->v[name_id].opt_defaults[index];
}
extern UChar*
-onig_get_callout_name_from_name_id(int name_id)
+onig_get_callout_name_by_name_id(int name_id)
{
return GlobalCalloutNameList->v[name_id].name;
}
}
extern int
-onig_get_callout_num_from_tag(regex_t* reg,
- const UChar* tag, const UChar* tag_end)
+onig_get_callout_num_by_tag(regex_t* reg,
+ const UChar* tag, const UChar* tag_end)
{
int r;
RegexExt* ext;
is_not_single = PPEEK_IS(cterm) ? 0 : 1;
p = save;
- r = get_callout_name_id_from_name(enc, is_not_single, name_start, name_end,
- &name_id);
+ r = get_callout_name_id_by_name(enc, is_not_single, name_start, name_end,
+ &name_id);
if (r != ONIG_NORMAL) return r;
- max_arg_num = get_callout_arg_num_from_name_id(name_id);
+ max_arg_num = get_callout_arg_num_by_name_id(name_id);
for (i = 0; i < max_arg_num; i++) {
- types[i] = get_callout_arg_type_from_name_id(name_id, i);
+ types[i] = get_callout_arg_type_by_name_id(name_id, i);
}
arg_num = parse_callout_args(0, ')', &p, end, types, vals, env);
arg_num = 0;
is_not_single = 0;
- r = get_callout_name_id_from_name(enc, is_not_single, name_start, name_end,
+ r = get_callout_name_id_by_name(enc, is_not_single, name_start, name_end,
&name_id);
if (r != ONIG_NORMAL) return r;
- max_arg_num = get_callout_arg_num_from_name_id(name_id);
+ max_arg_num = get_callout_arg_num_by_name_id(name_id);
for (i = 0; i < max_arg_num; i++) {
- types[i] = get_callout_arg_type_from_name_id(name_id, i);
+ types[i] = get_callout_arg_type_by_name_id(name_id, i);
}
}
- in = onig_get_callout_in_from_name_id(name_id);
- opt_arg_num = get_callout_opt_arg_num_from_name_id(name_id);
+ in = onig_get_callout_in_by_name_id(name_id);
+ opt_arg_num = get_callout_opt_arg_num_by_name_id(name_id);
if (arg_num > max_arg_num || arg_num < (max_arg_num - opt_arg_num))
return ONIGERR_INVALID_CALLOUT_ARG;
e->of = ONIG_CALLOUT_OF_NAME;
e->in = in;
e->name_id = name_id;
- e->type = onig_get_callout_type_from_name_id(name_id);
+ e->type = onig_get_callout_type_by_name_id(name_id);
e->u.arg.num = max_arg_num;
e->u.arg.passed_num = arg_num;
for (i = 0; i < max_arg_num; i++) {
if (i < arg_num)
e->u.arg.vals[i] = vals[i];
else
- e->u.arg.vals[i] = get_callout_opt_default_from_name_id(name_id, i);
+ e->u.arg.vals[i] = get_callout_opt_default_by_name_id(name_id, i);
}
*np = node;