示例#1
0
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
int __cdecl CP_printfCreate( char * szTitle ){
  x_CmdWnd.Create(szTitle, TRUE);
  x_CmdWnd.Color( x_awDebugColors[LEVEL_NORMAL] );
  x_CmdWnd.Clear();

  return 0;
}
示例#2
0
int __cdecl CP_vprintf( int iDebugLevel, const char *format, va_list args) {
  int iRet;

  if( (iDebugLevel < DEBUG_THRESHOLD) || 
      (iDebugLevel < 0) || (iDebugLevel >= N_PRINT_LEVELS))  return 0;

  iRet = _vsnprintf( x_szTmp, MAX_STR_LEN, format, args);  
  // Did some error, but not buffer overflow occur?
  if( (iRet < 0) && (iRet != -1) ) { 
    return iRet;
  }
  // Set text color
  x_CmdWnd.Color( x_awDebugColors[iDebugLevel] );
  x_CmdWnd.Output(x_szTmp);

//  strcat( g_szLogBuffer, x_szTmp );  // add to the log string
  return iRet; 

}