parent
fde2143df7
commit
41e0250411
14
.github/scripts/verify-synopsis.pl
vendored
14
.github/scripts/verify-synopsis.pl
vendored
@ -46,17 +46,17 @@ sub extract {
|
|||||||
open(O, ">$cfile");
|
open(O, ">$cfile");
|
||||||
while(<F>) {
|
while(<F>) {
|
||||||
$iline++;
|
$iline++;
|
||||||
if(/^.SH SYNOPSIS/) {
|
if(/^# SYNOPSIS/) {
|
||||||
$syn = 1
|
$syn = 1
|
||||||
}
|
}
|
||||||
elsif($syn == 1) {
|
elsif($syn == 1) {
|
||||||
if(/^.nf/) {
|
if(/^\~\~\~/) {
|
||||||
$syn++;
|
$syn++;
|
||||||
print O "#line $iline \"$f\"\n";
|
print O "#line $iline \"$f\"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif($syn == 2) {
|
elsif($syn == 2) {
|
||||||
if(/^.fi/) {
|
if(/^\~\~\~/) {
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
# turn the vararg argument into vararg
|
# turn the vararg argument into vararg
|
||||||
@ -68,13 +68,17 @@ sub extract {
|
|||||||
close(F);
|
close(F);
|
||||||
close(O);
|
close(O);
|
||||||
|
|
||||||
|
if($syn < 2) {
|
||||||
|
print STDERR "Found no synopsis in $f\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $error;
|
my $error;
|
||||||
for my $m (@files) {
|
for my $m (@files) {
|
||||||
print "Verify $m\n";
|
$error |= extract($m);
|
||||||
extract($m);
|
|
||||||
$error |= testcompile($m);
|
$error |= testcompile($m);
|
||||||
}
|
}
|
||||||
exit $error;
|
exit $error;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user