Re: [Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c

2007-07-01 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39405 >

Daniel Markstedt wrote:
> I have some kind of header problem here. Despite this, gettext seems
> to work. Reported it two years ago (see the latter part of the ticket
> at http://rt.freeciv.org/Ticket/Display.html?id=13287 )
> 
I'm running the same platform, MacOSX 10.3.9 on this machine with MacPorts,
and have no compilation errors or warnings

You might try backing up, reinstalling the OS, the 10.03.9 combo update,
and then MacPorts again.

I had to do that last September during the transition from DarwinPorts
to MacPorts.


>> Works for me
>> (...)
> 
> Still no luck. Note that I'm talking about client/gui-sdl/citydlg.c
> 
And I'm talking about some other citydlg.c, as I'm not running or testing
SDL  Looks like somebody wrote that SDL code with perl or something.
Yech!

For example, in the section you mention, I've just discovered that the
code not only doesn't consistently use access functions, but it doesn't
even consistently use its own local variables!

That unit_type_iterates with "un" variable; assigns pUnit = un; though
that's a unittype so it should be pUnitType, and a complete waste of time
and confusing to have two of the same variables; uses un some places and
pUnit in others; and sometimes bypasses the local variables altogether by
using "->type" (a no-no) instead of the unit_type() access function!

Similar problems with pName and "->name" (another no-no)!

The access functions have been around for years, there's no excuse for
such bad coding practices. :-(

I'll try to find the problems by guess and by golly, but no promises

Maybe you should lobby the master developers to have SDL be the official
platform for 2.1.0 -- after all, in the 2+ years since 2.1 was branched,
SDL has gotten somewhat better.  Anyway, having a lot of users would help
find and fix the bugs!



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c

2007-06-30 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=39405 >

On 7/1/07, William Allen Simpson <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39405 >
>
> Daniel Markstedt wrote:
> > As of r13028, build fails in citydlg.c instead:
> >
> > citydlg.c: In function `units_orders_city_dlg_callback':
> > citydlg.c:416: error: structure has no member named `type'
> > citydlg.c:419: warning: implicit declaration of function `gettext'
>
> Note that you have header problems, somehow you are not including gettext.
>

I have some kind of header problem here. Despite this, gettext seems
to work. Reported it two years ago (see the latter part of the ticket
at http://rt.freeciv.org/Ticket/Display.html?id=13287 )

> Works for me
> (...)

Still no luck. Note that I'm talking about client/gui-sdl/citydlg.c

 ~Daniel



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c

2007-06-30 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39405 >

Daniel Markstedt wrote:
> As of r13028, build fails in citydlg.c instead:
> 
> citydlg.c: In function `units_orders_city_dlg_callback':
> citydlg.c:416: error: structure has no member named `type'
> citydlg.c:419: warning: implicit declaration of function `gettext'

Note that you have header problems, somehow you are not including gettext.

Works for me

gcc -no-cpp-precomp -I/opt/local/include -L/opt/local/lib -DHAVE_CONFIG_H -I. 
-I../..  -I. -I./.. -I./../include -I../../utility -I../../common 
-I../../common/aicore -I../../intl -I./../agents -DXTHREADS 
-I/opt/local/include/gtk-2.0 
-I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 
-I/opt/local/include/cairo -I/opt/local/include/pango-1.0 
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include 
-I/opt/local/include -I/opt/local/include/freetype2 
-I/opt/local/include/libpng12 -I/usr/X11R6/include-Wall -Wpointer-arith 
-Wcast-align -Wmissing-prototypes -Wmissing-declarations 
-DLOCALEDIR="\"/Users/wastrel/freeciv-stable/share/locale\"" 
-DDEFAULT_DATA_PATH="\".:data:~/.freeciv:/Users/wastrel/freeciv-stable/share/freeciv\""
  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations -fsigned-char -MT citydlg.o -MD -MP -MF 
.deps/citydlg.Tpo -c -o citydlg.o citydlg.c
mv -f .deps/citydlg.Tpo .deps/citydlg.Po


gcc -no-cpp-precomp -I/opt/local/include -L/opt/local/lib -DHAVE_CONFIG_H -I. 
-I../..  -I. -I./.. -I./../include -I../../utility -I../../common 
-I../../common/aicore -I../../intl -I./../agents -DXTHREADS 
-I/opt/local/include/gtk-2.0 
-I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 
-I/opt/local/include/cairo -I/opt/local/include/pango-1.0 
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include 
-I/opt/local/include -I/opt/local/include/freetype2 
-I/opt/local/include/libpng12 -I/usr/X11R6/include-Wall -Wpointer-arith 
-Wcast-align -Wmissing-prototypes -Wmissing-declarations 
-DLOCALEDIR="\"/Users/wastrel/freeciv-stable/share/locale\"" 
-DDEFAULT_DATA_PATH="\".:data:~/.freeciv:/Users/wastrel/freeciv-stable/share/freeciv\""
  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations -fsigned-char -MT citydlg.o -MD -MP -MF 
.deps/citydlg.Tpo -c -o citydlg.o citydlg.c
mv -f .deps/citydlg.Tpo .deps/citydlg.Po

(success, no errors or warnings)



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev