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

Diff for /src/usr.bin/tip/Attic/cu.c between version 1.30 and 1.31

version 1.30, 2010/06/29 23:32:52 version 1.31, 2010/06/29 23:38:05
Line 49 
Line 49 
   
         if (argc < 2)          if (argc < 2)
                 cuusage();                  cuusage();
         DV = NULL;  
         setnumber(value(BAUDRATE), DEFBR);          setnumber(value(BAUDRATE), DEFBR);
         parity = 0;     /* none */          parity = 0;     /* none */
   
Line 83 
Line 82 
         while ((ch = getopt(argc, argv, "l:s:htoe")) != -1) {          while ((ch = getopt(argc, argv, "l:s:htoe")) != -1) {
                 switch (ch) {                  switch (ch) {
                 case 'l':                  case 'l':
                         if (DV != NULL) {                          if (value(DEVICE) != NULL) {
                                 fprintf(stderr,                                  fprintf(stderr,
                                     "%s: cannot specify multiple -l options\n",                                      "%s: cannot specify multiple -l options\n",
                                     __progname);                                      __progname);
                                 exit(3);                                  exit(3);
                         }                          }
                         if (strchr(optarg, '/'))                          if (strchr(optarg, '/'))
                                 DV = optarg;                                  value(DEVICE) = optarg;
                         else                          else {
                                 if (asprintf(&DV, "%s%s", _PATH_DEV, optarg) == -1)                                  if (asprintf(&value(DEVICE),
                                       "%s%s", _PATH_DEV, optarg) == -1)
                                         err(3, "asprintf");                                          err(3, "asprintf");
                           }
                         break;                          break;
                 case 's':                  case 's':
                         baudrate = (int)strtonum(optarg, 0, INT_MAX, &errstr);                          baudrate = (int)strtonum(optarg, 0, INT_MAX, &errstr);

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31