From ea9a7d855490a82e144d7caf8c11b9903734900b Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Thu, 12 Jun 2025 10:41:00 +0300
Subject: [PATCH 100/100] ai/default: Remove trailing spaces

See RM #1521

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 ai/default/aiguard.h     |  2 +-
 ai/default/daiair.c      | 12 ++++++------
 ai/default/daidata.c     |  4 ++--
 ai/default/daidiplomat.c | 18 +++++++++---------
 ai/default/daidomestic.c |  6 +++---
 ai/default/daidomestic.h |  2 +-
 ai/default/daieffects.c  | 12 ++++++------
 ai/default/daihand.c     | 16 ++++++++--------
 ai/default/daihunter.c   |  8 ++++----
 ai/default/dailog.h      |  4 ++--
 ai/default/daimilitary.c | 24 ++++++++++++------------
 ai/default/daiparadrop.c | 16 ++++++++--------
 ai/default/daisettler.c  | 16 ++++++++--------
 ai/default/daitech.c     |  8 ++++----
 14 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/ai/default/aiguard.h b/ai/default/aiguard.h
index 0651231615..47be023d81 100644
--- a/ai/default/aiguard.h
+++ b/ai/default/aiguard.h
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 2002 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/ai/default/daiair.c b/ai/default/daiair.c
index 309cb7628e..c6ba088de6 100644
--- a/ai/default/daiair.c
+++ b/ai/default/daiair.c
@@ -187,7 +187,7 @@ static adv_want dai_evaluate_tile_for_air_attack(const struct civ_map *nmap,
   /* Cost of our unit */
   unit_cost = unit_build_shield_cost_base(punit);
   /* This is to say "wait, ill unit will get better!" */
-  unit_cost = unit_cost * unit_type_get(punit)->hp / punit->hp; 
+  unit_cost = unit_cost * unit_type_get(punit)->hp / punit->hp;
 
   /* Determine cost of enemy units */
   victim_cost = stack_cost(punit, pdefender);
@@ -221,7 +221,7 @@ static adv_want dai_evaluate_tile_for_air_attack(const struct civ_map *nmap,
   profit = kill_desire(victim_cost, unit_attack, unit_cost, victim_defense, 1)
     - SHIELD_WEIGHTING + 2 * TRADE_WEIGHTING;
   if (profit > 0) {
-    profit = military_amortize(unit_owner(punit), 
+    profit = military_amortize(unit_owner(punit),
                                game_city_by_number(punit->homecity),
                                profit, sortie_time, balanced_cost);
     log_debug("%s at (%d, %d) is a worthy target with profit " ADV_WANT_PRINTF,
@@ -272,7 +272,7 @@ static adv_want find_something_to_bomb(struct ai_type *ait,
       continue;
     }
 
-    if (has_handicap(pplayer, H_FOG) 
+    if (has_handicap(pplayer, H_FOG)
         && !map_is_known_and_seen(ptile, pplayer, V_MAIN)) {
       /* The tile is fogged */
       continue;
@@ -484,7 +484,7 @@ static struct tile *dai_find_strategic_airbase(struct ai_type *ait,
     }
   } else {
     try to attack something
-  } 
+  }
   TODO: Distant target selection, support for fuel > 2
 **********************************************************************/
 void dai_manage_airunit(struct ai_type *ait, struct player *pplayer,
@@ -542,7 +542,7 @@ void dai_manage_airunit(struct ai_type *ait, struct player *pplayer,
 
     if (find_something_to_bomb(ait, nmap, punit, &path, &dst_tile) > 0) {
       /* Found target, coordinates are in punit's goto_dest.
-       * TODO: separate attacking into a function, check for the best 
+       * TODO: separate attacking into a function, check for the best
        * tile to attack from */
       fc_assert_ret(path != NULL && dst_tile != NULL);
       if (!adv_follow_path(punit, path, dst_tile)) {
@@ -562,7 +562,7 @@ void dai_manage_airunit(struct ai_type *ait, struct player *pplayer,
       }
       pf_path_destroy(path);
     } else {
-      log_debug("%s cannot find anything to kill and is staying put", 
+      log_debug("%s cannot find anything to kill and is staying put",
                 unit_rule_name(punit));
       def_ai_unit_data(punit, ait)->done = TRUE;
       unit_activity_handling(punit, ACTIVITY_IDLE, ACTION_NONE);
diff --git a/ai/default/daidata.c b/ai/default/daidata.c
index 4786dcf4e2..e9f283a84f 100644
--- a/ai/default/daidata.c
+++ b/ai/default/daidata.c
@@ -253,7 +253,7 @@ void dai_data_phase_begin(struct ai_type *ait, struct player *pplayer,
 
   /* We are tracking a unit if punit->server.ai->cur_pos is not NULL. If we
    * are not tracking, start tracking by setting cur_pos. If we are,
-   * fill prev_pos with previous cur_pos. This way we get the 
+   * fill prev_pos with previous cur_pos. This way we get the
    * necessary coordinates to calculate a probable trajectory. */
   players_iterate_alive(aplayer) {
     if (aplayer == pplayer) {
@@ -441,7 +441,7 @@ static void dai_diplomacy_destroy(struct ai_type *ait,
 ****************************************************************************/
 void dai_adjust_policies(struct ai_type *ait, struct player *pplayer)
 {
-  bool needs_back_rearrange = FALSE; 
+  bool needs_back_rearrange = FALSE;
   struct adv_data *adv;
 
   adv = adv_data_get(pplayer, NULL);
diff --git a/ai/default/daidiplomat.c b/ai/default/daidiplomat.c
index cbd9070c5c..2ebcb59fa8 100644
--- a/ai/default/daidiplomat.c
+++ b/ai/default/daidiplomat.c
@@ -81,7 +81,7 @@
  * previously used one. This is important for diplomacy. - Per */
 #define DIPLO_DEFENSE_WANT 3000
 
-static bool is_city_surrounded_by_our_spies(struct player *pplayer, 
+static bool is_city_surrounded_by_our_spies(struct player *pplayer,
                                             struct city *pcity);
 
 static void find_city_to_diplomat(struct player *pplayer, struct unit *punit,
@@ -128,7 +128,7 @@ void dai_choose_diplomat_defensive(struct ai_type *ait,
     struct unit_type *ut = best_role_unit(pcity, UTYF_DIPLOMAT);
 
     if (ut) {
-       log_base(LOG_DIPLOMAT_BUILD, 
+       log_base(LOG_DIPLOMAT_BUILD,
                 "A defensive diplomat will be built in city %s.",
                 city_name_get(pcity));
        choice->want = 16000; /* diplomat more important than soldiers */
@@ -273,7 +273,7 @@ void dai_choose_diplomat_offensive(struct ai_type *ait,
       return;
     }
 
-    want = military_amortize(pplayer, pcity, want, time_to_dest, 
+    want = military_amortize(pplayer, pcity, want, time_to_dest,
                              utype_build_shield_cost(pcity, NULL, ut));
 
     if (!player_has_embassy(pplayer, city_owner(acity))
@@ -469,7 +469,7 @@ static void find_city_to_diplomat(struct player *pplayer, struct unit *punit,
 
     if (aplayer == pplayer || is_barbarian(aplayer)
         || (pplayers_allied(pplayer, aplayer) && has_embassy)) {
-      continue; 
+      continue;
     }
 
     incite_cost = city_incite_cost(pplayer, acity);
@@ -528,7 +528,7 @@ static struct city *dai_diplomat_defend(struct ai_type *ait,
   struct city *ctarget = NULL;
   struct city *pcity = tile_city(unit_tile(punit));
 
-  if (pcity 
+  if (pcity
       && count_diplomats_on_tile(pcity->tile) == 1
       && def_ai_city_data(pcity, ait)->urgency > 0) {
     /* Danger and we are only diplomat present - stay. */
@@ -586,7 +586,7 @@ static struct city *dai_diplomat_defend(struct ai_type *ait,
   Will try to bribe a ship on the coast as well as land stuff.
 ******************************************************************************/
 static bool dai_diplomat_bribe_nearby(struct ai_type *ait,
-                                      struct player *pplayer, 
+                                      struct player *pplayer,
                                       struct unit *punit, struct pf_map *pfm)
 {
   int gold_avail, expenses;
@@ -665,7 +665,7 @@ static bool dai_diplomat_bribe_nearby(struct ai_type *ait,
 
       bribee_tile = mapstep(nmap, pos.tile, DIR_REVERSE(pos.dir_to_here));
       path = pf_map_path(pfm, bribee_tile);
-      if (!path || !adv_unit_execute_path(punit, path) 
+      if (!path || !adv_unit_execute_path(punit, path)
           || punit->moves_left <= 0) {
         pf_path_destroy(path);
         return FALSE;
@@ -754,7 +754,7 @@ void dai_manage_diplomat(struct ai_type *ait, struct player *pplayer,
     if (count_diplomats_on_tile(unit_tile(punit)) == 1
         && (city_data->diplomat_threat
             || city_data->urgency > 0)) {
-      UNIT_LOG(LOG_DIPLOMAT, punit, "stays to protect %s (urg %d)", 
+      UNIT_LOG(LOG_DIPLOMAT, punit, "stays to protect %s (urg %d)",
                city_name_get(pcity), city_data->urgency);
       dai_unit_new_task(ait, punit, AIUNIT_NONE, NULL); /* abort mission */
       def_ai_unit_data(punit, ait)->done = TRUE;
@@ -842,7 +842,7 @@ void dai_manage_diplomat(struct ai_type *ait, struct player *pplayer,
     }
 
     dai_unit_new_task(ait, punit, task, ctarget->tile);
-    fc_assert(punit->moves_left > 0 && ctarget 
+    fc_assert(punit->moves_left > 0 && ctarget
               && unit_data->task != AIUNIT_NONE);
   }
 
diff --git a/ai/default/daidomestic.c b/ai/default/daidomestic.c
index 592282410c..dcf745d790 100644
--- a/ai/default/daidomestic.c
+++ b/ai/default/daidomestic.c
@@ -88,7 +88,7 @@ static void dai_choose_help_wonder(struct ai_type *ait,
     return;
   }
 
-  if (pcity == wonder_city 
+  if (pcity == wonder_city
       || wonder_city == NULL
       || city_data->distance_to_wonder_city <= 0
       || !city_production_gets_caravan_shields(&wonder_city->production)
@@ -141,7 +141,7 @@ static void dai_choose_help_wonder(struct ai_type *ait,
     fc_assert_ret(VUT_IMPROVEMENT == wonder_city->production.kind);
 
     want /= MAX(dist, 1);
-    CITY_LOG(LOG_DEBUG, pcity, "want %s to help wonder in %s with " ADV_WANT_PRINTF, 
+    CITY_LOG(LOG_DEBUG, pcity, "want %s to help wonder in %s with " ADV_WANT_PRINTF,
              utype_rule_name(unit_type),
              city_name_get(wonder_city),
              want);
@@ -640,7 +640,7 @@ struct adv_choice *domestic_advisor_choose_build(struct ai_type *ait,
 /***********************************************************************//**
   Calculate walking distances to wonder city from nearby cities.
 ***************************************************************************/
-void dai_wonder_city_distance(struct ai_type *ait, struct player *pplayer, 
+void dai_wonder_city_distance(struct ai_type *ait, struct player *pplayer,
                               struct adv_data *adv)
 {
   struct pf_map *pfm;
diff --git a/ai/default/daidomestic.h b/ai/default/daidomestic.h
index f5ed4abf5e..acb4fd2095 100644
--- a/ai/default/daidomestic.h
+++ b/ai/default/daidomestic.h
@@ -20,7 +20,7 @@ struct adv_choice *domestic_advisor_choose_build(struct ai_type *ait,
                                                  struct player *pplayer,
                                                  struct city *pcity);
 
-void dai_wonder_city_distance(struct ai_type *ait, struct player *pplayer, 
+void dai_wonder_city_distance(struct ai_type *ait, struct player *pplayer,
                               struct adv_data *adv);
 
 #endif /* FC__DAIDOMESTIC_H */
diff --git a/ai/default/daieffects.c b/ai/default/daieffects.c
index 5d09c3ac25..37cc165dd9 100644
--- a/ai/default/daieffects.c
+++ b/ai/default/daieffects.c
@@ -48,8 +48,8 @@
   specialists who provide at least HAPPY_COST luxury, being the number of
   luxuries needed to make one citizen content or happy.
 
-  The AI assumes that for any specialist that provides HAPPY_COST luxury, 
-  if we can get that luxury from some other source it allows the specialist 
+  The AI assumes that for any specialist that provides HAPPY_COST luxury,
+  if we can get that luxury from some other source it allows the specialist
   to become a worker.  The benefits from an extra worker are weighed against
   the losses from acquiring the two extra luxury.
 
@@ -98,12 +98,12 @@ adv_want dai_content_effect_value(const struct player *pplayer,
     int factor = 2;
 
     /* Try to build wonders to offset empire size unhappiness */
-    if (city_list_size(pplayer->cities) 
+    if (city_list_size(pplayer->cities)
         > get_player_bonus(pplayer, EFT_EMPIRE_SIZE_BASE)) {
       if (get_player_bonus(pplayer, EFT_EMPIRE_SIZE_BASE) > 0) {
         int step_bonus = get_player_bonus(pplayer, EFT_EMPIRE_SIZE_STEP);
 
-        factor += city_list_size(pplayer->cities) 
+        factor += city_list_size(pplayer->cities)
           / MAX(step_bonus, 1);
       }
       factor += 2;
@@ -312,7 +312,7 @@ adv_want dai_effect_value(struct player *pplayer,
     }
     break;
   case EFT_AIRLIFT:
-    /* FIXME: We need some smart algorithm here. The below is 
+    /* FIXME: We need some smart algorithm here. The below is
      * totally braindead. */
     v += c + MIN(adv->stats.units.airliftable, 13);
     break;
@@ -399,7 +399,7 @@ adv_want dai_effect_value(struct player *pplayer,
         /* The idea being that if we have a full granary, we have an
          * automatic surplus of our granary excess in addition to anything
          * collected by city workers. */
-        extra_food += pcity->food_stock - 
+        extra_food += pcity->food_stock -
                       city_granary_size(city_size_get(pcity) - 1);
       }
 
diff --git a/ai/default/daihand.c b/ai/default/daihand.c
index 2baae5e7a1..a5e43353c5 100644
--- a/ai/default/daihand.c
+++ b/ai/default/daihand.c
@@ -182,10 +182,10 @@ enum celebration {
 /*************************************************************************//**
   Set tax/science/luxury rates.
 
-  TODO: Add general support for luxuries: select the luxury rate at which 
-  all cities are content and the trade output (minus what is consumed by 
-  luxuries) is maximal.  For this we need some more information from the 
-  city management code.
+  TODO: Add general support for luxuries: select the luxury rate at which
+  all cities are content and the trade output (minus what is consumed by
+  luxuries) is maximal. For this we need some more information from
+  the city management code.
 
   TODO: Audit the use of pplayer->ai.maxbuycost in the code elsewhere,
   then add support for it here.
@@ -454,8 +454,8 @@ static void dai_manage_taxes(struct ai_type *ait, struct player *pplayer)
   /* === Luxury === */
 
   /* Should (and can) we celebrate? */
-  /* TODO: In the future, we should check if we should 
-   * celebrate for other reasons than growth. Currently 
+  /* TODO: In the future, we should check if we should
+   * celebrate for other reasons than growth. Currently
    * this is ignored. Maybe we need ruleset AI hints. */
   /* TODO: Allow celebrate individual cities? No modpacks use this yet. */
   if (get_player_bonus(pplayer, EFT_RAPTURE_GROW) > 0
@@ -734,7 +734,7 @@ static void dai_manage_government(struct ai_type *ait, struct player *pplayer)
       want += 25 * game.info.turn;
     }
     plr_data->tech_want[adv->goal.govt.req] += want;
-    TECH_LOG(ait, LOG_DEBUG, pplayer, advance_by_number(adv->goal.govt.req), 
+    TECH_LOG(ait, LOG_DEBUG, pplayer, advance_by_number(adv->goal.govt.req),
              "dai_manage_government() + %d for %s",
              want,
              government_rule_name(adv->goal.govt.gov));
@@ -785,7 +785,7 @@ void dai_do_last_activities(struct ai_type *ait, struct player *pplayer)
   dai_manage_cities(ait, pplayer);
   TIMING_LOG(AIT_CITIES, TIMER_STOP);
   TIMING_LOG(AIT_TECH, TIMER_START);
-  dai_manage_tech(ait, pplayer); 
+  dai_manage_tech(ait, pplayer);
   TIMING_LOG(AIT_TECH, TIMER_STOP);
   dai_manage_spaceship(pplayer);
 
diff --git a/ai/default/daihunter.c b/ai/default/daihunter.c
index 6c11421f80..99edc51b34 100644
--- a/ai/default/daihunter.c
+++ b/ai/default/daihunter.c
@@ -57,7 +57,7 @@
   We don't need a hunter in this city if we already have one. Return
   existing hunter if any.
 **************************************************************************/
-static struct unit *dai_hunter_find(struct player *pplayer, 
+static struct unit *dai_hunter_find(struct player *pplayer,
                                     struct city *pcity)
 {
   unit_list_iterate(pcity->units_supported, punit) {
@@ -185,7 +185,7 @@ static void dai_hunter_missile_want(struct player *pplayer,
     }
 
     /* FIXME: We need to store some data that can tell us if
-     * enemy transports are protected by anti-missile technology. 
+     * enemy transports are protected by anti-missile technology.
      * In this case, want nuclear much more! */
     desire = (ut->hp
               * MIN(ut->attack_strength, 30) /* nuke fix */
@@ -559,9 +559,9 @@ int dai_hunter_manage(struct ai_type *ait, struct player *pplayer,
       }
 
       UNIT_LOG(LOGLEVEL_HUNT, punit, "hunting %s %s[%d](%d,%d) "
-               "with want %d, dist1 %d, dist2 %d", 
+               "with want %d, dist1 %d, dist2 %d",
                nation_rule_name(nation_of_unit(target)),
-               unit_rule_name(target), 
+               unit_rule_name(target),
                target->id,
                TILE_XY(target_tile),
                stackthreat,
diff --git a/ai/default/dailog.h b/ai/default/dailog.h
index ef64c935c3..4a8796d86e 100644
--- a/ai/default/dailog.h
+++ b/ai/default/dailog.h
@@ -16,8 +16,8 @@
 /* utility */
 #include "log.h"
 #include "support.h"
- 
-/* Change these and remake to watch logs from a specific 
+
+/* Change these and remake to watch logs from a specific
    part of the AI code. */
 #define LOGLEVEL_TECH LOG_DEBUG
 
diff --git a/ai/default/daimilitary.c b/ai/default/daimilitary.c
index 1a30d7ec4d..f18956432f 100644
--- a/ai/default/daimilitary.c
+++ b/ai/default/daimilitary.c
@@ -668,8 +668,8 @@ void dai_assess_danger_player(struct ai_type *ait,
   This algorithm is very strange. But I created it by nesting up
   Syela's convoluted if ... else logic, and it seems to work. -- Per
 **************************************************************************/
-static void dai_reevaluate_building(struct city *pcity, adv_want *value, 
-                                    unsigned int urgency, unsigned int danger, 
+static void dai_reevaluate_building(struct city *pcity, adv_want *value,
+                                    unsigned int urgency, unsigned int danger,
                                     int defense)
 {
   if (*value == 0 || danger <= 0) {
@@ -1394,8 +1394,8 @@ static void process_attacker_want(struct ai_type *ait,
       }
 
       /* Not bothering to s/!vuln/!pdef/ here for the time being. -- Syela
-       * (this is noted elsewhere as terrible bug making warships yoyoing) 
-       * as the warships will go to enemy cities hoping that the enemy builds 
+       * (this is noted elsewhere as terrible bug making warships yoyoing)
+       * as the warships will go to enemy cities hoping that the enemy builds
        * something for them to kill. */
       if (vuln == 0
           && (utype_class(punittype)->adv.land_move == MOVE_NONE
@@ -1529,7 +1529,7 @@ static struct adv_choice *kill_something_with(struct ai_type *ait,
   /* Benefit from fighting the target */
   adv_want benefit;
   /* Defender of the target city/tile */
-  struct unit *pdef; 
+  struct unit *pdef;
   const struct unit_type *def_type;
   struct player *def_owner;
   int def_vet; /* Is the defender veteran? */
@@ -1655,7 +1655,7 @@ static struct adv_choice *kill_something_with(struct ai_type *ait,
     process_attacker_want(ait, pcity, benefit, def_type, def_owner,
                           def_vet, ptile,
                           best_choice, NULL, NULL, NULL);
-  } else { 
+  } else {
     /* Attract a boat to our city or retain the one that's already here */
     fc_assert_ret_val(unit_class_get(myunit)->adv.sea_move != MOVE_FULL, choice);
     best_choice->need_boat = TRUE;
@@ -1749,11 +1749,11 @@ static void dai_unit_consider_bodyguard(struct ai_type *ait,
   Before building a military unit, AI builds a barracks/port/airport
   NB: It is assumed this function isn't called in an emergency
   situation, when we need a defender _now_.
- 
+
   TODO: something more sophisticated, like estimating future demand
   for military units, considering Sun Tzu instead.
 **************************************************************************/
-static void adjust_ai_unit_choice(struct city *pcity, 
+static void adjust_ai_unit_choice(struct city *pcity,
                                   struct adv_choice *choice)
 {
   Impr_type_id id;
@@ -1801,10 +1801,10 @@ struct adv_choice *military_advisor_choose_build(struct ai_type *ait,
   bool allow_gold_upkeep;
 
   urgency = assess_danger(ait, nmap, pcity, ul_cb);
-  /* Changing to quadratic to stop AI from building piles 
+  /* Changing to quadratic to stop AI from building piles
    * of small units -- Syela */
   /* It has to be AFTER assess_danger() thanks to wallvalue. */
-  our_def = assess_defense_quadratic(ait, pcity); 
+  our_def = assess_defense_quadratic(ait, pcity);
 
   dai_choose_diplomat_defensive(ait, pplayer, pcity, choice, our_def);
 
@@ -1972,10 +1972,10 @@ struct adv_choice *military_advisor_choose_build(struct ai_type *ait,
     }
   } /* Ok, don't need to defend */
 
-  if (pcity->surplus[O_SHIELD] <= 0 
+  if (pcity->surplus[O_SHIELD] <= 0
       || pcity->feel[CITIZEN_UNHAPPY][FEELING_FINAL] > pcity->feel[CITIZEN_UNHAPPY][FEELING_EFFECT]
       || pcity->id == ai->wonder_city) {
-    /* Things we consider below are not life-saving so we don't want to 
+    /* Things we consider below are not life-saving so we don't want to
      * build them if our populace doesn't feel like it */
     return choice;
   }
diff --git a/ai/default/daiparadrop.c b/ai/default/daiparadrop.c
index 98f66342d9..85d61f0e7a 100644
--- a/ai/default/daiparadrop.c
+++ b/ai/default/daiparadrop.c
@@ -74,7 +74,7 @@ static struct tile *find_best_tile_to_paradrop_to(struct ai_type *ait,
     if (!map_is_known(ptile, pplayer)) {
       continue;
     }
-  
+
     acity = tile_city(ptile);
     if (acity && city_owner(acity) == unit_owner(punit)
         && unit_list_size(ptile->units) == 0) {
@@ -85,10 +85,10 @@ static struct tile *find_best_tile_to_paradrop_to(struct ai_type *ait,
       }
     }
   } square_iterate_end;
-  
+
   if (best_tile != NULL) {
     acity = tile_city(best_tile);
-    UNIT_LOG(LOGLEVEL_PARATROOPER, punit, 
+    UNIT_LOG(LOGLEVEL_PARATROOPER, punit,
              "Choose to jump in order to protect allied city %s (%d %d). "
              "Benefit: %d",
              city_name_get(acity), TILE_XY(best_tile), best);
@@ -113,10 +113,10 @@ static struct tile *find_best_tile_to_paradrop_to(struct ai_type *ait,
       }
     }
   } square_iterate_end;
-  
+
   if (best_tile != NULL) {
     acity = tile_city(best_tile);
-    UNIT_LOG(LOGLEVEL_PARATROOPER, punit, 
+    UNIT_LOG(LOGLEVEL_PARATROOPER, punit,
              "Choose to jump into enemy city %s (%d %d). Benefit: %d",
              city_name_get(acity), TILE_XY(best_tile), best);
     return best_tile;
@@ -173,7 +173,7 @@ static struct tile *find_best_tile_to_paradrop_to(struct ai_type *ait,
                              NULL);
       val += pterrain->defense_bonus / 10;
       val -= punit->hp * 100;
-      
+
       if (val > best) {
         best = val;
 	best_tile = ptile;
@@ -218,7 +218,7 @@ void dai_manage_paratrooper(struct ai_type *ait, struct player *pplayer,
   if (punit->moves_left == 0) {
     return;
   }
-  
+
   if (pcity && unit_list_size(unit_tile(punit)->units) == 1) {
     UNIT_LOG(LOGLEVEL_PARATROOPER, punit, "Defending the city.");
     return;
@@ -317,7 +317,7 @@ static int calculate_want_for_paratrooper(struct unit *punit,
   struct civ_map *nmap = &(wld.map);
 
   profit += u_type->defense_strength
-          + u_type->move_rate 
+          + u_type->move_rate
 	  + u_type->attack_strength;
 
   square_iterate(nmap, ptile_city, range, ptile) {
diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c
index 65a32290d1..db55b494f0 100644
--- a/ai/default/daisettler.c
+++ b/ai/default/daisettler.c
@@ -21,7 +21,7 @@
 /* utility */
 #include "mem.h"
 #include "log.h"
-#include "support.h" 
+#include "support.h"
 #include "timing.h"
 
 /* common */
@@ -66,12 +66,12 @@
 
 
 /* COMMENTS */
-/* 
+/*
    This code tries hard to do the right thing, including looking
    into the future (wrt to government), and also doing this in a
    modpack friendly manner. However, there are some pieces missing.
 
-   A tighter integration into the city management code would 
+   A tighter integration into the city management code would
    give more optimal city placements, since existing cities could
    move their workers around to give a new city better placement.
    Occasionally you will see cities being placed sub-optimally
@@ -111,7 +111,7 @@
 /* Percentage bonus to city locations near an ocean. */
 #define NAVAL_EMPHASIS 20
 
-/* Modifier for defense bonus that is applied to city location want. 
+/* Modifier for defense bonus that is applied to city location want.
  * This is % of defense % to increase want by. */
 #define DEFENSE_EMPHASIS 20
 
@@ -408,7 +408,7 @@ static struct cityresult *cityresult_fill(struct ai_type *ait,
                     + (result->best_other.tdc != NULL
                        ? result->best_other.tdc->sum : 0);
   } else if (result->best_other.tdc != NULL) {
-    /* Baseline is best extra tile only. This is why making new cities 
+    /* Baseline is best extra tile only. This is why making new cities
      * is so darn good. */
     result->total = result->best_other.tdc->sum;
   } else {
@@ -967,7 +967,7 @@ static struct cityresult *find_best_city_placement(struct ai_type *ait,
 
     /* FIXME: Maybe penalty for using an existing boat is too high?
      * We shouldn't make the penalty for building a new boat too high though.
-     * Building a new boat is like a war against a weaker enemy -- 
+     * Building a new boat is like a war against a weaker enemy --
      * good for the economy. (c) Bush family */
     cr2 = settler_map_iterate(ait, &parameter, punit,
                               unit_build_shield_cost_base(ferry));
@@ -1139,11 +1139,11 @@ BUILD_CITY:
     if (result && result->result > best_impr) {
       UNIT_LOG(LOG_DEBUG, punit, "city want " ADV_WANT_PRINTF, result->result);
       if (tile_city(result->tile)) {
-        UNIT_LOG(LOG_DEBUG, punit, "immigrates to %s (%d, %d)", 
+        UNIT_LOG(LOG_DEBUG, punit, "immigrates to %s (%d, %d)",
                  city_name_get(tile_city(result->tile)),
                  TILE_XY(result->tile));
       } else {
-        UNIT_LOG(LOG_DEBUG, punit, "makes city at (%d, %d)", 
+        UNIT_LOG(LOG_DEBUG, punit, "makes city at (%d, %d)",
                  TILE_XY(result->tile));
         if (punit->server.debug) {
           print_cityresult(pplayer, result);
diff --git a/ai/default/daitech.c b/ai/default/daitech.c
index a6d553aea9..9a96859f30 100644
--- a/ai/default/daitech.c
+++ b/ai/default/daitech.c
@@ -48,7 +48,7 @@
 struct ai_tech_choice {
   Tech_type_id choice;        /* The id of the most needed tech */
   adv_want want;              /* Want of the most needed tech */
-  adv_want current_want;      /* Want of the tech which is currently researched 
+  adv_want current_want;      /* Want of the tech which is currently researched
                                * or is our current goal */
 };
 
@@ -68,7 +68,7 @@ struct ai_tech_choice {
   4. A tech isn't a requirement of itself.
 **************************************************************************/
 static void dai_select_tech(struct ai_type *ait,
-                            struct player *pplayer, 
+                            struct player *pplayer,
                             struct ai_tech_choice *choice,
                             struct ai_tech_choice *goal)
 {
@@ -359,8 +359,8 @@ void dai_manage_tech(struct ai_type *ait, struct player *pplayer)
         && (penalty + research->bulbs_researched
             <= research_total_bulbs_required(research, research->researching,
                                              FALSE))) {
-      TECH_LOG(ait, LOG_DEBUG, pplayer, advance_by_number(choice.choice), 
-               "new research, was %s, penalty was %d", 
+      TECH_LOG(ait, LOG_DEBUG, pplayer, advance_by_number(choice.choice),
+               "new research, was %s, penalty was %d",
                research_advance_rule_name(research, research->researching),
                penalty);
       choose_tech(research, choice.choice);
-- 
2.47.2

