#
7d71f06c |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Use a more sensible default of 1 or -1 when only the start and end values are specified.
PR: bin/68981 Submitted by: Stefan `Sec` Zehl MFC after: 2 weeks
|
#
d129c68a |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Do What I Mean when the user asks for random integers or characters. Up to now jot would fail to generate the last character in the range or skew the integer distribution in a way that would generate
Do What I Mean when the user asks for random integers or characters. Up to now jot would fail to generate the last character in the range or skew the integer distribution in a way that would generate the numbers in the range's limits with half the probability of the rest.
This modification fixes the program, rather than documenting the strange behavior, as suggested in docs/54879.
Also, correctly specify the range of random(3).
PR: docs/54879 MFC after: 2 weeks
show more ...
|
#
fee14f30 |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Avoid negative array indices: an empty string can also be used to specify a default value.
|
#
a26a6612 |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Restore jot's ability to use a seed for producing a deterministic sequence of random numbers. This functionality was lost in revision 1.9 when the random number generator was switched to arc4random.
Restore jot's ability to use a seed for producing a deterministic sequence of random numbers. This functionality was lost in revision 1.9 when the random number generator was switched to arc4random.
PR: docs/54879 MFC after: 2 weeks
show more ...
|
#
55f965ae |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Replace obscure aliases through pointers with plain variables.
MFC after: 2 weeks
|
#
d737ec1a |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Merge code in common cases.
Verified by: New regression tests in tools/regression/usr.bin/jot MFC after: 2 weeks
|
#
afe53a49 |
| 06-Nov-2006 |
Diomidis Spinellis <dds@FreeBSD.org> |
Replace opaque numeric bit flag values with #defined identifiers. While there, add some missing FALLTHROUGH comments.
Verified with: cmp(1) on the executable MFC after: 2 weeks
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
911a3ff9 |
| 16-Jul-2004 |
Tim J. Robbins <tjr@FreeBSD.org> |
Avoid passing negative values to <ctype.h> functions on machines with signed chars.
|
Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
bbc7056b |
| 01-Aug-2003 |
David Schultz <das@FreeBSD.org> |
Fix jot so that 'jot -r -w %d 1 1 4' never prints 4. Previously, it would print it with probability 1/2**32. It seems that the correct behavior is to print 4 with probability 1/4, but I'd like to a
Fix jot so that 'jot -r -w %d 1 1 4' never prints 4. Previously, it would print it with probability 1/2**32. It seems that the correct behavior is to print 4 with probability 1/4, but I'd like to avoid breaking POLA until all the range inconsistencies in jot can be fixed in one pass. See PR for details.
PR: 54878 Submitted by: David Brinegar <jot.3.brinegar@spamgourmet.com>
show more ...
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1 |
|
#
0ad736e6 |
| 05-Jul-2002 |
Mike Barcroft <mike@FreeBSD.org> |
Don't depend on pollution in <limits.h> for the definition of <stdint.h> macros.
|
Revision tags: release/4.6.0_cvs |
|
#
e026a48c |
| 30-Jun-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
Consistently use FBSDID
|
#
9ed3737f |
| 15-Jun-2002 |
Juli Mallett <jmallett@FreeBSD.org> |
Remove local prototype for main().
|
#
cf0def93 |
| 15-Jun-2002 |
Juli Mallett <jmallett@FreeBSD.org> |
Protoize. Remove un-needed cast to char in switch of getopt(3)'s return value. FBSDID.
|
#
f1bb2cd2 |
| 22-Mar-2002 |
Warner Losh <imp@FreeBSD.org> |
remove __P
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
07321a18 |
| 08-Nov-2001 |
Garrett Wollman <wollman@FreeBSD.org> |
Actually, arc4random() returns a uint32_t, not an int. Use the correct constant, just in case uint32_t turns into a `short' ten years from now. If this is MFC'd it will be necessary to hard-code the
Actually, arc4random() returns a uint32_t, not an int. Use the correct constant, just in case uint32_t turns into a `short' ten years from now. If this is MFC'd it will be necessary to hard-code the constant since -stable doesn't have UINT32_MAX.
show more ...
|
#
f776d8e8 |
| 08-Nov-2001 |
Andrew Gallatin <gallatin@FreeBSD.org> |
fix jot -r on 64-bit platforms by teaching it that arc4random outputs an int, not a long
Submitted by: Paul Herman <pherman@frenchfries.net> PR#: alpha/31859
|
#
f878e83f |
| 30-May-2001 |
Dima Dorfman <dd@FreeBSD.org> |
Replace the cast I removed in rev. 1.16 with a slightly less evil one (well, at least one that gcc doesn't complain about). This fixes -r, which rev. 1.16 broke.
Submitted by: bde
|
#
edd7b267 |
| 28-May-2001 |
Dima Dorfman <dd@FreeBSD.org> |
Silence warnings and compile with WARNS=2 on i386 and alpha.
|
#
15ba0427 |
| 27-May-2001 |
Dima Dorfman <dd@FreeBSD.org> |
Miscellaneous cleanups; sync to OpenBSD as much as feasible. Noteworthy changes include: * Use getopt(3). * Fix overflows in -b and -w options. * Use strlcpy(3) and snprintf(3) in favor of strcpy(
Miscellaneous cleanups; sync to OpenBSD as much as feasible. Noteworthy changes include: * Use getopt(3). * Fix overflows in -b and -w options. * Use strlcpy(3) and snprintf(3) in favor of strcpy(3) and sprintf(3), respectively. Also check return values of the former two. * Fix lots of other gratuitous differences with OpenBSD.
Obtained from: OpenBSD
show more ...
|
Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs, release/4.1.0 |
|
#
612740bd |
| 10-Jul-2000 |
Kris Kennaway <kris@FreeBSD.org> |
Don't call printf with no format string.
|
Revision tags: release/3.5.0_cvs, release/4.0.0_cvs |
|
#
5249bd84 |
| 06-Jan-2000 |
Sheldon Hearn <sheldonh@FreeBSD.org> |
Back out rev 1.11, about which bde had concerns, and instead implement appropriate bounds-checking and typecasts based on our knowledge of the desired conversion format specifier.
Simplify diagnosti
Back out rev 1.11, about which bde had concerns, and instead implement appropriate bounds-checking and typecasts based on our knowledge of the desired conversion format specifier.
Simplify diagnostics and take care to print the correct conversion format specifier when %l is involved.
show more ...
|
Revision tags: release/3.4.0_cvs, release/3.3.0_cvs |
|
#
c3aac50f |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
#
d8d41a09 |
| 22-Jul-1999 |
Sheldon Hearn <sheldonh@FreeBSD.org> |
Don't dump core for a known, documented bug.
PR: 12611 Reviewed by: markm
|
#
8db8a33b |
| 22-Jul-1999 |
Sheldon Hearn <sheldonh@FreeBSD.org> |
Improve printf(3) conversion specifier parsing so that silly formats aren't allowed and the right casts can be used for printf() statements.
Document the conversion specifier limitations and the fac
Improve printf(3) conversion specifier parsing so that silly formats aren't allowed and the right casts can be used for printf() statements.
Document the conversion specifier limitations and the fact that arithmetic overflow causes a fatal error.
PR: 12611 Reported by: Frode Vatvedt Fjeld <frodef@acm.org> Reviewed by: bde
show more ...
|
Revision tags: release/3.2.0 |
|
#
4b9cb490 |
| 13-May-1999 |
Kris Kennaway <kris@FreeBSD.org> |
Correct an error in a manpage example, add -Wall -W to Makefile (no warnings given) and modify source to use arc4random() instead of random().
Reviewed by: ache
|