Commit 0fb356fd authored by Colin Tuckley's avatar Colin Tuckley Committed by Christoph Berg

Import Debian changes 3.4.1-1

unixcw (3.4.1-1) unstable; urgency=medium

  * New upstream release.
  * Bump standards version to 3.9.6.
parents ddb8292f 7af96175
See README for authorship and acknowledgements. See THANKS for authorship and acknowledgements.
This diff is collapsed.
This is HISTORY file for unixcw. It describes major changes in unixcw
releases. For detailed description of changes see NEWS file.
The original UnixCW package, version 1, grew out of a desire to have a program
available under Linux that was very similar to the one I was used to under DOS.
While several Linux Morse Tutors were, in fact, still are, available, I never
quite found one that did the stuff I wanted.
From the original UnixCW package came version 2. This was almost a total
rewrite, although it included the same basic binaries as were in version 1.
The two major changes for this version were the addition of an extensive,
general purpose CW library, and also an X Window-based CW tutor program.
With version 2.1, finally, came full sound card support, built into the CW
library itself. All three main user level programs that use the library were
enhanced to allow control over the sound card tone volume. Console speaker
sound is still there, if needed, but sound card tones became the default mode.
Version 2.2 was a bug-fixed version of 2.1. It seems that some sound card
drivers (some later OSS drivers) couldn't handle the volume control ioctls that
the CW library uses, and this meant sound card tones would not work for these
systems. To solve this, version 2.2 uses the /dev/mixer device to control
volumes if it finds that it cannot do this with the main sound card device.
Version 2.3 is a thorough overhaul, cleanup, and refactoring of version 2.2.
All the code has been reformatted for correct Gnu style, and programs now take
a lot more care over what they do, and don't do, in signal handler context.
cwcp and xcwcp now offer fully configurable modes and dictionaries through a
configuration file option, and xcwcp has been rewritten in proper C++ style.
Version 3.0 has been prepared and released by new lead developer,
Kamil Ignacak. The takeover of unixcw has been discussed with and
approved by Simon Baldwin. Main changes in 3.0 are:
o rewriting parts of libcw so that using OSS is less probable to cause
problems (this should solve at least one Debian bug)
o adding support for ALSA to libcw; libcw uses OSS as default audio system,
but there are no differences in support of OSS and ALSA in terms of
o porting xcwcp to Qt4
The fact that there is a new maintainer should take some burden off of
shoulders of Kamal Mostafa, who was responsible for (among other things)
patching unixcw.
Version 3.0 introduces some changes in API, and there should be some
more API changes in 3.1. Hopefully things will be more stable in 3.2.
Version 3.0.1 contains small fixes that don't influence core capabilities
of any application, but are still important. Patches for this release were
provided mainly by Kamal Mostafa (thanks Kamal!).
Version 3.1.0 adds support for PulseAudio.
Plenty of other changes in library code improve timings of tones produced
by the library.
Few library functions are deprecated, they are replaced by new functions.
Version 3.1.1 fixes small problem with interlocks in thread code.
Version 3.2.0 introduces small fixes and improvements in libcw, and
implements new debug facilities (the old ones are being deprecated).
It also fixes faulty logic checking "--disable-feature" flags in The problem was spotted by Thomas Beierlein.
Version 3.3.0 is mostly fixes. More fixes in configuration flags
(thanks again to Thomas Beierlein). Patches fixing compilation under
FreeBSD (thanks to Diane Bruce). Fixes and improvements of handling of
iambic keying in libcw and xcwcp. Fixing compilation error in
Version 3.3.1 is just one fix in libcw. Thanks to Pino Zollo ZP4KFX
for reporting a bug and testing solution.
Version 3.4.0 contains two changes in source code:
- refreshment of cwcp code;
- splitting libcw.c into parts.
Additionally the build system has been updated to correctly build
unixcw on:
- FreeBSD 10 (x86_64-unknown-freebsd10.0, with clang 3.3);
- FreeBSD 9.3 (freebsd9.3 with gcc 4.2.1);
- OpenBSD 5.5 (amd64-unknown-openbsd5.5 with gcc 4.2.1);
Version 3.4.1 focused on internal changes in libcw. All library code
is now split between separate module files. Some test code from
libcw_test_public.c has been moved to respective modules.
\ No newline at end of file
This diff is collapsed.
icon_unixcw.svg icon_unixcw.xpm \ icon_unixcw.svg icon_unixcw.xpm \
unixcw-2.3.spec unixcw-3.3.1.lsm \ unixcw-2.3.spec unixcw-3.4.1.lsm \
po/UnixCW.po \ po/UnixCW.po \
debian debian
This diff is collapsed.
# Copyright (C) 2001-2006 Simon Baldwin ( # Copyright (C) 2001-2006 Simon Baldwin (
# Copyright (C) 2011-2014 Kamil Ignacak ( # Copyright (C) 2011-2015 Kamil Ignacak (
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
...@@ -27,8 +27,9 @@ AC_LDCONFIG = @LDCONFIG@ ...@@ -27,8 +27,9 @@ AC_LDCONFIG = @LDCONFIG@
version 3.4.1 / 2015-01-02
- The remainder of code from libcw.c has been moved to respective
module files. New module file has been created: libcw_rec.c - it
contains receiver code. I think that number of modules won't
change anymore. libcw.c has been removed, all functionality is now
implemented by module files.
- A number of unit test functions has been moved from
libcw_test_public.c to respective module files. These functions
can be executed independently, so there is no reason to keep them
in libcw_test_public.c. They can be kept in module files, close to
tested library functions. libcw_test_public.c is now less
difficult to work with. The moved test functions are now executed
while building "make check" target, so they should be called more
often, increasing the chances of catching problems early.
- Data sets for some of receiver's unit tests are now generated by
helper functions. This allowed me to increase size of the data
sets and increase variation of the data (both for fixed speed
receiving and for adaptive receiving).
The data sets are basically timing tables used to drive the
receiver - to test main functions of the receiver, responsible for
accepting mark/space events from client code.
The increased size and variation of the test data gives me more
confidence that the core functionality of the receiver works as
- If you run libcw in debugging mode and you depend on Receiver
State names (strings starting with RS_) printed by library's debug
messages, you may want to check changed values of RS enum and
corresponding strings on top of libcw_rec.c - they have been
- Some changes have been made to library functions (mainly in
generator and receiver modules) to ensure that the code separated
between modules can be compiled and that it works as expected.
Since receiver code has been put in a separate file, it was
possible to review and refactor the receiver code a bit.
No functionality of the library has been changed, with an
exception described in next point.
- Data type of receiver's speed is now internally a float instead of
int. This change improves behaviour of adaptive receiving
algorithm a bit. It's not a big change, but it may positively
impact client code using receiver functions.
- libcw_test_public test executable now accepts '-m' command line
option (for selecting module(s)) to test. Check output of
'libcw_test_public -h' for more details.
- Since the modification described above does not change how the
library works, nor does it change any API, there is no reason for
any major revision changes. Library soname/version has been
changed from 6.2.1 to 6.3.1.
version 3.4.0 / 2014-11-11
- Build system files have been modified to correctly configure and
compile unixcw (or at least parts of it) on following platforms
(in addition to Debian GNU/Linux):
- FreeBSD 10.0 (x86_64-unknown-freebsd10.0, with clang 3.3);
- FreeBSD 9.3 (freebsd9.3 with gcc 4.2.1);
- OpenBSD 5.5 (amd64-unknown-openbsd5.5 with gcc 4.2.1);
See INSTALL file for more information.
- QT4 configuration flags (CFLAGS, LIBS, MOC) are now detected only
by using pkg-config. My hand-made script that searched for QT4
files has been reduced to simple call to PKG_CHECK_MODULES().
This means that the following arguments are no longer accepted by
configure script:
If you want to override pkg-config settings, you can still use
environment variables. Check output of "./configure --help" for
- Large parts of libcw.c have been moved to new files:
- libcw_gen.c (generator)
- libcw_tq.c (tone queue)
- libcw_data.c (representations and lookup)
- libcw_key.c (straight key, iambic keyer)
- libcw_signal.c (signal handling)
- libcw_utils.c (utility functions)
Benefits of this move:
- I won't have to use a table of contents to move around in
libcw.c (the file had 10kLOC before this operation);
- it will be easier to define boundaries between functionality of
modules, and it will be easier to reason about how these modules
should function and interact with each other;
Check ChangeLog entry from 2014-07-28 for more information on this
Separation of libcw modules is not yet completed. Receiver code is
still mixed with generator code, and there are still some
functions left in libcw.c. I expect to finish the separation in
one or two development cycles.
- "make check" now builds three executables in libcw directory:
- libcw_test_internal
- libcw_test_public
- libcw_test_simple_gen
main() functions for test executables have been moved outside of
- fixed bug in OSS code on BSD systems (found under FreeBSD 10). As
part of configuring OSS device, libcw made this call:
ioctl(*fd, SNDCTL_DSP_POST, &parameter)
It turns out that this call was unnecessary and returned error
value. This prevented libcw from correctly opening OSS device.
Now OSS device should be again available to unixcw applications.
Notice that this bug most probably affected only BSD systems.
- Library soname/version changed from 6.1.1 to 6.2.1.
All these changes described above did not change API of the
library in any way. Functionality of the library is
intact. libcw.h header file has not been changed at all.
- cwcp ignored CWCP_OPTIONS environment variable. Now it should read
it and use it as intended.
- cwcp code has been reviewed. Code has been modified to ensure that
each call to ncurses' newwin() is matched with delwin(). valgrind
may still complain, but now the situation is a bit better.
version 3.3.1 / 2014-04-23 version 3.3.1 / 2014-04-23
libcw: libcw:
This diff is collapsed.
unixcw was developed by Simon Baldwin, G0FRD <>.
Thanks to...
Kamal Mostafa, KA6MAL, for reviewing the libcw API, showing me the errors of my
ways with 64-bit integers, and hounding me to add the adaptive receive speed
Joop Stakenborg, PG4I, for being a willing "guinea pig" with various snapshots
of unfinished versions of the package, for help in isolating various sound card
problems, and for his continued enthusiasm and interest in maintaining UnixCW
as a Debian Linux package...
Paolo Cravero, IK1ZYW, for very kindly making the first sound card patch
available for UnixCW 2. His tone generation code is now fully embedded inside
the CW library, and it's no exaggeration to say that without his help, there
would still be no sound card support in UnixCW...
Michael D. Ivey, for identifying a problem with CW sending rhythm when sending
in 'Farnsworth' mode, and for taking the time and trouble to test the patches
I sent him...
Wolf-Ruediger Juergens, for ideas on implementing CW weighting...
Diane Bruce and Jason L. Wright, for adding support for assorted BSD flavors...
Dan Jacobson, for making improvement suggestions above and beyond the call of
And finally, everyone else who has sent feedback about UnixCW. If not for your
interest, and fairly frequent requests for a version that works with a sound
card, the package would not have progressed at all.
Simon Baldwin, G0FRD <>
Add to a check for GNU make on build machine. unixcw's
Makefiles may not work with non-GNU make on non Linux machines.
Add to a check for pkg-config. It is necessary for
configuring QT4 application (xcwcp).
Make portable. Some shells (on FreeBSD)
don't like the options[] table.
After finalizing split of libcw into modules, add configure flags for
disabling modules (e.g. --disable-libcw-receiver,
Check if it's possible to use pkg-config to get ncurses compilation
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Copyright (C) 2001-2006 Simon Baldwin ( # Copyright (C) 2001-2006 Simon Baldwin (
# Copyright (C) 2011-2014 Kamil Ignacak ( # Copyright (C) 2011-2015 Kamil Ignacak (
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
...@@ -19,10 +19,13 @@ ...@@ -19,10 +19,13 @@
# General initializations. # General initializations.
AC_INIT([unixcw], [3.3.1]) AC_INIT([unixcw], [3.4.1])
AC_CONFIG_SRCDIR([src/libcw/libcw.c]) AC_CONFIG_SRCDIR([src/libcw/libcw_gen.c])
# Libtool initialization, added during tests on FreeBSD
# Specify a configuration header. # Specify a configuration header.
AC_CONFIG_HEADERS(src/config.h) AC_CONFIG_HEADERS(src/config.h)
...@@ -33,11 +36,70 @@ AC_PROG_CC ...@@ -33,11 +36,70 @@ AC_PROG_CC
AC_PROG_RANLIB # Added during tests on FreeBSD
# OS-specific configuration. On top there are default values of some
# flags, to be modified per host type.
# General notice: FreeBSD 9.3 doesn't like empty quotes
# (e.g. DL_LIB=\"\"). Empty string should be totally empty.
# libcw on Linux needs "-ldl" library (dlopen() and related symbols)
# for dynamic loading of ALSA and PulseAudio libraries. Tested BSD
# systems (FreeBSD and OpenBSD) don't have a separate -ldl library
# (and since they don't support ALSA and PulseAudio, libcw on BSDs
# wouldn't even need the library).
# libcw on OpenBSD (tested on 5.5) needs -lossaudio for _oss_ioctl
# symbol. No explicit OSS library needed by libcw on FreeBSD and
# Linux. Quick and short googling suggests that NetBSD also uses
# ossaudio library.
# TODO: consider using AC_CHECK_LIB(ossaudio, _oss_ioctl)
case $host_os in
AC_MSG_NOTICE([Detected Linux: $host_os])
# Needed because of dynamic loading of libraries in libcw.
AC_MSG_NOTICE([Detected FreeBSD: $host_os])
AC_MSG_NOTICE([Detected OpenBSD: $host_os])
# I didn't test unixcw on NetBSD, but let's give it a
# chance.
AC_MSG_NOTICE([Detected NetBSD: $host_os])
AC_MSG_NOTICE([Detected other OS: $host_os])
# Until someone complains, for other OSes we will configure
# the flags the same way as on Linux.
# Check specifically for gzip and ldconfig, and substitute the harmless ":" # Check specifically for gzip and ldconfig, and substitute the harmless ":"
# if absent. # if absent.
...@@ -74,7 +136,7 @@ fi ...@@ -74,7 +136,7 @@ fi
# I'm defining it here so that it's available in config.h and can be # I'm defining it here so that it's available in config.h and can be
# used in libcw's cw_version() function that should return the # used in libcw's cw_version() function that should return the
# numbers. # numbers.
AC_DEFINE_UNQUOTED([LIBCW_VERSION], $LIBCW_VERSION, [Library version, libtool notation]) AC_DEFINE_UNQUOTED([LIBCW_VERSION], $LIBCW_VERSION, [Library version, libtool notation])
...@@ -90,7 +152,7 @@ AC_ARG_ENABLE([console], ...@@ -90,7 +152,7 @@ AC_ARG_ENABLE([console],
[], [],
[enable_console=yes]) [enable_console=yes])
AC_MSG_CHECKING([whether to include console buzzer audio suport]) AC_MSG_CHECKING([whether to include console buzzer audio support])
if test "$enable_console" = "yes" ; then if test "$enable_console" = "yes" ; then
else else
...@@ -199,6 +261,7 @@ fi ...@@ -199,6 +261,7 @@ fi
if test "$enable_console" = "no" ; then if test "$enable_console" = "no" ; then
else else
# Search for header that provides KIOCSOUND
AC_CHECK_HEADERS([sys/kd.h sys/vtkd.h sys/kbio.h]) AC_CHECK_HEADERS([sys/kd.h sys/vtkd.h sys/kbio.h])
if test "$ac_cv_header_sys_kd_h" = 'no' \ if test "$ac_cv_header_sys_kd_h" = 'no' \
&& test "$ac_cv_header_sys_vtkd_h" = 'no' \ && test "$ac_cv_header_sys_vtkd_h" = 'no' \
...@@ -300,17 +363,26 @@ fi ...@@ -300,17 +363,26 @@ fi
if test "$enable_xcwcp" = "no" ; then if test "$enable_xcwcp" = "no" ; then
else else
# autodetection of Qt4 dependencies #
m4_include([]) PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [
AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
if [[ "$QT4CFLAGS" -a "$QT4MOC" ]] ; then AC_MSG_RESULT([QT4 CLFAGS is $QT4_CFLAGS])
# we have moc4 and path to Qt4 include files, AC_MSG_RESULT([QT4 LIBS is $QT4_LIBS])
# so we can build xcwcp
AC_MSG_WARN([Cannot find Qt4 files - unable to build xcwcp])
fi WITH_XCWCP='yes'
], [
AC_MSG_WARN([Cannot find Qt4 files - unable to build xcwcp])
fi fi
...@@ -335,13 +407,12 @@ LIBS= ...@@ -335,13 +407,12 @@ LIBS=
# Checks for header files, and refuse to go on if no KIOCSOUND is available. # Checks for header files
AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h \ AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h \
sys/param.h sys/time.h unistd.h locale.h libintl.h]) sys/param.h sys/time.h unistd.h locale.h libintl.h])
AC_CHECK_HEADERS([getopt.h]) AC_CHECK_HEADERS([getopt.h])
AC_CHECK_HEADERS([string.h strings.h]) AC_CHECK_HEADERS([string.h strings.h])
if test "$ac_cv_header_string_h" = 'no' \ if test "$ac_cv_header_string_h" = 'no' \
...@@ -350,14 +421,12 @@ if test "$ac_cv_header_string_h" = 'no' \ ...@@ -350,14 +421,12 @@ if test "$ac_cv_header_string_h" = 'no' \
fi fi
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions. # Checks for library functions.
...@@ -494,6 +563,7 @@ AC_SUBST(LD_LINKS_SO) ...@@ -494,6 +563,7 @@ AC_SUBST(LD_LINKS_SO)
Makefile Makefile
src/Makefile src/Makefile
...@@ -511,23 +581,33 @@ fi ...@@ -511,23 +581,33 @@ fi
AC_MSG_NOTICE([------------ unixcw build configuration ------------])
AC_MSG_NOTICE([build libcw: ................................. yes]) AC_OUTPUT
AC_MSG_NOTICE([build cw & cwgen: ............................ yes])
AC_MSG_NOTICE([build cwcp: .................................. $WITH_CWCP])
AC_MSG_NOTICE([build xcwcp: ................................. $WITH_XCWCP])
# Put this at the very end, so that these are the last lines seen by
# user on console with low number of rows.
AC_MSG_NOTICE([------ $PACKAGE_NAME $PACKAGE_VERSION build configuration ------])
AC_MSG_NOTICE([operating system: ...................... $host_os])
AC_MSG_NOTICE([build libcw: ........................... yes])
AC_MSG_NOTICE([build cw & cwgen: ...................... yes])
AC_MSG_NOTICE([build cwcp: ............................ $WITH_CWCP])
AC_MSG_NOTICE([build xcwcp: ........................... $WITH_XCWCP])
if test "$WITH_XCWCP" = 'yes' ; then if test "$WITH_XCWCP" = 'yes' ; then
fi AC_MSG_NOTICE([ Qt4 MOC is $MOC])
AC_MSG_NOTICE([include console buzzer support: .............. $WITH_CONSOLE]) fi
AC_MSG_NOTICE([include OSS support: ......................... $WITH_OSS]) AC_MSG_NOTICE([include console buzzer support: ........ $WITH_CONSOLE])
AC_MSG_NOTICE([include ALSA support: ........................ $WITH_ALSA]) AC_MSG_NOTICE([include OSS support: ................... $WITH_OSS])
AC_MSG_NOTICE([include PulseAudio support: .................. $WITH_PULSEAUDIO]) AC_MSG_NOTICE([include ALSA support: .................. $WITH_ALSA])
AC_MSG_NOTICE([----------------------------------------------------]) AC_MSG_NOTICE([include PulseAudio support: ............ $WITH_PULSEAUDIO])
if test "$WITH_DEV" = 'yes' ; then if test "$WITH_DEV" = 'yes' ; then
AC_MSG_NOTICE([enable dev support: ........................... yes]) AC_MSG_NOTICE([enable dev support: ..................... yes])
fi fi
# Copyright (C) 2001-2006 Simon Baldwin (
# Copyright (C) 2011-2014 Kamil Ignacak (
# 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
# 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Script that detects some paths/files necessary to build
# Qt4 application using autotools.
# On success, the script sets three variables for build system by making
# these two calls:
# You can include this file to your file like this:
# # detection of Qt4 moc and Qt4 include dir
# m4_include([])
# There are four major tasks performed by this script:
# Task 1: find Qt4 include directory, and for QT4 library
# Task 2: find Qt4 moc
# Task 3: make sure that major version of the moc is >= MOC_MAJOR_EARLIEST
# Task 4: on success set up some build system variables (AC_SUBST)
QT4CFLAGS="" # QT4-related define flags, and full path to directory with QT4 QtCore + QtGui subdirs and include files, e.g. /usr/include/qt4/
QT4MOC="" # full path to Qt4 moc
# QT4DIR="" # for testing purposes
[Qt4-related defines, and path to Qt4 include files]),
[path to qt4 libraries]),