From ef62b340e0a6b7b18931000dcbb19c4703bfe0e8 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 24 May 2000 10:54:49 -0300 Subject: code cleaner for 16 bits. --- lzio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lzio.c') diff --git a/lzio.c b/lzio.c index 7a05dba4..cecd16a1 100644 --- a/lzio.c +++ b/lzio.c @@ -1,5 +1,5 @@ /* -** $Id: lzio.c,v 1.10 2000/02/08 16:39:42 roberto Exp roberto $ +** $Id: lzio.c,v 1.11 2000/03/03 14:58:26 roberto Exp roberto $ ** a generic input stream interface ** See Copyright Notice in lua.h */ @@ -21,7 +21,7 @@ static int zmfilbuf (ZIO* z) { } -ZIO* zmopen (ZIO* z, const char* b, int size, const char *name) { +ZIO* zmopen (ZIO* z, const char* b, size_t size, const char *name) { if (b==NULL) return NULL; z->n = size; z->p = (const unsigned char *)b; @@ -41,7 +41,7 @@ ZIO* zsopen (ZIO* z, const char* s, const char *name) { /* -------------------------------------------------------------- FILEs --- */ static int zffilbuf (ZIO* z) { - int n; + size_t n; if (feof((FILE *)z->u)) return EOZ; n = fread(z->buffer, 1, ZBSIZE, (FILE *)z->u); if (n==0) return EOZ; @@ -63,9 +63,9 @@ ZIO* zFopen (ZIO* z, FILE* f, const char *name) { /* --------------------------------------------------------------- read --- */ -int zread (ZIO *z, void *b, int n) { +size_t zread (ZIO *z, void *b, size_t n) { while (n) { - int m; + size_t m; if (z->n == 0) { if (z->filbuf(z) == EOZ) return n; /* return number of missing bytes */ -- cgit v1.2.3-55-g6feb