summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lzio.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lzio.h')
-rw-r--r--apps/plugins/lua/lzio.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/plugins/lua/lzio.h b/apps/plugins/lua/lzio.h
index 9aa9e4b537..441f7479cb 100644
--- a/apps/plugins/lua/lzio.h
+++ b/apps/plugins/lua/lzio.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id$ 2** $Id: lzio.h,v 1.26.1.1 2013/04/12 18:48:47 roberto Exp $
3** Buffered streams 3** Buffered streams
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -17,9 +17,8 @@
17 17
18typedef struct Zio ZIO; 18typedef struct Zio ZIO;
19 19
20#define char2int(c) cast(int, cast(unsigned char, (c))) 20#define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z))
21 21
22#define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z))
23 22
24typedef struct Mbuffer { 23typedef struct Mbuffer {
25 char *buffer; 24 char *buffer;
@@ -47,7 +46,6 @@ LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n);
47LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 46LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader,
48 void *data); 47 void *data);
49LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 48LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */
50LUAI_FUNC int luaZ_lookahead (ZIO *z);
51 49
52 50
53 51
@@ -56,7 +54,7 @@ LUAI_FUNC int luaZ_lookahead (ZIO *z);
56struct Zio { 54struct Zio {
57 size_t n; /* bytes still unread */ 55 size_t n; /* bytes still unread */
58 const char *p; /* current position in buffer */ 56 const char *p; /* current position in buffer */
59 lua_Reader reader; 57 lua_Reader reader; /* reader function */
60 void* data; /* additional data */ 58 void* data; /* additional data */
61 lua_State *L; /* Lua state (for reader) */ 59 lua_State *L; /* Lua state (for reader) */
62}; 60};