Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2002:
[Freeciv-Dev] Re: A rouge client from the trenches
Home

[Freeciv-Dev] Re: A rouge client from the trenches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Arnstein Lindgard <arnstein.lindgard@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: A rouge client from the trenches
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jul 2002 17:09:18 -0500

On Thu, Jul 18, 2002 at 10:44:47PM +0200, Arnstein Lindgard wrote:
> I wrote:
> > > I've been hacking my client a bit. My goal is to make it possible to move
> 
> You wrote:
> > mapctrl.c: In function `bg_focus_zero':
> > mapctrl.c:87: parse error before `char'
> > mapctrl.c:89: `msg' undeclared (first use in this function)
> > mapctrl.c:89: (Each undeclared identifier is reported only once
> > mapctrl.c:89: for each function it appears in.)
> > mapctrl.c: In function `butt_down_mapcanvas':
> > mapctrl.c:434: parse error before `struct'
> > mapctrl.c:435: `packet' undeclared (first use in this function)
> > make[3]: *** [mapctrl.o] Error 1
> > make[2]: *** [all-recursive] Error 1
> > make[1]: *** [all-recursive] Error 1
> > make: *** [all-recursive-am] Error 2
> 
> Strange, I get no errors when compiling with gcc 3.0.3 on my upgraded
> redhat 60. Please excuse my ignorance, but is it a sin in 'C' not to
> declare your stuff at the absolute beginning of the functions?

yes. it's a sin. you need to declare at beginning of scope, so

  if(foo) {
    int a;
  }

is ok too.

3.0.3 has cut me slack as well on occasion...

-mike


[Prev in Thread] Current Thread [Next in Thread]