summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lua.c b/lua.c
index a58e87ad..d5622d86 100644
--- a/lua.c
+++ b/lua.c
@@ -3,7 +3,7 @@
3** Linguagem para Usuarios de Aplicacao 3** Linguagem para Usuarios de Aplicacao
4*/ 4*/
5 5
6char *rcs_lua="$Id: lua.c,v 1.12 1996/07/05 20:55:43 roberto Exp roberto $"; 6char *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
22static void manual_input (void) 22static 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 */