diff options
author | kris <kris@FreeBSD.org> | 1999-05-13 12:18:24 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 1999-05-13 12:18:24 +0000 |
commit | e3601a838c1ea30f83fd5851fb6f9b8384a64c58 (patch) | |
tree | a510a33ac733e89cf316694cac1817ac1b1e7d80 /usr.bin | |
parent | 8669d7040a8561cc089e3c91b63cd21d6df31e79 (diff) | |
download | FreeBSD-src-e3601a838c1ea30f83fd5851fb6f9b8384a64c58.zip FreeBSD-src-e3601a838c1ea30f83fd5851fb6f9b8384a64c58.tar.gz |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/jot/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/jot/jot.1 | 4 | ||||
-rw-r--r-- | usr.bin/jot/jot.c | 8 |
3 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/jot/Makefile b/usr.bin/jot/Makefile index 83db4c0..8b5e4a5 100644 --- a/usr.bin/jot/Makefile +++ b/usr.bin/jot/Makefile @@ -2,4 +2,6 @@ PROG= jot +CFLAGS += -Wall -W + .include <bsd.prog.mk> diff --git a/usr.bin/jot/jot.1 b/usr.bin/jot/jot.1 index 6ad5e3c..0567b87 100644 --- a/usr.bin/jot/jot.1 +++ b/usr.bin/jot/jot.1 @@ -169,9 +169,9 @@ the result of .Dl jot -w %ds/old/new/ 30 2 - 5 .Pp The stuttering sequence 9, 9, 8, 8, 7, etc. can be -produced by suitable choice of precision and step size, +produced by suitable choice of step size, as in -.Dl jot 0 9 - -.5 +.Dl jot - 9 0 -.5 .Pp and a file containing exactly 1024 bytes is created with .Dl jot -b x 512 > block diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index 64d5930..5b67862 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: jot.c,v 1.7 1997/07/15 09:59:30 charnier Exp $"; + "$Id: jot.c,v 1.8 1997/11/03 07:45:33 charnier Exp $"; #endif /* not lint */ /* @@ -101,12 +101,8 @@ main(argc, argv) getargs(argc, argv); if (randomize) { *x = (ender - begin) * (ender > begin ? 1 : -1); - if (s == -1.0) - srandomdev(); - else - srandom((unsigned long) s); for (*i = 1; *i <= reps || infinity; (*i)++) { - *y = (double) random() / LONG_MAX; + *y = (double) arc4random() / ULONG_MAX; putdata(*y * *x + begin, reps - *i); } } |