Lines Matching +defs:match +defs:line
54 regex_t regex; /* compiled regular expression to match */
56 mode_t mode; /* mode to possibly match */
63 *match; /* cached decision for MAC label to apply */
195 chomp_line(char **line, size_t *linesize)
200 for (s = *line; (unsigned)(s - *line) < *linesize; s++) {
205 **line = '\0';
209 memmove(*line, s, *linesize - (s - *line));
210 *linesize -= s - *line;
211 for (s = &(*line)[*linesize - 1]; s >= *line; s--) {
215 if (s != &(*line)[*linesize - 1]) {
216 *linesize = s - *line + 1;
221 strncpy(s, *line, *linesize);
222 *line = s;
225 (*line)[*linesize] = '\0';
234 char *line;
244 while ((line = fgetln(fp, &linesize)) != NULL) {
245 freeline = chomp_line(&line, &linesize);
249 free(line);
259 line = fgetln(fp, &linesize);
260 if (line == NULL) {
266 freeline = chomp_line(&line, &linesize);
269 free(line);
272 add_spec_line(file, is_sebsd, &spec->entries[--nlines], line);
274 free(line);
303 char *line)
309 regexstr = strtok(line, " \t");
321 errx(1, "%s: extraneous fields at end of line", file);
405 * on the command line, and through their entries in reverse
406 * order to find the "last" (hopefully "best") match.
410 for (ls->match = NULL, ent = ls->entries;
436 ls->match = ent;
455 /* cached match decision */
456 if (ls->match && (ls->match->flags & F_DONTLABEL) == 0)
458 size += strlen(ls->match->mactext) + 1;
467 /* cached match decision */
468 if (ls->match && (ls->match->flags & F_DONTLABEL) == 0) {
471 strcat(macstr, ls->match->mactext);