----------------------------------------------------------------------------- Purpose: Outputs a set of optional arguments to debugging output, using the printf format setting specified in fmt*. -----------------------------------------------------------------------------
| 45 | // the printf format setting specified in fmt*. |
| 46 | //----------------------------------------------------------------------------- |
| 47 | void dprintf( int stream, const char *fmt, ... ) |
| 48 | { |
| 49 | va_list args; |
| 50 | char buffer[2048]; |
| 51 | |
| 52 | va_start( args, fmt ); |
| 53 | vsprintf_s( buffer, fmt, args ); |
| 54 | va_end( args ); |
| 55 | |
| 56 | if ( stream == 0 ) |
| 57 | { |
| 58 | printf( "%s", buffer ); |
| 59 | if( APP ) APP->m_trmErrors.Append( buffer ); |
| 60 | } |
| 61 | else |
| 62 | { |
| 63 | if ( APP ) APP->m_trmProfile.Append( buffer ); |
| 64 | } |
| 65 | |
| 66 | |
| 67 | OutputDebugStringA( buffer ); |
| 68 | } |
| 69 | |
| 70 | |
| 71 |
no test coverage detected