From: Daniel Stenberg Date: Tue, 10 Apr 2001 15:30:01 +0000 (+0000) Subject: C header to java converter X-Git-Tag: curl-7_7_2~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04c10e021c426beedf9f7b6f82d6d90ecbdb1cae;p=curl C header to java converter --- diff --git a/java/define2java.pl b/java/define2java.pl new file mode 100755 index 000000000..a9d470a6f --- /dev/null +++ b/java/define2java.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +open(GCC, "gcc -E ../include/curl/curl.h|"); + +while() { + 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);