Xref: news-dnh.mv.net comp.os.msdos.djgpp:979 Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!news.mathworks.com!newshost.marcam.com!charnel.ecst.csuchico.edu!zippy From: zippy AT hairball DOT ecst DOT csuchico DOT edu (The Pinhead) Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP's stdout file Date: 18 Jul 1995 23:05:40 GMT Organization: California State University, Chico Lines: 19 References: Nntp-Posting-Host: hairball.ecst.csuchico.edu To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp In article kagel AT quasar DOT bloomberg DOT com writes: I've got a problem porting BolrandC programs to DJGPP: if I don't specify setbuf(stdout, NULL) in DJGPP I have a buffered output, that can't be seen until the newline is printed... How can I do to avoid the setbuf line in every program? Print to stderr rather than stdout (ie use fprintf( stderr, ....); instead of printf(...);) DJGPP is behaving correctly. Or place a fflush(stdout) after the printf, since that is what you mean. I mean, why play non-portable buffering games in your code and make it harder to understand? -- Ronald Cole E-mail: zippy AT ecst DOT csuchico DOT edu Senior Software Engineer ronald AT optx DOT com OTCS Incorporated, a Brian Meyerpeter company ronald AT netcom DOT com "The Bill Of Rights -- Void Where Prohibited By Law"