aboutsummaryrefslogtreecommitdiff
path: root/games/random
Commit message (Collapse)AuthorAgeFilesLines
* Final step of eliminating the "games" distribution: Merge src/gamesColin Percival2015-10-026-644/+0
| | | | | | | | | | | | (or what's left of it, at least) into src/usr.bin. This change will not be MFCed. Discussed at: EuroBSDCon 2014 Committed from: EuroBSDCon 2015 Notes: svn path=/head/; revision=288485
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge head from 7/28Simon J. Gerraty2014-08-191-1/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=270164
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync from headSimon J. Gerraty2012-11-041-0/+2
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | use .Mt to mark up email addresses consistently (part1)Baptiste Daroussin2014-06-201-1/+1
| |/ |/| | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267667
* | Free buf when its no longer used. This helps eliminate a static analysisEitan Adler2012-10-221-0/+2
|/ | | | | | | | | | | | warning. PR: ports/172566 Submitted by: Erik Cederstrand <erik@cederstrand.dk> Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=241847
* Drop advertising clause in manpages. It was done a long time agoUlrich Spörlein2010-12-061-5/+1
| | | | | | | | | for the source code. Discussed with: core Notes: svn path=/head/; revision=216239
* random(6): avoid dead assignmentsUlrich Spörlein2010-06-142-2/+2
| | | | | | | Found by: clang static analyzer Notes: svn path=/head/; revision=209157
* Remove the third clause for the Berkeley parts of games, per theWarner Losh2010-02-151-5/+1
| | | | | | | letter in /COPYRIGHT. Notes: svn path=/head/; revision=203932
* games: make WARNS=6 the default, remove overridesUlrich Spörlein2010-02-151-1/+0
| | | | | | | | | This also bumps factor, fortune, primes, and random to WARNS=6. Approved by: ed (Co-mentor) Notes: svn path=/head/; revision=203923
* Suggections from bde@Andrey A. Chernov2008-08-112-5/+11
| | | | | | | | | | | 1) Split too long source lines 2) Portable code should not assume that null pointer == all-bits-0, so back out prev. calloc() change. Submitted by: bde Notes: svn path=/head/; revision=181615
* All cosmetic.Andrey A. Chernov2008-08-103-12/+9
| | | | | | | | | 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() Notes: svn path=/head/; revision=181527
* 1) Fix longstanding math bug with denominator > 1 (wrong probability).Andrey A. Chernov2008-08-081-8/+16
| | | | | | | | | | | | | Test case: random -f some_small_file 10000 (in most cases must be no output) 2) Prevent number of lines > RANDOM_MAX (overflow or nothing may be choosed) with EFBIG err() 3) After line is found, terminate list loop for -U case too, since nothing to do in the rest of the loop left. Notes: svn path=/head/; revision=181412
* I was confused a bit by the wrong construction with RAND_MAXAndrey A. Chernov2008-08-083-4/+10
| | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=181410
* 1) Replace hardcoded RANDOM_MAX macro with wrong (1 less than must be)Andrey A. Chernov2008-08-081-11/+5
| | | | | | | | | value with ((double)RAND_MAX + 1) 2) For exit code increase valid denominator upper range from 255 to 256 since returned value is [0 .. denom - 1] Notes: svn path=/head/; revision=181409
* 1) Fix hang at the end of line buffer (PR 95715)Andrey A. Chernov2006-04-142-8/+11
| | | | | | | | | | 2) Localize PR: 95715 Submitted by: Li-Lun Wang <llwang@infor.org> (slightly edited by me) Notes: svn path=/head/; revision=157758
* Correct an error in the previous revision. RAND_MAX is the maximum valueJohn Baldwin2005-06-221-3/+9
| | | | | | | | | | | | | for rand(3), not random(3). random(3) is defined to return values between 0 and 2^31-1, so add a local RANDOM_MAX constant to this file that is defined as 2^31-1 and use that in place of RAND_MAX. Reviewed by: bde Approved by: re (dwhite) MFC after: 1 week Notes: svn path=/head/; revision=147530
* Fix for 64-bit platforms. random() returns values between 0 and RAND_MAX,John Baldwin2005-05-271-3/+3
| | | | | | | | | | | | and RAND_MAX != LONG_MAX on 64-bit platforms. PR: amd64/81279 Submitted by: Vivek Khera vivek at khera dot org Submitted by: Adriaan de Groot groot at kde dot org MFC after: 1 week Notes: svn path=/head/; revision=146686
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-02-091-1/+1
| | | | Notes: svn path=/head/; revision=141581
* Sort sections.Ruslan Ermilov2005-01-181-4/+4
| | | | Notes: svn path=/head/; revision=140408
* Properly initialise 'filename' so that random -l doesn't try to open NULL.Stefan Farfeleder2004-10-031-5/+4
| | | | | | | | Const-qualify 'filename' to avoid a strdup() call due to -Wwrite-strings silliness. Notes: svn path=/head/; revision=136090
* Make the __FBSDID usage consistentDavid E. O'Brien2003-05-051-3/+2
| | | | | | | and protect copyright[] from Gcc 3.3's whining. Notes: svn path=/head/; revision=114725
* Fixed SYNOPSIS.Ruslan Ermilov2003-02-231-20/+26
| | | | | | | | | | Expanded stdin/stdout definitions. Ordered the SEE ALSO references. Moved some chat from the BUGS section to freebsd-chat@. Removed ``cvs log'' material from the HISTORY section. Notes: svn path=/head/; revision=111279
* flexlint rears its head as well as some style(9) fixes[1]. Fixed aSean Chittenden2003-02-154-72/+82
| | | | | | | | | | | | 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] Notes: svn path=/head/; revision=110928
* Update random(6) to have the ability to randomize a file/stdin basedSean Chittenden2003-02-115-20/+389
| | | | | | | | | | off of lines or words. See the man page for details. Reviewed by: markm MFC after: 3 days Notes: svn path=/head/; revision=110723
* Remove __PWarner Losh2002-02-181-1/+1
| | | | | | | | | Remove __STDC__ (which means we now use stdarg rather than vararg) Remove register Remove main prototype Notes: svn path=/head/; revision=90828
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79528
* - Backout botched attempt to intoduce MANSECT feature.Ruslan Ermilov2001-03-261-0/+1
| | | | | | | - MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74814
* Set the default manual section for games/ to 6.Ruslan Ermilov2001-03-201-1/+1
| | | | Notes: svn path=/head/; revision=74528
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-2/+2
| | | | Notes: svn path=/head/; revision=68937
* -Wall fixes.Bill Fumerola1999-12-121-1/+1
| | | | Notes: svn path=/head/; revision=54482
* copyright/sccsid/rcsid cleanup.Bill Fumerola1999-11-301-1/+5
| | | | Notes: svn path=/head/; revision=53920
* $Id$ -> $FreeBSD$Peter Wemm1999-08-271-1/+1
| | | | Notes: svn path=/head/; revision=50472
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48793
* Wargh! Who went and changed all the getopt() comparisons from -1 toJordan K. Hubbard1998-03-011-1/+1
| | | | | | | | | | EOF? The getopt(3) manpage clearly states that the return value is *-1*, not EOF! Besides, getopt(3) isn't reading from a file. :) Noticed-while: merging to 2.2 (where this is correct). Notes: svn path=/head/; revision=33937
* Remove so-called revoke, this game never installed sguidAndrey A. Chernov1997-09-011-4/+0
| | | | Notes: svn path=/head/; revision=29016
* Change games from setuid games to setgid games.Eivind Eklund1997-09-011-0/+4
| | | | | | | | Reviewed by: maybe@yes.no Obtained from: OpenBSD (mostly deraadt@openbsd.org) Notes: svn path=/head/; revision=28979
* Remove srandomdev fallback codeAndrey A. Chernov1997-06-141-2/+1
| | | | Notes: svn path=/head/; revision=26627
* Use srandomdev() nowAndrey A. Chernov1997-03-301-4/+5
| | | | | | | Add range checking for invalid denominator values Notes: svn path=/head/; revision=24420
* Fix srandom arg type accodring to Lite2Andrey A. Chernov1997-03-111-1/+1
| | | | | | | Use ^ getpid() instead of + getpid() Notes: svn path=/head/; revision=23699
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-2/+2
| | | | Notes: svn path=/head/; revision=8856
* Include <limits.h> to get LONG_MAX - don't depend on namespace pollutionBruce Evans1995-02-031-0/+1
| | | | | | | in <time.h>. Notes: svn path=/head/; revision=6160
* Bring in the 4.4 Lite games directory, modulo man page changes and segregationJordan K. Hubbard1994-09-043-0/+223
of the x11 based games. I'm not going to tag the originals with bsd_44_lite and do this in two stages since it's just not worth it for this collection, and I've got directory renames to deal with that way. Bleah. Submitted by: jkh Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=2490