I/O buffer size using lattice-C
Harold Holtz III
holtz at sdcsvax.UCSD.EDU
Wed Jan 7 15:40:04 AEST 1987
There are two ways to change buffer sizes in Lattice C:
1. Set the external int _bufsiz to the size you want BEFORE issuing the
fopen. It would be wise to change constant BUFSIZ in stdio.h to the
value most commonly used. This method should work in both V2 and V3.
(_bufsiz supposedly defaults to BUFSIZ, but don't believe it; set it
before using fopen to guarantee success)
2. In V3 only: use the setvbuf function described on page F-281 of the
second volume of the V3 ref. This has several advantages; see the
manual for details, but beware the caution on F-283. This call is
done AFTER the fopen.
Fred Holtz
holtz at beowulf.UCSD.EDU
More information about the Comp.lang.c
mailing list