Commit 2bf7d3a4324a3870eb0d8fe0076d68735769d7a4

Steffen Jaeckel 2017-12-18T23:43:26

add function name to index This fixes #98

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/doc/booker.pl b/doc/booker.pl
index 2b295f9..590e6ea 100644
--- a/doc/booker.pl
+++ b/doc/booker.pl
@@ -85,8 +85,12 @@ 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) {