aboutsummaryrefslogtreecommitdiff
path: root/lzio.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-02-08 14:39:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-02-08 14:39:42 -0200
commit74f1c3d025c6d8a714454470a953f383a1c6a641 (patch)
treecc89dfa109c64ed928217d777959ffc7ace12501 /lzio.c
parent1f691a4fcd32b706c79e4c8cbff17c6ae985bc34 (diff)
downloadlua-74f1c3d025c6d8a714454470a953f383a1c6a641.tar.gz
lua-74f1c3d025c6d8a714454470a953f383a1c6a641.tar.bz2
lua-74f1c3d025c6d8a714454470a953f383a1c6a641.zip
small changes for "clean C"
Diffstat (limited to 'lzio.c')
-rw-r--r--lzio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lzio.c b/lzio.c
index 1216ef91..48269ca7 100644
--- a/lzio.c
+++ b/lzio.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lzio.c,v 1.8 1999/08/16 20:52:00 roberto Exp roberto $ 2** $Id: lzio.c,v 1.9 1999/11/09 17:59:35 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*/
@@ -35,7 +35,7 @@ ZIO* zmopen (ZIO* z, const char* b, int size, const char *name) {
35 35
36ZIO* zsopen (ZIO* z, const char* s, const char *name) { 36ZIO* zsopen (ZIO* z, const char* s, const char *name) {
37 if (s==NULL) return NULL; 37 if (s==NULL) return NULL;
38 return zmopen(z,s,strlen(s),name); 38 return zmopen(z, s, strlen(s), name);
39} 39}
40 40
41/* -------------------------------------------------------------- FILEs --- */ 41/* -------------------------------------------------------------- FILEs --- */
@@ -43,7 +43,7 @@ ZIO* zsopen (ZIO* z, const char* s, const char *name) {
43static int zffilbuf (ZIO* z) { 43static int zffilbuf (ZIO* z) {
44 int n; 44 int n;
45 if (feof((FILE *)z->u)) return EOZ; 45 if (feof((FILE *)z->u)) return EOZ;
46 n = fread(z->buffer,1,ZBSIZE,z->u); 46 n = fread(z->buffer, 1, ZBSIZE, (FILE *)z->u);
47 if (n==0) return EOZ; 47 if (n==0) return EOZ;
48 z->n = n-1; 48 z->n = n-1;
49 z->p = z->buffer; 49 z->p = z->buffer;