* Add examples showing the use of -f, -C, -s, -n
* Rework the two already present examples that were *format* examples
* Remove .Tn suggested by mandoc(1)
* Remove reference to gdb(1) since it is not present in current
Approved by: manpages (gbe)
Differential Revision: https://reviews.freebsd.org/D25406
* Add two small examples showing the use of -a, -c, -j and -N
* While here, remove obsolete .Tn reported by mandoc(1)
Approved by: 0mp@
Differential Revision: https://reviews.freebsd.org/D25372
Hexdump test was failling on big endian systems when testing decimal, octal
and hexa outputs as the tests were designed on a little endian system. This
revision adds the two distinct flavors of output expected and determines at
runtime which to compare against.
Submitted by: Renato Riolino <renato.riolino_eldorado.org.br>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23191
Restore the original character to print if we used the look-ahead
buffer, but that didn't help -- we either got an illegal sequence
or still can't complete.
PR: 224552
Submitted by: Yuri Pankov
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D13963
Using the -s flag on devices is extraordinarily slow due to using fseek(3) a
little too conservatively. Address this by using fseek on character/block
devices as well, falling back to getchar(3) only if we fail to seek or we're
operating on tape drives, where fseek may succeed while not actually being
supported.
PR: 86485
Submitted by: arundel (originally; modified since then)
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D10939
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
r323990 fixed the -s flag breakage reported by PR 219173. Mark the
corresponding hexdump tests accordingly, since they should now both succeed.
PR: 222781
Reported by: ngie
Reviewed by: emaste, ngie
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D12590
directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .
No functional change intended.
MFC after: 1 weeks
tests are omitted for this initial run as there are still some bugs to work
out there.
This covers -s flag testing on devices and non-devices that would have
caught breakage found in PR 219173 as well as other subtle breakage caused
locally.
Reviewed by: cem, ngie
Approved by: cem (acting co-mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11279
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
For now, only enter the sandbox for the last file processed (including
stdin for zero-argument mode).
Sandboxing all inputs will require a little restructuring of the
program.
Feedback by: emaste@ (earlier versions)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7915
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
items), so it is more obvious that we aren't going to indirect through
a NULL pointer.
PR: 144723
Submitted by: Garrett Cooper <yaneurabeya at gmail.com>
Obtained from: NetBSD r1.19
MFC after: 2 weeks
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
- 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.
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