From 0b2a134c62e5aaf4371a1df71c57626e2edf3dad Mon Sep 17 00:00:00 2001 From: bnnm Date: Thu, 25 Jul 2024 19:10:46 +0200 Subject: [PATCH] cleanup: fix crap --- cli/vgmstream_cli.c | 4 ++-- cli/vgmstream_cli.h | 4 ++-- cli/vgmstream_cli_utils.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/vgmstream_cli.c b/cli/vgmstream_cli.c index fa5af5f4..60ce7163 100644 --- a/cli/vgmstream_cli.c +++ b/cli/vgmstream_cli.c @@ -230,7 +230,7 @@ static bool parse_config(cli_config_t* cfg, int argc, char** argv) { goto fail; #ifdef HAVE_JSON case 'V': - print_json_version(); + print_json_version(VGMSTREAM_VERSION); goto fail; case 'I': cfg->print_metajson = true; @@ -576,7 +576,7 @@ static bool convert_file(cli_config_t* cfg) { #ifdef HAVE_JSON } else { - print_json_info(vgmstream, cfg); + print_json_info(vgmstream, cfg, VGMSTREAM_VERSION); } #endif diff --git a/cli/vgmstream_cli.h b/cli/vgmstream_cli.h index d289a350..661b6649 100644 --- a/cli/vgmstream_cli.h +++ b/cli/vgmstream_cli.h @@ -69,8 +69,8 @@ void print_tags(cli_config_t* cfg); void print_title(VGMSTREAM* vgmstream, cli_config_t* cfg); #ifdef HAVE_JSON -void print_json_version(); -void print_json_info(VGMSTREAM* vgmstream, cli_config_t* cfg); +void print_json_version(const char* vgmstream_version); +void print_json_info(VGMSTREAM* vgm, cli_config_t* cfg, const char* vgmstream_version); #endif diff --git a/cli/vgmstream_cli_utils.c b/cli/vgmstream_cli_utils.c index 7f1c8326..0ff13197 100644 --- a/cli/vgmstream_cli_utils.c +++ b/cli/vgmstream_cli_utils.c @@ -184,7 +184,7 @@ void print_title(VGMSTREAM* vgmstream, cli_config_t* cfg) { } #ifdef HAVE_JSON -void print_json_version() { +void print_json_version(const char* vgmstream_version) { size_t extension_list_len; size_t common_extension_list_len; const char** extension_list; @@ -205,7 +205,7 @@ void print_json_version() { json_array_append(cext_list, cext); } - json_t* version_string = json_string(VGMSTREAM_VERSION); + json_t* version_string = json_string(vgmstream_version); json_t* final_object = json_object(); json_object_set(final_object, "version", version_string); @@ -219,8 +219,8 @@ void print_json_version() { json_dumpf(final_object, stdout, JSON_COMPACT); } -void print_json_info(VGMSTREAM* vgm, cli_config_t* cfg) { - json_t* version_string = json_string(VGMSTREAM_VERSION); +void print_json_info(VGMSTREAM* vgm, cli_config_t* cfg, const char* vgmstream_version) { + json_t* version_string = json_string(vgmstream_version); vgmstream_info info; describe_vgmstream_info(vgm, &info);