summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/chdman.cpp
diff options
context:
space:
mode:
author MetalliC <0vetal0@gmail.com>2015-12-26 17:49:12 +0200
committer MetalliC <0vetal0@gmail.com>2015-12-26 17:49:12 +0200
commit7ae681b010802788810714fa21ef29fe29b32283 (patch)
treee45e329492ebee8e46972b3deb289228de41cc39 /src/tools/chdman.cpp
parente756a66b14d60a6ced720da68c20622e3477acf9 (diff)
chdman info verbose metadata output (nw)
Diffstat (limited to 'src/tools/chdman.cpp')
-rw-r--r--src/tools/chdman.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp
index 88a629b97dd..7d4472b1d61 100644
--- a/src/tools/chdman.cpp
+++ b/src/tools/chdman.cpp
@@ -1342,6 +1342,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_
static void do_info(parameters_t &params)
{
+ bool verbose = params.find(OPTION_VERBOSE) != params.end();
// parse out input files
chd_file input_parent_chd;
chd_file input_chd;
@@ -1414,15 +1415,17 @@ static void do_info(parameters_t &params)
printf("Metadata: Tag=%08x Index=%d Length=%d bytes\n", metatag, metaindex, int(buffer.size()));
printf(" ");
- // print up to 60 characters of metadata
- UINT32 count = MIN(60, buffer.size());
+ UINT32 count = buffer.size();
+ // limit output to 60 characters of metadata if not verbose
+ if (!verbose)
+ count = MIN(60, count);
for (int chnum = 0; chnum < count; chnum++)
printf("%c", isprint(UINT8(buffer[chnum])) ? buffer[chnum] : '.');
printf("\n");
}
// print compression stats if verbose
- if (params.find(OPTION_VERBOSE) != params.end())
+ if (verbose)
{
UINT32 compression_types[10] = { 0 };
for (UINT32 hunknum = 0; hunknum < input_chd.hunk_count(); hunknum++)