/usr/games/dealer.dpp is in dealer 20161012-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/perl
use Dealer::Dist;
use strict;
use Carp;
sub preshape {
my @results;
my $shapes = shift;
my @shapes = split(/(\s+[-+]\s+)/, $shapes);
my $s = Dealer::Dist->new;
unshift @shapes, ' + ' unless $shapes =~ /^\s+([-+])/;
while(@shapes) {
my $expanded;
my $sexp = shift @shapes;
my $sign;
$sexp =~ /\s+([-+])/ or die "BUG analysing $shapes";
push @results, $sign = " $1 ";
$s->shape(shift @shapes);
$expanded = join $sign, $s->to_dealer;
push @results, $expanded;
}
shift @results;
return join '', @results;
}
while(<>) {
s/(shape\s*\{\s*\w+\s*,)([^\}]+)/"$1".&preshape($2)/ge;
s/shape\s*\{([^\}]+)\}/shape($1)/g;
s/\#.*$//;
print;
}
|