improve generated output

This commit is contained in:
Steffen Jaeckel 2017-12-18 23:37:01 +01:00
parent f3fa95e402
commit a768850525
5 changed files with 22 additions and 3 deletions

View File

@ -14,6 +14,7 @@
* *
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org * Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/ */
#include <stdarg.h> #include <stdarg.h>
void mp_clear_multi(mp_int *mp, ...) void mp_clear_multi(mp_int *mp, ...)

View File

@ -14,6 +14,7 @@
* *
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org * Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/ */
#include <stdarg.h> #include <stdarg.h>
int mp_init_multi(mp_int *mp, ...) int mp_init_multi(mp_int *mp, ...)

View File

@ -14,6 +14,7 @@
* *
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org * Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/ */
const mp_digit ltm_prime_tab[] = { const mp_digit ltm_prime_tab[] = {
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035,

View File

@ -14,6 +14,7 @@
* *
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org * Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/ */
#ifdef MP_LOW_MEM #ifdef MP_LOW_MEM
# define TAB_SIZE 32 # define TAB_SIZE 32
#else #else

View File

@ -92,17 +92,32 @@ while (<$in>) {
if ($skipheader == 1) { if ($skipheader == 1) {
# scan till next end of comment, e.g. skip license # scan till next end of comment, e.g. skip license
while (<$src>) { while (<$src>) {
if ($_ =~ /#ifdef BN/) {
printf {$out} ("%03d ", $line);
for ($x = 0; $x < length($_); $x++) {
print {$out} chr(vec($_, $x, 8));
if ($x == 75) {
print {$out} "\n ";
++$wroteline;
}
}
print {$out} "...\n";
++$wroteline;
}
$text[$line++] = $_; $text[$line++] = $_;
last if ($_ =~ /libtom\.org/); last if ($_ =~ /libtom\.org/);
} }
<$src>; <$src>;
$text[$line++] = $_;
<$src>;
$text[$line++] = $_;
} }
my $inline = 0; my $inline = 0;
while (<$src>) { while (<$src>) {
next if ($_ =~ /\$Source/); next if ($_ =~ /ref/);
next if ($_ =~ /\$Revision/); next if ($_ =~ /git commit/);
next if ($_ =~ /\$Date/); next if ($_ =~ /commit time/);
$text[$line++] = $_; $text[$line++] = $_;
++$inline; ++$inline;
chomp($_); chomp($_);