[PATCH 2/4] config: fix boolean parsing

Kristian Høgsberg krh at bitplanet.net
Tue Nov 15 06:43:14 PST 2011


On Tue, Nov 15, 2011 at 9:27 AM, Alexandre Bique
<bique.alexandre at gmail.com> wrote:
> On Tue, Nov 15, 2011 at 10:45 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>> The rest of the line contains the newline, so cannot match simply 'true'
>> or 'false'.
>
> Hi Pekka,
>
> I am not familiar with wayland's code and I didn't even read it.
> But it feels weird to include the trailing \n of the value when
> parsing the config file.
>
> What appends if value is "true\r\n" ?
>
> I believe that the code is correct, but would it be better to review
> the tokening ?

It's intentionally a very limited config file parser.  It's not going
to support Windows style line endings or trailing whitespace.

Kristian


More information about the wayland-devel mailing list