Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!ucbcad!ucbvax!sdcsvax!holtz From: holtz@sdcsvax.UCSD.EDU (Harold Holtz III) Newsgroups: comp.lang.c Subject: Re: I/O buffer size using lattice-C Message-ID: <2423@sdcsvax.UCSD.EDU> Date: Wed, 7-Jan-87 00:40:04 EST Article-I.D.: sdcsvax.2423 Posted: Wed Jan 7 00:40:04 1987 Date-Received: Wed, 7-Jan-87 03:38:37 EST References: <829@A60.UUCP> Organization: University of California, San Diego Lines: 16 Summary: Changing the default buffer size 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@beowulf.UCSD.EDU