summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2004-04-20 10:57:07 +0000
committerRichard Levitte <levitte@openssl.org>2004-04-20 10:57:07 +0000
commit863d2b196f81f427993a0a408a3c0d4634bff971 (patch)
tree5ebec869ce09c792d05e368ef01e69bfb2e9d25a /crypto/bn
parentc57bc2dc51c78384163f16a9e8a631cc494fa933 (diff)
Print the debug thingies on stderr instead of stdout. If for nothing
else then at least so bc doesn't have problems parsing the output from bntest :-).
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_ctx.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c
index 5aec0c987e..12d8a8cbf8 100644
--- a/crypto/bn/bn_ctx.c
+++ b/crypto/bn/bn_ctx.c
@@ -161,33 +161,33 @@ static void ctxdbg(BN_CTX *ctx)
unsigned int bnidx = 0, fpidx = 0;
BN_POOL_ITEM *item = ctx->pool.head;
BN_STACK *stack = &ctx->stack;
- printf("(%08x): ", (unsigned int)ctx);
+ fprintf(stderr,"(%08x): ", (unsigned int)ctx);
while(bnidx < ctx->used)
{
- printf("%02x ", item->vals[bnidx++ % BN_CTX_POOL_SIZE].dmax);
+ fprintf(stderr,"%02x ", item->vals[bnidx++ % BN_CTX_POOL_SIZE].dmax);
if(!(bnidx % BN_CTX_POOL_SIZE))
item = item->next;
}
- printf("\n");
+ fprintf(stderr,"\n");
bnidx = 0;
- printf(" : ");
+ fprintf(stderr," : ");
while(fpidx < stack->depth)
{
while(bnidx++ < stack->indexes[fpidx])
- printf(" ");
- printf("^^ ");
+ fprintf(stderr," ");
+ fprintf(stderr,"^^ ");
bnidx++;
fpidx++;
}
- printf("\n");
+ fprintf(stderr,"\n");
}
#define CTXDBG_ENTRY(str, ctx) do { \
ctxdbg_cur = (str); \
- printf("Starting %s\n", ctxdbg_cur); \
+ fprintf(stderr,"Starting %s\n", ctxdbg_cur); \
ctxdbg(ctx); \
} while(0)
#define CTXDBG_EXIT(ctx) do { \
- printf("Ending %s\n", ctxdbg_cur); \
+ fprintf(stderr,"Ending %s\n", ctxdbg_cur); \
ctxdbg(ctx); \
} while(0)
#define CTXDBG_RET(ctx,ret)
@@ -235,16 +235,16 @@ void BN_CTX_free(BN_CTX *ctx)
{
#ifdef BN_CTX_DEBUG
BN_POOL_ITEM *pool = ctx->pool.head;
- printf("BN_CTX_free, stack-size=%d, pool-bignums=%d\n",
+ fprintf(stderr,"BN_CTX_free, stack-size=%d, pool-bignums=%d\n",
ctx->stack.size, ctx->pool.size);
- printf("dmaxs: ");
+ fprintf(stderr,"dmaxs: ");
while(pool) {
unsigned loop = 0;
while(loop < BN_CTX_POOL_SIZE)
- printf("%02x ", pool->vals[loop++].dmax);
+ fprintf(stderr,"%02x ", pool->vals[loop++].dmax);
pool = pool->next;
}
- printf("\n");
+ fprintf(stderr,"\n");
#endif
BN_STACK_finish(&ctx->stack);
BN_POOL_finish(&ctx->pool);