History log of /freebsd-10.1-release/games/factor/factor.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 228596 16-Dec-2011 dim

In games/factor/factor.c, fix a warning about a format string not being
a literal.

MFC after: 1 week


# 216598 20-Dec-2010 uqs

factor(6): Check return values of BN_* functions.

Coverity Prevent: CID 4862, 8771, 8772, 8773


# 199815 25-Nov-2009 fanf

Fix a performance bug in factor(6).

Check if large factor is prime before applying Pollard's algorithm;
fixes "factor 2147483647111311". Increase base if p-1 algorithm
reaches 1; fixes "factor 99999999999991".

Testcases from David A Bagley <bagleyd@tux.org>.
Fixes from Joseph Myers <jsm@NetBSD.org>.
Problem rediscovered by an attempt to factor my phone number.

A few other incidental fixes: correct a couple of factually incorrect
comments; use ident string macros; move from 4-clause to 3-clause
BSD licence (University of California copyright).

Obtained from: NetBSD


# 104722 09-Oct-2002 fanf

Factorize bignums using the Pollard Rho algorithm. The code comes
from NetBSD, altered to retain the FreeBSD -h feature and various
stylistic improvements and avoid regressions. In the absence of
OpenSSL (and therefore bignums) the old code is used.

PR: 43831
Reviewed by: kris, markm, obrien
Obtained from: NetBSD
MFC after: 2 weeks


# 104720 09-Oct-2002 fanf

Style fixes to: #include ordering; use const and static; ANSI functions;
various usage synopses; bogus and/or unnecessary casting; exit values;
use LINE_MAX instead of magic numbers; declare extern variables in a
header; add $FreeBSD$ where missing.

Reviewed by: markm, obrien
Obtained from: NetBSD | fanf


# 90828 18-Feb-2002 imp

Remove __P
Remove __STDC__ (which means we now use stdarg rather than vararg)
Remove register
Remove main prototype


# 85408 24-Oct-2001 roam

Correct a typo: numtiple -> multiple.

PR: 31474
Submitted by: Eric Yu <ericyu@mail2000.com.tw>
MFC after: 1 week


# 53920 30-Nov-1999 billf

copyright/sccsid/rcsid cleanup.


# 42357 06-Jan-1999 imp

Fix printf errors in the hflag case.
Fix old bug with bogus casing to (long).
Document the true limits of factor on 64-bit architectures.

Submitted by: bde


# 42338 06-Jan-1999 imp

added -h flag to allow for hexidecimal output.
Use '0' for base rather than 10 to allow for more flexible input bases.

Inspired by changes in PR 7402, but mostly redone by me to get past
bde filter.

Submitted by: Timo J. Rinne
PR: 7402


# 33937 01-Mar-1998 jkh

Wargh! Who went and changed all the getopt() comparisons from -1 to
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).


# 29015 01-Sep-1997 ache

Remove so-called revoke, this game not installed sguid


# 28979 31-Aug-1997 eivind

Change games from setuid games to setgid games.

Reviewed by: maybe@yes.no
Obtained from: OpenBSD (mostly deraadt@openbsd.org)


# 23726 11-Mar-1997 peter

Merge from Lite2 (oops, nearly forgot these ones)


# 8856 30-May-1995 rgrimes

Remove trailing whitespace.


# 2491 04-Sep-1994 jkh

This commit was generated by cvs2svn to compensate for changes in r2490,
which included commits to RCS files with non-trunk default branches.


# 2490 04-Sep-1994 jkh

Bring in the 4.4 Lite games directory, modulo man page changes and segregation
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