I have a library function that reads from a file descriptor, and I'd like to jam it into a filter. I've been thinking that GNU libc has some cool features where one can define custom streams. If one defines a read, write, seek, close and a position data structure, GNU libc lets you open a stream via those tools, producing a FILE *. Maybe that would allow me to read from a brigade as if it were a FILE * and I could pass it on to this library function. Of course its very platform specific, but that is an overrated virtue anyway. What do you all think of the specific idea, and do you have any better way for me to get access to this library? I could give the library a buffer too, but the buffer would be way too large, so I want something more stream oriented. I'd like to be able to hand off a brigade to the library, but of course nobody else has brigades.
Brian
