diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-11-28 18:13:13 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-11-28 18:13:13 -0200 |
commit | 72659a06050632da1a9b4c492302be46ac283f6b (patch) | |
tree | bac06b4ea523ba5443564d0869e392180d4b7b77 /lauxlib.h | |
parent | dfaf8c5291fa8aef5bedbfa375853475364ac76e (diff) | |
download | lua-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.h | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -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 | ||
23 | typedef struct luaL_reg { | 23 | typedef 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 | ||
29 | LUALIB_API void luaL_openlib (lua_State *L, const luaL_reg *l, int n); | 29 | LUALIB_API void luaL_openlib (lua_State *L, const luaL_reg *l, int n); |
30 | LUALIB_API void luaL_typerror (lua_State *L, int narg, const lua_char *tname); | 30 | LUALIB_API void luaL_typerror (lua_State *L, int narg, const char *tname); |
31 | LUALIB_API void luaL_argerror (lua_State *L, int numarg, | 31 | LUALIB_API void luaL_argerror (lua_State *L, int numarg, |
32 | const lua_char *extramsg); | 32 | const char *extramsg); |
33 | LUALIB_API const lua_char *luaL_check_lstr (lua_State *L, int numArg, | 33 | LUALIB_API const char *luaL_check_lstr (lua_State *L, int numArg, |
34 | size_t *len); | 34 | size_t *len); |
35 | LUALIB_API const lua_char *luaL_opt_lstr (lua_State *L, int numArg, | 35 | LUALIB_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); |
37 | LUALIB_API lua_Number luaL_check_number (lua_State *L, int numArg); | 37 | LUALIB_API lua_Number luaL_check_number (lua_State *L, int numArg); |
38 | LUALIB_API lua_Number luaL_opt_number (lua_State *L, int nArg, lua_Number def); | 38 | LUALIB_API lua_Number luaL_opt_number (lua_State *L, int nArg, lua_Number def); |
39 | 39 | ||
40 | LUALIB_API void luaL_check_stack (lua_State *L, int space, const lua_char *msg); | 40 | LUALIB_API void luaL_check_stack (lua_State *L, int space, const char *msg); |
41 | LUALIB_API void luaL_check_rawtype (lua_State *L, int narg, int t); | 41 | LUALIB_API void luaL_check_rawtype (lua_State *L, int narg, int t); |
42 | LUALIB_API void luaL_check_any (lua_State *L, int narg); | 42 | LUALIB_API void luaL_check_any (lua_State *L, int narg); |
43 | LUALIB_API void *luaL_check_userdata (lua_State *L, int narg, | 43 | LUALIB_API void *luaL_check_userdata (lua_State *L, int narg, |
44 | const lua_char *name); | 44 | const char *name); |
45 | 45 | ||
46 | LUALIB_API void luaL_verror (lua_State *L, const lua_char *fmt, ...); | 46 | LUALIB_API void luaL_verror (lua_State *L, const char *fmt, ...); |
47 | LUALIB_API int luaL_findstring (const lua_char *name, | 47 | LUALIB_API int luaL_findstring (const char *name, |
48 | const lua_char *const list[]); | 48 | const char *const list[]); |
49 | 49 | ||
50 | LUALIB_API int luaL_ref (lua_State *L, int t); | 50 | LUALIB_API int luaL_ref (lua_State *L, int t); |
51 | LUALIB_API void luaL_unref (lua_State *L, int t, int ref); | 51 | LUALIB_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 | ||
83 | typedef struct luaL_Buffer { | 83 | typedef 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 | ||
96 | LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); | 96 | LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B); |
97 | LUALIB_API lua_char *luaL_prepbuffer (luaL_Buffer *B); | 97 | LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B); |
98 | LUALIB_API void luaL_addlstring (luaL_Buffer *B, const lua_char *s, size_t l); | 98 | LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l); |
99 | LUALIB_API void luaL_addstring (luaL_Buffer *B, const lua_char *s); | 99 | LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s); |
100 | LUALIB_API void luaL_addvalue (luaL_Buffer *B); | 100 | LUALIB_API void luaL_addvalue (luaL_Buffer *B); |
101 | LUALIB_API void luaL_pushresult (luaL_Buffer *B); | 101 | LUALIB_API void luaL_pushresult (luaL_Buffer *B); |
102 | 102 | ||