changeset 965:df8d2ad98f7d

Rename a function argument.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 27 Feb 2015 05:22:20 +0200
parents 76ac0d5c89b3
children c91befdb668b
files src/dmzlib.c
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmzlib.c	Fri Feb 27 05:21:29 2015 +0200
+++ b/src/dmzlib.c	Fri Feb 27 05:22:20 2015 +0200
@@ -420,27 +420,27 @@
 }
 
 
-static int dmZLibParseUncompresedBlock(DMZLibContext * a)
+static int dmZLibParseUncompresedBlock(DMZLibContext * ctx)
 {
     Uint8 header[4];
     int len, nlen, k;
 
-    if (a->numBits & 7)
-        dmZReceive(a, a->numBits & 7);     // discard
+    if (ctx->numBits & 7)
+        dmZReceive(ctx, ctx->numBits & 7);     // discard
 
     // drain the bit-packed data into header
     k = 0;
-    while (a->numBits > 0)
+    while (ctx->numBits > 0)
     {
-        header[k++] = (Uint8) (a->codeBuffer & 255);   // suppress MSVC run-time check
-        a->codeBuffer >>= 8;
-        a->numBits -= 8;
+        header[k++] = (Uint8) (ctx->codeBuffer & 255);   // suppress MSVC run-time check
+        ctx->codeBuffer >>= 8;
+        ctx->numBits -= 8;
     }
-    DMSTBI_ASSERT(a->numBits == 0);
+    DMSTBI_ASSERT(ctx->numBits == 0);
 
     // now fill header the normal way
     while (k < 4)
-        header[k++] = dmZGet8(a);
+        header[k++] = dmZGet8(ctx);
 
     len  = (header[1] << 8) | header[0];
     nlen = (header[3] << 8) | header[2];
@@ -451,21 +451,21 @@
             "Compressed data corrupt.\n");
     }
 
-    if (a->zbuffer + len > a->zbufferEnd)
+    if (ctx->zbuffer + len > ctx->zbufferEnd)
     {
         return dmError(DMERR_BOUNDS,
             "Read past buffer, probably corrupt compressed data.\n");
     }
 
-    if (a->zout + len > a->zoutEnd && !stbi__zexpand(a, a->zout, len))
+    if (ctx->zout + len > ctx->zoutEnd && !stbi__zexpand(ctx, ctx->zout, len))
     {
         return dmError(DMERR_DATA_ERROR,
             "XXXX TODO");
     }
 
-    memcpy(a->zout, a->zbuffer, len);
-    a->zbuffer += len;
-    a->zout    += len;
+    memcpy(ctx->zout, ctx->zbuffer, len);
+    ctx->zbuffer += len;
+    ctx->zout    += len;
 
     return DMERR_OK;
 }