SURFEX v8.1
General documentation of Surfex
crc.h
Go to the documentation of this file.
1 /* crc.h */
2 /* Calculates 32-bit Cyclic Redundancy Check as in Unix cksum command */
3 /* Also calculates 64-bit Cyclic Redundancy Check */
4 
5 /* Sami Saarinen, 17-Feb-2005 : crc32 */
6 /* 24-Jun-2005 : Added crc64 */
7 /* 29-Dec-2005 : Added protos for direct C-calls */
8 /* 29-Dec-2005 : Length argument for crc64 now 64-bit int */
9 
10 /* C callables */
11 
12 extern unsigned int
13 pp_cksum32(int nbuf, unsigned int nCRC);
14 
15 extern unsigned int
16 pp_cksum32but64len(long long int nbuf, unsigned int nCRC);
17 
18 extern unsigned long long int
19 pp_cksum64(long long int nbuf, unsigned long long int nCRC);
20 
21 extern unsigned int
22 cksum32(const char *buf, int nbuf, unsigned int nCRC);
23 
24 extern unsigned long long int
25 cksum64(const char *buf, long long int nbuf, unsigned long long int nCRC);
26 
27 /* Fortran callable */
28 
29 extern void
30 crc32_(const void *vbuf, const int *pnbuf,
31  unsigned int *pnCRC /* Note: An in & out -variable */);
32 
33 extern void
34 crc64_(const void *vbuf, const long long int *pnbuf,
35  unsigned long long int *pnCRC /* Note: An in & out -variable */);
unsigned long long int pp_cksum64(long long int nbuf, unsigned long long int nCRC)
Definition: crc.c:115
unsigned int pp_cksum32but64len(long long int nbuf, unsigned int nCRC)
Definition: crc.c:104
unsigned int pp_cksum32(int nbuf, unsigned int nCRC)
Definition: crc.c:93
void crc64_(const void *vbuf, const long long int *pnbuf, unsigned long long int *pnCRC)
Definition: crc.c:145
unsigned int cksum32(const char *buf, int nbuf, unsigned int nCRC)
Definition: crc.c:72
void crc32_(const void *vbuf, const int *pnbuf, unsigned int *pnCRC)
Definition: crc.c:130
unsigned long long int cksum64(const char *buf, long long int nbuf, unsigned long long int nCRC)
Definition: crc.c:81