Re: [dev] Enhanced arg.h from quark

2021-07-05 Thread Sebastian LaVine
On July 5, 2021 11:21:02 PM UTC, Nikita Zlobin wrote: >Check for double dash may be done in for loop. > >arg.h: https://pastebin.com/c4FQcrtH > >I tried to compare objdump'ed compiler output with different options - >filesizes are same, though difference exists. > >There are diffs for 3 -O levels:

[dev] Enhanced arg.h from quark

2021-07-05 Thread Nikita Zlobin
Check for double dash may be done in for loop. arg.h: https://pastebin.com/c4FQcrtH I tried to compare objdump'ed compiler output with different options - filesizes are same, though difference exists. There are diffs for 3 -O levels: -O3, -O2, -Os. For -O3: --- tabbed-O3-1.o.objdump 2021

Re: [dev] Better naming for arg.h API

2021-07-05 Thread Hiltjo Posthuma
On Mon, Jul 05, 2021 at 02:48:10PM +0500, Nikita Zlobin wrote: > For now all names in arg.h use ARG for prefix. > However, considering existing argv parsing helpers like getopt, there > could be two prefixes: > OPT - for option key or name (for long opts) > ARG - optional option value if any, argum

[dev] Better naming for arg.h API

2021-07-05 Thread Nikita Zlobin
For now all names in arg.h use ARG for prefix. However, considering existing argv parsing helpers like getopt, there could be two prefixes: OPT - for option key or name (for long opts) ARG - optional option value if any, argument. This way I could propose alternated naming, which would be more cle