-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcurlmopts-over-time.pl
More file actions
64 lines (55 loc) · 1.22 KB
/
curlmopts-over-time.pl
File metadata and controls
64 lines (55 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/perl
require "./stats/tag2date.pm";
sub num {
my ($t)=@_;
if($t =~ /^curl-(\d)_(\d+)_(\d+)/) {
return 10000*$1 + 100*$2 + $3;
}
elsif($t =~ /^curl-(\d)_(\d+)/) {
return 10000*$1 + 100*$2;
}
}
sub sortthem {
return num($a) <=> num($b);
}
@alltags= `git tag -l`;
foreach my $t (@alltags) {
chomp $t;
if($t =~ /^curl-([0-9_]*[0-9])\z/) {
push @releases, $t;
}
}
sub options {
my @file = @_;
my $c = 0;
foreach $f (@file) {
if($f =~ /^ .*\(CURLMOPT_/) {
$c++;
}
}
if(!$c) {
# check the old style
foreach $f (@file) {
if($f =~ /^ CINIT/) {
$c++;
}
}
}
return $c;
}
foreach my $t (sort sortthem @releases) {
if(num($t) <= 70101) {
next;
}
my $d = tag2date($t);
my @out = `git show $t:include/curl/multi.h 2>/dev/null`;
my $n = options(@out);
if($n) {
print "$d;$n\n";
}
}
my @out = `git show origin/master:include/curl/multi.h 2>/dev/null`;
my $n = options(@out);
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
printf "%04d-%02d-%02d;%d\n", $year + 1900, $mon + 1, $mday, $n;