summaryrefslogtreecommitdiffstats
path: root/source/l/netpbm/netpbm-ppmfadeusage.patch
blob: d48f5f546851b2f686367475ddab3c2c1aef0126 (about) (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff -urNp old/editor/ppmfade new/editor/ppmfade
--- old/editor/ppmfade	2017-11-01 11:47:49.869611402 +0100
+++ new/editor/ppmfade	2017-11-01 11:53:25.524973342 +0100
@@ -84,7 +84,7 @@ for ($n = 0; $n < @ARGV; $n++) {
         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++;
@@ -92,7 +92,7 @@ for ($n = 0; $n < @ARGV; $n++) {
         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++;
@@ -113,9 +113,12 @@ for ($n = 0; $n < @ARGV; $n++) {
         $mode = $BLOCK;
     } elsif ("$ARGV[$n]" eq "-mix") {
         $mode = $MIX;
+    } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "--help" || $ARGV[$n] eq "-h") {
+        print "ppmfade: Use 'man ppmfade' for help.\n";
+        exit 1;
     } else {
         print "Unknown argument: $ARGV[$n]\n";
-        exit 100;
+        exit 1;
     } 
 }
 #
@@ -134,18 +137,18 @@ if ($first_file ne "undefined") {
         $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");