openssl/util/extract-names.pl

27 lines
388 B
Perl
Raw Normal View History

#!/usr/bin/perl
$/ = ""; # Eat a paragraph at once.
while(<STDIN>) {
s|\R$||;
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;
2003-06-12 03:44:37 +08:00
push @words, split ',';
}
}
if (/^=head1 *NAME *$/) {
$name = 1;
}
}
print join("\n", @words),"\n";