From: Daniel Stenberg Date: Thu, 17 Nov 2022 13:41:04 +0000 (+0100) Subject: scripts/delta: adapt to curl.h changes for the opt counter X-Git-Tag: curl-7_87_0~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=709aefc7ca68fec264edeb5bc97485f1903261bb;p=thirdparty%2Fcurl.git scripts/delta: adapt to curl.h changes for the opt counter --- diff --git a/scripts/delta b/scripts/delta index 3c6a823d35..858f161009 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() { + if(/^ CURLOPT(|DEPRECATED)\(/ && ($_ !~ /OBSOLETE/)) { + $opts++; + } + } + close(H); + return $opts; +} +$asetopts = setopts("