Header And Logo

PostgreSQL
| The world's most advanced open source database.

Defines | Functions

crc32.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define crc32(buf)   ltree_crc32_sz((buf),strlen(buf))

Functions

unsigned int ltree_crc32_sz (char *buf, int size)

Define Documentation

#define crc32 (   buf  )     ltree_crc32_sz((buf),strlen(buf))

Definition at line 10 of file crc32.h.


Function Documentation

unsigned int ltree_crc32_sz ( char *  buf,
int  size 
)

Definition at line 102 of file crc32.c.

References _CRC32_, and TOLOWER.

Referenced by gist_te(), hashing(), lquery_in(), and pushval_asis().

{
    unsigned int crc = ~((unsigned int) 0);
    char       *p;
    int         len,
                nr;

    len = 0;
    nr = size;
    for (len += nr, p = buf; nr--; ++p)
        _CRC32_(crc, TOLOWER((unsigned int) *p));
    return ~crc;
}