Lines Matching refs:rule
38 * free a rule
42 freerule(register struct rule* r)
79 pp->fp->rule = pp->root = mamrule(pp, "");
128 * check for rule alias
132 static struct rule*
137 if (*name != '/' || *pp->fp->rule->name == '/' || !pp->pwd) return(0);
138 sfsprintf(buf, sizeof(buf), "%s/%s", pp->pwd, pp->fp->rule->name);
141 putrule(pp, name, pp->fp->rule);
142 return(pp->fp->rule);
151 attributes(struct proc* pp, struct rule* r, char* s)
163 p = &pp->fp->rule->implicit;
180 struct rule* r;
239 errorf(mp, mp, 1, "%s: reference to undefined rule", arg);
242 mamprereq(pp, pp->fp->rule, r, attributes(pp, r, s));
255 pp->fp->rule = r;
264 r = pp->fp->rule;
282 if (!streq(pp->fp->rule->name, arg) && !alias(pp, arg))
283 errorf(mp, mp, 1, "%s: %s %s expected", arg, op, pp->fp->rule->name);
284 attributes(pp, pp->fp->rule, s);
292 errorf(mp, mp, 1, "%s: reference to undefined rule", arg);
303 errorf(mp, mp, 1, "%s: reference to undefined rule", arg);
367 * return old rule pointer if found
368 * otherwise make a new rule
371 struct rule*
374 struct rule* r;
376 if (!(r = getrule(pp, name)) && (r = newof(0, struct rule, 1, 0)))
406 mamprereq(struct proc* pp, struct rule* r, struct rule* x, struct list** p)
418 if (x == q->rule) break;
422 q->next->rule = x;
429 else (*p)->rule = x;