aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lundump.c4
-rw-r--r--lzio.c4
-rw-r--r--lzio.h7
3 files changed, 6 insertions, 9 deletions
diff --git a/lundump.c b/lundump.c
index 7ea55ea4..b1dd78ab 100644
--- a/lundump.c
+++ b/lundump.c
@@ -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
42static void ezread (lua_State* L, ZIO* Z, void* b, int n) 42static 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
diff --git a/lzio.c b/lzio.c
index b693f636..c2649eb2 100644
--- a/lzio.c
+++ b/lzio.c
@@ -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 --- */
48size_t luaZ_zread (ZIO *z, void *b, size_t n) { 48size_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) {
diff --git a/lzio.h b/lzio.h
index a0dfa091..e7807ec3 100644
--- a/lzio.h
+++ b/lzio.h
@@ -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
19typedef struct zio ZIO; 16typedef 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
27void luaZ_init (ZIO *z, lua_Chunkreader reader, void *data, const char *name); 24void luaZ_init (ZIO *z, lua_Chunkreader reader, void *data, const char *name);
28size_t luaZ_zread (ZIO* z, void* b, size_t n); /* read next n bytes */ 25size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */
29int luaZ_lookahead (ZIO *z); 26int luaZ_lookahead (ZIO *z);
30 27
31 28