From 701a2bdf69119ad383dca0a1b369cc41bb49e08c Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 29 Jun 2007 00:10:31 +0000 Subject: Improve error messages git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@344 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pnmgamma.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'editor/pnmgamma.c') 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 #include -#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; -- cgit 1.4.1