summaryrefslogtreecommitdiff
path: root/src/extern/stb_image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/extern/stb_image.h')
-rw-r--r--src/extern/stb_image.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/extern/stb_image.h b/src/extern/stb_image.h
index 4df317a..37c4bf7 100644
--- a/src/extern/stb_image.h
+++ b/src/extern/stb_image.h
@@ -3823,7 +3823,7 @@ static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizelist, int
typedef struct
{
- stbi_uc *zbuffer, *zbuffer_end;
+ stbi_uc *depth_buffer, *depth_buffer_end;
int num_bits;
stbi__uint32 code_buffer;
@@ -3837,8 +3837,8 @@ typedef struct
stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z)
{
- if (z->zbuffer >= z->zbuffer_end) return 0;
- return *z->zbuffer++;
+ if (z->depth_buffer >= z->depth_buffer_end) return 0;
+ return *z->depth_buffer++;
}
static void stbi__fill_bits(stbi__zbuf *z)
@@ -4036,11 +4036,11 @@ static int stbi__parse_uncompressed_block(stbi__zbuf *a)
len = header[1] * 256 + header[0];
nlen = header[3] * 256 + header[2];
if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG");
- if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG");
+ if (a->depth_buffer + len > a->depth_buffer_end) return stbi__err("read past buffer","Corrupt PNG");
if (a->zout + len > a->zout_end)
if (!stbi__zexpand(a, a->zout, len)) return 0;
- memcpy(a->zout, a->zbuffer, len);
- a->zbuffer += len;
+ memcpy(a->zout, a->depth_buffer, len);
+ a->depth_buffer += len;
a->zout += len;
return 1;
}
@@ -4130,8 +4130,8 @@ STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int
stbi__zbuf a;
char *p = (char *) stbi__malloc(initial_size);
if (p == NULL) return NULL;
- a.zbuffer = (stbi_uc *) buffer;
- a.zbuffer_end = (stbi_uc *) buffer + len;
+ a.depth_buffer = (stbi_uc *) buffer;
+ a.depth_buffer_end = (stbi_uc *) buffer + len;
if (stbi__do_zlib(&a, p, initial_size, 1, 1)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
@@ -4151,8 +4151,8 @@ STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, i
stbi__zbuf a;
char *p = (char *) stbi__malloc(initial_size);
if (p == NULL) return NULL;
- a.zbuffer = (stbi_uc *) buffer;
- a.zbuffer_end = (stbi_uc *) buffer + len;
+ a.depth_buffer = (stbi_uc *) buffer;
+ a.depth_buffer_end = (stbi_uc *) buffer + len;
if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
@@ -4165,8 +4165,8 @@ STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, i
STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)
{
stbi__zbuf a;
- a.zbuffer = (stbi_uc *) ibuffer;
- a.zbuffer_end = (stbi_uc *) ibuffer + ilen;
+ a.depth_buffer = (stbi_uc *) ibuffer;
+ a.depth_buffer_end = (stbi_uc *) ibuffer + ilen;
if (stbi__do_zlib(&a, obuffer, olen, 0, 1))
return (int) (a.zout - a.zout_start);
else
@@ -4178,8 +4178,8 @@ STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int
stbi__zbuf a;
char *p = (char *) stbi__malloc(16384);
if (p == NULL) return NULL;
- a.zbuffer = (stbi_uc *) buffer;
- a.zbuffer_end = (stbi_uc *) buffer+len;
+ a.depth_buffer = (stbi_uc *) buffer;
+ a.depth_buffer_end = (stbi_uc *) buffer+len;
if (stbi__do_zlib(&a, p, 16384, 1, 0)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
@@ -4192,8 +4192,8 @@ STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int
STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)
{
stbi__zbuf a;
- a.zbuffer = (stbi_uc *) ibuffer;
- a.zbuffer_end = (stbi_uc *) ibuffer + ilen;
+ a.depth_buffer = (stbi_uc *) ibuffer;
+ a.depth_buffer_end = (stbi_uc *) ibuffer + ilen;
if (stbi__do_zlib(&a, obuffer, olen, 0, 0))
return (int) (a.zout - a.zout_start);
else