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

panda/src/pnmimage/pnmimage_base.cxx File Reference

#include "pnmimage_base.h"
#include "streamReader.h"
#include "streamWriter.h"
#include <stdarg.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void pm_message (const char *format,...)
 Outputs the given printf-style message to the user and returns.

void pm_error (const char *format,...)
 Outputs the given printf-style message to the user and terminates messily.

int pm_maxvaltobits (int maxval)
 Returns the number of bits sufficient to hold the indicated maxval value.

int pm_bitstomaxval (int bits)
 Returns the highest maxval that can be represented in the indicated number of bits.

char * pm_allocrow (int cols, int size)
 Allocates a row of cols * size bytes.

void pm_freerow (char *itrow)
 Frees the row previously allocated withm pm_allocrow().

int pm_readbigshort (istream *in, short *sP)
int pm_writebigshort (ostream *out, short s)
int pm_readbiglong (istream *in, long *lP)
int pm_writebiglong (ostream *out, long l)
int pm_readlittleshort (istream *in, short *sP)
int pm_writelittleshort (ostream *out, short s)
int pm_readlittlelong (istream *in, long *lP)
int pm_writelittlelong (ostream *out, long l)


Detailed Description

Definition in file pnmimage_base.cxx.


Function Documentation

char* pm_allocrow int  cols,
int  size
 

Allocates a row of cols * size bytes.

Definition at line 135 of file pnmimage_base.cxx.

References writer().

int pm_bitstomaxval int  bits  ) 
 

Returns the highest maxval that can be represented in the indicated number of bits.

Definition at line 123 of file pnmimage_base.cxx.

void pm_error const char *  format,
... 
 

Outputs the given printf-style message to the user and terminates messily.

Minimize use of this function.

Definition at line 71 of file pnmimage_base.cxx.

Referenced by BMPEncode(), BMPEncode24(), BMPlenfileheader(), BMPleninfoheader(), BMPlenline(), BMPlenrgbtable(), BMPreadbits(), BMPreadinfoheader(), BMPwritebits(), BMPwriteinfoheader(), BMPwritergb(), colorstobpp(), GetByte(), GetLong(), GetShort(), ppm_alloccolorhash(), ppm_colorhashtocolorhist(), ppm_colorhisttocolorhash(), ppm_computecolorhash(), put_byte(), PutByte(), PutLong(), PutShort(), PNMFileTypeTGA::Reader::Reader(), and readto().

void pm_freerow char *  itrow  ) 
 

Frees the row previously allocated withm pm_allocrow().

Definition at line 147 of file pnmimage_base.cxx.

Referenced by PNMFileTypeTGA::Reader::read_data().

int pm_maxvaltobits int  maxval  ) 
 

Returns the number of bits sufficient to hold the indicated maxval value.

Definition at line 104 of file pnmimage_base.cxx.

void pm_message const char *  format,
... 
 

Outputs the given printf-style message to the user and returns.

Definition at line 40 of file pnmimage_base.cxx.

Referenced by BMPreadinfoheader().

int pm_readbiglong istream *  in,
long *  lP
 

Definition at line 170 of file pnmimage_base.cxx.

References reader().

int pm_readbigshort istream *  in,
short *  sP
 

Definition at line 156 of file pnmimage_base.cxx.

References reader().

int pm_readlittlelong istream *  in,
long *  lP
 

Definition at line 198 of file pnmimage_base.cxx.

int pm_readlittleshort istream *  in,
short *  sP
 

Definition at line 184 of file pnmimage_base.cxx.

int pm_writebiglong ostream *  out,
long  l
 

Definition at line 177 of file pnmimage_base.cxx.

References writer().

Referenced by write_uchar_SI().

int pm_writebigshort ostream *  out,
short  s
 

Definition at line 163 of file pnmimage_base.cxx.

References writer().

Referenced by put_byte().

int pm_writelittlelong ostream *  out,
long  l
 

Definition at line 205 of file pnmimage_base.cxx.

Referenced by PutLong().

int pm_writelittleshort ostream *  out,
short  s
 

Definition at line 191 of file pnmimage_base.cxx.

Referenced by PutShort().


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