repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
etc/services - sync with NetBSD-8
[minix.git]
/
crypto
/
external
/
bsd
/
openssl
/
dist
/
util
/
extract-names.pl
blob
35bd6ed84326f16ca6ffbdd7e99c8fa1b6a7cf1d
1
#!/usr/bin/perl
2
3
$/ =
""
;
# Eat a paragraph at once.
4
while
(<
STDIN
>) {
5
chop
;
6
s/\n/ /gm
;
7
if
(
/^=head1 /
) {
8
$name
=
0
;
9
}
elsif
(
$name
) {
10
if
(
/ - /
) {
11
s/ - .*//
;
12
s/,\s+/,/g
;
13
s/\s+,/,/g
;
14
s/^\s+//g
;
15
s/\s+$//g
;
16
s/\s/_/g
;
17
push
@words
,
split
','
;
18
}
19
}
20
if
(
/^=head1 *NAME *$/
) {
21
$name
=
1
;
22
}
23
}
24
25
print join
(
"
\n
"
,
@words
),
"
\n
"
;
26