version 1.34, 2013/04/20 17:39:50 |
version 1.35, 2014/03/20 07:47:29 |
|
|
ttraw(void) |
ttraw(void) |
{ |
{ |
if (tcgetattr(0, &oldtty) < 0) { |
if (tcgetattr(0, &oldtty) < 0) { |
|
dobeep(); |
ewprintf("ttopen can't get terminal attributes"); |
ewprintf("ttopen can't get terminal attributes"); |
return (FALSE); |
return (FALSE); |
} |
} |
|
|
newtty.c_cflag |= CS8; |
newtty.c_cflag |= CS8; |
#endif |
#endif |
if (tcsetattr(0, TCSASOFT | TCSADRAIN, &newtty) < 0) { |
if (tcsetattr(0, TCSASOFT | TCSADRAIN, &newtty) < 0) { |
|
dobeep(); |
ewprintf("ttopen can't tcsetattr"); |
ewprintf("ttopen can't tcsetattr"); |
return (FALSE); |
return (FALSE); |
} |
} |
|
|
{ |
{ |
ttflush(); |
ttflush(); |
if (tcsetattr(0, TCSASOFT | TCSADRAIN, &oldtty) < 0) { |
if (tcsetattr(0, TCSASOFT | TCSADRAIN, &oldtty) < 0) { |
|
dobeep(); |
ewprintf("ttclose can't tcsetattr"); |
ewprintf("ttclose can't tcsetattr"); |
return (FALSE); |
return (FALSE); |
} |
} |