Skip to content

Commit 709aefc

Browse files
committed
scripts/delta: adapt to curl.h changes for the opt counter
1 parent cc3d517 commit 709aefc

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

scripts/delta

+14-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,20 @@ $bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
5959
$contribs = $acontribs - $bcontribs;
6060

6161
# number of setops:
62-
$asetopts=`grep '^ CURLOPT(' include/curl/curl.h | grep -cv OBSOLETE`;
63-
$bsetopts=`git show $start:include/curl/curl.h | grep '^ CURLOPT(' | grep -cv OBSOLETE`;
62+
sub setopts {
63+
my ($f)=@_;
64+
open(H, "$f");
65+
my $opts;
66+
while(<H>) {
67+
if(/^ CURLOPT(|DEPRECATED)\(/ && ($_ !~ /OBSOLETE/)) {
68+
$opts++;
69+
}
70+
}
71+
close(H);
72+
return $opts;
73+
}
74+
$asetopts = setopts("<include/curl/curl.h");
75+
$bsetopts = setopts("git show $start:include/curl/curl.h|");
6476
$nsetopts = $asetopts - $bsetopts;
6577

6678
# Number of command line options:

0 commit comments

Comments
 (0)