<URL: 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

Reply via email to