diff tools/lib64gfx.c @ 1494:3b220604ae3c

Add short format attribute names to dmC64GetImageTypeString().
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 May 2018 06:26:42 +0300
parents 5f9080d24f3c
children 5c46004dad15
line wrap: on
line diff
--- a/tools/lib64gfx.c	Fri May 11 05:46:50 2018 +0300
+++ b/tools/lib64gfx.c	Fri May 11 06:26:42 2018 +0300
@@ -45,7 +45,7 @@
 {
     char typeStr[64];
 
-    dmC64GetImageTypeString(typeStr, sizeof(typeStr), img->type);
+    dmC64GetImageTypeString(typeStr, sizeof(typeStr), img->type, TRUE);
 
     if (fmt != NULL)
     {
@@ -91,12 +91,12 @@
 }
 
 
-char * dmC64GetImageTypeString(char *buf, const size_t len, const int type)
+char * dmC64GetImageTypeString(char *buf, const size_t len, const int type, const BOOL lng)
 {
     snprintf(buf, len,
         "%s%s%s%s",
-        (type & D64_FMT_MC)    ? "MultiColor " : "HiRes ",
-        (type & D64_FMT_ILACE) ? "Interlaced " : "",
+        (type & D64_FMT_MC)    ? (lng ? "MultiColor " : "MC ") : "HiRes ",
+        (type & D64_FMT_ILACE) ? (lng ? "Interlaced " : "ILace ") : "",
         (type & D64_FMT_FLI)   ? "FLI " : "",
         (type & D64_FMT_CHAR)  ? "CHAR" : ""
         );