diff options
-rw-r--r-- | converter/pbm/pbmtox10bm | 13 | ||||
-rw-r--r-- | doc/HISTORY | 4 | ||||
-rwxr-xr-x | editor/ppmquant | 13 |
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; |