version 1.16, 2011/09/22 09:09:42 |
version 1.17, 2015/01/16 06:40:08 |
|
|
* SUCH DAMAGE. |
* SUCH DAMAGE. |
*/ |
*/ |
|
|
#include <sys/param.h> |
|
#include <err.h> |
#include <err.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include "hexdump.h" |
#include "hexdump.h" |
|
|
|
#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) |
|
|
FS *fshead; /* head of format strings */ |
FS *fshead; /* head of format strings */ |
int blocksize; /* data block size */ |
int blocksize; /* data block size */ |
int exitval; /* final exit value */ |
int exitval; /* final exit value */ |
|
|
blocksize = tfs->bcnt; |
blocksize = tfs->bcnt; |
} |
} |
if (length != -1) { |
if (length != -1) { |
iobufsiz = MIN(length, blocksize); |
iobufsiz = MINIMUM(length, blocksize); |
if ((iobuf = malloc(iobufsiz)) == NULL) |
if ((iobuf = malloc(iobufsiz)) == NULL) |
err(1, NULL); |
err(1, NULL); |
} |
} |