repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* elf/Makefile (ld.so): Adjust the sed script to insert _begin in to
[glibc.git]
/
manual
/
examples
/
memstrm.c
blob
1674c36e0b175e062d203fd4c1b7a00c79765713
1
#include <stdio.h>
2
3
int
4
main
(
void
)
5
{
6
char
*
bp
;
7
size_t
size
;
8
FILE
*
stream
;
9
10
stream
=
open_memstream
(&
bp
, &
size
);
11
fprintf
(
stream
,
"hello"
);
12
fflush
(
stream
);
13
printf
(
"buf = `%s', size = %d
\n
"
,
bp
,
size
);
14
fprintf
(
stream
,
", world"
);
15
fclose
(
stream
);
16
printf
(
"buf = `%s', size = %d
\n
"
,
bp
,
size
);
17
18
return
0
;
19
}