Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pnmimage/pnmbitio.cxx File Reference

#include "pnmbitio.h"
#include <assert.h>

Go to the source code of this file.

Compounds

struct  bitstream

Defines

#define Mask(n)   ((1<<(n))-1)
#define BitPut(b, ul, n)
#define BitGet(b, n)   (((b)->bitbuf>>((b)->nbitbuf-=(n))) & Mask(n))

Functions

EXPCL_PANDA struct bitstreampm_bitinit (istream *f, char *mode)
EXPCL_PANDA struct bitstreampm_bitinit (ostream *f, char *mode)
EXPCL_PANDA int pm_bitfini (struct bitstream *b)
EXPCL_PANDA int pm_bitread (struct bitstream *b, unsigned long nbits, unsigned long *val)
EXPCL_PANDA int pm_bitwrite (struct bitstream *b, unsigned long nbits, unsigned long val)


Detailed Description

Definition in file pnmbitio.cxx.


Define Documentation

#define BitGet b,
 )     (((b)->bitbuf>>((b)->nbitbuf-=(n))) & Mask(n))
 

Definition at line 37 of file pnmbitio.cxx.

Referenced by pm_bitfini(), pm_bitread(), and pm_bitwrite().

#define BitPut b,
ul,
 ) 
 

Value:

((b)->bitbuf = (((b)->bitbuf<<(n))      \
                                        |((ul)&Mask(n))),       \
                        (b)->nbitbuf += (n))

Definition at line 33 of file pnmbitio.cxx.

Referenced by pm_bitfini(), pm_bitread(), and pm_bitwrite().

#define Mask  )     ((1<<(n))-1)
 

Definition at line 31 of file pnmbitio.cxx.


Function Documentation

EXPCL_PANDA int pm_bitfini struct bitstream b  ) 
 

Definition at line 100 of file pnmbitio.cxx.

References BitGet, BitPut, bitstream::mode, bitstream::nbitbuf, and bitstream::outf.

EXPCL_PANDA struct bitstream* pm_bitinit ostream *  f,
char *  mode
 

Definition at line 70 of file pnmbitio.cxx.

References bitstream::mode, and bitstream::outf.

Referenced by BMPreadrow(), and BMPwriterow().

EXPCL_PANDA struct bitstream* pm_bitinit istream *  f,
char *  mode
 

Definition at line 50 of file pnmbitio.cxx.

EXPCL_PANDA int pm_bitread struct bitstream b,
unsigned long  nbits,
unsigned long *  val
 

Definition at line 147 of file pnmbitio.cxx.

References BitGet, BitPut, bitstream::inf, and bitstream::nbitbuf.

EXPCL_PANDA int pm_bitwrite struct bitstream b,
unsigned long  nbits,
unsigned long  val
 

Definition at line 183 of file pnmbitio.cxx.

References BitGet, BitPut, bitstream::nbitbuf, and bitstream::outf.


Generated on Fri May 2 00:46:04 2003 for Panda by doxygen1.3