History log of /freebsd-10-stable/usr.bin/hexdump/conv.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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)


# 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


# 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


# 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 10-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 "**".


# 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


# 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


# 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


# 91839 07-Mar-2002 obrien

A less intrusive version of rev 1.2.


# 87203 02-Dec-2001 markm

WARNS=2 fixups.


# 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.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources