Remove use of printf() in luajit.c.

This commit is contained in:
Mike Pall 2013-05-18 13:48:32 +02:00
parent fe87736777
commit e2db3f697c

View File

@ -61,8 +61,9 @@ static void laction(int i)
static void print_usage(void)
{
fprintf(stderr,
"usage: %s [options]... [script [args]...].\n"
fputs("usage: ", stderr);
fputs(progname, stderr);
fputs(" [options]... [script [args]...].\n"
"Available options are:\n"
" -e chunk Execute string " LUA_QL("chunk") ".\n"
" -l name Require library " LUA_QL("name") ".\n"
@ -73,16 +74,14 @@ static void print_usage(void)
" -v Show version information.\n"
" -E Ignore environment variables.\n"
" -- Stop handling options.\n"
" - Execute stdin and stop handling options.\n"
,
progname);
" - Execute stdin and stop handling options.\n", stderr);
fflush(stderr);
}
static void l_message(const char *pname, const char *msg)
{
if (pname) fprintf(stderr, "%s: ", pname);
fprintf(stderr, "%s\n", msg);
if (pname) { fputs(pname, stderr); fputc(':', stderr); fputc(' ', stderr); }
fputs(msg, stderr); fputc('\n', stderr);
fflush(stderr);
}