diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-03-21 09:16:59 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-03-21 09:16:59 +0000 |
commit | 388463b9fa865c3b2311508c41647b0f3c532031 (patch) | |
tree | 1cdfbf5552d0783ecbcc52017e49567e5042af33 /Build/source/texk/web2c/luatexdir/luazlib | |
parent | abd0b00a4e8c1ac6f5b20c7474d70ef579129991 (diff) |
Import MetaPost 1.800 and LuaTeX beta-0.75.0 from LuaTeX repository r4604
git-svn-id: svn://tug.org/texlive/trunk@29453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luazlib')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazlib/lgzip.c | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazlib/lzlib.c | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luazlib/lgzip.c b/Build/source/texk/web2c/luatexdir/luazlib/lgzip.c index 603b0f71877..db9ede71940 100644 --- a/Build/source/texk/web2c/luatexdir/luazlib/lgzip.c +++ b/Build/source/texk/web2c/luatexdir/luazlib/lgzip.c @@ -187,7 +187,7 @@ static int read_line (lua_State *L, gzFile f) { char *p = luaL_prepbuffer(&b); if (gzgets(f, p, LUAL_BUFFERSIZE) == NULL) { /* eof? */ luaL_pushresult(&b); /* close buffer */ - return (lua_strlen(L, -1) > 0); /* check whether read something */ + return (lua_rawlen(L, -1) > 0); /* check whether read something */ } l = strlen(p); if (p[l-1] != '\n') @@ -215,7 +215,7 @@ static int read_chars (lua_State *L, gzFile f, size_t n) { n -= nr; /* still have to read `n' chars */ } while (n > 0 && nr == rlen); /* until end of count or eof */ luaL_pushresult(&b); /* close buffer */ - return (n == 0 || lua_strlen(L, -1) > 0); + return (n == 0 || lua_rawlen(L, -1) > 0); } @@ -329,7 +329,7 @@ static int f_flush (lua_State *L) { } -static const luaL_reg iolib[] = { +static const luaL_Reg iolib[] = { {"lines", io_lines}, {"close", io_close}, {"open", io_open}, @@ -337,7 +337,7 @@ static const luaL_reg iolib[] = { }; -static const luaL_reg flib[] = { +static const luaL_Reg flib[] = { {"flush", f_flush}, {"read", f_read}, {"lines", f_lines}, diff --git a/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c b/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c index 69558e31d96..263c6ba611d 100644 --- a/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c +++ b/Build/source/texk/web2c/luatexdir/luazlib/lzlib.c @@ -196,7 +196,7 @@ static int lzstream_decompress(lua_State *L) { z_stream *s = lzstream_check(L, 1, LZINFLATE); s->next_in = (Bytef*)luaL_checkstring(L, 2); - s->avail_in = lua_strlen(L, 2); + s->avail_in = lua_rawlen(L, 2); { int r; @@ -232,7 +232,7 @@ static int lzstream_compress(lua_State *L) { z_stream *s = lzstream_check(L, 1, LZDEFLATE); s->next_in = (Bytef*)luaL_checkstring(L, 2); - s->avail_in = lua_strlen(L, 2); + s->avail_in = lua_rawlen(L, 2); { int r; @@ -347,7 +347,7 @@ static int lzlib_adler32(lua_State *L) /* update adler32 checksum */ int adler = luaL_checkint(L, 1); const char* buf = luaL_checkstring(L, 2); - int len = lua_strlen(L, 2); + int len = lua_rawlen(L, 2); lua_pushnumber(L, adler32(adler, (const Bytef*)buf, len)); } @@ -367,7 +367,7 @@ static int lzlib_crc32(lua_State *L) /* update crc32 checksum */ int crc = luaL_checkint(L, 1); const char* buf = luaL_checkstring(L, 2); - int len = lua_strlen(L, 2); + int len = lua_rawlen(L, 2); lua_pushnumber(L, crc32(crc, (const Bytef*)buf, len)); } @@ -380,7 +380,7 @@ static int lzlib_crc32(lua_State *L) static int lzlib_compress(lua_State *L) { const char *next_in = luaL_checkstring(L, 1); - int avail_in = lua_strlen(L, 1); + int avail_in = lua_rawlen(L, 1); int level = luaL_optint(L, 2, Z_DEFAULT_COMPRESSION); int method = luaL_optint(L, 3, Z_DEFLATED); int windowBits = luaL_optint(L, 4, 15); @@ -445,7 +445,7 @@ static int lzlib_compress(lua_State *L) static int lzlib_decompress(lua_State *L) { const char *next_in = luaL_checkstring(L, 1); - int avail_in = lua_strlen(L, 1); + int avail_in = lua_rawlen(L, 1); int windowBits = luaL_optint(L, 2, 15); int ret; @@ -516,7 +516,7 @@ static int lzlib_decompress(lua_State *L) LUALIB_API int luaopen_zlib(lua_State *L) { - const luaL_reg zstreamm[] = + const luaL_Reg zstreamm[] = { {"reset", lzstream_reset }, @@ -532,7 +532,7 @@ LUALIB_API int luaopen_zlib(lua_State *L) {NULL, NULL} }; - const luaL_reg zlib[] = + const luaL_Reg zlib[] = { {"version", lzlib_version }, {"adler32", lzlib_adler32 }, |