Re: [hackers] [slock][PATCH] Remove arg.h, simplify option parsing

2016-10-31 Thread Markus Teich
Heyho, 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

Re: [hackers] [slock][PATCH] Remove arg.h, simplify option parsing

2016-10-29 Thread Laslo Hunhold
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

Re: [hackers] [slock][PATCH] Remove arg.h, simplify option parsing

2016-10-29 Thread Ali H. Fardan
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]:

[hackers] [slock][PATCH] Remove arg.h, simplify option parsing

2016-10-28 Thread Klemens Nanni
arg.h is really ugly code and way to complex for tools like slock that have such minimal synopsis. Regardless of that, usage() does not have to be a function of it's own if it's called just once. This (hopefully) is the final commit implementing proper command-line pargsing adhering to the POSIX