[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: patch for lua-5.2.0-alpha
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 5 Feb 2011 23:41:02 -0200
> It reports progname with the badoption error even if that error is
> "unrecognized option" rather than "needs argument".
Lua 5.2.0-alpha already does that. As far I as can see, the patch
simply replaces the original code
if (badoption[1] == 'e' || badoption[1] == 'l') {
luai_writestringerror("%s: ", progname);
luai_writestringerror("'%s' needs argument\n", badoption);
} else {
luai_writestringerror("%s: ", progname);
luai_writestringerror("unrecognized option '%s'\n", badoption);
}
with
luai_writestringerror("%s: ", progname);
if (badoption[1] == 'e' || badoption[1] == 'l')
luai_writestringerror("'%s' needs argument\n", badoption);
else
luai_writestringerror("unrecognized option '%s'\n", badoption);
thus saving one or two lines.
Thanks for the patch anyway.