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

From: Klemens Nanni <kl3_AT_posteo.org>
Date: Sat, 29 Oct 2016 22:49:03 +0200

On Sat, Oct 29, 2016 at 08:39:07PM +0200, Laslo Hunhold wrote:
>On Fri, 28 Oct 2016 22:56:14 +0200
>Klemens Nanni <kl3_AT_posteo.org> 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 simple and
>straightforward.
I never called it magical or complex, it's just badly readable and I
very much prefer a cleaner version as proposed for obvious reasons.

>> Regardless of that, usage() does not have to be a function of it's own
>> if it's called just once.
>
>Well, what's the problem with it being a standalone function?
It's not needed, so why not calling die() directly instead of going
through usage()? Code that does nothing is ought to be removed imho.

>> This (hopefully) is the final commit implementing proper command-line
>> pargsing adhering to the POSIX Utility Syntax Guidelines[0] after
>> submitting two incomplete patches to the hackers_AT_suckless mailinglist.
>
>Just out of interest, what exactly is arg.h not adhering to with regard
>to these POSIX Utility Syntax Guidelines?
I didn't mean arg.h isn't, that merely a statement about my patch alone
since it didn't hold for the first version.
Received on Sat Oct 29 2016 - 22:49:03 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 29 2016 - 23:00:17 CEST