[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.9 and 1.10

version 1.9, 2012/07/12 14:00:05 version 1.10, 2012/07/13 05:29:01
Line 81 
Line 81 
          * can handle.           * can handle.
          */           */
         for (i = 1; i < argc; i++) {          for (i = 1; i < argc; i++) {
                 if (argv[i][0] == '-') {                  if (strcmp("--", argv[i]) == 0)
                         switch (argv[i][1]) {                          break;
                         case '0': case '1': case '2': case '3': case '4':                  if (argv[i][0] != '-' || !isdigit(argv[i][1]))
                         case '5': case '6': case '7': case '8': case '9':                          continue;
                                 ch = snprintf(sbuf, sizeof(sbuf), "-s%s",  
                                     &argv[i][1]);                  if (asprintf(&argv[i], "-s%s", &argv[i][1]) == -1)
                                 if (ch <= 0 || ch >= (int)sizeof(sbuf)) {                          errx(1, "speed asprintf");
                                         errx(1, "invalid speed: %s",  
                                             &argv[i][1]);  
                                 }  
                                 argv[i] = sbuf;  
                                 break;  
                         case '-':  
                                 /* if we get "--" stop processing args */  
                                 if (argv[i][2] == '\0')  
                                         goto getopt;  
                                 break;  
                         }  
                 }  
         }          }
   
 getopt:  
         while ((opt = getopt(argc, argv, "l:s:")) != -1) {          while ((opt = getopt(argc, argv, "l:s:")) != -1) {
                 switch (opt) {                  switch (opt) {
                 case 'l':                  case 'l':

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10