[BACK]Return to ttyio.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/ttyio.c between version 1.34 and 1.35

version 1.34, 2013/04/20 17:39:50 version 1.35, 2014/03/20 07:47:29
Line 59 
Line 59 
 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);
         }          }
Line 81 
Line 82 
         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);
         }          }
Line 114 
Line 116 
 {  {
         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);
         }          }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35