lzio.h File Reference

Go to the source code of this file.

Classes

struct  Mbuffer
struct  Zio

Defines

#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)

Typedefs

typedef struct Zio ZIO

Functions

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 char2int (  )     cast(int, cast(unsigned char, (c)))

Definition at line 20 of file lzio.h.

Referenced by luaZ_fill(), and luaZ_lookahead().

#define EOZ   (-1)

Definition at line 16 of file lzio.h.

Referenced by llex(), luaZ_fill(), luaZ_lookahead(), luaZ_read(), read_long_string(), and read_string().

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

Definition at line 34 of file lzio.h.

Referenced by buffreplace(), llex(), read_long_string(), and read_string().

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

Definition at line 43 of file lzio.h.

Referenced by close_state(), and luaD_protectedparser().

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

Definition at line 30 of file lzio.h.

Referenced by lua_newstate(), and luaD_protectedparser().

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

Definition at line 36 of file lzio.h.

Referenced by llex(), and read_long_string().

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

Definition at line 39 of file lzio.h.

Referenced by checkSizes(), luaX_setinput(), luaZ_openspace(), and save().

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

Definition at line 33 of file lzio.h.

Referenced by checkSizes().

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

Definition at line 22 of file lzio.h.


Typedef Documentation

typedef struct Zio ZIO

Definition at line 18 of file lzio.h.


Function Documentation

LUAI_FUNC int luaZ_fill ( ZIO z  ) 

Definition at line 21 of file lzio.c.

References char2int, Zio::data, EOZ, Zio::L, lua_lock, lua_unlock, Zio::n, Zio::p, and Zio::reader.

Referenced by luaZ_lookahead().

LUAI_FUNC void luaZ_init ( lua_State L,
ZIO z,
lua_Reader  reader,
void *  data 
)

Definition at line 48 of file lzio.c.

References Zio::data, Zio::L, Zio::n, Zio::p, and Zio::reader.

Referenced by lua_load().

LUAI_FUNC int luaZ_lookahead ( ZIO z  ) 

Definition at line 35 of file lzio.c.

References char2int, EOZ, luaZ_fill(), Zio::n, and Zio::p.

Referenced by f_parser(), and luaZ_read().

LUAI_FUNC char* luaZ_openspace ( lua_State L,
Mbuffer buff,
size_t  n 
)

Definition at line 74 of file lzio.c.

References Mbuffer::buffer, Mbuffer::buffsize, LUA_MINBUFFER, and luaZ_resizebuffer.

Referenced by LoadString(), and luaV_concat().

LUAI_FUNC size_t luaZ_read ( ZIO z,
void *  b,
size_t  n 
)

Definition at line 58 of file lzio.c.

References EOZ, luaZ_lookahead(), Zio::n, and Zio::p.

Referenced by LoadBlock().


ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:00 2011 by Doxygen 1.6.1