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

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)


Define Documentation

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

Definition at line 36 of file pnmbitio.cxx.

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

#define BitPut b,
ul,
n   ) 
 

Value:

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

Definition at line 32 of file pnmbitio.cxx.

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

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

Definition at line 30 of file pnmbitio.cxx.


Function Documentation

EXPCL_PANDA int pm_bitfini struct bitstream b  ) 
 

Definition at line 99 of file pnmbitio.cxx.

References b, BitGet, BitPut, and c.

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

Definition at line 69 of file pnmbitio.cxx.

References mode, bitstream::mode, bitstream::outf, and pm_bitinit().

Referenced by BMPreadrow(), and BMPwriterow().

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

Definition at line 49 of file pnmbitio.cxx.

Referenced by pm_bitinit().

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

Definition at line 146 of file pnmbitio.cxx.

References b, BitGet, BitPut, and c.

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

Definition at line 182 of file pnmbitio.cxx.

References b, BitGet, BitPut, and c.


Generated on Fri Apr 18 00:10:57 2003 for Panda by doxygen1.3