[Geany] utils_strtod, invalid_test + patch

Enrico Tröger enrico.troeger at xxxxx
Mon May 22 11:51:32 UTC 2006


On Mon, 22 May 2006 02:25:43 +0200, Pierre <pierre.php at gmail.com> wrote:

> On 5/22/06, Enrico Tröger <enrico.troeger at uvena.de> wrote:
> 
> > > I can give you another version which does not use any integer but
> > > decrement the pointer until it reaches the beginning of string,
> > > it is safe and platform independent.
> > Even better. I just wrote this down to the TODO list, but I you have
> > already the code, it would be nice to see it.
> 
> Here you go. I quickly test it, it should work well. It also keeps the
> original pointer intact.
Thanks, looks good.
I changed only one line:
source_len = strlen(source);

But there is another problem, I discovered while looking at the code:
I use this function to parse the hex colours for syntax highlighting.
But strtod evaluates 0x0000ff to red, but it is blue. This means,
strtod is simply the wrong function and I will remove it. Anyway thanks
for the patch.  ;-)
I just have written the code to get the correct colour values and it is
much easier, but therefore most of the syntax colouring will change and
I want to keep it, so there is some work needed to adopt the colouring.
Therefore, your patch will be applied as long as this issue is fixed.

regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
Geany, a lightweight IDE using GTK2 - http://geany.uvena.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20060522/5bc64d20/attachment.pgp>


More information about the Users mailing list