Module Name: src Committed By: drochner Date: Wed Apr 28 18:04:31 UTC 2010
Modified Files: src/games/factor: factor.c Log Message: rename pollard_pminus1->pollard_rho for consistency To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/games/factor/factor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/games/factor/factor.c diff -u src/games/factor/factor.c:1.21 src/games/factor/factor.c:1.22 --- src/games/factor/factor.c:1.21 Tue Apr 27 18:11:19 2010 +++ src/games/factor/factor.c Wed Apr 28 18:04:31 2010 @@ -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