[Geany-Devel] small bug in utils_strtod()

Matthew Brush mbrush at xxxxx
Mon Dec 2 02:21:16 UTC 2013


On 13-12-01 04:34 PM, Lex Trotman wrote:
> On 2 December 2013 09:45, Matthew Brush <mbrush at codebrainz.ca> wrote:
>
>> On 13-12-01 01:26 PM, Lex Trotman wrote:
>>
>>> Hi,
>>>
>>> **gint** utils_strtod()??  Sheesh.
>>>
>>> s/b renamed utils_hexcolor() or similar, thats what it does.
>>>
>>> As for "end", the original strtod() and friends used it to extract several
>>> whitespace separated strings from the one string by just passing "end" to
>>> the next call, but if we don't use it and its wrong anyways we might as
>>> well drop it when we change the name to utils_hexcolor().
>>>
>>>
>> Agree the name is bad, and also the colour parsing isn't very robust. I
>> meant to improve it when adding the named_colors support but never got
>> around to it.
>>
>> Attached patch uses GDK colour parsing instead of own-rolled thing which
>> supports more colour specification formats as well as cleans up some
>> related code while remaining compatible with legacy colour notation and
>> GTK2 and GTK3 builds.
>>
>> If nobody objects, I can commit the patch.
>>
>
> Untested, but looks ok, except it has changes not directly related to
> parsing colour like highlighting.c:698, s/b separate commit IMHO.
>

That is using the new/re-written function, just like all the other changes.

Cheers,
Matthew Brush



More information about the Devel mailing list