Lines Matching +defs:val +defs:offset
76 unsigned long long offset; /* databits==0 stands for this value */
112 static void bitv_setlo(bitv *bv, unsigned bits, unsigned val);
113 static void bitv_shiftin(bitv *bv, unsigned bits, unsigned val);
117 static int bitv_mul(bitv *bv, unsigned long long val);
118 static int bitv_add(bitv *bv, unsigned long long val);
119 static int bitv_sub(bitv *bv, unsigned long long val);
120 static int bitv_ge(const bitv *bv, unsigned long long val);
123 static void crc(unsigned long *crcp, unsigned val);
594 if (!bitv_ge(bv, Info[i + 1].offset))
697 * buildcode -- given the val from the dictionary, create the diagcode
756 /* subtract off the offset appropriate for format of code */
759 "%ssubtract offset %llu\n", debugstr, infop->offset);
760 if (bitv_sub(dictval, infop->offset) < 0) {
763 * so that offset will be smaller than dictval, and
865 unsigned val;
867 for (val = 0; Alphabet[val]; val++)
868 if (*code == Alphabet[val])
870 if (Alphabet[val] == '\0') {
875 bitv_shiftin(allbits, 5, val);
922 /* add in the offset appropriate for the length of code being used */
923 if (bitv_add(dictval, infop->offset) < 0) {
926 * a given number of bits from the code and the offset
1153 bitv_setlo(bitv *bv, unsigned bits, unsigned val)
1157 /* assumption: bits * 8 <= sizeof (val) */
1169 bv->v[i] |= val & mask;
1171 val >>= iterbits;
1176 * unsigned and val can't be more than sizeof unsigned
1185 bitv_shiftin(bitv *bv, unsigned bits, unsigned val)
1188 bitv_setlo(bv, bits, val);
1256 bitv_mul(bitv *bv, unsigned long long val)
1269 /* from most-significant byte of val to least... */
1270 for (valbyte = 0; valbyte < sizeof (val); valbyte++)
1273 result = ((val >> (valbyte * 8)) & 0xff) *
1308 bitv_add(bitv *bv, unsigned long long val)
1315 if (i < sizeof (val))
1316 result = cf + bv->v[i] + ((val >> (i * 8)) & 0xff);
1339 bitv_sub(bitv *bv, unsigned long long val)
1348 if (i < sizeof (val))
1349 subtrahend = bf + ((val >> (i * 8)) & 0xff);
1372 bitv_ge(const bitv *bv, unsigned long long val)
1381 if (i < sizeof (val))
1382 subtrahend = bf + ((val >> (i * 8)) & 0xff);
1399 unsigned long long val;
1425 val = *s - '0';
1427 val = tolower(*s) - 'a' + 10;
1435 bitv_add(bv, val) < 0 ||
1520 crc(unsigned long *crcp, unsigned val)
1522 *crcp = (*crcp<<8) ^ crctab[(unsigned char)((*crcp>>24)^val)];