Пример #1
0
static bool bprint_EndLine(BPRINT_BUFFER & bp)
{
   bool fAdded = false;
   if (bp.cch > 0 && bp.psz[bp.cch-1] != '\n')
      {
      bp.psz[bp.cch++] = '\n';
      bp.psz[bp.cch] = 0;
      fAdded = true;
      }
   bprint_Write(bp, NULL);
   return fAdded;
}
Пример #2
0
static int __cdecl dprintf(int flags, LPCTSTR pszFormat, ...) 
{ 
   if (!(DebugFlags & flags))
       return 0;

   va_list va;
   va_start(va, pszFormat);
   int cch = bvprintf(g_bprint, pszFormat, va);
   va_end(va);

   // if this string ended in \n, flush the bprint buffer.
   if (g_bprint.cch > 0 && g_bprint.psz[g_bprint.cch-1] == _UT('\n'))
       bprint_Write();

   return cch;
}