delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/04/14:17:50

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Message-Id: <199902041628.RAA20812@juno.erisoft.se>
Subject: Re: _llseeks()'s return value
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Thu, 4 Feb 1999 17:28:19 +0100 (MET)
Cc: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
In-Reply-To: <Pine.SUN.3.91.990204131139.7801B-100000@is> from "Eli Zaretskii" at Feb 4, 99 01:13:07 pm
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

> 
> 
> On Thu, 4 Feb 1999, Martin Stromberg wrote:
> 
> > lseek(x, -1, SEEK_CUR) returns -1 if the file pointer is at zero or at
> > 2^31.
> 
> This can be solved also, but is probably messy.  So if EDX is the answer 
> (in which case Ralf Brown should probably be informed about it), then 
> that's the way to go.

Oops! I didn't check closely enough. I didn't lseek() far enough. dx
can hold up to 65535, and I lseek()ed only so dx went up to ~45000.
edx&0xffff0000 is _not_ changed by the call.
Sorry for the confusion.

So can you tell me what your solution to know if we are beyond the
beginnig of the file is?


Right,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019