6 print "/* This file auto-generated with ./vperm.pl $nelt $leng. */\n\n";
8 for ($i = 0; $i < $nelt; ++$i) { $perm[$i] = 0; }
11 for ($i = 0; $i < ($leng * $nelt) ** $nelt; ++$i)
15 print "}\n\n" if $ncheck > 0;
16 print "void check$ncheck(void)\n{\n";
21 for ($j = 0; $j < $nelt; ++$j)
24 print ", " if $j < $nelt - 1;
28 INCR
: for ($j = 0; $j < $nelt; ++$j)
30 last INCR
if ++$perm[$j] < $leng * $nelt;
36 print "void check(void)\n{\n";
37 for ($i = 0; $i < $ncheck; ++$i)
39 print " check$i ();\n";