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

Diff for /src/usr.bin/hexdump/hexdump.c between version 1.13 and 1.14

version 1.13, 2009/10/27 23:59:39 version 1.14, 2010/10/12 17:23:21
Line 30 
Line 30 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #include <sys/types.h>  #include <sys/param.h>
   #include <err.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 40 
Line 41 
 int blocksize;                          /* data block size */  int blocksize;                          /* data block size */
 int exitval;                            /* final exit value */  int exitval;                            /* final exit value */
 long length = -1;                       /* max bytes to read */  long length = -1;                       /* max bytes to read */
   char *iobuf;                            /* stdio I/O buffer */
   size_t iobufsiz;                        /* size of stdio I/O buffer */
   
 int     main(int, char **);  int     main(int, char **);
   
Line 59 
Line 62 
                 tfs->bcnt = size(tfs);                  tfs->bcnt = size(tfs);
                 if (blocksize < tfs->bcnt)                  if (blocksize < tfs->bcnt)
                         blocksize = tfs->bcnt;                          blocksize = tfs->bcnt;
           }
           if (length != -1) {
                   iobufsiz = MIN(length, blocksize);
                   if ((iobuf = malloc(iobufsiz)) == NULL)
                           err(1, NULL);
         }          }
         /* rewrite the rules, do syntax checking */          /* rewrite the rules, do syntax checking */
         for (tfs = fshead; tfs; tfs = tfs->nextfs)          for (tfs = fshead; tfs; tfs = tfs->nextfs)

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14