| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
PR: bin/175975
Submitted by: William Ahern <william@25thandclement.com>
Approved by: cperciva (mentor)
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed by: brueffer
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
issue - od(1) and hexdump(1) behave as expected.
PR: docs/143869
Submitted by: gcooper
MFC after: 2 weeks
|
|
|
|
| |
Also add some missing $FreeBSD$ to keep svn happy.
|
|
|
|
| |
needed.
|
|
|
|
| |
Tested with: make universe
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
PR: bin/101575
Founded by: Dan Lukes
Obtained from: OpenBSD, rev. 1.11 by deraadt
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
be opened, to avoid trying to read standard input after already closing
it, which resulted in EBADF errors.
|
|
|
|
| |
a warning with gcc 3.4.x.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- '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
|
| |
|
|
|
|
|
|
| |
Sort includes.
This is now WARNS=2 clean, bump WARNS to keep it clean.
|
|
|
|
|
|
| |
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 "**".
|
| |
|
|
|
|
| |
by POSIX.
|
| |
|
|
|
|
| |
Approved by: re
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
attempting to line up values into columns.
Obtained from: NetBSD (idea)
|
|
|
|
|
|
| |
SUSv3 requires and give od a proper manual page.
PR: 36783
|
|
|
|
| |
PR: 36783
|
|
|
|
| |
PR: 36783
|
|
|
|
|
|
| |
converting them to unsigned bytes.
PR: 36783
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
help the GCC3 transition and CURRENT in general.
|
| |
|