Lines Matching refs:logrus

283   struct step *logrus;  in walk_pattern()  local
303 logrus = TT.restart ? ((struct step *)TT.restart)-1 : (void *)TT.pattern; in walk_pattern()
306 while (logrus) { in walk_pattern()
307 char *str, c = logrus->c; in walk_pattern()
310 if (*logrus->lmatch || *logrus->rmatch) { in walk_pattern()
315 if (logrus->hit) { in walk_pattern()
316 if (!(lm = logrus->lmatch[1])) { in walk_pattern()
317 if (!logrus->rmatch[1]) logrus->hit = 0; in walk_pattern()
319 void *rm = get_regex(logrus, logrus->rmatch[1]); in walk_pattern()
324 } else if (lm > 0 && lm < TT.count) logrus->hit = 0; in walk_pattern()
328 if (!(lm = *logrus->lmatch)) { in walk_pattern()
329 void *rm = get_regex(logrus, *logrus->rmatch); in walk_pattern()
331 if (line && !ghostwheel(rm, line, len, 0, 0, 0)) logrus->hit++; in walk_pattern()
332 } else if (lm == TT.count || (lm == -1 && !pline)) logrus->hit++; in walk_pattern()
334 if (!logrus->lmatch[1] && !logrus->rmatch[1]) miss = 1; in walk_pattern()
338 lm = !(logrus->hit ^ logrus->not); in walk_pattern()
341 if (miss || logrus->lmatch[1] == TT.count) logrus->hit = 0; in walk_pattern()
349 logrus = logrus->next; in walk_pattern()
350 if (logrus->c == '{') curly++; in walk_pattern()
351 if (logrus->c == '}') curly--; in walk_pattern()
354 logrus = logrus->next; in walk_pattern()
361 logrus = logrus->next; in walk_pattern()
369 a->str = logrus->arg1+(char *)logrus; in walk_pattern()
377 if (!logrus->arg1) break; in walk_pattern()
378 str = logrus->arg1+(char *)logrus; in walk_pattern()
379 for (logrus = (void *)TT.pattern; logrus; logrus = logrus->next) in walk_pattern()
380 if (logrus->c == ':' && !strcmp(logrus->arg1+(char *)logrus, str)) in walk_pattern()
382 if (!logrus) error_exit("no :%s", str); in walk_pattern()
385 str = logrus->arg1+(char *)logrus; in walk_pattern()
386 if (!logrus->hit) emit(str, strlen(str), 1); in walk_pattern()
408 logrus = (void *)TT.pattern; in walk_pattern()
430 str = logrus->arg1+(char *)logrus; in walk_pattern()
458 TT.restart = logrus->next+1; in walk_pattern()
465 TT.restart = logrus->next+1; in walk_pattern()
487 char *rline = line, *new = logrus->arg2 + (char *)logrus, *swap, *rswap; in walk_pattern()
489 regex_t *reg = get_regex(logrus, logrus->arg1); in walk_pattern()
506 off = logrus->sflags>>3; in walk_pattern()
566 if (!(logrus->sflags & 2)) break; in walk_pattern()
571 if (logrus->sflags & 4) emit(line, len, eol); in walk_pattern()
574 if (logrus->w) goto writenow; in walk_pattern()
586 name = logrus->w + (char *)logrus; in walk_pattern()
593 perror_exit("w '%s'", logrus->arg1+(char *)logrus); in walk_pattern()
606 char *from, *to = (char *)logrus; in walk_pattern()
609 from = to+logrus->arg1; in walk_pattern()
610 to += logrus->arg2; in walk_pattern()
621 logrus = logrus->next; in walk_pattern()