diff options
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Linguagem para Usuarios de Aplicacao | 3 | ** Linguagem para Usuarios de Aplicacao |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_lua="$Id: lua.c,v 1.12 1996/07/05 20:55:43 roberto Exp roberto $"; | 6 | char *rcs_lua="$Id: lua.c,v 1.13 1996/07/06 20:20:35 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -21,11 +21,13 @@ char *rcs_lua="$Id: lua.c,v 1.12 1996/07/05 20:55:43 roberto Exp roberto $"; | |||
21 | 21 | ||
22 | static void manual_input (void) | 22 | static void manual_input (void) |
23 | { | 23 | { |
24 | if (isatty(0)) | 24 | if (isatty(0)) { |
25 | { | 25 | char buffer[250]; |
26 | char buffer[250]; | 26 | while (fgets(buffer, sizeof(buffer), stdin) != 0) { |
27 | while (fgets(buffer, sizeof(buffer), stdin) != 0) | 27 | lua_beginblock(); |
28 | lua_dostring(buffer); | 28 | lua_dostring(buffer); |
29 | lua_endblock(); | ||
30 | } | ||
29 | } | 31 | } |
30 | else | 32 | else |
31 | lua_dofile(NULL); /* executes stdin as a file */ | 33 | lua_dofile(NULL); /* executes stdin as a file */ |