# HG changeset patch # User Matti Hamalainen # Date 1528284499 -10800 # Node ID 4fd94bf558b3ce1380cfed421b86fa604924d290 # Parent 1f0fac3af8e3fbf41f5bca49288bc4767ac2108e Add function name field to DMCompParams struct and set it in places where we use DMCompParams. diff -r 1f0fac3af8e3 -r 4fd94bf558b3 tools/lib64fmts.c --- a/tools/lib64fmts.c Wed Jun 06 14:26:49 2018 +0300 +++ b/tools/lib64fmts.c Wed Jun 06 14:28:19 2018 +0300 @@ -53,6 +53,7 @@ cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_2; cfg.rleMarkerB = 0xfe; + cfg.func = fmt->name; if ((res = dmDecodeGenericRLEAlloc(&mem, buf, &cfg)) != DMERR_OK) goto out; @@ -76,6 +77,7 @@ goto out; // And now RLE compress the data to the existing buffer + cfg.func = fmt->name; cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_2; cfg.rleMarkerB = 0xfe; @@ -114,6 +116,7 @@ cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMarkerB = buf->data[0x0d]; + cfg.func = fmt->name; if ((res = dmDecodeGenericRLEAlloc(&mem, dmGrowBufCreateFromOffs(&tmp, buf, 0x0e), &cfg)) != DMERR_OK) @@ -139,6 +142,7 @@ goto out; // Analyze and setup RLE + cfg.func = fmt->name; cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMinCountB = 3; @@ -215,6 +219,7 @@ cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_WORD_RUNS | DM_RLE_ORDER_1; cfg.rleMarkerB = buf->data[8]; cfg.rleMarkerW = buf->data[9]; + cfg.func = fmt->name; if ((res = dmDecodeGenericRLEAlloc(&mem, dmGrowBufCreateFromOffs(&tmp, buf, 10), &cfg)) != DMERR_OK) @@ -239,6 +244,7 @@ goto out; // Analyze and setup RLE + cfg.func = fmt->name; cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_WORD_RUNS | DM_RLE_ORDER_1; cfg.rleMinCountB = 3; @@ -321,6 +327,7 @@ cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMarkerB = 0xC2; + cfg.func = fmt->name; if ((res = dmDecodeGenericRLEAlloc(&mem, &tmp, &cfg)) != DMERR_OK) goto out; @@ -346,6 +353,7 @@ goto out; // And now RLE compress the data to the existing buffer + cfg.func = fmt->name; cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMarkerB = 0xC2; @@ -596,6 +604,7 @@ cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMarkerB = buf->data[15]; + cfg.func = fmt->name; if ((res = dmDecodeGenericRLEAlloc( &mem, dmGrowBufCreateFromOffs(&tmp, buf, FUNPAINT2_HEADER_SIZE), &cfg)) == DMERR_OK) @@ -634,6 +643,7 @@ goto out; // Analyze and setup RLE + cfg.func = fmt->name; cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMinCountB = 3; diff -r 1f0fac3af8e3 -r 4fd94bf558b3 tools/lib64gfx.h --- a/tools/lib64gfx.h Wed Jun 06 14:26:49 2018 +0300 +++ b/tools/lib64gfx.h Wed Jun 06 14:28:19 2018 +0300 @@ -237,6 +237,7 @@ typedef struct { + char *func; int type; int flags; Uint8