diff tools/lib64fmts.c @ 1711:4fd94bf558b3

Add function name field to DMCompParams struct and set it in places where we use DMCompParams.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 06 Jun 2018 14:28:19 +0300
parents a0986cfd6f9d
children 1f4ed247763d
line wrap: on
line diff
--- 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;