# HG changeset patch # User Matti Hamalainen # Date 1578384624 -7200 # Node ID d5ab136cdc970409c2efba9dd1f9aec31ceaa0fe # Parent d73ccb1558787d8f4fb4b3dcdfde0718fb40dc47 Changes to the STIL and songlengths entry output formats .. just experimenting. diff -r d73ccb155878 -r d5ab136cdc97 sidinfo.c --- 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,