Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcrcvalue.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcrcvalue.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcrcvalue.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcrcvalue.html on line 8
Calculate a running CRC checksum
long PtCRCValue( long crc32val,
unsigned char next_val );
ph
This function lets you maintain your own 32-bit
cyclic redundancy check or CRC checksum.
The crc32val is 0 or the value calculated by a previous call
to PtCRCValue(), while next_val is the next byte of
data for which to calculate the CRC.
|
We recommend that bitmaps and images have a
CRC on the image data and the palette. This
CRC is used extensively by
phrelay
(see the QNX Neutrino Utilities Reference)
to cache images. |
You can call
PtCRC()
to calculate a CRC for a block of data.
The cyclic redundancy check.
This is a slower implementation of PtCRC() for a 512-byte data
segment:
unsigned char data[512];
unsigned char *ptr;
long crcval = 0;
int i;
for (ptr = data, i = 0; i < sizeof( data );
i++, ptr++) {
crcval = PtCRCValue( crcval, *ptr );
}
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PtCRC(),
PxLoadImage()
“Images”
in the Raw Drawing and Animation chapter of the
Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcrcvalue.html on line 134
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptcrcvalue.html on line 134