Subject: Fseek Help?
From: [email-masked] (Christopher Donham)

16 Jun 1998 16:35:41 -0700
Message-ID: <[email-masked]>
To: [email-masked]

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.

Christopher Donham
Silicon Graphics, VSG                             Phone:  (415) 933-2474
2011 N. Shoreline Blvd MS 43U-993                 FAX:    (415) 932-2474
Mountain View, CA 94043-1389                      E-Mail: [email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".