summaryrefslogtreecommitdiffstats
path: root/util/extract-names.pl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-29 15:00:58 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-29 15:00:58 +0000
commitdb3758923b4db690feb6ca64562d21cc3d1f3abe (patch)
tree767dfb94c2b3a8355507d07192c6fd31037aca17 /util/extract-names.pl
parent5e4a75e79f530600cf71e1c6d7f6bfd0feb7ad0b (diff)
Make it so all names mentioned in the NAME section of each manpage becomes a
symlink to said manpage. PR: 242
Diffstat (limited to 'util/extract-names.pl')
-rw-r--r--util/extract-names.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/util/extract-names.pl b/util/extract-names.pl
new file mode 100644
index 0000000000..d413a045cc
--- /dev/null
+++ b/util/extract-names.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+$/ = ""; # Eat a paragraph at once.
+while(<STDIN>) {
+ chop;
+ s/\n/ /gm;
+ if (/^=head1 /) {
+ $name = 0;
+ } elsif ($name) {
+ if (/ - /) {
+ s/ - .*//;
+ s/[ \t,]+/ /g;
+ push @words, split ' ';
+ }
+ }
+ if (/^=head1 *NAME *$/) {
+ $name = 1;
+ }
+}
+
+print join("\n", @words),"\n";
+