sample.c
来自「此程序运行在Tornado环境中,里面包含了tornado入门的基本程序,也是V」· C语言 代码 · 共 29 行
C
29 行
/* sample - example of shell-less application */
#include "vxWorks.h"
#include "stdio.h"
#include "ioLib.h"
#include "usrLib.h"
#define BUF_SIZE (80)
int sample(void)
{
char buf [BUF_SIZE];
int length;
version();
printf ("\n\nWelcome to this stunning VxWorks application program\n\n");
FOREVER
{
printf ("Type something\n");
length = read (STD_IN, buf, sizeof(buf) - 1);
if (length <= 1)
continue;
buf [length-1] = '\0';
printf ("You typed \"%s\"\n\n", buf);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?