Skip to content

Commit

Permalink
Fix typos or wording in comments and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardsEric authored and NickMcConnell committed Oct 16, 2024
1 parent 617c313 commit 919d7e7
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/hacking/compiling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ When debugging crashes it can be very useful to get more information about *what
./configure [options]
SANITIZE_FLAGS="-fsanitize=undefined -fsanitize=address" make

Note that compiling with this tools will require installing additional dependencies: libubsan libasan (names of the packages might be different in your distribution).
Note that compiling with these tools will require installing additional dependencies: libubsan libasan (names of the packages might be different in your distribution).

There is probably a way to get these tools to work on Windows. If you know how, please add the information to this file.

Expand Down
2 changes: 1 addition & 1 deletion lib/gamedata/monster_spell.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# name - sets the spell name; must match the first argument (other than NONE or
# MAX) to one of the RSF() macros in list-mon-spells.h
# msgt - sets the message type to use for message-vis, message-invis, and
# message-miss messages of the current spell; the type must be either
# message-miss messages of the current spell; the type must either
# match (case-insensitive) the first argument to one of the MSG()
# macros in list-message.h or be an unsigned integer less than MSG_MAX
# which is the index of the message type to use within list-message.h;
Expand Down
2 changes: 1 addition & 1 deletion lib/gamedata/projection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

# 'msgt' is the message type code used by the message system. The type must
# either match (case-insensitve) the first argument to one of the MSG() macros
# in list-message.h or ben an unsigned integer less than MSG_MAX which is the
# in list-message.h or be an unsigned integer less than MSG_MAX which is the
# index of the message type to use within list-message.h. For the textui
# user interface, the message type affects the message color (configured
# globally by lib/customize/message.prf; also configurable by preferences
Expand Down
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -4659,7 +4659,7 @@ static struct init_module *modules[] = {
* The only input/output in this file should be via event_signal_string().
* We cannot rely on any particular UI as this part should be UI-agnostic.
* We also cannot rely on anything else having being initialised into any
* particlar state. Which is why you'd be calling this function in the
* particular state. Which is why you'd be calling this function in the
* first place.
*
* Old comment, not sure if still accurate:
Expand Down
2 changes: 1 addition & 1 deletion src/tests/parse/a-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int setup_tests(void **state) {
k_info = mem_zalloc(z_info->k_max * sizeof(*k_info));
kb_info = mem_zalloc(TV_MAX * sizeof(*kb_info));
kb_info[TV_LIGHT].tval = TV_LIGHT;
/* Do minimal setup to for testing slay, brand, and curse directives. */
/* Do minimal setup for testing slay, brand, and curse directives. */
z_info->slay_max = (uint8_t) N_ELEMENTS(dummy_slays);
slays = dummy_slays;
z_info->brand_max = (uint8_t) N_ELEMENTS(dummy_brands);
Expand Down
5 changes: 2 additions & 3 deletions src/tests/parse/e-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ static int test_type0(void *state) {
}
}
/*
* Now check the the list of all kinds to see if all swords were
* included.
* Now check the list of all kinds to see if all swords were included.
*/
for (i = 0; i < z_info->k_max; ++i) {
if (k_info[i].tval == TV_SWORD && !marked[i]) {
Expand Down Expand Up @@ -511,7 +510,7 @@ static int test_values_bad0(void *state) {
eq(r, PARSE_ERROR_INVALID_VALUE);
r = parser_parse(p, "values:RES_POIS1]");
eq(r, PARSE_ERROR_INVALID_VALUE);
/* CHeck handling of a missing closing bracket. */
/* Check handling of a missing closing bracket. */
r = parser_parse(p, "values:STEALTH[1");
eq(r, PARSE_ERROR_INVALID_VALUE);
r = parser_parse(p, "values:RES_POIS[1");
Expand Down
2 changes: 1 addition & 1 deletion src/tests/parse/flavor.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int test_kind_bad0(void *state) {
const char *suite_name = "parse/flavor";
/*
* test_flavor0() and test_fixed0() have to be after test_kind0(). Run
* test_kind_bad0() to avoid potential effects on the other tests.
* test_kind_bad0() last to avoid potential effects on the other tests.
*/
struct test tests[] = {
{ "kind0", test_kind0 },
Expand Down
2 changes: 1 addition & 1 deletion src/tests/parse/k-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ static int test_missing_dice0(void *state) {

eq(r, PARSE_ERROR_NONE);
/*
* Specifying and expression without preceding dice should do nothing
* Specifying an expression without preceding dice should do nothing
* and not flag an error.
*/
r = parser_parse(p, "expr:B:PLAYER_LEVEL:/ 6 + 1");
Expand Down
2 changes: 1 addition & 1 deletion src/tests/parse/mspell.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static int test_hit0(void *state) {
}

/*
* Check the placing "effect-yx:", "dice:", and "expr:' directives before
* Check that placing "effect-yx:", "dice:", and "expr:' directives before
* any "effect:" directives for a spell works as expected: do nothing and
* return PARSE_ERROR_NONE.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/tests/parse/objprop.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

int setup_tests(void **state) {
*state = object_property_parser.init();
/* Need by object_property_parser.finish. */
/* Needed by object_property_parser.finish. */
z_info = mem_zalloc(sizeof(*z_info));
return !*state;
}
Expand Down
11 changes: 3 additions & 8 deletions src/tests/parse/partrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int test_missing_effect0(void *state) {
notnull(t);
null(t->effect);
/*
* Specifying effect details without and effect should not signal an
* Specifying effect details without an effect should not signal an
* error and leave the trap unmodified.
*/
r = parser_parse(p, "effect-yx:11:23");
Expand Down Expand Up @@ -854,13 +854,8 @@ const char *suite_name = "parse/partrap";
* test_effect_xtra0(), test_effect_xtra_bad0(), test_effect_yx_xtra0(),
* test_dice_xtra0(), test_dice_xtra_bad0(), test_missing_dice_xtra0(),
* test_expr_xtra0(), test_expr_xtra_bad0(), and test_complete0().
* test_graphics0(), test_appear0(), test_visibility0(),
* test_visibility_bad0(), test_flags0(), test_flags_bad0(), test_effect0(),
* test_effect_bad0(), test_effect_yx0(), test_dice0(), test_dice_bad0(),
* test_missing_dice0(), test_expr0(), test_expr_bad0(), test_effect_xtra0(),
* test_effect_xtra_bad0(), test_effect_yx_xtra0(), test_dice_xtra0(),
* test_dice_xtra_bad0(), test_expr_xtra0(), test_expr_xtra_bad0(),
* test_save0(), and test_save_bad0() have to be after test_name0().
* Unless otherwise indicated, all other functions have to be after
* test_name0().
*/
struct test tests[] = {
{ "missing_header_record0", test_missing_header_record0 },
Expand Down
4 changes: 2 additions & 2 deletions src/win/readpng.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ bool ReadDIB2_PNG(HWND hWnd, LPSTR lpFileName, DIBINIT *pInfo, DIBINIT *pMask, b
free(row_pointers[y]);
}
free(row_pointers);
/* release all the the PNG Structures */

/* release all the PNG Structures */
if (info_ptr) {
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
info_ptr = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/win/scrnshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ bool SaveWindow_PNG(HWND hWnd, LPSTR lpFileName)
free(row_pointers);

/* We are done with the file pointer, so
* release all the the PNG Structures */
* release all the PNG Structures */
if (info_ptr) {
png_destroy_write_struct(&png_ptr, &info_ptr);
info_ptr = NULL;
Expand Down

0 comments on commit 919d7e7

Please sign in to comment.