kopia lustrzana https://github.com/ag1le/morse-wip
Added GNU Public License headers to source files.
rodzic
6f3b27ab71
commit
03a6342a0f
1
INSTALL
1
INSTALL
|
@ -1 +0,0 @@
|
|||
/usr/share/automake-1.11/INSTALL
|
|
@ -0,0 +1,370 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
60
Makefile
60
Makefile
|
@ -33,10 +33,10 @@ am__make_dryrun = \
|
|||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/morse
|
||||
pkgincludedir = $(includedir)/morse
|
||||
pkglibdir = $(libdir)/morse
|
||||
pkglibexecdir = $(libexecdir)/morse
|
||||
pkgdatadir = $(datadir)/full-package-name
|
||||
pkgincludedir = $(includedir)/full-package-name
|
||||
pkglibdir = $(libdir)/full-package-name
|
||||
pkglibexecdir = $(libexecdir)/full-package-name
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
|
@ -68,14 +68,14 @@ CONFIG_CLEAN_VPATH_FILES =
|
|||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am_morse_OBJECTS = src/autocr.$(OBJEXT) src/initl.$(OBJEXT) \
|
||||
src/likhd.$(OBJEXT) src/path.$(OBJEXT) src/spdtr.$(OBJEXT) \
|
||||
src/trelis.$(OBJEXT) src/bpfdet.$(OBJEXT) src/inputl.$(OBJEXT) \
|
||||
src/model.$(OBJEXT) src/probp.$(OBJEXT) src/sprob.$(OBJEXT) \
|
||||
src/trprob.$(OBJEXT) src/kalfil.$(OBJEXT) src/morse.$(OBJEXT) \
|
||||
src/proces.$(OBJEXT) src/savep.$(OBJEXT) src/stats.$(OBJEXT) \
|
||||
src/xtrans.$(OBJEXT) src/noise.$(OBJEXT) src/ptrans.$(OBJEXT) \
|
||||
src/transl.$(OBJEXT)
|
||||
am_morse_OBJECTS = src/initl.$(OBJEXT) src/likhd.$(OBJEXT) \
|
||||
src/path.$(OBJEXT) src/spdtr.$(OBJEXT) src/trelis.$(OBJEXT) \
|
||||
src/bpfdet.$(OBJEXT) src/inputl.$(OBJEXT) src/model.$(OBJEXT) \
|
||||
src/probp.$(OBJEXT) src/sprob.$(OBJEXT) src/trprob.$(OBJEXT) \
|
||||
src/kalfil.$(OBJEXT) src/morse.$(OBJEXT) src/proces.$(OBJEXT) \
|
||||
src/savep.$(OBJEXT) src/stats.$(OBJEXT) src/xtrans.$(OBJEXT) \
|
||||
src/noise.$(OBJEXT) src/ptrans.$(OBJEXT) src/transl.$(OBJEXT) \
|
||||
src/window.$(OBJEXT)
|
||||
morse_OBJECTS = $(am_morse_OBJECTS)
|
||||
morse_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I.
|
||||
|
@ -119,14 +119,20 @@ AWK = gawk
|
|||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
GREP = /bin/grep
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
|
@ -134,28 +140,29 @@ INSTALL_SCRIPT = ${INSTALL}
|
|||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS = -lm
|
||||
LIBS = -lm -lsndfile -lfftw3
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /home/mauri/Projects/morse/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
OBJEXT = o
|
||||
PACKAGE = morse
|
||||
PACKAGE_BUGREPORT = http://ag1le.blogspot.com
|
||||
PACKAGE_NAME = morse
|
||||
PACKAGE_STRING = morse 1.0
|
||||
PACKAGE_TARNAME = morse
|
||||
PACKAGE = full-package-name
|
||||
PACKAGE_BUGREPORT = BUG-REPORT-ADDRESS
|
||||
PACKAGE_NAME = FULL-PACKAGE-NAME
|
||||
PACKAGE_STRING = FULL-PACKAGE-NAME VERSION
|
||||
PACKAGE_TARNAME = full-package-name
|
||||
PACKAGE_URL =
|
||||
PACKAGE_VERSION = 1.0
|
||||
PACKAGE_VERSION = VERSION
|
||||
PATH_SEPARATOR = :
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
STRIP =
|
||||
VERSION = 1.0
|
||||
VERSION = VERSION
|
||||
abs_builddir = /home/mauri/Projects/morse
|
||||
abs_srcdir = /home/mauri/Projects/morse
|
||||
abs_top_builddir = /home/mauri/Projects/morse
|
||||
abs_top_srcdir = /home/mauri/Projects/morse
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
|
@ -196,13 +203,14 @@ top_srcdir = .
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
AM_CFLAGS = -ggdb
|
||||
morse_SOURCES = src/autocr.c src/initl.c src/likhd.c src/path.c\
|
||||
morse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
src/spdtr.c src/trelis.c\
|
||||
src/bpfdet.c src/inputl.c src/model.c \
|
||||
src/probp.c src/sprob.c src/trprob.c\
|
||||
src/kalfil.c src/morse.c src/proces.c src/savep.c \
|
||||
src/stats.c src/xtrans.c\
|
||||
src/noise.c src/ptrans.c src/transl.c
|
||||
src/noise.c src/ptrans.c src/transl.c \
|
||||
src/window.c
|
||||
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
@ -304,8 +312,6 @@ src/$(am__dirstamp):
|
|||
src/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/$(DEPDIR)
|
||||
@: > src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/autocr.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/initl.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/likhd.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/path.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -335,13 +341,14 @@ src/ptrans.$(OBJEXT): src/$(am__dirstamp) \
|
|||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/transl.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/window.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
morse$(EXEEXT): $(morse_OBJECTS) $(morse_DEPENDENCIES) $(EXTRA_morse_DEPENDENCIES)
|
||||
@rm -f morse$(EXEEXT)
|
||||
$(LINK) $(morse_OBJECTS) $(morse_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f src/autocr.$(OBJEXT)
|
||||
-rm -f src/bpfdet.$(OBJEXT)
|
||||
-rm -f src/initl.$(OBJEXT)
|
||||
-rm -f src/inputl.$(OBJEXT)
|
||||
|
@ -361,12 +368,12 @@ mostlyclean-compile:
|
|||
-rm -f src/transl.$(OBJEXT)
|
||||
-rm -f src/trelis.$(OBJEXT)
|
||||
-rm -f src/trprob.$(OBJEXT)
|
||||
-rm -f src/window.$(OBJEXT)
|
||||
-rm -f src/xtrans.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include src/$(DEPDIR)/autocr.Po
|
||||
include src/$(DEPDIR)/bpfdet.Po
|
||||
include src/$(DEPDIR)/initl.Po
|
||||
include src/$(DEPDIR)/inputl.Po
|
||||
|
@ -386,6 +393,7 @@ include src/$(DEPDIR)/stats.Po
|
|||
include src/$(DEPDIR)/transl.Po
|
||||
include src/$(DEPDIR)/trelis.Po
|
||||
include src/$(DEPDIR)/trprob.Po
|
||||
include src/$(DEPDIR)/window.Po
|
||||
include src/$(DEPDIR)/xtrans.Po
|
||||
|
||||
.c.o:
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
LIBS = -lm
|
||||
LIBS = -lm -lsndfile -lfftw3
|
||||
AM_CFLAGS = -ggdb
|
||||
|
||||
bin_PROGRAMS = morse
|
||||
morse_SOURCES = src/autocr.c src/initl.c src/likhd.c src/path.c\
|
||||
morse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
src/spdtr.c src/trelis.c\
|
||||
src/bpfdet.c src/inputl.c src/model.c \
|
||||
src/probp.c src/sprob.c src/trprob.c\
|
||||
src/kalfil.c src/morse.c src/proces.c src/savep.c \
|
||||
src/stats.c src/xtrans.c\
|
||||
src/noise.c src/ptrans.c src/transl.c
|
||||
src/noise.c src/ptrans.c src/transl.c \
|
||||
src/window.c
|
||||
|
||||
# src/simsgi.c src/key.c src/rcvr.c
|
||||
|
||||
|
|
38
Makefile.in
38
Makefile.in
|
@ -68,14 +68,14 @@ CONFIG_CLEAN_VPATH_FILES =
|
|||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am_morse_OBJECTS = src/autocr.$(OBJEXT) src/initl.$(OBJEXT) \
|
||||
src/likhd.$(OBJEXT) src/path.$(OBJEXT) src/spdtr.$(OBJEXT) \
|
||||
src/trelis.$(OBJEXT) src/bpfdet.$(OBJEXT) src/inputl.$(OBJEXT) \
|
||||
src/model.$(OBJEXT) src/probp.$(OBJEXT) src/sprob.$(OBJEXT) \
|
||||
src/trprob.$(OBJEXT) src/kalfil.$(OBJEXT) src/morse.$(OBJEXT) \
|
||||
src/proces.$(OBJEXT) src/savep.$(OBJEXT) src/stats.$(OBJEXT) \
|
||||
src/xtrans.$(OBJEXT) src/noise.$(OBJEXT) src/ptrans.$(OBJEXT) \
|
||||
src/transl.$(OBJEXT)
|
||||
am_morse_OBJECTS = src/initl.$(OBJEXT) src/likhd.$(OBJEXT) \
|
||||
src/path.$(OBJEXT) src/spdtr.$(OBJEXT) src/trelis.$(OBJEXT) \
|
||||
src/bpfdet.$(OBJEXT) src/inputl.$(OBJEXT) src/model.$(OBJEXT) \
|
||||
src/probp.$(OBJEXT) src/sprob.$(OBJEXT) src/trprob.$(OBJEXT) \
|
||||
src/kalfil.$(OBJEXT) src/morse.$(OBJEXT) src/proces.$(OBJEXT) \
|
||||
src/savep.$(OBJEXT) src/stats.$(OBJEXT) src/xtrans.$(OBJEXT) \
|
||||
src/noise.$(OBJEXT) src/ptrans.$(OBJEXT) src/transl.$(OBJEXT) \
|
||||
src/window.$(OBJEXT)
|
||||
morse_OBJECTS = $(am_morse_OBJECTS)
|
||||
morse_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
|
@ -119,14 +119,20 @@ AWK = @AWK@
|
|||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -134,7 +140,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = -lm
|
||||
LIBS = -lm -lsndfile -lfftw3
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
|
@ -156,6 +162,7 @@ abs_srcdir = @abs_srcdir@
|
|||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
|
@ -196,13 +203,14 @@ top_srcdir = @top_srcdir@
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
AM_CFLAGS = -ggdb
|
||||
morse_SOURCES = src/autocr.c src/initl.c src/likhd.c src/path.c\
|
||||
morse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
src/spdtr.c src/trelis.c\
|
||||
src/bpfdet.c src/inputl.c src/model.c \
|
||||
src/probp.c src/sprob.c src/trprob.c\
|
||||
src/kalfil.c src/morse.c src/proces.c src/savep.c \
|
||||
src/stats.c src/xtrans.c\
|
||||
src/noise.c src/ptrans.c src/transl.c
|
||||
src/noise.c src/ptrans.c src/transl.c \
|
||||
src/window.c
|
||||
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
@ -304,8 +312,6 @@ src/$(am__dirstamp):
|
|||
src/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/$(DEPDIR)
|
||||
@: > src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/autocr.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/initl.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/likhd.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/path.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -335,13 +341,14 @@ src/ptrans.$(OBJEXT): src/$(am__dirstamp) \
|
|||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/transl.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/window.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
morse$(EXEEXT): $(morse_OBJECTS) $(morse_DEPENDENCIES) $(EXTRA_morse_DEPENDENCIES)
|
||||
@rm -f morse$(EXEEXT)
|
||||
$(LINK) $(morse_OBJECTS) $(morse_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f src/autocr.$(OBJEXT)
|
||||
-rm -f src/bpfdet.$(OBJEXT)
|
||||
-rm -f src/initl.$(OBJEXT)
|
||||
-rm -f src/inputl.$(OBJEXT)
|
||||
|
@ -361,12 +368,12 @@ mostlyclean-compile:
|
|||
-rm -f src/transl.$(OBJEXT)
|
||||
-rm -f src/trelis.$(OBJEXT)
|
||||
-rm -f src/trprob.$(OBJEXT)
|
||||
-rm -f src/window.$(OBJEXT)
|
||||
-rm -f src/xtrans.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/autocr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bpfdet.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/initl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/inputl.Po@am__quote@
|
||||
|
@ -386,6 +393,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/transl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/trelis.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/trprob.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/window.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xtrans.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
|
|
1
compile
1
compile
|
@ -1 +0,0 @@
|
|||
/usr/share/automake-1.11/compile
|
|
@ -0,0 +1,343 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-03-05.13; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
54
config.h
54
config.h
|
@ -1,38 +1,74 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `f2c' library (-lf2c). */
|
||||
#define HAVE_LIBF2C 1
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the `pow' function. */
|
||||
#define HAVE_POW 1
|
||||
|
||||
/* Define to 1 if you have the `sqrt' function. */
|
||||
#define HAVE_SQRT 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#define HAVE_STRRCHR 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "morse"
|
||||
#define PACKAGE "full-package-name"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "http://ag1le.blogspot.com"
|
||||
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "morse"
|
||||
#define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "morse 1.0"
|
||||
#define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "morse"
|
||||
#define PACKAGE_TARNAME "full-package-name"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.0"
|
||||
#define PACKAGE_VERSION "VERSION"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.0"
|
||||
#define VERSION "VERSION"
|
||||
|
|
427
config.log
427
config.log
|
@ -1,7 +1,7 @@
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by morse configure 1.0, which was
|
||||
It was created by FULL-PACKAGE-NAME configure VERSION, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ ./configure
|
||||
|
@ -42,29 +42,91 @@ PATH: /usr/local/games
|
|||
## Core tests. ##
|
||||
## ----------- ##
|
||||
|
||||
configure:1936: checking for a BSD-compatible install
|
||||
configure:2004: result: /usr/bin/install -c
|
||||
configure:2015: checking whether build environment is sane
|
||||
configure:2065: result: yes
|
||||
configure:2206: checking for a thread-safe mkdir -p
|
||||
configure:2245: result: /bin/mkdir -p
|
||||
configure:2258: checking for gawk
|
||||
configure:2274: found /usr/bin/gawk
|
||||
configure:2285: result: gawk
|
||||
configure:2296: checking whether make sets $(MAKE)
|
||||
configure:2318: result: yes
|
||||
configure:2451: checking for gcc
|
||||
configure:2467: found /usr/bin/gcc
|
||||
configure:2478: result: gcc
|
||||
configure:2707: checking for C compiler version
|
||||
configure:2716: gcc --version >&5
|
||||
configure:2233: checking for a BSD-compatible install
|
||||
configure:2301: result: /usr/bin/install -c
|
||||
configure:2312: checking whether build environment is sane
|
||||
configure:2362: result: yes
|
||||
configure:2503: checking for a thread-safe mkdir -p
|
||||
configure:2542: result: /bin/mkdir -p
|
||||
configure:2555: checking for gawk
|
||||
configure:2571: found /usr/bin/gawk
|
||||
configure:2582: result: gawk
|
||||
configure:2593: checking whether make sets $(MAKE)
|
||||
configure:2615: result: yes
|
||||
configure:2754: checking for g++
|
||||
configure:2770: found /usr/bin/g++
|
||||
configure:2781: result: g++
|
||||
configure:2808: checking for C++ compiler version
|
||||
configure:2817: g++ --version >&5
|
||||
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:2828: $? = 0
|
||||
configure:2817: g++ -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=g++
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.7/lto-wrapper
|
||||
Target: i686-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-targets=all --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
|
||||
configure:2828: $? = 0
|
||||
configure:2817: g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
g++: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:2828: $? = 4
|
||||
configure:2817: g++ -qversion >&5
|
||||
g++: error: unrecognized command line option '-qversion'
|
||||
g++: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:2828: $? = 4
|
||||
configure:2848: checking whether the C++ compiler works
|
||||
configure:2870: g++ conftest.cpp >&5
|
||||
configure:2874: $? = 0
|
||||
configure:2922: result: yes
|
||||
configure:2925: checking for C++ compiler default output file name
|
||||
configure:2927: result: a.out
|
||||
configure:2933: checking for suffix of executables
|
||||
configure:2940: g++ -o conftest conftest.cpp >&5
|
||||
configure:2944: $? = 0
|
||||
configure:2966: result:
|
||||
configure:2988: checking whether we are cross compiling
|
||||
configure:2996: g++ -o conftest conftest.cpp >&5
|
||||
configure:3000: $? = 0
|
||||
configure:3007: ./conftest
|
||||
configure:3011: $? = 0
|
||||
configure:3026: result: no
|
||||
configure:3031: checking for suffix of object files
|
||||
configure:3053: g++ -c conftest.cpp >&5
|
||||
configure:3057: $? = 0
|
||||
configure:3078: result: o
|
||||
configure:3082: checking whether we are using the GNU C++ compiler
|
||||
configure:3101: g++ -c conftest.cpp >&5
|
||||
configure:3101: $? = 0
|
||||
configure:3110: result: yes
|
||||
configure:3119: checking whether g++ accepts -g
|
||||
configure:3139: g++ -c -g conftest.cpp >&5
|
||||
configure:3139: $? = 0
|
||||
configure:3180: result: yes
|
||||
configure:3214: checking for style of include used by make
|
||||
configure:3242: result: GNU
|
||||
configure:3268: checking dependency style of g++
|
||||
configure:3379: result: gcc3
|
||||
configure:3442: checking for gcc
|
||||
configure:3458: found /usr/bin/gcc
|
||||
configure:3469: result: gcc
|
||||
configure:3698: checking for C compiler version
|
||||
configure:3707: gcc --version >&5
|
||||
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:2727: $? = 0
|
||||
configure:2716: gcc -v >&5
|
||||
configure:3718: $? = 0
|
||||
configure:3707: gcc -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=gcc
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.7/lto-wrapper
|
||||
|
@ -72,85 +134,166 @@ Target: i686-linux-gnu
|
|||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-targets=all --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
|
||||
configure:2727: $? = 0
|
||||
configure:2716: gcc -V >&5
|
||||
configure:3718: $? = 0
|
||||
configure:3707: gcc -V >&5
|
||||
gcc: error: unrecognized command line option '-V'
|
||||
gcc: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:2727: $? = 4
|
||||
configure:2716: gcc -qversion >&5
|
||||
configure:3718: $? = 4
|
||||
configure:3707: gcc -qversion >&5
|
||||
gcc: error: unrecognized command line option '-qversion'
|
||||
gcc: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:2727: $? = 4
|
||||
configure:2747: checking whether the C compiler works
|
||||
configure:2769: gcc conftest.c >&5
|
||||
configure:2773: $? = 0
|
||||
configure:2821: result: yes
|
||||
configure:2824: checking for C compiler default output file name
|
||||
configure:2826: result: a.out
|
||||
configure:2832: checking for suffix of executables
|
||||
configure:2839: gcc -o conftest conftest.c >&5
|
||||
configure:2843: $? = 0
|
||||
configure:2865: result:
|
||||
configure:2887: checking whether we are cross compiling
|
||||
configure:2895: gcc -o conftest conftest.c >&5
|
||||
configure:2899: $? = 0
|
||||
configure:2906: ./conftest
|
||||
configure:2910: $? = 0
|
||||
configure:2925: result: no
|
||||
configure:2930: checking for suffix of object files
|
||||
configure:2952: gcc -c conftest.c >&5
|
||||
configure:2956: $? = 0
|
||||
configure:2977: result: o
|
||||
configure:2981: checking whether we are using the GNU C compiler
|
||||
configure:3000: gcc -c conftest.c >&5
|
||||
configure:3000: $? = 0
|
||||
configure:3009: result: yes
|
||||
configure:3018: checking whether gcc accepts -g
|
||||
configure:3038: gcc -c -g conftest.c >&5
|
||||
configure:3038: $? = 0
|
||||
configure:3079: result: yes
|
||||
configure:3096: checking for gcc option to accept ISO C89
|
||||
configure:3159: gcc -c -g -O2 conftest.c >&5
|
||||
configure:3159: $? = 0
|
||||
configure:3172: result: none needed
|
||||
configure:3203: checking for style of include used by make
|
||||
configure:3231: result: GNU
|
||||
configure:3257: checking dependency style of gcc
|
||||
configure:3368: result: gcc3
|
||||
configure:3384: checking whether gcc and cc understand -c and -o together
|
||||
configure:3415: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:3419: $? = 0
|
||||
configure:3425: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:3429: $? = 0
|
||||
configure:3440: cc -c conftest.c >&5
|
||||
configure:3444: $? = 0
|
||||
configure:3452: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:3456: $? = 0
|
||||
configure:3462: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:3466: $? = 0
|
||||
configure:3484: result: yes
|
||||
configure:3513: checking for main in -lf2c
|
||||
configure:3532: gcc -o conftest -g -O2 conftest.c -lf2c >&5
|
||||
configure:3532: $? = 0
|
||||
configure:3541: result: yes
|
||||
configure:3553: checking for main in -lm
|
||||
configure:3572: gcc -o conftest -g -O2 conftest.c -lm -lf2c >&5
|
||||
configure:3572: $? = 0
|
||||
configure:3581: result: yes
|
||||
configure:3600: checking for sqrt
|
||||
configure:3600: gcc -o conftest -g -O2 conftest.c -lm -lf2c >&5
|
||||
conftest.c:36:6: warning: conflicting types for built-in function 'sqrt' [enabled by default]
|
||||
configure:3600: $? = 0
|
||||
configure:3600: result: yes
|
||||
configure:3742: creating ./config.status
|
||||
configure:3718: $? = 4
|
||||
configure:3722: checking whether we are using the GNU C compiler
|
||||
configure:3741: gcc -c conftest.c >&5
|
||||
configure:3741: $? = 0
|
||||
configure:3750: result: yes
|
||||
configure:3759: checking whether gcc accepts -g
|
||||
configure:3779: gcc -c -g conftest.c >&5
|
||||
configure:3779: $? = 0
|
||||
configure:3820: result: yes
|
||||
configure:3837: checking for gcc option to accept ISO C89
|
||||
configure:3900: gcc -c -g -O2 conftest.c >&5
|
||||
configure:3900: $? = 0
|
||||
configure:3913: result: none needed
|
||||
configure:3935: checking dependency style of gcc
|
||||
configure:4046: result: gcc3
|
||||
configure:4062: checking whether gcc and cc understand -c and -o together
|
||||
configure:4093: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:4097: $? = 0
|
||||
configure:4103: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:4107: $? = 0
|
||||
configure:4118: cc -c conftest.c >&5
|
||||
configure:4122: $? = 0
|
||||
configure:4130: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:4134: $? = 0
|
||||
configure:4140: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:4144: $? = 0
|
||||
configure:4162: result: yes
|
||||
configure:4191: checking for main in -lm
|
||||
configure:4210: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4210: $? = 0
|
||||
configure:4219: result: yes
|
||||
configure:4237: checking how to run the C preprocessor
|
||||
configure:4268: gcc -E conftest.c
|
||||
configure:4268: $? = 0
|
||||
configure:4282: gcc -E conftest.c
|
||||
conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
|
||||
compilation terminated.
|
||||
configure:4282: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
| #define PACKAGE_TARNAME "full-package-name"
|
||||
| #define PACKAGE_VERSION "VERSION"
|
||||
| #define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
| #define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "full-package-name"
|
||||
| #define VERSION "VERSION"
|
||||
| #define HAVE_LIBM 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:4307: result: gcc -E
|
||||
configure:4327: gcc -E conftest.c
|
||||
configure:4327: $? = 0
|
||||
configure:4341: gcc -E conftest.c
|
||||
conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
|
||||
compilation terminated.
|
||||
configure:4341: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
| #define PACKAGE_TARNAME "full-package-name"
|
||||
| #define PACKAGE_VERSION "VERSION"
|
||||
| #define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
| #define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "full-package-name"
|
||||
| #define VERSION "VERSION"
|
||||
| #define HAVE_LIBM 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:4370: checking for grep that handles long lines and -e
|
||||
configure:4428: result: /bin/grep
|
||||
configure:4433: checking for egrep
|
||||
configure:4495: result: /bin/grep -E
|
||||
configure:4500: checking for ANSI C header files
|
||||
configure:4520: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4520: $? = 0
|
||||
configure:4593: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4593: $? = 0
|
||||
configure:4593: ./conftest
|
||||
configure:4593: $? = 0
|
||||
configure:4604: result: yes
|
||||
configure:4617: checking for sys/types.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for sys/stat.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for stdlib.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for string.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for memory.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for strings.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for inttypes.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for stdint.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for unistd.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4632: checking for stdlib.h
|
||||
configure:4632: result: yes
|
||||
configure:4632: checking for string.h
|
||||
configure:4632: result: yes
|
||||
configure:4649: checking for memset
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:47:6: warning: conflicting types for built-in function 'memset' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4649: checking for pow
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:48:6: warning: conflicting types for built-in function 'pow' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4649: checking for sqrt
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:49:6: warning: conflicting types for built-in function 'sqrt' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4649: checking for strrchr
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:50:6: warning: conflicting types for built-in function 'strrchr' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4795: creating ./config.status
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by morse config.status 1.0, which was
|
||||
This file was extended by FULL-PACKAGE-NAME config.status VERSION, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
|
@ -161,22 +304,31 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
|||
|
||||
on X301
|
||||
|
||||
config.status:838: creating Makefile
|
||||
config.status:838: creating config.h
|
||||
config.status:1019: config.h is unchanged
|
||||
config.status:1067: executing depfiles commands
|
||||
config.status:861: creating Makefile
|
||||
config.status:861: creating config.h
|
||||
config.status:1042: config.h is unchanged
|
||||
config.status:1090: executing depfiles commands
|
||||
|
||||
## ---------------- ##
|
||||
## Cache variables. ##
|
||||
## ---------------- ##
|
||||
|
||||
ac_cv_c_compiler_gnu=yes
|
||||
ac_cv_cxx_compiler_gnu=yes
|
||||
ac_cv_env_CCC_set=
|
||||
ac_cv_env_CCC_value=
|
||||
ac_cv_env_CC_set=
|
||||
ac_cv_env_CC_value=
|
||||
ac_cv_env_CFLAGS_set=
|
||||
ac_cv_env_CFLAGS_value=
|
||||
ac_cv_env_CPPFLAGS_set=
|
||||
ac_cv_env_CPPFLAGS_value=
|
||||
ac_cv_env_CPP_set=
|
||||
ac_cv_env_CPP_value=
|
||||
ac_cv_env_CXXFLAGS_set=
|
||||
ac_cv_env_CXXFLAGS_value=
|
||||
ac_cv_env_CXX_set=
|
||||
ac_cv_env_CXX_value=
|
||||
ac_cv_env_LDFLAGS_set=
|
||||
ac_cv_env_LDFLAGS_value=
|
||||
ac_cv_env_LIBS_set=
|
||||
|
@ -187,19 +339,37 @@ ac_cv_env_host_alias_set=
|
|||
ac_cv_env_host_alias_value=
|
||||
ac_cv_env_target_alias_set=
|
||||
ac_cv_env_target_alias_value=
|
||||
ac_cv_func_memset=yes
|
||||
ac_cv_func_pow=yes
|
||||
ac_cv_func_sqrt=yes
|
||||
ac_cv_lib_f2c_main=yes
|
||||
ac_cv_func_strrchr=yes
|
||||
ac_cv_header_inttypes_h=yes
|
||||
ac_cv_header_memory_h=yes
|
||||
ac_cv_header_stdc=yes
|
||||
ac_cv_header_stdint_h=yes
|
||||
ac_cv_header_stdlib_h=yes
|
||||
ac_cv_header_string_h=yes
|
||||
ac_cv_header_strings_h=yes
|
||||
ac_cv_header_sys_stat_h=yes
|
||||
ac_cv_header_sys_types_h=yes
|
||||
ac_cv_header_unistd_h=yes
|
||||
ac_cv_lib_m_main=yes
|
||||
ac_cv_objext=o
|
||||
ac_cv_path_EGREP='/bin/grep -E'
|
||||
ac_cv_path_GREP=/bin/grep
|
||||
ac_cv_path_install='/usr/bin/install -c'
|
||||
ac_cv_path_mkdir=/bin/mkdir
|
||||
ac_cv_prog_AWK=gawk
|
||||
ac_cv_prog_CPP='gcc -E'
|
||||
ac_cv_prog_ac_ct_CC=gcc
|
||||
ac_cv_prog_ac_ct_CXX=g++
|
||||
ac_cv_prog_cc_c89=
|
||||
ac_cv_prog_cc_g=yes
|
||||
ac_cv_prog_cc_gcc_c_o=yes
|
||||
ac_cv_prog_cxx_g=yes
|
||||
ac_cv_prog_make_make_set=yes
|
||||
am_cv_CC_dependencies_compiler_type=gcc3
|
||||
am_cv_CXX_dependencies_compiler_type=gcc3
|
||||
|
||||
## ----------------- ##
|
||||
## Output variables. ##
|
||||
|
@ -217,42 +387,51 @@ AWK='gawk'
|
|||
CC='gcc'
|
||||
CCDEPMODE='depmode=gcc3'
|
||||
CFLAGS='-g -O2'
|
||||
CPP='gcc -E'
|
||||
CPPFLAGS=''
|
||||
CXX='g++'
|
||||
CXXDEPMODE='depmode=gcc3'
|
||||
CXXFLAGS='-g -O2'
|
||||
CYGPATH_W='echo'
|
||||
DEFS='-DHAVE_CONFIG_H'
|
||||
DEPDIR='.deps'
|
||||
ECHO_C=''
|
||||
ECHO_N='-n'
|
||||
ECHO_T=''
|
||||
EGREP='/bin/grep -E'
|
||||
EXEEXT=''
|
||||
GREP='/bin/grep'
|
||||
INSTALL_DATA='${INSTALL} -m 644'
|
||||
INSTALL_PROGRAM='${INSTALL}'
|
||||
INSTALL_SCRIPT='${INSTALL}'
|
||||
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
|
||||
LDFLAGS=''
|
||||
LIBOBJS=''
|
||||
LIBS='-lm -lf2c '
|
||||
LIBS='-lm '
|
||||
LTLIBOBJS=''
|
||||
MAKEINFO='${SHELL} /home/mauri/Projects/morse/missing --run makeinfo'
|
||||
MKDIR_P='/bin/mkdir -p'
|
||||
OBJEXT='o'
|
||||
PACKAGE='morse'
|
||||
PACKAGE_BUGREPORT='http://ag1le.blogspot.com'
|
||||
PACKAGE_NAME='morse'
|
||||
PACKAGE_STRING='morse 1.0'
|
||||
PACKAGE_TARNAME='morse'
|
||||
PACKAGE='full-package-name'
|
||||
PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
|
||||
PACKAGE_NAME='FULL-PACKAGE-NAME'
|
||||
PACKAGE_STRING='FULL-PACKAGE-NAME VERSION'
|
||||
PACKAGE_TARNAME='full-package-name'
|
||||
PACKAGE_URL=''
|
||||
PACKAGE_VERSION='1.0'
|
||||
PACKAGE_VERSION='VERSION'
|
||||
PATH_SEPARATOR=':'
|
||||
SET_MAKE=''
|
||||
SHELL='/bin/bash'
|
||||
STRIP=''
|
||||
VERSION='1.0'
|
||||
VERSION='VERSION'
|
||||
ac_ct_CC='gcc'
|
||||
ac_ct_CXX='g++'
|
||||
am__EXEEXT_FALSE=''
|
||||
am__EXEEXT_TRUE='#'
|
||||
am__fastdepCC_FALSE='#'
|
||||
am__fastdepCC_TRUE=''
|
||||
am__fastdepCXX_FALSE='#'
|
||||
am__fastdepCXX_TRUE=''
|
||||
am__include='include'
|
||||
am__isrc=''
|
||||
am__leading_dot='.'
|
||||
|
@ -293,34 +472,30 @@ target_alias=''
|
|||
## ----------- ##
|
||||
|
||||
/* confdefs.h */
|
||||
#define PACKAGE_NAME "morse"
|
||||
#define PACKAGE_TARNAME "morse"
|
||||
#define PACKAGE_VERSION "1.0"
|
||||
#define PACKAGE_STRING "morse 1.0"
|
||||
#define PACKAGE_BUGREPORT "http://ag1le.blogspot.com"
|
||||
#define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
#define PACKAGE_TARNAME "full-package-name"
|
||||
#define PACKAGE_VERSION "VERSION"
|
||||
#define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
#define PACKAGE_URL ""
|
||||
#define PACKAGE "morse"
|
||||
#define VERSION "1.0"
|
||||
#define HAVE_LIBF2C 1
|
||||
#define PACKAGE "full-package-name"
|
||||
#define VERSION "VERSION"
|
||||
#define HAVE_LIBM 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_STRRCHR 1
|
||||
|
||||
configure: exit 0
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by morse config.status 1.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
CONFIG_HEADERS =
|
||||
CONFIG_LINKS =
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status Makefile depfiles
|
||||
|
||||
on X301
|
||||
|
||||
config.status:838: creating Makefile
|
||||
config.status:1067: executing depfiles commands
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -2,27 +2,27 @@
|
|||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT(morse, 1.0, http://ag1le.blogspot.com)
|
||||
AM_INIT_AUTOMAKE(morse, 1.0)
|
||||
AC_CONFIG_SRCDIR([src/])
|
||||
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
|
||||
AC_CONFIG_SRCDIR([config.h.in])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
# Checks for programs.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
# Checks for libraries.
|
||||
# FIXME: Replace `main' with a function in `-lf2c':
|
||||
AC_CHECK_LIB([f2c], [main])
|
||||
# FIXME: Replace `main' with a function in `-lm':
|
||||
AC_CHECK_LIB([m], [main])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([stdlib.h string.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS([sqrt])
|
||||
AC_CHECK_FUNCS([memset pow sqrt strrchr])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
|
1
depcomp
1
depcomp
|
@ -1 +0,0 @@
|
|||
/usr/share/automake-1.11/depcomp
|
|
@ -0,0 +1,708 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2012-03-27.16; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' "$nl" < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
|
||||
# However on
|
||||
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\':
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
# tcc 0.9.26 (FIXME still under development at the moment of writing)
|
||||
# will emit a similar output, but also prepend the continuation lines
|
||||
# with horizontal tabulation characters.
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form 'foo.o: dependent.h',
|
||||
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
||||
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
|
||||
< "$tmpdepfile" > "$depfile"
|
||||
sed '
|
||||
s/[ '"$tab"'][ '"$tab"']*/ /g
|
||||
s/^ *//
|
||||
s/ *\\*$//
|
||||
s/^[^:]*: *//
|
||||
/^$/d
|
||||
/:$/d
|
||||
s/$/ :/
|
||||
' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test "$stat" = 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
30
src/autocr.c
30
src/autocr.c
|
@ -1,14 +1,24 @@
|
|||
/* autocr.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// autocr.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
|
|
35
src/bpfdet.c
35
src/bpfdet.c
|
@ -1,16 +1,27 @@
|
|||
/* bpfdet.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// bpfdet.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
#include "morse.h"
|
||||
#include <math.h>
|
||||
|
||||
/* Subroutine */ int bpfdet_(real *zin, real *z__)
|
||||
{
|
||||
|
@ -28,7 +39,7 @@
|
|||
real r__1;
|
||||
|
||||
/* Builtin functions */
|
||||
double sqrt(doublereal);
|
||||
// double sqrt(doublereal);
|
||||
|
||||
/* Local variables */
|
||||
static real w1, w2, w3, x3, x2, x1, y3, y2, y1, y0, z3, z2, z1, zbpf,
|
||||
|
|
31
src/initl.c
31
src/initl.c
|
@ -1,16 +1,25 @@
|
|||
/* initl.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// initl.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
|
33
src/inputl.c
33
src/inputl.c
|
@ -1,18 +1,27 @@
|
|||
/* inputl.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// inputl.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
#include <math.h>
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
||||
|
|
31
src/kalfil.c
31
src/kalfil.c
|
@ -1,16 +1,25 @@
|
|||
/* kalfil.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// kalfil.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
#include <math.h>
|
||||
/* Common Block Declarations */
|
||||
|
|
30
src/key.c
30
src/key.c
|
@ -1,14 +1,24 @@
|
|||
/* key.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// key.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
31
src/likhd.c
31
src/likhd.c
|
@ -1,16 +1,25 @@
|
|||
/* likhd.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// likhd.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
|
31
src/model.c
31
src/model.c
|
@ -1,16 +1,25 @@
|
|||
/* model.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// model.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include <math.h>
|
||||
#include "morse.h"
|
||||
|
||||
|
|
467
src/morse.c
467
src/morse.c
|
@ -1,102 +1,411 @@
|
|||
/* morse.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// morse.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
char debug = '0';
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include "morse.h"
|
||||
#include <sndfile.h>
|
||||
#include <fftw3.h>
|
||||
#include "window.h"
|
||||
|
||||
#define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof (x [0])))
|
||||
#define MAX(x,y) ((x) > (y) ? (x) : (y))
|
||||
#define MIN(x,y) ((x) < (y) ? (x) : (y))
|
||||
#define MIN_WIDTH 640
|
||||
#define MIN_HEIGHT 480
|
||||
#define MAX_WIDTH 65536
|
||||
#define MAX_HEIGHT 4096
|
||||
|
||||
PARAMS params = { FALSE, FALSE, FALSE, FALSE, 16384, 16, 0, 0};
|
||||
|
||||
|
||||
|
||||
sf_count_t sfx_mix_mono_read_double (SNDFILE * file, double * data, sf_count_t datalen)
|
||||
{
|
||||
SF_INFO info ;
|
||||
|
||||
#if HAVE_SF_GET_INFO
|
||||
/*
|
||||
** The function sf_get_info was in a number of 1.0.18 pre-releases but was removed
|
||||
** before 1.0.18 final and replaced with the SFC_GET_CURRENT_SF_INFO command.
|
||||
*/
|
||||
sf_get_info (file, &info) ;
|
||||
#else
|
||||
sf_command (file, SFC_GET_CURRENT_SF_INFO, &info, sizeof (info)) ;
|
||||
#endif
|
||||
|
||||
if (info.channels == 1)
|
||||
return sf_read_double (file, data, datalen) ;
|
||||
|
||||
static double multi_data [2048] ;
|
||||
int k, ch, frames_read ;
|
||||
sf_count_t dataout = 0 ;
|
||||
|
||||
while (dataout < datalen)
|
||||
{ int this_read ;
|
||||
|
||||
this_read = MIN (ARRAY_LEN (multi_data) / info.channels, datalen) ;
|
||||
|
||||
frames_read = sf_readf_double (file, multi_data, this_read) ;
|
||||
if (frames_read == 0)
|
||||
break ;
|
||||
|
||||
for (k = 0 ; k < frames_read ; k++)
|
||||
{ double mix = 0.0 ;
|
||||
|
||||
for (ch = 0 ; ch < info.channels ; ch++)
|
||||
mix += multi_data [k * info.channels + ch] ;
|
||||
data [dataout + k] = mix / info.channels ;
|
||||
} ;
|
||||
|
||||
dataout += this_read ;
|
||||
} ;
|
||||
|
||||
return dataout ;
|
||||
} /* sfx_mix_mono_read_double */
|
||||
|
||||
|
||||
static void read_mono_audio (SNDFILE * file, sf_count_t filelen, double * data, int datalen, int indx, int total)
|
||||
{
|
||||
sf_count_t start ;
|
||||
|
||||
memset (data, 0, datalen * sizeof (data [0])) ;
|
||||
|
||||
start = (indx * filelen) / total - datalen / 2 ;
|
||||
|
||||
if (start >= 0)
|
||||
sf_seek (file, start, SEEK_SET) ;
|
||||
else
|
||||
{ start = -start ;
|
||||
sf_seek (file, 0, SEEK_SET) ;
|
||||
data += start ;
|
||||
datalen -= start ;
|
||||
} ;
|
||||
|
||||
sfx_mix_mono_read_double (file, data, datalen) ;
|
||||
|
||||
return ;
|
||||
} /* read_mono_audio */
|
||||
|
||||
static double calc_magnitude (const double * freq, int freqlen, double * magnitude)
|
||||
{
|
||||
int k ;
|
||||
double max = 0.0 ;
|
||||
|
||||
for (k = 1 ; k < freqlen / 2 ; k++)
|
||||
{ magnitude [k] = sqrt (freq [k] * freq [k] + freq [freqlen - k - 1] * freq [freqlen - k - 1]) ;
|
||||
max = MAX (max, magnitude [k]) ;
|
||||
} ;
|
||||
magnitude [0] = 0.0 ;
|
||||
|
||||
return max ;
|
||||
} /* calc_magnitude */
|
||||
|
||||
|
||||
static void apply_window (double * data, int datalen)
|
||||
{
|
||||
static double window [10 * MAX_HEIGHT] ;
|
||||
static int window_len = 0 ;
|
||||
int k ;
|
||||
|
||||
if (window_len != datalen)
|
||||
{
|
||||
window_len = datalen ;
|
||||
if (datalen > ARRAY_LEN (window))
|
||||
{
|
||||
printf ("%s : datalen > MAX_HEIGHT\n", __func__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
calc_kaiser_window (window, datalen, 20.0) ;
|
||||
// calc_nuttall_window (window, datalen);
|
||||
} ;
|
||||
|
||||
for (k = 0 ; k < datalen ; k++)
|
||||
data [k] *= window [k] ;
|
||||
|
||||
return ;
|
||||
} /* apply_window */
|
||||
|
||||
static void interp_spec (float * mag, int maglen, const double *spec, int speclen)
|
||||
{
|
||||
int k, lastspec = 0 ;
|
||||
|
||||
mag [0] = spec [0] ;
|
||||
|
||||
for (k = 1 ; k < maglen ; k++) {
|
||||
double sum = 0.0 ;
|
||||
int count = 0 ;
|
||||
|
||||
do {
|
||||
sum += spec [lastspec] ;
|
||||
lastspec ++ ;
|
||||
count ++ ;
|
||||
}
|
||||
while (lastspec <= ceil ((k * speclen) / maglen)) ;
|
||||
|
||||
mag [k] = sum / count ;
|
||||
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* interp_spec */
|
||||
|
||||
void process_data(double x)
|
||||
{
|
||||
static integer sample_counter = 0;
|
||||
static real rn = .1f;
|
||||
static integer retstat, n1, n2, imax, xhat, elmhat;
|
||||
static real pmax, zout, spdhat, px;
|
||||
static int init = 1;
|
||||
|
||||
if (params.print_variables && init) {
|
||||
printf("\nretstat\timax\telmhat\txhat\tx\tpx\tpmax\tspdhat\trn\tzout\tp1\tp2\tp3\tp4\tp5\tp6\n");
|
||||
init = 0;
|
||||
}
|
||||
|
||||
sample_counter++;
|
||||
// if (sample_counter % DECIMATE == 0) { /* DECIMATE 4 kHz by 20 down to 200Hz - 5 ms sample time for PROCES */
|
||||
|
||||
noise_(x, &rn, &zout);
|
||||
if (zout > 1.0) zout = 1.0;
|
||||
if (zout < 0.0) zout = 0.0;
|
||||
|
||||
retstat = proces_(&zout, &rn, &xhat, &px, &elmhat, &spdhat, &imax, &pmax);
|
||||
if (params.print_variables)
|
||||
printf("\n%d\t%d\t%d\t%d\t%f\t%f\t%f\t%f\t%f\t%f",(int)retstat,(int)imax,(int)elmhat,(int)xhat,x,px,pmax,spdhat,rn,zout);
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
decode_sndfile (SNDFILE *infile, int samplerate, sf_count_t filelen)
|
||||
{
|
||||
|
||||
|
||||
static double time_domain [10 * MAX_HEIGHT] ;
|
||||
static double freq_domain [10 * MAX_HEIGHT] ;
|
||||
static double single_mag_spec [5 * MAX_HEIGHT] ;
|
||||
static float mag_spec [MAX_WIDTH][MAX_HEIGHT] ;
|
||||
|
||||
fftw_plan plan ;
|
||||
double max_mag = 0.0 ;
|
||||
int width = 8192, height= 32, w, speclen ;
|
||||
|
||||
width = params.width;
|
||||
/*
|
||||
** Choose a speclen value that is long enough to represent frequencies down
|
||||
** to 20Hz, and then increase it slightly so it is a multiple of 0x40 (64) so that
|
||||
** FFTW calculations will be quicker.
|
||||
*/
|
||||
|
||||
speclen = 16; // 16 ok for 4000 Hz test60db.wav @16384 width
|
||||
speclen = params.speclen; // 64 for 48000 Hz capture.wav @4096 w or 2048
|
||||
|
||||
params.sample_rate = samplerate;
|
||||
params.sample_duration = 2000.*speclen/samplerate;
|
||||
|
||||
if (2 * speclen > ARRAY_LEN (time_domain))
|
||||
{ printf ("%s : 2 * speclen > ARRAY_LEN (time_domain)\n", __func__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
printf("\nsamplerate:%d speclen:%d", samplerate, speclen);
|
||||
|
||||
plan = fftw_plan_r2r_1d (2 * speclen, time_domain, freq_domain, FFTW_R2HC, FFTW_MEASURE | FFTW_PRESERVE_INPUT) ;
|
||||
if (plan == NULL)
|
||||
{ printf ("%s : line %d : create plan failed.\n", __FILE__, __LINE__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
for (w = 0 ; w < width ; w++)
|
||||
{ double single_max ;
|
||||
|
||||
read_mono_audio (infile, filelen, time_domain, 2 * speclen, w, width) ;
|
||||
|
||||
apply_window (time_domain, 2 * speclen) ;
|
||||
|
||||
fftw_execute (plan) ;
|
||||
|
||||
single_max = calc_magnitude (freq_domain, 2 * speclen, single_mag_spec) ;
|
||||
max_mag = MAX (max_mag, single_max) ;
|
||||
|
||||
process_data(single_max/max_mag); // decode Morse code here
|
||||
|
||||
interp_spec (mag_spec [w], height, single_mag_spec, speclen) ;
|
||||
} ;
|
||||
|
||||
fftw_destroy_plan (plan) ;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
process_sndfile (char * filename)
|
||||
{
|
||||
SNDFILE *infile ;
|
||||
SF_INFO info ;
|
||||
|
||||
|
||||
memset (&info, 0, sizeof (info)) ;
|
||||
|
||||
infile = sf_open (filename, SFM_READ, &info) ;
|
||||
if (infile == NULL)
|
||||
{ printf ("Error : failed to open sound file '%s' : \n%s\n", filename, sf_strerror (NULL)) ;
|
||||
return ;
|
||||
} ;
|
||||
|
||||
decode_sndfile ( infile, info.samplerate, info.frames) ;
|
||||
|
||||
sf_close (infile);
|
||||
|
||||
return ;
|
||||
} /* render_sndfile */
|
||||
|
||||
void process_textfile(char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
float x;
|
||||
int res;
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
printf("\nError : failed to open text file '%s' : \n", filename);
|
||||
return;
|
||||
}
|
||||
while (1) {
|
||||
res = fscanf(fp,"%f",&x);
|
||||
if ( res != 1) {
|
||||
fclose(fp);
|
||||
printf("\n");
|
||||
exit(0);
|
||||
}
|
||||
process_data((double)x);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void usage_exit (const char * argv0)
|
||||
{
|
||||
const char * progname ;
|
||||
|
||||
progname = strrchr (argv0, '/') ;
|
||||
progname = (progname == NULL) ? argv0 : progname + 1 ;
|
||||
|
||||
puts ("\nBayesian Morse Decoder program reads sound file and decodes CW to text.") ;
|
||||
|
||||
printf ("\nUsage :\n\n %s [options] <sound file> \n\n", progname) ;
|
||||
|
||||
puts (
|
||||
" Options include:\n\n"
|
||||
" -var Print variables for post-analysis (default off).\n"
|
||||
" -sym Print symbols before translation (default off). \n"
|
||||
" -txt Print decoded and translated text (default off).\n"
|
||||
" -txf Process text file instead of soundfile.\n"
|
||||
" -len <length> Window length for FFT [8,16,32,64,128...].\n"
|
||||
" -wid <width> Width of buffer to read & process [8192, 16384].\n"
|
||||
|
||||
|
||||
) ;
|
||||
|
||||
puts (
|
||||
" TXF: The text file contains real valued input (1 datapoint per line) to be decoded.\n"
|
||||
" Default: The sound file type is determined by the file name extension which should be one\n"
|
||||
" of 'wav', 'aifc', 'aif', 'aiff', 'au', 'caf' and 'w64'.\n"
|
||||
) ;
|
||||
|
||||
exit (0) ;
|
||||
} /* usage_exit */
|
||||
|
||||
|
||||
|
||||
|
||||
int MAIN__(void){};
|
||||
// MAIN PROGRAM = BAYESIAN MORSE DECODER
|
||||
// (c) Mauri Niininen AG1LE
|
||||
//
|
||||
|
||||
int main(int argc, char**argv)
|
||||
{
|
||||
/* Initialized data */
|
||||
|
||||
static real rn = .1f;
|
||||
static integer np = 0;
|
||||
|
||||
int k;
|
||||
|
||||
int s_stop(char *, ftnlen);
|
||||
|
||||
/* Local variables */
|
||||
static integer n,retstat;
|
||||
static real x, z;
|
||||
static integer n1, n2;
|
||||
static real s1[512], s2[512], s3[512], s4[512], px;
|
||||
static integer imax, xhat;
|
||||
static real pmax, zdet, zsig;
|
||||
static real zrcv, zout;
|
||||
static integer elmhat;
|
||||
static real spdhat;
|
||||
|
||||
int res;
|
||||
FILE *fp;
|
||||
|
||||
/* PARSE PARAMETERS FROM COMMAND LINE */
|
||||
|
||||
if (argc < 2)
|
||||
usage_exit (argv [0]) ;
|
||||
|
||||
for (k = 1 ; k < argc; k++) {
|
||||
if (strcmp (argv [k], "-wid") == 0){
|
||||
k++ ;
|
||||
params.width = atoi (argv [k]) ;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-len") == 0) {
|
||||
k++ ;
|
||||
params.speclen = atoi (argv [k]) ;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-var") == 0){
|
||||
params.print_variables = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-sym") == 0){
|
||||
params.print_symbols = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-txt") == 0){
|
||||
params.print_text = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-txf") == 0){
|
||||
params.process_textfile = TRUE;
|
||||
continue ;
|
||||
}
|
||||
} ;
|
||||
|
||||
/* INITIALIZE DATA STRUCTURES */
|
||||
initl_();
|
||||
inputl_();
|
||||
|
||||
switch (argc) {
|
||||
case 1:
|
||||
printf("\nusage: %s [debug d or t] filename\n", argv[0]);
|
||||
return 0;
|
||||
case 2:
|
||||
fp = fopen(argv[1],"r");
|
||||
break;
|
||||
case 3:
|
||||
debug = *argv[1];
|
||||
fp = fopen(argv[2],"r");
|
||||
initl_();
|
||||
inputl_();
|
||||
|
||||
if(params.process_textfile)
|
||||
process_textfile(argv[k-1]);
|
||||
else
|
||||
process_sndfile(argv[k-1]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (debug=='d')
|
||||
printf("\nretstat\timax\telmhat\txhat\tltrhat\tx\tpx\tpmax\tspdhat");
|
||||
L1:
|
||||
for (n1 = 1; n1 <= 512; ++n1) {
|
||||
for (n2 = 1; n2 <= 18; ++n2) {
|
||||
//simsgi_(&x, &zsig);
|
||||
res = fscanf(fp,"%f",&x);
|
||||
if ( res != 1) {
|
||||
fclose(fp);
|
||||
printf("\n");
|
||||
return 0;
|
||||
fp = fopen(argv[1],"r");
|
||||
x = 0.0;
|
||||
}
|
||||
//rcvr_(&zsig, &zrcv);
|
||||
//bpfdet_(&zrcv, &zdet);
|
||||
++np;
|
||||
/* DECIMATE 4 kHz by 20 down to 200Hz - 5 ms sample time for PROCES */
|
||||
if (np < DECIMATE) {
|
||||
goto L3;
|
||||
}
|
||||
np = 0;
|
||||
if (x > 1.0) x = 1.0;
|
||||
noise_(&x, &rn, &zout);
|
||||
retstat = proces_(&zout, &rn, &xhat, &px, &elmhat, &spdhat, &imax, &pmax);
|
||||
// printf("\n%f",x);
|
||||
if (debug=='d')
|
||||
printf("\n%d\t%d\t%d\t%d\t%f\t%f\t%f\t%f",(int)retstat,(int)imax,(int)elmhat,(int)xhat,x,px,pmax,spdhat);
|
||||
L3:
|
||||
;
|
||||
}
|
||||
n = n1;
|
||||
stats_(&zdet, &z, &px, &xhat, s1, s2, s3, s4, &n);
|
||||
/* L2: */
|
||||
}
|
||||
/* CALL DISPLA(S1,S2,S3,S4) */
|
||||
goto L1;
|
||||
s_stop("", (ftnlen)0);
|
||||
return 0;
|
||||
} /* MAIN__ */
|
||||
|
||||
// int morse_ () { MAIN__ (); return 0; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
36
src/morse.h
36
src/morse.h
|
@ -1,3 +1,24 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// morse.h -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef long int integer;
|
||||
typedef unsigned long int uinteger;
|
||||
|
@ -6,7 +27,7 @@ typedef double doublereal;
|
|||
typedef int ftnlen;
|
||||
|
||||
extern int rcvr_(real *, real *);
|
||||
extern int noise_(real *, real *, real *);
|
||||
extern int noise_(double, real *, real *);
|
||||
extern int initl_(void);
|
||||
extern int stats_(real *, real *, real *, integer *, real *, real *, real *, real *, integer *);
|
||||
extern int bpfdet_(real *, real *);
|
||||
|
@ -30,3 +51,16 @@ extern doublereal spdtr_(integer *, integer *, integer *, integer *);
|
|||
#define SAMPLEDURATION (1000. * DECIMATE) / FSAMPLE // 1000*DECIMATE / FSAMPLE SHOULD BE 5 msec
|
||||
#define NDELAY 200 // 200 SAMPLES * 5 msec = 1000 msec decoding delay
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
typedef struct
|
||||
{ int print_variables ;
|
||||
int print_symbols;
|
||||
int process_textfile;
|
||||
int print_text;
|
||||
int width, speclen ;
|
||||
double sample_duration;
|
||||
double sample_rate;
|
||||
} PARAMS ;
|
||||
|
||||
extern PARAMS params;
|
||||
|
|
43
src/noise.c
43
src/noise.c
|
@ -1,19 +1,28 @@
|
|||
/* noise.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// noise.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Subroutine */ int noise_(real *zin, real *rn, real *z__)
|
||||
/* Subroutine */ int noise_(double zin, real *rn, real *z__)
|
||||
{
|
||||
/* Initialized data */
|
||||
|
||||
|
@ -76,10 +85,10 @@
|
|||
if (kks <= 2) {
|
||||
goto L10;
|
||||
}
|
||||
ylong[kl - 1] = *zin;
|
||||
yshort[ks - 1] = *zin;
|
||||
ymin1 = *zin;
|
||||
ymin2 = *zin;
|
||||
ylong[kl - 1] = zin;
|
||||
yshort[ks - 1] = zin;
|
||||
ymin1 = zin;
|
||||
ymin2 = zin;
|
||||
L10:
|
||||
i__1 = kkl;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
|
@ -108,7 +117,7 @@ L200:
|
|||
if (*rn < .005f) {
|
||||
*rn = .005f;
|
||||
}
|
||||
*z__ = (*zin - ymavg * 2.4f - .05f) * 1.1f;
|
||||
*z__ = (zin - ymavg * 2.4f - .05f) * 1.1f;
|
||||
return 0;
|
||||
} /* noise_ */
|
||||
|
||||
|
|
33
src/path.c
33
src/path.c
|
@ -1,16 +1,25 @@
|
|||
/* path.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// path.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
@ -101,7 +110,7 @@ static integer c__1 = 1;
|
|||
ixs = blks_1.isx[k - 1];
|
||||
|
||||
/* CALCULATE DURATION - ADD SAMPLE DURATION 5 ms FOR EACH VALID PATH */
|
||||
dursav[j] = *dur * (1 - ixs - ixl + (ixs << 1) * ixl) + SAMPLEDURATION;
|
||||
dursav[j] = *dur * (1 - ixs - ixl + (ixs << 1) * ixl) + params.sample_duration;
|
||||
|
||||
/* NEW DATA RATE: */
|
||||
ilrsav[j] = *ilrate + (i - 3) * blkrat_1.memdel[ilelm + k * 6 - 7];
|
||||
|
|
30
src/probp.c
30
src/probp.c
|
@ -1,14 +1,24 @@
|
|||
/* probp.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// probp.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
|
|
49
src/proces.c
49
src/proces.c
|
@ -1,23 +1,27 @@
|
|||
/* proces.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// proces.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Table of constant values */
|
||||
|
||||
static integer c__1 = 1;
|
||||
|
||||
|
||||
int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *spdhat, integer *imax, real *
|
||||
pmax)
|
||||
{
|
||||
|
@ -251,10 +255,10 @@ int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *
|
|||
|
||||
i1 = isave;
|
||||
for (i = 1; i <= i1; ++i) {
|
||||
ipath = i;
|
||||
trprob_(&ipath, &lambda[i - 1], &dur[i - 1], &ilrate[i - 1], pin);
|
||||
path_(&ipath, &lambda[i - 1], &dur[i - 1], &ilrate[i - 1],lamsav, dursav, ilrsav);
|
||||
likhd_(z, rn, &ipath, &lambda[i - 1], &dur[i - 1], &ilrate[i- 1], pin, lkhd);
|
||||
ipath = i;
|
||||
trprob_(&ipath, &lambda[i - 1], &dur[i - 1], &ilrate[i - 1], pin);
|
||||
path_(&ipath, &lambda[i - 1], &dur[i - 1], &ilrate[i - 1],lamsav, dursav, ilrsav);
|
||||
likhd_(z, rn, &ipath, &lambda[i - 1], &dur[i - 1], &ilrate[i- 1], pin, lkhd);
|
||||
}
|
||||
/* HAVING OBTAINED ALL NEW PATHS, COMPUTE: */
|
||||
/* POSTERIOR PROBABILITY OF EACH NEW PATH(PROBP); */
|
||||
|
@ -265,13 +269,12 @@ int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *
|
|||
|
||||
*xhat = 0;
|
||||
if (*px > .5f) {
|
||||
*xhat = 1;
|
||||
*xhat = 1;
|
||||
}
|
||||
/* SAVE THE PATHS WITH HIGHEST PROBABILITY, AND */
|
||||
/* STORE THE VALUES CORRESPONDING TO THESE PATHS: */
|
||||
|
||||
savep_(p, pathsv, &isave, imax, lamsav, dursav, ilrsav, lambda, dur,
|
||||
ilrate, sort, pmax);
|
||||
savep_(p, pathsv, &isave, imax, lamsav, dursav, ilrsav, lambda, dur, ilrate, sort, pmax);
|
||||
|
||||
/* UPDATE TRELLIS WITH NEW SAVED NODES, AND */
|
||||
/* OBTAIN LETTER STATE ESTIMATE: */
|
||||
|
|
31
src/ptrans.c
31
src/ptrans.c
|
@ -1,16 +1,25 @@
|
|||
/* ptrans.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// ptrans.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
|
62
src/rcvr.c
62
src/rcvr.c
|
@ -1,62 +0,0 @@
|
|||
/* rcvr.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
||||
struct {
|
||||
real tau;
|
||||
} blk1_;
|
||||
|
||||
#define blk1_1 blk1_
|
||||
|
||||
struct {
|
||||
real wc;
|
||||
} blk2_;
|
||||
|
||||
#define blk2_1 blk2_
|
||||
|
||||
/* Table of constant values */
|
||||
|
||||
static real c_b2 = 6.28319f;
|
||||
|
||||
/* Subroutine */ int rcvr_(real *zin, real *zout)
|
||||
{
|
||||
/* Initialized data */
|
||||
|
||||
static real theta = 0.f;
|
||||
static real thetlo = 0.f;
|
||||
|
||||
/* Builtin functions */
|
||||
double r_mod(real *, real *), cos(doublereal), sin(doublereal);
|
||||
|
||||
/* Local variables */
|
||||
static real zi, zq, zilp, zqlp;
|
||||
|
||||
|
||||
/* THIS SUBROUTINE CONVERTS THE INPUT SIGNAL AT */
|
||||
/* RADIAN FREQ WC TO 1000 Hz. */
|
||||
|
||||
|
||||
theta += blk2_1.wc * blk1_1.tau;
|
||||
theta = r_mod(&theta, &c_b2);
|
||||
zi = *zin * cos(theta);
|
||||
zq = *zin * sin(theta);
|
||||
zilp += (zi - zilp) * .07f;
|
||||
zqlp += (zq - zqlp) * .07f;
|
||||
thetlo += blk1_1.tau * 6283.2f;
|
||||
thetlo = r_mod(&thetlo, &c_b2);
|
||||
*zout = zilp * cos(thetlo) + zqlp * sin(thetlo);
|
||||
return 0;
|
||||
} /* rcvr_ */
|
||||
|
31
src/savep.c
31
src/savep.c
|
@ -1,16 +1,25 @@
|
|||
/* savep.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// savep.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
|
31
src/simsgi.c
31
src/simsgi.c
|
@ -1,14 +1,25 @@
|
|||
/* simsgi.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// simsgi.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
|
|
33
src/spdtr.c
33
src/spdtr.c
|
@ -1,16 +1,27 @@
|
|||
/* spdtr.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// spdtr.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
||||
|
@ -42,7 +53,7 @@ doublereal spdtr_(integer *isrt, integer *ilrt, integer *iselm, integer *ilelm)
|
|||
|
||||
/* VARIABLES: */
|
||||
/* ISRT - DATA RATE IDENTITY FOR STATE TO WHICH PATH */
|
||||
/* IS BEING EXTENDED */
|
||||
/* IS BEING EXTENDED */
|
||||
/* ILRT - DATA RATE ON CURRENT PATH */
|
||||
/* ISELM - ELEM TYPE FOR NEXT STATE */
|
||||
/* ILELM - ELEM TYPE ON CURRENT PATH */
|
||||
|
|
37
src/sprob.c
37
src/sprob.c
|
@ -1,16 +1,25 @@
|
|||
/* sprob.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// sprob.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -24,6 +33,7 @@ int sprob_(real *p, integer *isave, integer *ilrsav, real *pelm, integer *khat,
|
|||
/* Local variables */
|
||||
static integer i, j, k, m, n;
|
||||
static real pselem[6];
|
||||
static int initial = 0;
|
||||
|
||||
|
||||
/* SPROB COMPUTES THE POSTERIOR PROBS OF THE ELEMENT */
|
||||
|
@ -65,8 +75,8 @@ int sprob_(real *p, integer *isave, integer *ilrsav, real *pelm, integer *khat,
|
|||
*pelm = 0.f;
|
||||
|
||||
for (k = 1; k <= 6; ++k) {
|
||||
// IF WANT ELEMENT PROBABILITIES BY SAMPLE ENABLE debug flag 'd'
|
||||
if (debug == 'd') {
|
||||
// IF WANT ELEMENT PROBABILITIES BY SAMPLE ENABLE debug flag -var
|
||||
if (params.print_variables && initial) {
|
||||
printf("\t%f",pselem[k - 1]);
|
||||
}
|
||||
if (pselem[k - 1] >= *pelm) {
|
||||
|
@ -74,6 +84,7 @@ if (debug == 'd') {
|
|||
*khat = k;
|
||||
}
|
||||
}
|
||||
initial = 1;
|
||||
return 0;
|
||||
} /* sprob_ */
|
||||
|
||||
|
|
30
src/stats.c
30
src/stats.c
|
@ -1,14 +1,24 @@
|
|||
/* stats.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// stats.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
|
|
379
src/transl.c
379
src/transl.c
|
@ -1,76 +1,98 @@
|
|||
//#include "f2c.h"
|
||||
// ----------------------------------------------------------------------------
|
||||
// transl.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include <stdio.h>
|
||||
#include "morse.h"
|
||||
extern char debug;
|
||||
|
||||
|
||||
struct TREE {
|
||||
int dit,dah;
|
||||
char chr[5];
|
||||
char chr[12];
|
||||
} tree[] = { // check http://en.wikipedia.org/wiki/Morse_code
|
||||
//dit,dah, chr
|
||||
{1,2, '*'}, // null state
|
||||
{3,4, 'E'}, // .
|
||||
{5,6, 'T'}, // -
|
||||
{7,8, 'I'}, // ..
|
||||
{9,10,'A'}, // .-
|
||||
{11,12,'N'}, // -.
|
||||
{13,14,'M'}, // --
|
||||
{15,16,'S'}, // ...
|
||||
{17,18,'U'}, // ..-
|
||||
{19,20,'R'}, // .-.
|
||||
{21,22,'W'}, // .--
|
||||
{23,24,'D'}, // -..
|
||||
{25,26,'K'}, // -.-
|
||||
{27,28,'G'}, // --.
|
||||
{29,30,'O'}, // ---
|
||||
{31,32,'H'}, // ....
|
||||
{33,34,'V'}, // ...-
|
||||
{35,36,'F'}, // ..-.
|
||||
{37,38,'..--'},// ..--
|
||||
{39,40,'L'}, // .-..
|
||||
{41,42,'Ä'}, // .-.-
|
||||
{43,44,'P'}, // .--.
|
||||
{45,46,'J'}, // .---
|
||||
{47,48,'B'}, // -...
|
||||
{49,50,'X'}, // -..-
|
||||
{51,52,'C'}, // -.-.
|
||||
{53,00,'Y'}, // -.--
|
||||
{55,00,'Z'}, // --..
|
||||
{57,00,'Q'}, // --.-
|
||||
{54,00,'Ö'}, // ---.
|
||||
{56,57,'Š'}, // ----
|
||||
{00,00,'5'}, // .....
|
||||
{00,00,'4'}, // ....-
|
||||
{00,60,'*'}, // ...-.
|
||||
{00,00,'3'}, // ...--
|
||||
{00,00,'É'}, // ..-..
|
||||
{00,00,'*'}, // ..-.-
|
||||
{58,00,'*'}, // ..--. D?
|
||||
{00,00,'2'}, // ..---
|
||||
{00,00,'*'}, //
|
||||
{00,00,'È'}, //
|
||||
{00,63,'+'}, // .-.-.
|
||||
{00,00,'*'}, // .-.--
|
||||
{00,00,'*'}, // .--..
|
||||
{59,00,'à'}, // .--.-
|
||||
{00,00,'*'}, // .----
|
||||
{00,00,'1'}, // .---.
|
||||
{00,00,'6'}, // -....
|
||||
{61,00,'='}, // -...-
|
||||
{00,00,'/'}, // -..-.
|
||||
{00,00,'*'}, // -..--
|
||||
{00,00,'*'}, // -.-..
|
||||
{00,00,'Ĥ'}, // -.-.-
|
||||
{00,00,'Ṅ'}, // -.--.
|
||||
{00,00,'8'}, // ---..
|
||||
{00,00,'7'}, // --...
|
||||
{00,00,'9'}, // ----.
|
||||
{00,00,'0'}, // -----
|
||||
{00,00,'?'}, // ..--..
|
||||
{00,00,'@'}, // .--.-.
|
||||
{00,00,'SK'}, // ...-.-
|
||||
{00,62,'*'}, // -...-.
|
||||
{00,00,'BK'}, // -...-.-
|
||||
{00,00,'.'} // .-.-.-
|
||||
{1,2, "<NULL>"}, // null state
|
||||
{3,4, "E"}, // .
|
||||
{5,6, "T"}, // -
|
||||
{7,8, "I"}, // ..
|
||||
{9,10,"A"}, // .-
|
||||
{11,12,"N"}, // -.
|
||||
{13,14,"M"}, // --
|
||||
{15,16,"S"}, // ...
|
||||
{17,18,"U"}, // ..-
|
||||
{19,20,"R"}, // .-.
|
||||
{21,22,"W"}, // .--
|
||||
{23,24,"D"}, // -..
|
||||
{25,26,"K"}, // -.-
|
||||
{27,28,"G"}, // --.
|
||||
{29,30,"O"}, // ---
|
||||
{31,32,"H"}, // ....
|
||||
{33,34,"V"}, // ...-
|
||||
{35,36,"F"}, // ..-.
|
||||
{37,38,"*..--*"},// ..--
|
||||
{39,40,"L"}, // .-..
|
||||
{41,42,"Ä>"}, // .-.- Ä
|
||||
{43,44,"P"}, // .--.
|
||||
{45,46,"J"}, // .---
|
||||
{47,48,"B"}, // -...
|
||||
{49,50,"X"}, // -..-
|
||||
{51,52,"C"}, // -.-.
|
||||
{53,00,"Y"}, // -.--
|
||||
{55,00,"Z"}, // --..
|
||||
{57,00,"Q"}, // --.-
|
||||
{54,00,"Ö"}, // ---. Ö
|
||||
{56,57,"Š"}, // ---- Š
|
||||
{00,00,"5"}, // .....
|
||||
{00,00,"4"}, // ....-
|
||||
{00,60,"*...-.*"}, // ...-.
|
||||
{00,00,"3"}, // ...--
|
||||
{00,00,"e"}, // ..-..
|
||||
{00,00,"*..-.-*"}, // ..-.-
|
||||
{58,00,"*..--.*"}, // ..--. D?
|
||||
{00,00,"2"}, // ..---
|
||||
{00,00,"*.-...*"}, // .-...
|
||||
{00,00,"e"}, // .-..-
|
||||
{00,63,"+"}, // .-.-.
|
||||
{00,00,"*.-.--*"}, // .-.--
|
||||
{00,00,"*.--..*"}, // .--..
|
||||
{59,00,"a"}, // .--.-
|
||||
{00,00,"*"}, // .----
|
||||
{00,00,"1"}, // .---.
|
||||
{00,00,"6"}, // -....
|
||||
{61,00,"="}, // -...-
|
||||
{00,00,"/"}, // -..-.
|
||||
{00,00,"*-..--*"}, // -..--
|
||||
{00,00,"*-.-..*"}, // -.-..
|
||||
{00,00,"^H"}, // -.-.-
|
||||
{00,00,"~N"}, // -.--.
|
||||
{00,00,"8"}, // ---..
|
||||
{00,00,"7"}, // --...
|
||||
{00,00,"9"}, // ----.
|
||||
{00,00,"0"}, // -----
|
||||
{00,00,"?"}, // ..--..
|
||||
{00,00,"@"}, // .--.-.
|
||||
{00,00,"SK"}, // ...-.-
|
||||
{00,62,"*-...-.*"}, // -...-.
|
||||
{00,00,"BK"}, // -...-.-
|
||||
{00,00,"."} // .-.-.-
|
||||
};
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
@ -100,7 +122,7 @@ int transl_(int *ltr)
|
|||
{
|
||||
/* Initialized data */
|
||||
|
||||
static char ispace[1] = " ";
|
||||
static char ispace[2] = " ";
|
||||
static integer spflag = 0;
|
||||
static integer nchar = 0;
|
||||
static integer lstltr = 0;
|
||||
|
@ -141,123 +163,116 @@ int transl_(int *ltr)
|
|||
goto L700;
|
||||
}
|
||||
|
||||
if (debug == 't') { // print received tokens
|
||||
switch (*ltr)
|
||||
{
|
||||
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
|
||||
/* .^ .~ .w .p -^ -~ -w -p ^. ^- ~. ~- w. w- p. p- */
|
||||
case 16: // p-
|
||||
printf("p-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 15: // p.
|
||||
printf("p.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 14: // w-
|
||||
printf("w-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 13: // w.
|
||||
printf("w.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 12: // ~-
|
||||
printf("~-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 11: // ~.
|
||||
printf("~.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 10: // ^-
|
||||
printf("^-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 9: // ^.
|
||||
printf("^.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 8:
|
||||
printf("-p");
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 7:
|
||||
printf("-w");
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 6:
|
||||
printf("-~");
|
||||
printf("%s",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 5:
|
||||
printf("-^");
|
||||
break;
|
||||
case 4:
|
||||
printf(".p");
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 3:
|
||||
printf(".w");
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 2:
|
||||
printf(".~");
|
||||
printf("%s",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 1:
|
||||
printf(".^");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (params.print_symbols) { // print received symbols
|
||||
switch (*ltr)
|
||||
{
|
||||
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
|
||||
/* .^ .~ .w .p -^ -~ -w -p ^. ^- ~. ~- w. w- p. p- */
|
||||
case 16: // p-
|
||||
printf("p-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 15: // p.
|
||||
printf("p.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 14: // w-
|
||||
printf("w-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 13: // w.
|
||||
printf("w.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 12: // ~-
|
||||
printf("~-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 11: // ~.
|
||||
printf("~.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 10: // ^-
|
||||
printf("^-");
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 9: // ^.
|
||||
printf("^.");
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 8:
|
||||
printf("-p");
|
||||
newstate = 0;
|
||||
break;
|
||||
case 7:
|
||||
printf("-w");
|
||||
newstate = 0;
|
||||
break;
|
||||
case 6:
|
||||
printf("-~");
|
||||
newstate = 0;
|
||||
break;
|
||||
case 5:
|
||||
printf("-^");
|
||||
break;
|
||||
case 4:
|
||||
printf(".p");
|
||||
newstate = 0;
|
||||
break;
|
||||
case 3:
|
||||
printf(".w");
|
||||
newstate = 0;
|
||||
break;
|
||||
case 2:
|
||||
printf(".~");
|
||||
newstate = 0;
|
||||
break;
|
||||
case 1:
|
||||
printf(".^");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
// printf("\nltr: %d %d :", *ltr, elmhat);
|
||||
switch (*ltr)
|
||||
{
|
||||
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
|
||||
/* .^ .~ .w .p -^ -~ -w -p ^. ^- ~. ~- w. w- p. p- */
|
||||
case 15: // p.
|
||||
case 13: // w.
|
||||
case 11: // ~.
|
||||
case 9: // ^.
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 16: // p-
|
||||
case 14: // w-
|
||||
case 12: // ~-
|
||||
case 10: // ^-
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 6:
|
||||
case 2:
|
||||
printf("%s",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 3:
|
||||
case 7:
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 4:
|
||||
case 8:
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
default:
|
||||
// ltrhat = 0;
|
||||
break;
|
||||
if (params.print_text) {
|
||||
switch (*ltr)
|
||||
{
|
||||
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
|
||||
/* .^ .~ .w .p -^ -~ -w -p ^. ^- ~. ~- w. w- p. p- */
|
||||
case 15: // p.
|
||||
case 13: // w.
|
||||
case 11: // ~.
|
||||
case 9: // ^.
|
||||
newstate = tree[curstate].dit;
|
||||
break;
|
||||
case 16: // p-
|
||||
case 14: // w-
|
||||
case 12: // ~-
|
||||
case 10: // ^-
|
||||
newstate = tree[curstate].dah;
|
||||
break;
|
||||
case 6:
|
||||
case 2:
|
||||
printf("%s",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 3:
|
||||
case 7:
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
case 4:
|
||||
case 8:
|
||||
printf("%s ",tree[curstate].chr);
|
||||
newstate = 0;
|
||||
break;
|
||||
default:
|
||||
// ltrhat = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
L700:
|
||||
fflush(stdout);
|
||||
curstate = newstate;
|
||||
|
|
31
src/trelis.c
31
src/trelis.c
|
@ -1,16 +1,25 @@
|
|||
/* trelis.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// trelis.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include <stdio.h>
|
||||
#include "morse.h"
|
||||
|
||||
|
|
31
src/trprob.c
31
src/trprob.c
|
@ -1,16 +1,25 @@
|
|||
/* trprob.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// trprob.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
|
33
src/xtrans.c
33
src/xtrans.c
|
@ -1,18 +1,27 @@
|
|||
/* xtrans.f -- translated by f2c (version 20100827).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
// ----------------------------------------------------------------------------
|
||||
// xtrans.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
// Morse 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse 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 Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//#include "f2c.h"
|
||||
#include "morse.h"
|
||||
#include <math.h>
|
||||
|
||||
doublereal xtrans_(integer *ielem, real *d0, integer *irate)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue