📄 fantasylib.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 + -