diff lib64gfx.c @ 516:6f141f760c54

Constify.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Nov 2012 17:24:08 +0200
parents a896c1153e4e
children e2a76bb59888
line wrap: on
line diff
--- a/lib64gfx.c	Mon Nov 19 16:58:22 2012 +0200
+++ b/lib64gfx.c	Mon Nov 19 17:24:08 2012 +0200
@@ -272,7 +272,7 @@
 }
 
 
-DMC64ImageFormat dmC64ImageFormats[] =
+const DMC64ImageFormat dmC64ImageFormats[] =
 {
     {
         DM_C64IFMT_MC, ".drp", "DrazPaint 2.0 (packed)", 0x5800, -1,
@@ -377,13 +377,13 @@
 const int ndmC64ImageFormats = sizeof(dmC64ImageFormats) / sizeof(dmC64ImageFormats[0]);
 
 
-int dmC64ProbeGeneric(const Uint8 *buf, const size_t len, DMC64ImageFormat **pfmt)
+int dmC64ProbeGeneric(const Uint8 *buf, const size_t len, const DMC64ImageFormat **pfmt)
 {
     int i, scoreMax = DM_PROBE_SCORE_FALSE, scoreIndex = -1;
 
     for (i = 0; i < ndmC64ImageFormats; i++)
     {
-        DMC64ImageFormat *fmt = &dmC64ImageFormats[i];
+        const DMC64ImageFormat *fmt = &dmC64ImageFormats[i];
         int score = DM_PROBE_SCORE_FALSE;
         if (fmt->probe == NULL && fmt->size > 0 && fmt->addr > 0)
         {
@@ -710,7 +710,7 @@
 
 int dmC64DecodeBMP(DMC64Image *img, const Uint8 *buf, const size_t len,
     const size_t probeOffs, const size_t loadOffs,
-    DMC64ImageFormat **fmt, DMC64ImageFormat *forced)
+    const DMC64ImageFormat **fmt, const DMC64ImageFormat *forced)
 {
     // Check for forced format
     if (forced != NULL)