X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Ferrstr.c;h=fe3b98077ee25a7ef9fc676b71686dcd17d32615;hp=6d0f9d137be27a0615c1cf279e60fc035135300b;hb=3ba1e406c2309adb427ced9815ebf05f5b58d155;hpb=d02b48c63a58ea4367a0e905979f140b7d090f86 diff --git a/apps/errstr.c b/apps/errstr.c index 6d0f9d137b..fe3b98077e 100644 --- a/apps/errstr.c +++ b/apps/errstr.c @@ -1,5 +1,5 @@ /* apps/errstr.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -60,17 +60,17 @@ #include #include #include "apps.h" -#include "bio.h" -#include "lhash.h" -#include "err.h" -#include "ssl.h" +#include +#include +#include +#include #undef PROG #define PROG errstr_main -int MAIN(argc, argv) -int argc; -char **argv; +int MAIN(int, char **); + +int MAIN(int argc, char **argv) { int i,ret=0; char buf[256]; @@ -80,7 +80,7 @@ char **argv; if (bio_err == NULL) if ((bio_err=BIO_new(BIO_s_file())) != NULL) - BIO_set_fp(bio_err,stderr,BIO_NOCLOSE); + BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); SSL_load_error_strings(); @@ -91,12 +91,20 @@ char **argv; out=BIO_new(BIO_s_file()); if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE)) { - lh_node_stats_bio((LHASH *)ERR_get_string_table(),out); - lh_stats_bio((LHASH *)ERR_get_string_table(),out); - lh_node_usage_stats_bio((LHASH *) - ERR_get_string_table(),out); +#ifdef OPENSSL_SYS_VMS + { + BIO *tmpbio = BIO_new(BIO_f_linebuffer()); + out = BIO_push(tmpbio, out); + } +#endif + lh_ERR_STRING_DATA_node_stats_bio( + ERR_get_string_table(), out); + lh_ERR_STRING_DATA_stats_bio(ERR_get_string_table(), + out); + lh_ERR_STRING_DATA_node_usage_stats_bio( + ERR_get_string_table(),out); } - if (out != NULL) BIO_free(out); + if (out != NULL) BIO_free_all(out); argc--; argv++; } @@ -104,7 +112,10 @@ char **argv; for (i=1; i