repo.or.cz
/
pwmd.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Version 2.19.
[pwmd.git]
/
doc
/
extract-help-text.awk
blob
f50a86032823441cbdd76e6d3226c308937be3f4
1
# Read in commands.c to reformat the command help text for offline
2
# documentation found in doc/COMMANDS.
3
{
4
while
(
getline
>
0
)
5
if
(
$
0
~
/
!
BEGIN
-
HELP
-
TEXT!
/) {
6
while
(
getline
>
0
)
7
if
(
$
0
~
/
!
END
-
HELP
-
TEXT!
/) {
8
exit
9
}
10
else if
(
$
0
~
/
new_command\
(/) {
11
getline
12
sub
(/
^
\"
/,
""
)
13
sub
(/
\\
n
\"
$
/,
""
)
14
print
15
16
while
(
getline
>
0
)
17
if
(
$
0
~
/
^\
)
\
);/) {
18
print
"
\n
"
19
break
20
}
21
else
{
22
sub
(/
^
\"
/,
""
)
23
sub
(/
\\
n
\"
$
/,
""
)
24
gsub
(/
\\\"
/,
"
\"
"
)
25
print
26
}
27
}
28
}
29
}