Exemplo n.º 1
0
static FILE *
mkfilebuf(void)
{
	size_t *offp;

	offp = malloc(sizeof(*offp));	/* XXX leak */
	*offp = 0;
	return (fropen(offp, _reader));
}
Exemplo n.º 2
0
main()
{
	run("-", stdout);

	run("funopen", funopen((void *)5, do_read, &do_write, do_seek, do_close));

	run("fropen", fropen(NULL, do_read));

	run("fwopen", fwopen(NULL, do_write));
}