X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FSetTermAttr.c;h=c0e79c3a0affb370bc3a0332c94e77dc5b60dd9a;hp=c41fef124942a0b81121814283a86148e48e4fe6;hb=fa15a3f1ecd64efd8440e46d398fd9976abc3d25;hpb=c1cec4e931bf5bc2659d292e27f77a95ab72bf83 diff --git a/sources/SetTermAttr.c b/sources/SetTermAttr.c index c41fef1..c0e79c3 100644 --- a/sources/SetTermAttr.c +++ b/sources/SetTermAttr.c @@ -24,25 +24,24 @@ * Author: Simone Piccardi * Jun. 2001 * - * $Id: SetTermAttr.c,v 1.1 2002/10/09 16:59:39 piccardi Exp $ - * ****************************************************************/ -#include -#include -#include +#include /* unix standard library */ +#include /* terminals constants, types and functions */ +#include /* error definitions and routines */ +#include /* standard I/O library */ int SetTermAttr(int fd, tcflag_t flag) { struct termios values; int res; - res = tcgetattr (desc, &values); + res = tcgetattr (fd, &values); if (res) { perror("Cannot get attributes"); return res; } values.c_lflag |= flag; - res = tcsetattr (desc, TCSANOW, &values); + res = tcsetattr (fd, TCSANOW, &values); if (res) { perror("Cannot set attributes"); return res; @@ -54,13 +53,13 @@ int UnSetTermAttr(int fd, tcflag_t flag) struct termios values; int res; - res = tcgetattr (desc, &values); + res = tcgetattr (fd, &values); if (res) { perror("Cannot get attributes"); return res; } values.c_lflag &= (~flag); - res = tcsetattr (desc, TCSANOW, &values); + res = tcsetattr (fd, TCSANOW, &values); if (res) { perror("Cannot set attributes"); return res;