On Mon, 22 May 2006 02:25:43 +0200, Pierre <pierre.php(a)gmail.com> wrote:
On 5/22/06, Enrico Tröger
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.
Get my GPG key from http://www.uvena.de/pub.key
Geany, a lightweight IDE using GTK2 - http://geany.uvena.de