diff --git a/.github/scripts/verify-examples.pl b/.github/scripts/verify-examples.pl index 0b750711ea..377fe8340c 100755 --- a/.github/scripts/verify-examples.pl +++ b/.github/scripts/verify-examples.pl @@ -26,6 +26,7 @@ my @files = @ARGV; my $cfile = "test.c"; my $check = "./scripts/checksrc.pl"; +my $error; if($files[0] eq "-h") { print "Usage: verify-synopsis [man pages]\n"; @@ -47,8 +48,9 @@ sub extract { my $syn = 0; my $l = 0; my $iline = 0; - open(F, "<$f"); - open(O, ">$cfile"); + my $fail = 0; + open(F, "<$f") or die "failed opening input file $f : $!"; + open(O, ">$cfile") or die "failed opening output file $cfile : $!"; print O "#include \n"; while() { $iline++; @@ -68,6 +70,15 @@ sub extract { if(/^.fi/) { last; } + if(/(?