X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fcommand.c;h=16a663c50b731fa8c55a28377a9ce09eda4afc14;hb=c708736bdd0fea4b79f3ee4a10e00c3abb95d9e3;hp=a465aa0dad7c7f4692ec465782990f3592e9c7e3;hpb=733a7755a474053cbf3221e1f182012f8ed51720;p=pspp-builds.git diff --git a/src/language/command.c b/src/language/command.c index a465aa0d..16a663c5 100644 --- a/src/language/command.c +++ b/src/language/command.c @@ -264,9 +264,9 @@ find_word (const char *string, size_t *word_len) return string; } -/* Returns nonzero if strings A and B can be confused based on +/* Returns true if strings A and B can be confused based on their first three letters. */ -static int +static bool conflicting_3char_prefixes (const char *a, const char *b) { size_t aw_len, bw_len; @@ -278,7 +278,7 @@ conflicting_3char_prefixes (const char *a, const char *b) /* Words that are the same don't conflict. */ if (aw_len == bw_len && !buf_compare_case (aw, bw, aw_len)) - return 0; + return false; /* Words that are otherwise the same in the first three letters do conflict. */ @@ -287,9 +287,9 @@ conflicting_3char_prefixes (const char *a, const char *b) || (bw_len == 3 && aw_len > 3)) && !buf_compare_case (aw, bw, 3); } -/* Returns nonzero if CMD can be confused with another command +/* Returns true if CMD can be confused with another command based on the first three letters of its first word. */ -static int +static bool conflicting_3char_prefix_command (const struct command *cmd) { assert (cmd >= commands && cmd < commands + command_cnt);