{ char* bufPref= getenv( "CRTL_STDOUT_BUF_MODE" ); int bufMode= NULL == bufPref ? ( isatty(1) ? _IOLBF : _IOFBF ) : "L"==*bufPref ? _IOLBF : "F"==*bufPref ? _IOFBF : _IONBF; } setvbuf( STDOUT, NULL, bufMode, BUFSIZE ); }