Address Gitlab isse #62: Comment typos.

This commit is contained in:
Eric S. Raymond 2023-03-01 13:04:53 -05:00
parent 3f34adad3b
commit 94e7cc6505
5 changed files with 14 additions and 14 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Actions for the duneon-running code. * Actions for the dungeon-running code.
* *
* Copyright (c) 1977, 2005 by Will Crowther and Don Woods * Copyright (c) 1977, 2005 by Will Crowther and Don Woods
* Copyright (c) 2017 by Eric S. Raymond * Copyright (c) 2017 by Eric S. Raymond
@ -929,7 +929,7 @@ static phase_codes_t light(verb_t verb, obj_t obj)
} }
static phase_codes_t listen(void) static phase_codes_t listen(void)
/* Listen. Intransitive only. Print stuff based on object sound proprties. */ /* Listen. Intransitive only. Print stuff based on object sound properties. */
{ {
bool soundlatch = false; bool soundlatch = false;
vocab_t sound = locations[game.loc].sound; vocab_t sound = locations[game.loc].sound;

View file

@ -13,7 +13,7 @@
#define LCG_M 1048576L #define LCG_M 1048576L
#define LINESIZE 1024 #define LINESIZE 1024
#define TOKLEN 5 // # sigificant characters in a token */ #define TOKLEN 5 // # outputting characters in a token */
#define NDWARVES 6 // number of dwarves #define NDWARVES 6 // number of dwarves
#define PIRATE NDWARVES // must be NDWARVES-1 when zero-origin #define PIRATE NDWARVES // must be NDWARVES-1 when zero-origin
#define DALTLC LOC_NUGGET // alternate dwarf location #define DALTLC LOC_NUGGET // alternate dwarf location

12
main.c
View file

@ -97,7 +97,7 @@ int main(int argc, char *argv[])
} }
} }
/* copy inncation line part after switches */ /* copy invocation line part after switches */
settings.argc = argc - optind; settings.argc = argc - optind;
settings.argv = argv + optind; settings.argv = argv + optind;
settings.optind = 0; settings.optind = 0;
@ -139,8 +139,8 @@ int main(int argc, char *argv[])
char *myreadline(const char *prompt) char *myreadline(const char *prompt)
{ {
/* /*
* This function isbn't required for gameplay, readline() straight * This function isn't required for gameplay, readline() straight
* up would suffice for tat. It's where we interpret command-line * up would suffice for that. It's where we interpret command-line
* logfiles for testing purposes. * logfiles for testing purposes.
*/ */
/* Normal case - no script arguments */ /* Normal case - no script arguments */
@ -1048,10 +1048,10 @@ static void listobjects(void)
static bool preprocess_command(command_t *command) static bool preprocess_command(command_t *command)
/* Pre-processes a command input to see if we need to tease out a few specific cases: /* Pre-processes a command input to see if we need to tease out a few specific cases:
* - "enter water" or "enter stream": * - "enter water" or "enter stream":
* wierd specific case that gets the user wet, and then kicks us back to get another command * weird specific case that gets the user wet, and then kicks us back to get another command
* - <object> <verb>: * - <object> <verb>:
* Irregular form of input, but should be allowed. We switch back to <verb> <object> form for * Irregular form of input, but should be allowed. We switch back to <verb> <object> form for
* furtherprocessing. * further processing.
* - "grate": * - "grate":
* If in location with grate, we move to that grate. If we're in a number of other places, * If in location with grate, we move to that grate. If we're in a number of other places,
* we move to the entrance. * we move to the entrance.
@ -1222,7 +1222,7 @@ static bool do_command()
if (closecheck() ) if (closecheck() )
return true; return true;
/* loop until all words in command are procesed */ /* loop until all words in command are processed */
while (command.state == PREPROCESSED ) { while (command.state == PREPROCESSED ) {
command.state = PROCESSING; command.state = PROCESSING;

6
misc.c
View file

@ -1,5 +1,5 @@
/* /*
* I/O and support riutines. * I/O and support routines.
* *
* Copyright (c) 1977, 2005 by Will Crowther and Don Woods * Copyright (c) 1977, 2005 by Will Crowther and Don Woods
* Copyright (c) 2017 by Eric S. Raymond * Copyright (c) 2017 by Eric S. Raymond
@ -411,7 +411,7 @@ static bool is_valid_int(const char *str)
if (!*str) if (!*str)
return false; // LCOV_EXCL_LINE return false; // LCOV_EXCL_LINE
// Check for non-digit chars in the rest of the stirng. // Check for non-digit chars in the rest of the string.
while (*str) { while (*str) {
if (!isdigit(*str)) if (!isdigit(*str))
return false; return false;
@ -476,7 +476,7 @@ static void get_vocab_metadata(const char* word, vocab_t* id, word_type_t* type)
static void tokenize(char* raw, command_t *cmd) static void tokenize(char* raw, command_t *cmd)
{ {
/* /*
* Be caereful about modifing this. We do not want to nuke the * Be careful about modifying this. We do not want to nuke the
* the speech part or ID from the previous turn. * the speech part or ID from the previous turn.
*/ */
memset(&cmd->word[0].raw, '\0', sizeof(cmd->word[0].raw)); memset(&cmd->word[0].raw, '\0', sizeof(cmd->word[0].raw));

View file

@ -143,8 +143,8 @@ int restore(FILE* fp)
bool is_valid(struct game_t valgame) bool is_valid(struct game_t valgame)
{ {
/* Save files can be roughly grouped into three groups: /* Save files can be roughly grouped into three groups:
* With valid, reaceable state, with valid, but unreachable * With valid, reacheable state, with valid, but unreachable
* state and with invaild state. We check that state is * state and with invalid state. We check that state is
* valid: no states are outside minimal or maximal value * valid: no states are outside minimal or maximal value
*/ */