diff options
-rw-r--r-- | lundump.c | 4 | ||||
-rw-r--r-- | lzio.c | 4 | ||||
-rw-r--r-- | lzio.h | 7 |
3 files changed, 6 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lundump.c,v 1.41 2002/06/06 13:22:56 lhf Exp lhf $ | 2 | ** $Id: lundump.c,v 1.50 2002/06/17 13:51:01 roberto Exp roberto $ |
3 | ** load pre-compiled Lua chunks | 3 | ** load pre-compiled Lua chunks |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -41,7 +41,7 @@ static int ezgetc (lua_State* L, ZIO* Z) | |||
41 | 41 | ||
42 | static void ezread (lua_State* L, ZIO* Z, void* b, int n) | 42 | static void ezread (lua_State* L, ZIO* Z, void* b, int n) |
43 | { | 43 | { |
44 | int r=zread(Z,b,n); | 44 | int r=luaZ_read(Z,b,n); |
45 | if (r!=0) unexpectedEOZ(L,Z); | 45 | if (r!=0) unexpectedEOZ(L,Z); |
46 | } | 46 | } |
47 | 47 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.c,v 1.18 2002/06/03 20:11:07 roberto Exp roberto $ | 2 | ** $Id: lzio.c,v 1.19 2002/06/06 12:40:22 roberto Exp roberto $ |
3 | ** a generic input stream interface | 3 | ** a generic input stream interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -45,7 +45,7 @@ void luaZ_init (ZIO *z, lua_Chunkreader reader, void *data, const char *name) { | |||
45 | 45 | ||
46 | 46 | ||
47 | /* --------------------------------------------------------------- read --- */ | 47 | /* --------------------------------------------------------------- read --- */ |
48 | size_t luaZ_zread (ZIO *z, void *b, size_t n) { | 48 | size_t luaZ_read (ZIO *z, void *b, size_t n) { |
49 | while (n) { | 49 | while (n) { |
50 | size_t m; | 50 | size_t m; |
51 | if (z->n == 0) { | 51 | if (z->n == 0) { |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.h,v 1.11 2002/06/03 20:11:07 roberto Exp roberto $ | 2 | ** $Id: lzio.h,v 1.12 2002/06/06 12:40:22 roberto Exp roberto $ |
3 | ** Buffered streams | 3 | ** Buffered streams |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -11,9 +11,6 @@ | |||
11 | #include "lua.h" | 11 | #include "lua.h" |
12 | 12 | ||
13 | 13 | ||
14 | /* For Lua only */ | ||
15 | #define zread luaZ_zread | ||
16 | |||
17 | #define EOZ (-1) /* end of stream */ | 14 | #define EOZ (-1) /* end of stream */ |
18 | 15 | ||
19 | typedef struct zio ZIO; | 16 | typedef struct zio ZIO; |
@@ -25,7 +22,7 @@ typedef struct zio ZIO; | |||
25 | #define zname(z) ((z)->name) | 22 | #define zname(z) ((z)->name) |
26 | 23 | ||
27 | void luaZ_init (ZIO *z, lua_Chunkreader reader, void *data, const char *name); | 24 | void luaZ_init (ZIO *z, lua_Chunkreader reader, void *data, const char *name); |
28 | size_t luaZ_zread (ZIO* z, void* b, size_t n); /* read next n bytes */ | 25 | size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ |
29 | int luaZ_lookahead (ZIO *z); | 26 | int luaZ_lookahead (ZIO *z); |
30 | 27 | ||
31 | 28 | ||