[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: patch for lua-5.2.0-alpha
- From: François Perrad <francois.perrad@...>
- Date: Sat, 5 Feb 2011 19:36:27 +0100
a small patch for lua-5.2.0-alpha, no functional change.
François
diff --git a/src/lua.c b/src/lua.c
index fe2f069..a5f6e56 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -106,13 +106,11 @@ static void laction (int i) {
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);
- } else {
- luai_writestringerror("%s: ", progname);
+ else
luai_writestringerror("unrecognized option '%s'\n", badoption);
- }
luai_writestringerror(
"usage: %s [options] [script [args]]\n"
"Available options are:\n"