version 1.9, 2023/03/05 13:12:53 |
version 1.10, 2023/03/06 14:32:06 |
|
|
|
|
static struct { |
static struct { |
int stats; |
int stats; |
} errstr_config; |
} cfg; |
|
|
static const struct option errstr_options[] = { |
static const struct option errstr_options[] = { |
{ |
{ |
.name = "stats", |
.name = "stats", |
.desc = "Print debugging statistics for the hash table", |
.desc = "Print debugging statistics for the hash table", |
.type = OPTION_FLAG, |
.type = OPTION_FLAG, |
.opt.flag = &errstr_config.stats, |
.opt.flag = &cfg.stats, |
}, |
}, |
{ NULL }, |
{ NULL }, |
}; |
}; |
|
|
exit(1); |
exit(1); |
} |
} |
|
|
memset(&errstr_config, 0, sizeof(errstr_config)); |
memset(&cfg, 0, sizeof(cfg)); |
|
|
if (options_parse(argc, argv, errstr_options, NULL, &argsused) != 0) { |
if (options_parse(argc, argv, errstr_options, NULL, &argsused) != 0) { |
errstr_usage(); |
errstr_usage(); |
return (1); |
return (1); |
} |
} |
|
|
if (errstr_config.stats) { |
if (cfg.stats) { |
BIO *out; |
BIO *out; |
|
|
if ((out = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL) { |
if ((out = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL) { |