diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-20 18:10:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-20 18:10:34 +0000 |
commit | 553be9f71998e872838769b1a9be6972ab8ccb8e (patch) | |
tree | ae3bab030ec894e3ab33a34d66d0cd1783667e3b /lib/libpgm2.c | |
parent | c57fb692012684f1a5b1e84c2e31dc289ef70219 (diff) | |
download | netpbm-mirror-553be9f71998e872838769b1a9be6972ab8ccb8e.tar.gz netpbm-mirror-553be9f71998e872838769b1a9be6972ab8ccb8e.tar.xz netpbm-mirror-553be9f71998e872838769b1a9be6972ab8ccb8e.zip |
whitespace
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4672 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpgm2.c')
-rw-r--r-- | lib/libpgm2.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/libpgm2.c b/lib/libpgm2.c index 80b5cf42..2e3aba90 100644 --- a/lib/libpgm2.c +++ b/lib/libpgm2.c @@ -20,29 +20,29 @@ void -pgm_writepgminit(FILE * const fileP, - int const cols, - int const rows, - gray const maxval, +pgm_writepgminit(FILE * const fileP, + int const cols, + int const rows, + gray const maxval, int const forceplain) { bool const plainFormat = forceplain || pm_plain_output; - if (maxval > PGM_OVERALLMAXVAL && !plainFormat) + if (maxval > PGM_OVERALLMAXVAL && !plainFormat) pm_error("too-large maxval passed to ppm_writepgminit(): %d.\n" "Maximum allowed by the PGM format is %d.", maxval, PGM_OVERALLMAXVAL); - fprintf(fileP, "%c%c\n%d %d\n%d\n", - PGM_MAGIC1, - plainFormat || maxval >= 1<<16 ? PGM_MAGIC2 : RPGM_MAGIC2, + fprintf(fileP, "%c%c\n%d %d\n%d\n", + PGM_MAGIC1, + plainFormat || maxval >= 1<<16 ? PGM_MAGIC2 : RPGM_MAGIC2, cols, rows, maxval ); } static void -putus(unsigned short const n, +putus(unsigned short const n, FILE * const fileP) { if (n >= 10) @@ -85,7 +85,7 @@ format2bpsRow(const gray * const grayrow, for (col = 0; col < cols; ++col) { gray const val = grayrow[col]; - + rowBuffer[bufferCursor++] = val >> 8; rowBuffer[bufferCursor++] = (unsigned char) val; } @@ -134,8 +134,8 @@ writepgmrowraw(FILE * const fileP, static void writepgmrowplain(FILE * const fileP, - const gray * const grayrow, - unsigned int const cols, + const gray * const grayrow, + unsigned int const cols, gray const maxval) { int col, charcount; @@ -163,10 +163,10 @@ writepgmrowplain(FILE * const fileP, void -pgm_writepgmrow(FILE * const fileP, - const gray * const grayrow, - int const cols, - gray const maxval, +pgm_writepgmrow(FILE * const fileP, + const gray * const grayrow, + int const cols, + gray const maxval, int const forceplain) { if (forceplain || pm_plain_output || maxval >= 1<<16) |