changeset 915:880e0c9e29aa draft

(svn r1402) Trim trailing whitespace
author tron <tron@openttd.org>
date Thu, 06 Jan 2005 18:45:28 +0000
parents 170d57e15667
children 75ac981bc866
files dedicated.c engine.c fileio.c gfx.c md5.h misc.c os2.c settings_gui.c ship_cmd.c sprite.h station.h stdafx.h table/namegen.h table/station_land.h train_cmd.c tree_cmd.c unix.c vehicle.c vehicle_gui.c widget.c win32.c
diffstat 21 files changed, 61 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/dedicated.c
+++ b/dedicated.c
@@ -32,7 +32,7 @@
 #	define STDIN 0  /* file descriptor for standard input */
 #endif
 #ifdef __MORPHOS__
-/*  voids the fork, option will be disabled for morphos build anyway, because MorphOS 
+/*  voids the fork, option will be disabled for morphos build anyway, because MorphOS
  *  doesn't support forking (could only implemented with lots of code changes here).
  */
 int morphos_dummy_fork() { return -1; }
--- a/engine.c
+++ b/engine.c
@@ -119,7 +119,7 @@
 {
 	Engine *e;
 	uint32 counter = 0;
-	
+
 	for(e=_engines; e != endof(_engines); e++, counter++) {
 
 		e->type = VEH_Train;
@@ -187,7 +187,7 @@
 			e->flags |= ENGINE_AVAILABLE;
 			e->player_avail = 0;
 		}
-		
+
 		/* This sets up type for the engine
 		   It is needed if you want to ask the engine what type it is
 		   It should hopefully be the same as when you ask a vehicle what it is
--- a/fileio.c
+++ b/fileio.c
@@ -110,7 +110,7 @@
 		for(s=buf + strlen(_path.data_dir) - 1; *s != 0; s++)
 			*s = tolower(*s);
 		f = fopen(buf, "rb");
-		
+
 #if defined SECOND_DATA_DIR
 	// tries in the 2nd data directory
 		if (f == NULL) {
--- a/gfx.c
+++ b/gfx.c
@@ -1507,7 +1507,7 @@
 	/* Amount of colors to be rotated.
 	 * A few more for the DOS palette, because the water colors are
 	 * 245-254 for DOS and 217-226 for Windows.  */
-	int c = _use_dos_palette?38:28; 
+	int c = _use_dos_palette?38:28;
 	int j;
 	int i;
 	const ExtraPaletteValues *ev = &_extra_palette_values;
@@ -1594,7 +1594,7 @@
 			j+=3;
 			if (j == 15) j = 0;
 		}
-	
+
 		// Glittery water DOS
 		s = ev->b;
 		if (_opt.landscape == LT_CANDY) s = ev->bc;
--- a/md5.h
+++ b/md5.h
@@ -71,7 +71,7 @@
 } md5_state_t;
 
 #ifdef __cplusplus
-extern "C" 
+extern "C"
 {
 #endif
 
--- a/misc.c
+++ b/misc.c
@@ -189,7 +189,7 @@
 		_autoreplace_array[i] = i;
 
 	AddTypeToEngines(); // make sure all engines have a type
-	
+
 	SetObjectToPlace(1, 0, 0, 0);
 
 	_pause = 0;
--- a/os2.c
+++ b/os2.c
@@ -56,7 +56,7 @@
 {
 	char paths[MAX_PATH];
 
-	append_path(paths, path, file);		
+	append_path(paths, path, file);
 	return opendir(paths);
 }
 
@@ -179,7 +179,7 @@
 		{
 			_dos_setdrive(disk, &total);
 			_dos_getdrive(&disk2);
-			
+
 			if (disk == disk2)
 			{
 				fios = FiosAlloc();
@@ -299,7 +299,7 @@
 		{
 			_dos_setdrive(disk, &total);
 			_dos_getdrive(&disk2);
-			
+
 			if (disk == disk2)
 			{
 				fios = FiosAlloc();
@@ -384,7 +384,7 @@
 {
 	struct diskfree_t free;
 	char drive;
-	
+
 	*path = _fios_path;
 	drive = *path[0] - 'A'+1;
 
@@ -486,7 +486,7 @@
 	HAB hab;
 	HMQ hmq;
 	ULONG rc;
-   
+
 	// init PM env.
 	hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
 
@@ -503,7 +503,7 @@
 	HAB hab;
 	HMQ hmq;
 	ULONG rc;
-   
+
 	// init PM env.
 	hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
 
@@ -579,7 +579,7 @@
 	_path.gm_dir = str_fmt("%sgm\\", _path.game_data_dir);
 	_path.data_dir = str_fmt("%sdata\\", _path.game_data_dir);
 	_config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
-	
+
 #if defined CUSTOM_LANG_DIR
 	// sets the search path for lng files to the custom one
 	_path.lang_dir = malloc( MAX_PATH );
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -68,7 +68,7 @@
 static inline bool RoadVehiclesAreBuilt(void)
 {
 	Vehicle *v;
-	FOR_ALL_VEHICLES(v) { 
+	FOR_ALL_VEHICLES(v) {
 		if (v->type == VEH_Road) return true;
 	}
 	return false;
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -996,7 +996,7 @@
 				v->u.ship.state != 0x80)
 			return_cmd_error(STR_980B_SHIP_MUST_BE_STOPPED_IN);
 		}
-		
+
 	cost = 0;
 	if (IS_HUMAN_PLAYER(v->owner) && (byte)p2 != v->cargo_type) {
 		cost = _price.ship_base >> 7;
@@ -1006,7 +1006,7 @@
 		//autorefitted ships wants to keep the cargo
 		//it will be checked if the cargo is valid in CmdRenewVehicle
 		if (!(SkipStoppedInDepotCheck))
-			v->cargo_count = 0;	
+			v->cargo_count = 0;
 		v->cargo_type = (byte)p2;
 		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 	}
--- a/sprite.h
+++ b/sprite.h
@@ -73,7 +73,7 @@
 	} operation;
 	byte add_val;
 	byte divmod_val;
-	
+
 	// And apply it to this:
 	byte num_ranges;
 	struct DeterministicSpriteGroupRange *ranges; // Dynamically allocated
--- a/station.h
+++ b/station.h
@@ -82,9 +82,9 @@
 	CA_AIR_SMALL = 4,
 	CA_AIR_LARGE = 5,
 	CA_DOCK = 5,
-	CA_AIR_METRO = 6, 
+	CA_AIR_METRO = 6,
 	CA_AIR_INTER = 8,
-}; 
+};
 
 void ModifyStationRatingAround(TileIndex tile, byte owner, int amount, uint radius);
 
--- a/stdafx.h
+++ b/stdafx.h
@@ -37,7 +37,7 @@
 #endif
 
 #ifdef __MORPHOS__
-// morphos defines certain amiga defines per default, we undefine them 
+// morphos defines certain amiga defines per default, we undefine them
 // here to make the rest of source less messy and more clear what is
 // required for morphos and what for amigaos
 #	ifdef amigaos
--- a/table/namegen.h
+++ b/table/namegen.h
@@ -37,14 +37,14 @@
 	"W"
 };
 
-static const char *name_original_english_3[] = { 
-	"ar", 
-	"a", 
-	"e", 
-	"in", 
+static const char *name_original_english_3[] = {
+	"ar",
+	"a",
+	"e",
+	"in",
 	"on",
 	"u",
-	"un", 
+	"un",
 	"en"
 };
 
@@ -107,7 +107,7 @@
 
 static const char *name_additional_english_1a[] = {
 	"Pen",
-	"Lough", 
+	"Lough",
 	"Stam",
 	"Aber",
 	"Acc",
@@ -180,18 +180,18 @@
 	"W"
 };
 
-static const char *name_additional_english_1b2[] = { 
-	"ar", 
-	"a", 
-	"e", 
-	"in", 
+static const char *name_additional_english_1b2[] = {
+	"ar",
+	"a",
+	"e",
+	"in",
 	"on",
 	"u",
 	"o",
 	"ee",
 	"es",
 	"ea",
-	"un", 
+	"un",
 	"en"
 };
 
@@ -603,8 +603,8 @@
 	"Saale",
 	"Elbe"
 };
-	
-static const char *name_german_4_am[] = {	
+
+static const char *name_german_4_am[] = {
 	"Main"
 };
 
--- a/table/station_land.h
+++ b/table/station_land.h
@@ -490,7 +490,7 @@
 
 // runway tiles
 const DrawTileSeqStruct _station_display_datas_089[] = {
-	{ 0,  0,  0, 16,  1,  6, 0x8A68 }, // fences	
+	{ 0,  0,  0, 16,  1,  6, 0x8A68 }, // fences
 	TILE_SEQ_END()
 };
 
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1072,14 +1072,14 @@
 	p2 = p2 & 0xFF;
 
 	SET_EXPENSES_TYPE(EXPENSES_TRAIN_RUN);
-	
+
 	v = &_vehicles[p1];
 	if (!CheckOwnership(v->owner) || ((CheckStoppedInDepot(v) < 0) && !(SkipStoppedInDepotCheck)))
 		return CMD_ERROR;
 
 	cost = 0;
 	num = 0;
-	
+
 	do {
 		/* XXX: We also refit all the attached wagons en-masse if they
 		 * can be refitted. This is how TTDPatch does it.  TODO: Have
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -81,7 +81,7 @@
 
 		/* Only on tiles within 13 squares from tile,
 		    on clear tiles, and NOT on farm-tiles or rocks */
-		if (dist <= 13 && IS_TILETYPE(cur_tile, MP_CLEAR) && 
+		if (dist <= 13 && IS_TILETYPE(cur_tile, MP_CLEAR) &&
 			 (_map5[cur_tile] & 0x1F) != 0x0F && (_map5[cur_tile] & 0x1C) != 8) {
 			PlaceTree(cur_tile, r, dist <= 6 ? 0xC0 : 0);
 		}
--- a/unix.c
+++ b/unix.c
@@ -25,7 +25,7 @@
 
 #ifdef __AMIGA__
 #warning add stack symbol to avoid that user needs to set stack manually (tokai)
-// ULONG __stack = 
+// ULONG __stack =
 #endif
 
 static char *_fios_path;
@@ -506,7 +506,7 @@
 	_path.data_dir = str_fmt("%sdata/", _path.game_data_dir);
 	_config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
 	_log_file = str_fmt("%sopenttd.log", _path.personal_dir);
-	
+
 #if defined CUSTOM_LANG_DIR
 	// sets the search path for lng files to the custom one
 	_path.lang_dir = malloc( MAX_PATH );
--- a/vehicle.c
+++ b/vehicle.c
@@ -1409,17 +1409,17 @@
 	 This is a nice way to send 32 bit and only use 16 bit
 	 the last 8 bit is the engine. The 8 bits in front of the engine is free so it have room for 16 bit engine entries */
 	uint16 new_engine_type = (uint16)(p2 & 0xFFFF);
-	uint32 autorefit_money = (p2  >> 16) * 100000; 
+	uint32 autorefit_money = (p2  >> 16) * 100000;
 	Vehicle *v = DEREF_VEHICLE(p1);
 	int cost, build_cost;
 
 	SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
-	
-	
+
+
 	// first we make sure that it's a valid type the user requested
 	// check that it's an engine that is in the engine array
 	if (new_engine_type >= TOTAL_NUM_ENGINES ) return CMD_ERROR;
-	
+
 	// check that the new vehicle type is the same as the original one
 	if (v->type != DEREF_ENGINE(new_engine_type)->type) return CMD_ERROR;
 
@@ -1466,7 +1466,7 @@
 	if (flags & DC_EXEC) {
 		Engine *e;
 		e = DEREF_ENGINE(new_engine_type);
-		
+
 		// TODO make it check if refit is possible before actually doing it
 
 		/* We do not really buy a new vehicle, we upgrade the old one */
@@ -1474,7 +1474,7 @@
 			byte cargo_type = v->cargo_type;
 			v->engine_type = new_engine_type;
 			v->max_age = e->lifelength * 366;
-		
+
 			/* Update limits of the vehicle (for when upgraded) */
 			switch (v->type) {
 			case VEH_Train:
@@ -1489,7 +1489,7 @@
 				v->max_speed = rvi->max_speed;
 
 				v->u.rail.railtype = e->railtype;
-				
+
 				// 0x0100 means that we skip the check for being stopped inside the depot
 				// since we do not stop it for autorefitting
 				if (v->cargo_type != cargo_type && capacity) {
@@ -1521,7 +1521,7 @@
 				v->cargo_type = svi->cargo_type;
 				v->cargo_cap = svi->capacity;
 				v->max_speed = svi->max_speed;
-				
+
 				// 0x0100 means that we skip the check for being stopped inside the depot
 				// since we do not stop it for autorefitting
 				if (v->cargo_type != cargo_type)
@@ -1559,7 +1559,7 @@
 					v->cargo_count = v->cargo_cap;
 			}
 		}
-		
+
 		v->reliability = e->reliability;
 		v->reliability_spd_dec = e->reliability_spd_dec;
 		v->age = 0;
@@ -1580,7 +1580,7 @@
 void MaybeReplaceVehicle(Vehicle *v)
 {
 	uint32 new_engine_and_autoreplace_money;
-	
+
 	if (v->owner != _local_player)
 		return;
 	// uncomment next line if you want to see what engine type just entered a depot
@@ -1597,7 +1597,7 @@
 	}
 	/* Now replace the vehicle */
 	_current_player = v->owner;
-	
+
 	/* makes the variable to inform about how much money the player wants to have left after replacing
 	 and which engine to replace with
 	 the first 16 bit is the money. Since we know the last 5 digits is 0, they are thrown away.
@@ -1605,9 +1605,9 @@
 	 This is a nice way to send 32 bit and only use 16 bit
 	 the last 8 bit is the engine. The 8 bits in front of the engine is free so it have room for 16 bit engine entries */
 	new_engine_and_autoreplace_money = ((_patches.autorenew_money / 100000) << 16) + _autoreplace_array[v->engine_type];
-	
+
 	assert(v->type == DEREF_ENGINE(_autoreplace_array[v->engine_type])->type);
-	
+
 	if ( v->type != VEH_Train ) {
 		DoCommandP(v->tile, v->index, new_engine_and_autoreplace_money, NULL, CMD_REPLACE_VEHICLE | CMD_SHOW_NO_ERROR);
 	} else {
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -364,7 +364,7 @@
 
 	sel[0] = WP(w,replaceveh_d).sel_index[0];
 	sel[1] = WP(w,replaceveh_d).sel_index[1];
-	
+
 	switch (WP(w,replaceveh_d).vehicletype) {
 		case VEH_Train: {
 			railtype = WP(w,replaceveh_d).railtype;
@@ -510,10 +510,10 @@
 
 	sel[0] = sel1;
 	sel[1] = sel2;
-	
+
 	selected_id[0] = selected_id1;
 	selected_id[1] = selected_id2;
-	
+
 	switch (WP(w,replaceveh_d).vehicletype) {
 		case VEH_Train: {
 			byte railtype = WP(w,replaceveh_d).railtype;
--- a/widget.c
+++ b/widget.c
@@ -408,7 +408,7 @@
 
 		case WWT_RESIZEBOX: {
 			assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
-			
+
 			DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, 0);
 			DrawSprite(SPR_WINDOW_RESIZE, r.left + 3, r.top + 3);
 			break;
--- a/win32.c
+++ b/win32.c
@@ -1461,7 +1461,7 @@
 }
 #else
 /* Get rid of unused variable warnings.. ShowOSErrorBox
- * is now used twice, once in MSVC, and once in all other Win 
+ * is now used twice, once in MSVC, and once in all other Win
  * compilers (cygwin, mingw, etc.) */
 void ShowOSErrorBox(const char *buf)
 {