diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/bn/bn_recp.c | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) |
Change functions to ANSI C.
Diffstat (limited to 'crypto/bn/bn_recp.c')
-rw-r--r-- | crypto/bn/bn_recp.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 3ace566b55..85b4ac8148 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -60,8 +60,7 @@ #include "cryptlib.h" #include "bn_lcl.h" -void BN_RECP_CTX_init(recp) -BN_RECP_CTX *recp; +void BN_RECP_CTX_init(BN_RECP_CTX *recp) { BN_init(&(recp->N)); BN_init(&(recp->Nr)); @@ -69,7 +68,7 @@ BN_RECP_CTX *recp; recp->flags=0; } -BN_RECP_CTX *BN_RECP_CTX_new() +BN_RECP_CTX *BN_RECP_CTX_new(void) { BN_RECP_CTX *ret; @@ -81,8 +80,7 @@ BN_RECP_CTX *BN_RECP_CTX_new() return(ret); } -void BN_RECP_CTX_free(recp) -BN_RECP_CTX *recp; +void BN_RECP_CTX_free(BN_RECP_CTX *recp) { if(recp == NULL) return; @@ -93,10 +91,7 @@ BN_RECP_CTX *recp; Free(recp); } -int BN_RECP_CTX_set(recp,d,ctx) -BN_RECP_CTX *recp; -BIGNUM *d; -BN_CTX *ctx; +int BN_RECP_CTX_set(BN_RECP_CTX *recp, BIGNUM *d, BN_CTX *ctx) { BN_copy(&(recp->N),d); BN_zero(&(recp->Nr)); @@ -105,12 +100,8 @@ BN_CTX *ctx; return(1); } -int BN_mod_mul_reciprocal(r, x, y, recp, ctx) -BIGNUM *r; -BIGNUM *x; -BIGNUM *y; -BN_RECP_CTX *recp; -BN_CTX *ctx; +int BN_mod_mul_reciprocal(BIGNUM *r, BIGNUM *x, BIGNUM *y, BN_RECP_CTX *recp, + BN_CTX *ctx) { int ret=0; BIGNUM *a; @@ -133,12 +124,8 @@ err: return(ret); } -int BN_div_recp(dv,rem,m,recp,ctx) -BIGNUM *dv; -BIGNUM *rem; -BIGNUM *m; -BN_RECP_CTX *recp; -BN_CTX *ctx; +int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, BN_RECP_CTX *recp, + BN_CTX *ctx) { int i,j,tos,ret=0,ex; BIGNUM *a,*b,*d,*r; @@ -221,11 +208,7 @@ err: * We actually calculate with an extra word of precision, so * we can do faster division if the remainder is not required. */ -int BN_reciprocal(r,m,len,ctx) -BIGNUM *r; -BIGNUM *m; -int len; -BN_CTX *ctx; +int BN_reciprocal(BIGNUM *r, BIGNUM *m, int len, BN_CTX *ctx) { int ret= -1; BIGNUM t; |