Merge branch 'fix/doc' into develop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
diff --git a/bn_mp_clear_multi.c b/bn_mp_clear_multi.c
index 284fab8..ac3949a 100644
--- a/bn_mp_clear_multi.c
+++ b/bn_mp_clear_multi.c
@@ -14,6 +14,7 @@
*
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/
+
#include <stdarg.h>
void mp_clear_multi(mp_int *mp, ...)
diff --git a/bn_mp_init_multi.c b/bn_mp_init_multi.c
index 0da7803..9ed777c 100644
--- a/bn_mp_init_multi.c
+++ b/bn_mp_init_multi.c
@@ -14,6 +14,7 @@
*
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/
+
#include <stdarg.h>
int mp_init_multi(mp_int *mp, ...)
diff --git a/bn_prime_tab.c b/bn_prime_tab.c
index c8fadcd..bcd23ed 100644
--- a/bn_prime_tab.c
+++ b/bn_prime_tab.c
@@ -14,6 +14,7 @@
*
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/
+
const mp_digit ltm_prime_tab[] = {
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035,
diff --git a/bn_s_mp_exptmod.c b/bn_s_mp_exptmod.c
index 46e50df..a954757 100644
--- a/bn_s_mp_exptmod.c
+++ b/bn_s_mp_exptmod.c
@@ -14,6 +14,7 @@
*
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/
+
#ifdef MP_LOW_MEM
# define TAB_SIZE 32
#else
diff --git a/doc/booker.pl b/doc/booker.pl
index c2aa43f..590e6ea 100644
--- a/doc/booker.pl
+++ b/doc/booker.pl
@@ -85,24 +85,43 @@ while (<$in>) {
my $line = 0;
my $tmp = $m[1];
+ my $fun = $tmp;
$tmp =~ s/_/"\\_"/ge;
- print {$out} "\\vspace{+3mm}\\begin{small}\n\\hspace{-5.1mm}{\\bf File}: $tmp\n\\vspace{-3mm}\n\\begin{alltt}\n";
+ $fun =~ s/^bn_//;
+ $fun =~ s/\.c$//;
+ $fun =~ s/_/"\\_"/ge;
+ print {$out} "\\index{$fun}\\vspace{+3mm}\\begin{small}\n\\hspace{-5.1mm}{\\bf File}: $tmp\n\\vspace{-3mm}\n\\begin{alltt}\n";
$wroteline += 5;
if ($skipheader == 1) {
# scan till next end of comment, e.g. skip license
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++] = $_;
last if ($_ =~ /libtom\.org/);
}
<$src>;
+ $text[$line++] = $_;
+ <$src>;
+ $text[$line++] = $_;
}
my $inline = 0;
while (<$src>) {
- next if ($_ =~ /\$Source/);
- next if ($_ =~ /\$Revision/);
- next if ($_ =~ /\$Date/);
+ next if ($_ =~ /ref/);
+ next if ($_ =~ /git commit/);
+ next if ($_ =~ /commit time/);
$text[$line++] = $_;
++$inline;
chomp($_);