Lines Matching +refs:val +refs:result

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);
697 * buildcode -- given the val from the dictionary, create the diagcode
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);
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)
1258 unsigned short result;
1265 /* start with a zeroed out bit vector to hold result */
1269 /* from most-significant byte of val to least... */
1270 for (valbyte = 0; valbyte < sizeof (val); valbyte++)
1273 result = ((val >> (valbyte * 8)) & 0xff) *
1282 if (result & 0xff) {
1287 prod[valbyte + bvbyte] += result & 0xff;
1290 k = result >> 8;
1293 /* store result in bv */
1308 bitv_add(bitv *bv, unsigned long long val)
1311 unsigned short result;
1315 if (i < sizeof (val))
1316 result = cf + bv->v[i] + ((val >> (i * 8)) & 0xff);
1318 result = cf + bv->v[i];
1320 cf = (result >> 8) & 1;
1321 bv->v[i] = result & 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)];