testinfo.c

来自「详细介绍了一篇关于pci开发的接口芯片」· C语言 代码 · 共 37 行

C
37
字号
/*
	testinfo.c

	testinfo() common function for tests to return information
	as to something that happened that did not cause a fatal
	error - such as the inability to run a test due to 
	improper configuration.

	The main test program will always set the variable "test_has_info_did_not_run"
	to FALSE. testinfo() will set this variable to TRUE so the
	main test handler can handle it.

	The global string "infostring" can be used to put this kind
	of informational text.

	Entry:	Only called if no fatal test error.
	Return:	FALSE
*/

#include <stdtypes.h>
#include <stdio.h>
#include <string.h>

/* non-standard includes... */
#include <lib.h>

extern int test_has_info_did_not_run;
extern CHAR infostring[];

int testinfo( CHAR *text )
{
	if ( text != NULL )
		strcat( infostring, text );
	test_has_info_did_not_run = TRUE;
	return TRUE;
}

⌨️ 快捷键说明

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