mirror of https://github.com/rusefi/lua.git
'main' returns condition code
This commit is contained in:
parent
2b301d711b
commit
0f580df73c
10
lua.c
10
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 <stdio.h>
|
||||
|
||||
|
@ -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<argc; i++)
|
||||
lua_dofile (argv[i]);
|
||||
result = lua_dofile (argv[i]);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue