mightymandel v16

GPU-based Mandelbrot set explorer

crc.c File Reference

(v16)

Sample Cyclic Redundancy Code implementation More...

Go to the source code of this file.

Functions

void make_crc_table (void)
unsigned long update_crc (unsigned long crc, const unsigned char *buf, int len)
unsigned long crc (const unsigned char *buf, int len)
 Compute CRC (cyclic redundancy code) as specified by PNG.

Variables

unsigned long crc_table [256]
int crc_table_computed = 0

Detailed Description

Sample Cyclic Redundancy Code implementation

Definition in file crc.c.

Function Documentation

unsigned long crc ( const unsigned char *  buf,
int  len 
)

Compute CRC (cyclic redundancy code) as specified by PNG.

Parameters
bufThe data to checksum.
lenThe length of the data.
Returns
The CRC value.

Definition at line 69 of file crc.c.

References update_crc().

Referenced by parse_png(), png_iTXt(), and update_crc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void make_crc_table ( void  )

Definition at line 27 of file crc.c.

References crc_table, and crc_table_computed.

Referenced by update_crc().

+ Here is the caller graph for this function:

unsigned long update_crc ( unsigned long  crc,
const unsigned char *  buf,
int  len 
)

Definition at line 52 of file crc.c.

References crc(), crc_table, crc_table_computed, and make_crc_table().

Referenced by crc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

unsigned long crc_table[256]

Definition at line 21 of file crc.c.

Referenced by make_crc_table(), and update_crc().

int crc_table_computed = 0

Definition at line 24 of file crc.c.

Referenced by make_crc_table(), and update_crc().