From 33d11a673ea07dbb4975851d06df7ad880e15aa2 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Thu, 12 Dec 2024 03:48:40 +0200
Subject: [PATCH 43/43] Fix generator/ comment typos

found by codespell

See RM #1185

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 server/generator/mapgen.c          | 16 ++++++++--------
 server/generator/mapgen_topology.h | 10 +++++-----
 server/generator/startpos.c        |  2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/server/generator/mapgen.c b/server/generator/mapgen.c
index d8338edaa3..cb2e44a7f3 100644
--- a/server/generator/mapgen.c
+++ b/server/generator/mapgen.c
@@ -111,7 +111,7 @@ static bool make_island(int islemass, int starters,
 #define RIVERS_MAXTRIES 32767
 /* This struct includes two dynamic bitvectors. They are needed to mark
    tiles as blocked to prevent a river from falling into itself, and for
-   storing rivers temporarly. */
+   storing rivers temporarily. */
 struct river_map {
   struct dbv blocked;
   struct dbv ok;
@@ -179,7 +179,7 @@ static int river_pct = 0;
                                     FALSE, TRUE, TC_OCEAN) <= 35)
 typedef enum { WC_ALL = 200, WC_DRY, WC_NDRY } wetness_c;
 
-/* MISCELANEOUS (OTHER CONDITIONS) */
+/* MISCELLANEOUS (OTHER CONDITIONS) */
 
 /* Necessary condition of swamp placement */
 static int hmap_low_level = 0;
@@ -482,10 +482,10 @@ static void make_plains(void)
   }
 
 /**********************************************************************//**
-  Make_terrains calls make_forest, make_dessert,etc with random free
+  Make_terrains calls make_forest(), make_dessert(), etc with random free
   locations until there has been made enough.
-  Comment: funtions as make_swamp, etc. has to have a non 0 probability
-  to place one terrains in called position. Else make_terrains will get
+  Comment: functions as make_swamp(), etc. has to have a non zero probability
+  to place one terrains in called position. Else make_terrains() will get
   in a infinite loop!
 **************************************************************************/
 static void make_terrains(void)
@@ -787,7 +787,7 @@ static struct test_func test_funcs[NUM_TEST_FUNCTIONS] = {
       n: height_map[...]
 
   If these rules haven't decided the direction, the random number
-  generator gets the desicion.                              -Erik Sigra
+  generator gets the decision.                              -Erik Sigra
 **************************************************************************/
 static bool make_river(struct river_map *privermap, struct tile *ptile,
                        struct extra_type *priver)
@@ -1144,7 +1144,7 @@ static void make_land(void)
   } else {
     make_relief(); /* Base relief on map */
   }
-  make_terrains(); /* Place all exept mountains and hill */
+  make_terrains(); /* Place all except mountains and hill */
   destroy_placed_map();
 
   make_rivers(); /* Use a new placed_map. Destroy older before call */
@@ -2337,7 +2337,7 @@ static void mapgenerator2(void)
 }
 
 /**********************************************************************//**
-  On popular demand, this tries to mimick the generator 3 as best as
+  On popular demand, this tries to mimic the generator 3 as best as
   possible.
 **************************************************************************/
 static void mapgenerator3(void)
diff --git a/server/generator/mapgen_topology.h b/server/generator/mapgen_topology.h
index 49796b7f08..47f820b848 100644
--- a/server/generator/mapgen_topology.h
+++ b/server/generator/mapgen_topology.h
@@ -41,12 +41,12 @@ int get_sqsize(void);
  * division by 0 in mapgen.c */
 #define L_UNIT MAX(1, wld.map.server.size * MAX_COLATITUDE / (30 * get_sqsize()))
 
-/* define the 3 regions of a Earth like map:
+/* Define the 3 regions of a Earth like map:
      0           - COLD_LV:        cold region
      COLD_LV     - TREOPICAL_LV:   temperate wet region
      TROPICAL_LV - MAX_COLATITUDE: tropical wet region
-   and a dry region, this last one can ovelap others
-   DRY_MIN_LEVEL- DRY_MAX_LEVEL */
+   and a dry region, this last one can overlap others
+   DRY_MIN_LEVEL - DRY_MAX_LEVEL */
 #define COLD_LEVEL                                                           \
    (MAX(0, MAX_COLATITUDE * (60*7 - wld.map.server.temperature * 6 ) / 700))
 #define TROPICAL_LEVEL                                                       \
@@ -57,7 +57,7 @@ int get_sqsize(void);
 #define DRY_MAX_LEVEL                                                        \
    (MAX_COLATITUDE * (7300 + wld.map.server.temperature * 17 ) / 10000)
 
-/* used to create the poles and for separating them.  In a
+/* Used to create the poles and for separating them. In a
  * mercator projection map we don't want the poles to be too big. */
 extern int ice_base_colatitude;
 #define ICE_BASE_LEVEL ice_base_colatitude
@@ -66,4 +66,4 @@ int map_colatitude(const struct tile *ptile);
 bool near_singularity(const struct tile *ptile);
 void generator_init_topology(bool autosize);
 
-#endif  /* FC__MAPGEN_TOPOLOGY_H */
+#endif /* FC__MAPGEN_TOPOLOGY_H */
diff --git a/server/generator/startpos.c b/server/generator/startpos.c
index b78f4c6124..db9068b8b0 100644
--- a/server/generator/startpos.c
+++ b/server/generator/startpos.c
@@ -418,7 +418,7 @@ bool create_start_positions(enum map_startpos mode,
   {
     int nr, to_place = player_count(), first = 1;
 
-    /* inizialize islands_index */
+    /* Initialize islands_index */
     for (nr = 1; nr <= wld.map.num_continents; nr++) {
       islands_index[islands[nr].id] = nr;
     }
-- 
2.45.2

