summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luazlib
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2009-03-27 15:30:55 +0000
committerTaco Hoekwater <taco@elvenkind.com>2009-03-27 15:30:55 +0000
commit178de0871d690556af74f3768c11bc812b07f347 (patch)
treea939c31adc90d6207848effaec87dd78ec00e658 /Build/source/texk/web2c/luatexdir/luazlib
parent4865b23b5199697829e4e6633f2f697b4634c462 (diff)
Import of luatex 0.37.0 (autoreconf has not been run yet!)
git-svn-id: svn://tug.org/texlive/trunk@12529 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luazlib')
-rw-r--r--Build/source/texk/web2c/luatexdir/luazlib/lzlib.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c b/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c
index 74c9dd21a64..69558e31d96 100644
--- a/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c
+++ b/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c
@@ -195,7 +195,7 @@ static int lzlib_inflate(lua_State *L)
static int lzstream_decompress(lua_State *L)
{
z_stream *s = lzstream_check(L, 1, LZINFLATE);
- s->next_in = (char*)luaL_checkstring(L, 2);
+ s->next_in = (Bytef*)luaL_checkstring(L, 2);
s->avail_in = lua_strlen(L, 2);
{
@@ -204,7 +204,7 @@ static int lzstream_decompress(lua_State *L)
luaL_buffinit(L, &b);
do {
- s->next_out = luaL_prepbuffer(&b);
+ s->next_out = (Bytef*)luaL_prepbuffer(&b);
s->avail_out = LUAL_BUFFERSIZE;
/* munch some more */
@@ -231,7 +231,7 @@ static int lzstream_decompress(lua_State *L)
static int lzstream_compress(lua_State *L)
{
z_stream *s = lzstream_check(L, 1, LZDEFLATE);
- s->next_in = (char*)luaL_checkstring(L, 2);
+ s->next_in = (Bytef*)luaL_checkstring(L, 2);
s->avail_in = lua_strlen(L, 2);
{
@@ -240,7 +240,7 @@ static int lzstream_compress(lua_State *L)
luaL_buffinit(L, &b);
do {
- s->next_out = luaL_prepbuffer(&b);
+ s->next_out = (Bytef*)luaL_prepbuffer(&b);
s->avail_out = LUAL_BUFFERSIZE;
/* bake some more */
@@ -273,7 +273,7 @@ static int lzstream_flush(lua_State *L)
return 1;
}
- s->next_in = "";
+ s->next_in = (Bytef*)"";
s->avail_in = 0;
{
@@ -282,7 +282,7 @@ static int lzstream_flush(lua_State *L)
luaL_buffinit(L, &b);
do {
- s->next_out = luaL_prepbuffer(&b);
+ s->next_out = (Bytef*)luaL_prepbuffer(&b);
s->avail_out = LUAL_BUFFERSIZE;
r = deflate(s, Z_FINISH);
@@ -349,7 +349,7 @@ static int lzlib_adler32(lua_State *L)
const char* buf = luaL_checkstring(L, 2);
int len = lua_strlen(L, 2);
- lua_pushnumber(L, adler32(adler, buf, len));
+ lua_pushnumber(L, adler32(adler, (const Bytef*)buf, len));
}
return 1;
}
@@ -369,7 +369,7 @@ static int lzlib_crc32(lua_State *L)
const char* buf = luaL_checkstring(L, 2);
int len = lua_strlen(L, 2);
- lua_pushnumber(L, crc32(crc, buf, len));
+ lua_pushnumber(L, crc32(crc, (const Bytef*)buf, len));
}
return 1;
}
@@ -409,12 +409,12 @@ static int lzlib_compress(lua_State *L)
return 2;
}
- zs.next_in = (char*)next_in;
+ zs.next_in = (Bytef*)next_in;
zs.avail_in = avail_in;
for(;;)
{
- zs.next_out = luaL_prepbuffer(&b);
+ zs.next_out = (Bytef*)luaL_prepbuffer(&b);
zs.avail_out = LUAL_BUFFERSIZE;
/* munch some more */
@@ -453,6 +453,7 @@ static int lzlib_decompress(lua_State *L)
luaL_Buffer b;
luaL_buffinit(L, &b);
+
zs.zalloc = Z_NULL;
zs.zfree = Z_NULL;
@@ -470,12 +471,12 @@ static int lzlib_decompress(lua_State *L)
return 2;
}
- zs.next_in = (char*)next_in;
+ zs.next_in = (Bytef*)next_in;
zs.avail_in = avail_in;
for(;;)
{
- zs.next_out = luaL_prepbuffer(&b);
+ zs.next_out = (Bytef*)luaL_prepbuffer(&b);
zs.avail_out = LUAL_BUFFERSIZE;
/* bake some more */