w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

libpbm2.c File Reference
#include "pbm.h"
#include "libpbm.h"
Include dependency graph for libpbm2.c:

Go to the source code of this file.

Functions

static bit pbm_getbit ()
 
static bit pbm_getbit (FILE *file)
 
int pbm_readmagicnumber (FILE *file)
 
void pbm_readpbminitrest (FILE *file, int *colsP, int *rowsP)
 
void pbm_readpbminit (FILE *file, int *colsP, int *rowsP, int *formatP)
 
void pbm_readpbmrow (FILE *file, bit *bitrow, int cols, int format)
 
void pbm_readpbmrow_packed (FILE *const file, unsigned char *const packed_bits, const int cols, const int format)
 
bit ** pbm_readpbm (FILE *file, int *colsP, int *rowsP)
 

Function Documentation

◆ pbm_getbit() [1/2]

static bit pbm_getbit ( )
static

◆ pbm_getbit() [2/2]

static bit pbm_getbit ( FILE file)
static

Definition at line 18 of file libpbm2.c.

References ch, pbm_getc(), and pm_error.

◆ pbm_readmagicnumber()

int pbm_readmagicnumber ( FILE file)

Definition at line 36 of file libpbm2.c.

References EOF, getc, and pm_error.

Referenced by pbm_readpbminit(), pgm_readpgminit(), pnm_readpnminit(), and ppm_readppminit().

◆ pbm_readpbm()

bit** pbm_readpbm ( FILE file,
int colsP,
int rowsP 
)

Definition at line 161 of file libpbm2.c.

References bits, format, pbm_allocarray, pbm_readpbminit(), pbm_readpbmrow(), and row.

Referenced by fill_map(), main(), pbm_loadpbmfont(), and readcharacter().

◆ pbm_readpbminit()

void pbm_readpbminit ( FILE file,
int colsP,
int rowsP,
int formatP 
)

Definition at line 62 of file libpbm2.c.

References PBM_FORMAT_TYPE, pbm_readmagicnumber(), pbm_readpbminitrest(), PBM_TYPE, and pm_error.

Referenced by main(), and pbm_readpbm().

◆ pbm_readpbminitrest()

void pbm_readpbminitrest ( FILE file,
int colsP,
int rowsP 
)

Definition at line 51 of file libpbm2.c.

References pbm_getint().

Referenced by pbm_readpbminit(), pgm_readpgminit(), pnm_readpnminit(), and ppm_readppminit().

◆ pbm_readpbmrow()

void pbm_readpbmrow ( FILE file,
bit bitrow,
int  cols,
int  format 
)

◆ pbm_readpbmrow_packed()

void pbm_readpbmrow_packed ( FILE *const  file,
unsigned char *const  packed_bits,
const int  cols,
const int  format 
)

Definition at line 121 of file libpbm2.c.

References col, cols, feof, format, fread, mask, PBM_FORMAT, pbm_getbit(), pbm_packed_bytes, pm_error, and RPBM_FORMAT.