Age | Commit message (Collapse) | Author |
|
ok millert nicm tb, etc
|
|
Pointed out by Kris Katterjohn
|
|
From Kris Katterjohn on tech@.
ok tb@
|
|
same as "jot -", to match the description in the manual page.
Very similar patch independently developed by tb@.
OK tb@ espie@
|
|
|
|
ok millert
|
|
and drop an unnecessary test for intdata in '%c'.
reads ok to halex, ok millert
|
|
schwarze suggested using asprintf, which led to a substantial cleanup.
ok schwarze, help & ok millert
|
|
from kshe
|
|
invalid specifier like `%l', p will already point to the trailing NUL
upon entering the switch, wherein the instruction
*++p = '\0';
will write another NUL after it, but there is no guarantee that the
buffer extends beyond that first NUL; thus, in the rare case where it
does not, this assignment will write one byte past its end.
from kshe
|
|
led to unexpected output: compare 'jot -w $(printf %1020s)%d%' 1 1'
with 'jot -w $(printf %1019s)%d%' 1 1'.
found by & ok martijn
|
|
goto fmt_broken, do it explicitly. Makes following the code path through
the switch a bit easier.
Prompted by a request by martijn
|
|
Fixes output of e.g. 'jot -w %D 11 -5'.
ok martijn
|
|
return; sort getopt string and corresponding switch; and some more
tedious stuff
ok martijn
|
|
There are two sentinels for infinite output: infinity == true and reps == 0.
Ensure that infinity is set to true whenever reps is set to zero, then we
can always use 'if (infinity)'.
This allows us to merge the loop for deterministic output into the first
if (!randomize) statement, which is a lot tidier.
Insert an occasional empty line.
"move fast and break stuff" tedu
|
|
Part of NetBSD's jot r1.20 by dsl.
ok jca
|
|
handled to make them easier to read and understand.
with help from jmc
|
|
|
|
specified or omitted, yielding 16 possible combinations, plus
a few special cases.
Instead of hardcoded values, use names to make the bit patterns
that indicate which values were specified human readable. Decide
once and for all what to do in a single switch statement. Don't
enter said switch when random output is requested since that
simply makes no sense at all.
While there, make the error messages a bit more meaningful and
fix a bogus value assigned to begin for jot -r x - y z that has
been there since -r1.1. All regression tests now pass.
Inspired by David Laight (dsl)'s r1.21 of NetBSD's jot.
"move fast and break stuff" tedu
agreement from deraadt
|
|
While there, remove a superfluous 's'.
discussed with jmc
|
|
use a default step size of +1 or -1. Fixes the last two failing
regression tests dhhd and dhhd2. Adapted from FreeBSD.
'good direction' deraadt
|
|
Part of pjanzen's fixes in r1.8, but was lost in r1.17.
Fixes regression tests wp3, wp4, wp5.
'good direction' deraadt
|
|
Makes jot - - - - behave the same way as jot -, jot - - and jot - - -
instead of spurting out zeroes indefinitely.
Fixes the dddd regression test and matches FreeBSD and NetBSD.
From attila () stalphonsos ! com, thanks!
'good direction' deraadt
|
|
previous commit).
|
|
The bounds are taken inclusive and -w %d doesn't change the output of
integer random sequences anymore. This is the same behavior as that
of Linux and NetBSD, but differs from FreeBSD and OS X.
Issue reported by Philippe Meunier on misc@.
2 Fix a bug from the same commit observed by Otto: if the precision is 0,
values may be printed out of bounds. Fall back to the old behavior if at
least one bound isn't an integer.
General agreement expressed by otto@, tedu@, jmc@, sobrado@
Help with checking other operating systems by sobrado@.
Manpage ok jmc@.
Bugfix discussed with otto@ on icb
|
|
bias at both ends of the given interval. Various clever workarounds are
documented in the manual.
This fixes the bias in some of the most common use cases, namely random
sequences of integers or real numbers rounded to a fixed number of
decimals. So, `jot -p 3 -r 10000 0 1' produces a uniformly distributed
sequence of 10,000 decimal numbers of the form 0.abc (or 1).
Internally, jot -r now uses arc4random_uniform() whenever this is
clearly possible. In particular `jot -r 1 10 20' yields an unbiased
random number between 10 and 20 (both ends inclusive) from the shell.
guidance and ok deraadt@, "i like it" benno@
|
|
From the author John A. Kunze
via https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786
and Michal Mazurek <akfaew at jasminek dot net>.
Correctness also verified from the CSRG archive CD.
|
|
|
|
|
|
|
|
|
|
ok krw
|
|
From Eitan Adler
|
|
|
|
and make it compatible with bsd.lv mandoc and with groff-1.21.
This tweak was originally added for compatibility with groff-1.15,
which is no longer needed.
ok jmc@ kristaps@
|
|
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
|
|
|
|
|
|
|
|
|
|
errors. Mostly from FreeBSD.
|
|
ok jmc@ millert@ deraadt@
|
|
o Document and warn that seeding the random generator is no longer supported
since arc4random is used as the RG.
ok jose@ millert@
|
|
available, plus some other minor cleanup.
New features: Allow explicit precision 0. For infinite sequences,
do not print trailing newline if the counter wraps.
Testing by henning@ and jmc@
ok deraadt@
|
|
from FreeBSD PR 54879, forwarded by otto@;
ok otto@
|
|
- use .Bk/.Ek for SYNOPSIS
- sort options
- better -width for options list
- reword examples to make them clearer
- fix broken example, as reported by Takanori Isihara
jot.c:
- sync usage() with SYNOPSIS
|
|
|
|
- COMPATIBILITY merge
- macro cleanup
- kill whitespace at EOL
- new sentence, new line
ssh pages ok markus@
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
ok millert@
|