Nut/OS  4.10.3
API Reference
lzio.h File Reference
#include <lua/lua.h>
#include <lua/lmem.h>
Include dependency graph for lzio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Mbuffer
struct  Zio


#define EOZ   (-1)
#define char2int(c)   cast(int, cast(unsigned char, (c)))
#define zgetc(z)   (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z))
#define luaZ_initbuffer(L, buff)   ((buff)->buffer = NULL, (buff)->buffsize = 0)
#define luaZ_buffer(buff)   ((buff)->buffer)
#define luaZ_sizebuffer(buff)   ((buff)->buffsize)
#define luaZ_bufflen(buff)   ((buff)->n)
#define luaZ_resetbuffer(buff)   ((buff)->n = 0)
#define luaZ_resizebuffer(L, buff, size)
#define luaZ_freebuffer(L, buff)   luaZ_resizebuffer(L, buff, 0)


typedef struct Zio ZIO
typedef struct Mbuffer Mbuffer


LUAI_FUNC char * luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n)
LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data)
LUAI_FUNC size_t luaZ_read (ZIO *z, void *b, size_t n)
LUAI_FUNC int luaZ_lookahead (ZIO *z)
LUAI_FUNC int luaZ_fill (ZIO *z)

Define Documentation

#define EOZ   (-1)

Definition at line 16 of file lzio.h.

#define char2int (   c)    cast(int, cast(unsigned char, (c)))

Definition at line 20 of file lzio.h.

#define zgetc (   z)    (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z))

Definition at line 22 of file lzio.h.

#define luaZ_initbuffer (   L,
)    ((buff)->buffer = NULL, (buff)->buffsize = 0)

Definition at line 30 of file lzio.h.

#define luaZ_buffer (   buff)    ((buff)->buffer)

Definition at line 32 of file lzio.h.

#define luaZ_sizebuffer (   buff)    ((buff)->buffsize)

Definition at line 33 of file lzio.h.

#define luaZ_bufflen (   buff)    ((buff)->n)

Definition at line 34 of file lzio.h.

#define luaZ_resetbuffer (   buff)    ((buff)->n = 0)

Definition at line 36 of file lzio.h.

#define luaZ_resizebuffer (   L,
(luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \
        (buff)->buffsize = size)

Definition at line 39 of file lzio.h.

#define luaZ_freebuffer (   L,
)    luaZ_resizebuffer(L, buff, 0)

Definition at line 43 of file lzio.h.

Typedef Documentation

typedef struct Zio ZIO

Definition at line 18 of file lzio.h.

typedef struct Mbuffer Mbuffer

Function Documentation

LUAI_FUNC char* luaZ_openspace ( lua_State L,
Mbuffer buff,
size_t  n 
LUAI_FUNC void luaZ_init ( lua_State L,
ZIO z,
lua_Reader  reader,
void *  data 
LUAI_FUNC size_t luaZ_read ( ZIO z,
void *  b,
size_t  n 
LUAI_FUNC int luaZ_lookahead ( ZIO z)
LUAI_FUNC int luaZ_fill ( ZIO z)