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

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Thu Dec 21 03:59:56 PST 2017


commit 733c70397a2e7e8b0d4ff6ab3450f3a1e4ddf370
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Thu Dec 21 12:33:49 2017 +0200

    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

Summary of changes:
 games/morse/Makefile |   3 +-
 games/morse/morse.6  |  23 ++++++-
 games/morse/morse.c  | 182 +++++++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 199 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/733c70397a2e7e8b0d4ff6ab3450f3a1e4ddf370


-- 
DragonFly BSD source repository



More information about the Commits mailing list