summaryrefslogtreecommitdiff
path: root/doc/scripts/split-texi.pl
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-14 10:43:17 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-14 10:43:20 +0100
commitab06513726eebecd815ea0ed40fed2c5351b5e23 (patch)
treeb113701469bf073c14553a26a4ac9a9dba83e410 /doc/scripts/split-texi.pl
parentf76c914e10873b7bd74311a88e6f76f4a4c5ee82 (diff)
downloadgnutls-ab06513726eebecd815ea0ed40fed2c5351b5e23.tar.gz
caption is set on enumerations in texinfo. Unfortunately they are not visible to the pdf output due to a probable bug in texinfo.
Diffstat (limited to 'doc/scripts/split-texi.pl')
-rwxr-xr-xdoc/scripts/split-texi.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/scripts/split-texi.pl b/doc/scripts/split-texi.pl
index a7ee518192..b4b0087d5f 100755
--- a/doc/scripts/split-texi.pl
+++ b/doc/scripts/split-texi.pl
@@ -21,7 +21,7 @@ sub key_of_record {
my ($key) = $lines[$i];
if ($enum == 1) {
- while( !($key =~ m/^\@float Table,(.*)$/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; }
+ while( !($key =~ m/\@c\s(.*)\n/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; }
} else {
while( !($key =~ m/^\\functionTitle\{(.*)\}/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; }
}
@@ -30,19 +30,24 @@ sub key_of_record {
}
if ($enum == 1) {
- $/="\n\@end float"; # Records are separated by blank lines.
+ $/="\@end itemize"; # Records are separated by blank lines.
} else {
$/="\n\\end{function}"; # Records are separated by blank lines.
}
@records = <>; # Read in whole file, one record per array element.
+$/="\n";
+
mkdir $dir;
-@records = sort { key_of_record($a) cmp key_of_record($b) } @records;
+if ($enum == 0) {
+ @records = sort { key_of_record($a) cmp key_of_record($b) } @records;
+}
+
foreach (@records) {
$key = $_;
if ($enum == 1) {
- $key =~ m/\@float Table,(.*)/;
+ $key =~ m/\@c\s(.*)\n/;
$key = $1;
} else {
$key =~ m/\\functionTitle\{(.*)\}/;