diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-09 11:50:16 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-09 11:50:16 -0300 |
| commit | 44b71ca81696dbec561c0172d1b81533f1c2153e (patch) | |
| tree | 1394282cedc0766c214d6a15d0e3503ab4684a1d /liolib.c | |
| parent | bad6365540ad9e17e51137a6797ff196d6b8d2a1 (diff) | |
| download | lua-44b71ca81696dbec561c0172d1b81533f1c2153e.tar.gz lua-44b71ca81696dbec561c0172d1b81533f1c2153e.tar.bz2 lua-44b71ca81696dbec561c0172d1b81533f1c2153e.zip | |
defines for _ERRORMESSAGE and _ALERT
Diffstat (limited to 'liolib.c')
| -rw-r--r-- | liolib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: liolib.c,v 1.61 2000/03/30 17:19:48 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 1.62 2000/04/24 21:05:11 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 | */ |
| @@ -537,7 +537,7 @@ static void errorfb (lua_State *L) { | |||
| 537 | char buff[MAXMESSAGE]; | 537 | char buff[MAXMESSAGE]; |
| 538 | int level = 1; /* skip level 0 (it's this function) */ | 538 | int level = 1; /* skip level 0 (it's this function) */ |
| 539 | lua_Debug ar; | 539 | lua_Debug ar; |
| 540 | lua_Object alertfunc = lua_rawgetglobal(L, "_ALERT"); | 540 | lua_Object alertfunc = lua_rawgetglobal(L, LUA_ALERT); |
| 541 | sprintf(buff, "error: %.200s\n", lua_getstring(L, lua_getparam(L, 1))); | 541 | sprintf(buff, "error: %.200s\n", lua_getstring(L, lua_getparam(L, 1))); |
| 542 | while (lua_getstack(L, level++, &ar)) { | 542 | while (lua_getstack(L, level++, &ar)) { |
| 543 | char buffchunk[60]; | 543 | char buffchunk[60]; |
| @@ -585,7 +585,7 @@ static void errorfb (lua_State *L) { | |||
| 585 | 585 | ||
| 586 | 586 | ||
| 587 | static const struct luaL_reg iolib[] = { | 587 | static const struct luaL_reg iolib[] = { |
| 588 | {"_ERRORMESSAGE", errorfb}, | 588 | {LUA_ERRORMESSAGE, errorfb}, |
| 589 | {"clock", io_clock}, | 589 | {"clock", io_clock}, |
| 590 | {"date", io_date}, | 590 | {"date", io_date}, |
| 591 | {"debug", io_debug}, | 591 | {"debug", io_debug}, |
