On Mon, Nov 22, 1999, Zhihui Zhang wrote:
>       lseek(fileno(fp),  3 * 8192, SEEK_CUR);

> If I remove the fflush(fp), then the characters 0x30-0x39 will be all
> written at the end of the file (use hexdump to find out), not as expected
> (one at the beginning and the other at the end).  It seems to me that the
> first for loop happens AFTER the lseek() statement without fflush().  Can
> anyone explain this to me?  I am using FreeBSD 3.3-Release.

   That line (as quoted) where you use lseek is broken.  Use
fseek instead.

   Use only one method to access files.  Either stdio or the
open/read/write syscalls.

-- 
|Chris Costello <[EMAIL PROTECTED]>
|If a group of N persons implements a COBOL compiler, there will be N-1
|passes.  Someone in the group has to be the manager.    -- T. Cheatham
`----------------------------------------------------------------------


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to