Skip to content
Snippets Groups Projects
Commit 04c10e02 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

C header to java converter

parent d712a4e8
No related branches found
No related tags found
No related merge requests found
#!/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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment