+ * Use: Assuming that @m@ has been tested by trial division on every
+ * prime in the small-primes array, this function will return
+ * @PGEN_DONE@ if the number is less than the square of the
+ * largest small prime.
+ */
+
+static int smallenough(mp *m)
+{
+ static mp *max = 0;
+ int rc = PGEN_TRY;
+
+ if (!max) {
+ max = mp_fromuint(MP_NEW, MAXPRIME);
+ max = mp_sqr(max, max);
+ max->a->n--; /* Permanent allocation */
+ }
+ if (MP_CMP(m, <, max))
+ rc = PGEN_DONE;
+ return (rc);
+}
+
+/* --- @pfilt_smallfactor@ --- *