On Sat, Oct 29, 2016 at 08:42:12PM +0200, Laslo Hunhold wrote:
On Fri, 28 Oct 2016 14:40:01 +0200
Klemens Nanni wrote:
Returning -1 upon a valid invocation like 'dwm -v' is just wrong.
I agree, but we should get rid of this EXIT_* stuff altogether.
My proposal:
if (argc == 2 && !str
> I agree, but we should get rid of this EXIT_* stuff altogether.
> My proposal:
>
> if (argc == 2 && !strcmp("-v", argv[1])) {
> fputs("dwm-"VERSION, stdout);
> return 0;
> } else if (argc != 1)
> die("usage: dwm [-v]");
>
> What do you guys
On Fri, 28 Oct 2016 14:40:01 +0200
Klemens Nanni wrote:
> Returning -1 upon a valid invocation like 'dwm -v' is just wrong.
I agree, but we should get rid of this EXIT_* stuff altogether.
My proposal:
if (argc == 2 && !strcmp("-v", argv[1])) {
fputs("dwm-"VERSION, stdout
On Fri, Oct 28, 2016 at 03:58:14PM +0200, Martin Kühne wrote:
> IMHO, when failing to parse command line arguments, usage() should be
> called before exiting with EXIT_FAILURE.
> on invocation with -h|--help, it should exit with EXIT_SUCCESS.
>
> cheers!
> mar77i
This sounds sane and solves the p
IMHO, when failing to parse command line arguments, usage() should be
called before exiting with EXIT_FAILURE.
on invocation with -h|--help, it should exit with EXIT_SUCCESS.
cheers!
mar77i
> > If not, that's your fault (or the packager you trust do to it for
> > you, actually again your responsability).
>
> Blaming someone else won't solve the issue.
Exactly, hence “your responsability”.
On 2016-10-28 13:21, Quentin Rameau wrote:
On 2016-10-28 13:02, Quentin Rameau wrote:
> On Fri, Oct 28, 2016 at 12:45:14PM +, Ali H. Fardan wrote:
>> actually, imo, I think
>> usage() should return success.
> Surely not.
> The call to usage() is made when wrong options have been passed to
> t
> On 2016-10-28 13:02, Quentin Rameau wrote:
> > On Fri, Oct 28, 2016 at 12:45:14PM +, Ali H. Fardan wrote:
> >> actually, imo, I think
> >> usage() should return success.
> > Surely not.
> > The call to usage() is made when wrong options have been passed to
> > the tool, you wouldn't retur
On 2016-10-28 13:02, Quentin Rameau wrote:
On Fri, Oct 28, 2016 at 12:45:14PM +, Ali H. Fardan wrote:
actually, imo, I think
usage() should return success.
Surely not.
The call to usage() is made when wrong options have been passed to the
tool, you wouldn't return “no error” code when there
I don't think -v should output to stderr either, actually, imo, I think
usage() should return success.
On 2016-10-28 12:40, Klemens Nanni wrote:
Returning -1 upon a valid invocation like 'dwm -v' is just wrong.
---
dwm.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/
10 matches
Mail list logo