diff options
Diffstat (limited to 'editor/pnmgamma.c')
-rw-r--r-- | editor/pnmgamma.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/pnmgamma.c b/editor/pnmgamma.c index efdfe039..b079adf1 100644 --- a/editor/pnmgamma.c +++ b/editor/pnmgamma.c @@ -13,8 +13,9 @@ #include <math.h> #include <ctype.h> -#include "shhopt.h" +#include "pm_c_util.h" #include "mallocvar.h" +#include "shhopt.h" #include "pnm.h" enum transferFunction { @@ -32,7 +33,7 @@ struct cmdlineInfo { /* All the information the user supplied in the command line, in a form easy for the program to use. */ - const char *filespec; /* '-' if stdin */ + const char * filespec; /* '-' if stdin */ enum transferFunction transferFunction; float rgamma, ggamma, bgamma; unsigned int maxval; @@ -103,13 +104,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 +118,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 +128,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; |