]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc.1: EXAMPLES: Add example with nxt_sprintf
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 9 May 2022 15:45:44 +0000 (17:45 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:53 +0000 (21:28 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
share/man/man1/grepc.1

index 58fb692abf03edf2c0505791741c6c7dc1194b4c..254592f0b0ccdff2162d3bf984241b8a5d2637c9 100644 (file)
@@ -14,6 +14,32 @@ in all .c and .h files under
 is normally a C identifier,
 but it is actually a PCRE pattern,
 so it can be used to find complex patterns.
+.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, ...)
+{
+    u_char   *p;
+    va_list  args;
+
+    va_start(args, fmt);
+    p = nxt_vsprintf(buf, end, fmt, args);
+    va_end(args);
+
+    return p;
+}
+.EE
 .SH AUTHORS
 Originally written by
 .MT alx.manpages@gmail.com