cannot binmode(STDOUT)

This commit is contained in:
ehouse 2004-07-11 16:24:12 +00:00
parent 0539ebd1d9
commit 8db7f244d3

View file

@ -21,10 +21,8 @@
use strict;
use xloc;
# For f*cking windoze linefeeds
binmode(STDOUT);
my $arg = shift(@ARGV);
my $outfile = shift(@ARGV);
my $lang = shift(@ARGV);
my $path = "./$lang";
my $infoFile = "$path/info.txt";
@ -34,10 +32,16 @@ die "info file $infoFile not found\n" if ! -s $infoFile;
my $xlocToken = xloc::ParseTileInfo($infoFile);
open OUTFILE, "> $outfile";
# For f*cking windoze linefeeds
binmode( OUTFILE );
if ( $arg eq "-t" ) {
xloc::WriteMapFile( $xlocToken, 0, \*STDOUT );
xloc::WriteMapFile( $xlocToken, 0, \*OUTFILE );
} elsif ( $arg eq "-tn" ) {
xloc::WriteMapFile( $xlocToken, 1, \*STDOUT );
xloc::WriteMapFile( $xlocToken, 1, \*OUTFILE );
} elsif ( $arg eq "-v" ) {
xloc::WriteValuesFile( $xlocToken, \*STDOUT );
xloc::WriteValuesFile( $xlocToken, \*OUTFILE );
}
close OUTFILE;