Path: utzoo!attcan!uunet!portal!atari!kbad
From: kbad@atari.UUCP (Ken Badertscher)
Newsgroups: comp.sys.atari.st
Subject: Re: File handle info
Message-ID: <1069@atari.UUCP>
Date: 5 Jun 88 19:05:18 GMT
References: <479@ruuinf.UUCP>
Organization: Atari Corp., Sunnyvale, CA
Lines: 24

in article <479@ruuinf.UUCP>, piet@ruuinf.UUCP (Piet van Oostrum) says:

> So, *WHAT* is the documented return value from Fseek, especially
> in the case I use. I never saw any description of Fseek telling what the
> return code (except in case of an error) is. Is the return code you use
> (the actual position in the file, 0 for a non-file) documented?
> 
> In fact if it is documented to ALWAYS return 0 on a terminal, then my code
> is reliable.

  According to the GEMDOS manual, Fseek "returns the current, absolute
position in the file."  If there is an error, Fseek should return an
error code.  It is not documented to always return 0 on a terminal.
The method I posted is taken directly from the TOS release notes for the
latest version of TOS, and it will be making its way to developers via the
developer newsletter soon.  In fact, I believe this method originally came
from David Parsons and was posted on the net some time ago (sorry, I can't
seem to find David's address at the moment).

  If you use the approved isatty, you won't lose.

Ken Badertscher
Atari Corporation
Software Test/Support