freebsd-dev/crypto/openssl/util/extract-names.pl

25 lines
362 B
Perl
Raw Normal View History

#!/usr/bin/perl
$/ = ""; # Eat a paragraph at once.
while(<STDIN>) {
chop;
s/\n/ /gm;
if (/^=head1 /) {
$name = 0;
} elsif ($name) {
if (/ - /) {
s/ - .*//;
2003-10-01 12:32:41 +00:00
s/,[ \t]+/,/g;
2004-03-17 15:49:33 +00:00
s/^[ \t]+//g;
s/[ \t]+$//g;
2003-10-01 12:32:41 +00:00
push @words, split ',';
}
}
if (/^=head1 *NAME *$/) {
$name = 1;
}
}
print join("\n", @words),"\n";