Skip to content

memoryhole/libmorse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  _ _ _                          
 | (_) |__ _ __  ___ _ _ ___ ___ 
 | | | '_ \ '  \/ _ \ '_(_-</ -_)
 |_|_|_.__/_|_|_\___/_| /__/\___|

libmorse Build Status

libmorse is a small c library for working with morse code.

Features

  • no dynamic memory allocations
  • ascii to morse code
  • morse code to ascii
  • streaming morse code to ascii

Usage

Single Header

The easiest way to use libmorse is to download the single-file header from the latest release and include it in your application.

Shared Library

To build and install libmorse as a shared library you can download the latest release tarball and follow the usual autotools dance:

./configure
make
make install

If you clone the GIT repository then you will need to run bootstrap first:

./bootstrap
./configure
make
make install

CLI

libmorse includes a sample program which excercises all library functions

$ morse -h
Usage: morse [OPTION] [STRING]
Converts standard input or argument to morse or text

  -t        morse to text
  -m        text to morse
text to morse
$ echo libmorse | morse -m
.-.. .. -... -- --- .-. ... .
morse to text
$ echo ".-.. .. -... -- --- .-. ... ." | morse -t
LIBMORSE

API

See see the morse.h header for API documentation.