diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-11-21 17:00:46 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-11-21 17:00:46 -0200 |
commit | accd7bc25355be4350db6d117515c672121a67f2 (patch) | |
tree | e351b89ca86b67a3c60874c230626a13517524b8 /lzio.h | |
parent | 6153200bc25bd99f9d3d25d7caa486b03b6535d5 (diff) | |
download | lua-accd7bc25355be4350db6d117515c672121a67f2.tar.gz lua-accd7bc25355be4350db6d117515c672121a67f2.tar.bz2 lua-accd7bc25355be4350db6d117515c672121a67f2.zip |
small modifications (format, small optimizations, etc)
Diffstat (limited to 'lzio.h')
-rw-r--r-- | lzio.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: $ | 2 | ** $Id: lzio.h,v 1.1 1997/09/16 19:25:59 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 | */ |
@@ -22,11 +22,11 @@ | |||
22 | 22 | ||
23 | typedef struct zio ZIO; | 23 | typedef struct zio ZIO; |
24 | 24 | ||
25 | ZIO* zFopen(ZIO* z, FILE* f); /* open FILEs */ | 25 | ZIO* zFopen (ZIO* z, FILE* f); /* open FILEs */ |
26 | ZIO* zsopen(ZIO* z, char* s); /* string */ | 26 | ZIO* zsopen (ZIO* z, char* s); /* string */ |
27 | ZIO* zmopen(ZIO* z, char* b, int size); /* memory */ | 27 | ZIO* zmopen (ZIO* z, char* b, int size); /* memory */ |
28 | 28 | ||
29 | int zread(ZIO* z, void* b, int n); /* read next n bytes */ | 29 | int zread (ZIO* z, void* b, int n); /* read next n bytes */ |
30 | 30 | ||
31 | #define zgetc(z) (--(z)->n>=0 ? ((int)*(z)->p++): (z)->filbuf(z)) | 31 | #define zgetc(z) (--(z)->n>=0 ? ((int)*(z)->p++): (z)->filbuf(z)) |
32 | #define zungetc(z) (++(z)->n,--(z)->p) | 32 | #define zungetc(z) (++(z)->n,--(z)->p) |