diff options
| -rw-r--r-- | iolib.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** Input/output library to LUA | 3 | ** Input/output library to LUA |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_iolib="$Id: iolib.c,v 1.46 1996/05/27 14:06:58 roberto Exp roberto $"; | 6 | char *rcs_iolib="$Id: iolib.c,v 1.47 1996/08/01 14:55:33 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <stdio.h> | 8 | #include <stdio.h> |
| 9 | #include <ctype.h> | 9 | #include <ctype.h> |
| @@ -16,7 +16,7 @@ char *rcs_iolib="$Id: iolib.c,v 1.46 1996/05/27 14:06:58 roberto Exp roberto $"; | |||
| 16 | #include "luadebug.h" | 16 | #include "luadebug.h" |
| 17 | #include "lualib.h" | 17 | #include "lualib.h" |
| 18 | 18 | ||
| 19 | static FILE *in=stdin, *out=stdout; | 19 | static FILE *in, *out; |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | #ifdef POPEN | 22 | #ifdef POPEN |
| @@ -598,6 +598,7 @@ static struct lua_reg iolib[] = { | |||
| 598 | 598 | ||
| 599 | void iolib_open (void) | 599 | void iolib_open (void) |
| 600 | { | 600 | { |
| 601 | in=stdin; out=stdout; | ||
| 601 | luaI_openlib(iolib, (sizeof(iolib)/sizeof(iolib[0]))); | 602 | luaI_openlib(iolib, (sizeof(iolib)/sizeof(iolib[0]))); |
| 602 | lua_setfallback("error", errorfb); | 603 | lua_setfallback("error", errorfb); |
| 603 | } | 604 | } |
