1
0
mirror of https://github.com/lua/lua.git synced 2025-01-14 05:43:00 +08:00
lua/lua.c

32 lines
396 B
C
Raw Normal View History

1993-07-28 10:18:00 -03:00
/*
** lua.c
** Linguagem para Usuarios de Aplicacao
*/
1993-12-17 16:41:19 -02:00
char *rcs_lua="$Id: $";
1993-07-28 10:18:00 -03: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 16:41:19 -02:00
if (argc < 2)
1993-07-28 10:18:00 -03:00
{
1993-12-17 16:41:19 -02:00
char buffer[250];
while (gets(buffer) != 0)
lua_dostring(buffer);
1993-07-28 10:18:00 -03:00
}
1993-12-17 16:41:19 -02:00
else
for (i=1; i<argc; i++)
lua_dofile (argv[i]);
1993-07-28 10:18:00 -03:00
}