aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2012-06-06 14:17:15 +0200
committerMike Pall <mike>2012-06-06 14:17:15 +0200
commit0bd1a66f2f055211ef55834ccebca3b82d03c735 (patch)
tree95f107af138a6bb613f02b3edffc0706edd6f743 /src
parent9ab2ae8d46fc68a9790c7bfc7b97656738c0a840 (diff)
downloadluajit-0bd1a66f2f055211ef55834ccebca3b82d03c735.tar.gz
luajit-0bd1a66f2f055211ef55834ccebca3b82d03c735.tar.bz2
luajit-0bd1a66f2f055211ef55834ccebca3b82d03c735.zip
Print version and JIT status to stdout, not stderr.
Diffstat (limited to 'src')
-rw-r--r--src/luajit.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/luajit.c b/src/luajit.c
index ecf4ef26..b4044d22 100644
--- a/src/luajit.c
+++ b/src/luajit.c
@@ -133,8 +133,7 @@ static int docall(lua_State *L, int narg, int clear)
133 133
134static void print_version(void) 134static void print_version(void)
135{ 135{
136 fprintf(stderr, 136 fputs(LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n", stdout);
137 LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n");
138} 137}
139 138
140static void print_jit_status(lua_State *L) 139static void print_jit_status(lua_State *L)
@@ -148,10 +147,12 @@ static void print_jit_status(lua_State *L)
148 lua_remove(L, -2); 147 lua_remove(L, -2);
149 n = lua_gettop(L); 148 n = lua_gettop(L);
150 lua_call(L, 0, LUA_MULTRET); 149 lua_call(L, 0, LUA_MULTRET);
151 fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stderr); 150 fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stdout);
152 for (n++; (s = lua_tostring(L, n)); n++) 151 for (n++; (s = lua_tostring(L, n)); n++) {
153 fprintf(stderr, " %s", s); 152 putc(' ', stdout);
154 fputs("\n", stderr); 153 fputs(s, stdout);
154 }
155 putc('\n', stdout);
155} 156}
156 157
157static int getargs(lua_State *L, char **argv, int n) 158static int getargs(lua_State *L, char **argv, int n)