summaryrefslogtreecommitdiffstats
path: root/games/random/randomize_fd.h
Commit message (Collapse)AuthorAgeFilesLines
* All cosmetic.ache2008-08-101-1/+1
| | | | | | 1) Rename RANDOM_MAX to RANDOM_MAX_PLUS1 to not confuse with random()'s max 2) Use calloc() instead of zeroing fields explicitly 3) "too many lines" -> "too many delimiters" for err()
* I was confused a bit by the wrong construction with RAND_MAXache2008-08-081-0/+6
| | | | | | | | | | used in randomize_fd.c. Although the max value is the same currently, RAND_MAX is for rand(), not for random(). So move RANDOM_MAX const to the common file now, make it UL and use in randomize_fd.c too. (in any case its old value was 1 less then must be, as noted in the prev. commit)
* flexlint rears its head as well as some style(9) fixes[1]. Fixed aseanc2003-02-151-11/+0
| | | | | | | | | few bugs for a few corner cases and correctly handle the case where read(2) is read()'ing from a non-file descriptor and could get fewer bytes back than the buffer, but it isn't EOF[2]. random(6) extensively tested and believed to be bug free (save performance for large files). Submitted by: mkm [1], tjr[2]
* Update random(6) to have the ability to randomize a file/stdin basedseanc2003-02-111-0/+56
off of lines or words. See the man page for details. Reviewed by: markm MFC after: 3 days
OpenPOWER on IntegriCloud