mirror of
https://github.com/lua/lua
synced 2024-12-24 19:36:50 +03:00
detail in 'print_usage'
This commit is contained in:
parent
7cc0e63d8a
commit
094a7d0290
10
lua.c
10
lua.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.c,v 1.194 2010/10/25 19:01:37 roberto Exp roberto $
|
** $Id: lua.c,v 1.195 2010/12/03 17:20:50 roberto Exp roberto $
|
||||||
** Lua stand-alone interpreter
|
** Lua stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -106,13 +106,11 @@ static void laction (int i) {
|
|||||||
|
|
||||||
|
|
||||||
static void print_usage (const char *badoption) {
|
static void print_usage (const char *badoption) {
|
||||||
if (badoption[1] == 'e' || badoption[1] == 'l') {
|
luai_writestringerror("%s: ", progname);
|
||||||
luai_writestringerror("%s: ", progname);
|
if (badoption[1] == 'e' || badoption[1] == 'l')
|
||||||
luai_writestringerror("'%s' needs argument\n", badoption);
|
luai_writestringerror("'%s' needs argument\n", badoption);
|
||||||
} else {
|
else
|
||||||
luai_writestringerror("%s: ", progname);
|
|
||||||
luai_writestringerror("unrecognized option '%s'\n", badoption);
|
luai_writestringerror("unrecognized option '%s'\n", badoption);
|
||||||
}
|
|
||||||
luai_writestringerror(
|
luai_writestringerror(
|
||||||
"usage: %s [options] [script [args]]\n"
|
"usage: %s [options] [script [args]]\n"
|
||||||
"Available options are:\n"
|
"Available options are:\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user