[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] FILE* interface

From: Peter Keller
Subject: Re: [Chicken-users] FILE* interface
Date: Wed, 3 Jul 2002 09:52:49 -0500
User-agent: Mutt/1.2i

On Wed, Jul 03, 2002 at 09:35:16AM +0200, felix wrote:
> Hm. A good question.
> Something along these lines would perhaps be nice:
> [procedure] (file*->port FILEPTR) -> PORT
> [procedure] (port->file* FILEPTR) -> FILEPTR

Yeah, that would be nice. I see you already have open-read-file* and
open-write-file*, but it would be nice just to have (open-file* "file"
"r") or (open-file* "file" "w+"), (or whatever system you use to represent
the modes of the file: :append and the like I think) etc.

Also, don't forget to do the rest of the FILE* operations like fseek,
ftell,freopen,fwrite,fread, etc. Some of them might be able to be
overloaded with current functions that do this for file descriptors.

I think the real difference between the open() and fopen() call semantics
is that fwrite() and fread() will return more of what you expect(fuller
reads/writes of your data) instead of partial reads and writes the
read() and write() will perform for you.

> (I will implement something and send you the code)

Thank you very much!

> Sensible. I will think about this. Perhaps we can provide something similar.

Thanks! It just seems sad to forget the lessons of unix in this particular

Thank you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]