diff --git a/main b/main index 4f09480..4ed6edd 100755 Binary files a/main and b/main differ diff --git a/src/main.c b/src/main.c index db11fcd..061c52a 100644 --- a/src/main.c +++ b/src/main.c @@ -72,18 +72,17 @@ void print_help_and_usage() { "Help and usage for Wordle:\n" "\n" "Help:\n" - "--wordlist ... specify a custom wordlist\n" - " RULES: five characters on each line (no empty lines),\n" - " each new line is separated by '\\n' (Enter/Return)\n" - "--verbose ............................ be verbose (show what the program is doing aka debug info)\n" - "--help ............................... show this help screen\n" + "--wordlist ........... specify a custom wordlist\n" + " RULES: five characters on each line (no empty lines),\n" + " each new line is separated by '\\n' (Enter/Return)\n" + "--verbose .................................... be verbose (show what the program is doing aka debug info)\n" + "--help ....................................... show this help screen\n" "\n" "Usage:\n" "\n" - "wordle\n" - "=> starts Wordle with the default wordlist\n" - "wordle --wordlist \n" - "=> starts Wordle with a specified wordlist\n" + "wordlec ...................................... starts Wordle with the default wordlist\n" + "\n" + "wordlec --wordlist ... starts Wordle with a specified wordlist\n" ); } @@ -297,7 +296,7 @@ int argparse(int argc, char *argv[]) { if (strcmp(argv[i], "--help") == 0) { print_help_and_usage(); - return 0; + return 2; } /* @@ -344,7 +343,13 @@ void show_win_lose_message() { int main(int argc, char *argv[]) { // pass the arguments - if (argparse(argc, argv) == 1) return 1; + int args = argparse(argc, argv); + switch (args) { + case 1: + return 1; + case 2: + return 0; // --help passed + } // prerequisite 1 get_random_word(word_to_guess, wordlist_path);