security/nss/lib/freebl/mpi/utils/ptab.pl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 #!/usr/bin/perl
     3 # This Source Code Form is subject to the terms of the Mozilla Public
     4 # License, v. 2.0. If a copy of the MPL was not distributed with this
     5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     7 while(<>) {
     8     chomp;
     9     push(@primes, $_);
    10 }
    12 printf("mp_size   prime_tab_size = %d;\n", ($#primes + 1));
    13 print "mp_digit  prime_tab[] = {\n";
    15 print "\t";
    16 $last = pop(@primes);
    17 foreach $prime (sort {$a<=>$b} @primes) {
    18     printf("0x%04X, ", $prime);
    19     $brk = ($brk + 1) % 8;
    20     print "\n\t" if(!$brk);
    21 }
    22 printf("0x%04X", $last);
    23 print "\n" if($brk);
    24 print "};\n\n";
    26 exit 0;

mercurial