Date: Thu, 4 Feb 1999 18:34:40 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Stromberg cc: DJGPP-WORKERS Subject: Re: _llseeks()'s return value In-Reply-To: <199902041628.RAA20812@juno.erisoft.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com On Thu, 4 Feb 1999, Martin Stromberg wrote: > So can you tell me what your solution to know if we are beyond the > beginnig of the file is? Assuming you get zero from lseek when you are at the beginning, once you get -1, halve the step size and alternate its sign as required, until you get to the beginning. Then stop.