Lines Matching full:spec
26 typedef struct spec {
90 /* find the stem of a file spec, returns the index into stem_arr for a new
152 struct spec *curr_spec, *spec_arr = data->spec_arr;
185 static void spec_hasMetaChars(struct spec *spec)
191 c = spec->regex_str;
192 len = strlen(spec->regex_str);
195 spec->hasMetaChars = 0;
196 spec->prefix_len = len;
212 spec->hasMetaChars = 1;
213 spec->prefix_len = c - spec->regex_str;
227 static int compile_regex(struct saved_data *data, spec_t *spec, char **errbuf)
234 if (spec->regcomp)
240 reg_buf = spec->regex_str;
241 if (spec->stem_id >= 0)
242 reg_buf += stem_arr[spec->stem_id].len;
257 regerr = regcomp(&spec->regex, anchored_regex,
261 errsz = regerror(regerr, &spec->regex, NULL, 0);
265 (void)regerror(regerr, &spec->regex,
274 spec->regcomp = 1;
319 /* On the second pass, process and store the specification in spec. */
453 * of the first pass, the spec array is allocated.
455 * and fills in the spec array.
545 struct spec *spec;
550 spec = &data->spec_arr[i];
551 free(spec->regex_str);
552 free(spec->type_str);
553 free(spec->lr.ctx_raw);
554 free(spec->lr.ctx_trans);
555 if (spec->regcomp)
556 regfree(&spec->regex);
618 /* if the spec in question matches no stem or has the same
619 * stem as the file AND if the spec in question has no mode
683 spec_t *spec;
684 spec = lookup_common(rec, key, type, false);
685 if (spec)
686 return &spec->lr;