⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plx_debug.c

📁 mtk wap和mms代码。。适应mtk 25。26平台
💻 C
字号:
/**************************************************************************\
*
*                      Pollex Mobile Platform
*
* Copyright (c) 2004 by Pollex Mobile Software Co., Ltd.  
*                       All Rights Reserved
*
* Model   :
*
* Purpose :
*  
* Author  : 
*
*-------------------------------------------------------------------------
*
* $Archive::                                                       $
* $Workfile::                                                      $
* $Revision::    $     $Date::                                     $
* 
\**************************************************************************/

#include "plxclib.h"
#include "plxfs.h"


static FILE *plx_debug_fp = NULL;

/*********************************************************************
* Function	   
* Purpose      
* Params	   
* Return	 	   
* Remarks	   
**********************************************************************/
int PlxInitDebugFile(const char *filename)
{
	const char *defaultfile = "d:\\plx_debug.txt";

    if ( filename == NULL || *filename == 0 )
		filename = defaultfile;
	filename = defaultfile;
    plx_debug_fp = fopen(filename, "w+");
    if ( plx_debug_fp == NULL )
        return 0;
    return 1;
}

/*********************************************************************
* Function	   
* Purpose      
* Params	   
* Return	 	   
* Remarks	   
**********************************************************************/
int PlxWriteToDebugFile(void *mem, const char *act, const char *file, int line)
{
    char debugline[256];
    int ret;

    if ( plx_debug_fp == NULL )
        return 0;
#ifdef PLX_DEBUG_TO_FILE
	ret = fwrite(act, 1, strlen(act), plx_debug_fp);
	fwrite("\r\n", 1, 2, plx_debug_fp);
    fflush( plx_debug_fp );
#else
    sprintf(debugline, "%s : %x    file:%s    line:%d\r\n", act,  mem, file, line);

//    ret = fputs(debugline,  plx_debug_fp);
    ret = fwrite(debugline, 1, strlen(debugline), plx_debug_fp);
#endif
    return ret;
}

/*********************************************************************
* Function	   
* Purpose      
* Params	   
* Return	 	   
* Remarks	   
**********************************************************************/
void PlxCloseDebugFile(void)
{
    fclose( plx_debug_fp );
    plx_debug_fp = NULL;
}


/*********************************************************************
* Function	   
* Purpose      
* Params	   
* Return	 	   
* Remarks	   
**********************************************************************/



⌨️ 快捷键说明

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