From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] the declaration of main() From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20010424102506.0481119AA6@mail.cse.psu.edu> Date: Tue, 24 Apr 2001 11:32:07 +0100 Topicbox-Message-UUID: 8df1f13a-eac9-11e9-9e20-41e7f4b1d025 gwyn@arl.army.mil wrote: > forsyth@vitanuova.com wrote: > > it's unfortunately more error prone than void/exit. for instance, it was > > common to forget fflush() in the presence of setbuf/setvbuf in main for an auto buffer > > and worse, that sometimes `worked' (until ported). > > I don't understand what you're talking about. consider: #include int main(void) { char buf[100]; setvbuf(stdout, buf, _IOFBF, sizeof(buf)); printf("hello, world\n"); return 0; }