log.c
来自「傅立叶变换和小波变换是图像压缩的重要工具。该代大戏是利用小波变换进行图像压缩。」· C语言 代码 · 共 42 行
C
42 行
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
static FILE * TeeFP = stdout; // should default to null ?
void Log_Out(const char * string)
{
OutputDebugString(string);
if ( TeeFP )
fprintf(TeeFP,string);
}
void Log_Puts(const char * string)
{
Log_Out(string);
Log_Out("\n");
}
void Log_Printf(const char * String, ...)
{
va_list ArgPtr;
char TempStr[4096];
va_start(ArgPtr, String);
vsprintf(TempStr, String, ArgPtr);
va_end(ArgPtr);
Log_Out(TempStr);
}
void Log_TeeFile( FILE * FP )
{
TeeFP = FP;
}
#ifndef NO_LOG
#pragma message("LOG on")
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?