diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-11-17 14:41:04 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-11-17 14:41:04 +0100 |
commit | 709aefc7ca68fec264edeb5bc97485f1903261bb (patch) | |
tree | f0fb6eb11ed6b034e825f161bf9511ded3b93a17 /scripts | |
parent | cc3d517e8cfac502c34202980c227852c8f93fbf (diff) | |
download | curl-709aefc7ca68fec264edeb5bc97485f1903261bb.tar.gz |
scripts/delta: adapt to curl.h changes for the opt counter
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/delta | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/delta b/scripts/delta index 3c6a823d3..858f16100 100755 --- a/scripts/delta +++ b/scripts/delta @@ -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: |