small modifications (format, small optimizations, etc)

This commit is contained in:
Roberto Ierusalimschy
1997-11-21 17:00:46 -02:00
parent 6153200bc2
commit accd7bc253
13 changed files with 301 additions and 295 deletions

10
lzio.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: $
** $Id: lzio.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
** Buffered streams
** See Copyright Notice in lua.h
*/
@@ -22,11 +22,11 @@
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); /* open FILEs */
ZIO* zsopen (ZIO* z, char* s); /* string */
ZIO* zmopen (ZIO* z, char* b, int size); /* memory */
int zread(ZIO* z, void* b, int n); /* read next n bytes */
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)