Home | History | Annotate | only in /src/usr.bin/jot
History log of /src/usr.bin/jot
RevisionDateAuthorComments
 1.6 16-Aug-2011  christos document non-literal format strings
 1.5 08-Oct-2006  peter WFORMAT is no more...
 1.4 07-Jan-2006  garbled Apply modified fix for PR bin/23763
jot(1)'s output now matches the examples given in the manpage.
 1.3 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.2 14-Nov-1994  jtc branches: 1.2.8; 1.2.16;
Changed to conform to NetBSD's new RCS Id convention.
 1.1 14-Nov-1994  jtc branches: 1.1.1;
Initial revision
 1.1.1.1 14-Nov-1994  jtc imported from 4.4lite
 1.2.16.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.2.8.1 19-Oct-2000  he Pull up revision 1.3 (requested by he):
Format string cleanup.
 1.17 25-Apr-2020  simonb Document the default values for options in a way that hopefully makes
much more sense.
 1.16 25-Jun-2018  christos Don't require any arguments as the usage indicates; simplifies the code
and the documentation: now "jot" works like "jot -" used to (and continues
to). From Ingo Schwarze
 1.15 03-Jul-2017  wiz branches: 1.15.4;
Remove workaround for ancient HTML generation code.
 1.14 04-Jan-2016  kamil Bump date for previous
 1.13 04-Jan-2016  kamil Add HISTORY and AUTHORS to jot

John A. Kunze requested to add himself as the author of jot
on the FreeBSD bugzilla with the following text:

Please re-instate my name (as "John A. Kunze") as AUTHOR of the
jot, rs, and lam utilities. I wrote these in 1982, around or
before the time that I worked with Jordan at UCB (he left to work
at FreeBSD and later at Apple). Thank you!

-- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786

While there add a note that this tool first appeared in BSD 4.2.
This information is based on the FreeBSD manual pages.

Patch submitted by Michal Mazurek <akfaew AT jasminek.net>.

Reviewed by <dholland>
 1.12 08-Apr-2012  wiz Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
 1.11 05-Jan-2011  apb branches: 1.11.6;
Add an example of generating a list of integers; make it the first
example. Also add a reference to seq(1).
 1.10 11-Mar-2009  joerg Use semantic markup
 1.9 24-Feb-2008  dsl branches: 1.9.10;
Remove a 9 from the stuttered example in order to match the only
possible reality.
 1.8 22-Nov-2004  peter branches: 1.8.18; 1.8.24;
Sort options, standardize usage message.

ok wiz@
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.6 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.5 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 07-Mar-1999  mycroft Clean up SYNOPSIS formatting.
 1.3 01-Nov-1997  mycroft Reformat in mandoc.
 1.2 14-Nov-1994  jtc branches: 1.2.4;
Changed to conform to NetBSD's new RCS Id convention.
 1.1 14-Nov-1994  jtc branches: 1.1.1;
Initial revision
 1.1.1.1 14-Nov-1994  jtc imported from 4.4lite
 1.2.4.1 01-Nov-1997  mellon Pull rev 1.3 up from trunk (mycroft)
 1.8.24.1 24-Mar-2008  keiichi sync with head.
 1.8.18.1 23-Mar-2008  matt sync with HEAD
 1.9.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.11.6.1 17-Apr-2012  yamt sync with head
 1.15.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.28 14-Jun-2020  kamil Generate format after setting the prec value

Otherwise we end up with setting invalid printf format: "%.-1f" (from
"if (snprintf(p, sz, "%%.%df", prec) >= (int)sz)") for prec equal to -1,
which is not canonical (rejected by gcc and clang when used explicitly).

Detected by ASan (MKSANITIZER) for "jot 8".
 1.27 03-Feb-2019  mrg - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
 1.26 25-Jun-2018  christos branches: 1.26.2;
Don't require any arguments as the usage indicates; simplifies the code
and the documentation: now "jot" works like "jot -" used to (and continues
to). From Ingo Schwarze
 1.25 12-Apr-2009  lukem branches: 1.25.44;
fix sign-compare issue
 1.24 21-Jul-2008  lukem branches: 1.24.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.23 21-Apr-2008  dsl branches: 1.23.2;
Fix integer random numbers when bounds given in the wrong order.
 1.22 02-Mar-2008  dsl branches: 1.22.2;
When printing non-random integers, add 0.5 to get 'schoolboy' rounding.
This makes 'jot - 9 - -.5' generate 9 9 8 8 etc again.
When printing random numbers generate a sane range when ender < begin.
For random integers we must use random()/2^31 since we don't want the
value above generated should random() return 2^31-1.
 1.21 29-Feb-2008  dsl Remove the loop used to set default and calculated parameters, instead
set the defaults at compile time and calculate any derived values in
a simple switch statement.
Use names for the bit-patterns that indicate that fields are present.
Seems to behave the same way as the earlier version.
 1.20 27-Feb-2008  dsl Sprinkle 'static' and 'EXIT_FAILURE'. Use getopt().
Simplify getprec() using libc functions.
Code from me partially inspired by a diff sent by xtos.
 1.19 24-Feb-2008  dsl When converting fp values to integer, use floor(x) so that we get
consistent convertions not the 'round to even'.
This means that it is possibly to generate the 'stuttered' sequence
4 4 3 3 2 2 1 1 0 0 -1 -1.
 1.18 23-Feb-2008  dsl Rename 's' to 'step', allow a precision of 0 to be specified (overriding
the value determined from 'begin' and 'end').
 1.17 23-Feb-2008  dsl If we are doing a random integer (or character) format, then increase the
range by 1 so that the quoted upper and lower values both appear, and
with the same frequency as the intermediate values.
This reverts the change from rev 1.13, and fixes it properly!
Also fixes 'jot -r -c - 97 98' as reported to netbsd-bugs (but not as a PR!).
 1.16 23-Feb-2008  dsl Remove some pointless indirections and add {} around some long single
statements.
 1.15 13-Jun-2006  christos branches: 1.15.10; 1.15.16;
PR/33709: Kevin Massey: Avoid stack smashing in args copy
 1.14 07-Jan-2006  garbled branches: 1.14.2;
Apply modified fix for PR bin/23763
jot(1)'s output now matches the examples given in the manpage.
 1.13 04-Jan-2006  perry de-__P, ANSIfy prototypes
 1.12 22-Nov-2004  peter Sort options, standardize usage message.

ok wiz@
 1.11 05-Jan-2004  jmmv Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.9 27-Sep-2002  atatat Make the randomness a tad more random. It's still not terribly
random, but it's considerably less lame now.

before% echo `jot -r 5` ; echo `jot -r 5`
66 5 78 82 66
66 5 78 82 66

after% echo `jot -r 5` ; echo `jot -r 5`
15 94 47 32 25
78 52 73 52 47
 1.8 17-Mar-2001  simonb Reverse the if and else clauses for the chardata test if there is
no format string specified.

Fixes PR bin/12424 from Jim Bernard.
 1.7 14-Mar-2001  jdolecek Use patch provided Paul Janzen <pjanzen@OpenBSD.org> to fix
bin/12316 more completely.
Highlights:
* we only allow explicitly specified set of (numberic) formats
* %% is correctly skipped, extra %foo formats are detected
* '*' in format specification is not allowed

The code in getformat() is slighly different to the OpenBSD version
of fix - the list of allowed printf(3) flags is explicit and the
condition checking 'chardata' is written slighly differently.

Also pull-in some cosmetic changes from OpenBSD - s/isdefault()/is_default()/,
error() -> errx(), usage().
 1.6 02-Mar-2001  jdolecek Don't coredump if format given via -w doesn't contain alphanumeric
character; in such case, warn user the format is invalid.

This addresses bin/12316 by Perry E. Metzger.
 1.5 19-Dec-1998  christos branches: 1.5.10;
char -> unsigned char
 1.4 19-Oct-1997  lukem WARNSify, fix .Nm usage, deprecate register, use <err.h>
 1.3 02-Dec-1994  pk Allocate proper storage.
Avoid interpretation of boring words as printf(3) style format strings.
 1.2 14-Nov-1994  jtc Changed to conform to NetBSD's new RCS Id convention.
 1.1 14-Nov-1994  jtc branches: 1.1.1;
Initial revision
 1.1.1.1 14-Nov-1994  jtc imported from 4.4lite
 1.5.10.1 25-Nov-2001  he Pull up revisions 1.6-1.8 (requested by jdolecek):
Check the format string more thoroughly before use. Fixes PR#12316
and PR#14253.
 1.14.2.1 19-Jun-2006  chap Sync with head.
 1.15.16.1 24-Mar-2008  keiichi sync with head.
 1.15.10.1 23-Mar-2008  matt sync with HEAD
 1.22.2.1 18-May-2008  yamt sync with head.
 1.23.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.25.44.1 28-Jul-2018  pgoyette Sync with HEAD
 1.26.2.1 10-Jun-2019  christos Sync with HEAD

RSS XML Feed