Make sure to print the BN counting (BN_COUNT) to stderr instead of
authorRichard Levitte <levitte@openssl.org>
Thu, 16 Nov 2000 22:42:39 +0000 (22:42 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 16 Nov 2000 22:42:39 +0000 (22:42 +0000)
stdout.  bc gets so confused by bean counts.

crypto/bn/bn_mul.c

index aed752818295424b3cbeae33af02cb54475737f0..d3908b54c05866ab98ec3efafb5a39b819a4d682 100644 (file)
@@ -82,7 +82,7 @@ void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2,
        BN_ULONG ln,lo,*p;
 
 # ifdef BN_COUNT
        BN_ULONG ln,lo,*p;
 
 # ifdef BN_COUNT
-       printf(" bn_mul_recursive %d * %d\n",n2,n2);
+       fprintf(stderr," bn_mul_recursive %d * %d\n",n2,n2);
 # endif
 # ifdef BN_MUL_COMBA
 #  if 0
 # endif
 # ifdef BN_MUL_COMBA
 #  if 0
@@ -228,7 +228,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn,
        BN_ULONG ln,lo,*p;
 
 # ifdef BN_COUNT
        BN_ULONG ln,lo,*p;
 
 # ifdef BN_COUNT
-       printf(" bn_mul_part_recursive %d * %d\n",tn+n,tn+n);
+       fprintf(stderr," bn_mul_part_recursive %d * %d\n",tn+n,tn+n);
 # endif
        if (n < 8)
                {
 # endif
        if (n < 8)
                {
@@ -397,7 +397,7 @@ void bn_mul_low_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2,
        int n=n2/2;
 
 # ifdef BN_COUNT
        int n=n2/2;
 
 # ifdef BN_COUNT
-       printf(" bn_mul_low_recursive %d * %d\n",n2,n2);
+       fprintf(stderr," bn_mul_low_recursive %d * %d\n",n2,n2);
 # endif
 
        bn_mul_recursive(r,a,b,n,&(t[0]));
 # endif
 
        bn_mul_recursive(r,a,b,n,&(t[0]));
@@ -431,7 +431,7 @@ void bn_mul_high(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, BN_ULONG *l, int n2,
        BN_ULONG ll,lc,*lp,*mp;
 
 # ifdef BN_COUNT
        BN_ULONG ll,lc,*lp,*mp;
 
 # ifdef BN_COUNT
-       printf(" bn_mul_high %d * %d\n",n2,n2);
+       fprintf(stderr," bn_mul_high %d * %d\n",n2,n2);
 # endif
        n=n2/2;
 
 # endif
        n=n2/2;
 
@@ -623,7 +623,7 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
        BIGNUM *free_a = NULL, *free_b = NULL;
 
 #ifdef BN_COUNT
        BIGNUM *free_a = NULL, *free_b = NULL;
 
 #ifdef BN_COUNT
-       printf("BN_mul %d * %d\n",a->top,b->top);
+       fprintf(stderr,"BN_mul %d * %d\n",a->top,b->top);
 #endif
 
        bn_check_top(a);
 #endif
 
        bn_check_top(a);
@@ -750,7 +750,7 @@ void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb)
        BN_ULONG *rr;
 
 #ifdef BN_COUNT
        BN_ULONG *rr;
 
 #ifdef BN_COUNT
-       printf(" bn_mul_normal %d * %d\n",na,nb);
+       fprintf(stderr," bn_mul_normal %d * %d\n",na,nb);
 #endif
 
        if (na < nb)
 #endif
 
        if (na < nb)
@@ -784,7 +784,7 @@ void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb)
 void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
        {
 #ifdef BN_COUNT
 void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
        {
 #ifdef BN_COUNT
-       printf(" bn_mul_low_normal %d * %d\n",n,n);
+       fprintf(stderr," bn_mul_low_normal %d * %d\n",n,n);
 #endif
        bn_mul_words(r,a,n,b[0]);
 
 #endif
        bn_mul_words(r,a,n,b[0]);