View | Details | Raw Unified | Return to bug 86485 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 7-12 Link Here
7
MLINKS=	hexdump.1 hd.1
7
MLINKS=	hexdump.1 hd.1
8
LINKS=	${BINDIR}/hexdump ${BINDIR}/od
8
LINKS=	${BINDIR}/hexdump ${BINDIR}/od
9
LINKS+=	${BINDIR}/hexdump ${BINDIR}/hd
9
LINKS+=	${BINDIR}/hexdump ${BINDIR}/hd
10
WARNS?=	6
10
WARNS?=	1
11
11
12
.include <bsd.prog.mk>
12
.include <bsd.prog.mk>
(-)display.c (-3 / +5 lines)
Lines 44-49 Link Here
44
44
45
#include <ctype.h>
45
#include <ctype.h>
46
#include <err.h>
46
#include <err.h>
47
#include <errno.h>
47
#include <stdio.h>
48
#include <stdio.h>
48
#include <stdlib.h>
49
#include <stdlib.h>
49
#include <string.h>
50
#include <string.h>
Lines 384-395 Link Here
384
			return;
385
			return;
385
		}
386
		}
386
	}
387
	}
387
	if (S_ISREG(sb.st_mode)) {
388
	/* try to seek first; fall back on ESPIPE */
388
		if (fseeko(stdin, skip, SEEK_SET))
389
	if (fseeko(stdin, skip, SEEK_SET) == 0) {
389
			err(1, "%s", fname);
390
		address += skip;
390
		address += skip;
391
		skip = 0;
391
		skip = 0;
392
	} else {
392
	} else {
393
		if (errno != ESPIPE)
394
			err(1, "%s", fname);
393
		for (cnt = 0; cnt < skip; ++cnt)
395
		for (cnt = 0; cnt < skip; ++cnt)
394
			if (getchar() == EOF)
396
			if (getchar() == EOF)
395
				break;
397
				break;

Return to bug 86485