5 $num=$ARGV[0] if ($#ARGV >= 0);
9 loop: while ($#primes < $num-1)
14 for ($i=0; $primes[$i]<=$s; $i++)
16 next loop if (($p%$primes[$i]) == 0);
22 /* Auto generated by bn_prime.pl */
23 /* Copyright (C) 1995-1997 Eric Young (eay\@mincom.oz.au).
24 * All rights reserved.
25 * Copyright remains Eric Young's, and as such any Copyright notices in
26 * the code are not to be removed.
27 * See the COPYRIGHT file in the SSLeay distribution for more details.
32 for ($i=0; $i <= $#primes; $i++)
34 if ($primes[$i] > 256)
41 printf "#ifndef EIGHT_BIT\n";
42 printf "#define NUMPRIMES %d\n",$num;
44 printf "#define NUMPRIMES %d\n",$eight;
46 print "static unsigned int primes[NUMPRIMES]=\n\t{\n\t";
48 for ($i=0; $i <= $#primes; $i++)
50 printf "\n#ifndef EIGHT_BIT\n\t" if ($primes[$i] > 256) && !($init++);
51 printf("\n\t") if (($i%8) == 0) && ($i != 0);
52 printf("%4d,",$primes[$i]);
54 print "\n#endif\n\t};\n";