diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-10-16 18:22:34 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-10-16 18:22:34 -0200 |
| commit | 37bf74efb7902cfc075c0249bff513187668adae (patch) | |
| tree | c7a0c6e053a3ec73e78117d0049ae59cb8d99955 | |
| parent | 8c37d3b9d6e9960fb2a81e2218c28206d4e5298c (diff) | |
| download | lua-37bf74efb7902cfc075c0249bff513187668adae.tar.gz lua-37bf74efb7902cfc075c0249bff513187668adae.tar.bz2 lua-37bf74efb7902cfc075c0249bff513187668adae.zip | |
some compilers do not accept "stdin"/"stdout" as constants.
| -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 | } |
