summaryrefslogtreecommitdiff
path: root/lzio.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-22 18:57:18 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-22 18:57:18 -0200
commit03f3f9e707ceaf46efb4917f8d32ea62283b9358 (patch)
treecdf8e8d255fc95e09b94521dff35cd4f0f57d1e6 /lzio.h
parenta78eecee48c725549316629b9a8d936c990b65de (diff)
downloadlua-github-03f3f9e707ceaf46efb4917f8d32ea62283b9358.tar.gz
"zio" now keeps its "name".
Diffstat (limited to 'lzio.h')
-rw-r--r--lzio.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/lzio.h b/lzio.h
index 4de21020..54354a8a 100644
--- a/lzio.h
+++ b/lzio.h
@@ -1,5 +1,5 @@
/*
-** $Id: lzio.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
+** $Id: lzio.h,v 1.2 1997/11/21 19:00:46 roberto Exp roberto $
** Buffered streams
** See Copyright Notice in lua.h
*/
@@ -22,15 +22,15 @@
typedef struct zio ZIO;
-ZIO* zFopen (ZIO* z, FILE* f); /* open FILEs */
-ZIO* zsopen (ZIO* z, char* s); /* string */
-ZIO* zmopen (ZIO* z, char* b, int size); /* memory */
+ZIO* zFopen (ZIO* z, FILE* f, char *name); /* open FILEs */
+ZIO* zsopen (ZIO* z, char* s, char *name); /* string */
+ZIO* zmopen (ZIO* z, char* b, int size, char *name); /* memory */
int zread (ZIO* z, void* b, int n); /* read next n bytes */
#define zgetc(z) (--(z)->n>=0 ? ((int)*(z)->p++): (z)->filbuf(z))
#define zungetc(z) (++(z)->n,--(z)->p)
-
+#define zname(z) ((z)->name)
/* --------- Private Part ------------------ */
@@ -43,6 +43,7 @@ struct zio {
int (*filbuf)(ZIO* z);
void* u; /* additional data */
unsigned char buffer[ZBSIZE]; /* buffer */
+ char *name;
};