On 12/29/2004-06:10PM, Dan Nelson wrote:
> 
> I think your problem here is with rewind().  There's nothing that says
> it has to change the underlying filedescriptor; FreeBSD's fseek code
> knows that the beginning of the file is still within its stdio buffer,
> so it simply resets the seek offset in the FILE* back to zero. See the
> code in /usr/src/lib/libc/stdio/fseek.c . Replacing your rewind() with
> an lseek(0,0,SEEK_SET) makes the program work.
>  
> -- 
>       Dan Nelson
>       [EMAIL PROTECTED]
> 

Perfect!  It works, and it even makes sense to me :)

Thank you!

-- 
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to