about summary refs log tree commit diff
path: root/editor/ppmfade
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-06-28 23:45:11 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-06-28 23:45:11 +0000
commitcdf6e0151411d887fef61245cb303ef190b29335 (patch)
tree678c2212e125e66e0a868773e2b4ec460794da4e /editor/ppmfade
parentde1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff)
downloadnetpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz
netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz
netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/ppmfade')
-rwxr-xr-xeditor/ppmfade16
1 files changed, 14 insertions, 2 deletions
diff --git a/editor/ppmfade b/editor/ppmfade
index 027fc793..dcd7bf26 100755
--- a/editor/ppmfade
+++ b/editor/ppmfade
@@ -41,6 +41,19 @@ exec perl -w -x -S -- "$0" "$@"
 ##############################################################################
 use strict;
 
+sub doVersionHack($) {
+    my ($argvR) = @_;
+
+    my $arg1 = $argvR->[0];
+
+    if (defined($arg1) && (($arg1 eq "--version") || ($arg1 eq "-version"))) {
+        my $termStatus = system('ppmmix', '--version');
+        exit($termStatus == 0 ? 0 : 1);
+    }
+}
+
+
+
 my $SPREAD =  1;
 my $SHIFT =   2;
 my $RELIEF =  3;
@@ -59,6 +72,7 @@ my $base_name = "fade";		# default base name of output files
 my $image = "ppm";		# default output storage format
 my $mode = $SPREAD;		# default fading mode
 
+doVersionHack(\@ARGV);
 
 my $n;  # argument number
 
@@ -98,8 +112,6 @@ 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();
     } else {
         print "Unknown argument: $ARGV[$n]\n";
         exit 100;