Commit bbc31a5e authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vep: Extract src attr parsing to its own function

parent a810eb84
......@@ -429,16 +429,11 @@ vep_do_remove(struct vep_state *vep, enum dowhat what)
/*---------------------------------------------------------------------
*/
static void v_matchproto_()
vep_do_include(struct vep_state *vep, enum dowhat what)
static void
include_attr_src(struct vep_state *vep)
{
const char *p, *q, *h;
ssize_t l;
const char *p;
Debug("DO_INCLUDE(%d)\n", what);
if (what == DO_ATTR) {
Debug("ATTR (%s) (%s)\n", vep->match_hit->match,
VSB_data(vep->attr_vsb));
if (vep->include_src != NULL) {
vep_error(vep,
"ESI 1.0 <esi:include> "
......@@ -463,8 +458,24 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
}
vep->include_src = vep->attr_vsb;
vep->attr_vsb = NULL;
}
static void v_matchproto_()
vep_do_include(struct vep_state *vep, enum dowhat what)
{
const char *p, *q, *h;
ssize_t l;
Debug("DO_INCLUDE(%d)\n", what);
if (what == DO_ATTR) {
Debug("ATTR (%s) (%s)\n", vep->match_hit->match,
VSB_data(vep->attr_vsb));
if (!strcmp("src=", vep->match_hit->match)) {
include_attr_src(vep);
return;
}
WRONG("Unhandled <esi:include> attribute");
}
assert(what == DO_TAG);
if (!vep->emptytag)
vep_warn(vep, "ESI 1.0 <esi:include> lacks final '/'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment