X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/df0292de3999245f136b6d8ae44a1404282b7fdb..025c5f4aa5ffbf8948482a4233318db81c2df5d2:/pgen.h diff --git a/pgen.h b/pgen.h index 459f360..4bc9046 100644 --- a/pgen.h +++ b/pgen.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pgen.h,v 1.7 2000/08/18 19:16:12 mdw Exp $ + * $Id$ * * Prime generation glue * @@ -27,24 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: pgen.h,v $ - * Revision 1.7 2000/08/18 19:16:12 mdw - * New event handler for showing in detail sub-prime generation. - * - * Revision 1.6 2000/06/17 11:52:12 mdw - * Add the GCD filter. - * - * Revision 1.5 2000/02/12 18:21:03 mdw - * Overhaul of key management (again). - * - * Revision 1.4 1999/12/22 16:01:11 mdw - * Same file, completely different code. Main interface for new prime- - * search system. - * - */ - #ifndef CATACOMB_PGEN_H #define CATACOMB_PGEN_H @@ -282,7 +264,7 @@ extern int pgen_subev(int /*rq*/, pgen_event */*ev*/, void */*p*/); * @pgen_proc *test@ = tester function to use * @void *tctx@ = context argument for tester * - * Returns: If successful, @PGEN_DONE@; otherwise @PGEN_ABORT@. + * Returns: The resulting value, or null. * * Use: A generalized prime-number search skeleton. Yes, that's a * scary number of arguments. @@ -293,6 +275,16 @@ extern mp *pgen(const char */*name*/, mp */*d*/, mp */*m*/, unsigned /*steps*/, pgen_proc */*step*/, void */*sctx*/, unsigned /*tests*/, pgen_proc */*test*/, void */*tctx*/); +/* --- @pgen_primep@ --- * + * + * Arguments: @mp *p@ = a number to check + * @grand *gr@ = a random number source + * + * Returns: Nonzero if @p@ is really prime. + */ + +extern int pgen_primep(mp */*p*/, grand */*gr*/); + /*----- That's all, folks -------------------------------------------------*/ #ifdef __cplusplus