summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/util/extract-names.pl
blob: 744a8e2324e6cc7aaa2641d644ac2cfe1eeeafe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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;
	    s/^[ \t]+//g;
	    s/[ \t]+$//g;
	    push @words, split ',';
	}
    }
    if (/^=head1 *NAME *$/) {
	$name = 1;
    }
}

print join("\n", @words),"\n";

OpenPOWER on IntegriCloud