]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc, grepc.1: Don't print leading blank lines.
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 11 May 2022 19:36:45 +0000 (21:36 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:58 +0000 (21:28 +0100)
Also, update the manual page EXAMPLES regarding blank lines.

Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc
share/man/man1/grepc.1

index 56a1914d191b6d8b32bd67ff1aa62fa1aaed9702..e8c49c39b903046ceb3f8307a0ec66bb90f2cfb4 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -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;
 }
 
 
index b50a7bc701f37c60a2b8100aa34c805cb18bd451..7003255910733e1cacf68bf6c51260c1fc7049fd 100644 (file)
@@ -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, ...)
 {