Winston <
[email protected]d> wrote in <
[email protected]>:
Is the FreeBSD source code for all its pieces (individually) still
available via FTP? It didn't seem so at ftp://ftp.freebsd.org/ .
It looks like the choices are now 1) GIT, perhaps still
2) Subversion, and 3) download and unpack an entire system tarball
of ~180MB.
In any case, the actual question I'm trying to answer is:
Does jot(1) use arc4random(3) [as its man page says] or does it
use arc4random_uniform(3)?
Thanks in advance, and Merry Christmas.
-WBE
Merry Christmas!
Looks like it uses arc4random.
From /usr/src/usr.bin/jot on my FreeBSD-12 system:
321 for (i = 1; i <= reps || infinity; i++) {
322 if (use_random)
323 y = random() / divisor;
324 else
325 y = arc4random() / divisor;
326 if (putdata(y * x + begin, !(reps - i)))
327 errx(1, "range error in conversion");
328 }
329 } else
330 for (i = 1, x = begin; i <= reps || infinity; i++, x += s)
331 if (putdata(x, !(reps - i)))
332 errx(1, "range error in conversion");
333 if (!nofinalnl)
334 putchar('\n');
335 exit(0);
336 }
337
338 /*
339 * Send x to stdout using the specified format.
340 * Last is true if this is the set's last value.
jot.c lines 307-340/517 byte 8665/12548 69% (press RETURN)
--
"But you've got to hand it to IBM, they know how to design
hardware. The servers all had handles to pick them up and throw
them out of the window...." -- Juergen Nieveler in the Monastery
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)