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

From: Laslo Hunhold <>
Date: Sat, 29 Oct 2016 20:39:07 +0200

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 simple and

> 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?

> 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?

> 0:



Laslo Hunhold <>
Received on Sat Oct 29 2016 - 20:39:07 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 29 2016 - 20:48:15 CEST