Subject: stat vs read: file sizes
From: [email-masked] ("Theodore W. Leung")

5 Jul 1997 01:21:42 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked] (Unverified)
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.2 (32)
Original-To: [email-masked]
Original-Sender: [email-masked]

I've been working on porting glimpse to GNU-Win32, and I've run into a
problem.  glimpse uses a technique where stat is called to determine the
file size, S, and then read is called to read S bytes from the file.  The 
problem is that reading S bytes from the file returns a size T less than S.
This number appears to be off by the number of lines in the file (as
reported by NTEmacs).  I'm guessing that there is some CR/LF mapping going
on behind the
scenes.  Short of rewriting the glimpse code, is there a way/mode to handle
this?

Thanks,

Ted
______________________________________________________________________________
Ted Leung	[email-masked] or [email-masked]      http://pobox.com/~twl
______________________________________________________________________________

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".