aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-02-07 10:27:13 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-02-07 10:27:13 -0200
commit094a7d0290bbbe248d9d29b28c2567283d5ad0ba (patch)
tree51e7a1a6fae90911d4cf10105a7bebbef13d658f
parent7cc0e63d8a5bd45eabd328c398f02a933e07746d (diff)
downloadlua-094a7d0290bbbe248d9d29b28c2567283d5ad0ba.tar.gz
lua-094a7d0290bbbe248d9d29b28c2567283d5ad0ba.tar.bz2
lua-094a7d0290bbbe248d9d29b28c2567283d5ad0ba.zip
detail in 'print_usage'
-rw-r--r--lua.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lua.c b/lua.c
index efb4ee2a..6621eaba 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.194 2010/10/25 19:01:37 roberto Exp roberto $ 2** $Id: lua.c,v 1.195 2010/12/03 17:20:50 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*/
@@ -106,13 +106,11 @@ static void laction (int i) {
106 106
107 107
108static void print_usage (const char *badoption) { 108static void print_usage (const char *badoption) {
109 if (badoption[1] == 'e' || badoption[1] == 'l') { 109 luai_writestringerror("%s: ", progname);
110 luai_writestringerror("%s: ", progname); 110 if (badoption[1] == 'e' || badoption[1] == 'l')
111 luai_writestringerror("'%s' needs argument\n", badoption); 111 luai_writestringerror("'%s' needs argument\n", badoption);
112 } else { 112 else
113 luai_writestringerror("%s: ", progname);
114 luai_writestringerror("unrecognized option '%s'\n", badoption); 113 luai_writestringerror("unrecognized option '%s'\n", badoption);
115 }
116 luai_writestringerror( 114 luai_writestringerror(
117 "usage: %s [options] [script [args]]\n" 115 "usage: %s [options] [script [args]]\n"
118 "Available options are:\n" 116 "Available options are:\n"