From bug-request at octave dot org Tue Dec 21 03:45:54 2004 Subject: Re: Possible Error in -ascii save/restore From: Miroslaw Kwasniak To: bug at octave dot org Date: Tue, 21 Dec 2004 10:47:52 +0100 On Mon, Dec 20, 2004 at 10:20:41AM -0500, John W. Eaton wrote: > So they are saying that there is no way to use ftell/fseek on a text > file with CRLF line endings opened in text mode? Then we would have > to open them in binary mode and do the CRLF processing ourselves? > This does not seem good. Or have I forgotten something basic, and > ftell/fseek should never be assumed to work on text files? About ten years ago I worked with ftell/fseek in text files in Turbo Pascal, as I remeber it was stupid heuristics. Some my old m-files ported from matlab4 still have CRLF handling ;) > | A > | Ctrl-Z encountered while reading a file sets the End Of File flags even > | though it truly isn't the end of file. > > This is also potentially bad, but probably doesn't affect Octave > because I don't think we would have any ^Z characters in text files. But real wild data can have it :( One gives me such files from our lab equipment. Mirek ------------------------------------------------------------- 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 -------------------------------------------------------------