(svn r3297) Staticise
authortron
Wed, 14 Dec 2005 06:20:23 +0000
changeset 2752 55e04dee346d
parent 2751 64b1c6305295
child 2753 b25bd313785e
(svn r3297) Staticise
ai/ai.c
aircraft_cmd.c
airport.c
newgrf.c
oldloader.c
queue.c
rail_cmd.c
station_cmd.c
table/autorail.h
train_cmd.c
vehicle.c
waypoint.c
--- a/ai/ai.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/ai/ai.c	Wed Dec 14 06:20:23 2005 +0000
@@ -25,7 +25,7 @@
 /**
  * Dequeues commands put in the queue via AI_PutCommandInQueue.
  */
-void AI_DequeueCommands(byte player)
+static void AI_DequeueCommands(byte player)
 {
 	AICommand *com, *entry_com;
 
--- a/aircraft_cmd.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/aircraft_cmd.c	Wed Dec 14 06:20:23 2005 +0000
@@ -121,7 +121,7 @@
 	}
 }
 
-int32 EstimateAircraftCost(EngineID engine_type)
+static int32 EstimateAircraftCost(EngineID engine_type)
 {
 	return AircraftVehInfo(engine_type)->base_cost * (_price.aircraft_base>>3)>>5;
 }
--- a/airport.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/airport.c	Wed Dec 14 06:20:23 2005 +0000
@@ -8,11 +8,12 @@
 #include "macros.h"
 #include "variables.h"
 
-AirportFTAClass *CountryAirport;
-AirportFTAClass *CityAirport;
-AirportFTAClass *Heliport, *Oilrig;
-AirportFTAClass *MetropolitanAirport;
-AirportFTAClass *InternationalAirport;
+static AirportFTAClass* CountryAirport;
+static AirportFTAClass* CityAirport;
+static AirportFTAClass* Oilrig;
+static AirportFTAClass* Heliport;
+static AirportFTAClass* MetropolitanAirport;
+static AirportFTAClass* InternationalAirport;
 
 static void AirportFTAClass_Constructor(AirportFTAClass *Airport,
 																				const byte *terminals, const byte *helipads,
--- a/newgrf.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/newgrf.c	Wed Dec 14 06:20:23 2005 +0000
@@ -1276,7 +1276,7 @@
  * @param value The value that was used to represent this callback result
  * @return A spritegroup representing that callback result
  */
-SpriteGroup *NewCallBackResultSpriteGroup(uint16 value)
+static SpriteGroup* NewCallBackResultSpriteGroup(uint16 value)
 {
 	SpriteGroup *group = calloc(1, sizeof(*group));
 
@@ -1300,7 +1300,7 @@
  * @param sprites The number of sprites per set.
  * @return A spritegroup representing the sprite number result.
  */
-SpriteGroup *NewResultSpriteGroup(uint16 value, byte sprites)
+static SpriteGroup* NewResultSpriteGroup(uint16 value, byte sprites)
 {
 	SpriteGroup *group = calloc(1, sizeof(*group));
 	group->type = SGT_RESULT;
--- a/oldloader.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/oldloader.c	Wed Dec 14 06:20:23 2005 +0000
@@ -455,7 +455,7 @@
 static uint16 _old_string_id;
 static uint16 _old_string_id_2;
 
-void ReadTTDPatchFlags(void)
+static void ReadTTDPatchFlags(void)
 {
 	int i;
 
--- a/queue.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/queue.c	Wed Dec 14 06:20:23 2005 +0000
@@ -504,7 +504,8 @@
 		free(h);
 }
 
-void stat_Hash(Hash* h)
+#ifdef HASH_STATS
+static void stat_Hash(Hash* h)
 {
 	uint used_buckets = 0;
 	uint max_collision = 0;
@@ -546,6 +547,7 @@
 		}
 	printf ("}\n");
 }
+#endif
 
 void clear_Hash(Hash* h, bool free_values)
 {
--- a/rail_cmd.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/rail_cmd.c	Wed Dec 14 06:20:23 2005 +0000
@@ -1304,7 +1304,7 @@
 }
 
 typedef void DetailedTrackProc(const TileInfo *ti);
-DetailedTrackProc * const _detailed_track_proc[16] = {
+static DetailedTrackProc* const _detailed_track_proc[] = {
 	DetTrackDrawProc_Null,
 	DetTrackDrawProc_Null,
 
@@ -1719,7 +1719,7 @@
 }
 
 /* Special check for SetSignalsAfterProc, to see if there is a vehicle on this tile */
-bool SignalVehicleCheck(TileIndex tile, uint track)
+static bool SignalVehicleCheck(TileIndex tile, uint track)
 {
 	SignalVehicleCheckStruct dest;
 
--- a/station_cmd.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/station_cmd.c	Wed Dec 14 06:20:23 2005 +0000
@@ -1343,7 +1343,7 @@
 	return _price.build_rail >> 1;
 }
 
-void FindRoadStationSpot(bool truck_station, Station *st, RoadStop ***currstop, RoadStop **prev)
+static void FindRoadStationSpot(bool truck_station, Station* st, RoadStop*** currstop, RoadStop** prev)
 {
 	RoadStop **primary_stop;
 
--- a/table/autorail.h	Wed Dec 14 06:16:34 2005 +0000
+++ b/table/autorail.h	Wed Dec 14 06:20:23 2005 +0000
@@ -13,7 +13,7 @@
 
 // table maps each of the six rail directions and tileh combinations to a sprite
 // invalid entries are required to make sure that this array can be quickly accessed
-const int _AutorailTilehSprite[31][6] = {
+static const int _AutorailTilehSprite[][6] = {
 // type   0        1        2        3        4        5
 	{       0,       8,      16,      25,      34,      42 }, // tileh = 0
 	{       5,      13, RED(22), RED(31),      35,      42 }, // tileh = 1
@@ -52,7 +52,7 @@
 
 // maps each pixel of a tile (16x16) to a selection type
 // (0,0) is the top corner, (16,16) the bottom corner
-const byte _AutorailPiece[16][16] = {
+static const byte _AutorailPiece[][16] = {
 	{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
 	{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
 	{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
--- a/train_cmd.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/train_cmd.c	Wed Dec 14 06:20:23 2005 +0000
@@ -36,7 +36,7 @@
  * the consist changes.
  * @param v First vehicle of the consist.
  */
-void TrainCargoChanged(Vehicle* v)
+static void TrainCargoChanged(Vehicle* v)
 {
 	Vehicle *u;
 	uint16 weight = 0;
--- a/vehicle.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/vehicle.c	Wed Dec 14 06:20:23 2005 +0000
@@ -597,7 +597,7 @@
 	}
 }
 
-VehicleTickProc *_vehicle_tick_procs[] = {
+static VehicleTickProc* _vehicle_tick_procs[] = {
 	Train_Tick,
 	RoadVeh_Tick,
 	Ship_Tick,
--- a/waypoint.c	Wed Dec 14 06:16:34 2005 +0000
+++ b/waypoint.c	Wed Dec 14 06:20:23 2005 +0000
@@ -41,7 +41,7 @@
 MemoryPool _waypoint_pool = { "Waypoints", WAYPOINT_POOL_MAX_BLOCKS, WAYPOINT_POOL_BLOCK_SIZE_BITS, sizeof(Waypoint), &WaypointPoolNewBlock, 0, 0, NULL };
 
 /* Create a new waypoint */
-Waypoint *AllocateWaypoint(void)
+static Waypoint* AllocateWaypoint(void)
 {
 	Waypoint *wp;
 
@@ -72,7 +72,7 @@
 }
 
 /* Redraw the sign of a waypoint */
-void RedrawWaypointSign(Waypoint *wp)
+static void RedrawWaypointSign(const Waypoint* wp)
 {
 	MarkAllViewportsDirty(
 		wp->sign.left - 6,
@@ -93,7 +93,7 @@
 }
 
 /* Set the default name for a waypoint */
-void MakeDefaultWaypointName(Waypoint *wp)
+static void MakeDefaultWaypointName(Waypoint* wp)
 {
 	Waypoint *local_wp;
 	bool used_waypoint[MAX_WAYPOINTS_PER_TOWN];