Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/factor rename pollard_pminus1->pollard_rho for consist...
details: https://anonhg.NetBSD.org/src/rev/8fd804fd40b2
branches: trunk
changeset: 754353:8fd804fd40b2
user: drochner <drochner%NetBSD.org@localhost>
date: Wed Apr 28 18:04:31 2010 +0000
description:
rename pollard_pminus1->pollard_rho for consistency
diffstat:
games/factor/factor.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diffs (57 lines):
diff -r fb43d0ac1650 -r 8fd804fd40b2 games/factor/factor.c
--- a/games/factor/factor.c Wed Apr 28 17:52:17 2010 +0000
+++ b/games/factor/factor.c Wed Apr 28 18:04:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: factor.c,v 1.21 2010/04/27 18:11:19 drochner Exp $ */
+/* $NetBSD: factor.c,v 1.22 2010/04/28 18:04:31 drochner Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: factor.c,v 1.21 2010/04/27 18:11:19 drochner Exp $");
+__RCSID("$NetBSD: factor.c,v 1.22 2010/04/28 18:04:31 drochner Exp $");
#endif
#endif /* not lint */
@@ -112,7 +112,7 @@
static void BN_print_dec_fp(FILE *, const BIGNUM *);
static void usage(void) __dead;
#ifdef HAVE_OPENSSL
-static void pollard_pminus1(BIGNUM *); /* print factors for big numbers */
+static void pollard_rho(BIGNUM *); /* print factors for big numbers */
#else
static char *BN_bn2dec(const BIGNUM *);
static BN_ULONG BN_div_word(BIGNUM *, BN_ULONG);
@@ -237,7 +237,7 @@
putchar(' ');
BN_print_dec_fp(stdout, val);
} else
- pollard_pminus1(val);
+ pollard_rho(val);
#else
printf(" %s", BN_bn2dec(val));
#endif
@@ -282,10 +282,8 @@
#ifdef HAVE_OPENSSL
-/* pollard p-1, algorithm from Jim Gillogly, May 2000 */
-
static void
-pollard_pminus1(BIGNUM *val)
+pollard_rho(BIGNUM *val)
{
BIGNUM *x, *y, *tmp, *num;
BN_ULONG a;
@@ -327,7 +325,7 @@
BN_print_dec_fp(stdout, tmp);
putchar(')');
#endif
- pollard_pminus1(BN_dup(tmp));
+ pollard_rho(BN_dup(tmp));
#ifdef DEBUG
printf(" (back)");
#endif
Home |
Main Index |
Thread Index |
Old Index