How do you make a FILE *
that calls your callbacks on fread()
and fwrite()
instead of writing to a file descriptor.
-
On glibc, use fopencookie(3)
-
On FreeBSD or Mac OS, use funopen(3)
How do you make a FILE *
that calls your callbacks on fread()
and fwrite()
instead of writing to a file descriptor.
On glibc, use fopencookie(3)
On FreeBSD or Mac OS, use funopen(3)