]> WPIA git - cassiopeia.git/blobdiff - lib/openssl/util/extract-names.pl
add: execute openssl fetcher to fetch openssl 1.0.1j
[cassiopeia.git] / lib / openssl / util / extract-names.pl
diff --git a/lib/openssl/util/extract-names.pl b/lib/openssl/util/extract-names.pl
new file mode 100644 (file)
index 0000000..35bd6ed
--- /dev/null
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+$/ = "";                       # Eat a paragraph at once.
+while(<STDIN>) {
+    chop;
+    s/\n/ /gm;
+    if (/^=head1 /) {
+       $name = 0;
+    } elsif ($name) {
+       if (/ - /) {
+           s/ - .*//;
+           s/,\s+/,/g;
+           s/\s+,/,/g;
+           s/^\s+//g;
+           s/\s+$//g;
+           s/\s/_/g;
+           push @words, split ',';
+       }
+    }
+    if (/^=head1 *NAME *$/) {
+       $name = 1;
+    }
+}
+
+print join("\n", @words),"\n";
+