aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-11 14:38:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-11 14:38:42 -0300
commit787a78f83e0484c9e9698189982e2f309808fae8 (patch)
tree0682eddf4ea5a49bf5078bac937a36f90057df57 /ldo.c
parent70c8a310925d6c41c3ef4f7feeae604a4c9a3a95 (diff)
downloadlua-787a78f83e0484c9e9698189982e2f309808fae8.tar.gz
lua-787a78f83e0484c9e9698189982e2f309808fae8.tar.bz2
lua-787a78f83e0484c9e9698189982e2f309808fae8.zip
new scheme for buffers
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index a06fa138..1fd993c7 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 1.92 2000/08/31 13:31:44 roberto Exp roberto $ 2** $Id: ldo.c,v 1.93 2000/09/04 18:52:51 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -293,7 +293,8 @@ static int parse_file (lua_State *L, const char *filename) {
293 int c; /* look ahead char */ 293 int c; /* look ahead char */
294 FILE *f = (filename == NULL) ? stdin : fopen(filename, "r"); 294 FILE *f = (filename == NULL) ? stdin : fopen(filename, "r");
295 if (f == NULL) return LUA_ERRFILE; /* unable to open file */ 295 if (f == NULL) return LUA_ERRFILE; /* unable to open file */
296 luaL_filesource(source, filename, sizeof(source)); 296 if (filename == NULL) filename = "(stdin)";
297 sprintf(source, "@%.*s", (int)sizeof(source)-2, filename);
297 c = fgetc(f); 298 c = fgetc(f);
298 ungetc(c, f); 299 ungetc(c, f);
299 bin = (c == ID_CHUNK); 300 bin = (c == ID_CHUNK);