2010-02-17 12:23:54 +00:00
|
|
|
diff -up netpbm-10.47.09/editor/ppmfade.ppmfadeusage netpbm-10.47.09/editor/ppmfade
|
|
|
|
--- netpbm-10.47.09/editor/ppmfade.ppmfadeusage 2010-02-17 11:22:02.000000000 +0100
|
|
|
|
+++ netpbm-10.47.09/editor/ppmfade 2010-02-17 11:27:29.000000000 +0100
|
|
|
|
@@ -34,7 +34,6 @@ my $base_name = "fade"; # default base
|
2010-01-25 08:42:36 +00:00
|
|
|
my $image = "ppm"; # default output storage format
|
|
|
|
my $mode = $SPREAD; # default fading mode
|
|
|
|
|
2010-02-17 12:23:54 +00:00
|
|
|
-
|
2010-01-25 08:42:36 +00:00
|
|
|
my $n; # argument number
|
|
|
|
|
2010-02-17 12:23:54 +00:00
|
|
|
for ($n = 0; $n < @ARGV; $n++) {
|
|
|
|
@@ -44,7 +43,7 @@ for ($n = 0; $n < @ARGV; $n++) {
|
2010-01-25 08:42:36 +00:00
|
|
|
if (-e $first_file) {
|
|
|
|
} else {
|
|
|
|
print "I can't find first file '$first_file'\n";
|
|
|
|
- exit 20;
|
|
|
|
+ exit 1;
|
|
|
|
}
|
|
|
|
} elsif ($ARGV[$n] eq "-l") {
|
|
|
|
$n++;
|
2010-02-17 12:23:54 +00:00
|
|
|
@@ -52,7 +51,7 @@ for ($n = 0; $n < @ARGV; $n++) {
|
2010-01-25 08:42:36 +00:00
|
|
|
if (-e $last_file) {
|
|
|
|
} else {
|
|
|
|
print "I can't find last file '$last_file'\n";
|
|
|
|
- exit 20;
|
|
|
|
+ exit 1;
|
|
|
|
}
|
|
|
|
} elsif ($ARGV[$n] eq "-base") {
|
|
|
|
$n++;
|
2010-02-17 12:23:54 +00:00
|
|
|
@@ -73,11 +72,12 @@ for ($n = 0; $n < @ARGV; $n++) {
|
|
|
|
$mode = $BLOCK;
|
|
|
|
} elsif ("$ARGV[$n]" eq "-mix") {
|
|
|
|
$mode = $MIX;
|
|
|
|
- } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "-h") {
|
|
|
|
- usage();
|
|
|
|
+ } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "--help" || $ARGV[$n] eq "-h") {
|
|
|
|
+ print "ppmfade: Use 'man ppmfade' for help.\n";
|
|
|
|
+ exit 1;
|
2010-01-25 08:42:36 +00:00
|
|
|
} else {
|
|
|
|
print "Unknown argument: $ARGV[$n]\n";
|
|
|
|
- exit 100;
|
|
|
|
+ exit 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#
|
2010-02-17 12:23:54 +00:00
|
|
|
@@ -96,18 +96,18 @@ if ($first_file ne "undefined") {
|
2010-01-25 08:42:36 +00:00
|
|
|
$width = $1; $height = $2;
|
|
|
|
} else {
|
|
|
|
print("Unrecognized results from pnmfile on $first_file.\n");
|
|
|
|
- exit(50);
|
|
|
|
+ exit 1;
|
|
|
|
}
|
|
|
|
} elsif ($last_file ne "undefined") {
|
|
|
|
if ((`pnmfile $last_file` =~ m{\b(\d+)\sby\s(\d+)} )) {
|
|
|
|
$width = $1; $height = $2;
|
|
|
|
} else {
|
|
|
|
print("Unrecognized results from pnmfile on $first_file.\n");
|
|
|
|
- exit(50);
|
|
|
|
+ exit 1;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
print("ppmfade: You must specify -f or -l (or both)\n");
|
|
|
|
- exit(90);
|
|
|
|
+ exit 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
print("Frames are " . $width . "W x " . $height . "H\n");
|