From 0e656681bce7813f0e7827d7d5ea1a7fd780be65 Mon Sep 17 00:00:00 2001 From: John Zaitseff Date: Mon, 6 Aug 2018 22:09:20 +1000 Subject: [PATCH] Correct spelling or grammatical mistakes in various comments --- src/fileio.c | 4 ++-- src/move.h | 2 +- src/utils.c | 4 ++-- src/utils.h | 11 ++++++----- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 7032c39..547e359 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -406,7 +406,7 @@ bool load_game (int num) lineno++; } - // Read in a dummy sentinal value + // Read in a dummy sentinel value load_game_read_int(n, n == GAME_FILE_SENTINEL); if (fclose(file) == EOF) { @@ -587,7 +587,7 @@ bool save_game (int num) fprintf(file, "%s", encbuf); } - // Write out a dummy sentinal value + // Write out a dummy sentinel value save_game_write_int(GAME_FILE_SENTINEL); if (fclose(file) == EOF) { diff --git a/src/move.h b/src/move.h index b73581e..06f23a3 100644 --- a/src/move.h +++ b/src/move.h @@ -57,7 +57,7 @@ extern void select_moves (void); This function displays the galaxy map and the current moves, then waits for the player to select one of the moves. On entry, current_player contains the current player number; quit_selected and/or abort_game may - be true (if so, get_move() justs returns SEL_QUIT without waiting for + be true (if so, get_move() just returns SEL_QUIT without waiting for the player to select a move). The return value is the choice made by the player. diff --git a/src/utils.c b/src/utils.c index 1a2be48..1cf6062 100644 --- a/src/utils.c +++ b/src/utils.c @@ -202,7 +202,7 @@ static bool add_currency_symbol = false; // Do we need to add "$"? Returns: (nothing) This function copies n bytes from *src into *dest, applying a XOR with - the contents of xor_table in the process. It is a reversable function: + the contents of xor_table in the process. It is a reversible function: apply_xor(apply_xor(buffer)) == buffer. It is used by both scramble() and unscramble(). */ @@ -743,7 +743,7 @@ char *unscramble (char *restrict dest, const char *restrict src, return NULL; } - // Descramble xorbuf using *key, ignoring CRC32 in front + // Unscramble xorbuf using *key, ignoring CRC32 in front apply_xor(dest, midxor, xorlen - SCRAMBLE_CRC_LEN, key); // Convert the output to a C string diff --git a/src/utils.h b/src/utils.h index 93923b9..642cf87 100644 --- a/src/utils.h +++ b/src/utils.h @@ -87,9 +87,9 @@ extern void init_program_name (const char *argv0); Returns: const char * - Pointer to home directory This function returns the full pathname to the user's home directory, - using the HOME environment variable. Note that the existance or - writability of this pathname is NOT checked by this function. NULL is - returned if the home directory cannot be determined. + using the HOME environment variable. Note that the existence of or + ability to write to this pathname is NOT checked by this function. + NULL is returned if the home directory cannot be determined. */ extern const char *home_directory (void); @@ -102,8 +102,9 @@ extern const char *home_directory (void); This function returns the full pathname to a potentially-writable subdirectory within the user's home directory. Essentially, this function returns home_directory() + "/." + program_name. Note that - this path is NOT created by this function, nor is the writability of - this path checked. NULL is returned if this path cannot be determined. + this path is NOT created by this function, nor is the ability to write + to this path checked. NULL is returned if this path cannot be + determined. */ extern const char *data_directory (void);