diff options
-rw-r--r-- | lapi.c | 14 | ||||
-rw-r--r-- | lauxlib.c | 7 | ||||
-rw-r--r-- | lbaselib.c | 63 | ||||
-rw-r--r-- | lcode.c | 3 | ||||
-rw-r--r-- | ldblib.c | 3 | ||||
-rw-r--r-- | ldebug.c | 3 | ||||
-rw-r--r-- | ldo.c | 22 | ||||
-rw-r--r-- | ldump.c | 3 | ||||
-rw-r--r-- | lfunc.c | 3 | ||||
-rw-r--r-- | lgc.c | 3 | ||||
-rw-r--r-- | liolib.c | 28 | ||||
-rw-r--r-- | llex.c | 3 | ||||
-rw-r--r-- | llimits.h | 92 | ||||
-rw-r--r-- | lmathlib.c | 3 | ||||
-rw-r--r-- | lmem.c | 3 | ||||
-rw-r--r-- | loadlib.c | 5 | ||||
-rw-r--r-- | lobject.c | 8 | ||||
-rw-r--r-- | lopcodes.c | 3 | ||||
-rw-r--r-- | lopcodes.h | 6 | ||||
-rw-r--r-- | lparser.c | 9 | ||||
-rw-r--r-- | lstate.c | 3 | ||||
-rw-r--r-- | lstring.c | 3 | ||||
-rw-r--r-- | lstrlib.c | 9 | ||||
-rw-r--r-- | ltable.c | 32 | ||||
-rw-r--r-- | ltablib.c | 3 | ||||
-rw-r--r-- | ltests.c | 7 | ||||
-rw-r--r-- | ltests.h | 8 | ||||
-rw-r--r-- | ltm.c | 3 | ||||
-rw-r--r-- | lua.c | 57 | ||||
-rw-r--r-- | lua.h | 34 | ||||
-rw-r--r-- | lundump.c | 3 | ||||
-rw-r--r-- | lvm.c | 12 | ||||
-rw-r--r-- | lzio.c | 3 | ||||
-rw-r--r-- | makefile | 108 |
34 files changed, 175 insertions, 394 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.5 2004/03/23 17:07:34 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.6 2004/04/05 14:43:17 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 | */ |
@@ -10,6 +10,7 @@ | |||
10 | #include <string.h> | 10 | #include <string.h> |
11 | 11 | ||
12 | #define lapi_c | 12 | #define lapi_c |
13 | #define LUA_CORE | ||
13 | 14 | ||
14 | #include "lua.h" | 15 | #include "lua.h" |
15 | 16 | ||
@@ -28,11 +29,6 @@ | |||
28 | #include "lvm.h" | 29 | #include "lvm.h" |
29 | 30 | ||
30 | 31 | ||
31 | /* function to convert a lua_Number to lua_Integer (with any rounding method) */ | ||
32 | #ifndef lua_number2integer | ||
33 | #define lua_number2integer(i,n) ((i)=(lua_Integer)(n)) | ||
34 | #endif | ||
35 | |||
36 | 32 | ||
37 | const char lua_ident[] = | 33 | const char lua_ident[] = |
38 | "$Lua: " LUA_VERSION " " LUA_COPYRIGHT " $\n" | 34 | "$Lua: " LUA_VERSION " " LUA_COPYRIGHT " $\n" |
@@ -41,10 +37,6 @@ const char lua_ident[] = | |||
41 | 37 | ||
42 | 38 | ||
43 | 39 | ||
44 | #ifndef api_check | ||
45 | #define api_check(L, o) lua_assert(o) | ||
46 | #endif | ||
47 | |||
48 | #define api_checknelems(L, n) api_check(L, (n) <= (L->top - L->base)) | 40 | #define api_checknelems(L, n) api_check(L, (n) <= (L->top - L->base)) |
49 | 41 | ||
50 | #define api_checkvalidindex(L, i) api_check(L, (i) != &luaO_nilobject) | 42 | #define api_checkvalidindex(L, i) api_check(L, (i) != &luaO_nilobject) |
@@ -87,7 +79,7 @@ void luaA_pushobject (lua_State *L, const TValue *o) { | |||
87 | LUA_API int lua_checkstack (lua_State *L, int size) { | 79 | LUA_API int lua_checkstack (lua_State *L, int size) { |
88 | int res; | 80 | int res; |
89 | lua_lock(L); | 81 | lua_lock(L); |
90 | if ((L->top - L->base + size) > LUA_MAXCSTACK) | 82 | if ((L->top - L->base + size) > MAXCSTACK) |
91 | res = 0; /* stack overflow */ | 83 | res = 0; /* stack overflow */ |
92 | else { | 84 | else { |
93 | luaD_checkstack(L, size); | 85 | luaD_checkstack(L, size); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.109 2004/02/18 13:40:03 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.110 2004/03/23 16:38:43 roberto Exp roberto $ |
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 | */ |
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #define lauxlib_c | 20 | #define lauxlib_c |
21 | #define LUA_LIB | ||
21 | 22 | ||
22 | #include "lua.h" | 23 | #include "lua.h" |
23 | 24 | ||
@@ -288,7 +289,7 @@ static void getsizes (lua_State *L) { | |||
288 | } | 289 | } |
289 | 290 | ||
290 | 291 | ||
291 | void luaL_setn (lua_State *L, int t, int n) { | 292 | LUALIB_API void luaL_setn (lua_State *L, int t, int n) { |
292 | t = abs_index(L, t); | 293 | t = abs_index(L, t); |
293 | getsizes(L); | 294 | getsizes(L); |
294 | lua_pushvalue(L, t); | 295 | lua_pushvalue(L, t); |
@@ -298,7 +299,7 @@ void luaL_setn (lua_State *L, int t, int n) { | |||
298 | } | 299 | } |
299 | 300 | ||
300 | 301 | ||
301 | int luaL_getn (lua_State *L, int t) { | 302 | LUALIB_API int luaL_getn (lua_State *L, int t) { |
302 | int n; | 303 | int n; |
303 | t = abs_index(L, t); | 304 | t = abs_index(L, t); |
304 | getsizes(L); /* try sizes[t] */ | 305 | getsizes(L); /* try sizes[t] */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.140 2004/03/09 17:34:35 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.141 2004/03/26 13:25:17 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 | */ |
@@ -12,6 +12,7 @@ | |||
12 | #include <string.h> | 12 | #include <string.h> |
13 | 13 | ||
14 | #define lbaselib_c | 14 | #define lbaselib_c |
15 | #define LUA_LIB | ||
15 | 16 | ||
16 | #include "lua.h" | 17 | #include "lua.h" |
17 | 18 | ||
@@ -235,28 +236,29 @@ static int luaB_next (lua_State *L) { | |||
235 | 236 | ||
236 | static int luaB_pairs (lua_State *L) { | 237 | static int luaB_pairs (lua_State *L) { |
237 | luaL_checktype(L, 1, LUA_TTABLE); | 238 | luaL_checktype(L, 1, LUA_TTABLE); |
238 | lua_getglobal(L, "next"); /* return generator, */ | 239 | lua_pushvalue(L, lua_upvalueindex(1)); /* return generator, */ |
239 | lua_pushvalue(L, 1); /* state, */ | 240 | lua_pushvalue(L, 1); /* state, */ |
240 | lua_pushnil(L); /* and initial value */ | 241 | lua_pushnil(L); /* and initial value */ |
241 | return 3; | 242 | return 3; |
242 | } | 243 | } |
243 | 244 | ||
244 | 245 | ||
246 | static int ipairsaux (lua_State *L) { | ||
247 | int i = luaL_checkint(L, 2); | ||
248 | luaL_checktype(L, 1, LUA_TTABLE); | ||
249 | i++; /* next value */ | ||
250 | lua_pushinteger(L, i); | ||
251 | lua_rawgeti(L, 1, i); | ||
252 | return (lua_isnil(L, -1)) ? 0 : 2; | ||
253 | } | ||
254 | |||
255 | |||
245 | static int luaB_ipairs (lua_State *L) { | 256 | static int luaB_ipairs (lua_State *L) { |
246 | int i = (int)lua_tointeger(L, 2); | ||
247 | luaL_checktype(L, 1, LUA_TTABLE); | 257 | luaL_checktype(L, 1, LUA_TTABLE); |
248 | if (i == 0 && lua_isnone(L, 2)) { /* `for' start? */ | 258 | lua_pushvalue(L, lua_upvalueindex(1)); /* return generator, */ |
249 | lua_getglobal(L, "ipairs"); /* return generator, */ | 259 | lua_pushvalue(L, 1); /* state, */ |
250 | lua_pushvalue(L, 1); /* state, */ | 260 | lua_pushinteger(L, 0); /* and initial value */ |
251 | lua_pushinteger(L, 0); /* and initial value */ | 261 | return 3; |
252 | return 3; | ||
253 | } | ||
254 | else { /* `for' step */ | ||
255 | i++; /* next value */ | ||
256 | lua_pushinteger(L, i); | ||
257 | lua_rawgeti(L, 1, i); | ||
258 | return (lua_isnil(L, -1)) ? 0 : 2; | ||
259 | } | ||
260 | } | 262 | } |
261 | 263 | ||
262 | 264 | ||
@@ -458,25 +460,6 @@ static int luaB_newproxy (lua_State *L) { | |||
458 | */ | 460 | */ |
459 | 461 | ||
460 | 462 | ||
461 | /* name of global that holds table with loaded packages */ | ||
462 | #define REQTAB "_LOADED" | ||
463 | |||
464 | /* name of global that holds the search path for packages */ | ||
465 | #define LUA_PATH "LUA_PATH" | ||
466 | |||
467 | #ifndef LUA_PATH_SEP | ||
468 | #define LUA_PATH_SEP ';' | ||
469 | #endif | ||
470 | |||
471 | #ifndef LUA_PATH_MARK | ||
472 | #define LUA_PATH_MARK '?' | ||
473 | #endif | ||
474 | |||
475 | #ifndef LUA_PATH_DEFAULT | ||
476 | #define LUA_PATH_DEFAULT "?;?.lua" | ||
477 | #endif | ||
478 | |||
479 | |||
480 | static const char *getpath (lua_State *L) { | 463 | static const char *getpath (lua_State *L) { |
481 | const char *path; | 464 | const char *path; |
482 | lua_getglobal(L, LUA_PATH); /* try global variable */ | 465 | lua_getglobal(L, LUA_PATH); /* try global variable */ |
@@ -576,8 +559,6 @@ static const luaL_reg base_funcs[] = { | |||
576 | {"getfenv", luaB_getfenv}, | 559 | {"getfenv", luaB_getfenv}, |
577 | {"setfenv", luaB_setfenv}, | 560 | {"setfenv", luaB_setfenv}, |
578 | {"next", luaB_next}, | 561 | {"next", luaB_next}, |
579 | {"ipairs", luaB_ipairs}, | ||
580 | {"pairs", luaB_pairs}, | ||
581 | {"print", luaB_print}, | 562 | {"print", luaB_print}, |
582 | {"tonumber", luaB_tonumber}, | 563 | {"tonumber", luaB_tonumber}, |
583 | {"tostring", luaB_tostring}, | 564 | {"tostring", luaB_tostring}, |
@@ -708,12 +689,22 @@ static const luaL_reg co_funcs[] = { | |||
708 | /* }====================================================== */ | 689 | /* }====================================================== */ |
709 | 690 | ||
710 | 691 | ||
692 | static void auxopen (lua_State *L, const char *name, | ||
693 | lua_CFunction f, lua_CFunction u) { | ||
694 | lua_pushcfunction(L, u); | ||
695 | lua_pushcclosure(L, f, 1); | ||
696 | lua_setfield(L, -2, name); | ||
697 | } | ||
698 | |||
711 | 699 | ||
712 | static void base_open (lua_State *L) { | 700 | static void base_open (lua_State *L) { |
713 | lua_pushvalue(L, LUA_GLOBALSINDEX); | 701 | lua_pushvalue(L, LUA_GLOBALSINDEX); |
714 | luaL_openlib(L, NULL, base_funcs, 0); /* open lib into global table */ | 702 | luaL_openlib(L, NULL, base_funcs, 0); /* open lib into global table */ |
715 | lua_pushliteral(L, LUA_VERSION); | 703 | lua_pushliteral(L, LUA_VERSION); |
716 | lua_setfield(L, -2, "_VERSION"); /* set global _VERSION */ | 704 | lua_setfield(L, -2, "_VERSION"); /* set global _VERSION */ |
705 | /* `ipairs' and `pairs' need auxiliary functions as upvalues */ | ||
706 | auxopen(L, "ipairs", luaB_ipairs, ipairsaux); | ||
707 | auxopen(L, "pairs", luaB_pairs, luaB_next); | ||
717 | /* `newproxy' needs a weaktable as upvalue */ | 708 | /* `newproxy' needs a weaktable as upvalue */ |
718 | lua_newtable(L); /* new table `w' */ | 709 | lua_newtable(L); /* new table `w' */ |
719 | lua_pushvalue(L, -1); /* `w' will be its own metatable */ | 710 | lua_pushvalue(L, -1); /* `w' will be its own metatable */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 1.121 2003/12/09 16:56:11 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | 9 | ||
10 | #define lcode_c | 10 | #define lcode_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldblib.c,v 1.83 2003/10/10 12:57:55 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.84 2003/11/05 11:59:14 roberto Exp roberto $ |
3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -10,6 +10,7 @@ | |||
10 | #include <string.h> | 10 | #include <string.h> |
11 | 11 | ||
12 | #define ldblib_c | 12 | #define ldblib_c |
13 | #define LUA_LIB | ||
13 | 14 | ||
14 | #include "lua.h" | 15 | #include "lua.h" |
15 | 16 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.2 2004/02/20 16:01:05 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.3 2004/03/23 13:10:16 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | #define ldebug_c | 13 | #define ldebug_c |
14 | #define LUA_CORE | ||
14 | 15 | ||
15 | #include "lua.h" | 16 | #include "lua.h" |
16 | 17 | ||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.2 2004/03/23 17:02:58 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 | */ |
6 | 6 | ||
7 | 7 | ||
8 | #include <setjmp.h> | ||
9 | #include <stdlib.h> | 8 | #include <stdlib.h> |
10 | #include <string.h> | 9 | #include <string.h> |
11 | 10 | ||
12 | #define ldo_c | 11 | #define ldo_c |
12 | #define LUA_CORE | ||
13 | 13 | ||
14 | #include "lua.h" | 14 | #include "lua.h" |
15 | 15 | ||
@@ -34,29 +34,15 @@ | |||
34 | 34 | ||
35 | /* | 35 | /* |
36 | ** {====================================================== | 36 | ** {====================================================== |
37 | ** Error-recovery functions (based on long jumps) | 37 | ** Error-recovery functions |
38 | ** ======================================================= | 38 | ** ======================================================= |
39 | */ | 39 | */ |
40 | 40 | ||
41 | 41 | ||
42 | #ifndef LUA_USEEXCEPTIONS | ||
43 | |||
44 | #define L_THROW(c) longjmp((c)->b, 1) | ||
45 | #define L_TRY(c,a) if (setjmp((c)->b) == 0) { a } | ||
46 | |||
47 | #else | ||
48 | |||
49 | #define L_THROW(c) throw(c) | ||
50 | #define L_TRY(c,a) try { a } catch(...) \ | ||
51 | { if ((c)->status == 0) (c)->status = -1; } | ||
52 | |||
53 | #endif | ||
54 | |||
55 | |||
56 | /* chain list of long jump buffers */ | 42 | /* chain list of long jump buffers */ |
57 | struct lua_longjmp { | 43 | struct lua_longjmp { |
58 | struct lua_longjmp *previous; | 44 | struct lua_longjmp *previous; |
59 | jmp_buf b; | 45 | l_jmpbuf b; |
60 | volatile int status; /* error code */ | 46 | volatile int status; /* error code */ |
61 | }; | 47 | }; |
62 | 48 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldump.c,v 1.6 2003/08/15 13:48:53 roberto Exp roberto $ | 2 | ** $Id: ldump.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
3 | ** save bytecodes | 3 | ** save bytecodes |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -7,6 +7,7 @@ | |||
7 | #include <stddef.h> | 7 | #include <stddef.h> |
8 | 8 | ||
9 | #define ldump_c | 9 | #define ldump_c |
10 | #define LUA_CORE | ||
10 | 11 | ||
11 | #include "lua.h" | 12 | #include "lua.h" |
12 | 13 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.2 2004/02/16 19:09:52 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.3 2004/03/15 21:04:33 roberto Exp roberto $ |
3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <stddef.h> | 8 | #include <stddef.h> |
9 | 9 | ||
10 | #define lfunc_c | 10 | #define lfunc_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.5 2004/03/15 21:04:33 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.6 2004/03/23 12:57:12 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -7,6 +7,7 @@ | |||
7 | #include <string.h> | 7 | #include <string.h> |
8 | 8 | ||
9 | #define lgc_c | 9 | #define lgc_c |
10 | #define LUA_CORE | ||
10 | 11 | ||
11 | #include "lua.h" | 12 | #include "lua.h" |
12 | 13 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.48 2003/10/10 12:57:55 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.49 2003/10/10 13:29:28 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 | */ |
@@ -13,6 +13,7 @@ | |||
13 | #include <time.h> | 13 | #include <time.h> |
14 | 14 | ||
15 | #define liolib_c | 15 | #define liolib_c |
16 | #define LUA_LIB | ||
16 | 17 | ||
17 | #include "lua.h" | 18 | #include "lua.h" |
18 | 19 | ||
@@ -21,31 +22,6 @@ | |||
21 | 22 | ||
22 | 23 | ||
23 | 24 | ||
24 | /* | ||
25 | ** by default, gcc does not get `tmpname' | ||
26 | */ | ||
27 | #ifndef USE_TMPNAME | ||
28 | #ifdef __GNUC__ | ||
29 | #define USE_TMPNAME 0 | ||
30 | #else | ||
31 | #define USE_TMPNAME 1 | ||
32 | #endif | ||
33 | #endif | ||
34 | |||
35 | |||
36 | /* | ||
37 | ** by default, posix systems get `popen' | ||
38 | */ | ||
39 | #ifndef USE_POPEN | ||
40 | #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 2 | ||
41 | #define USE_POPEN 1 | ||
42 | #else | ||
43 | #define USE_POPEN 0 | ||
44 | #endif | ||
45 | #endif | ||
46 | |||
47 | |||
48 | |||
49 | 25 | ||
50 | /* | 26 | /* |
51 | ** {====================================================== | 27 | ** {====================================================== |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.2 2004/03/12 19:53:56 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -9,6 +9,7 @@ | |||
9 | #include <string.h> | 9 | #include <string.h> |
10 | 10 | ||
11 | #define llex_c | 11 | #define llex_c |
12 | #define LUA_CORE | ||
12 | 13 | ||
13 | #include "lua.h" | 14 | #include "lua.h" |
14 | 15 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.56 2003/07/29 19:26:34 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.57 2003/12/01 16:33:30 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 | */ |
@@ -15,48 +15,9 @@ | |||
15 | #include "lua.h" | 15 | #include "lua.h" |
16 | 16 | ||
17 | 17 | ||
18 | /* | ||
19 | ** try to find number of bits in an integer | ||
20 | */ | ||
21 | #ifndef BITS_INT | ||
22 | /* avoid overflows in comparison */ | ||
23 | #if INT_MAX-20 < 32760 | ||
24 | #define BITS_INT 16 | ||
25 | #elif INT_MAX > 2147483640L | ||
26 | /* machine has at least 32 bits */ | ||
27 | #define BITS_INT 32 | ||
28 | #else | ||
29 | #error "you must define BITS_INT with number of bits in an integer" | ||
30 | #endif | ||
31 | #endif | ||
32 | |||
33 | |||
34 | /* | ||
35 | ** the following types define integer types for values that may not | ||
36 | ** fit in a `small int' (16 bits), but may waste space in a | ||
37 | ** `large long' (64 bits). The current definitions should work in | ||
38 | ** any machine, but may not be optimal. | ||
39 | */ | ||
40 | |||
41 | |||
42 | /* | ||
43 | ** an unsigned integer with at least 32 bits | ||
44 | */ | ||
45 | #ifndef LUA_UINT32 | ||
46 | #define LUA_UINT32 unsigned long | ||
47 | #endif | ||
48 | 18 | ||
49 | typedef LUA_UINT32 lu_int32; | 19 | typedef LUA_UINT32 lu_int32; |
50 | 20 | ||
51 | |||
52 | /* | ||
53 | ** a signed integer with at least 32 bits | ||
54 | */ | ||
55 | #ifndef LUA_INT32 | ||
56 | #define LUA_INT32 long | ||
57 | #define LUA_MAXINT32 LONG_MAX | ||
58 | #endif | ||
59 | |||
60 | typedef LUA_INT32 l_int32; | 21 | typedef LUA_INT32 l_int32; |
61 | 22 | ||
62 | 23 | ||
@@ -95,19 +56,11 @@ typedef unsigned char lu_byte; | |||
95 | 56 | ||
96 | 57 | ||
97 | /* type to ensure maximum alignment */ | 58 | /* type to ensure maximum alignment */ |
98 | #ifndef LUSER_ALIGNMENT_T | ||
99 | typedef union { double u; void *s; long l; } L_Umaxalign; | ||
100 | #else | ||
101 | typedef LUSER_ALIGNMENT_T L_Umaxalign; | 59 | typedef LUSER_ALIGNMENT_T L_Umaxalign; |
102 | #endif | ||
103 | 60 | ||
104 | 61 | ||
105 | /* result of `usual argument conversion' over lua_Number */ | 62 | /* result of a `usual argument conversion' over lua_Number */ |
106 | #ifndef LUA_UACNUMBER | ||
107 | typedef double l_uacNumber; | ||
108 | #else | ||
109 | typedef LUA_UACNUMBER l_uacNumber; | 63 | typedef LUA_UACNUMBER l_uacNumber; |
110 | #endif | ||
111 | 64 | ||
112 | 65 | ||
113 | #ifndef lua_assert | 66 | #ifndef lua_assert |
@@ -138,43 +91,11 @@ typedef LUA_UACNUMBER l_uacNumber; | |||
138 | typedef lu_int32 Instruction; | 91 | typedef lu_int32 Instruction; |
139 | 92 | ||
140 | 93 | ||
141 | /* maximum depth for calls (unsigned short) */ | ||
142 | #ifndef LUA_MAXCALLS | ||
143 | #define LUA_MAXCALLS 4096 | ||
144 | #endif | ||
145 | |||
146 | |||
147 | /* | ||
148 | ** maximum depth for C calls (unsigned short): Not too big, or may | ||
149 | ** overflow the C stack... | ||
150 | */ | ||
151 | |||
152 | #ifndef LUA_MAXCCALLS | ||
153 | #define LUA_MAXCCALLS 200 | ||
154 | #endif | ||
155 | |||
156 | |||
157 | /* maximum size for the virtual stack of a C function */ | ||
158 | #ifndef LUA_MAXCSTACK | ||
159 | #define LUA_MAXCSTACK 2048 | ||
160 | #endif | ||
161 | |||
162 | 94 | ||
163 | /* maximum stack for a Lua function */ | 95 | /* maximum stack for a Lua function */ |
164 | #define MAXSTACK 250 | 96 | #define MAXSTACK 250 |
165 | 97 | ||
166 | 98 | ||
167 | /* maximum number of variables declared in a function */ | ||
168 | #ifndef MAXVARS | ||
169 | #define MAXVARS 200 /* <MAXSTACK */ | ||
170 | #endif | ||
171 | |||
172 | |||
173 | /* maximum number of upvalues per function */ | ||
174 | #ifndef MAXUPVALUES | ||
175 | #define MAXUPVALUES 32 /* <MAXSTACK */ | ||
176 | #endif | ||
177 | |||
178 | 99 | ||
179 | /* minimum size for the string table (must be power of 2) */ | 100 | /* minimum size for the string table (must be power of 2) */ |
180 | #ifndef MINSTRTABSIZE | 101 | #ifndef MINSTRTABSIZE |
@@ -188,13 +109,4 @@ typedef lu_int32 Instruction; | |||
188 | #endif | 109 | #endif |
189 | 110 | ||
190 | 111 | ||
191 | /* | ||
192 | ** maximum number of syntactical nested non-terminals: Not too big, | ||
193 | ** or may overflow the C stack... | ||
194 | */ | ||
195 | #ifndef LUA_MAXPARSERLEVEL | ||
196 | #define LUA_MAXPARSERLEVEL 200 | ||
197 | #endif | ||
198 | |||
199 | |||
200 | #endif | 112 | #endif |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmathlib.c,v 1.58 2003/10/10 12:57:55 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.59 2003/11/05 11:59:14 roberto Exp roberto $ |
3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -9,6 +9,7 @@ | |||
9 | #include <math.h> | 9 | #include <math.h> |
10 | 10 | ||
11 | #define lmathlib_c | 11 | #define lmathlib_c |
12 | #define LUA_LIB | ||
12 | 13 | ||
13 | #include "lua.h" | 14 | #include "lua.h" |
14 | 15 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.62 2003/10/02 20:31:17 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.63 2003/11/27 18:18:37 roberto Exp roberto $ |
3 | ** Interface to Memory Manager | 3 | ** Interface to Memory Manager |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <stddef.h> | 8 | #include <stddef.h> |
9 | 9 | ||
10 | #define lmem_c | 10 | #define lmem_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loadlib.c,v 1.4 2003/04/07 20:11:53 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.5 2003/05/14 21:01:53 roberto Exp roberto $ |
3 | ** Dynamic library loader for Lua | 3 | ** Dynamic library loader for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | * | 5 | * |
@@ -26,6 +26,9 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #define loadlib_c | ||
30 | #define LUA_LIB | ||
31 | |||
29 | #include "lua.h" | 32 | #include "lua.h" |
30 | #include "lauxlib.h" | 33 | #include "lauxlib.h" |
31 | #include "lualib.h" | 34 | #include "lualib.h" |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 1.99 2003/06/10 12:36:26 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -10,6 +10,7 @@ | |||
10 | #include <string.h> | 10 | #include <string.h> |
11 | 11 | ||
12 | #define lobject_c | 12 | #define lobject_c |
13 | #define LUA_CORE | ||
13 | 14 | ||
14 | #include "lua.h" | 15 | #include "lua.h" |
15 | 16 | ||
@@ -21,11 +22,6 @@ | |||
21 | #include "lvm.h" | 22 | #include "lvm.h" |
22 | 23 | ||
23 | 24 | ||
24 | /* function to convert a string to a lua_Number */ | ||
25 | #ifndef lua_str2number | ||
26 | #define lua_str2number(s,p) strtod((s), (p)) | ||
27 | #endif | ||
28 | |||
29 | 25 | ||
30 | const TValue luaO_nilobject = {LUA_TNIL, {NULL}}; | 26 | const TValue luaO_nilobject = {LUA_TNIL, {NULL}}; |
31 | 27 | ||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.c,v 1.24 2003/05/14 12:09:12 roberto Exp roberto $ | 2 | ** $Id: lopcodes.c,v 1.25 2003/05/14 21:09:53 roberto Exp roberto $ |
3 | ** See Copyright Notice in lua.h | 3 | ** See Copyright Notice in lua.h |
4 | */ | 4 | */ |
5 | 5 | ||
6 | 6 | ||
7 | #define lopcodes_c | 7 | #define lopcodes_c |
8 | #define LUA_CORE | ||
8 | 9 | ||
9 | #include "lua.h" | 10 | #include "lua.h" |
10 | 11 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.h,v 1.105 2003/05/14 21:09:53 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.106 2003/05/15 19:46:03 roberto Exp roberto $ |
3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -50,9 +50,9 @@ enum OpMode {iABC, iABx, iAsBx}; /* basic instruction format */ | |||
50 | /* | 50 | /* |
51 | ** limits for opcode arguments. | 51 | ** limits for opcode arguments. |
52 | ** we use (signed) int to manipulate most arguments, | 52 | ** we use (signed) int to manipulate most arguments, |
53 | ** so they must fit in BITS_INT-1 bits (-1 for sign) | 53 | ** so they must fit in LUA_BITSINT-1 bits (-1 for sign) |
54 | */ | 54 | */ |
55 | #if SIZE_Bx < BITS_INT-1 | 55 | #if SIZE_Bx < LUA_BITSINT-1 |
56 | #define MAXARG_Bx ((1<<SIZE_Bx)-1) | 56 | #define MAXARG_Bx ((1<<SIZE_Bx)-1) |
57 | #define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */ | 57 | #define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */ |
58 | #else | 58 | #else |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 2.2 2004/03/12 19:53:56 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.3 2004/03/26 14:02:41 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <string.h> | 8 | #include <string.h> |
9 | 9 | ||
10 | #define lparser_c | 10 | #define lparser_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -977,12 +978,6 @@ static int cond (LexState *ls) { | |||
977 | ** after its body (and thus avoiding one jump in the loop). | 978 | ** after its body (and thus avoiding one jump in the loop). |
978 | */ | 979 | */ |
979 | 980 | ||
980 | /* | ||
981 | ** maximum size of expressions for optimizing `while' code | ||
982 | */ | ||
983 | #ifndef MAXEXPWHILE | ||
984 | #define MAXEXPWHILE 100 | ||
985 | #endif | ||
986 | 981 | ||
987 | /* | 982 | /* |
988 | ** the call `luaK_goiffalse' may grow the size of an expression by | 983 | ** the call `luaK_goiffalse' may grow the size of an expression by |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.4 2004/03/15 21:04:33 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.5 2004/03/23 12:57:12 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <stddef.h> | 8 | #include <stddef.h> |
9 | 9 | ||
10 | #define lstate_c | 10 | #define lstate_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.c,v 1.85 2003/12/09 16:56:11 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
3 | ** String table (keeps all strings handled by Lua) | 3 | ** String table (keeps all strings handled by Lua) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <string.h> | 8 | #include <string.h> |
9 | 9 | ||
10 | #define lstring_c | 10 | #define lstring_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.100 2003/10/07 20:13:41 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.101 2004/01/02 11:54:14 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -12,6 +12,7 @@ | |||
12 | #include <string.h> | 12 | #include <string.h> |
13 | 13 | ||
14 | #define lstrlib_c | 14 | #define lstrlib_c |
15 | #define LUA_LIB | ||
15 | 16 | ||
16 | #include "lua.h" | 17 | #include "lua.h" |
17 | 18 | ||
@@ -20,9 +21,7 @@ | |||
20 | 21 | ||
21 | 22 | ||
22 | /* macro to `unsign' a character */ | 23 | /* macro to `unsign' a character */ |
23 | #ifndef uchar | ||
24 | #define uchar(c) ((unsigned char)(c)) | 24 | #define uchar(c) ((unsigned char)(c)) |
25 | #endif | ||
26 | 25 | ||
27 | 26 | ||
28 | typedef lua_Integer sint32; /* a signed version for size_t */ | 27 | typedef lua_Integer sint32; /* a signed version for size_t */ |
@@ -156,10 +155,6 @@ static int str_dump (lua_State *L) { | |||
156 | ** ======================================================= | 155 | ** ======================================================= |
157 | */ | 156 | */ |
158 | 157 | ||
159 | #ifndef MAX_CAPTURES | ||
160 | #define MAX_CAPTURES 32 /* arbitrary limit */ | ||
161 | #endif | ||
162 | |||
163 | 158 | ||
164 | #define CAP_UNFINISHED (-1) | 159 | #define CAP_UNFINISHED (-1) |
165 | #define CAP_POSITION (-2) | 160 | #define CAP_POSITION (-2) |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.2 2004/03/26 14:02:41 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -21,6 +21,7 @@ | |||
21 | #include <string.h> | 21 | #include <string.h> |
22 | 22 | ||
23 | #define ltable_c | 23 | #define ltable_c |
24 | #define LUA_CORE | ||
24 | 25 | ||
25 | #include "lua.h" | 26 | #include "lua.h" |
26 | 27 | ||
@@ -36,19 +37,14 @@ | |||
36 | /* | 37 | /* |
37 | ** max size of array part is 2^MAXBITS | 38 | ** max size of array part is 2^MAXBITS |
38 | */ | 39 | */ |
39 | #if BITS_INT > 26 | 40 | #if LUA_BITSINT > 26 |
40 | #define MAXBITS 24 | 41 | #define MAXBITS 24 |
41 | #else | 42 | #else |
42 | #define MAXBITS (BITS_INT-2) | 43 | #define MAXBITS (LUA_BITSINT-2) |
43 | #endif | 44 | #endif |
44 | 45 | ||
45 | #define MAXASIZE (1 << MAXBITS) | 46 | #define MAXASIZE (1 << MAXBITS) |
46 | 47 | ||
47 | /* function to convert a lua_Number to int (with any rounding method) */ | ||
48 | #ifndef lua_number2int | ||
49 | #define lua_number2int(i,n) ((i)=(int)(n)) | ||
50 | #endif | ||
51 | |||
52 | 48 | ||
53 | #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) | 49 | #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) |
54 | 50 | ||
@@ -349,26 +345,6 @@ void luaH_free (lua_State *L, Table *t) { | |||
349 | } | 345 | } |
350 | 346 | ||
351 | 347 | ||
352 | #if 0 | ||
353 | /* | ||
354 | ** try to remove an element from a hash table; cannot move any element | ||
355 | ** (because gc can call `remove' during a table traversal) | ||
356 | */ | ||
357 | void luaH_remove (Table *t, Node *e) { | ||
358 | Node *mp = luaH_mainposition(t, gkey(e)); | ||
359 | if (e != mp) { /* element not in its main position? */ | ||
360 | while (mp->next != e) mp = mp->next; /* find previous */ | ||
361 | mp->next = e->next; /* remove `e' from its list */ | ||
362 | } | ||
363 | else { | ||
364 | if (e->next != NULL) ?? | ||
365 | } | ||
366 | lua_assert(ttisnil(gval(node))); | ||
367 | setnilvalue(gkey(e)); /* clear node `e' */ | ||
368 | e->next = NULL; | ||
369 | } | ||
370 | #endif | ||
371 | |||
372 | 348 | ||
373 | /* | 349 | /* |
374 | ** inserts a new key into a hash table; first, check whether key's main | 350 | ** inserts a new key into a hash table; first, check whether key's main |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltablib.c,v 1.21 2003/04/03 13:35:34 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.22 2003/10/07 20:13:41 roberto Exp roberto $ |
3 | ** Library for Table Manipulation | 3 | ** Library for Table Manipulation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <stddef.h> | 8 | #include <stddef.h> |
9 | 9 | ||
10 | #define ltablib_c | 10 | #define ltablib_c |
11 | #define LUA_LIB | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.3 2004/03/15 21:04:54 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.4 2004/03/23 17:07:53 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -12,6 +12,7 @@ | |||
12 | #include <string.h> | 12 | #include <string.h> |
13 | 13 | ||
14 | #define ltests_c | 14 | #define ltests_c |
15 | #define LUA_CORE | ||
15 | 16 | ||
16 | #include "lua.h" | 17 | #include "lua.h" |
17 | 18 | ||
@@ -443,7 +444,7 @@ static int listlocals (lua_State *L) { | |||
443 | 444 | ||
444 | static int get_limits (lua_State *L) { | 445 | static int get_limits (lua_State *L) { |
445 | lua_createtable(L, 0, 5); | 446 | lua_createtable(L, 0, 5); |
446 | setnameval(L, "BITS_INT", BITS_INT); | 447 | setnameval(L, "BITS_INT", LUA_BITSINT); |
447 | setnameval(L, "LFPF", LFIELDS_PER_FLUSH); | 448 | setnameval(L, "LFPF", LFIELDS_PER_FLUSH); |
448 | setnameval(L, "MAXVARS", MAXVARS); | 449 | setnameval(L, "MAXVARS", MAXVARS); |
449 | setnameval(L, "MAXSTACK", MAXSTACK); | 450 | setnameval(L, "MAXSTACK", MAXSTACK); |
@@ -961,7 +962,7 @@ static int testC (lua_State *L) { | |||
961 | lua_pop(L, 1); | 962 | lua_pop(L, 1); |
962 | } | 963 | } |
963 | else if EQ("throw") { | 964 | else if EQ("throw") { |
964 | #ifdef _cplusplus | 965 | #ifdef __cplusplus |
965 | static struct X { int x; } x; | 966 | static struct X { int x; } x; |
966 | throw x; | 967 | throw x; |
967 | #else | 968 | #else |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 2.2 2004/02/16 19:09:52 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.3 2004/03/15 21:04:54 roberto Exp roberto $ |
3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -19,6 +19,8 @@ | |||
19 | #include <assert.h> | 19 | #include <assert.h> |
20 | #define lua_assert(c) assert(c) | 20 | #define lua_assert(c) assert(c) |
21 | #define check_exp(c,e) (lua_assert(c), (e)) | 21 | #define check_exp(c,e) (lua_assert(c), (e)) |
22 | #undef api_check | ||
23 | #define api_check(L, o) lua_assert(o) | ||
22 | 24 | ||
23 | 25 | ||
24 | /* to avoid warnings, and to make sure value is really unused */ | 26 | /* to avoid warnings, and to make sure value is really unused */ |
@@ -63,7 +65,9 @@ extern int islocked; | |||
63 | 65 | ||
64 | int luaB_opentests (lua_State *L); | 66 | int luaB_opentests (lua_State *L); |
65 | 67 | ||
66 | #define LUA_EXTRALIBS { "tests", luaB_opentests }, | 68 | #undef LUA_EXTRALIBS |
69 | #define LUA_EXTRALIBS { "tests", luaB_opentests }, | ||
70 | |||
67 | 71 | ||
68 | 72 | ||
69 | /* real main will be defined at `ltests.c' */ | 73 | /* real main will be defined at `ltests.c' */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 2.2 2004/02/16 19:09:52 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <string.h> | 8 | #include <string.h> |
9 | 9 | ||
10 | #define ltm_c | 10 | #define ltm_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.123 2003/05/07 16:02:16 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.124 2003/10/23 18:06:22 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 | */ |
@@ -26,39 +26,6 @@ | |||
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | 28 | ||
29 | /* | ||
30 | ** definition of `isatty' | ||
31 | */ | ||
32 | #ifdef _POSIX_C_SOURCE | ||
33 | #include <unistd.h> | ||
34 | #define stdin_is_tty() isatty(0) | ||
35 | #else | ||
36 | #define stdin_is_tty() 1 /* assume stdin is a tty */ | ||
37 | #endif | ||
38 | |||
39 | |||
40 | |||
41 | #ifndef PROMPT | ||
42 | #define PROMPT "> " | ||
43 | #endif | ||
44 | |||
45 | |||
46 | #ifndef PROMPT2 | ||
47 | #define PROMPT2 ">> " | ||
48 | #endif | ||
49 | |||
50 | #ifndef PROGNAME | ||
51 | #define PROGNAME "lua" | ||
52 | #endif | ||
53 | |||
54 | #ifndef lua_userinit | ||
55 | #define lua_userinit(L) openstdlibs(L) | ||
56 | #endif | ||
57 | |||
58 | |||
59 | #ifndef LUA_EXTRALIBS | ||
60 | #define LUA_EXTRALIBS /* empty */ | ||
61 | #endif | ||
62 | 29 | ||
63 | 30 | ||
64 | static lua_State *L = NULL; | 31 | static lua_State *L = NULL; |
@@ -187,14 +154,6 @@ static int load_file (const char *name) { | |||
187 | } | 154 | } |
188 | 155 | ||
189 | 156 | ||
190 | /* | ||
191 | ** this macro can be used by some `history' system to save lines | ||
192 | ** read in manual input | ||
193 | */ | ||
194 | #ifndef lua_saveline | ||
195 | #define lua_saveline(L,line) /* empty */ | ||
196 | #endif | ||
197 | |||
198 | 157 | ||
199 | /* | 158 | /* |
200 | ** this macro defines a function to show the prompt and reads the | 159 | ** this macro defines a function to show the prompt and reads the |
@@ -291,8 +250,11 @@ static void manual_input (void) { | |||
291 | } | 250 | } |
292 | 251 | ||
293 | 252 | ||
253 | #define clearinteractive(i) (*i &= 2) | ||
254 | |||
294 | static int handle_argv (char *argv[], int *interactive) { | 255 | static int handle_argv (char *argv[], int *interactive) { |
295 | if (argv[1] == NULL) { /* no more arguments? */ | 256 | if (argv[1] == NULL) { /* no arguments? */ |
257 | *interactive = 0; | ||
296 | if (stdin_is_tty()) { | 258 | if (stdin_is_tty()) { |
297 | print_version(); | 259 | print_version(); |
298 | manual_input(); | 260 | manual_input(); |
@@ -314,19 +276,22 @@ static int handle_argv (char *argv[], int *interactive) { | |||
314 | goto endloop; /* stop handling arguments */ | 276 | goto endloop; /* stop handling arguments */ |
315 | } | 277 | } |
316 | case '\0': { | 278 | case '\0': { |
279 | clearinteractive(interactive); | ||
317 | file_input(NULL); /* executes stdin as a file */ | 280 | file_input(NULL); /* executes stdin as a file */ |
318 | break; | 281 | break; |
319 | } | 282 | } |
320 | case 'i': { | 283 | case 'i': { |
321 | *interactive = 1; | 284 | *interactive = 2; /* force interactive mode after arguments */ |
322 | break; | 285 | break; |
323 | } | 286 | } |
324 | case 'v': { | 287 | case 'v': { |
288 | clearinteractive(interactive); | ||
325 | print_version(); | 289 | print_version(); |
326 | break; | 290 | break; |
327 | } | 291 | } |
328 | case 'e': { | 292 | case 'e': { |
329 | const char *chunk = argv[i] + 2; | 293 | const char *chunk = argv[i] + 2; |
294 | clearinteractive(interactive); | ||
330 | if (*chunk == '\0') chunk = argv[++i]; | 295 | if (*chunk == '\0') chunk = argv[++i]; |
331 | if (chunk == NULL) { | 296 | if (chunk == NULL) { |
332 | print_usage(); | 297 | print_usage(); |
@@ -356,6 +321,7 @@ static int handle_argv (char *argv[], int *interactive) { | |||
356 | break; | 321 | break; |
357 | } | 322 | } |
358 | default: { | 323 | default: { |
324 | clearinteractive(interactive); | ||
359 | print_usage(); | 325 | print_usage(); |
360 | return 1; | 326 | return 1; |
361 | } | 327 | } |
@@ -364,6 +330,7 @@ static int handle_argv (char *argv[], int *interactive) { | |||
364 | if (argv[i] != NULL) { | 330 | if (argv[i] != NULL) { |
365 | const char *filename = argv[i]; | 331 | const char *filename = argv[i]; |
366 | getargs(argv, i); /* collect arguments */ | 332 | getargs(argv, i); /* collect arguments */ |
333 | clearinteractive(interactive); | ||
367 | lua_setglobal(L, "arg"); | 334 | lua_setglobal(L, "arg"); |
368 | return file_input(filename); /* stop scanning arguments */ | 335 | return file_input(filename); /* stop scanning arguments */ |
369 | } | 336 | } |
@@ -401,7 +368,7 @@ struct Smain { | |||
401 | static int pmain (lua_State *l) { | 368 | static int pmain (lua_State *l) { |
402 | struct Smain *s = (struct Smain *)lua_touserdata(l, 1); | 369 | struct Smain *s = (struct Smain *)lua_touserdata(l, 1); |
403 | int status; | 370 | int status; |
404 | int interactive = 0; | 371 | int interactive = 1; |
405 | if (s->argv[0] && s->argv[0][0]) progname = s->argv[0]; | 372 | if (s->argv[0] && s->argv[0][0]) progname = s->argv[0]; |
406 | L = l; | 373 | L = l; |
407 | lua_userinit(l); /* open libraries */ | 374 | lua_userinit(l); /* open libraries */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.187 2004/03/09 17:34:35 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.188 2004/03/24 13:55:46 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
@@ -14,6 +14,9 @@ | |||
14 | #include <stddef.h> | 14 | #include <stddef.h> |
15 | 15 | ||
16 | 16 | ||
17 | #include "luaconf.h" | ||
18 | |||
19 | |||
17 | #define LUA_VERSION "Lua 5.1 (work)" | 20 | #define LUA_VERSION "Lua 5.1 (work)" |
18 | #define LUA_COPYRIGHT "Copyright (C) 1994-2004 Tecgraf, PUC-Rio" | 21 | #define LUA_COPYRIGHT "Copyright (C) 1994-2004 Tecgraf, PUC-Rio" |
19 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" | 22 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" |
@@ -91,26 +94,13 @@ typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); | |||
91 | 94 | ||
92 | 95 | ||
93 | /* type of numbers in Lua */ | 96 | /* type of numbers in Lua */ |
94 | #ifndef LUA_NUMBER | ||
95 | typedef double lua_Number; | ||
96 | #else | ||
97 | typedef LUA_NUMBER lua_Number; | 97 | typedef LUA_NUMBER lua_Number; |
98 | #endif | ||
99 | 98 | ||
100 | 99 | ||
101 | /* type for integer functions */ | 100 | /* type for integer functions */ |
102 | #ifndef LUA_INTEGER | ||
103 | typedef long lua_Integer; | ||
104 | #else | ||
105 | typedef LUA_INTEGER lua_Integer; | 101 | typedef LUA_INTEGER lua_Integer; |
106 | #endif | ||
107 | 102 | ||
108 | 103 | ||
109 | /* mark for all API functions */ | ||
110 | #ifndef LUA_API | ||
111 | #define LUA_API extern | ||
112 | #endif | ||
113 | |||
114 | 104 | ||
115 | /* | 105 | /* |
116 | ** state manipulation | 106 | ** state manipulation |
@@ -310,22 +300,6 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud); | |||
310 | 300 | ||
311 | 301 | ||
312 | 302 | ||
313 | /* | ||
314 | ** {====================================================================== | ||
315 | ** useful definitions for Lua kernel and libraries | ||
316 | ** ======================================================================= | ||
317 | */ | ||
318 | |||
319 | /* formats for Lua numbers */ | ||
320 | #ifndef LUA_NUMBER_SCAN | ||
321 | #define LUA_NUMBER_SCAN "%lf" | ||
322 | #endif | ||
323 | |||
324 | #ifndef LUA_NUMBER_FMT | ||
325 | #define LUA_NUMBER_FMT "%.14g" | ||
326 | #endif | ||
327 | |||
328 | /* }====================================================================== */ | ||
329 | 303 | ||
330 | 304 | ||
331 | /* | 305 | /* |
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lundump.c,v 1.64 2003/08/27 21:01:44 roberto Exp roberto $ | 2 | ** $Id: lundump.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
3 | ** load pre-compiled Lua chunks | 3 | ** load pre-compiled Lua chunks |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define lundump_c | 7 | #define lundump_c |
8 | #define LUA_CORE | ||
8 | 9 | ||
9 | #include "lua.h" | 10 | #include "lua.h" |
10 | 11 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.2 2004/03/16 12:31:40 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.3 2004/03/26 14:02:41 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,10 +8,8 @@ | |||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <string.h> | 9 | #include <string.h> |
10 | 10 | ||
11 | /* needed only when `lua_number2str' uses `sprintf' */ | ||
12 | #include <stdio.h> | ||
13 | |||
14 | #define lvm_c | 11 | #define lvm_c |
12 | #define LUA_CORE | ||
15 | 13 | ||
16 | #include "lua.h" | 14 | #include "lua.h" |
17 | 15 | ||
@@ -29,12 +27,6 @@ | |||
29 | 27 | ||
30 | 28 | ||
31 | 29 | ||
32 | /* function to convert a lua_Number to a string */ | ||
33 | #ifndef lua_number2str | ||
34 | #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) | ||
35 | #endif | ||
36 | |||
37 | |||
38 | /* limit for table tag-method chains (to avoid loops) */ | 30 | /* limit for table tag-method chains (to avoid loops) */ |
39 | #define MAXTAGLOOP 100 | 31 | #define MAXTAGLOOP 100 |
40 | 32 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.c,v 1.27 2003/08/27 20:57:52 roberto Exp roberto $ | 2 | ** $Id: lzio.c,v 1.28 2003/11/18 10:44:53 roberto Exp roberto $ |
3 | ** a generic input stream interface | 3 | ** a generic input stream interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -8,6 +8,7 @@ | |||
8 | #include <string.h> | 8 | #include <string.h> |
9 | 9 | ||
10 | #define lzio_c | 10 | #define lzio_c |
11 | #define LUA_CORE | ||
11 | 12 | ||
12 | #include "lua.h" | 13 | #include "lua.h" |
13 | 14 | ||
@@ -1,5 +1,5 @@ | |||
1 | # | 1 | # |
2 | ## $Id: makefile,v 1.41 2003/04/07 20:11:53 roberto Exp roberto $ | 2 | ## $Id: makefile,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
3 | ## Makefile | 3 | ## Makefile |
4 | ## See Copyright Notice in lua.h | 4 | ## See Copyright Notice in lua.h |
5 | # | 5 | # |
@@ -10,11 +10,11 @@ | |||
10 | # -DEXTERNMEMCHECK -DHARDSTACKTESTS | 10 | # -DEXTERNMEMCHECK -DHARDSTACKTESTS |
11 | DEBUG = -g -DLUA_USER_H='"ltests.h"' | 11 | DEBUG = -g -DLUA_USER_H='"ltests.h"' |
12 | OPTIMIZE = -O2 \ | 12 | OPTIMIZE = -O2 \ |
13 | -D'lua_number2int(i,d)=__asm__("fldl %1\nfistpl %0":"=m"(i):"m"(d))' \ | ||
14 | # -fomit-frame-pointer | 13 | # -fomit-frame-pointer |
15 | 14 | ||
16 | 15 | ||
17 | CONFIG = $(DEBUG) $(OPTIMIZE) -DLUA_COMPATUPSYNTAX -DUSE_TMPNAME -DUSE_DLOPEN | 16 | # -DUSE_TMPNAME?? |
17 | CONFIG = $(DEBUG) $(OPTIMIZE) -DLUA_COMPATUPSYNTAX -DUSE_DLOPEN | ||
18 | 18 | ||
19 | 19 | ||
20 | # Compilation parameters | 20 | # Compilation parameters |
@@ -103,54 +103,58 @@ clear : | |||
103 | co $(CO_OPTIONS) $@ | 103 | co $(CO_OPTIONS) $@ |
104 | 104 | ||
105 | 105 | ||
106 | lapi.o: lapi.c lua.h lapi.h lobject.h llimits.h ldebug.h lstate.h ltm.h \ | 106 | lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \ |
107 | lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h lundump.h lvm.h | 107 | lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \ |
108 | lauxlib.o: lauxlib.c lua.h lauxlib.h | ||
109 | lbaselib.o: lbaselib.c lua.h lauxlib.h lualib.h | ||
110 | lcode.o: lcode.c lua.h lcode.h llex.h lobject.h llimits.h lzio.h lmem.h \ | ||
111 | lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h ldo.h lgc.h | ||
112 | ldblib.o: ldblib.c lua.h lauxlib.h lualib.h | ||
113 | ldebug.o: ldebug.c lua.h lapi.h lobject.h llimits.h lcode.h llex.h lzio.h \ | ||
114 | lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h ldo.h \ | ||
115 | lfunc.h lstring.h lgc.h lvm.h | ||
116 | ldo.o: ldo.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h lzio.h \ | ||
117 | lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h ltable.h lstring.h \ | ||
118 | lundump.h lvm.h | 108 | lundump.h lvm.h |
119 | ldump.o: ldump.c lua.h lobject.h llimits.h lopcodes.h lstate.h ltm.h \ | 109 | lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h |
120 | lzio.h lmem.h lundump.h | 110 | lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h |
121 | lfunc.o: lfunc.c lua.h lfunc.h lobject.h llimits.h lgc.h lmem.h lstate.h \ | 111 | lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ |
122 | ltm.h lzio.h | 112 | lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h \ |
123 | lgc.o: lgc.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h lzio.h \ | 113 | ldo.h lgc.h |
124 | lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h | 114 | ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h |
125 | liolib.o: liolib.c lua.h lauxlib.h lualib.h | 115 | ldebug.o: ldebug.c lua.h luaconf.h lapi.h lobject.h llimits.h lcode.h \ |
126 | llex.o: llex.c lua.h ldo.h lobject.h llimits.h lstate.h ltm.h lzio.h \ | ||
127 | lmem.h llex.h lparser.h ltable.h lstring.h lgc.h | ||
128 | lmathlib.o: lmathlib.c lua.h lauxlib.h lualib.h | ||
129 | lmem.o: lmem.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h lzio.h \ | ||
130 | lmem.h ldo.h | ||
131 | loadlib.o: loadlib.c lua.h lauxlib.h lualib.h | ||
132 | lobject.o: lobject.c lua.h ldo.h lobject.h llimits.h lstate.h ltm.h \ | ||
133 | lzio.h lmem.h lstring.h lgc.h lvm.h | ||
134 | lopcodes.o: lopcodes.c lua.h lobject.h llimits.h lopcodes.h | ||
135 | lparser.o: lparser.c lua.h lcode.h llex.h lobject.h llimits.h lzio.h \ | ||
136 | lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h ldo.h \ | ||
137 | lfunc.h lstring.h lgc.h | ||
138 | lstate.o: lstate.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ | ||
139 | lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h | ||
140 | lstring.o: lstring.c lua.h lmem.h llimits.h lobject.h lstate.h ltm.h \ | ||
141 | lzio.h lstring.h lgc.h | ||
142 | lstrlib.o: lstrlib.c lua.h lauxlib.h lualib.h | ||
143 | ltable.o: ltable.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ | ||
144 | lzio.h lmem.h ldo.h lgc.h ltable.h | ||
145 | ltablib.o: ltablib.c lua.h lauxlib.h lualib.h | ||
146 | ltests.o: ltests.c lua.h lapi.h lobject.h llimits.h lauxlib.h lcode.h \ | ||
147 | llex.h lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h \ | 116 | llex.h lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h \ |
148 | ltm.h ldo.h lfunc.h lstring.h lgc.h lualib.h | 117 | ltm.h ldo.h lfunc.h lstring.h lgc.h lvm.h |
149 | ltm.o: ltm.c lua.h lobject.h llimits.h lstate.h ltm.h lzio.h lmem.h \ | 118 | ldo.o: ldo.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ |
150 | lstring.h lgc.h ltable.h | 119 | lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h ltable.h \ |
151 | lua.o: lua.c lua.h lauxlib.h lualib.h | 120 | lstring.h lundump.h lvm.h |
152 | lundump.o: lundump.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ | 121 | ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lopcodes.h lstate.h \ |
153 | lzio.h lmem.h ldo.h lfunc.h lopcodes.h lstring.h lgc.h lundump.h | 122 | ltm.h lzio.h lmem.h lundump.h |
154 | lvm.o: lvm.c lua.h ldebug.h lstate.h lobject.h llimits.h ltm.h lzio.h \ | 123 | lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \ |
155 | lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h | 124 | lstate.h ltm.h lzio.h |
156 | lzio.o: lzio.c lua.h llimits.h lmem.h lstate.h lobject.h ltm.h lzio.h | 125 | lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ |
126 | lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h | ||
127 | liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h | ||
128 | llex.o: llex.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h ltm.h \ | ||
129 | lzio.h lmem.h llex.h lparser.h ltable.h lstring.h lgc.h | ||
130 | lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h | ||
131 | lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ | ||
132 | ltm.h lzio.h lmem.h ldo.h | ||
133 | loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h | ||
134 | lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \ | ||
135 | ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h | ||
136 | lopcodes.o: lopcodes.c lua.h luaconf.h lobject.h llimits.h lopcodes.h | ||
137 | lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ | ||
138 | lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h \ | ||
139 | ldo.h lfunc.h lstring.h lgc.h | ||
140 | lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ | ||
141 | ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h | ||
142 | lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \ | ||
143 | ltm.h lzio.h lstring.h lgc.h | ||
144 | lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h | ||
145 | ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ | ||
146 | ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h | ||
147 | ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h | ||
148 | ltests.o: ltests.c lua.h luaconf.h lapi.h lobject.h llimits.h lauxlib.h \ | ||
149 | lcode.h llex.h lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h \ | ||
150 | lstate.h ltm.h ldo.h lfunc.h lstring.h lgc.h lualib.h | ||
151 | ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \ | ||
152 | lmem.h lstring.h lgc.h ltable.h | ||
153 | lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h | ||
154 | lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
155 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lopcodes.h lstring.h lgc.h \ | ||
156 | lundump.h | ||
157 | lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ | ||
158 | lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h | ||
159 | lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ | ||
160 | lzio.h | ||