Lines Matching refs:sub
111 register regsub_t* sub; in regsubcomp() local
132 …if (!(sub = (regsub_t*)alloc(p->env->disc, 0, sizeof(regsub_t) + strlen(s))) || !(sub->re_ops = (r… in regsubcomp()
134 if (sub) in regsubcomp()
135 alloc(p->env->disc, sub, 0); in regsubcomp()
139 sub->re_buf = sub->re_end = 0; in regsubcomp()
140 p->re_sub = sub; in regsubcomp()
141 p->env->sub = 1; in regsubcomp()
142 op = sub->re_ops; in regsubcomp()
156 t = sub->re_rhs; in regsubcomp()
289 if ((op->len = (t - sub->re_rhs) - op->off) && (n = ++op - sub->re_ops) >= nops) in regsubcomp()
291 …if (!(sub->re_ops = (regsubop_t*)alloc(p->env->disc, sub->re_ops, (nops *= 2) * sizeof(regsubop_t)… in regsubcomp()
296 op = sub->re_ops + n; in regsubcomp()
299 op->off = t - sub->re_rhs; in regsubcomp()
325 if ((n = op - sub->re_ops) >= (nops - 2)) in regsubcomp()
327 …if (!(sub->re_ops = (regsubop_t*)alloc(p->env->disc, sub->re_ops, (nops *= 2) * sizeof(regsubop_t)… in regsubcomp()
332 op = sub->re_ops + n; in regsubcomp()
334 if (op->len = (t - sub->re_rhs) - op->off) in regsubcomp()
341 op->off = t - sub->re_rhs; in regsubcomp()
343 if ((op->len = (t - sub->re_rhs) - op->off) && (n = ++op - sub->re_ops) >= nops) in regsubcomp()
345 …if (!(sub->re_ops = (regsubop_t*)alloc(p->env->disc, sub->re_ops, (nops *= 2) * sizeof(regsubop_t)… in regsubcomp()
350 op = sub->re_ops + n; in regsubcomp()
353 sub->re_flags = flags; in regsubcomp()
354 sub->re_min = minmatch; in regsubcomp()
362 regsub_t* sub; in regsubfree() local
364 if (p && (env = p->env) && env->sub && (sub = p->re_sub)) in regsubfree()
366 env->sub = 0; in regsubfree()
370 if (sub->re_buf) in regsubfree()
371 alloc(env->disc, sub->re_buf, 0); in regsubfree()
372 if (sub->re_ops) in regsubfree()
373 alloc(env->disc, sub->re_ops, 0); in regsubfree()
374 alloc(env->disc, sub, 0); in regsubfree()