diff options
Diffstat (limited to 'lzio.h')
-rw-r--r-- | lzio.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.h,v 1.3 1997/12/22 20:57:18 roberto Exp roberto $ | 2 | ** $Id: lzio.h,v 1.4 1998/01/09 14:57:43 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,9 +22,9 @@ | |||
22 | 22 | ||
23 | typedef struct zio ZIO; | 23 | typedef struct zio ZIO; |
24 | 24 | ||
25 | ZIO* zFopen (ZIO* z, FILE* f, char *name); /* open FILEs */ | 25 | ZIO* zFopen (ZIO* z, FILE* f, const char *name); /* open FILEs */ |
26 | ZIO* zsopen (ZIO* z, char* s, char *name); /* string */ | 26 | ZIO* zsopen (ZIO* z, const char* s, const char *name); /* string */ |
27 | ZIO* zmopen (ZIO* z, char* b, int size, char *name); /* memory */ | 27 | ZIO* zmopen (ZIO* z, const char* b, int size, const char *name); /* 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 | ||
@@ -38,12 +38,12 @@ int zread (ZIO* z, void* b, int n); /* read next n bytes */ | |||
38 | #define ZBSIZE 256 /* buffer size */ | 38 | #define ZBSIZE 256 /* buffer size */ |
39 | 39 | ||
40 | struct zio { | 40 | struct zio { |
41 | int n; /* bytes still unread */ | 41 | int n; /* bytes still unread */ |
42 | unsigned char* p; /* current position in buffer */ | 42 | const unsigned char* p; /* current position in buffer */ |
43 | int (*filbuf)(ZIO* z); | 43 | int (*filbuf)(ZIO* z); |
44 | void* u; /* additional data */ | 44 | void* u; /* additional data */ |
45 | char *name; | 45 | const char *name; |
46 | unsigned char buffer[ZBSIZE]; /* buffer */ | 46 | unsigned char buffer[ZBSIZE]; /* buffer */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | 49 | ||