Mercurial > hg > dmlib
diff tools/xm2jss.c @ 2384:36edd316184a
Fix some format strings to use proper PRI*_SIZE_T where necessary.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jan 2020 15:20:23 +0200 |
parents | dcf1016f3d27 |
children | b7cd5dd0b82e |
line wrap: on
line diff
--- a/tools/xm2jss.c Thu Jan 09 14:55:41 2020 +0200 +++ b/tools/xm2jss.c Thu Jan 09 15:20:23 2020 +0200 @@ -598,7 +598,8 @@ } totalSize = sizeof(jssH); - dmMsg(1," * JSSMOD-header 0x%04x, %d bytes.\n", JSSMOD_VERSION, totalSize); + dmMsg(1," * JSSMOD-header 0x%04x, %" DM_PRIu_SIZE_T " bytes.\n", + JSSMOD_VERSION, totalSize); // Write orders list for (totalSize = index = 0; index < module->norders; index++) @@ -622,7 +623,7 @@ totalSize += sizeof(Uint16); } - dmMsg(1," * %d item orders list, %d bytes.\n", + dmMsg(1," * %d item orders list, %" DM_PRIu_SIZE_T " bytes.\n", module->norders, totalSize); // Allocate pattern compression buffer @@ -685,7 +686,9 @@ pattern); } - dmMsg(3, " - Pattern %d size %d bytes\n", index, dataSize); + dmMsg(3, " - Pattern %d size %" DM_PRIu_SIZE_T " bytes\n", + index, dataSize); + totalSize += dataSize + sizeof(JSSMODPattern); if (!dm_fwrite_le32(outFile, dataSize) || @@ -717,7 +720,7 @@ } dmFree(patBuf); - dmMsg(1," * %d patterns, %d bytes.\n", + dmMsg(1," * %d patterns, %" DM_PRIu_SIZE_T " bytes.\n", module->npatterns, totalSize); // Write extended instruments @@ -765,7 +768,7 @@ totalSize += sizeof(JSSMODExtInstrument); } - dmMsg(1," * %d Extended Instruments, %d bytes.\n", + dmMsg(1," * %d Extended Instruments, %" DM_PRIu_SIZE_T " bytes.\n", module->nextInstruments, totalSize); // Write sample instrument headers @@ -805,7 +808,7 @@ index); } - dmMsg(1," * %d Instrument headers, %d bytes.\n", + dmMsg(1," * %d Instrument headers, %" DM_PRIu_SIZE_T " bytes.\n", module->ninstruments, totalSize); // Write sample data @@ -844,7 +847,7 @@ } } - dmMsg(1," * %d samples, %d bytes.\n", + dmMsg(1," * %d samples, %" DM_PRIu_SIZE_T " bytes.\n", module->ninstruments, totalSize); return DMERR_OK; @@ -1024,7 +1027,7 @@ else { dmErrorMsg("Ext.instrument #%d sNumForNotes[%d] value out range (%d < %d).\n", - i + 1, m->ninstruments, q + 1); + i + 1, note, m->ninstruments, q + 1); } } }