[PATCH] Make array initialization of pj_units_copy ANSI C

Frank Warmerdam fwarmerdam at GMAIL.COM
Mon Jan 24 09:36:50 EST 2005


On Mon, 24 Jan 2005 10:01:54 +0100, Petter Reinholdtsen <pere at hungry.com> wrote:
> The array initializer in mapprojhack.c fail to group each array member
> into a block.  I have no idea how the code in question could work at
> all, probably by pure luck and because of a flexible compiler.  This
> patch bring the construct in line with ANSI C.  Please include in a
> future version of mapserver.

Petter,

I have applied your patch to the MapServer 4.5 CVS head.

> Why are you using '(char *)0' by the way?  I believe 'NULL' is more
> commonly used as the null pointer.

The table init was copied from PROJ.4 where it was done originally
by Gerald Evenden I would imagine.  I would guess there is no
compelling reason why it was done this way.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list