This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
>If you're going to do that, you should do so in a way that benefits >all of Guile. Basically, you're talking about re-implementing stdio's >buffering. I think that's a great idea --- in fact, it's on the list >of projects looking for volunteers that I just posted. I wonder if it would be a good idea. If you think it is, maybe the code below might be of use to you. I wrote it a long while ago, because I got sick of the pain of stdio. The design is very simple. The interface is a shadow of the regular UNIX read() write() etc. Instead of passing around file descriptors, you pass around buffered file descriptors (BFDs). Because of the way it works you can easily implement other sources and sinks of data such as memory that looks like a file and so on. The code is (IMHO) very clean, and it shouldn'tsuffer from the read/write problem of stdio (it is catered for). But whether it is faster, I can't say. If it looks useful, let me know. (See attached file: bopen.h)(See attached file: bopen.c)(See attached file: rbopen.h)(See attached file: rbopen.c)