mirror of
https://github.com/lua/lua.git
synced 2025-02-04 06:13:04 +08:00
just in case, flush all output
This commit is contained in:
parent
8ead2ec358
commit
506c89cef8
5
lua.c
5
lua.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.c,v 1.148 2005/08/25 19:55:38 roberto Exp roberto $
|
** $Id: lua.c,v 1.149 2005/08/26 17:32:05 roberto Exp roberto $
|
||||||
** Lua stand-alone interpreter
|
** Lua stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -50,12 +50,14 @@ static void print_usage (void) {
|
|||||||
" -v show version information\n"
|
" -v show version information\n"
|
||||||
" -- stop handling options\n" ,
|
" -- stop handling options\n" ,
|
||||||
progname);
|
progname);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void l_message (const char *pname, const char *msg) {
|
static void l_message (const char *pname, const char *msg) {
|
||||||
if (pname) fprintf(stderr, "%s: ", pname);
|
if (pname) fprintf(stderr, "%s: ", pname);
|
||||||
fprintf(stderr, "%s\n", msg);
|
fprintf(stderr, "%s\n", msg);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -222,6 +224,7 @@ static void dotty (lua_State *L) {
|
|||||||
}
|
}
|
||||||
lua_settop(L, 0); /* clear stack */
|
lua_settop(L, 0); /* clear stack */
|
||||||
fputs("\n", stdout);
|
fputs("\n", stdout);
|
||||||
|
fflush(stdout);
|
||||||
progname = oldprogname;
|
progname = oldprogname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user