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

📄 fantasylib.c

📁 Vxworks的培训教程,大家分享下啊,
💻 C
字号:
/* fantasyLib.c - example use of error codes */

#include "vxWorks.h"
#include "fantasyLib.h"
#include "stdio.h"
#include "errno.h"
#include "string.h"

int fantasyCurrent;

STATUS fantasySet 
	(
	int dream,
	char *world
	)
	{

	if (dream < 0)
		{
		errno = S_fantasyLib_INVALID_DREAM;
		perror("This time");
		return (ERROR);
		}

	/* Boring fantasies. Must be on earth */
	if (strcmp("Earth", world))
		{
		errno = S_fantasyLib_UNKNOWN_WORLD;
		perror("This time");
		return (ERROR);
		}

	fantasyCurrent = (dream - 32) * 100/180;
	return (OK);
	}

⌨️ 快捷键说明

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