From: lhall@rfk.com (Larry Hall)
Subject: Re: Fseek Help?
17 Jun 1998 15:21:06 -0700
Message-ID: <3.0.5.32.19980617091331.00ac2560.cygnus.gnu-win32@pop.ma.ultranet.com>
References: <199806160527.WAA119358@axon.engr.sgi.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: donham@axon.engr.sgi.com (Christopher Donham), gnu-win32@cygnus.com

At 10:27 PM 6/15/98 -0700, Christopher Donham wrote:
>Hi all,
>   A quick question.  I seem to be having trouble getting
>fseek to work.  For some reason after about 900 bytes,
>fseek ceases to go to the correct point in the file.  To
>demonstrate the problem, I have included a test file at
>the end of this message.  Uudecode, ungzip, and untar the
>file and then type "make".  You will get a program called
>"test".  To run the test, type "test test.c".  The program
>will read in the file test.c and then try to fseek to every
>byte within the file.  It compares the contents of the
>file against the next byte read after an fseek.  It prints
>an error if the comparison fails.  On my unix machine,
>this program always succeeds.  On my NT4 SP3 B19 machine,
>it fails at approximately byte 950 (changes from file to
>file).  Any thoughts?  What am I doing wrong?
>
>Thanks for any help.
>
>Chris
>
>P.S.  Note that you have to delete the ^M's to compile on
>a unix machine.

Sounds to me like you have the old binary/text file problem.  I actually
didn't even look at your code but I did try your example and it worked
fine for me on NT4+sp3 and b19.x.  I expect the big difference between 
my system and yours is binary mounts.  Either make this change or force
your code to treat files as binary...


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      (781) 239-1053
8 Grove Street                          (781) 239-1655 - FAX
Wellesley, MA  02181                    http://www.rfk.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
