| 1354 | } |
| 1355 | |
| 1356 | static void show_funcname_line(struct grep_opt *opt, struct grep_source *gs, |
| 1357 | const char *bol, unsigned lno) |
| 1358 | { |
| 1359 | while (bol > gs->buf) { |
| 1360 | const char *eol = --bol; |
| 1361 | |
| 1362 | while (bol > gs->buf && bol[-1] != '\n') |
| 1363 | bol--; |
| 1364 | lno--; |
| 1365 | |
| 1366 | if (lno <= opt->last_shown) |
| 1367 | break; |
| 1368 | |
| 1369 | if (match_funcname(opt, gs, bol, eol)) { |
| 1370 | show_line(opt, bol, eol, gs->name, lno, 0, '='); |
| 1371 | break; |
| 1372 | } |
| 1373 | } |
| 1374 | } |
| 1375 | |
| 1376 | static int is_empty_line(const char *bol, const char *eol); |
| 1377 |
no test coverage detected