]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added missing files
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 20 Sep 2011 16:59:12 +0000 (18:59 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 20 Sep 2011 16:59:18 +0000 (18:59 +0200)
.gitignore
doc/scripts/split-texi.pl [new file with mode: 0755]

index 4c10f3bbf1abd0117e4fb81e82aa9f9930ac2450..53b2c2c8d4d39b98243e6cc1af8f62d4c9921176 100644 (file)
@@ -514,3 +514,6 @@ doc/latex/gnutls-enums.tex
 doc/latex/enums
 doc/latex/gnutls.lof
 doc/latex/gnutls.lot
+tests/x509cert-tl
+doc/enums.texi
+doc/enums/
diff --git a/doc/scripts/split-texi.pl b/doc/scripts/split-texi.pl
new file mode 100755 (executable)
index 0000000..bd6e11e
--- /dev/null
@@ -0,0 +1,57 @@
+#!/usr/bin/perl
+
+$dir = shift;
+$param2 = shift;
+
+if ($param2 ne '') {
+  $enum = 1;
+} else {
+  $enum = 0;
+}
+
+sub key_of_record {
+  local($record) = @_;
+
+  # Split record into lines:
+  my @lines = split /\n/, $record;
+
+  my ($i) = 1;
+  my ($key) = $lines[$i]; 
+
+  if ($enum == 1) {
+    while( !($key =~ m/^$\@float Table,(.*)$/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; }
+  } else {
+    while( !($key =~ m/^$\\functionTitle\{(.*)\}/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; }
+  }
+
+  return $key;
+}
+
+if ($enum == 1) {
+  $/="\n\@end float";          # 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.
+
+mkdir $dir;
+
+@records = sort { key_of_record($a) cmp key_of_record($b) } @records;
+foreach (@records) {
+  $key = $_;
+  if ($enum == 1) {
+    $key =~ m/\@float Table,(.*)/;
+    $key = $1;
+  } else {
+    $key =~ m/\\functionTitle\{(.*)\}/;
+    $key = $1;
+  }
+
+  if (defined $key && $key ne "") {
+    open FILE, "> $dir/$key\n" or die $!;
+    print FILE $_ . "\n";
+    close FILE;
+  }
+} 
+
+#print @records;