From 87275db1362321fad756c00b21ba54e3b6b98ecf Mon Sep 17 00:00:00 2001 From: hniksic Date: Fri, 3 Oct 2003 09:11:09 -0700 Subject: [PATCH] [svn] Fix compilation problem on non-Gcc compilers. --- src/ChangeLog | 5 +++++ src/html-parse.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c65bd6e8..3b55ae25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-10-03 Hrvoje Niksic + + * html-parse.c (convert_and_copy): Move variable declarations + before statements. + 2003-10-02 Gisle Vanem * mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a diff --git a/src/html-parse.c b/src/html-parse.c index 16b88d0f..a5fab446 100644 --- a/src/html-parse.c +++ b/src/html-parse.c @@ -174,7 +174,7 @@ struct pool { already has room to accomodate SIZE bytes of data, this is a no-op. */ #define POOL_GROW(p, increase) \ - GROW_ARRAY ((p)->contents, (p)->size, (p)->tail + increase, \ + GROW_ARRAY ((p)->contents, (p)->size, (p)->tail + (increase), \ (p)->resized, char) /* Append text in the range [beg, end) to POOL. No zero-termination @@ -293,9 +293,11 @@ convert_and_copy (struct pool *pool, const char *beg, const char *end, int flags It's safe (and necessary) to grow the pool in advance because processing the entities can only *shorten* the string, it can never lengthen it. */ - POOL_GROW (pool, end - beg); const char *from = beg; - char *to = pool->contents + pool->tail; + char *to; + + POOL_GROW (pool, end - beg); + to = pool->contents + pool->tail; while (from < end) { -- 2.39.2