From ff99151fe2653c035f8f1aa069f726cb10f927c3 Mon Sep 17 00:00:00 2001
From: Dominik Loidolt <dominik.loidolt@univie.ac.at>
Date: Wed, 6 Nov 2024 10:58:36 +0100
Subject: [PATCH] Fix spelling errors and grammar in documentation and messages

---
 CHANGELOG.md                       | 2 +-
 doc/doxygen/Doxyfile.in            | 2 +-
 lib/icu_compress/cmp_icu.c         | 4 ++--
 programs/cmp_io.c                  | 2 +-
 test/bench/leon3_grtimer.c         | 4 ++--
 test/bench/leon3_timers.h          | 2 +-
 test/bench/timefn.c                | 2 +-
 test/cmp_icu/test_cmp_icu.c        | 6 +++---
 test/tools/generate_test_runner.rb | 2 +-
 9 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30fb967..b2baff8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -86,7 +86,7 @@ E.g. "# comment\n ABCD 1    2\n34B 12\n" are interpreted as {0xAB, 0xCD,
 ### Fixed
 - fixes small errors when reading the data
 ### Added
-- add frame script to mange multiple compression in a raw
+- add frame script to manage multiple compression in a raw
 - add last_info option to generate RMAP packets to read the last compression results in parallel
 
 ## [0.04] - 12-08-2020
diff --git a/doc/doxygen/Doxyfile.in b/doc/doxygen/Doxyfile.in
index db87bbc..8af201e 100644
--- a/doc/doxygen/Doxyfile.in
+++ b/doc/doxygen/Doxyfile.in
@@ -86,7 +86,7 @@ CREATE_SUBDIRS         = NO
 # level increment doubles the number of directories, resulting in 4096
 # directories at level 8 which is the default and also the maximum value. The
 # sub-directories are organized in 2 levels, the first level always has a fixed
-# numer of 16 directories.
+# number of 16 directories.
 # Minimum value: 0, maximum value: 8, default value: 8.
 # This tag requires that the tag CREATE_SUBDIRS is set to YES.
 
diff --git a/lib/icu_compress/cmp_icu.c b/lib/icu_compress/cmp_icu.c
index a494e96..bab0f2d 100644
--- a/lib/icu_compress/cmp_icu.c
+++ b/lib/icu_compress/cmp_icu.c
@@ -209,7 +209,7 @@ static uint32_t put_n_bits32(uint32_t value, unsigned int n_bits, uint32_t bit_o
  *			for better performance
  * @param cw		address where the code word is stored
  *
- * @warning no check of the validity of the input parameters!
+ * @warning there is no check of the validity of the input parameters!
  * @returns the length of the formed code word in bits; the code word is invalid
  *	if the return value is greater than 32
  */
@@ -243,7 +243,7 @@ static uint32_t rice_encoder(uint32_t value, uint32_t m, uint32_t log2_m,
  * @param log2_m	is ilog_2(m) calculate outside function for better performance
  * @param cw		address where the code word is stored
  *
- * @warning no check of the validity of the input parameters!
+ * @warning there is no check of the validity of the input parameters!
  * @returns the length of the formed code word in bits; the code word is invalid
  *	if the return value is greater than 32
  */
diff --git a/programs/cmp_io.c b/programs/cmp_io.c
index 5ef3edf..f4938dc 100644
--- a/programs/cmp_io.c
+++ b/programs/cmp_io.c
@@ -1846,7 +1846,7 @@ static void write_cmp_par_internal(FILE *fp, const struct cmp_par *par)
 		return;
 
 	if (!par) {
-		fprintf(fp, "Pointer to the compression parmeters is NULL.\n");
+		fprintf(fp, "Pointer to the compression parameters is NULL.\n");
 		return;
 	}
 
diff --git a/test/bench/leon3_grtimer.c b/test/bench/leon3_grtimer.c
index 37e2428..2fcf199 100644
--- a/test/bench/leon3_grtimer.c
+++ b/test/bench/leon3_grtimer.c
@@ -189,7 +189,7 @@ void grtimer_clear_restart(struct grtimer_unit *rtu, uint32_t timer)
 
 
 /**
- * @brief set timer to chain to the preceeding timer
+ * @brief set timer to chain to the preceding timer
  * @param rtu a struct grtimer_unit
  * @param timer the selected timer
  */
@@ -206,7 +206,7 @@ void grtimer_set_chained(struct grtimer_unit *rtu, uint32_t timer)
 
 
 /**
- * @brief clear timer to chain to the preceeding timer
+ * @brief clear timer to chain to the preceding timer
  * @param rtu a struct grtimer_unit
  * @param timer the selected timer
  */
diff --git a/test/bench/leon3_timers.h b/test/bench/leon3_timers.h
index 907279b..34445c9 100644
--- a/test/bench/leon3_timers.h
+++ b/test/bench/leon3_timers.h
@@ -26,7 +26,7 @@
 #define LEON3_TIMER_LD	0x00000004U      /* load counter    */
 #define LEON3_TIMER_IE	0x00000008U      /* irq enable      */
 #define LEON3_TIMER_IP	0x00000010U      /* irq pending (clear by writing 0 */
-#define LEON3_TIMER_CH	0x00000020U      /* chain with preceeding timer */
+#define LEON3_TIMER_CH	0x00000020U      /* chain with preceding timer */
 
 #define LEON3_CFG_TIMERS_MASK	0x00000007
 #define LEON3_CFG_IRQNUM_MASK	0x000000f8
diff --git a/test/bench/timefn.c b/test/bench/timefn.c
index 3680cd1..c73cbd2 100644
--- a/test/bench/timefn.c
+++ b/test/bench/timefn.c
@@ -148,7 +148,7 @@ UTIL_time_t UTIL_getTime(void)
  * C11 requires support of timespec_get().
  * However, FreeBSD 11 claims C11 compliance while lacking timespec_get().
  * Double confirm timespec_get() support by checking the definition of TIME_UTC.
- * However, some versions of Android manage to simultanously define TIME_UTC
+ * However, some versions of Android manage to simultaneously define TIME_UTC
  * and lack timespec_get() support...
  */
 #elif (defined(__STDC_VERSION__) &&			\
diff --git a/test/cmp_icu/test_cmp_icu.c b/test/cmp_icu/test_cmp_icu.c
index f6c7269..4152406 100644
--- a/test/cmp_icu/test_cmp_icu.c
+++ b/test/cmp_icu/test_cmp_icu.c
@@ -1451,7 +1451,7 @@ void test_compress_imagette_error_cases(void)
 	TEST_ASSERT_TRUE(cmp_is_error(cmp_size));
 	TEST_ASSERT_EQUAL_INT(CMP_ERROR_PAR_SPECIFIC, cmp_get_error_code(cmp_size));
 
-	/* test golomb_par  to hight */
+	/* test golomb_par to high */
 	rcfg.cmp_mode = CMP_MODE_DIFF_ZERO;
 	rcfg.input_buf = data;
 	rcfg.samples = 2;
@@ -1464,7 +1464,7 @@ void test_compress_imagette_error_cases(void)
 	TEST_ASSERT_TRUE(cmp_is_error(cmp_size));
 	TEST_ASSERT_EQUAL_INT(CMP_ERROR_PAR_SPECIFIC, cmp_get_error_code(cmp_size));
 
-	/* round to hight */
+	/* round to high */
 	rcfg.cmp_mode = CMP_MODE_DIFF_ZERO;
 	rcfg.input_buf = data;
 	rcfg.samples = 2;
@@ -1478,7 +1478,7 @@ void test_compress_imagette_error_cases(void)
 	TEST_ASSERT_TRUE(cmp_is_error(cmp_size));
 	TEST_ASSERT_EQUAL_INT(CMP_ERROR_PAR_GENERIC, cmp_get_error_code(cmp_size));
 
-	/* model_value to hight */
+	/* model_value to high */
 	rcfg.cmp_mode = CMP_MODE_MODEL_ZERO;
 	rcfg.input_buf = data;
 	rcfg.samples = 2;
diff --git a/test/tools/generate_test_runner.rb b/test/tools/generate_test_runner.rb
index 50c93f5..7f3cda0 100755
--- a/test/tools/generate_test_runner.rb
+++ b/test/tools/generate_test_runner.rb
@@ -115,7 +115,7 @@ class UnityTestRunnerGenerator
     # @ is not a valid C character, so there should be no clashes with files genuinely containing these markers
     substring_subs = { '{' => '@co@', '}' => '@cc@', ';' => '@ss@', '/' => '@fs@' }
     substring_re = Regexp.union(substring_subs.keys)
-    substring_unsubs = substring_subs.invert                   # the inverse map will be used to fix the strings afterwords
+    substring_unsubs = substring_subs.invert                   # the inverse map will be used to fix the strings afterwards
     substring_unsubs['@quote@'] = '\\"'
     substring_unsubs['@apos@'] = '\\\''
     substring_unre = Regexp.union(substring_unsubs.keys)
-- 
GitLab