1993-07-28 17:18:00 +04:00
|
|
|
/*
|
|
|
|
** lua.c
|
|
|
|
** Linguagem para Usuarios de Aplicacao
|
|
|
|
*/
|
|
|
|
|
1993-12-17 21:41:19 +03:00
|
|
|
char *rcs_lua="$Id: $";
|
|
|
|
|
1993-07-28 17:18:00 +04:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "lua.h"
|
|
|
|
#include "lualib.h"
|
|
|
|
|
|
|
|
|
|
|
|
void main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
iolib_open ();
|
|
|
|
strlib_open ();
|
|
|
|
mathlib_open ();
|
1993-12-17 21:41:19 +03:00
|
|
|
if (argc < 2)
|
1993-07-28 17:18:00 +04:00
|
|
|
{
|
1993-12-17 21:41:19 +03:00
|
|
|
char buffer[250];
|
|
|
|
while (gets(buffer) != 0)
|
|
|
|
lua_dostring(buffer);
|
1993-07-28 17:18:00 +04:00
|
|
|
}
|
1993-12-17 21:41:19 +03:00
|
|
|
else
|
|
|
|
for (i=1; i<argc; i++)
|
|
|
|
lua_dofile (argv[i]);
|
1993-07-28 17:18:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|