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

Diff for /src/usr.bin/telnet/sys_bsd.c between version 1.26 and 1.27

version 1.26, 2014/07/20 12:08:55 version 1.27, 2014/07/22 07:30:24
Line 57 
Line 57 
   
 struct  termios old_tc = { 0 };  struct  termios old_tc = { 0 };
   
     void  void
 init_sys()  init_sys(void)
 {  {
     tout = fileno(stdout);      tout = fileno(stdout);
     tin = fileno(stdin);      tin = fileno(stdin);
Line 79 
Line 79 
  *      1       Do add this character   *      1       Do add this character
  */   */
   
     int  int
 TerminalSpecialChars(c)  TerminalSpecialChars(int c)
     int c;  
 {  {
     if (c == termIntChar) {      if (c == termIntChar) {
         intp();          intp();
Line 118 
Line 117 
     return 1;      return 1;
 }  }
   
     void  void
 TerminalSaveState()  TerminalSaveState(void)
 {  {
     tcgetattr(0, &old_tc);      tcgetattr(0, &old_tc);
   
Line 148 
Line 147 
 #endif  #endif
 }  }
   
     cc_t *  cc_t *
 tcval(func)  tcval(int func)
     int func;  
 {  {
     switch(func) {      switch(func) {
     case SLC_IP:        return(&termIntChar);      case SLC_IP:        return(&termIntChar);
Line 187 
Line 185 
     }      }
 }  }
   
     void  void
 TerminalDefaultChars()  TerminalDefaultChars(void)
 {  {
     memcpy(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc));      memcpy(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc));
 # ifndef        VDISCARD  # ifndef        VDISCARD
Line 241 
Line 239 
 static void ayt();  static void ayt();
 #endif  #endif
   
     void  void
 TerminalNewMode(f)  TerminalNewMode(int f)
     int f;  
 {  {
     static int prevmode = 0;      static int prevmode = 0;
     struct termios tmp_tc;      struct termios tmp_tc;
Line 489 
Line 486 
 };  };
 #endif  /* DECODE_BAUD */  #endif  /* DECODE_BAUD */
   
     void  void
 TerminalSpeeds(ispeed, ospeed)  TerminalSpeeds(long *ispeed, long *ospeed)
     long *ispeed;  
     long *ospeed;  
 {  {
 #ifdef  DECODE_BAUD  #ifdef  DECODE_BAUD
     struct termspeeds *tp;      struct termspeeds *tp;
Line 520 
Line 515 
 #endif  /* DECODE_BAUD */  #endif  /* DECODE_BAUD */
 }  }
   
     int  int
 TerminalWindowSize(rows, cols)  TerminalWindowSize(long *rows, long *cols)
     long *rows, *cols;  
 {  {
 #ifdef  TIOCGWINSZ  #ifdef  TIOCGWINSZ
     struct winsize ws;      struct winsize ws;
Line 540 
Line 534 
  * Various signal handling routines.   * Various signal handling routines.
  */   */
   
     void  void
 deadpeer(sig)  deadpeer(int sig)
     int sig;  
 {  {
         setcommandmode();          setcommandmode();
         longjmp(peerdied, -1);          longjmp(peerdied, -1);
 }  }
   
     void  void
 intr(sig)  intr(int sig)
     int sig;  
 {  {
     if (localchars) {      if (localchars) {
         intp();          intp();
Line 560 
Line 552 
     longjmp(toplevel, -1);      longjmp(toplevel, -1);
 }  }
   
     void  void
 intr2(sig)  intr2(int sig)
     int sig;  
 {  {
     if (localchars) {      if (localchars) {
 #ifdef  KLUDGELINEMODE  #ifdef  KLUDGELINEMODE
Line 575 
Line 566 
     }      }
 }  }
   
     void  void
 susp(sig)  susp(int sig)
     int sig;  
 {  {
     if ((rlogin != _POSIX_VDISABLE) && rlogin_susp())      if ((rlogin != _POSIX_VDISABLE) && rlogin_susp())
         return;          return;
Line 586 
Line 576 
 }  }
   
 #ifdef  SIGWINCH  #ifdef  SIGWINCH
     void  void
 sendwin(sig)  sendwin(int sig)
     int sig;  
 {  {
     if (connected) {      if (connected) {
         sendnaws();          sendnaws();
Line 597 
Line 586 
 #endif  #endif
   
 #ifdef  SIGINFO  #ifdef  SIGINFO
     void  void
 ayt(sig)  ayt(int sig)
     int sig;  
 {  {
     if (connected)      if (connected)
         sendayt();          sendayt();
Line 609 
Line 597 
 #endif  #endif
   
   
     void  void
 sys_telnet_init()  sys_telnet_init(void)
 {  {
     int one = 1;      int one = 1;
   
Line 649 
Line 637 
  *      The return value is 1 if something happened, 0 if not.   *      The return value is 1 if something happened, 0 if not.
  */   */
   
     int  int
 process_rings(netin, netout, netex, ttyin, ttyout, dopoll)  process_rings(int netin, int netout, int netex, int ttyin, int ttyout,
     int dopoll;         /* If 0, then block until something to do */      int dopoll)         /* If 0, then block until something to do */
 {  {
     int c;      int c;
                 /* One wants to be a bit careful about setting returnValue                  /* One wants to be a bit careful about setting returnValue

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27