diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-23 14:28:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-23 14:28:12 -0300 |
commit | 35023355f21d2c508e2614dc8383d7535dd3a80a (patch) | |
tree | 060e939e2e89f30d7b4c35467692a082e59fc684 | |
parent | 39b79783297bee79db9853b63d199e120a009a8f (diff) | |
download | lua-35023355f21d2c508e2614dc8383d7535dd3a80a.tar.gz lua-35023355f21d2c508e2614dc8383d7535dd3a80a.tar.bz2 lua-35023355f21d2c508e2614dc8383d7535dd3a80a.zip |
details for wchar
-rw-r--r-- | lapi.c | 6 | ||||
-rw-r--r-- | lbaselib.c | 16 | ||||
-rw-r--r-- | ldo.c | 4 | ||||
-rw-r--r-- | liolib.c | 6 | ||||
-rw-r--r-- | llimits.h | 6 | ||||
-rw-r--r-- | lua.c | 4 | ||||
-rw-r--r-- | lua.h | 10 | ||||
-rw-r--r-- | lualib.h | 4 |
8 files changed, 30 insertions, 26 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.132 2001/02/22 18:59:59 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.133 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -22,8 +22,8 @@ | |||
22 | #include "lvm.h" | 22 | #include "lvm.h" |
23 | 23 | ||
24 | 24 | ||
25 | const l_char lua_ident[] = l_s("$Lua: ") l_s(LUA_VERSION) l_s(" ") | 25 | const l_char lua_ident[] = l_s("$Lua: ") LUA_VERSION l_s(" ") |
26 | l_s(LUA_COPYRIGHT) l_s(" $\n") l_s("$Authors: ") l_s(LUA_AUTHORS) l_s(" $"); | 26 | LUA_COPYRIGHT l_s(" $\n") l_s("$Authors: ") LUA_AUTHORS l_s(" $"); |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.26 2001/02/22 18:59:59 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.27 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -35,7 +35,7 @@ static int luaB__ALERT (lua_State *L) { | |||
35 | */ | 35 | */ |
36 | static int luaB__ERRORMESSAGE (lua_State *L) { | 36 | static int luaB__ERRORMESSAGE (lua_State *L) { |
37 | luaL_checktype(L, 1, LUA_TSTRING); | 37 | luaL_checktype(L, 1, LUA_TSTRING); |
38 | lua_getglobal(L, l_s(LUA_ALERT)); | 38 | lua_getglobal(L, LUA_ALERT); |
39 | if (lua_isfunction(L, -1)) { /* avoid error loop if _ALERT is not defined */ | 39 | if (lua_isfunction(L, -1)) { /* avoid error loop if _ALERT is not defined */ |
40 | lua_Debug ar; | 40 | lua_Debug ar; |
41 | lua_pushliteral(L, l_s("error: ")); | 41 | lua_pushliteral(L, l_s("error: ")); |
@@ -305,10 +305,10 @@ static int luaB_call (lua_State *L) { | |||
305 | luaL_checktype(L, 2, LUA_TTABLE); | 305 | luaL_checktype(L, 2, LUA_TTABLE); |
306 | n = lua_getn(L, 2); | 306 | n = lua_getn(L, 2); |
307 | if (!lua_isnull(L, 4)) { /* set new error method */ | 307 | if (!lua_isnull(L, 4)) { /* set new error method */ |
308 | lua_getglobal(L, l_s(LUA_ERRORMESSAGE)); | 308 | lua_getglobal(L, LUA_ERRORMESSAGE); |
309 | err = lua_gettop(L); /* get index */ | 309 | err = lua_gettop(L); /* get index */ |
310 | lua_pushvalue(L, 4); | 310 | lua_pushvalue(L, 4); |
311 | lua_setglobal(L, l_s(LUA_ERRORMESSAGE)); | 311 | lua_setglobal(L, LUA_ERRORMESSAGE); |
312 | } | 312 | } |
313 | oldtop = lua_gettop(L); /* top before function-call preparation */ | 313 | oldtop = lua_gettop(L); /* top before function-call preparation */ |
314 | /* push function */ | 314 | /* push function */ |
@@ -319,7 +319,7 @@ static int luaB_call (lua_State *L) { | |||
319 | status = lua_call(L, n, LUA_MULTRET); | 319 | status = lua_call(L, n, LUA_MULTRET); |
320 | if (err != 0) { /* restore old error method */ | 320 | if (err != 0) { /* restore old error method */ |
321 | lua_pushvalue(L, err); | 321 | lua_pushvalue(L, err); |
322 | lua_setglobal(L, l_s(LUA_ERRORMESSAGE)); | 322 | lua_setglobal(L, LUA_ERRORMESSAGE); |
323 | } | 323 | } |
324 | if (status != 0) { /* error in call? */ | 324 | if (status != 0) { /* error in call? */ |
325 | if (strchr(options, l_c('x'))) | 325 | if (strchr(options, l_c('x'))) |
@@ -637,8 +637,8 @@ static void deprecated_funcs (lua_State *L) { | |||
637 | /* }====================================================== */ | 637 | /* }====================================================== */ |
638 | 638 | ||
639 | static const luaL_reg base_funcs[] = { | 639 | static const luaL_reg base_funcs[] = { |
640 | {l_s(LUA_ALERT), luaB__ALERT}, | 640 | {LUA_ALERT, luaB__ALERT}, |
641 | {l_s(LUA_ERRORMESSAGE), luaB__ERRORMESSAGE}, | 641 | {LUA_ERRORMESSAGE, luaB__ERRORMESSAGE}, |
642 | {l_s("call"), luaB_call}, | 642 | {l_s("call"), luaB_call}, |
643 | {l_s("collectgarbage"), luaB_collectgarbage}, | 643 | {l_s("collectgarbage"), luaB_collectgarbage}, |
644 | {l_s("copytagmethods"), luaB_copytagmethods}, | 644 | {l_s("copytagmethods"), luaB_copytagmethods}, |
@@ -678,7 +678,7 @@ static const luaL_reg base_funcs[] = { | |||
678 | 678 | ||
679 | LUALIB_API void lua_baselibopen (lua_State *L) { | 679 | LUALIB_API void lua_baselibopen (lua_State *L) { |
680 | luaL_openl(L, base_funcs); | 680 | luaL_openl(L, base_funcs); |
681 | lua_pushliteral(L, l_s(LUA_VERSION)); | 681 | lua_pushliteral(L, LUA_VERSION); |
682 | lua_setglobal(L, l_s("_VERSION")); | 682 | lua_setglobal(L, l_s("_VERSION")); |
683 | deprecated_funcs(L); | 683 | deprecated_funcs(L); |
684 | } | 684 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.127 2001/02/23 13:38:56 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.128 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -335,7 +335,7 @@ struct lua_longjmp { | |||
335 | 335 | ||
336 | 336 | ||
337 | static void message (lua_State *L, const l_char *s) { | 337 | static void message (lua_State *L, const l_char *s) { |
338 | luaV_getglobal(L, luaS_newliteral(L, l_s(LUA_ERRORMESSAGE)), L->top); | 338 | luaV_getglobal(L, luaS_newliteral(L, LUA_ERRORMESSAGE), L->top); |
339 | if (ttype(L->top) == LUA_TFUNCTION) { | 339 | if (ttype(L->top) == LUA_TFUNCTION) { |
340 | incr_top; | 340 | incr_top; |
341 | setsvalue(L->top, luaS_new(L, s)); | 341 | setsvalue(L->top, luaS_new(L, s)); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 1.107 2001/02/22 17:15:18 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 1.108 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -638,7 +638,7 @@ static int errorfb (lua_State *L) { | |||
638 | luaL_addstring(&b, l_s("\n")); | 638 | luaL_addstring(&b, l_s("\n")); |
639 | } | 639 | } |
640 | luaL_pushresult(&b); | 640 | luaL_pushresult(&b); |
641 | lua_getglobal(L, l_s(LUA_ALERT)); | 641 | lua_getglobal(L, LUA_ALERT); |
642 | if (lua_isfunction(L, -1)) { /* avoid loop if _ALERT is not defined */ | 642 | if (lua_isfunction(L, -1)) { /* avoid loop if _ALERT is not defined */ |
643 | lua_pushvalue(L, -2); /* error message */ | 643 | lua_pushvalue(L, -2); /* error message */ |
644 | lua_rawcall(L, 1, 0); | 644 | lua_rawcall(L, 1, 0); |
@@ -671,7 +671,7 @@ static const luaL_reg iolib[] = { | |||
671 | {l_s("tmpname"), io_tmpname}, | 671 | {l_s("tmpname"), io_tmpname}, |
672 | {l_s("write"), io_write}, | 672 | {l_s("write"), io_write}, |
673 | {l_s("writeto"), io_writeto}, | 673 | {l_s("writeto"), io_writeto}, |
674 | {l_s(LUA_ERRORMESSAGE), errorfb} | 674 | {LUA_ERRORMESSAGE, errorfb} |
675 | }; | 675 | }; |
676 | 676 | ||
677 | 677 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.24 2001/02/22 17:15:18 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.25 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Limits, basic types, and some other `installation-dependent' definitions | 3 | ** Limits, basic types, and some other `installation-dependent' definitions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -80,7 +80,9 @@ typedef unsigned char lu_byte; | |||
80 | 80 | ||
81 | 81 | ||
82 | /* macro to `unsign' a character */ | 82 | /* macro to `unsign' a character */ |
83 | #define uchar(c) ((unsigned char)(c)) | 83 | #ifndef uchar |
84 | #define uchar(c) ((unsigned char)(c)) | ||
85 | #endif | ||
84 | 86 | ||
85 | 87 | ||
86 | #define MAX_SIZET ((size_t)(~(size_t)0)-2) | 88 | #define MAX_SIZET ((size_t)(~(size_t)0)-2) |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.61 2001/02/20 18:15:33 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.62 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -118,7 +118,7 @@ static void print_message (void) { | |||
118 | 118 | ||
119 | 119 | ||
120 | static void print_version (void) { | 120 | static void print_version (void) { |
121 | printf(l_s("%.80s %.80s\n"), l_s(LUA_VERSION), l_s(LUA_COPYRIGHT)); | 121 | printf(l_s("%.80s %.80s\n"), LUA_VERSION, LUA_COPYRIGHT); |
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.88 2001/02/22 17:15:18 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.89 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil | 4 | ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil |
5 | ** e-mail: lua@tecgraf.puc-rio.br | 5 | ** e-mail: lua@tecgraf.puc-rio.br |
@@ -17,13 +17,13 @@ | |||
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | #define LUA_VERSION "Lua 4.1 (work)" | 20 | #define LUA_VERSION l_s("Lua 4.1 (work)") |
21 | #define LUA_COPYRIGHT "Copyright (C) 1994-2000 TeCGraf, PUC-Rio" | 21 | #define LUA_COPYRIGHT l_s("Copyright (C) 1994-2000 TeCGraf, PUC-Rio") |
22 | #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" | 22 | #define LUA_AUTHORS l_s("W. Celes, R. Ierusalimschy & L. H. de Figueiredo") |
23 | 23 | ||
24 | 24 | ||
25 | /* name of global variable with error handler */ | 25 | /* name of global variable with error handler */ |
26 | #define LUA_ERRORMESSAGE "_ERRORMESSAGE" | 26 | #define LUA_ERRORMESSAGE l_s("_ERRORMESSAGE") |
27 | 27 | ||
28 | 28 | ||
29 | /* pre-defined references */ | 29 | /* pre-defined references */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lualib.h,v 1.16 2001/02/22 17:15:18 roberto Exp roberto $ | 2 | ** $Id: lualib.h,v 1.17 2001/02/23 17:17:25 roberto Exp roberto $ |
3 | ** Lua standard libraries | 3 | ** Lua standard libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -31,7 +31,9 @@ LUALIB_API void lua_dblibopen (lua_State *L); | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | /* macro to `unsign' a character */ | 33 | /* macro to `unsign' a character */ |
34 | #ifndef uchar | ||
34 | #define uchar(c) ((unsigned char)(c)) | 35 | #define uchar(c) ((unsigned char)(c)) |
36 | #endif | ||
35 | 37 | ||
36 | /* integer type to hold the result of fgetc */ | 38 | /* integer type to hold the result of fgetc */ |
37 | typedef int l_charint; | 39 | typedef int l_charint; |