debian/0000755000000000000000000000000011725672264007202 5ustar debian/upstream.changelog0000644000000000000000000000021611725602134012677 0ustar * [48]Morse generator 0.2.1 (morsegen) simple tool for converting an input file to morse notation, like ...---... for SOS. debian/patches/0000755000000000000000000000000011725577727010641 5ustar debian/patches/10-morsegen.c.patch0000644000000000000000000000371311725577727014144 0ustar From 463ca291939193f2d004d70f637f9337e08defd5 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Fri, 4 Jun 2010 23:35:07 +0300 Subject: [PATCH] morsegen.c: Add \r and \n support, Fix usage Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- morsegen.c | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/morsegen.c b/morsegen.c index 3871152..9e84613 100644 --- a/morsegen.c +++ b/morsegen.c @@ -40,17 +40,13 @@ int main(int argc, char *argv[]) { setbuf(stdout, NULL); - fputs("\n" - "Morse generator "VER"\n" - "by Luigi Auriemma\n" - "e-mail: aluigi@autistici.org\n" - "web: aluigi.org\n" - "\n", stderr); - if(argc < 2) { - printf("\n" - "Usage: %s \n" - "\n", argv[0]); + printf("Usage: %s file\n", + argv[0]); + + printf("Morse Generator. " + VER " Luigi Auriemma GPL-2+ http://aluigi.org\n"); + printf("Usage: %s file\n", argv[0]); exit(1); } fname = argv[1]; @@ -107,13 +103,25 @@ void morse(int chr) { t; int i; - // carriage return / line feed - if(chr == '\r') return; // otherwise \r\n will be dumped as \r\r\n on Windows - if((chr == '\n') || (chr == '\f') || (chr == '\v')) { - fputc(chr, stdout); + // carriage return + if ( chr == '\r' ) + { + printf(".-..."); /* WAIT prosign */ + return; + } + else if ( chr == '\n' ) { + printf("...-.-"); /* END OF WORK prosign */ bol = 1; return; } + else if ( chr == ' ' ) { + printf("-.-"); /* INVITATION TO TRANSMIT prosign */ + bol = 1; + } + else if ( chr == '\t' ) { + printf("-.-.-"); /* STARTING SIGNAL prosign */ + bol = 1; + } // space before morse code if(bol) { -- 1.7.1 debian/patches/series0000644000000000000000000000002411725577727012052 0ustar 10-morsegen.c.patch debian/compat0000644000000000000000000000000211725672250010373 0ustar 9 debian/control0000644000000000000000000000144611725672250010605 0ustar Source: morsegen Section: text Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9) Standards-Version: 3.9.3.1 Vcs-Browser: http://git.debian.org/?p=collab-maint/morsegen.git Vcs-Git: git://git.debian.org/git/collab-maint/morsegen.git Homepage: http://aluigi.org/mytoolz.htm Package: morsegen Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: convert text file to ASCII morse code Morse code was created for the telegraph in the early 1840s. Morse code uses a standardized sequence of short and long elements to represent the letters, numerals, punctuation and special characters of a given message. . This program implements the International Morse Code Standard by converting ASCII text letters into morse code ASCII notation. debian/install0000644000000000000000000000002111725577727010574 0ustar morsegen usr/bin debian/changelog0000644000000000000000000000023111725601145011036 0ustar morsegen (0.2.1-1) unstable; urgency=low * Initial release (Closes: #583358). -- Jari Aalto Wed, 07 Mar 2012 01:38:29 -0500 debian/watch0000644000000000000000000000030111725600112010204 0ustar version=3 # Note: The must check manually as the upstream file is in format # http://aluigi.org/mytoolz/morsegen.zip with no version number. http://aluigi.org/mytoolz.htm .*morsegen(.+)\.zip debian/rules0000755000000000000000000000123511725672250010256 0ustar #!/usr/bin/make -f PACKAGE = morsegen export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed CHANGELOG = debian/upstream.changelog URL = http://aluigi.org/mytoolz.htm # Run manually as needed get-changelog: lynx -dump $(URL) | \ awk '/morsegen/,/SOS/ {print ; if (match($$0, "SOS") > 0) exit }' \ > $(CHANGELOG) man: $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) makeman override_dh_auto_build: man gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(PACKAGE) *.c override_dh_installchangelogs: dh_installchangelogs $(CHANGELOG) %: dh $@ .PHONY: man # End of file debian/morsegen.1.pod0000644000000000000000000000511511725577727011676 0ustar # Copyright # # Copyright (C) 2009-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # To learn what TOP LEVEL sections to use in manual pages, # see POSIX/Susv standard and "Utility Description Defaults" at # http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap01.html#tag_01_11 # # This is manual page in Perl POD format. Read more at # http://perldoc.perl.org/perlpod.html or run command: # # perldoc perlpod | less # # To check the syntax: # # podchecker *.pod # # Create manual page with command: # # pod2man PAGE.N.pod > PAGE.N =pod =head1 NAME morsegen - convert file to ASCII morse code =head1 SYNOPSIS morsegen =head1 DESCRIPTION This program implements the International Morse Code Standard by converting ASCII text file into morse code ASCII notation. Morse code was created for the telegraph in the early 1840s. Morse code uses a standardized sequence of short and long elements to represent the letters, numerals, punctuation and special characters of a given message. The morse code standard does not define all characters in ASCII table therefore translation of file into morse notation is only an approximation. The following special translation have been used: ASCII Morse prosign ------------ ------------------ ' ' (space) Invitation to transmit \t Starting signal \r Wait \n End of work =head1 OPTIONS None. =head1 ENVIRONMENT None. =head1 FILES None. =head1 SEE ALSO cw(1) cwgen(1) qrq(1) =head1 STANDARDS http://en.wikipedia.org/wiki/Morse_code =head1 AUTHORS Program was written by Luigiru Auriemma . This manual page was written by Jari Aalto for the Debian GNU system (but may be used by others). Released under license GNU GPL version 2 or (at your option) any later version. For more information about license, visit . =cut debian/copyright0000644000000000000000000000233711725601111011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 X-Format: http://dep.debian.net/deps/dep5 Upstream-Name: morsegen Upstream-Contact: Luigi Auriemma Source: http://aluigi.org/mytoolz.htm#morse2ascii X-Comment:Upstream is reluctant to accept changes. Files: * Copyright: 2004,2005,2006,2008 Luigi Auriemma License: GPL-2+ Files: debian/* Copyright: 2012 Jari Aalto License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/source/0000755000000000000000000000000011725577727010512 5ustar debian/source/format0000644000000000000000000000001411725577727011720 0ustar 3.0 (quilt) debian/pod2man.mk0000644000000000000000000000334611725577727011111 0ustar # pod2man.mk -- Makefile portion to convert *.pod files to manual pages # # Copyright information # # Copyright (C) 2008-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # Convert *.pod files to manual pages. Write this to 'install' # target: # # install: build $(MANPAGE) ifneq (,) This makefile requires GNU Make. endif # This variable *must* be set when called PACKAGE ?= package # Optional variables to set MANSECT ?= 1 PODCENTER ?= User Commands PODDATE = $$(date "+%Y-%m-%d") # Directories MANSRC = MANDEST = $(MANSRC) MANPOD = $(MANSRC)$(PACKAGE).$(MANSECT).pod MANPAGE = $(MANDEST)$(PACKAGE).$(MANSECT) POD2MAN = pod2man POD2MAN_FLAGS = --utf8 makeman: $(MANPAGE) $(MANPAGE): $(MANPOD) # make target - create manual page from a *.pod page podchecker $(MANPOD) LC_ALL= LANG=C $(POD2MAN) $(POD2MAN_FLAGS) \ --center="$(PODCENTER)" \ --date="$(PODDATE)" \ --name="$(PACKAGE)" \ --section="$(MANSECT)" \ $(MANPOD) \ | sed 's,[Pp]erl v[0-9.]\+,$(PACKAGE),' \ > $(MANPAGE) && \ rm -f pod*.tmp # End of of Makefile part debian/clean0000644000000000000000000000003011725577727010210 0ustar *.o morsegen debian/*.1 debian/manpages0000644000000000000000000000001311725577727010722 0ustar debian/*.1