Re: [PATCH] option-parser: Handle short double-arg options

2016-04-18 Thread Pekka Paalanen
On Fri, 15 Apr 2016 10:26:26 -0700 Bryce Harrington wrote: > On Fri, Apr 15, 2016 at 11:55:57AM +0300, Pekka Paalanen wrote: > > On Thu, 14 Apr 2016 11:10:57 -0700 > > Bryce Harrington wrote: > > > > > On Thu, Apr 14, 2016 at 03:16:07PM +0300, Pekka Paalanen wrote: > > > > On Sat, 13 Feb 20

Re: [PATCH] option-parser: Handle short double-arg options

2016-04-15 Thread Bryce Harrington
On Fri, Apr 15, 2016 at 11:55:57AM +0300, Pekka Paalanen wrote: > On Thu, 14 Apr 2016 11:10:57 -0700 > Bryce Harrington wrote: > > > On Thu, Apr 14, 2016 at 03:16:07PM +0300, Pekka Paalanen wrote: > > > On Sat, 13 Feb 2016 23:56:38 +0100 > > > Benoit Gschwind wrote: > > > > > > > Hello Bryce,

Re: [PATCH] option-parser: Handle short double-arg options

2016-04-15 Thread Pekka Paalanen
On Thu, 14 Apr 2016 11:10:57 -0700 Bryce Harrington wrote: > On Thu, Apr 14, 2016 at 03:16:07PM +0300, Pekka Paalanen wrote: > > On Sat, 13 Feb 2016 23:56:38 +0100 > > Benoit Gschwind wrote: > > > > > Hello Bryce, > > > > > > It seems the corner case '-f42xxx 2938475' doesn't work as expecte

Re: [PATCH] option-parser: Handle short double-arg options

2016-04-14 Thread Bryce Harrington
On Thu, Apr 14, 2016 at 03:16:07PM +0300, Pekka Paalanen wrote: > On Sat, 13 Feb 2016 23:56:38 +0100 > Benoit Gschwind wrote: > > > Hello Bryce, > > > > It seems the corner case '-f42xxx 2938475' doesn't work as expected with > > 'f' short option as integer: > > > > 1. one dash then call short

Re: [PATCH] option-parser: Handle short double-arg options

2016-04-14 Thread Pekka Paalanen
On Sat, 13 Feb 2016 23:56:38 +0100 Benoit Gschwind wrote: > Hello Bryce, > > It seems the corner case '-f42xxx 2938475' doesn't work as expected with > 'f' short option as integer: > > 1. one dash then call short_option > 2. in short_option will check arg[2] and call handle_option > 3. in hand

Re: [PATCH] option-parser: Handle short double-arg options

2016-02-13 Thread Benoit Gschwind
Hello Bryce, It seems the corner case '-f42xxx 2938475' doesn't work as expected with 'f' short option as integer: 1. one dash then call short_option 2. in short_option will check arg[2] and call handle_option 3. in handle_option will call strtol, where *value is '4' and *p is 'x' thus *value

[PATCH] option-parser: Handle short double-arg options

2016-02-11 Thread Bryce Harrington
weston allows both short and long style options to take arguments. In the case of short options, allow an optional space between the option name and value. E.g., previously you could launch weston this way: weston -i2 -cmyconfig.ini now you can also launch it like this: weston -i 2 -c myco