mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
cannot binmode(STDOUT)
This commit is contained in:
parent
0539ebd1d9
commit
8db7f244d3
1 changed files with 10 additions and 6 deletions
16
dawg/xloc.pl
16
dawg/xloc.pl
|
@ -21,10 +21,8 @@
|
||||||
use strict;
|
use strict;
|
||||||
use xloc;
|
use xloc;
|
||||||
|
|
||||||
# For f*cking windoze linefeeds
|
|
||||||
binmode(STDOUT);
|
|
||||||
|
|
||||||
my $arg = shift(@ARGV);
|
my $arg = shift(@ARGV);
|
||||||
|
my $outfile = shift(@ARGV);
|
||||||
my $lang = shift(@ARGV);
|
my $lang = shift(@ARGV);
|
||||||
my $path = "./$lang";
|
my $path = "./$lang";
|
||||||
my $infoFile = "$path/info.txt";
|
my $infoFile = "$path/info.txt";
|
||||||
|
@ -34,10 +32,16 @@ die "info file $infoFile not found\n" if ! -s $infoFile;
|
||||||
|
|
||||||
my $xlocToken = xloc::ParseTileInfo($infoFile);
|
my $xlocToken = xloc::ParseTileInfo($infoFile);
|
||||||
|
|
||||||
|
open OUTFILE, "> $outfile";
|
||||||
|
# For f*cking windoze linefeeds
|
||||||
|
binmode( OUTFILE );
|
||||||
|
|
||||||
if ( $arg eq "-t" ) {
|
if ( $arg eq "-t" ) {
|
||||||
xloc::WriteMapFile( $xlocToken, 0, \*STDOUT );
|
xloc::WriteMapFile( $xlocToken, 0, \*OUTFILE );
|
||||||
} elsif ( $arg eq "-tn" ) {
|
} elsif ( $arg eq "-tn" ) {
|
||||||
xloc::WriteMapFile( $xlocToken, 1, \*STDOUT );
|
xloc::WriteMapFile( $xlocToken, 1, \*OUTFILE );
|
||||||
} elsif ( $arg eq "-v" ) {
|
} elsif ( $arg eq "-v" ) {
|
||||||
xloc::WriteValuesFile( $xlocToken, \*STDOUT );
|
xloc::WriteValuesFile( $xlocToken, \*OUTFILE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close OUTFILE;
|
||||||
|
|
Loading…
Reference in a new issue