diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-09-06 14:19:33 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-09-06 14:19:33 -0300 |
| commit | 506c89cef8b197440b07060811379c9cb4413e68 (patch) | |
| tree | 8f39483c99c36e03838e035e28f27c98d8c6027d | |
| parent | 8ead2ec35800b981480212725d2d3eeb19f4bea0 (diff) | |
| download | lua-506c89cef8b197440b07060811379c9cb4413e68.tar.gz lua-506c89cef8b197440b07060811379c9cb4413e68.tar.bz2 lua-506c89cef8b197440b07060811379c9cb4413e68.zip | |
just in case, flush all output
| -rw-r--r-- | lua.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.148 2005/08/25 19:55:38 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.149 2005/08/26 17:32:05 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -50,12 +50,14 @@ static void print_usage (void) { | |||
| 50 | " -v show version information\n" | 50 | " -v show version information\n" |
| 51 | " -- stop handling options\n" , | 51 | " -- stop handling options\n" , |
| 52 | progname); | 52 | progname); |
| 53 | fflush(stderr); | ||
| 53 | } | 54 | } |
| 54 | 55 | ||
| 55 | 56 | ||
| 56 | static void l_message (const char *pname, const char *msg) { | 57 | static void l_message (const char *pname, const char *msg) { |
| 57 | if (pname) fprintf(stderr, "%s: ", pname); | 58 | if (pname) fprintf(stderr, "%s: ", pname); |
| 58 | fprintf(stderr, "%s\n", msg); | 59 | fprintf(stderr, "%s\n", msg); |
| 60 | fflush(stderr); | ||
| 59 | } | 61 | } |
| 60 | 62 | ||
| 61 | 63 | ||
| @@ -222,6 +224,7 @@ static void dotty (lua_State *L) { | |||
| 222 | } | 224 | } |
| 223 | lua_settop(L, 0); /* clear stack */ | 225 | lua_settop(L, 0); /* clear stack */ |
| 224 | fputs("\n", stdout); | 226 | fputs("\n", stdout); |
| 227 | fflush(stdout); | ||
| 225 | progname = oldprogname; | 228 | progname = oldprogname; |
| 226 | } | 229 | } |
| 227 | 230 | ||
