This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include "crc.h"
22
23 #include <stdio.h>
24
25 int
26 main (int argc, char *argv[])
27 {
28 uint32_t p;
29
30 p = crc32_update_no_xor (42, "foo", 3);
31 if (p != 0x46e87f05)
32 {
33 printf ("cunx got %lx\n", (unsigned long) p);
34 return 1;
35 }
36
37 p = crc32_no_xor ("foo", 3);
38 if (p != 0x7332bc33)
39 {
40 printf ("cnx got %lx\n", (unsigned long) p);
41 return 1;
42 }
43
44 p = crc32_update (42, "foo", 3);
45 if (p != 0xb9a9a617)
46 {
47 printf ("cu got %lx\n", (unsigned long) p);
48 return 1;
49 }
50
51 p = crc32 ("foo", 3);
52 if (p != 0x8c736521)
53 {
54 printf ("c got %lx\n", (unsigned long) p);
55 return 1;
56 }
57
58 return 0;
59 }