# HG changeset patch # User Matti Hamalainen # Date 1425539915 -7200 # Node ID 14ac28580059b137c74099ff8a124cc34d870b14 # Parent 5b0786541341dbbf450c0a86d337268cae1b3bc7 Cosmetics. diff -r 5b0786541341 -r 14ac28580059 minijss/jloadxm.c --- a/minijss/jloadxm.c Thu Mar 05 08:24:46 2015 +0200 +++ b/minijss/jloadxm.c Thu Mar 05 09:18:35 2015 +0200 @@ -22,6 +22,7 @@ #define XM_MaxSampleVolume (64) #define XM_HeaderSize 276 + /* XM format structures */ typedef struct @@ -218,7 +219,9 @@ /* Convert XM envelope structure to JSS envelope structure */ -static int jssXMConvertEnvelope(JSSEnvelope * dst, XMEnvelope * src, const char * name, const int ninstr) +static int jssXMConvertEnvelope( + JSSEnvelope *dst, XMEnvelope *src, + const char *name, const int ninstr) { int i; (void) name; @@ -259,7 +262,7 @@ if (src->npoints > XM_MaxEnvPoints) { JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA, - "Inst#%d/%s-env: nPoints > MAX, possibly broken file.\n", + "Inst#%d/%s-env: npoints > MAX, possibly broken file.\n", ninstr, name); dst->npoints = XM_MaxEnvPoints; } @@ -267,7 +270,7 @@ if ((dst->flags & jenvfSustain) && src->sustain > src->npoints) { JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA, - "Inst#%d/%s-env: iSustain > nPoints (%d > %d), possibly broken file.\n", + "Inst#%d/%s-env: sustain > npoints (%d > %d), possibly broken file.\n", ninstr, name, src->sustain, src->npoints); dst->sustain = src->npoints; } @@ -275,7 +278,7 @@ if ((dst->flags & jenvfLooped) && src->loopE > src->npoints) { JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA, - "Inst#%d/%s-env: loopE > nPoints (%d > %d), possibly broken file.\n", + "Inst#%d/%s-env: loopE > npoints (%d > %d), possibly broken file.\n", ninstr, name, src->loopE, src->npoints); dst->loopE = src->npoints; } @@ -365,17 +368,16 @@ { // 16-bit sample JSFSET(inst->flags, jsf16bit); - inst->size = xmS.size / sizeof(Uint16); inst->loopS = xmS.loopS / sizeof(Uint16); - inst->loopE = ((xmS.loopS + xmS.loopL) / sizeof(Uint16)); + inst->loopE = (xmS.loopS + xmS.loopL) / sizeof(Uint16); } else { // 8-bit sample inst->size = xmS.size; inst->loopS = xmS.loopS; - inst->loopE = (xmS.loopS + xmS.loopL); + inst->loopE = xmS.loopS + xmS.loopL; } if (xmS.loopL == 0)