aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-05-03 17:10:59 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-05-03 17:10:59 -0300
commit01ea523b80b347e62b2d653c652dbdc374ef08fb (patch)
tree6bffa9b6690396926564d9a0dc6bb9edb4f8fb51
parent88cf0836fc76f85040b638ac3888b2340e7e9ac0 (diff)
downloadlua-01ea523b80b347e62b2d653c652dbdc374ef08fb.tar.gz
lua-01ea523b80b347e62b2d653c652dbdc374ef08fb.tar.bz2
lua-01ea523b80b347e62b2d653c652dbdc374ef08fb.zip
small corrections.
-rw-r--r--iolib.c5
-rw-r--r--lua.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/iolib.c b/iolib.c
index a5c26a0e..861665ee 100644
--- a/iolib.c
+++ b/iolib.c
@@ -3,11 +3,10 @@
3** Input/output library to LUA 3** Input/output library to LUA
4*/ 4*/
5 5
6char *rcs_iolib="$Id: iolib.c,v 1.42 1996/04/23 12:43:07 roberto Exp roberto $"; 6char *rcs_iolib="$Id: iolib.c,v 1.43 1996/04/30 21:13:55 roberto Exp roberto $";
7 7
8#include <stdio.h> 8#include <stdio.h>
9#include <ctype.h> 9#include <ctype.h>
10#include <sys/types.h>
11#include <string.h> 10#include <string.h>
12#include <time.h> 11#include <time.h>
13#include <stdlib.h> 12#include <stdlib.h>
@@ -546,7 +545,7 @@ static void io_debug (void)
546} 545}
547 546
548 547
549void lua_printstack (FILE *f) 548static void lua_printstack (FILE *f)
550{ 549{
551 int level = 0; 550 int level = 0;
552 lua_Object func; 551 lua_Object func;
diff --git a/lua.c b/lua.c
index b8a093d4..e755993c 100644
--- a/lua.c
+++ b/lua.c
@@ -3,7 +3,7 @@
3** Linguagem para Usuarios de Aplicacao 3** Linguagem para Usuarios de Aplicacao
4*/ 4*/
5 5
6char *rcs_lua="$Id: lua.c,v 1.8 1996/03/12 13:14:52 roberto Exp roberto $"; 6char *rcs_lua="$Id: lua.c,v 1.9 1996/04/23 12:43:07 roberto Exp roberto $";
7 7
8#include <stdio.h> 8#include <stdio.h>
9#include <string.h> 9#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 $";
14static int lua_argc; 14static int lua_argc;
15static char **lua_argv; 15static char **lua_argv;
16 16
17#ifdef POSIX
17/* 18/*
18** although this function is POSIX, there is no standard header file that 19** although this function is POSIX, there is no standard header file that
19** defines it 20** defines it
20*/ 21*/
21int isatty (int fd); 22int isatty (int fd);
23#else
24#define isatty(x) (x==0) /* assume stdin is a tty */
25#endif
22 26
23/* 27/*
24%F Allow Lua code to access argv strings. 28%F Allow Lua code to access argv strings.
@@ -83,7 +87,11 @@ int main (int argc, char *argv[])
83 printf("%s %s\n(written by %s)\n\n", 87 printf("%s %s\n(written by %s)\n\n",
84 LUA_VERSION, LUA_COPYRIGHT, LUA_AUTHORS); 88 LUA_VERSION, LUA_COPYRIGHT, LUA_AUTHORS);
85 else 89 else
90 {
86 result = lua_dofile (argv[i]); 91 result = lua_dofile (argv[i]);
92 if (result)
93 fprintf(stderr, "lua: error trying to run file %s\n", argv[i]);
94 }
87 } 95 }
88 } 96 }
89 return result; 97 return result;