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
38
39
|
--- editor/pnmquant Tue Dec 16 17:34:11 2003
+++ editor/pnmquant.new Fri Feb 20 14:31:03 2004
@@ -13,7 +13,8 @@
use Getopt::Long;
use File::Temp "tempfile";
use File::Spec;
-use Fcntl ":seek";
+use Fcntl;
+use POSIX qw(SEEK_SET SEEK_CUR SEEK_END);
my ($TRUE, $FALSE) = (1,0);
@@ -52,7 +53,7 @@
my $infile;
my $ncolors = $ARGV[0];
- if (!($ncolors =~ m{ ^[[:digit:]]+$ }x ) || $ncolors == 0) {
+ if (!($ncolors =~ m{ ^[\d]+$ }x ) || $ncolors == 0) {
print(STDERR
"Number of colors argument '$ncolors' is not a positive " .
"integer.\n");
@@ -111,7 +112,7 @@
tell(INFH); # Avoids bogus "INFH is not referenced" warning
}
} else {
- open(STDIN, "<", $infile)
+ open(STDIN, "<" . $infile)
or die("Unable to open input file '$infile'. Errno=$ERRNO");
}
}
@@ -152,7 +153,7 @@
$spreadOpt = "-spreadbrightness";
}
- open(STDOUT, ">", $mapfileSpec);
+ open(STDOUT, ">" . $mapfileSpec);
my $maprc = system("pnmcolormap", $ncolors, $averageOpt, $spreadOpt);
|