static FILE * mkfilebuf(void) { size_t *offp; offp = malloc(sizeof(*offp)); /* XXX leak */ *offp = 0; return (fropen(offp, _reader)); }
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)); }