From 0f580df73c35d7743df43476b1ab4a6456c6b6cd Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 28 Nov 1994 15:12:49 -0200 Subject: [PATCH] 'main' returns condition code --- lua.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua.c b/lua.c index 73391a7f..b292ec7b 100644 --- a/lua.c +++ b/lua.c @@ -3,7 +3,7 @@ ** Linguagem para Usuarios de Aplicacao */ -char *rcs_lua="$Id: $"; +char *rcs_lua="$Id: lua.c,v 1.1 1993/12/17 18:41:19 celes Stab roberto $"; #include @@ -11,9 +11,10 @@ char *rcs_lua="$Id: $"; #include "lualib.h" -void main (int argc, char *argv[]) +int main (int argc, char *argv[]) { int i; + int result = 0; iolib_open (); strlib_open (); mathlib_open (); @@ -21,11 +22,12 @@ void main (int argc, char *argv[]) { char buffer[250]; while (gets(buffer) != 0) - lua_dostring(buffer); + result = lua_dostring(buffer); } else for (i=1; i