From 50943529bc08fcdf68b63dcf2cf27d1054169124 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Fri, 22 Mar 2024 01:31:21 +0200
Subject: [PATCH 24/24] Correct "hashs" to "hashes"

See RM #330

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-gtk-3.22/editprop.c |  4 ++--
 client/gui-gtk-4.0/editprop.c  |  4 ++--
 common/idex.c                  |  4 ++--
 common/networking/connection.c |  6 +++---
 utility/genhash.c              | 12 ++++++------
 utility/genhash.h              | 10 +++++-----
 utility/spechash.h             | 34 +++++++++++++++++-----------------
 7 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/client/gui-gtk-3.22/editprop.c b/client/gui-gtk-3.22/editprop.c
index eb358ce77a..99b8a63425 100644
--- a/client/gui-gtk-3.22/editprop.c
+++ b/client/gui-gtk-3.22/editprop.c
@@ -1228,8 +1228,8 @@ static bool propval_equal(struct propval *pva,
   case VALTYPE_NATION:
     return pva->data.v_nation == pvb->data.v_nation;
   case VALTYPE_NATION_HASH:
-    return nation_hashs_are_equal(pva->data.v_nation_hash,
-                                  pvb->data.v_nation_hash);
+    return nation_hashes_are_equal(pva->data.v_nation_hash,
+                                   pvb->data.v_nation_hash);
   case VALTYPE_GOV:
     return pva->data.v_gov == pvb->data.v_gov; 
   case VALTYPE_TILE_VISION_DATA:
diff --git a/client/gui-gtk-4.0/editprop.c b/client/gui-gtk-4.0/editprop.c
index 8660de20e3..25b98f3864 100644
--- a/client/gui-gtk-4.0/editprop.c
+++ b/client/gui-gtk-4.0/editprop.c
@@ -1228,8 +1228,8 @@ static bool propval_equal(struct propval *pva,
   case VALTYPE_NATION:
     return pva->data.v_nation == pvb->data.v_nation;
   case VALTYPE_NATION_HASH:
-    return nation_hashs_are_equal(pva->data.v_nation_hash,
-                                  pvb->data.v_nation_hash);
+    return nation_hashes_are_equal(pva->data.v_nation_hash,
+                                   pvb->data.v_nation_hash);
   case VALTYPE_GOV:
     return pva->data.v_gov == pvb->data.v_gov;
   case VALTYPE_TILE_VISION_DATA:
diff --git a/common/idex.c b/common/idex.c
index 740511e748..a628ded4bc 100644
--- a/common/idex.c
+++ b/common/idex.c
@@ -40,7 +40,7 @@
 #include "idex.h"
 
 /**********************************************************************//**
-   Initialize.  Should call this at the start before use.
+   Initialize. Should call this at the start before use.
 **************************************************************************/
 void idex_init(struct world *iworld)
 {
@@ -49,7 +49,7 @@ void idex_init(struct world *iworld)
 }
 
 /**********************************************************************//**
-   Free the hashs.
+   Free the hashes.
 **************************************************************************/
 void idex_free(struct world *iworld)
 {
diff --git a/common/networking/connection.c b/common/networking/connection.c
index 657acc3348..6c81cbcc1a 100644
--- a/common/networking/connection.c
+++ b/common/networking/connection.c
@@ -552,9 +552,9 @@ void free_compression_queue(struct connection *pc)
 }
 
 /**********************************************************************//**
-  Allocate and initialize packet hashs for given connection.
+  Allocate and initialize packet hashes for given connection.
 **************************************************************************/
-static void init_packet_hashs(struct connection *pc)
+static void init_packet_hashes(struct connection *pc)
 {
   enum packet_type i;
 
@@ -614,7 +614,7 @@ void connection_common_init(struct connection *pconn)
   pconn->json_mode = TRUE;
 #endif /* FREECIV_JSON_CONNECTION */
 
-  init_packet_hashs(pconn);
+  init_packet_hashes(pconn);
 
 #ifdef USE_COMPRESSION
   byte_vector_init(&pconn->compression.queue);
diff --git a/utility/genhash.c b/utility/genhash.c
index 8c2e3306dc..f9a63ef064 100644
--- a/utility/genhash.c
+++ b/utility/genhash.c
@@ -738,18 +738,18 @@ bool genhash_remove_full(struct genhash *pgenhash, const void *key,
 /************************************************************************//**
   Returns TRUE iff the hash tables contains the same pairs of key/data.
 ****************************************************************************/
-bool genhashs_are_equal(const struct genhash *pgenhash1,
-                        const struct genhash *pgenhash2)
+bool genhashes_are_equal(const struct genhash *pgenhash1,
+                         const struct genhash *pgenhash2)
 {
-  return genhashs_are_equal_full(pgenhash1, pgenhash2, NULL);
+  return genhashes_are_equal_full(pgenhash1, pgenhash2, NULL);
 }
 
 /************************************************************************//**
   Returns TRUE iff the hash tables contains the same pairs of key/data.
 ****************************************************************************/
-bool genhashs_are_equal_full(const struct genhash *pgenhash1,
-                             const struct genhash *pgenhash2,
-                             genhash_comp_fn_t data_comp_func)
+bool genhashes_are_equal_full(const struct genhash *pgenhash1,
+                              const struct genhash *pgenhash2,
+                              genhash_comp_fn_t data_comp_func)
 {
   struct genhash_entry *const *bucket1, *const *max1, *const *slot2;
   const struct genhash_entry *iter1;
diff --git a/utility/genhash.h b/utility/genhash.h
index 640510bca9..2369dd0320 100644
--- a/utility/genhash.h
+++ b/utility/genhash.h
@@ -96,11 +96,11 @@ bool genhash_remove(struct genhash *pgenhash, const void *key);
 bool genhash_remove_full(struct genhash *pgenhash, const void *key,
                          void **deleted_pkey, void **deleted_pdata);
 
-bool genhashs_are_equal(const struct genhash *pgenhash1,
-                        const struct genhash *pgenhash2);
-bool genhashs_are_equal_full(const struct genhash *pgenhash1,
-                             const struct genhash *pgenhash2,
-                             genhash_comp_fn_t data_comp_func);
+bool genhashes_are_equal(const struct genhash *pgenhash1,
+                         const struct genhash *pgenhash2);
+bool genhashes_are_equal_full(const struct genhash *pgenhash1,
+                              const struct genhash *pgenhash2,
+                              genhash_comp_fn_t data_comp_func);
 
 
 /* Iteration. */
diff --git a/utility/spechash.h b/utility/spechash.h
index ac31df496e..b224b7aeb8 100644
--- a/utility/spechash.h
+++ b/utility/spechash.h
@@ -11,7 +11,7 @@
    GNU General Public License for more details.
 ***********************************************************************/
 
-/* spechashs: "specific genhash".
+/* spechashes: "specific genhash".
  *
  * This file is used to implement a "specific" genhash.
  * That is, a (sometimes) type-checked genhash. (Or at least a
@@ -108,11 +108,11 @@
  *    bool foo_hash_remove_full(struct foo_hash *phash, const key_t key,
  *                              key_t *deleted_pkey, data_t *deleted_pdata);
  *
- *    bool foo_hashs_are_equal(const struct foo_hash *phash1,
- *                             const struct foo_hash *phash2);
- *    bool foo_hashs_are_equal_full(const struct foo_hash *phash1,
- *                                  const struct foo_hash *phash2,
- *                                  foo_hash_data_comp_fn_t data_comp_func);
+ *    bool foo_hashes_are_equal(const struct foo_hash *phash1,
+ *                              const struct foo_hash *phash2);
+ *    bool foo_hashes_are_equal_full(const struct foo_hash *phash1,
+ *                                   const struct foo_hash *phash2,
+ *                                   foo_hash_data_comp_fn_t data_comp_func);
  *
  *    size_t foo_hash_iter_sizeof(void);
  *    struct iterator *foo_hash_iter_init(struct foo_hash_iter *iter,
@@ -591,25 +591,25 @@ SPECHASH_FOO(_hash_remove_full) (SPECHASH_HASH *tthis,
   Compare the specific hash tables.
 ****************************************************************************/
 static inline bool
-SPECHASH_FOO(_hashs_are_equal_full) (const SPECHASH_HASH *phash1,
-                                     const SPECHASH_HASH *phash2,
-                                     SPECHASH_FOO(_hash_data_comp_fn_t)
-                                     data_comp_func)
+SPECHASH_FOO(_hashes_are_equal_full) (const SPECHASH_HASH *phash1,
+                                      const SPECHASH_HASH *phash2,
+                                      SPECHASH_FOO(_hash_data_comp_fn_t)
+                                      data_comp_func)
 {
-  return genhashs_are_equal_full((const struct genhash *) phash1,
-                                 (const struct genhash *) phash2,
-                                 (genhash_comp_fn_t) data_comp_func);
+  return genhashes_are_equal_full((const struct genhash *) phash1,
+                                  (const struct genhash *) phash2,
+                                  (genhash_comp_fn_t) data_comp_func);
 }
 
 /************************************************************************//**
   Compare the specific hash tables.
 ****************************************************************************/
 static inline bool
-SPECHASH_FOO(_hashs_are_equal) (const SPECHASH_HASH *phash1,
-                                const SPECHASH_HASH *phash2)
+SPECHASH_FOO(_hashes_are_equal) (const SPECHASH_HASH *phash1,
+                                 const SPECHASH_HASH *phash2)
 {
-  return SPECHASH_FOO(_hashs_are_equal_full) (phash1, phash2,
-                                              SPECHASH_IDATA_COMP);
+  return SPECHASH_FOO(_hashes_are_equal_full) (phash1, phash2,
+                                               SPECHASH_IDATA_COMP);
 }
 
 /************************************************************************//**
-- 
2.43.0

