[Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke (hawk@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> > static void smooth_map(void)
> > {
> > + int new_hmap[map.xsize * map.ysize];
>
> I think that such constructs aren't allow in C. IMHO the size has to
> be a compile time constant. Either I'm wrong and this is ok for local
> function variables or it is an gcc extension.
You're correct -- it's not allowed in standard C. You need to use one
of the malloc() family, and free() when you're done.
--
Greg Wooledge | "Truth belongs to everybody."
greg@xxxxxxxxxxxx | - The Red Hot Chili Peppers
http://wooledge.org/~greg/ |
pgpCTOBZTmj96.pgp
Description: PGP signature
- [Freeciv-Dev] PATCH: fix for smooth_map (PR#991), jdorje, 2001/10/05
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Raimar Falke, 2001/10/05
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Jason Dorje Short, 2001/10/05
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Raimar Falke, 2001/10/05
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Jason Dorje Short, 2001/10/07
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Jason Dorje Short, 2001/10/07
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Raimar Falke, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991),
Greg Wooledge <=
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Jason Dorje Short, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Jason Dorje Short, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Raimar Falke, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Jason Dorje Short, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Raimar Falke, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Raimar Falke, 2001/10/08
- [Freeciv-Dev] Re: PATCH: fix for smooth_map (PR#991), Gaute B Strokkenes, 2001/10/14
|
|