summaryrefslogtreecommitdiff
path: root/games/factor
AgeCommit message (Collapse)Author
2016-09-01In 32 bits sqrt(val) + 1 can overflow, so some big primes stillTheo Buehler
aren't recognized as such, for example 18446744073709551577 given in the commit message of factor.c r1.7 from NetBSD. Move the return type of usqrt() from u_int32_t to u_int64_t. ok guenther, tom, otto
2016-08-14Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.Philip Guenther
Fix a type mismatch in ftp's "page" command and could make transfers restart at the wrong position. ok and a ull->ll tweak from natano@, ok tedu@
2016-07-11Instead of using the floating point square root, use an integer versionTheo Buehler
of the Newton method from ping.c. Fixes a rounding issue that caused failure to factor numbers close to 2^64, e.g. 18446744030759878681. While there, fix an off by one error that caused 4295360521 to be reported as a prime. Issues reported by Paul Stoeber and Michael Bozon. ok tedu, deraadt
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-03-07- General changes:mestre
- 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
2016-01-07Some basic code maintenance in games/tb
- 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@
2016-01-04More headers removal and sorted the remaining alphabetically.mestre
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@
2015-12-30Michal Mazurek pointed out on tech@ that the factor.6 manual needs a bittb
of clarification. Thus, express the description both more concisely and more precisely. Drop details about spaces in the output formatting. While there, update the corresponding comment in the source code. With input from jmc@ and mestre@; detailed discussion with sobrado@. ok sobrado@
2015-12-25Declare usage() functions as __dead void, if they don't return, on games ↵mestre
section. 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@
2015-10-24Cast isblank()'s argument to unsigned char.mmcc
ok guenther@
2015-10-14Pledge "stdio" for simple games.Doug Hogan
ok semarie@
2015-09-07cosmetic fixesTed Unangst
2011-01-24In roff, the escape sequence \: is an optional line break,Ingo Schwarze
so escape a literal non-punctuation colon correctly as \&:. Required for correct formatting with groff-1.20.1 and Heirloom troff; strangely, groff-1.15 and mandoc have the same bug here, hiding the error. "fine" jmc@ While here, change .Dq to .Sq which looks better for single-character quoting, as suggested by jmc@.
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2008-03-17synchronization between usage and synopsis; add some missing "usage:"'sIgor Sobrado
ok jmc@
2007-09-06use strcspn to properly overwrite '\n' in fgets returned bufferCharles Longeau
ok moritz@ ray@
2007-05-31convert to new .Dd format;Jason McIntyre
2006-03-12exit code 1 on usage; adobriyan@gmailTheo de Raadt
2004-07-09ansi; khalek@linuxgamers.netTheo de Raadt
2004-04-04.br workaround no longer necessary;Jason McIntyre
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-05-31No dm -> no need to revoke setegid.Paul Janzen
2002-05-11Add missing libraries to bsd.prog.mk (mostly kerberosV)Marc Espie
Use them in DPADD throughout the tree. Fix a few mispells (LIBMATH -> LIBM...) Wipe obsolete lib (LIBRESOLV) Sort added missing libraries, move obsolete stuff apart. Synch documentation in bsd.README ok deraadt@
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-10-24typo; ericyu@mail2000.com.twTheo de Raadt
2001-08-19If primes(6) will generate 32-bit primes, factor should factor 64-bit numbers.Paul Janzen
2001-08-19Use u_int32_t rather than unsigned long, both for platform invariance andPaul Janzen
because the primes generation table really depends on there not being more than 32 bits.
2001-08-19Clarify and stop lyingPaul Janzen
2001-08-19remove extraneous newline from error output; PR 2014 and patch fromPaul Janzen
Tim J. Robbins <tim@robbins.dropbear.id.au>, with one line added so that trailing whitespace doesn't make a number seem badly formatted.
2001-06-06reorder sections, minor tidying; mpech@prosoft.org.lvPaul Janzen
1999-09-26Correct documentation: rogoyski@cs.utexas.edu in PR 927.Paul Janzen
1999-09-25Tidying and minor changes from or based on jsm28@cam.ac.uk's work for thePaul Janzen
Linux bsd-games package and NetBSD. Mainly using 'const'.
1999-07-09- remove all trailing whitespaceAaron Campbell
* except when it is escaped with a `\' at the end of the line - fix remaining .Nm usage as well - this is from a patch I received from kwesterback@home.com, who has been working on some scripts for fixing formatting errors in mdoc'd man pages Ok, so there could be a cost/benefit debate with this commit, but since I have the patch we might as well commit it...
1998-12-15Always provide an argument to .Nm in SYNOPSIS sectionPaul Janzen
1998-11-29Don't capitalize game names at the beginning of sentences.Paul Janzen
1998-08-19tags, formatting, ANSI-fication, prototypes, de-typos, and the occasionalPaul Janzen
initialization, removal of unused variable, or other minor fix. Most changes are from or inspired by NetBSD.
1997-09-21$OpenBSD$Theo de Raadt
1997-01-15getopt(3) returns -1 when out of args, not EOF, whee!Todd C. Miller
1996-12-22proper gid revokeTheo de Raadt
1996-12-19setgid games, not setuid games. closes a neat set of holesTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt