$func_name = "fn";
$doJ = 0;
$doLong = 0;
-$cproto = "";
+$cprotoArgs = "";
while ($#ARGV > 0) {
my $cmd = shift;
if ($cmd eq "-b") {
$basedir = shift;
- $cproto .= " -I '${basedir}'";
+ $cprotoArgs .= " -I '${basedir}'";
} elsif ($cmd eq "--func-name") {
$func_name = shift;
} elsif ($cmd eq "--java-name") {
} elsif ($cmd eq "--java-long") {
$doLong = 1;
} else {
- $cproto .= " '$cmd'";
+ $cprotoArgs .= " '$cmd'";
}
}
$def = shift;
-die ("`$def': input file doesn't exist") if ! -f $def;
-
$header = "";
$librart = "";
@functions = ();
$last_library = "";
$mode = "";
-open IN,"<$def";
+open (IN,"<$def") || die ("opening $def");
while (<IN>) {
chop;
$header = $2;
push @headers, $header;
- -f "$basedir/$header" || die ("header $header not found");
-
+ print STDERR "cproto -q -x ${cprotoArgs} $basedir/$header\n";
%proto = ();
- open PROTO, "cproto -q -x ${cproto} $basedir/$header|";
+ open (PROTO, "cproto -q -x ${cprotoArgs} $basedir/$header|") || die("cproto failed");
while (<PROTO>) {
chop;
}
close IN;
-$date = `date`;
-chop $date;
-print "/* This file was autogenerated on $date: */\n";
+print "/* This file was autogenerated by: */\n";
print "/* $args */\n";
if ($#headers >= 0) {