mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +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 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;
|
||||
|
|
Loading…
Reference in a new issue