diff options
| -rw-r--r-- | inout.c | 10 | ||||
| -rw-r--r-- | inout.h | 3 |
2 files changed, 11 insertions, 2 deletions
| @@ -5,7 +5,7 @@ | |||
| 5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | char *rcs_inout="$Id: inout.c,v 2.7 1994/11/03 22:34:29 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.8 1994/11/07 16:34:44 roberto Exp roberto $"; |
| 9 | 9 | ||
| 10 | #include <stdio.h> | 10 | #include <stdio.h> |
| 11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
| @@ -264,3 +264,11 @@ void lua_obj2number (void) | |||
| 264 | lua_pushnil(); | 264 | lua_pushnil(); |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | |||
| 268 | void luaI_error (void) | ||
| 269 | { | ||
| 270 | char *s = lua_getstring(lua_getparam(1)); | ||
| 271 | if (s == NULL) s = "(no message)"; | ||
| 272 | lua_error(s); | ||
| 273 | } | ||
| 274 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: inout.h,v 1.3 1994/11/02 20:29:39 roberto Exp roberto $ | 2 | ** $Id: inout.h,v 1.4 1994/11/03 22:34:29 roberto Exp roberto $ |
| 3 | */ | 3 | */ |
| 4 | 4 | ||
| 5 | 5 | ||
| @@ -23,5 +23,6 @@ void lua_internaldostring (void); | |||
| 23 | void lua_print (void); | 23 | void lua_print (void); |
| 24 | void luaI_type (void); | 24 | void luaI_type (void); |
| 25 | void lua_obj2number (void); | 25 | void lua_obj2number (void); |
| 26 | void luaI_error (void); | ||
| 26 | 27 | ||
| 27 | #endif | 28 | #endif |
