changeset 1489:71e847ea9d22

Move one function to a better place in the code.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 May 2018 05:23:52 +0300
parents c71b6c5204af
children 665a0b917d22
files tools/lib64gfx.c tools/lib64gfx.h
diffstat 2 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Fri May 11 05:23:07 2018 +0300
+++ b/tools/lib64gfx.c	Fri May 11 05:23:52 2018 +0300
@@ -91,6 +91,20 @@
 }
 
 
+char * dmC64GetImageTypeString(char *buf, const size_t len, const int type)
+{
+    snprintf(buf, len,
+        "%s%s%s%s",
+        (type & D64_FMT_MC)    ? "MultiColor " : "HiRes ",
+        (type & D64_FMT_ILACE) ? "Interlaced " : "",
+        (type & D64_FMT_FLI)   ? "FLI " : "",
+        (type & D64_FMT_CHAR)  ? "CHAR" : ""
+        );
+
+    return buf;
+}
+
+
 static BOOL dmCompareAddr16(const Uint8 *buf, const size_t offs, const Uint16 addr)
 {
     return buf[offs    ] == DM_GET_ADDR_LO(addr) &&
@@ -192,20 +206,6 @@
 }
 
 
-char * dmC64GetImageTypeString(char *buf, const size_t len, const int type)
-{
-    snprintf(buf, len,
-        "%s%s%s%s",
-        (type & D64_FMT_MC)    ? "MultiColor " : "HiRes ",
-        (type & D64_FMT_ILACE) ? "Interlaced " : "",
-        (type & D64_FMT_FLI)   ? "FLI " : "",
-        (type & D64_FMT_CHAR)  ? "CHAR" : ""
-        );
-
-    return buf;
-}
-
-
 int dmC64ConvertCSDataToImage(DMImage *img,
     int xoffs, int yoffs, const Uint8 *buf,
     int width, int height, BOOL multicolor,
--- a/tools/lib64gfx.h	Fri May 11 05:23:07 2018 +0300
+++ b/tools/lib64gfx.h	Fri May 11 05:23:52 2018 +0300
@@ -197,13 +197,13 @@
 
 void      dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt);
 void      dmSetDefaultC64Palette(DMImage *img);
+char *    dmC64GetImageTypeString(char *buf, const size_t len, const int type);
 
 
 DMC64Image *dmC64ImageAlloc(const DMC64ImageFormat *fmt);
 void      dmC64ImageFree(DMC64Image *img);
 
 
-char *    dmC64GetImageTypeString(char *buf, const size_t len, const int type);
 int       dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors);
 
 int       dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);