From 82188d190c1a3aed574375871629ef4d3472dfa2 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 31 Mar 2025 19:59:56 +0800 Subject: [PATCH] doc: Fix typos Found via `codespell -S data,./test/third_party -L ded,nast` and `typos --hidden --format brief` --- .github/workflows/ci.yml | 2 +- README.md | 2 +- include/coord.h | 4 ++-- src/astro.c | 2 +- src/core.c | 2 +- src/core_render.c | 2 +- src/stopwatch.c | 2 +- src/strptime.c | 2 +- test/core_test.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66eab79..0f63f42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -290,7 +290,7 @@ jobs: path: ${{env.Bin}} merge-multiple: true - - name: List Release Directiory + - name: List Release Directory run: | ls -l ${{env.Bin}} diff --git a/README.md b/README.md index 3f4c58b..208e272 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ guix package --install astroterm # add to current profile - **Linux:** `linux` - **macOS:** `darwin` - Replace `` with the appropriate architecture: - - **Linux:** `x86_64` (arm64 support to come after [Ubuntu arm64 runners](https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/) are avilable) + - **Linux:** `x86_64` (arm64 support to come after [Ubuntu arm64 runners](https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/) are available) - **Apple Silicon (M-series):** `aarch64` - **Intel-based Macs:** `x86_64` - To view all supported combinations, see the [Releases](https://github.com/da-luce/astroterm/releases) page. diff --git a/include/coord.h b/include/coord.h index 6eec611..e64e9d2 100644 --- a/include/coord.h +++ b/include/coord.h @@ -1,8 +1,8 @@ /* Coordinate system utilities. * - * Coordinate systems definitons + * Coordinate systems definitions * - All angles in radians unless otherwise noted - * - Using common mathmatical conventions as opposed to physics + * - Using common mathematical conventions as opposed to physics * - https://en.wikipedia.org/wiki/Spherical_coordinate_system * - FIXME: this is not the ISO standard, maybe we should change it. * diff --git a/src/astro.c b/src/astro.c index d6623b7..7bc5945 100644 --- a/src/astro.c +++ b/src/astro.c @@ -394,7 +394,7 @@ const char *get_zodiac_symbol(int month, int day) /* Takes the normalized age of the moon within the synodic month * (phase ∈ [0, 1)), and returns the phase of the moon [0,1,...,7], where * 0 : new moon - * 1 : waxing cresent + * 1 : waxing crescent * ... * 4 : full moon * etc. diff --git a/src/core.c b/src/core.c index 36f9de0..834cf34 100644 --- a/src/core.c +++ b/src/core.c @@ -461,7 +461,7 @@ bool star_numbers_by_magnitude(int **num_by_mag, const struct Star *star_table, memcpy(table_copy, star_table, num_stars * sizeof(*table_copy)); qsort(table_copy, num_stars, sizeof(struct Star), star_magnitude_comparator); - // Create and fill array of indicies in table copy + // Create and fill array of indices in table copy *num_by_mag = malloc(num_stars * sizeof(int)); if (*num_by_mag == NULL) { diff --git a/src/core_render.c b/src/core_render.c index 974fd27..06225ac 100644 --- a/src/core_render.c +++ b/src/core_render.c @@ -263,7 +263,7 @@ void render_azimuthal_grid(WINDOW *win, const struct Conf *config) int step_sizes[5] = {10, 15, 30, 45, 90}; int length = sizeof(step_sizes) / sizeof(step_sizes[0]); - // Minumum number of rows separating grid line (at end of window) + // Minimum number of rows separating grid line (at end of window) int min_height = 10; // Set the step size to the smallest desirable increment diff --git a/src/stopwatch.c b/src/stopwatch.c index 6ac365c..e13c9ee 100644 --- a/src/stopwatch.c +++ b/src/stopwatch.c @@ -6,7 +6,7 @@ // UNIX headers #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) #include -#include // Needed for _POSIX_TIMERS definintion & usleep() +#include // Needed for _POSIX_TIMERS definition & usleep() #endif // Windows headers diff --git a/src/strptime.c b/src/strptime.c index b2c1aa2..39651b4 100644 --- a/src/strptime.c +++ b/src/strptime.c @@ -267,7 +267,7 @@ char *strptime(const char *buf, const char *fmt, struct tm *tm) continue; case 'x': /* The date, using the locale's format. */ - /* fall throug */ + /* fall through */ case 'D': /* The date as "%y/%m/%d". */ { diff --git a/test/core_test.c b/test/core_test.c index a37ecdc..8fafe46 100644 --- a/test/core_test.c +++ b/test/core_test.c @@ -218,7 +218,7 @@ void test_update_planet_positions(void) TEST_ASSERT_DOUBLE_WITHIN(P_EPSILON, -0.341956, planet_table[MARS].base.altitude); // Verify Neptune's position is correct - // Note that the outer planets have extra kep elements (position takes mroe calculation) + // Note that the outer planets have extra kep elements (position takes more calculation) // https://stellarium-web.org/skysource/Neptune?fov=120.00&date=2020-10-23T12:00:00Z&lat=42.36&lng=-71.06&elev=0 TEST_ASSERT_DOUBLE_WITHIN(P_EPSILON, 5.5390816, planet_table[NEPTUNE].base.azimuth); TEST_ASSERT_DOUBLE_WITHIN(P_EPSILON, -0.779650, planet_table[NEPTUNE].base.altitude);