Versione finale del client ECHO su TCP, con esempio di uso della funzione
[gapil.git] / listati / UnSetTermAttr.c
1 int UnSetTermAttr(int fd, tcflag_t flag) 
2 {
3     struct termios values;
4     int res;
5     res = tcgetattr (desc, &values);
6     if (res) {
7         perror("Cannot get attributes");
8         return res;
9     }
10     values.c_lflag &= (~flag);
11     res = tcsetattr (desc, TCSANOW, &values);
12     if (res) {
13         perror("Cannot set attributes");
14         return res;
15     }
16     return 0;
17 }