cxtvratedbg.h

来自「完整的基于Conxant平台的USB电视棒的WIN驱动程序。」· C头文件 代码 · 共 50 行

H
50
字号
/*+++ *******************************************************************\ 
* 
*  Copyright and Disclaimer: 
*  
*     --------------------------------------------------------------- 
*     This software is provided "AS IS" without warranty of any kind, 
*     either expressed or implied, including but not limited to the 
*     implied warranties of noninfringement, merchantability and/or 
*     fitness for a particular purpose.
*     --------------------------------------------------------------- 
*   
*     Copyright (c) 2004 Conexant Systems, Inc. 
*     All rights reserved. 
*
\******************************************************************* ---*/ 

// cxTVRate.h

#ifndef _CXTVRATE_DBG_H
#define _CXTVRATE_DBG_H

#include "stdio.h"

static
void dbgPrnt( char *fmt, ... )
{
    va_list args;
    va_start( args, fmt );
    char buf[200] = "cxTVRate: ";
	const size_t header_size = sizeof "cxTVRate: ";

    //vsprintf is deprecated in Visual Studio 2005, but vsprintf_s is not
    // defined in Visual Studio 6.
#ifdef USE_VS_2005
    vsprintf_s( buf + header_size - 1, 200 - header_size, fmt, args );
#else
    vsprintf( buf + header_size - 1, fmt, args );
#endif

    OutputDebugStringA( buf );
    va_end( args );
}

#ifdef _DEBUG
  #define DBP(x) dbgPrnt x
#else
  #define DBP(x) 
#endif 

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?