fdebug.c
来自「FDEBUG module for debug on any platform.」· C语言 代码 · 共 35 行
C
35 行
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "FDebug.h"
#if defined(__FDEBUG__)
FILE *debugfp;
void _fdebug_open()
{
debugfp= fopen("c:\\debug.txt" , "w" );
}
void _fdebug(char* pszFile, const char* pszFunc, unsigned int iLine, char *lpszFormat, ...)
{
char temp[1024], tmpStr[1024];
va_list args ;
sprintf(temp, "%s : %s[%d]__", pszFile, pszFunc, iLine);
va_start(args, lpszFormat);
vsprintf(tmpStr, lpszFormat, args);
fprintf(debugfp,"%s %s \r\n", temp, tmpStr);
fflush(debugfp);
va_end(args);
}
void _fdebug_close()
{
fclose(debugfp);
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?