#include <termios.h>
#include <stdio.h>
int main()
{
struct termios info;
int rv;
rv = tcgetattr(0, &info);
if (rv == -1 )
{
perror("tcgetattr");
exit(1);
}
if (info.c_lflag & ECHO)
printf("echo is on, since its bit is 1\n");
else
printf("ECHO IS OFF , SINCe ITS BIT IS 0\n");
return 0;
}
'IT' 카테고리의 다른 글
terminal info? status? 를 보여주는 프로그램 (0) | 2014.10.08 |
---|---|
아규먼트로 y를 주면 echo를 켜는 프로그램. (0) | 2014.10.08 |
fcntl을 이용한 (뭐하는지 모르겠는) 코드 (0) | 2014.10.08 |
getchar를 이용한 (뭐하는지 모르겠는) (0) | 2014.10.08 |
rm1.c (0) | 2014.10.01 |