blob: 13d9b6d802ee04d613715d7b8709c6a7f04c2722 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* ISC license. */
#include <skalibs/biguint.h>
int bu_slbc (uint32_t *a, unsigned int n, int carry)
{
unsigned int i = 0 ;
carry = !!carry ;
for (; i < n ; i++)
{
int c = a[i] >> 31 ;
a[i] = (a[i] << 1) | carry ;
carry = c ;
}
return carry ;
}
|