//!< values from a #map_proc_t call).
#endif
UNLANG_TYPE_POLICY, //!< Policy section.
- UNLANG_TYPE_XLAT, //!< Bare xlat statement.
+ UNLANG_TYPE_XLAT_INLINE, //!< xlat statement, inline in "unlang"
UNLANG_TYPE_RESUME, //!< where to resume something.
UNLANG_TYPE_MAX
} unlang_type_t;
unlang_t self;
int exec;
char *xlat_name;
-} unlang_xlat_t;
+} unlang_xlat_inline_t;
/** State of a foreach loop
*
return (unlang_t *)p;
}
-static inline unlang_xlat_t *unlang_generic_to_xlat(unlang_t *p)
+static inline unlang_xlat_inline_t *unlang_generic_to_xlat_inline(unlang_t *p)
{
- rad_assert(p->type == UNLANG_TYPE_XLAT);
- return (unlang_xlat_t *)p;
+ rad_assert(p->type == UNLANG_TYPE_XLAT_INLINE);
+ return (unlang_xlat_inline_t *)p;
}
-static inline unlang_t *unlang_xlat_to_generic(unlang_xlat_t *p)
+static inline unlang_t *unlang_xlat_inline_to_generic(unlang_xlat_inline_t *p)
{
return (unlang_t *)p;
}
return UNLANG_ACTION_PUSHED_CHILD;
}
-static unlang_action_t unlang_xlat(REQUEST *request, unlang_stack_t *stack,
- UNUSED rlm_rcode_t *presult, UNUSED int *priority)
+static unlang_action_t unlang_xlat_inline(REQUEST *request, unlang_stack_t *stack,
+ UNUSED rlm_rcode_t *presult, UNUSED int *priority)
{
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
unlang_t *instruction = frame->instruction;
- unlang_xlat_t *mx = unlang_generic_to_xlat(instruction);
+ unlang_xlat_inline_t *mx = unlang_generic_to_xlat_inline(instruction);
char buffer[128];
if (!mx->exec) {
.children = true
},
#endif
- [UNLANG_TYPE_XLAT] = {
- .name = "xlat",
- .func = unlang_xlat,
+ [UNLANG_TYPE_XLAT_INLINE] = {
+ .name = "xlat_inline",
+ .func = unlang_xlat_inline,
.children = false
},
[UNLANG_TYPE_RESUME] = {
}
#endif
-static unlang_t *compile_xlat(unlang_t *parent,
- unlang_compile_t *unlang_ctx, char const *fmt)
+static unlang_t *compile_xlat_inline(unlang_t *parent,
+ unlang_compile_t *unlang_ctx, char const *fmt)
{
unlang_t *c;
- unlang_xlat_t *mx;
+ unlang_xlat_inline_t *mx;
- mx = talloc_zero(parent, unlang_xlat_t);
+ mx = talloc_zero(parent, unlang_xlat_inline_t);
- c = unlang_xlat_to_generic(mx);
+ c = unlang_xlat_inline_to_generic(mx);
c->parent = parent;
c->next = NULL;
c->name = "expand";
c->debug_name = c->name;
- c->type = UNLANG_TYPE_XLAT;
+ c->type = UNLANG_TYPE_XLAT_INLINE;
(void) compile_action_defaults(c, unlang_ctx, UNLANG_GROUP_TYPE_SIMPLE);
*/
if (((modrefname[0] == '%') && (modrefname[1] == '{')) ||
(modrefname[0] == '`')) {
- return compile_xlat(parent, unlang_ctx, modrefname);
+ return compile_xlat_inline(parent, unlang_ctx, modrefname);
}
}