57
57
# Emit one parameter name and text
61
62
if ($block = $param_text{$name}) {
62
print "/* .IP \"\\fB$name ($defval_text{$name})\\fR\"\n";
63
print "$delim .IP \"\\fB$name ($defval_text{$name})\\fR\"\n";
64
65
$block =~ s/<a [^>]*>//g;
65
66
$block =~ s/<\/a>//g;
105
106
$block =~ s/([_a-zA-Z0-9-]+)(\([0-9]\))/\\fB\1\\fR\2/g;
107
108
# Encapsulate as C code comment.
108
$block =~ s/^([^.])/\/\*\t\1/;
109
$block =~ s/^\./\/\* ./;
110
$block =~ s/\n([^.])/\n\/\*\t\1/g;
111
$block =~ s/\n\./\n\/\* ./g;
109
$block =~ s/^([^.])/$delim\t\1/;
110
$block =~ s/^\./$delim ./;
111
$block =~ s/\n([^.])/\n$delim\t\1/g;
112
$block =~ s/\n\./\n$delim ./g;
115
print "/* .IP \"\\fB$name ($defval)\\fR\"\n";
116
print "$delim .IP \"\\fB$name ($defval)\\fR\"\n";
171
# Process source file with embedded text. For now, hard-coded for C.
172
# Process source file with embedded text. For now, hard-coded for C & sh.
176
if (/^(\/\*|#)\+\+/) {
183
emit_text() if ($name ne "");
184
emit_text($1) if ($name ne "");
194
if (/\/\* +CONFIGURATION +PARAM/) {
195
if (/(\/\*|#) +CONFIGURATION +PARAM/) {
198
199
# Delete text after nested itemized list.
199
if ($incomment == 2 && /^\/\* +\.IP ""/) {
200
if ($incomment == 2 && /^(\/\*|#) +\.IP ""/) {
202
last if /^\/\* +([A-Z][A-Z][A-Z]+|\.[A-Z][A-Z])/;
203
last if /^(\/\*|#) +([A-Z][A-Z][A-Z]+|\.[A-Z][A-Z])/;
207
208
# Delete nested itemized list.
208
if ($incomment == 2 && /^\/\* +\.RS/) {
209
if ($incomment == 2 && /^(\/\*|#) +\.RS/) {
213
$rsnest++ if /^\/\* +\.RS/;
214
$rsnest-- if /\/\* +\.RE/;
214
$rsnest++ if /^(\/\*|#) +\.RS/;
215
$rsnest-- if /(\/\*|#) +\.RE/;
215
216
last if $rsnest == 0;
220
if ($incomment == 2 && /^\/\* +\.IP +"?\\fB([a-zA-Z0-9_]+)( +\((.*)\))?/) {
221
emit_text() if ($name ne "");
221
if ($incomment == 2 && /^(\/\*|#) +\.IP +"?\\fB([a-zA-Z0-9_]+)( +\((.*)\))?/) {
222
emit_text($1) if ($name ne "");
228
if ($incomment == 2 && /^\/\* +([A-Z][A-Z][A-Z]+|\.[A-Z][A-Z])/) {
229
emit_text() if ($name ne "");
230
$incomment = 0 if /^\/\* +(SEE +ALSO|README +FILES|LICENSE|AUTHOR)/;
229
if ($incomment == 2 && /^(\/\*|#) +([A-Z][A-Z][A-Z]+|\.[A-Z][A-Z])/) {
230
emit_text($1) if ($name ne "");
231
$incomment = 0 if /^(\/\*|#) +(SEE +ALSO|README +FILES|LICENSE|AUTHOR)/;