My own rewrite of the BSD morse code recreational utility
修訂 | adf1c293cd4ea78f878be8917d22ab0c0a866542 (tree) |
---|---|
時間 | 2021-08-30 01:47:55 |
作者 | Joel Matthew Rees <joel.rees@gmai...> |
Commiter | Joel Matthew Rees |
getopt madness
@@ -207,7 +207,10 @@ decode(s) | ||
207 | 207 | const char *s; |
208 | 208 | { |
209 | 209 | int i; |
210 | - | |
210 | + | |
211 | +/* JMR20210830: give it a way to dodge the getop dash madness: */ | |
212 | + if (*s == ' ') | |
213 | + ++s; | |
211 | 214 | for (i = 0; i < 10; i++) |
212 | 215 | if (strcmp(digit[i], s) == 0) { |
213 | 216 | putchar('0' + i); |