changeset 1245:2a0488078b78

Cleanups, more consistent error messages.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 07 Mar 2015 17:58:06 +0200
parents 072851dcec5c
children 7bd50496c9ec
files tools/xm2jss.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tools/xm2jss.c	Sat Mar 07 15:29:37 2015 +0200
+++ b/tools/xm2jss.c	Sat Mar 07 17:58:06 2015 +0200
@@ -497,7 +497,7 @@
         !dm_fwrite_byte(outFile, jssH.defTempo) ||
         !dm_fwrite_byte(outFile, jssH.patMode))
         JSSERROR(DMERR_FWRITE, DMERR_FWRITE,
-        "Could not write JSSMOD header!\n");
+        "Error writing JSSMOD header!\n");
 
     totalSize = sizeof(jssH);
     dmMsg(1," * JSSMOD-header 0x%04x, %d bytes.\n", JSSMOD_VERSION, totalSize);
@@ -563,7 +563,8 @@
             default:
                 dmFree(patBuf);
                 JSSERROR(DMERR_INVALID_DATA, DMERR_INVALID_DATA,
-                "Unsupported pattern conversion mode %d.\n", patMode);
+                "Unsupported pattern conversion mode %d for pattern #%d.\n",
+                patMode, pattern);
         }
 
         if (i != DMERR_OK)
@@ -662,7 +663,8 @@
              "Could not write JSSMOD instrument #%d to file!\n", instr);
     }
     else
-        JSSWARNING(DMERR_NULLPTR, DMERR_NULLPTR, "Instrument #%d NULL!\n", instr);
+        JSSWARNING(DMERR_NULLPTR, DMERR_NULLPTR,
+        "Instrument #%d NULL!\n", instr);
 
     dmMsg(1," * %d Instrument headers, %d bytes.\n",
         module->ninstruments, totalSize);
@@ -687,7 +689,7 @@
 
             if (fwrite(inst->data, sizeof(Uint16), bsize, outFile) != bsize)
                 JSSERROR(DMERR_FWRITE, DMERR_FWRITE,
-                 "Could not write JSSMOD sample #%d to file!\n", instr);
+                "Error writing JSSMOD sample #%d.\n", instr);
 
             totalSize += bsize;
         }