From bug-request at octave dot org Tue Nov 30 07:51:50 2004 Subject: Re: fseek: return status instead of stopping with an error From: "John W. Eaton" To: Alois Schloegl Cc: bug at octave dot org Date: Tue, 30 Nov 2004 08:52:52 -0500 On 30-Nov-2004, Alois Schloegl wrote: | How about checking the size of the file during FOPEN? And saving the | size somewhere within the file handle. | FSEEK should be able to access this size field, and it check whether the | file handle points beyond the end-of-file. | This would eliminate the need of up to three rep->seek's within fseek. I don't think that would be reliable. The file could change size after it is opened. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------