diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-10-08 17:45:23 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-10-08 17:45:23 +0000 |
commit | bb4ba2586d4cfe9302278a427ee4cf7a89aef53b (patch) | |
tree | e48d17b2acafd26e2367c33d96d56cf58eb1f858 /converter/other/cameratopam/util.c | |
parent | 4b091760fddc73ffc877563b445599db21557e78 (diff) | |
download | netpbm-mirror-bb4ba2586d4cfe9302278a427ee4cf7a89aef53b.tar.gz netpbm-mirror-bb4ba2586d4cfe9302278a427ee4cf7a89aef53b.tar.xz netpbm-mirror-bb4ba2586d4cfe9302278a427ee4cf7a89aef53b.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4736 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/cameratopam/util.c')
-rw-r--r-- | converter/other/cameratopam/util.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/converter/other/cameratopam/util.c b/converter/other/cameratopam/util.c index ede5ef69..d489b23e 100644 --- a/converter/other/cameratopam/util.c +++ b/converter/other/cameratopam/util.c @@ -28,6 +28,8 @@ get2(FILE * const ifp) return a << 8 | b; } + + /* Same for a 4-byte integer. */ @@ -45,6 +47,8 @@ get4(FILE * const ifp) return a << 24 | b << 16 | c << 8 | d; } + + /* Faster than calling get2() multiple times. */ @@ -68,11 +72,13 @@ read_shorts (FILE * const ifp, unsigned short *pixel, int count) } } + + /* getbits(-1) initializes the buffer getbits(n) where 0 <= n <= 25 returns an n-bit integer */ -unsigned +unsigned getbits (FILE * const ifp, int nbits) { static unsigned long bitbuf=0; @@ -95,3 +101,6 @@ getbits (FILE * const ifp, int nbits) } return ret; } + + + |