mirror of
https://github.com/lua/lua
synced 2024-12-31 22:54:25 +03:00
small corrections.
This commit is contained in:
parent
88cf0836fc
commit
01ea523b80
5
iolib.c
5
iolib.c
@ -3,11 +3,10 @@
|
||||
** Input/output library to LUA
|
||||
*/
|
||||
|
||||
char *rcs_iolib="$Id: iolib.c,v 1.42 1996/04/23 12:43:07 roberto Exp roberto $";
|
||||
char *rcs_iolib="$Id: iolib.c,v 1.43 1996/04/30 21:13:55 roberto Exp roberto $";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
@ -546,7 +545,7 @@ static void io_debug (void)
|
||||
}
|
||||
|
||||
|
||||
void lua_printstack (FILE *f)
|
||||
static void lua_printstack (FILE *f)
|
||||
{
|
||||
int level = 0;
|
||||
lua_Object func;
|
||||
|
10
lua.c
10
lua.c
@ -3,7 +3,7 @@
|
||||
** Linguagem para Usuarios de Aplicacao
|
||||
*/
|
||||
|
||||
char *rcs_lua="$Id: lua.c,v 1.8 1996/03/12 13:14:52 roberto Exp roberto $";
|
||||
char *rcs_lua="$Id: lua.c,v 1.9 1996/04/23 12:43:07 roberto Exp roberto $";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -14,11 +14,15 @@ char *rcs_lua="$Id: lua.c,v 1.8 1996/03/12 13:14:52 roberto Exp roberto $";
|
||||
static int lua_argc;
|
||||
static char **lua_argv;
|
||||
|
||||
#ifdef POSIX
|
||||
/*
|
||||
** although this function is POSIX, there is no standard header file that
|
||||
** defines it
|
||||
*/
|
||||
int isatty (int fd);
|
||||
#else
|
||||
#define isatty(x) (x==0) /* assume stdin is a tty */
|
||||
#endif
|
||||
|
||||
/*
|
||||
%F Allow Lua code to access argv strings.
|
||||
@ -83,7 +87,11 @@ int main (int argc, char *argv[])
|
||||
printf("%s %s\n(written by %s)\n\n",
|
||||
LUA_VERSION, LUA_COPYRIGHT, LUA_AUTHORS);
|
||||
else
|
||||
{
|
||||
result = lua_dofile (argv[i]);
|
||||
if (result)
|
||||
fprintf(stderr, "lua: error trying to run file %s\n", argv[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user