about summary refs log tree commit diff
path: root/editor/pnmgamma.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-09-27 21:44:29 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-09-27 21:44:29 +0000
commit43939e66b1d4eeb2f3799c124f3598756755005a (patch)
tree15733092de55d52421a6ea02f5a43d5f8ff24393 /editor/pnmgamma.c
parent49f4336c9bba33650573ba780b70bc501b38643e (diff)
downloadnetpbm-mirror-43939e66b1d4eeb2f3799c124f3598756755005a.tar.gz
netpbm-mirror-43939e66b1d4eeb2f3799c124f3598756755005a.tar.xz
netpbm-mirror-43939e66b1d4eeb2f3799c124f3598756755005a.zip
Rebase Stable series to current Advanced: 10.47.04
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@995 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmgamma.c')
-rw-r--r--editor/pnmgamma.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/pnmgamma.c b/editor/pnmgamma.c
index e13075ff..507afae9 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;