morse(6): Add decoding functionality for dot-dash code

Operating Systems / DragonFlyBSD - zrj [gmail.com] - 21 December 2017 12:21 EST

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 JBODZ

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

733c70397a morse(6): Add decoding functionality for dot-dash code.
games/morse/Makefile | 3 +-
games/morse/morse.6 | 23 ++++++-
games/morse/morse.c | 182 +++++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 199 insertions(+), 9 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share