pw_diag.c

来自「Very very small GUI. Usefull for small s」· C语言 代码 · 共 55 行

C
55
字号
#include <stdarg.h>#include <stdio.h>#include <stdlib.h>
#include <string.h>
#include <i_pwin.h>
void SendToHost(char * str, unsigned int t);

/* -------------------------------------------------------------------------- */char sDebugBuff[64];
char sBuff[64];
void IPw_Printf(Pw_Char* format, ...){    va_list ap;    va_start(ap, format);
	vsprintf(&sBuff[1], format, ap);
	sBuff[0] = '\2';
	sBuff[fstrlen(sBuff)] = '\3';
	sBuff[fstrlen(sBuff)+1] = '\0';
	SendToHost(sBuff, 1);    va_end(ap);}void IPw_Trace(Pw_Char* file, Pw_Int aline){    IPw_Printf("TRC\t<%s(:%d)>:",  file, aline); }void IPw_Assert(Pw_Char* file, Pw_Int aline){    IPw_Printf("ASSERT\t<%s(:%d)>:", file, aline); }void IPw_Note( Pw_Char* file, Pw_Int aline){
    IPw_Printf("NOTE:%s\t%d", file, aline); }void IPw_Warn(Pw_Char* file, Pw_Int aline){    IPw_Printf("WARN\t<%s(%d):",file, aline); }void IPw_Fail(Pw_Char* file, Pw_Int line) {    IPw_Printf("FAIL\t<%s(%d):", file, line); }/*---------------------------------------------------------------------------// end of pw_diag.c //--------------------------------------------------------------------------- */

⌨️ 快捷键说明

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