diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-09 17:45:44 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-09 18:04:08 +0200 |
commit | 1003dc2c15bdb6b22e2dd8ea9d30eed5018d1d65 (patch) | |
tree | 51ab8d1e8026959012d3e7d4c96203bebe91b7c8 /share | |
parent | 7559716efec37ea98dcc38de679a4502a1117018 (diff) |
grepc.1: EXAMPLES: Add example with nxt_sprintf
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man1/grepc.1 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1 index 58fb692..254592f 100644 --- a/share/man/man1/grepc.1 +++ b/share/man/man1/grepc.1 @@ -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 |