//=========================================================================== // // Parameter: - // Returns: - // Changes Globals: - //=========================================================================== void Log_Print(char *fmt, ...) { va_list ap; char buf[2048]; va_start(ap, fmt); vsprintf(buf, fmt, ap); va_end(ap); if (verbose) { #ifdef WINBSPC WinBSPCPrint(buf); #else printf("%s", buf); #endif //WINBSPS } //end if if (logfile.fp) { Log_UnifyEndOfLine(buf); fprintf(logfile.fp, "%s", buf); fflush(logfile.fp); } //end if } //end of the function Log_Print
//=========================================================================== // // Parameter: - // Returns: - // Changes Globals: - //=========================================================================== void Log_Print( char *fmt, ... ) { va_list ap; #ifdef WINBSPC char buf[2048]; #endif //WINBSPC if ( verbose ) { va_start( ap, fmt ); #ifdef WINBSPC vsnprintf( buf, sizeof(buf), fmt, ap ); buf[2047] = '\0'; WinBSPCPrint( buf ); #else vprintf( fmt, ap ); #endif //WINBSPS va_end( ap ); } //end if va_start( ap, fmt ); if ( logfile.fp ) { vfprintf( logfile.fp, fmt, ap ); fflush( logfile.fp ); } //end if va_end( ap ); } //end of the function Log_Print