📄 echostate.c
字号:
/* echostate.c * reports current state of echo bit in tty driver for fd 0 * shows how to read attributes from driver and test a bit */#include <stdio.h>#include <termios.h>main(){ struct termios info; int rv; rv = tcgetattr( 0, &info ); /* read values from driver */ 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 if OFF, since its bit is 0\n");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -