about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/pbm/pbmtox10bm13
-rw-r--r--doc/HISTORY4
-rwxr-xr-xeditor/ppmquant13
3 files changed, 28 insertions, 2 deletions
diff --git a/converter/pbm/pbmtox10bm b/converter/pbm/pbmtox10bm
index 9a1a7286..6e1a12a2 100644
--- a/converter/pbm/pbmtox10bm
+++ b/converter/pbm/pbmtox10bm
@@ -14,6 +14,19 @@ use strict;
 use File::Basename;
 use Cwd 'abs_path';
 
+sub doVersionHack($) {
+    my ($argvR) = @_;
+
+    my $arg1 = $argvR->[0];
+
+    if (defined($arg1) && (($arg1 eq "--version") || ($arg1 eq "-version"))) {
+        my $termStatus = system('pbmtoxbm', '--version');
+        exit($termStatus == 0 ? 0 : 1);
+    }
+}
+
+doVersionHack(\@ARGV);
+
 my $infile;
 
 foreach (@ARGV) {
diff --git a/doc/HISTORY b/doc/HISTORY
index e8bc9987..e97c8669 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -17,8 +17,8 @@ not yet  BJH  Release 10.75.00
 
               pbmreduce: add -randomseed.
 
-              anytopnm, pnmmargin, pnmquant, pnmquantall, pgmcrater,
-              ppmfade, ppmrainbow, ppmshadow: Add -version.
+              anytopnm, pnmmargin, pnmquant, ppmquant, pnmquantall, pgmcrater,
+              ppmfade, ppmrainbow, ppmshadow, pbmtox10bm: Add -version.
 
               fiascotopnm: change -version to include Netpbm version.
 
diff --git a/editor/ppmquant b/editor/ppmquant
index 57963982..fe8ca046 100755
--- a/editor/ppmquant
+++ b/editor/ppmquant
@@ -35,6 +35,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('pnmquant', '--version');
+        exit($termStatus == 0 ? 0 : 1);
+    }
+}
+
+doVersionHack(\@ARGV);
+
 use Getopt::Long;
 
 my @ppmquantArgv = @ARGV;