scripts/delta: adapt to curl.h changes for the opt counter

This commit is contained in:
Daniel Stenberg 2022-11-17 14:41:04 +01:00
parent cc3d517e8c
commit 709aefc7ca
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -59,8 +59,20 @@ $bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
$contribs = $acontribs - $bcontribs;
# number of setops:
$asetopts=`grep '^ CURLOPT(' include/curl/curl.h | grep -cv OBSOLETE`;
$bsetopts=`git show $start:include/curl/curl.h | grep '^ CURLOPT(' | grep -cv OBSOLETE`;
sub setopts {
my ($f)=@_;
open(H, "$f");
my $opts;
while(<H>) {
if(/^ CURLOPT(|DEPRECATED)\(/ && ($_ !~ /OBSOLETE/)) {
$opts++;
}
}
close(H);
return $opts;
}
$asetopts = setopts("<include/curl/curl.h");
$bsetopts = setopts("git show $start:include/curl/curl.h|");
$nsetopts = $asetopts - $bsetopts;
# Number of command line options: