summaryrefslogtreecommitdiff
path: root/mpi/mpiutil.c
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2003-06-09 13:44:12 +0000
committerMoritz Schulte <mo@g10code.com>2003-06-09 13:44:12 +0000
commit9a06555b17e1bec8f13bf21473b24e6029f380a8 (patch)
tree59a2112345fe749c94a7cf93cc3f03009d2d5b4f /mpi/mpiutil.c
parent2ed6eec3359bbf04e819a260d6011d613151b5fd (diff)
downloadlibgcrypt-9a06555b17e1bec8f13bf21473b24e6029f380a8.tar.gz
2003-06-09 Moritz Schulte <moritz@g10code.com>
* mpicoder.c (gcry_mpi_scan): Adjust for libgpg-error. (gcry_mpi_print): Likewise. (gcry_mpi_aprint): Likewise. 2003-06-07 Moritz Schulte <moritz@g10code.com> * longlong.h, mpi-add.c, mpi-bit.c, mpi-cmp.c, mpi-div.c, mpi-gcd.c, mpi-inline.c, mpi-inline.h, mpi-internal.h, mpi-inv.c, mpi-mpow.c, mpi-mul.c, mpi-pow.c, mpi-scan.c, mpicoder.c, mpih-div.c, mpih-mul.c, mpiutil.c, generic/mpi-asm-defs.h, generic/mpih-add1.c, generic/mpih-lshift.c, generic/mpih-mul1.c, generic/mpih-mul2.c, generic/mpih-mul3.c, generic/mpih-rshift.c, generic/mpih-sub1.c, generic/udiv-w-sdiv.c, i386/syntax.h, m68k/syntax.h, mips3/mpi-asm-defs.h, powerpc32/syntax.h: Edited all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it. Replaced any occurence of the now deprecated type names with the new ones.
Diffstat (limited to 'mpi/mpiutil.c')
-rw-r--r--mpi/mpiutil.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c
index 072c95f0..89631d3b 100644
--- a/mpi/mpiutil.c
+++ b/mpi/mpiutil.c
@@ -318,42 +318,42 @@ gcry_mpi_swap( MPI a, MPI b)
}
-GCRY_MPI
+gcry_mpi_t
gcry_mpi_new( unsigned int nbits )
{
return _gcry_mpi_alloc( (nbits+BITS_PER_MPI_LIMB-1) / BITS_PER_MPI_LIMB );
}
-GCRY_MPI
+gcry_mpi_t
gcry_mpi_snew( unsigned int nbits )
{
return _gcry_mpi_alloc_secure( (nbits+BITS_PER_MPI_LIMB-1) / BITS_PER_MPI_LIMB );
}
void
-gcry_mpi_release( GCRY_MPI a )
+gcry_mpi_release( gcry_mpi_t a )
{
_gcry_mpi_free( a );
}
-GCRY_MPI
-gcry_mpi_copy( const GCRY_MPI a )
+gcry_mpi_t
+gcry_mpi_copy( const gcry_mpi_t a )
{
- return _gcry_mpi_copy( (GCRY_MPI)a );
+ return _gcry_mpi_copy( (gcry_mpi_t)a );
}
-GCRY_MPI
-gcry_mpi_set( GCRY_MPI w, const GCRY_MPI u )
+gcry_mpi_t
+gcry_mpi_set( gcry_mpi_t w, const gcry_mpi_t u )
{
if( !w )
w = _gcry_mpi_alloc( mpi_get_nlimbs(u) );
- _gcry_mpi_set( w, (GCRY_MPI)u );
+ _gcry_mpi_set( w, (gcry_mpi_t)u );
return w;
}
-GCRY_MPI
-gcry_mpi_set_ui( GCRY_MPI w, unsigned long u )
+gcry_mpi_t
+gcry_mpi_set_ui( gcry_mpi_t w, unsigned long u )
{
if( !w )
w = _gcry_mpi_alloc(1);
@@ -363,7 +363,7 @@ gcry_mpi_set_ui( GCRY_MPI w, unsigned long u )
void
-gcry_mpi_randomize( GCRY_MPI w,
+gcry_mpi_randomize( gcry_mpi_t w,
unsigned int nbits, enum gcry_random_level level )
{
char *p = mpi_is_secure(w) ? gcry_random_bytes( (nbits+7)/8, level )
@@ -374,7 +374,7 @@ gcry_mpi_randomize( GCRY_MPI w,
void
-gcry_mpi_set_flag( GCRY_MPI a, enum gcry_mpi_flag flag )
+gcry_mpi_set_flag( gcry_mpi_t a, enum gcry_mpi_flag flag )
{
switch( flag ) {
case GCRYMPI_FLAG_SECURE: mpi_set_secure(a); break;
@@ -384,7 +384,7 @@ gcry_mpi_set_flag( GCRY_MPI a, enum gcry_mpi_flag flag )
}
void
-gcry_mpi_clear_flag( GCRY_MPI a, enum gcry_mpi_flag flag )
+gcry_mpi_clear_flag( gcry_mpi_t a, enum gcry_mpi_flag flag )
{
switch( flag ) {
case GCRYMPI_FLAG_SECURE:
@@ -394,7 +394,7 @@ gcry_mpi_clear_flag( GCRY_MPI a, enum gcry_mpi_flag flag )
}
int
-gcry_mpi_get_flag( GCRY_MPI a, enum gcry_mpi_flag flag )
+gcry_mpi_get_flag( gcry_mpi_t a, enum gcry_mpi_flag flag )
{
switch( flag ) {
case GCRYMPI_FLAG_SECURE: return (a->flags & 1);