blob: a9d470a6f605792b72518642a2f7936b1c1ad0d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/perl
open(GCC, "gcc -E ../include/curl/curl.h|");
while(<GCC>) {
if($_ =~ /(CURLOPT_(.*)) += (.*)/) {
$var= $1;
$expr = $3;
$f=$3;
if($expr =~ / *(\d+) *\+ *(\d+)/) {
$expr = $1+$2;
}
# nah, keep the CURL prefix to make them look like other
# languages' defines
# $var =~ s/^CURL//g;
print " public static final int $var = $expr;\n";
}
}
close(GCC);
|