diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-11 21:36:45 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-11 21:36:51 +0200 |
commit | 7e957a08fb09062db85f66b93fd858b8dfcd21b1 (patch) | |
tree | 35d63854880f266b9c2af56b555165ba6f1d43a0 | |
parent | 76d630056966061a0e4962a8f22d12fe8a453c7f (diff) |
grepc, grepc.1: Don't print leading blank lines.
Also, update the manual page EXAMPLES regarding blank lines.
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-x | bin/grepc | 21 | ||||
-rw-r--r-- | share/man/man1/grepc.1 | 4 |
2 files changed, 13 insertions, 12 deletions
@@ -223,18 +223,23 @@ grepc_type() } +grepc_grepc() +{ + grepc_macro "$1"; + grepc_enum_constant "$1"; + grepc_func "$1"; + grepc_linux "$1"; + grepc_glibc "$1"; + grepc_type "$1"; +} + + main() { grepc_parse_cmd $@; - grepc_find_files "$identifier"; - - grepc_macro "$identifier"; - grepc_enum_constant "$identifier"; - grepc_func "$identifier"; - grepc_linux "$identifier"; - grepc_glibc "$identifier"; - grepc_type "$identifier"; + grepc_grepc "$identifier" \ + | tail -n+3; } diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1 index b50a7bc..7003255 100644 --- a/share/man/man1/grepc.1 +++ b/share/man/man1/grepc.1 @@ -49,16 +49,12 @@ Default: .SH EXAMPLES .EX .RB \(ti/src/nginx/unit$ " grepc nxt_sprintf;" -\& -\& \&./src/nxt_sprintf.h:15: - NXT_EXPORT u_char *nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...); \& \& \&./src/nxt_sprintf.c:58: - u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { |