diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
commit | 5d16663331afd0bc2edaeb2e49042dc219ce9c2f (patch) | |
tree | 476fbb2ab4311d4bb6d65b250825e254a7a2c1ef /converter/other/cameratopam/util.c | |
parent | 42f0bf8e7f1ff88000a3584c265e6f1631662ec4 (diff) | |
download | netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.gz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.xz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.zip |
promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4827 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; } + + + |