changeset 1060:5006cfe66250

Rename constants.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 02 Mar 2015 00:02:05 +0200
parents df35244490e8
children 43905dacb365
files src/dmzlib.c src/dmzlib.h
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmzlib.c	Mon Mar 02 00:01:14 2015 +0200
+++ b/src/dmzlib.c	Mon Mar 02 00:02:05 2015 +0200
@@ -137,10 +137,10 @@
             Uint16 fastv = (Uint16) ((s << 9) | i);
             ctx->size[c] = (Uint8) s;
             ctx->value[c] = (Uint16) i;
-            if (s <= STBI__ZFAST_BITS)
+            if (s <= DM_ZLIB_HFAST_BITS)
             {
-                int k = dmBitReverseN(next_code[s], s);
-                while (k < STBI__ZFAST_SIZE)
+                int k = dmBitReverseN(nextCode[s], s);
+                while (k < DM_ZLIB_HFAST_SIZE)
                 {
                     ctx->fast[k] = fastv;
                     k += (1 << s);
@@ -198,7 +198,7 @@
     // not resolved by fast table, so compute it the slow way
     // use jpeg approach, which requires MSbits at top
     k = dmBitReverse16(ctx->codeBuffer);
-    for (s = STBI__ZFAST_BITS + 1; ; s++)
+    for (s = DM_ZLIB_HFAST_BITS + 1; ; s++)
     {
         if (k < huff->maxCode[s])
             break;
@@ -228,7 +228,7 @@
     if (ctx->numBits < 16)
         dmZFillBits(ctx);
 
-    b = huff->fast[ctx->codeBuffer & STBI__ZFAST_MASK];
+    b = huff->fast[ctx->codeBuffer & DM_ZLIB_HFAST_MASK];
     if (b)
     {
         int s = b >> 9;
--- a/src/dmzlib.h	Mon Mar 02 00:01:14 2015 +0200
+++ b/src/dmzlib.h	Mon Mar 02 00:02:05 2015 +0200
@@ -14,14 +14,14 @@
 #endif
 
 
-#define STBI__ZFAST_BITS  9  // accelerate all cases in default tables
-#define STBI__ZFAST_SIZE  (1 << STBI__ZFAST_BITS)
-#define STBI__ZFAST_MASK  (STBI__ZFAST_SIZE - 1)
+#define DM_ZLIB_HFAST_BITS  9  // accelerate all cases in default tables
+#define DM_ZLIB_HFAST_SIZE  (1 << DM_ZLIB_HFAST_BITS)
+#define DM_ZLIB_HFAST_MASK  (DM_ZLIB_HFAST_SIZE - 1)
 
 
 typedef struct
 {
-    Uint16  fast[STBI__ZFAST_SIZE];
+    Uint16  fast[DM_ZLIB_HFAST_SIZE];
     Uint16  firstCode[16];
     int     maxCode[17];
     Uint16  firstSymbol[16];