morse(6): Add decoding functionality for dot-dash code.
authorzrj <rimvydas.jasinskas@gmail.com>
Thu, 21 Dec 2017 10:33:49 +0000 (12:33 +0200)
committerzrj <zrj@dragonflybsd.org>
Thu, 21 Dec 2017 12:21:49 +0000 (14:21 +0200)
commit733c70397a2e7e8b0d4ff6ab3450f3a1e4ddf370
tree7f611cee2c552b413b770a5f3e5d7ca501dfefa6
parentc9542bdb2e6722a52ffa66bcba6a54eecd0b7c0c
morse(6): Add decoding functionality for dot-dash code.

Our -d was already taken so use -r option for "reverse" mode.

Usage examples through command line ("--" for safety) and pipe:
_# morse -r -- .... .- -.-. -.- .. -. --.
HACKING
_# cat <<EOF | morse -r
 .---
 -...
 ---
 -..
 --..
EOF
JBODZ

Also it woks as most inefficient way to capitalize words too:
_# morse -s meow | morse -r
MEOW

Pointed-by: tuxillo
Decoding-shamelessly-stolen-from: OpenBSD
games/morse/Makefile
games/morse/morse.6
games/morse/morse.c