| 218 | } |
| 219 | |
| 220 | static NORETURN void compile_regexp_failed(const struct grep_pat *p, |
| 221 | const char *error) |
| 222 | { |
| 223 | char where[1024]; |
| 224 | |
| 225 | if (p->no) |
| 226 | xsnprintf(where, sizeof(where), "In '%s' at %d, ", p->origin, p->no); |
| 227 | else if (p->origin) |
| 228 | xsnprintf(where, sizeof(where), "%s, ", p->origin); |
| 229 | else |
| 230 | where[0] = 0; |
| 231 | |
| 232 | die("%s'%s': %s", where, p->pattern, error); |
| 233 | } |
| 234 | |
| 235 | static int is_fixed(const char *s, size_t len) |
| 236 | { |
no test coverage detected