fgets() for open() ??

Walter Bright bright at Data-IO.COM
Thu Aug 31 07:06:27 AEST 1989


In article <410002 at hpdml93.HP.COM> libbyb at hpdml93.HP.COM (Libby Bagley) writes:
<The question comes up because I would like to
<lseek() a line at a time for variable length
<lines.

I don't know your specific application, but in general if you do that
you will wind up with an incredibly slow program. That's why the fxxxx()
functions were written, to buffer the disk I/O to speed it up.

I suggest you investigate using fseek() and ftell() instead.



More information about the Comp.lang.c mailing list