diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-02-07 10:27:13 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-02-07 10:27:13 -0200 |
commit | 094a7d0290bbbe248d9d29b28c2567283d5ad0ba (patch) | |
tree | 51e7a1a6fae90911d4cf10105a7bebbef13d658f | |
parent | 7cc0e63d8a5bd45eabd328c398f02a933e07746d (diff) | |
download | lua-094a7d0290bbbe248d9d29b28c2567283d5ad0ba.tar.gz lua-094a7d0290bbbe248d9d29b28c2567283d5ad0ba.tar.bz2 lua-094a7d0290bbbe248d9d29b28c2567283d5ad0ba.zip |
detail in 'print_usage'
-rw-r--r-- | lua.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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 | ||
108 | static void print_usage (const char *badoption) { | 108 | static 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" |