History log of /freebsd-10.0-release/usr.bin/hexdump/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


247753 04-Mar-2013 eadler

Fix typo ('1' != 'l')

PR: bin/175975
Submitted by: William Ahern <william@25thandclement.com>
Approved by: cperciva (mentor)


233992 07-Apr-2012 joel

mdoc: fix column names, indentation, column separation within each row, and
quotation. Also make sure we have the same amount of columns in each row as
the number of columns we specify in the head arguments.

Reviewed by: brueffer


233510 26-Mar-2012 joel

mdoc: terminate quoted strings.

Reviewed by: brueffer


230649 28-Jan-2012 tijl

Fix decoding of escape sequences in format strings:
- Zero-terminate the resulting string by letting the for-loop copy the
terminating zero.
- Exit the for-loop after handling a backslash at the end of the format
string to fix a buffer overrun.
- Remove some unnecessary comments and blank lines. [1]

Requested by: bde [1]
PR: bin/144722
Approved by: kib (mentor)


229794 07-Jan-2012 eadler

- Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

PR: bin/144722
Submitted by: gcooper
Approved by: rpaulo
Obtained from: NetBSD
MFC after: 1 week


229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


228823 23-Dec-2011 gjb

Formatting fixes:

hexdump/od.1:
- Enclose tabbed content in quotes [1]

ar/ar.1:
- Enclose tabbed content in quotes [1]

rctl/rctl.8:
- Enclose tabbed content in quotes [1]
- Start a sentence on a newline [2]

Reported by: manlint [1], igor [2]
MFC after: 1 week
X-MFC-after: 9.0-RELEASE


228636 17-Dec-2011 dim

Correct a logic error in usr.bin/hexdump/conv.c, found by clang.

Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead. It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention. Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

MFC after: 1 week


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


209035 11-Jun-2010 uqs

Use same table markup as in hexdump.1


206622 14-Apr-2010 uqs

mdoc: order prologue macros consistently by Dd/Dt/Os

Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by: ru
Approved by: philip, ed (mentors)


204053 18-Feb-2010 gavin

The correct value of DEL is 0x7f, not 0xff. This is purely a documentation
issue - od(1) and hexdump(1) behave as expected.

PR: docs/143869
Submitted by: gcooper
MFC after: 2 weeks


201386 02-Jan-2010 ed

Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.


200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


194796 23-Jun-2009 delphij

Use strlcpy() instead of explicitly set \0 on the tail of the array.


165526 24-Dec-2006 ru

Document the -d option.


165525 24-Dec-2006 ru

Fix markup.


161132 09-Aug-2006 maxim

o Simple strcpy/strcat replacement.

PR: bin/101575
Founded by: Dan Lukes
Obtained from: OpenBSD, rev. 1.11 by deraadt
MFC after: 2 weeks


160857 31-Jul-2006 jkoshy

In 'od -c' mode, deal with printable but zero-width combining
characters correctly. These characters are displayed "combined"
with a space character.

PR: misc/100215
Submitted by: "J.R. Oldroyd" <<fbsd AT opal.com>>
Reviewed by: "J.R. Oldroyd" <<fbsd AT opal.com>> (revised patch)
MFC after: 3 days


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


140055 11-Jan-2005 ru

Scheduled mdoc(7) sweep.


133099 04-Aug-2004 tjr

In next(), ensure that 'done' is set in the case when a file cannot
be opened, to avoid trying to read standard input after already closing
it, which resulted in EBADF errors.


132785 28-Jul-2004 kan

Do not predeclare __inline functions, this makes no sense and generates
a warning with gcc 3.4.x.


132541 22-Jul-2004 johan

display.c:
- 'savech' is only used if it is set a few lines above where
it is used, initialize it to silence warning.

- 'length' is either -1 or greater than 0, hence it is safe to cast it
to unsigned when comparing it here.

odsyntax.c:
- 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are
char *. 'num' and 'end' are assigned values based on 'p'.
Hence use char * instead of unsigned char * for these variables.

'&end' as the second argument to strtoll does not need to be casted
to char** any more.

This solves a
'dereferencing type-punned pointer will break strict-aliasing rules'
warning when compiling with -O2.

parse.c:
- 'prec' is only used when sokay == USEPREC and sokay = USEPREC
when 'prec' is assigned. Hence 'prec' is not used uninitialized,
initialize it to silence warning.

- The code involving 'nextpr' is hard to follow, but I belive
'nextpr' will not be used unless it is initialized.
Anyway, IF 'nextpr' is used uninitialized it is better to
get a consistant error (seg fault, when dereferencing a NULL pointer)
than potentially accessing some random memory.

The above changes makes hexdump WARNS=6 clean even when compiled with
-O2. Hence bump WARNS to keep it clean.

Tested by: CFLAGS='-O2 -pipe' make universe


132310 17-Jul-2004 johan

Revert WARNS bump until I figure out why this does not work.


132253 16-Jul-2004 johan

Include <string.h> to get memset and strcmp prototype.

Sort includes.

This is now WARNS=2 clean, bump WARNS to keep it clean.


131954 11-Jul-2004 tjr

Add POSIX-style support for multibyte characters to od(1): the 'c'
conversion interprets input bytes as multibyte sequences and displays
printable characters in the area corresponding to their first byte.
The remaining bytes are shown as "**".


131895 10-Jul-2004 tjr

Add a reference to od(1).


131511 03-Jul-2004 tjr

Document missing multibyte character support in utilities specified
by POSIX.


131491 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


107631 05-Dec-2002 ru

Capitalize ASCII code names.

Approved by: re


102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


100359 19-Jul-2002 markm

s/inline/__inline/


99112 30-Jun-2002 obrien

Consistently use FBSDID


97501 29-May-2002 ru

mdoc(7) police: tidy up the markup.


97329 27-May-2002 tjr

From NetBSD:
Revision 1.10 Sat Oct 14 17:41:55 2000 UTC by bjh21
Don't core dump with an empty format string. Fixes PR#11218.
Patch supplied by Launey Thomas.

Obtained from: NetBSD


96798 17-May-2002 tjr

Make the output tidier when multiple integer formats are requested by
attempting to line up values into columns.

Obtained from: NetBSD (idea)


96795 17-May-2002 tjr

Overhaul hexdump's od syntax code to handle the -s -A -j -N -t options that
SUSv3 requires and give od a proper manual page.

PR: 36783


96793 17-May-2002 tjr

Declare variables that were extern'd in multiple places in hexdump.h.

PR: 36783


96792 17-May-2002 tjr

Add support for printing long doubles.

PR: 36783


96790 17-May-2002 tjr

Print signed single-byte decimal integers correctly instead of implicitly
converting them to unsigned bytes.

PR: 36783


96787 17-May-2002 tjr

Un-deprecate od(1): rename the `deprecated' variable to `odmode', remove the
deprecation warning from the utility and manual page. Since this utility
is required by POSIX, it's not likely to be removed any time soon.

This is leading up to the addition of the P1003.1-2001 -s -A -j -N -t options.

PR: 36783


95083 19-Apr-2002 charnier

Use `The .Nm utility'


92920 22-Mar-2002 imp

remove __P


91840 07-Mar-2002 obrien

Slightly more efficient version of rev 1.6.


91839 07-Mar-2002 obrien

A less intrusive version of rev 1.2.


91838 07-Mar-2002 obrien

Slightly more efficient fix to the const problem.


90415 08-Feb-2002 markm

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


87203 02-Dec-2001 markm

WARNS=2 fixups.


83342 11-Sep-2001 ru

mdoc(7) police: Fixed the .Ex calls in manpages that describe more
than one utility.

PR: docs/30437
Submitted by: SUZUKI Koichi <koich@cac.co.jp>


82766 01-Sep-2001 ache

File positions are off_t nowdays, not long, so:
strtol -> strtoll
fseek -> fseeko

NOTE: that fseek not works for >long offsets files per POSIX:

[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.


81687 15-Aug-2001 ru

mdoc(7) police: utilize the new .Ex macro.


80290 24-Jul-2001 obrien

Remove the misnamed `emalloc' and replace its uses with the calloc (along
with error checking) that it actually was.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


74848 27-Mar-2001 ru

MAN[1-9] -> MAN.


72432 13-Feb-2001 ru

mdoc(7) police: use the default ``file ...'' feature of the .Ar macro.


72342 10-Feb-2001 ache

Change localizing to LC_ALL


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


70410 27-Dec-2000 ru

Prepare for mdoc(7)NG.


70197 19-Dec-2000 ru

Prepare for mdoc(7)NG.


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


62893 10-Jul-2000 kris

Oops, missed another printf() invocation with no format string.


62892 10-Jul-2000 kris

Don't call printf() with no format string.


51457 20-Sep-1999 phantom

Correct spelling : ascii -> ASCII

PR: docs/13702
Submitted by: Stephen J. Roznowski <sjr@home.com>
Reviewed by: mpp


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


48566 04-Jul-1999 billf

Clean up some ambiguous nested if/elses.


41724 13-Dec-1998 dillon

PR: bin/9016

Fix bug with od/hd/hexdump. "*" lines are supposed to indicate one or
duplicates of the previous line, but a small file with less then 16
characters of zeros in it will be falsy identified as a repeat of
the (non-existant) previous line. i.e. the first line of output winds
up being a "*". Added a bit of code to handle the degenerate 'there is
no previous line' case for the first line.


30921 04-Nov-1997 ache

Localize it


27315 10-Jul-1997 charnier

Use err(3) instead of local redefinition, incorporate `hd' in usage str.


26827 23-Jun-1997 steve

Fix a minor nit in the .Dd macro invocation so that
the revision date is displayed correctly.


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


23693 11-Mar-1997 peter

Merge from Lite2


23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


18718 05-Oct-1996 wosch

delete doubled words, e.g.: "the the" -> "the"


18693 04-Oct-1996 peter

Fix the previous commit. The second of the 8-character columns was
a duplicate of the first column of 8...


18550 29-Sep-1996 joerg

Now that we've already got "hexdump -C", make calling the command "hd"
having the same effect, and install a link for this. There is
historic precedence for the command hd(1) (with roughly that output
format) in Xenix, SCO, and a few SysV's that tooks the idea.

Also, added a couple of spaces to the -C format to make the output
better readable.

Ok'ed by: phk


18325 16-Sep-1996 phk

Add '-C' "Canonical" format to hexdump:

$ hexdump -C /etc/resolv.conf
00000000 64 6f 6d 61 69 6e 20 64 6b 2e 74 66 73 2e 63 6f |domain dk.tfs.co|
00000010 6d 0a 6e 61 6d 65 73 65 72 76 65 72 20 31 34 30 |m.nameserver 140|
00000020 2e 31 34 35 2e 32 33 30 2e 31 30 0a |.145.230.10.|


17891 29-Aug-1996 wosch

[HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41


15073 06-Apr-1996 mpp

Correct some cross references and some path names.


13835 02-Feb-1996 mpp

Correct some manual page cross reference errors. E.g. su is a section
one man page, not section eight. This is the first round of such changes
and only fixes man pages in manual section one.


8874 30-May-1995 rgrimes

Remove trailing whitespace.


2057 13-Aug-1994 jkh

Change .0 man extents to .1, as reported by Julian Elischer. Whoops,
thought I'd gotten this one the first time around.
Reviewed by:
Submitted by:


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.