热门关键字:
当前位置 :| 主页>操作系统>LINUX系统>

在linux中用c语言实现getch()功能

来源: 作者: 时间:2008-04-17 点击:
以下是网络资料,还没经过测试



#include

#include



static struct termio ttysave;

void restore(void);

char getch(void);

int main(void)

{.....}



char getch(void)

{

static char ch;

static int total,flag=1;

struct termio tty;

if (flag)

{

flag=0;

if(ioctl(0,TCGETA,


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
栏目列表
推荐内容