projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revisione, uniformato l'uso di glibc al singolare.
[gapil.git]
/
listati
/
SetTermAttr.c
diff --git
a/listati/SetTermAttr.c
b/listati/SetTermAttr.c
index 41656f24769cea4dbb6a1ed7c957095ccc6b1938..fbec08f444f45b5a338c3a0683e84c0d8804d699 100644
(file)
--- a/
listati/SetTermAttr.c
+++ b/
listati/SetTermAttr.c
@@
-1,19
+1,16
@@
#include <unistd.h>
#include <termios.h>
#include <errno.h>
#include <unistd.h>
#include <termios.h>
#include <errno.h>
-
int SetTermAttr(int fd, tcflag_t flag)
{
struct termios values;
int res;
int SetTermAttr(int fd, tcflag_t flag)
{
struct termios values;
int res;
- res = tcgetattr (desc, &values);
- if (res) {
+ if (res = tcgetattr(desc, &values)) {
perror("Cannot get attributes");
return res;
}
values.c_lflag |= flag;
perror("Cannot get attributes");
return res;
}
values.c_lflag |= flag;
- res = tcsetattr (desc, TCSANOW, &values);
- if (res) {
+ if (res = tcsetattr(desc, TCSANOW, &values)) {
perror("Cannot set attributes");
return res;
}
perror("Cannot set attributes");
return res;
}