changeset 1259:8e854dfee26d

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 10 Mar 2015 11:49:22 +0200
parents 13c274d22a29
children 94e9444b0fa7
files minijss/jloadxm.c
diffstat 1 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jloadxm.c	Mon Mar 09 19:00:13 2015 +0200
+++ b/minijss/jloadxm.c	Tue Mar 10 11:49:22 2015 +0200
@@ -325,9 +325,11 @@
         // Get the pattern header size and packing
         if (!dmf_read_le32(inFile, &xmP.headSize) ||
             !dmf_read_byte(inFile, &xmP.packing))
+        {
             JSSERROR(DMERR_FREAD, DMERR_FREAD,
             "Could not read pattern header #%d.\n",
             index);
+        }
 
         // Different format versions have slightly different headers
         if (module->intVersion == 0x0102)
@@ -363,14 +365,18 @@
 
         // Sanity-check rest of the header data
         if (xmP.packing != 0)
+        {
             JSSERROR(DMERR_INVALID_DATA, DMERR_INVALID_DATA,
             "Pattern #%d packing type unsupported (%d)\n",
             index, xmP.packing);
+        }
 
         if (xmP.nrows == 0)
+        {
             JSSERROR(DMERR_INVALID_DATA, DMERR_INVALID_DATA,
             "Pattern #%d has %d rows, invalid data.\n",
             index, xmP.nrows);
+        }
 
         if (xmP.size > 0)
         {
@@ -580,9 +586,11 @@
         inst->loopS = xmS.loopS / sizeof(Uint16);
         inst->loopE = (xmS.loopS + xmS.loopL) / sizeof(Uint16);
         if ((xmS.size & 1) || (xmS.loopS & 1) || (xmS.loopL & 1))
+        {
             JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA,
             "Samp #%d/%d: size=%d, loopS=%d or loopL=%d not divisible by 2 for 16-bit sample.\n",
             neinst, nsample, xmS.size, xmS.loopS, xmS.loopL);
+        }
     }
     else
     {
@@ -735,7 +743,8 @@
         !dmf_read_le16(inFile, &xmI1.nsamples))
     {
         JSSERROR(DMERR_FREAD, DMERR_FREAD,
-        "Failed to read primary extended instrument header #%d\n", neinst);
+        "Failed to read primary extended instrument header #%d.\n",
+        neinst);
     }
 
     // If there are samples, there is header #2
@@ -756,9 +765,11 @@
         neinst, module->nextInstruments);
 
     if ((einst = jssAllocateExtInstrument()) == NULL)
+    {
         JSSERROR(DMERR_MALLOC, DMERR_MALLOC,
         "Could not allocate extended instrument #%d.\n",
         neinst);
+    }
 
     module->extInstruments[neinst] = einst;
 
@@ -767,14 +778,16 @@
         !dmf_read_str(inFile, &xmI2.sNumForNotes, sizeof(xmI2.sNumForNotes)))
     {
         JSSERROR(DMERR_FREAD, DMERR_FREAD,
-        "Could not read secondary instrument header part #1 for #%d.\n", neinst);
+        "Could not read secondary instrument header part #1 for #%d.\n",
+        neinst);
     }
 
     if (!jssXMLoadEnvelopePoints(inFile, &xmI2.volumeEnv) ||
         !jssXMLoadEnvelopePoints(inFile, &xmI2.panningEnv))
     {
         JSSERROR(DMERR_FREAD, DMERR_FREAD,
-        "Could not read envelope point data for instrument #%d.\n", neinst);
+        "Could not read envelope point data for instrument #%d.\n",
+        neinst);
     }
 
     if (!dmf_read_byte(inFile, &xmI2.volumeEnv.npoints) ||
@@ -795,7 +808,8 @@
         !dmf_read_le16(inFile, &xmI2.ARESERVED))
     {
         JSSERROR(DMERR_FREAD, DMERR_FREAD,
-        "Could not read secondary instrument header part #2 for #%d.\n", neinst);
+        "Could not read secondary instrument header part #2 for #%d.\n",
+        neinst);
     }
 
     // Skip the extra data after header #2