From 3cdae7fcb1595d7dacb0ee6e11d0cda1f7b5edbf Mon Sep 17 00:00:00 2001 From: Tait Hoyem <44244401+TTWNO@users.noreply.github.com> Date: Tue, 11 Jun 2019 09:00:30 +0000 Subject: [PATCH] Remove interactive option --- README | 4 ++-- morse.c | 14 +------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/README b/README index 50ceece..a81405d 100644 --- a/README +++ b/README @@ -2,10 +2,10 @@ ### Options: -`--interactive` or `-i` will make you able to any phrase. - `--verbose` or `-v` will add the letter bring printed before the morse code (e.g. (C)-.-.) +`--slow` or `-s` will print each dash (-) and dot (.) with a delay inbetween them for effect. The dash delay is 3x that o the dot. + You can pipe data in to be morse codeified ### Limits: diff --git a/morse.c b/morse.c index 9292798..892878f 100644 --- a/morse.c +++ b/morse.c @@ -73,19 +73,7 @@ int main(int argc, char *argv[]){ for (int argi = 0; argi < argc; argi++){ char* arg = argv[argi]; - if (strcmp(arg, "--interactive") == 0 || strcmp(arg, "-i") == 0){ - printf("Entering interactive mode!\n"); - int sizeOfInputString; - printf("Enter a string: "); - scanf("%[^\n]s", inputString); - sizeOfInputString = strlen(inputString); - - printf("\"%s\" has length of %d\n", inputString, sizeOfInputString); - printf("\n"); - - print_morse(inputString, isSlow, addLetterBeforeMorse); - printf("\n"); - } else if (strcmp(arg, "--slow") == 0 || strcmp(arg, "-s") == 0){ + if (strcmp(arg, "--slow") == 0 || strcmp(arg, "-s") == 0){ isSlow = true; } else if (strcmp(arg, "--verbose") == 0 || strcmp(arg, "-v") == 0){ addLetterBeforeMorse = true;