fantasylib.c
来自「Vxworks的培训教程,大家分享下啊,」· C语言 代码 · 共 36 行
C
36 行
/* 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 + =
减小字号Ctrl + -
显示快捷键?