[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeciv-commits
Subject:    [Freeciv-commits] r13025 - in /branches/S2_1: ai/ client/
From:       William Allen Simpson <william.allen.simpson () domain ! hid>
Date:       2007-06-29 5:18:07
Message-ID: E1I48rv-0003Wy-DX () subversion ! gna ! org
[Download RAW message or body]

Author: wsimpson
Date: Fri Jun 29 07:18:01 2007
New Revision: 13025

URL: http://svn.gna.org/viewcvs/freeciv?rev=13025&view=rev
Log:
(PR#39421) BUG: unit_type name translation

trunk revision 13024.

===

Fixed several tests against ruleset name strings.

Renamed name_orig to name_rule (the origin), and name to name_translated.  
Translated names are now only accessed via a central function.  (The function 
existed, but not everybody used it.)

Moved the translation into the accessor functions, as this seemed to be better 
than spread around in 3 places, especially as the other places in the code 
forgot to test for NULL and '\0' (empty string).

Standardized and simplified some parallel function names:
  unit_* take a unit parameter
  utype_* take a unit_type parameter, or return a unit_type result.
  uclass_* take a unit_class parameter, or return a unit_class result.

renamed unit->type to ->utype, fixing references to use unit_type().

renamed unit_type->class to ->uclass, fixing references to use unit_class(),
as "class" is reserved in C++.  Still more uses of class and Class remain.

Modified:
    branches/S2_1/ai/advdiplomacy.c
    branches/S2_1/ai/advdomestic.c
    branches/S2_1/ai/advmilitary.c
    branches/S2_1/ai/aiair.c
    branches/S2_1/ai/aicity.c
    branches/S2_1/ai/aidata.c
    branches/S2_1/ai/aidiplomat.c
    branches/S2_1/ai/aiexplorer.c
    branches/S2_1/ai/aiferry.c
    branches/S2_1/ai/aihunt.c
    branches/S2_1/ai/ailog.c
    branches/S2_1/ai/aiparatrooper.c
    branches/S2_1/ai/aisettler.c
    branches/S2_1/ai/aitech.c
    branches/S2_1/ai/aitools.c
    branches/S2_1/ai/aitools.h
    branches/S2_1/ai/aiunit.c
    branches/S2_1/client/agents/agents.c
    branches/S2_1/client/agents/cma_fec.c
    branches/S2_1/client/citydlg_common.c
    branches/S2_1/client/cityrepdata.c
    branches/S2_1/client/climisc.c
    branches/S2_1/client/control.c
    branches/S2_1/client/goto.c
    branches/S2_1/client/gui-ftwl/gui_text.c
    branches/S2_1/client/gui-ftwl/mapview.c
    branches/S2_1/client/gui-gtk-2.0/citydlg.c
    branches/S2_1/client/gui-gtk-2.0/dialogs.c
    branches/S2_1/client/gui-gtk-2.0/diplomat_dialog.c
    branches/S2_1/client/gui-gtk-2.0/helpdlg.c
    branches/S2_1/client/gui-gtk-2.0/repodlgs.c
    branches/S2_1/client/gui-gtk-2.0/wldlg.c
    branches/S2_1/client/gui-mui/citydlg.c
    branches/S2_1/client/gui-mui/dialogs.c
    branches/S2_1/client/gui-mui/gui_main.c
    branches/S2_1/client/gui-mui/helpdlg.c
    branches/S2_1/client/gui-mui/mapclass.c
    branches/S2_1/client/gui-mui/mapview.c
    branches/S2_1/client/gui-mui/repodlgs.c
    branches/S2_1/client/gui-mui/worklistclass.c
    branches/S2_1/client/gui-sdl/citydlg.c
    branches/S2_1/client/gui-sdl/cityrep.c
    branches/S2_1/client/gui-sdl/dialogs.c
    branches/S2_1/client/gui-sdl/diplomat_dialog.c
    branches/S2_1/client/gui-sdl/helpdlg.c
    branches/S2_1/client/gui-sdl/mapview.c
    branches/S2_1/client/gui-sdl/menu.c
    branches/S2_1/client/gui-sdl/wldlg.c
    branches/S2_1/client/gui-win32/citydlg.c
    branches/S2_1/client/gui-win32/dialogs.c
    branches/S2_1/client/gui-win32/helpdlg.c
    branches/S2_1/client/gui-win32/menu.c
    branches/S2_1/client/gui-win32/repodlgs.c
    branches/S2_1/client/gui-win32/wldlg.c
    branches/S2_1/client/gui-xaw/citydlg.c
    branches/S2_1/client/gui-xaw/diplomat_dialog.c
    branches/S2_1/client/gui-xaw/helpdlg.c
    branches/S2_1/client/gui-xaw/repodlgs.c
    branches/S2_1/client/gui-xaw/wldlg.c
    branches/S2_1/client/helpdata.c
    branches/S2_1/client/mapctrl_common.c
    branches/S2_1/client/mapview_common.c
    branches/S2_1/client/packhand.c
    branches/S2_1/client/repodlgs_common.c
    branches/S2_1/client/text.c
    branches/S2_1/client/tilespec.c
    branches/S2_1/common/aicore/aisupport.c
    branches/S2_1/common/aicore/caravan.c
    branches/S2_1/common/aicore/citymap.c
    branches/S2_1/common/aicore/pf_tools.c
    branches/S2_1/common/city.c
    branches/S2_1/common/combat.c
    branches/S2_1/common/effects.c
    branches/S2_1/common/game.c
    branches/S2_1/common/idex.c
    branches/S2_1/common/map.c
    branches/S2_1/common/movement.c
    branches/S2_1/common/requirements.c
    branches/S2_1/common/tech.c
    branches/S2_1/common/terrain.c
    branches/S2_1/common/unit.c
    branches/S2_1/common/unit.h
    branches/S2_1/common/unitlist.c
    branches/S2_1/common/unittype.c
    branches/S2_1/common/unittype.h
    branches/S2_1/common/worklist.c
    branches/S2_1/server/barbarian.c
    branches/S2_1/server/cityhand.c
    branches/S2_1/server/citytools.c
    branches/S2_1/server/cityturn.c
    branches/S2_1/server/diplomats.c
    branches/S2_1/server/gamehand.c
    branches/S2_1/server/gotohand.c
    branches/S2_1/server/maphand.c
    branches/S2_1/server/report.c
    branches/S2_1/server/ruleset.c
    branches/S2_1/server/sanitycheck.c
    branches/S2_1/server/savegame.c
    branches/S2_1/server/scripting/api.pkg
    branches/S2_1/server/scripting/api_find.c
    branches/S2_1/server/scripting/api_gen.c
    branches/S2_1/server/scripting/api_gen.h
    branches/S2_1/server/scripting/api_methods.c
    branches/S2_1/server/settlers.c
    branches/S2_1/server/srv_main.c
    branches/S2_1/server/stdinhand.c
    branches/S2_1/server/unithand.c
    branches/S2_1/server/unittools.c



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic