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

Diff for /src/usr.bin/cu/command.c between version 1.1 and 1.2

version 1.1, 2012/07/10 08:02:27 version 1.2, 2012/07/10 08:16:27
Line 101 
Line 101 
 }  }
   
 void  void
   set_speed(void)
   {
           const char      *s, *errstr;
           int              speed;
   
           s = get_input("New speed?");
           if (s == NULL || *s == '\0')
                   return;
   
           speed = strtonum(s, 0, UINT_MAX, &errstr);
           if (errstr != NULL) {
                   warnx("speed is %s: %s", errstr, s);
                   return;
           }
   
           set_line(speed);
   }
   
   void
 do_command(char c)  do_command(char c)
 {  {
         switch (c) {          switch (c) {
Line 113 
Line 132 
                 kill(getpid(), SIGTSTP);                  kill(getpid(), SIGTSTP);
                 set_termios();                  set_termios();
                 break;                  break;
           case 'S':
                   set_speed();
                   break;
         case '$':          case '$':
                 pipe_command();                  pipe_command();
                 break;                  break;
Line 126 
Line 148 
                 break;                  break;
         case '?':          case '?':
                 printf("\r\n"                  printf("\r\n"
                     "~>      send file to remote host\r\n"                      "~#      send break\r\n"
                     "~$      pipe local command to remote host\r\n"                      "~$      pipe local command to remote host\r\n"
                       "~>      send file to remote host\r\n"
                       "~S      set speed\r\n"
                     "~?      get this summary\r\n"                      "~?      get this summary\r\n"
                     "~#      send break\r\n");                  );
                 break;                  break;
         }          }
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2