Mercurial > hg > sidinfo
changeset 279:d5ab136cdc97
Changes to the STIL and songlengths entry output formats .. just
experimenting.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 07 Jan 2020 10:10:24 +0200 |
parents | d73ccb155878 |
children | 08695f046565 |
files | sidinfo.c |
diffstat | 1 files changed, 20 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/sidinfo.c Mon Jan 06 20:28:55 2020 +0200 +++ b/sidinfo.c Tue Jan 07 10:10:24 2020 +0200 @@ -1133,8 +1133,16 @@ for (int i = 0; i < psid->lengths->nlengths; i++) { int len = psid->lengths->lengths[i]; - fprintf(outFile, "%d:%d%s", len / 60, len % 60, - (i < psid->lengths->nlengths - 1) ? " " : ""); + + snprintf(tmp, sizeof(tmp), "%d:%02d%s", + len / 60, len % 60, + (i < psid->lengths->nlengths - 1) ? ", " : ""); + + siPrintPSIDInfoLine(outFile, shown, + siGetInfoFormat(item, OTYPE_STR), + OTYPE_STR, + tmp, + -1, FALSE); } siPrintFieldSeparator(outFile); } @@ -1150,8 +1158,16 @@ for (int nfield = 0; nfield < STF_LAST; nfield++) for (int nitem = 0; nitem < node->fields[nfield].ndata; nitem++) { - snprintf(tmp, sizeof(tmp), "STIL/%s/%d", - sidlib_stil_fields[nfield], nitem + 1); + if (nsubtune > 0) + { + snprintf(tmp, sizeof(tmp), "STIL#%d/%s", + nsubtune, sidlib_stil_fields[nfield]); + } + else + { + snprintf(tmp, sizeof(tmp), "STIL/%s", + sidlib_stil_fields[nfield]); + } siPrintFieldPrefixName(outFile, tmp); siPrintPSIDInfoLine(outFile, shown,