summaryrefslogtreecommitdiffstats
path: root/games/primes (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Straightforward conversion to strtonum. Slight change of behavior in thattb2017-11-021-48/+13
| | | | | | | trailing whitespace is no longer permitted when invoked from stdin. From Scott Cheloha. ok jca
* Fix a bogus comment: "factors of" -> "coprime to". Replace thetb2016-08-312-10/+10
| | | | | nonsensical "if and only iff" with "if and only if" and zap some trailing whitespace.
* - General changes:mestre2016-03-071-4/+4
| | | | | | | | | | | | - Remove -? from getopt(3) options, but still keep (or add) -h where applicable - Replace hardcoded program strings by getprogname(3) - Specific changes: - atc(6): this used -? and -u for usage(), remove both from game and manpage - bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h - hunt(6): replace fputs(3) by fprintf(3) OK tb@ after his suggestions
* Some basic code maintenance in games/tb2016-01-071-2/+2
| | | | | | | | | | - in main() replace exit with return - drop some /* NOTREACHED */ lint comments along the way. - make more use of standard CFLAGS, esp. -Wimplicit-function-declaration - add and sort some headers when needed - add straightforward pledges to some programs used at compile time discussed with and ok mestre@
* More headers removal and sorted the remaining alphabetically.mestre2016-01-042-4/+3
| | | | | | | | | Most noticeable that were removed are sys/types.h which will be included from stdlib.h and in turn also brings along sys/cdefs.h. The other one is limits.h that was used with the old idiom (denom * random() / LONG_MAX), although it was only removed were applicable (some files still need that header). OK tb@
* Declare usage() functions as __dead void, if they don't return, on games section.mestre2015-12-251-2/+2
| | | | | | Found another one in arithmetic(6) which also didn't return, and removed a function from number(6) which is not used anymore. OK tb@
* primes only needs pledge "stdio".tb2015-11-301-1/+4
|
* Cast isblank()'s argument to unsigned char.mmcc2015-10-241-3/+3
| | | | ok guenther@
* cosmetic fixestedu2015-09-071-4/+7
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-273-33/+3
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* use strcspn to properly overwrite '\n' in fgets returned bufferchl2007-09-061-4/+3
| | | | ok moritz@ ray@
* ansi; khalek@linuxgamers.netderaadt2004-07-091-10/+8
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-034-27/+11
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* No dm -> no need to revoke setegid.pjanzen2002-05-311-6/+2
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-5/+5
|
* -Wall fix, typo fix, and better includespjanzen2001-08-191-10/+10
|
* Use u_int32_t rather than unsigned long, both for platform invariance andpjanzen2001-08-192-6/+7
| | | | | because the primes generation table really depends on there not being more than 32 bits.
* remove extraneous newline from error output; accept trailing whitespacepjanzen2001-08-191-4/+7
| | | | elsewhere. Similar to PR/2014 for factor(6).
* Correct comment: rogoyski@cs.utexas.edu, PR 928.pjanzen1999-09-261-3/+3
|
* Tidying and minor changes from or based on jsm28@cam.ac.uk's work for thepjanzen1999-09-254-18/+21
| | | | Linux bsd-games package and NetBSD. Mainly using 'const'.
* tags, formatting, ANSI-fication, prototypes, de-typos, and the occasionalpjanzen1998-08-191-3/+6
| | | | | initialization, removal of unused variable, or other minor fix. Most changes are from or inspired by NetBSD.
* $OpenBSD$deraadt1997-09-211-2/+1
|
* tabifykstailey1997-07-231-1/+1
|
* getopt(3) returns -1 when out of args, not EOF, whee!millert1997-01-151-1/+1
|
* proper gid revokederaadt1996-12-221-0/+2
|
* setgid games, not setuid games. closes a neat set of holesderaadt1996-12-191-0/+2
|
* initial import of NetBSD treederaadt1995-10-185-0/+1400