diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:38:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:38:28 +0000 |
commit | 367c9cb514c9da766488b9bdb218a18e31cb7624 (patch) | |
tree | f9e343be94161a4837f0f1c1d072a35538ae0f63 /editor/pnmconvol.c | |
parent | 6e88e3326cb0c7f7975b56189278cab3f84ba1bd (diff) | |
download | netpbm-mirror-367c9cb514c9da766488b9bdb218a18e31cb7624.tar.gz netpbm-mirror-367c9cb514c9da766488b9bdb218a18e31cb7624.tar.xz netpbm-mirror-367c9cb514c9da766488b9bdb218a18e31cb7624.zip |
Promote Stable (10.47) to Super Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@2691 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmconvol.c')
-rw-r--r-- | editor/pnmconvol.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/editor/pnmconvol.c b/editor/pnmconvol.c index 651b9049..2033a1a3 100644 --- a/editor/pnmconvol.c +++ b/editor/pnmconvol.c @@ -19,6 +19,7 @@ #include <assert.h> +#include "pm_c_util.h" #include "pnm.h" #include "shhopt.h" #include "mallocvar.h" @@ -34,7 +35,7 @@ struct cmdlineInfo { static void parseCommandLine(int argc, char ** argv, - struct cmdlineInfo *cmdlineP) { + struct cmdlineInfo * const cmdlineP) { /*---------------------------------------------------------------------------- parse program command line described in Unix standard form by argc and argv. Return the information in the options as *cmdlineP. @@ -85,23 +86,23 @@ parseCommandLine(int argc, char ** argv, /* Macros to verify that r,g,b values are within proper range */ #define CHECK_GRAY \ - if ( tempgsum < 0L ) g = 0; \ - else if ( tempgsum > maxval ) g = maxval; \ + if (tempgsum < 0L) g = 0; \ + else if (tempgsum > maxval) g = maxval; \ else g = tempgsum; #define CHECK_RED \ - if ( temprsum < 0L ) r = 0; \ - else if ( temprsum > maxval ) r = maxval; \ + if (temprsum < 0L) r = 0; \ + else if (temprsum > maxval) r = maxval; \ else r = temprsum; #define CHECK_GREEN \ - if ( tempgsum < 0L ) g = 0; \ - else if ( tempgsum > maxval ) g = maxval; \ + if (tempgsum < 0L) g = 0; \ + else if (tempgsum > maxval) g = maxval; \ else g = tempgsum; #define CHECK_BLUE \ - if ( tempbsum < 0L ) b = 0; \ - else if ( tempbsum > maxval ) b = maxval; \ + if (tempbsum < 0L) b = 0; \ + else if (tempbsum > maxval) b = maxval; \ else b = tempbsum; struct convolveType { @@ -111,7 +112,7 @@ struct convolveType { void (*pgmConvolver)(const float ** const weights); }; -static FILE* ifp; +static FILE * ifp; static int crows, ccols, ccolso2, crowso2; static int cols, rows; static xelval maxval; |