mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
some cleanups
This commit is contained in:
parent
98211af4a7
commit
6b91e7762c
49 changed files with 1737 additions and 452 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Mar 10 13:40:34 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* mpi-bit.c (mpi_clear_highbit): New.
|
||||
|
||||
Mon Mar 2 19:29:00 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* Makefile.am (DISTCLEANFILES): New
|
||||
|
|
|
@ -134,6 +134,25 @@ mpi_set_highbit( MPI a, unsigned n )
|
|||
a->nlimbs = limbno+1;
|
||||
}
|
||||
|
||||
/****************
|
||||
* clear bit N of A and all bits above
|
||||
*/
|
||||
void
|
||||
mpi_clear_highbit( MPI a, unsigned n )
|
||||
{
|
||||
unsigned limbno, bitno;
|
||||
|
||||
limbno = n / BITS_PER_MPI_LIMB;
|
||||
bitno = n % BITS_PER_MPI_LIMB;
|
||||
|
||||
if( limbno >= a->nlimbs )
|
||||
return; /* not allocated, so need to clear bits :-) */
|
||||
|
||||
for( ; bitno < BITS_PER_MPI_LIMB; bitno++ )
|
||||
a->d[limbno] &= ~(A_LIMB_1 << bitno);
|
||||
a->nlimbs = limbno+1;
|
||||
}
|
||||
|
||||
/****************
|
||||
* Clear bit N of A.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue