# i'll probably get in trouble for this :)
} else {
# does it run?
- if ($^O ne 'dos') {
- $ok = system("./perl -I../lib ../utils/h2ph -d. lib/h2ph.h");
- } else {
- # h2ph prints some info which confuses t/TEST on dos/djgpp
- $ok = system("./perl -I../lib ../utils/h2ph -d. lib/h2ph.h >nul");
- }
+ $ok = system("./perl -I../lib ../utils/h2ph -d. -Q lib/h2ph.h");
print(($ok == 0 ? "" : "not "), "ok 1\n");
# does it work? well, does it do what we expect? :-)
use File::Path qw(mkpath);
use Getopt::Std;
-getopts('Dd:rlha');
+getopts('Dd:rlhaQ');
die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
@inc_dirs = inc_dirs() if $opt_a;
open(OUT, ">-");
} else {
($outfile = $file) =~ s/\.h$/.ph/ || next;
- print "$file -> $outfile\n";
+ print "$file -> $outfile\n" unless $opt_Q;
if ($file =~ m|^(.*)/|) {
$dir = $1;
mkpath "$Dest_dir/$dir";
} elsif(/^ident\s+(.*)/) {
print OUT $t, "# $1\n";
}
- } elsif(/^\s*(typedef\s*)?enum(\s+[a-zA-Z_]\w*)?\s*\{/) {
+ } elsif(/^\s*(typedef\s*)?enum\s*(\s+[a-zA-Z_]\w*\s*)?\{/) {
until(/\}.*?;/) {
chomp($next = <IN>);
$_ .= $next;