diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-06-29 00:10:31 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-06-29 00:10:31 +0000 |
commit | 701a2bdf69119ad383dca0a1b369cc41bb49e08c (patch) | |
tree | 697039946ffebb2c73df620be8ac2277718e1630 /editor/pnmgamma.c | |
parent | 84e2e0921bb5bf593c65513a2a922867f66c1dbd (diff) | |
download | netpbm-mirror-701a2bdf69119ad383dca0a1b369cc41bb49e08c.tar.gz netpbm-mirror-701a2bdf69119ad383dca0a1b369cc41bb49e08c.tar.xz netpbm-mirror-701a2bdf69119ad383dca0a1b369cc41bb49e08c.zip |
Improve error messages
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@344 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmgamma.c')
-rw-r--r-- | editor/pnmgamma.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/editor/pnmgamma.c b/editor/pnmgamma.c index e13075ff..29cb3b4e 100644 --- a/editor/pnmgamma.c +++ b/editor/pnmgamma.c @@ -13,8 +13,8 @@ #include <math.h> #include <ctype.h> -#include "shhopt.h" #include "mallocvar.h" +#include "shhopt.h" #include "pnm.h" enum transferFunction { @@ -103,13 +103,12 @@ getGammaFromOpts(struct cmdlineInfo * const cmdlineP, if (gammaSpec) if (gammaOpt < 0.0) - pm_error("Invalid gamma value. " - "Must be positive floating point number."); + pm_error("Invalid gamma value %f. Must be positive.", gammaOpt); if (rgammaSpec) { if (cmdlineP->rgamma < 0.0) - pm_error("Invalid gamma value. " - "Must be positive floating point number."); + pm_error("Invalid red gamma value %f. Must be positive.", + cmdlineP->rgamma); } else { if (gammaSpec) cmdlineP->rgamma = gammaOpt; @@ -118,8 +117,8 @@ getGammaFromOpts(struct cmdlineInfo * const cmdlineP, } if (ggammaSpec) { if (cmdlineP->ggamma < 0.0) - pm_error("Invalid gamma value. " - "Must be positive floating point number."); + pm_error("Invalid green gamma value %f. Must be positive.", + cmdlineP->ggamma); } else { if (gammaSpec) cmdlineP->ggamma = gammaOpt; @@ -128,8 +127,8 @@ getGammaFromOpts(struct cmdlineInfo * const cmdlineP, } if (bgammaSpec) { if (cmdlineP->bgamma < 0.0) - pm_error("Invalid gamma value. " - "Must be positive floating point number."); + pm_error("Invalid blue gamma value %f. Must be positive.", + cmdlineP->bgamma); } else { if (gammaSpec) cmdlineP->bgamma = gammaOpt; |