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

Diff for /src/usr.bin/cu/cu.c between version 1.20 and 1.21

version 1.20, 2015/01/16 06:40:06 version 1.21, 2015/02/08 17:33:35
Line 65 
Line 65 
 __dead void  __dead void
 usage(void)  usage(void)
 {  {
         fprintf(stderr, "usage: %s [-l line] [-s speed | -speed] [host]\n",          fprintf(stderr, "usage: %s [-l line] [-s speed | -speed]\n",
             __progname);              __progname);
           fprintf(stderr, "       %s [host]\n", __progname);
         exit(1);          exit(1);
 }  }
   
Line 113 
Line 114 
         if (argc != 0 && argc != 1)          if (argc != 0 && argc != 1)
                 usage();                  usage();
   
         if (argc == 1)          if (line_path != NULL || line_speed != -1) {
                 host = argv[0];                  if (argc != 0)
         else                          usage();
                 host = getenv("HOST");          } else {
         if (host != NULL && *host != '\0') {                  if (argc == 1)
                 if (*host == '/') {                          host = argv[0];
                         if (line_path == NULL)                  else
                           host = getenv("HOST");
                   if (host != NULL && *host != '\0') {
                           if (*host == '/')
                                 line_path = host;                                  line_path = host;
                 } else {                          else {
                         s = getenv("REMOTE");                                  s = getenv("REMOTE");
                         if (s != NULL && *s == '/')                                  if (s != NULL && *s == '/')
                                 try_remote(host, s, NULL);                                          try_remote(host, s, NULL);
                         else                                  else
                                 try_remote(host, NULL, s);                                          try_remote(host, NULL, s);
                           }
                 }                  }
         }          }
   

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21