Lines Matching refs:pattern
151 static int compile_regex(const char *pattern, regex_t *regex) in compile_regex() argument
154 const char *original_pattern = pattern; in compile_regex()
160 while (*pattern && ptr < buf_end - 2) { in compile_regex()
161 if (!in_regex && str_has_pfx(pattern, "{{")) { in compile_regex()
163 pattern += 2; in compile_regex()
166 if (in_regex && str_has_pfx(pattern, "}}")) { in compile_regex()
168 pattern += 2; in compile_regex()
172 *ptr++ = *pattern++; in compile_regex()
176 if (strchr(".[]\\()*+?{}|^$", *pattern)) { in compile_regex()
178 *ptr++ = *pattern++; in compile_regex()
181 *ptr++ = *pattern++; in compile_regex()
183 if (*pattern) { in compile_regex()
200 static int __push_msg(const char *pattern, bool on_next_line, struct expected_msgs *msgs) in __push_msg() argument
215 msg->substr = pattern; in __push_msg()
217 if (strstr(pattern, "{{")) { in __push_msg()
218 err = compile_regex(pattern, &msg->regex); in __push_msg()