filehash/ffdb_hash_func.c
void __ffdb_crc32_init (void)
{
  if (!_ffdb_crc32_inited) {
    unsigned int i, j;
    unsigned int  h = 1;
    _ffdb_crc_table[0] = 0;
    for (i = 128; i; i >>= 1) {
      h = (h >> 1) ^ ((h & 1) ? _CRC32POLY : 0);
      /* h is now crc_table[i] */
      for (j = 0; j < 256; j += 2 * i)
	_ffdb_crc_table[i + j] = _ffdb_crc_table[j] ^ h;
    }
    _ffdb_crc32_inited = 1;
  }
}
/**
 * This routine initialize the CRC table above
 */
This routine initialize the CRC table above
This routine initialize the CRC table above
void __ffdb_crc32_init (void)
{
  if (!_ffdb_crc32_inited) {
    unsigned int i, j;
    unsigned int  h = 1;
    _ffdb_crc_table[0] = 0;
    for (i = 128; i; i >>= 1) {
      h = (h >> 1) ^ ((h & 1) ? _CRC32POLY : 0);
      for (j = 0; j < 256; j += 2 * i)
	_ffdb_crc_table[i + j] = _ffdb_crc_table[j] ^ h;
    }
    _ffdb_crc32_inited = 1;
  }
}
void __ffdb_crc32_init ( void ) { if ( ! _ffdb_crc32_inited ) { unsigned int i , j ; unsigned int h = 1 ; _ffdb_crc_table [ 0 ] = 0 ; for ( i = 128 ; i ; i >>= 1 ) { h = ( h >> 1 ) ^ ( ( h & 1 ) ? _CRC32POLY : 0 ) ; for ( j = 0 ; j < 256 ; j += 2 * i ) _ffdb_crc_table [ i + j ] = _ffdb_crc_table [ j ] ^ h ; } _ffdb_crc32_inited = 1 ; } }
This routine initialize the CRC table above
This routine initialize the CRC table above
/* h is now crc_table[i] */