Lines Matching defs:sum
62 register Crc_t* sum;
71 if (sum = newof(0, Crc_t, 1, 0))
73 sum->method = (Method_t*)method;
74 sum->name = name;
87 sum->done = v ? strtoul(v + 1, NiL, 0) : ~sum->done;
89 sum->init = v ? strtoul(v + 1, NiL, 0) : ~sum->init;
91 sum->rotate = 1;
94 sum->addsize = 1;
96 sum->xorsize = strtoul(v + 1, NiL, 0);
101 if (sum->rotate)
109 for (i = 0; i < elementsof(sum->tab); i++)
119 sum->tab[i] = t;
124 for (i = 0; i < elementsof(sum->tab); i++)
129 sum->tab[i] = x;
132 return (Sum_t*)sum;
138 Crc_t* sum = (Crc_t*)p;
140 sum->sum = sum->init;
147 Crc_t* sum = (Crc_t*)p;
148 register Crcnum_t c = sum->sum;
152 if (sum->rotate)
154 CRCROTATE(sum, c, *b++);
157 CRC(sum, c, *b++);
158 sum->sum = c;
165 register Crc_t* sum = (Crc_t*)p;
171 c = sum->sum;
172 if (sum->addsize)
174 n = sum->size ^ sum->xorsize;
175 if (sum->rotate)
178 CRCROTATE(sum, c, n);
185 CRC(sum, c, n >> j);
188 sum->sum = c ^ sum->done;
189 sum->total_sum ^= (sum->sum &= 0xffffffff);