Some crypto applications are now being built on Unix, so they should on VMS as well...
[oweals/openssl.git] / crypto / bn / bn_gcd.c
index c80cecdc8de9eb125052016a7a52c8b2a7aa08ff..64a76f4498965b0e912eece66863edead0e46d27 100644 (file)
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
-#ifndef NOPROTO
 static BIGNUM *euclid(BIGNUM *a, BIGNUM *b);
-#else
-static BIGNUM *euclid();
-#endif
-
-int BN_gcd(r,in_a,in_b,ctx)
-BIGNUM *r,*in_a,*in_b;
-BN_CTX *ctx;
+int BN_gcd(BIGNUM *r, BIGNUM *in_a, BIGNUM *in_b, BN_CTX *ctx)
        {
        BIGNUM *a,*b,*t;
        int ret=0;
@@ -92,8 +85,7 @@ err:
        return(ret);
        }
 
-static BIGNUM *euclid(a,b)
-BIGNUM *a,*b;
+static BIGNUM *euclid(BIGNUM *a, BIGNUM *b)
        {
        BIGNUM *t;
        int shifts=0;
@@ -148,11 +140,7 @@ err:
        }
 
 /* solves ax == 1 (mod n) */
-BIGNUM *BN_mod_inverse(in, a, n, ctx)
-BIGNUM *in;
-BIGNUM *a;
-BIGNUM *n;
-BN_CTX *ctx;
+BIGNUM *BN_mod_inverse(BIGNUM *in, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
        {
        BIGNUM *A,*B,*X,*Y,*M,*D,*R;
        BIGNUM *T,*ret=NULL;