diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-05-06 02:43:04 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-05-06 02:43:04 +0000 |
commit | d67322bba056f39048b79d210745d9f90c54e707 (patch) | |
tree | 39600bd2760ef2fff55d31277674d447d8adda56 | |
parent | 4429ca673de5b41f5484d5abbbcb97756ca3e3ef (diff) | |
download | netpbm-mirror-d67322bba056f39048b79d210745d9f90c54e707.tar.gz netpbm-mirror-d67322bba056f39048b79d210745d9f90c54e707.tar.xz netpbm-mirror-d67322bba056f39048b79d210745d9f90c54e707.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2479 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | lib/libpbm2.c | 39 | ||||
-rw-r--r-- | lib/libpnm1.c | 9 | ||||
-rw-r--r-- | lib/libppm1.c | 9 | ||||
-rw-r--r-- | lib/pbm.h | 18 | ||||
-rw-r--r-- | lib/pnm.h | 2 | ||||
-rw-r--r-- | lib/ppm.h | 2 |
6 files changed, 42 insertions, 37 deletions
diff --git a/lib/libpbm2.c b/lib/libpbm2.c index a77fa0ae..8a7e3f1e 100644 --- a/lib/libpbm2.c +++ b/lib/libpbm2.c @@ -34,11 +34,9 @@ getbit (FILE * const file) { void -pbm_readpbminitrest( file, colsP, rowsP ) - FILE* file; - int* colsP; - int* rowsP; - { +pbm_readpbminitrest( FILE * const file, + int * const colsP, + int * const rowsP ) { /* Read size. */ *colsP = (int)pm_getuint( file ); *rowsP = (int)pm_getuint( file ); @@ -55,7 +53,7 @@ pbm_readpbminitrest( file, colsP, rowsP ) pm_error("Number of columns in header is too large."); if (*rowsP < 0) pm_error("Number of columns in header is too large."); - } +} @@ -122,13 +120,13 @@ pbm_readpbminit(FILE * const ifP, void -pbm_readpbmrow( file, bitrow, cols, format ) - FILE* file; - bit* bitrow; - int cols, format; - { - register int col, bitshift; - register bit* bP; +pbm_readpbmrow( FILE * const file, + bit * const bitrow, + int const cols, + int const format) { + + int col, bitshift; + bit * bP; switch ( format ) { @@ -156,7 +154,7 @@ pbm_readpbmrow( file, bitrow, cols, format ) default: pm_error( "can't happen" ); } - } +} @@ -267,12 +265,11 @@ pbm_readpbmrow_bitoffset(FILE * const ifP, bit** -pbm_readpbm( file, colsP, rowsP ) - FILE* file; - int* colsP; - int* rowsP; - { - register bit** bits; +pbm_readpbm( FILE * const file, + int * const colsP, + int * const rowsP) { + + bit ** bits; int format, row; pbm_readpbminit( file, colsP, rowsP, &format ); @@ -283,4 +280,4 @@ pbm_readpbm( file, colsP, rowsP ) pbm_readpbmrow( file, bits[row], *colsP, format ); return bits; - } +} diff --git a/lib/libpnm1.c b/lib/libpnm1.c index adfacd03..db21b078 100644 --- a/lib/libpnm1.c +++ b/lib/libpnm1.c @@ -47,15 +47,12 @@ pnm_allocrow(unsigned int const cols) { void -pnm_init( argcP, argv ) - int* argcP; - char* argv[]; - { +pnm_init(int * const argcP, char ** const argv) { ppm_init( argcP, argv ); - } +} void -pnm_nextimage(FILE *file, int * const eofP) { +pnm_nextimage(FILE * const file, int * const eofP) { pm_nextimage(file, eofP); } diff --git a/lib/libppm1.c b/lib/libppm1.c index a3be5d3b..c1eb152c 100644 --- a/lib/libppm1.c +++ b/lib/libppm1.c @@ -49,12 +49,11 @@ ppm_allocrow(unsigned int const cols) { void -ppm_init( argcP, argv ) - int* argcP; - char* argv[]; - { +ppm_init(int * const argcP, char ** const argv) { pgm_init( argcP, argv ); - } +} + + void ppm_nextimage(FILE * const fileP, diff --git a/lib/pbm.h b/lib/pbm.h index 24574d07..520e4331 100644 --- a/lib/pbm.h +++ b/lib/pbm.h @@ -58,9 +58,21 @@ pbm_allocrow(unsigned int const cols); #define pbm_freearray_packed(packed_bits, rows) \ pm_freearray((char **) packed_bits, rows) -bit** pbm_readpbm(FILE* file, int* colsP, int* rowsP); -void pbm_readpbminit(FILE* file, int* colsP, int* rowsP, int* formatP); -void pbm_readpbmrow(FILE* file, bit* bitrow, int cols, int format); +bit** +pbm_readpbm(FILE * const file, + int * const colsP, + int * const rowsP); + +void +pbm_readpbminit(FILE * const file, + int * const colsP, + int * const rowsP, int * const formatP); + +void +pbm_readpbmrow(FILE * const file, + bit * const bitrow, + int const cols, + int const format); void pbm_readpbmrow_packed(FILE * const file, diff --git a/lib/pnm.h b/lib/pnm.h index de5f1d91..3b490552 100644 --- a/lib/pnm.h +++ b/lib/pnm.h @@ -37,7 +37,7 @@ pnm_init(int * const argcP, char ** const argv); void -pnm_nextimage(FILE *file, int * const eofP); +pnm_nextimage(FILE * const file, int * const eofP); xel * pnm_allocrow(unsigned int const cols); diff --git a/lib/ppm.h b/lib/ppm.h index 7a24f926..82241b70 100644 --- a/lib/ppm.h +++ b/lib/ppm.h @@ -77,7 +77,7 @@ ppm_blackpixel(void) { return retval; } -void ppm_init(int * argcP, char* argv[]); +void ppm_init(int * const argcP, char ** const argv); #define ppm_allocarray(cols, rows) \ ((pixel**) pm_allocarray(cols, rows, sizeof(pixel))) |