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

Diff for /src/usr.bin/hexdump/hexsyntax.c between version 1.8 and 1.9

version 1.8, 2003/06/12 20:58:09 version 1.9, 2007/01/28 16:37:09
Line 38 
Line 38 
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <err.h>  #include <err.h>
   #include <errno.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 80 
Line 81 
                         addfile(optarg);                          addfile(optarg);
                         break;                          break;
                 case 'n':                  case 'n':
                         if ((length = atoi(optarg)) < 0)                          errno = 0;
                           if ((length = strtol(optarg, NULL, 0)) < 0 ||
                               errno != 0)
                                 errx(1, "%s: bad length value", optarg);                                  errx(1, "%s: bad length value", optarg);
                         break;                          break;
                 case 'o':                  case 'o':
Line 88 
Line 91 
                         add("\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"");                          add("\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"");
                         break;                          break;
                 case 's':                  case 's':
                         if ((skip = strtol(optarg, &p, 0)) < 0)                          errno = 0;
                           if ((skip = (off_t)strtoll(optarg, &p, 0)) < 0 ||
                               errno != 0)
                                 errx(1, "%s: bad skip value", optarg);                                  errx(1, "%s: bad skip value", optarg);
                         switch(*p) {                          switch(*p) {
                         case 'b':                          case 'b':

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