Lines Matching refs:b
70 rshift (_Bigint *b, in rshift() argument
76 x = x1 = b->_x; in rshift()
78 if (n < b->_wds) { in rshift()
79 xe = x + b->_wds; in rshift()
95 if ((b->_wds = x1 - b->_x) == 0) in rshift()
96 b->_x[0] = 0; in rshift()
101 _Bigint *b) in increment() argument
109 if (!b) in increment()
112 x = b->_x; in increment()
113 xe = x + b->_wds; in increment()
118 return b; in increment()
128 return b; in increment()
133 if (b->_wds >= b->_maxwds) { in increment()
134 b1 = Balloc(b->_k+1); in increment()
136 Bfree(b); in increment()
139 Bcopy(b1, b); in increment()
140 Bfree(b); in increment()
141 b = b1; in increment()
143 b->_x[b->_wds++] = 1; in increment()
145 return b; in increment()
153 _Bigint *b; in gethex() local
235 b = Balloc(k); in gethex()
236 if (!b) in gethex()
238 x = b->_x; in gethex()
257 b->_wds = n = x - b->_x; in gethex()
261 x = b->_x; in gethex()
264 if (any_on(b,n)) { in gethex()
269 if (k > 1 && any_on(b,k-1)) in gethex()
273 rshift(b, n); in gethex()
278 b = lshift(b, n); in gethex()
280 x = b->_x; in gethex()
284 Bfree(b); in gethex()
295 if (n == nbits && (n < 2 || any_on(b,n-1))) in gethex()
306 x[0] = b->_wds = 1; in gethex()
307 *bp = b; in gethex()
312 Bfree(b); in gethex()
320 lostbits = any_on(b,k); in gethex()
324 rshift(b,n); in gethex()
344 k = b->_wds; in gethex()
345 b = increment(b); in gethex()
346 if (!b) in gethex()
348 x = b->_x; in gethex()
354 else if ((b->_wds > k) in gethex()
357 rshift(b,1); in gethex()
366 *bp = b; in gethex()