Re: [PATCH 1/3] parser: be more pick for integer values

2012-03-13 Thread Pekka Paalanen
On Mon, 12 Mar 2012 19:06:38 -0300 Tiago Vignatti wrote: > It was accepting "-i=3", "-i=3/2", "--idle-time=*3" and similar unwanted type > of arguments, giving wrong impression for the user. Now it explicitly ignores. > > Signed-off-by: Tiago Vignatti > --- > these three patches are here: > htt

Re: [PATCH 1/3] parser: be more pick for integer values

2012-03-12 Thread Bill Spitzak
This will break using 0xabcd for hex numbers. A better way that reuses the library functions test is this: char* p; unsigned x = strtoul(value, NULL, &p); if (*p || (!x && value[0]!='0')) { number_was_bad }; This is not perfect because it is inconsistent about leading wh

[PATCH 1/3] parser: be more pick for integer values

2012-03-12 Thread Tiago Vignatti
It was accepting "-i=3", "-i=3/2", "--idle-time=*3" and similar unwanted type of arguments, giving wrong impression for the user. Now it explicitly ignores. Signed-off-by: Tiago Vignatti --- these three patches are here: http://cgit.freedesktop.org/~vignatti/weston/?h=options shared/option-pars