On Sat, Oct 29, 2016 at 10:49:03PM +0200, Klemens Nanni wrote:
arg.h is really ugly code and way to complex for tools like slock that
have such minimal synopsis.
it's a bit of "macro magic", but not really that complex if you think
about it. Also, the usage within the code is dead simple and
st
On Sat, Oct 29, 2016 at 08:39:07PM +0200, Laslo Hunhold wrote:
On Fri, 28 Oct 2016 22:56:14 +0200
Klemens Nanni wrote:
Hey Klemens,
arg.h is really ugly code and way to complex for tools like slock that
have such minimal synopsis.
it's a bit of "macro magic", but not really that complex if
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 2016-10-29 21:35, Laslo Hunhold wrote:
The "problem" with dmenu is that it takes "long" flags, and given so
many scripts depend on it we just cannot change it that easily.
when did I suggest using arg.h for dmenu?
---
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org
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, 28 Oct 2016 22:56:14 +0200
Klemens Nanni wrote:
Hey Klemens,
> arg.h is really ugly code and way to complex for tools like slock that
> have such minimal synopsis.
it's a bit of "macro magic", but not really that complex if you think
about it. Also, the usage within the code is dead sim
On Sat, 29 Oct 2016 13:11:27 +0300
"Ali H. Fardan" wrote:
Hey Ali,
> uhm, like the dmenu one?[0]
>
> [0]: http://git.suckless.org/dmenu/tree/dmenu.c#n649
this has already been discussed; I wrote a patch for that a long time
ago and we came to the conclusion that changing the flag-names just fo
On Sat, Oct 29, 2016 at 12:11 PM, Ali H. Fardan wrote:
> On 2016-10-29 12:40, Hiltjo Posthuma wrote:
>>
>> This is total bullshit: it is less readable and it makes no sense to
>> optimize this case. Please fix real bugs.
>
>
> uhm, like the dmenu one?[0]
>
> [0]: http://git.suckless.org/dmenu/tree
On 2016-10-29 12:40, Hiltjo Posthuma wrote:
This is total bullshit: it is less readable and it makes no sense to
optimize this case. Please fix real bugs.
uhm, like the dmenu one?[0]
[0]: http://git.suckless.org/dmenu/tree/dmenu.c#n649
---
() ascii ribbon campaign - against html e-mail
/\ w
On 2016-10-28 23:56, Klemens Nanni wrote:
arg.h is really ugly code and way to complex for tools like slock that
have such minimal synopsis.
it's not ugly, you just can't wrap your head around it, it's just a unix
port of the plan 9 option parser[0]
[0]: http://9p.io/sources/plan9/sys/include/
On Sat, Oct 29, 2016 at 12:32 AM, Klemens Nanni wrote:
> This reduces the amount of strcmp() calls and comparisons in general to
> a minimum.
> ---
> slock.c | 13 ++---
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/slock.c b/slock.c
> index 283b04e..e9b050a 100644
>
12 matches
Mail list logo