mirror of https://github.com/mkerrisk/man-pages
stpcpy.3: Add missing pieces/fix various problems in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
b6898014c5
commit
56e50303bb
|
@ -59,12 +59,16 @@ to concatenate \fBfoo\fP and
|
|||
.in +4n
|
||||
.nf
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
char buffer[20];
|
||||
char *to = buffer;
|
||||
|
||||
to = stpcpy(to, "foo");
|
||||
to = stpcpy(to, "bar");
|
||||
printf("%s\\n", buffer);
|
||||
|
|
Loading…
Reference in New Issue