summaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-11-28 18:13:13 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-11-28 18:13:13 -0200
commit72659a06050632da1a9b4c492302be46ac283f6b (patch)
treebac06b4ea523ba5443564d0869e392180d4b7b77 /lauxlib.h
parentdfaf8c5291fa8aef5bedbfa375853475364ac76e (diff)
downloadlua-72659a06050632da1a9b4c492302be46ac283f6b.tar.gz
lua-72659a06050632da1a9b4c492302be46ac283f6b.tar.bz2
lua-72659a06050632da1a9b4c492302be46ac283f6b.zip
no more explicit support for wide-chars; too much troble...
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/lauxlib.h b/lauxlib.h
index 9bc51695..43405bf2 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.h,v 1.37 2001/10/26 17:33:30 roberto Exp $ 2** $Id: lauxlib.h,v 1.38 2001/10/31 19:40:14 roberto Exp $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -21,31 +21,31 @@
21 21
22 22
23typedef struct luaL_reg { 23typedef struct luaL_reg {
24 const lua_char *name; 24 const char *name;
25 lua_CFunction func; 25 lua_CFunction func;
26} luaL_reg; 26} luaL_reg;
27 27
28 28
29LUALIB_API void luaL_openlib (lua_State *L, const luaL_reg *l, int n); 29LUALIB_API void luaL_openlib (lua_State *L, const luaL_reg *l, int n);
30LUALIB_API void luaL_typerror (lua_State *L, int narg, const lua_char *tname); 30LUALIB_API void luaL_typerror (lua_State *L, int narg, const char *tname);
31LUALIB_API void luaL_argerror (lua_State *L, int numarg, 31LUALIB_API void luaL_argerror (lua_State *L, int numarg,
32 const lua_char *extramsg); 32 const char *extramsg);
33LUALIB_API const lua_char *luaL_check_lstr (lua_State *L, int numArg, 33LUALIB_API const char *luaL_check_lstr (lua_State *L, int numArg,
34 size_t *len); 34 size_t *len);
35LUALIB_API const lua_char *luaL_opt_lstr (lua_State *L, int numArg, 35LUALIB_API const char *luaL_opt_lstr (lua_State *L, int numArg,
36 const lua_char *def, size_t *len); 36 const char *def, size_t *len);
37LUALIB_API lua_Number luaL_check_number (lua_State *L, int numArg); 37LUALIB_API lua_Number luaL_check_number (lua_State *L, int numArg);
38LUALIB_API lua_Number luaL_opt_number (lua_State *L, int nArg, lua_Number def); 38LUALIB_API lua_Number luaL_opt_number (lua_State *L, int nArg, lua_Number def);
39 39
40LUALIB_API void luaL_check_stack (lua_State *L, int space, const lua_char *msg); 40LUALIB_API void luaL_check_stack (lua_State *L, int space, const char *msg);
41LUALIB_API void luaL_check_rawtype (lua_State *L, int narg, int t); 41LUALIB_API void luaL_check_rawtype (lua_State *L, int narg, int t);
42LUALIB_API void luaL_check_any (lua_State *L, int narg); 42LUALIB_API void luaL_check_any (lua_State *L, int narg);
43LUALIB_API void *luaL_check_userdata (lua_State *L, int narg, 43LUALIB_API void *luaL_check_userdata (lua_State *L, int narg,
44 const lua_char *name); 44 const char *name);
45 45
46LUALIB_API void luaL_verror (lua_State *L, const lua_char *fmt, ...); 46LUALIB_API void luaL_verror (lua_State *L, const char *fmt, ...);
47LUALIB_API int luaL_findstring (const lua_char *name, 47LUALIB_API int luaL_findstring (const char *name,
48 const lua_char *const list[]); 48 const char *const list[]);
49 49
50LUALIB_API int luaL_ref (lua_State *L, int t); 50LUALIB_API int luaL_ref (lua_State *L, int t);
51LUALIB_API void luaL_unref (lua_State *L, int t, int ref); 51LUALIB_API void luaL_unref (lua_State *L, int t, int ref);
@@ -81,22 +81,22 @@ LUALIB_API void luaL_unref (lua_State *L, int t, int ref);
81 81
82 82
83typedef struct luaL_Buffer { 83typedef struct luaL_Buffer {
84 lua_char *p; /* current position in buffer */ 84 char *p; /* current position in buffer */
85 int level; 85 int level;
86 lua_State *L; 86 lua_State *L;
87 lua_char buffer[LUAL_BUFFERSIZE]; 87 char buffer[LUAL_BUFFERSIZE];
88} luaL_Buffer; 88} luaL_Buffer;
89 89
90#define luaL_putchar(B,c) \ 90#define luaL_putchar(B,c) \
91 ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ 91 ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \
92 (*(B)->p++ = (lua_char)(c))) 92 (*(B)->p++ = (char)(c)))
93 93
94#define luaL_addsize(B,n) ((B)->p += (n)) 94#define luaL_addsize(B,n) ((B)->p += (n))
95 95
96LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); 96LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B);
97LUALIB_API lua_char *luaL_prepbuffer (luaL_Buffer *B); 97LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B);
98LUALIB_API void luaL_addlstring (luaL_Buffer *B, const lua_char *s, size_t l); 98LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);
99LUALIB_API void luaL_addstring (luaL_Buffer *B, const lua_char *s); 99LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s);
100LUALIB_API void luaL_addvalue (luaL_Buffer *B); 100LUALIB_API void luaL_addvalue (luaL_Buffer *B);
101LUALIB_API void luaL_pushresult (luaL_Buffer *B); 101LUALIB_API void luaL_pushresult (luaL_Buffer *B);
102 102