changeset 1984:e7f2ddaf94a6

Change encode and decode function format parameter type from DMC64ImageFormat to DMC64ImageCommonFormat.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 01 Jul 2018 07:00:38 +0300
parents 214c7bd8692f
children 5817e3335f53
files tools/lib64fmts.c tools/lib64gfx.c tools/lib64gfx.h
diffstat 3 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Sun Jul 01 06:18:55 2018 +0300
+++ b/tools/lib64fmts.c	Sun Jul 01 07:00:38 2018 +0300
@@ -213,7 +213,7 @@
 
 
 static BOOL fmtDrazLaceGetLaceType(DMC64Image *img, const DMC64EncDecOp *op,
-    const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+    const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
 {
     (void) fmt;
 
@@ -227,7 +227,7 @@
 
 
 static BOOL fmtDrazLaceSetLaceType(const DMC64EncDecOp *op, DMGrowBuf *buf,
-    const DMC64Image *img, const DMC64ImageFormat *fmt)
+    const DMC64Image *img, const DMC64ImageCommonFormat *fmt)
 {
     (void) fmt;
     buf->data[op->offs] = (img->laceType == D64_ILACE_RES) ? 1 : 0;
@@ -335,7 +335,7 @@
 
 
 static BOOL fmtEncodeGunPaint(const DMC64EncDecOp *op, DMGrowBuf *buf,
-    const DMC64Image *img, const DMC64ImageFormat *fmt)
+    const DMC64Image *img, const DMC64ImageCommonFormat *fmt)
 {
     (void) op;
     (void) img;
@@ -548,7 +548,7 @@
 
 
 static BOOL fmtTruePaintGetLaceType(DMC64Image *img, const DMC64EncDecOp *op,
-    const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+    const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
 {
     (void) op;
     (void) buf;
@@ -933,7 +933,7 @@
 
 
 static BOOL fmtECIGetLaceType(DMC64Image *img, const DMC64EncDecOp *op,
-    const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+    const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt)
 {
     (void) op;
     (void) buf;
--- a/tools/lib64gfx.c	Sun Jul 01 06:18:55 2018 +0300
+++ b/tools/lib64gfx.c	Sun Jul 01 07:00:38 2018 +0300
@@ -1021,7 +1021,7 @@
 
             case DO_FUNC:
                 if (op->decFunction != NULL &&
-                    !op->decFunction(img, op, buf, fmt))
+                    !op->decFunction(img, op, buf, fmt->format))
                 {
                     return dmError(DMERR_INTERNAL,
                         "Decode op custom function failed: op #%d, "
@@ -1201,7 +1201,7 @@
 
             case DO_FUNC:
                 if (op->encFunction != NULL &&
-                    !op->encFunction(op, buf, img, fmt))
+                    !op->encFunction(op, buf, img, fmt->format))
                 {
                     res = dmError(DMERR_INTERNAL,
                         "Encode op custom function failed: op #%d, "
--- a/tools/lib64gfx.h	Sun Jul 01 06:18:55 2018 +0300
+++ b/tools/lib64gfx.h	Sun Jul 01 07:00:38 2018 +0300
@@ -184,8 +184,8 @@
     size_t size;     // Size of data (0 for "default")
     size_t offs2;    // Offset in data-block
 
-    BOOL   (*decFunction)(DMC64Image *img, const struct _DMC64EncDecOp *op, const DMGrowBuf *buf, const DMC64ImageFormat *fmt);
-    BOOL   (*encFunction)(const struct _DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt);
+    BOOL   (*decFunction)(DMC64Image *img, const struct _DMC64EncDecOp *op, const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt);
+    BOOL   (*encFunction)(const struct _DMC64EncDecOp *op, DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageCommonFormat *fmt);
 } DMC64EncDecOp;