From d4fcd82bb7f6d603bd61e19a81ba97337b89dfca Mon Sep 17 00:00:00 2001 From: markus <> Date: Mon, 12 May 2003 02:18:40 +0000 Subject: merge 0.9.7b with local changes; crank majors for libssl/libcrypto --- src/lib/libcrypto/lhash/Makefile.ssl | 2 +- src/lib/libcrypto/lhash/lh_stats.c | 101 +++++++++++------------------------ 2 files changed, 31 insertions(+), 72 deletions(-) (limited to 'src/lib/libcrypto/lhash') diff --git a/src/lib/libcrypto/lhash/Makefile.ssl b/src/lib/libcrypto/lhash/Makefile.ssl index b3ad272cf7..60e7ee3393 100644 --- a/src/lib/libcrypto/lhash/Makefile.ssl +++ b/src/lib/libcrypto/lhash/Makefile.ssl @@ -68,7 +68,7 @@ lint: lint -DLINT $(INCLUDES) $(SRC)>fluff depend: - $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) dclean: $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new diff --git a/src/lib/libcrypto/lhash/lh_stats.c b/src/lib/libcrypto/lhash/lh_stats.c index 8e6f57c741..5aa7766aa6 100644 --- a/src/lib/libcrypto/lhash/lh_stats.c +++ b/src/lib/libcrypto/lhash/lh_stats.c @@ -179,63 +179,29 @@ end:; void lh_stats_bio(const LHASH *lh, BIO *out) { - char buf[128]; - - snprintf(buf,sizeof buf,"num_items = %lu\n",lh->num_items); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_nodes = %u\n",lh->num_nodes); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_alloc_nodes = %u\n", - lh->num_alloc_nodes); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_expands = %lu\n", - lh->num_expands); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_expand_reallocs = %lu\n", - lh->num_expand_reallocs); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_contracts = %lu\n", - lh->num_contracts); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_contract_reallocs = %lu\n", - lh->num_contract_reallocs); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_hash_calls = %lu\n", - lh->num_hash_calls); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_comp_calls = %lu\n", - lh->num_comp_calls); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_insert = %lu\n", - lh->num_insert); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_replace = %lu\n", - lh->num_replace); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_delete = %lu\n", - lh->num_delete); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_no_delete = %lu\n", - lh->num_no_delete); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_retrieve = %lu\n", - lh->num_retrieve); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_retrieve_miss = %lu\n", - lh->num_retrieve_miss); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"num_hash_comps = %lu\n", - lh->num_hash_comps); - BIO_puts(out,buf); + BIO_printf(out,"num_items = %lu\n",lh->num_items); + BIO_printf(out,"num_nodes = %u\n",lh->num_nodes); + BIO_printf(out,"num_alloc_nodes = %u\n",lh->num_alloc_nodes); + BIO_printf(out,"num_expands = %lu\n",lh->num_expands); + BIO_printf(out,"num_expand_reallocs = %lu\n", + lh->num_expand_reallocs); + BIO_printf(out,"num_contracts = %lu\n",lh->num_contracts); + BIO_printf(out,"num_contract_reallocs = %lu\n", + lh->num_contract_reallocs); + BIO_printf(out,"num_hash_calls = %lu\n",lh->num_hash_calls); + BIO_printf(out,"num_comp_calls = %lu\n",lh->num_comp_calls); + BIO_printf(out,"num_insert = %lu\n",lh->num_insert); + BIO_printf(out,"num_replace = %lu\n",lh->num_replace); + BIO_printf(out,"num_delete = %lu\n",lh->num_delete); + BIO_printf(out,"num_no_delete = %lu\n",lh->num_no_delete); + BIO_printf(out,"num_retrieve = %lu\n",lh->num_retrieve); + BIO_printf(out,"num_retrieve_miss = %lu\n",lh->num_retrieve_miss); + BIO_printf(out,"num_hash_comps = %lu\n",lh->num_hash_comps); #if 0 - snprintf(buf,sizeof buf,"p = %u\n",lh->p); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"pmax = %u\n",lh->pmax); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"up_load = %lu\n",lh->up_load); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"down_load = %lu\n",lh->down_load); - BIO_puts(out,buf); + BIO_printf(out,"p = %u\n",lh->p); + BIO_printf(out,"pmax = %u\n",lh->pmax); + BIO_printf(out,"up_load = %lu\n",lh->up_load); + BIO_printf(out,"down_load = %lu\n",lh->down_load); #endif } @@ -243,14 +209,12 @@ void lh_node_stats_bio(const LHASH *lh, BIO *out) { LHASH_NODE *n; unsigned int i,num; - char buf[128]; for (i=0; inum_nodes; i++) { for (n=lh->b[i],num=0; n != NULL; n=n->next) num++; - snprintf(buf,sizeof buf,"node %6u -> %3u\n",i,num); - BIO_puts(out,buf); + BIO_printf(out,"node %6u -> %3u\n",i,num); } } @@ -260,7 +224,6 @@ void lh_node_usage_stats_bio(const LHASH *lh, BIO *out) unsigned long num; unsigned int i; unsigned long total=0,n_used=0; - char buf[128]; for (i=0; inum_nodes; i++) { @@ -272,18 +235,14 @@ void lh_node_usage_stats_bio(const LHASH *lh, BIO *out) total+=num; } } - snprintf(buf,sizeof buf,"%lu nodes used out of %u\n",n_used, - lh->num_nodes); - BIO_puts(out,buf); - snprintf(buf,sizeof buf,"%lu items\n",total); - BIO_puts(out,buf); + BIO_printf(out,"%lu nodes used out of %u\n",n_used,lh->num_nodes); + BIO_printf(out,"%lu items\n",total); if (n_used == 0) return; - snprintf(buf,sizeof buf,"load %d.%02d actual load %d.%02d\n", - (int)(total/lh->num_nodes), - (int)((total%lh->num_nodes)*100/lh->num_nodes), - (int)(total/n_used), - (int)((total%n_used)*100/n_used)); - BIO_puts(out,buf); + BIO_printf(out,"load %d.%02d actual load %d.%02d\n", + (int)(total/lh->num_nodes), + (int)((total%lh->num_nodes)*100/lh->num_nodes), + (int)(total/n_used), + (int)((total%n_used)*100/n_used)); } #endif -- cgit v1.2.3-55-g6feb