# HG changeset patch # User Matti Hamalainen # Date 1530417638 -10800 # Node ID e7f2ddaf94a6b7293f97bb976eb3730cbaa002bb # Parent 214c7bd8692f3453841e7bde02e2d987c2d92f44 Change encode and decode function format parameter type from DMC64ImageFormat to DMC64ImageCommonFormat. diff -r 214c7bd8692f -r e7f2ddaf94a6 tools/lib64fmts.c --- 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; diff -r 214c7bd8692f -r e7f2ddaf94a6 tools/lib64gfx.c --- 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, " diff -r 214c7bd8692f -r e7f2ddaf94a6 tools/lib64gfx.h --- 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;