Lines Matching refs:pattern
160 static int compile_regex(const char *pattern, regex_t *regex) in compile_regex() argument
163 const char *original_pattern = pattern; in compile_regex()
169 while (*pattern && ptr < buf_end - 2) { in compile_regex()
170 if (!in_regex && str_has_pfx(pattern, "{{")) { in compile_regex()
172 pattern += 2; in compile_regex()
175 if (in_regex && str_has_pfx(pattern, "}}")) { in compile_regex()
177 pattern += 2; in compile_regex()
181 *ptr++ = *pattern++; in compile_regex()
185 if (strchr(".[]\\()*+?{}|^$", *pattern)) { in compile_regex()
187 *ptr++ = *pattern++; in compile_regex()
190 *ptr++ = *pattern++; in compile_regex()
192 if (*pattern) { in compile_regex()
209 static int __push_msg(const char *pattern, bool on_next_line, struct expected_msgs *msgs) in __push_msg() argument
224 msg->substr = pattern; in __push_msg()
226 if (strstr(pattern, "{{")) { in __push_msg()
227 err = compile_regex(pattern, &msg->regex); in __push_msg()