[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File descriptor indeed not always available? (was: Re: How do I pass
From: |
John W. Eaton |
Subject: |
Re: File descriptor indeed not always available? (was: Re: How do I pass a file pointer to my octfile?) |
Date: |
Thu, 23 Sep 2010 19:07:58 -0400 |
On 24-Sep-2010, Olaf Till wrote:
| On Thu, Sep 23, 2010 at 02:52:20PM -0400, John W. Eaton wrote:
| > On 23-Sep-2010, Olaf Till wrote:
| >
| > | At the
| > | moment, c_zfile_ptr_buf::file_number() in c-file-ptr-stream.h still
| > | returns -1 and
| > |
| > | fopen ("foo.gz", "wz")
| > |
| > | will return -1 in current Octave.
| > |
| > | But surely you are just about to change this?
| >
| > No, I missed that, but yes, I will see about fixing it. Should we
| > maybe just remove the file_number function from the stream buffer?
| > That info is now handled by the corresponding stream classes. Or
| > should the file descriptor number be stored in the stream buffer class
| > with the stream classes forwarding to that? I think the simpler thing
| > is the first option.
|
| Sounds reasonable (the first option), but I wouldn't trust myself to
| give advice here.
|
| I must admit that, having seen file_number() in c_zfile_ptr_buf, I
| didn't notice that file_number() was also already in the z stream
| class; and I infered only from c_zfile_ptr_buf::file_number() that
| Octaves
|
| fopen ("foo.gz", "wz")
|
| should still return -1, not by testing (can not run autogen.sh with
| current sources at the moment).
This works correctly. The part I missed and intend to fix was the
c_zfile_ptr_buf::file_number function always returning -1.
jwe