diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-01-23 16:43:07 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-01-23 16:43:07 -0200 |
| commit | 445872a6e2ee7a7ae030a8e2f8a5526f95f08f4c (patch) | |
| tree | 54d477072fc7282769d6c48349c45bd9d91411d0 /opcode.c | |
| parent | 3681d025accc24c107da07c36f701596fa20806f (diff) | |
| download | lua-445872a6e2ee7a7ae030a8e2f8a5526f95f08f4c.tar.gz lua-445872a6e2ee7a7ae030a8e2f8a5526f95f08f4c.tar.bz2 lua-445872a6e2ee7a7ae030a8e2f8a5526f95f08f4c.zip | |
"dofile" does not issue a warning when unable to open the file,
but only returns an error code.
Diffstat (limited to 'opcode.c')
| -rw-r--r-- | opcode.c | 8 |
1 files changed, 2 insertions, 6 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.52 1996/01/09 20:22:44 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| @@ -520,12 +520,8 @@ int lua_call (char *funcname) | |||
| 520 | int lua_dofile (char *filename) | 520 | int lua_dofile (char *filename) |
| 521 | { | 521 | { |
| 522 | int status; | 522 | int status; |
| 523 | char *message = lua_openfile (filename); | 523 | if (lua_openfile(filename)) |
| 524 | if (message) | ||
| 525 | { | ||
| 526 | lua_message(message); | ||
| 527 | return 1; | 524 | return 1; |
| 528 | } | ||
| 529 | status = do_protectedmain(); | 525 | status = do_protectedmain(); |
| 530 | lua_closefile(); | 526 | lua_closefile(); |
| 531 | return status; | 527 | return status; |
