From: Armaan Bhojwani Date: Wed, 26 May 2021 14:17:58 +0000 (-0400) Subject: morse: switch unprintable character to ? X-Git-Url: https://git.armaanb.net/?p=bin.git;a=commitdiff_plain;h=43355dbec3d1e3f5e17331b9d10e8fffee843548 morse: switch unprintable character to ? --- diff --git a/morse.c b/morse.c index 27e0fa6..5f3f589 100644 --- a/morse.c +++ b/morse.c @@ -1,5 +1,5 @@ /* Convert ASCII to morse code. Reads from stdin if provided with no argument - or "-", otherwise reads from the first command line argument. Prints "*" if + or "-", otherwise reads from the first command line argument. Prints "?" if character is not found. */ #include @@ -29,7 +29,7 @@ convert(char *c) printf("%s", ma[i]); break; } else if (i == sizeof(aa)/sizeof(char *) - 1) { - printf("*"); + printf("?"); } } printf(" ");