mirror of
https://github.com/lua/lua
synced 2024-11-22 04:41:23 +03:00
32 lines
396 B
C
32 lines
396 B
C
/*
|
|
** lua.c
|
|
** Linguagem para Usuarios de Aplicacao
|
|
*/
|
|
|
|
char *rcs_lua="$Id: $";
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "lua.h"
|
|
#include "lualib.h"
|
|
|
|
|
|
void main (int argc, char *argv[])
|
|
{
|
|
int i;
|
|
iolib_open ();
|
|
strlib_open ();
|
|
mathlib_open ();
|
|
if (argc < 2)
|
|
{
|
|
char buffer[250];
|
|
while (gets(buffer) != 0)
|
|
lua_dostring(buffer);
|
|
}
|
|
else
|
|
for (i=1; i<argc; i++)
|
|
lua_dofile (argv[i]);
|
|
}
|
|
|
|
|