diff -Naur wfdb-10.1.3/INSTALL wfdb-10.1.4/INSTALL --- wfdb-10.1.3/INSTALL Sun Jan 30 03:53:29 2000 +++ wfdb-10.1.4/INSTALL Mon Jun 5 16:18:20 2000 @@ -1,5 +1,5 @@ file: INSTALL G. Moody 30 January 2000 - + Last revised: 5 June 2000 WFDB Software Package installation notes _______________________________________________________________________________ @@ -30,11 +30,16 @@ 3. In this directory, type: ./configure + make make install You will need root permissions to run 'make install', unless you change - WFDBROOT in 'Makefile' so that the files are installed in a directory - that you own. + WFDBROOT so that the files are installed in a directory that you own (you + will be given a chance to do this when running 'configure'). +4. If for any reason you wish to uninstall the WFDB Software Package, type: + make uninstall + from this directory. You will need root permissions to uninstall unless + you changed WFDBROOT before installing the package. _______________________________________________________________________________ Under MS-DOS or MS-Windows: diff -Naur wfdb-10.1.3/Makefile wfdb-10.1.4/Makefile --- wfdb-10.1.3/Makefile Mon Apr 10 09:27:39 2000 +++ wfdb-10.1.4/Makefile Mon Jun 5 23:33:05 2000 @@ -1,5 +1,5 @@ # file: Makefile G. Moody 5 September 1990 -# Last revised: 9 April 2000 Version 10.1.3 +# Last revised: 23 May 2000 Version 10.1.4 # UNIX 'make' description file for the WFDB software package # # ----------------------------------------------------------------------------- @@ -38,73 +38,172 @@ # within this directory). To install the package, type `make install'. To # create source archives, type `make tarballs'; or to make a binary archive, # type `make bin-tarball'. Making archives requires PGP, gzip, and GNU tar). - -# ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux'). -# This symbol is used only to generate a name for the binary archive; it -# does not affect how the software is compiled. -ARCH=`uname -m`-`uname -s` +# file: version.def G. Moody 24 May 2000 # Each release of the WFDB Software Package is identified by a three-part -# version number, defined in this section. See the top-level Makefile (in -# the parent of this directory) for details. +# version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 3 +RELEASE = 4 VERSION = $(MAJOR).$(MINOR).$(RELEASE) -VERDEFS= -# WFDBROOT specifies the common root of the directories where the installed -# files go. Reasonable choices are /usr, /usr/local, /opt, or $(HOME). If -# WFDBROOT is not /usr, you will probably need to specify -I and -L options -# when compiling your own WFDB applications. +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ + +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) -# WFDBDIRS specifies the directories where the installed files go. Within -# WFDBDIRS, these symbols are defined for use in nested Makefiles: -# INSTALL used as a synonym for WFDBDIRS in nested Makefiles -# BINDIR applications go here -# DBDIR calibration and samples of waveform data go here -# HELPDIR help files (mostly for WAVE) go here -# INCDIR library includes go in $(INCDIR)/wfdb -# LIBDIR library itself goes here -# MENUDIR default WAVE menu files go here -# PSPDIR PostScript prolog files go here -# RESDIR X11 resource files go here -WFDBDIRS = \ - INSTALL=$(WFDBROOT) \ - BINDIR=$(WFDBROOT)/bin \ - DBDIR=$(WFDBROOT)/database \ - HELPDIR=$(WFDBROOT)/help \ - INCDIR=$(WFDBROOT)/include \ - LIBDIR=$(WFDBROOT)/lib \ - MENUDIR=$(WFDBROOT)/lib \ - PSPDIR=$(WFDBROOT)/lib/ps \ - RESDIR=$(WFDBROOT)/lib/X11/app-defaults - -# 'make' or 'make install': compile and install the WFDB software package -install: config.cache install-slib - cd wave; $(MAKE) $(WFDBDIRS) - cd waverc; $(MAKE) $(WFDBDIRS) - cd app; $(MAKE) $(WFDBDIRS) - cd psd; $(MAKE) $(WFDBDIRS) - cd convert; $(MAKE) $(WFDBDIRS) - cd data; $(MAKE) $(WFDBDIRS) - -# 'make install-slib': compile and install the dynamically-linked WFDB library -# and include (*.h) files -install-slib: - cd lib; $(MAKE) $(WFDBDIRS) MAJOR=$(MAJOR) \ - MINOR=$(MINOR) RELEASE=$(RELEASE) slib - -# 'make all': compile the WFDB applications without installing them (requires -# installation of the dynamically-linked WFDB library and includes) -all: install-slib - cd wave; $(MAKE) $(WFDBDIRS) wave - cd waverc; $(MAKE) $(WFDBDIRS) all - cd app; $(MAKE) $(WFDBDIRS) all - cd psd; $(MAKE) $(WFDBDIRS) all - cd examples; $(MAKE) $(WFDBDIRS) compile - cd convert; $(MAKE) $(WFDBDIRS) all +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 24 May 2000 +# +# This section of the Makefile should not need to be changed. + +# ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux'). +# This symbol is used only to generate a name for the binary archive; it +# does not affect how the software is compiled. +ARCH=`uname -m`-`uname -s` + +# 'make' or 'make all': compile the WFDB applications without installing them +# (requires installation of the WFDB library and includes) +all: config.cache + cd lib; $(MAKE) install + cd wave; $(MAKE) all + cd waverc; $(MAKE) all + cd app; $(MAKE) all + cd psd; $(MAKE) all + cd examples; $(MAKE) all + cd convert; $(MAKE) all + +# 'make install': compile and install the WFDB software package +install: config.cache + cd lib; $(MAKE) install + cd wave; $(MAKE) install + cd waverc; $(MAKE) install + cd app; $(MAKE) install + cd psd; $(MAKE) install + cd convert; $(MAKE) install + cd data; $(MAKE) install + +uninstall: config.cache + cd lib; $(MAKE) uninstall + cd wave; $(MAKE) uninstall + cd waverc; $(MAKE) uninstall + cd app; $(MAKE) uninstall + cd psd; $(MAKE) uninstall + cd convert; $(MAKE) uninstall + cd data; $(MAKE) uninstall + ./uninstall $(WFDBROOT) # 'make clean': remove binaries, other cruft from source directories clean: @@ -114,42 +213,52 @@ cd doc; $(MAKE) clean cd examples; $(MAKE) clean cd fortran; $(MAKE) clean - cd lib; $(MAKE) -f makelib clean + cd lib; $(MAKE) clean cd psd; $(MAKE) clean - cd wave; $(MAKE) -f makewave clean + cd wave; $(MAKE) clean cd wave-doc; $(MAKE) clean cd waverc; $(MAKE) clean cd wview; $(MAKE) -f clean - rm -f *~ lib/Makefile wave/Makefile config.cache + rm -f *~ config.cache # 'make config.cache': check configuration config.cache: - sh ./configure - -# 'make slib-test': compile the dynamically-linked WFDB library without -# installing it -slib-test: - cd lib; $(MAKE) $(WFDBDIRS) slib-test + exec ./configure + @echo "(Ignore any error that may appear on the next line.)" + @false # force an immediate exit from `make' # 'make test' or 'make test-all': compile the WFDB applications without # installing them (installs the dynamically-linked WFDB library and includes # into subdirectories of $(HOME)/wfdb-test) -test test-all: - -mkdir $(HOME)/wfdb-test - -mkdir $(HOME)/wfdb-test/include - -mkdir $(HOME)/wfdb-test/lib +test test-all: $(HOME)/wfdb-test/include $(HOME)/wfdb-test/lib $(MAKE) WFDBROOT=$(HOME)/wfdb-test all # 'make test-install': compile and install the WFDB software package into # subdirectories of $(HOME)/wfdb-test -test-install: - -mkdir $(HOME)/wfdb-test - -mkdir $(HOME)/wfdb-test/bin - -mkdir $(HOME)/wfdb-test/database - -mkdir $(HOME)/wfdb-test/help - -mkdir $(HOME)/wfdb-test/include - -mkdir $(HOME)/wfdb-test/lib +test-install: $(TESTDIRS) $(MAKE) WFDBROOT=$(HOME)/wfdb-test install + +# Create directories for test installation if necessary. +TESTDIRS = $(HOME)/wfdb-test/bin $(HOME)/wfdb-test/database \ + $(HOME)/wfdb-test/help $(HOME)/wfdb-test/include $(HOME)/wfdb-test/lib + +$(HOME)/wfdb-test: + mkdir -p $(HOME)/wfdb-test; $(SETDPERMISSIONS) $(HOME)/wfdb-test +$(HOME)/wfdb-test/bin: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/bin; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/bin +$(HOME)/wfdb-test/database: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/database; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/database +$(HOME)/wfdb-test/help: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/help; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/help +$(HOME)/wfdb-test/include: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/include; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/include +$(HOME)/wfdb-test/lib: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/lib; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/lib # 'make tarballs': clean up the source directories, then make a pair of gzipped # tar source archives of the WFDB software package (with and without the diff -Naur wfdb-10.1.3/Makefile.top wfdb-10.1.4/Makefile.top --- wfdb-10.1.3/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/Makefile.top Tue May 23 22:03:07 2000 @@ -0,0 +1,40 @@ +# file: Makefile G. Moody 5 September 1990 +# Last revised: 23 May 2000 Version 10.1.4 +# UNIX 'make' description file for the WFDB software package +# +# ----------------------------------------------------------------------------- +# WFDB software for creating & using annotated waveform (time series) databases +# Copyright (C) 2000 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# In addition, you can redistribute and/or modify the WFDB library (contained +# within the 'lib' directory) under the terms of the GNU Library General +# Public License as published by the Free Software Foundation; either version +# 2 of the License, or (at your option) any later version. For details, see +# 'lib/COPYING.LIB'. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to compile, install, and +# create archives of the WFDB software package. Before using it +# for the first time, check that the site-specific variables below are +# appropriate for your system. To compile the package, just type `make' (from +# within this directory). To install the package, type `make install'. To +# create source archives, type `make tarballs'; or to make a binary archive, +# type `make bin-tarball'. Making archives requires PGP, gzip, and GNU tar). diff -Naur wfdb-10.1.3/Makefile.tpl wfdb-10.1.4/Makefile.tpl --- wfdb-10.1.3/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/Makefile.tpl Mon Jun 5 17:49:29 2000 @@ -0,0 +1,112 @@ +# file: Makefile.tpl G. Moody 24 May 2000 +# +# This section of the Makefile should not need to be changed. + +# ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux'). +# This symbol is used only to generate a name for the binary archive; it +# does not affect how the software is compiled. +ARCH=`uname -m`-`uname -s` + +# 'make' or 'make all': compile the WFDB applications without installing them +# (requires installation of the WFDB library and includes) +all: config.cache + cd lib; $(MAKE) install + cd wave; $(MAKE) all + cd waverc; $(MAKE) all + cd app; $(MAKE) all + cd psd; $(MAKE) all + cd examples; $(MAKE) all + cd convert; $(MAKE) all + +# 'make install': compile and install the WFDB software package +install: config.cache + cd lib; $(MAKE) install + cd wave; $(MAKE) install + cd waverc; $(MAKE) install + cd app; $(MAKE) install + cd psd; $(MAKE) install + cd convert; $(MAKE) install + cd data; $(MAKE) install + +uninstall: config.cache + cd lib; $(MAKE) uninstall + cd wave; $(MAKE) uninstall + cd waverc; $(MAKE) uninstall + cd app; $(MAKE) uninstall + cd psd; $(MAKE) uninstall + cd convert; $(MAKE) uninstall + cd data; $(MAKE) uninstall + ./uninstall $(WFDBROOT) + +# 'make clean': remove binaries, other cruft from source directories +clean: + cd app; $(MAKE) clean + cd convert; $(MAKE) clean + cd data; $(MAKE) clean + cd doc; $(MAKE) clean + cd examples; $(MAKE) clean + cd fortran; $(MAKE) clean + cd lib; $(MAKE) clean + cd psd; $(MAKE) clean + cd wave; $(MAKE) clean + cd wave-doc; $(MAKE) clean + cd waverc; $(MAKE) clean + cd wview; $(MAKE) -f clean + rm -f *~ config.cache + +# 'make config.cache': check configuration +config.cache: + exec ./configure + @echo "(Ignore any error that may appear on the next line.)" + @false # force an immediate exit from `make' + +# 'make test' or 'make test-all': compile the WFDB applications without +# installing them (installs the dynamically-linked WFDB library and includes +# into subdirectories of $(HOME)/wfdb-test) +test test-all: $(HOME)/wfdb-test/include $(HOME)/wfdb-test/lib + $(MAKE) WFDBROOT=$(HOME)/wfdb-test all + +# 'make test-install': compile and install the WFDB software package into +# subdirectories of $(HOME)/wfdb-test +test-install: $(TESTDIRS) + $(MAKE) WFDBROOT=$(HOME)/wfdb-test install + +# Create directories for test installation if necessary. +TESTDIRS = $(HOME)/wfdb-test/bin $(HOME)/wfdb-test/database \ + $(HOME)/wfdb-test/help $(HOME)/wfdb-test/include $(HOME)/wfdb-test/lib + +$(HOME)/wfdb-test: + mkdir -p $(HOME)/wfdb-test; $(SETDPERMISSIONS) $(HOME)/wfdb-test +$(HOME)/wfdb-test/bin: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/bin; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/bin +$(HOME)/wfdb-test/database: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/database; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/database +$(HOME)/wfdb-test/help: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/help; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/help +$(HOME)/wfdb-test/include: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/include; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/include +$(HOME)/wfdb-test/lib: $(HOME)/wfdb-test + mkdir -p $(HOME)/wfdb-test/lib; \ + $(SETDPERMISSIONS) $(HOME)/wfdb-test/lib + +# 'make tarballs': clean up the source directories, then make a pair of gzipped +# tar source archives of the WFDB software package (with and without the +# documentation), and generate PGP signature blocks for the archives +tarballs: clean + cd ..; tar --create --file wfdb-$(VERSION).tar.gz --verbose --gzip \ + '--exclude=wfdb-$(VERSION)/*CVS' wfdb-$(VERSION) + cd ..; tar --create --file wfdb-no-docs-$(VERSION).tar.gz \ + --verbose --gzip \ + '--exclude=wfdb-$(VERSION)/*doc' \ + '--exclude=wfdb-$(VERSION)/*CVS' wfdb-$(VERSION) + cd ..; pgps -b wfdb-$(VERSION).tar.gz wfdb-no-docs-$(VERSION).tar.gz + +# 'make bin-tarball': make a gzipped tar archive of the WFDB software package +# binaries and other installed files +bin-tarball: test-install + cd $(HOME)/wfdb-test; tar cfvz ../wfdb-$(VERSION)-$(ARCH).tar.gz . + cd ..; pgps -b wfdb-$(VERSION)-$(ARCH).tar.gz diff -Naur wfdb-10.1.3/README.NETFILES wfdb-10.1.4/README.NETFILES --- wfdb-10.1.3/README.NETFILES Sun Oct 17 17:05:44 1999 +++ wfdb-10.1.4/README.NETFILES Mon Jun 5 16:12:51 2000 @@ -1,36 +1,61 @@ file: README.NETFILES G. Moody 14 September 1999 + Last revised: 5 June 2000 This version of the WFDB software package contains experimental NETFILES -support in the WFDB library, which requires that you have previously -installed libwww (see http://www.w3.org/Library/); if not, you must change -the definitions of SCFLAGS and SBUILDLIB in lib/Makefile before compiling. +support in the WFDB library, which is compiled if you have previously +installed libwww (see http://www.w3.org/Library/). NETFILES support is known to work well under Linux (with both 2.0 and 2.2 -series kernels and glibc 2.0 and 2.1) provided that the library is compiled -as a shared (dynamically loadable) library. The library does not compile -properly as a static library under Linux if NETFILES is enabled (apparently -because of redefinitions in the libwww include files). - -To use NETFILES once this software has been compiled and installed, add to -the WFDB path one or more components that refer to remote files available -via http or ftp. All WFDB applications that read local files will then be -able to read remote files with no other changes. - -If you would like to experiment with NETFILES under Linux, compile and install -WAVE and wavescript (in the waverc directory); this is done by default if you -build the package by running 'make' in the top-level directory of the -source tree. Follow the instructions given in the 'WAVE and the Web' section -of the WAVE User's Guide (in 'wave-doc'; also available on PhysioNet at -http://www.physionet.org/physiotools/wug/) to install wavescript as a -helper application for your web browser. You should now be able to follow the -.xws links in the on-line version of the MIT-BIH Arrhythmia Database Directory +series kernels and glibc 2.0 and 2.1). When compiling the WFDB library as +a static library with NETFILES support, it is necessary to allow ld to make +three passes over the libwww libraries to resolve all dependencies; this is +handled automatically by the version of lib/Makefile that is generated by +`configure'. + +To use NETFILES once this software has been compiled and installed, the WFDB +path should contain one or more components that refer to remote files available +via http or ftp. If NETFILES support is included, the default WFDB path +(defined in lib/wfdblib.h) is + . http://www.physionet.org/physiobank/database +(i.e., the first component is the current (local) directory, and the second +component is the top-level PhysioBank database directory). If you use a +local PhysioBank mirror, you may wish to change www.physionet.org to the +hostname of your local mirror in lib/wfdblib.h before compiling the WFDB +library. You may always override this path by setting the WFDB environment +variable. + +Provided that a remote path component (one beginning with http:// or ftp://) +is included in the WFDB path, all WFDB applications that read local files will +then be able to read remote files with no other changes. Note that the default +setting allows access by WFDB applications to any of the PhysioBank records by +prefixing the additional path information to the record name, as in these +examples: + + rdsamp -r mitdb/100 -t .1 (MIT-BIH Arrhythmia Database, record 100) + rdann -r slpdb/slp67x -a st (MIT-BIH Polysomnographic Database, + record slp67x + wave -r mimicdb/237/237 -a al (MIMIC Database, record 237 -- note that + since each MIMIC record is kept in its + own subdirectory of mimicdb, two levels + of additional path information are + necessary) + +If you would like to experiment with NETFILES under Linux, install the libwww +and xview packages (available from PhysioNet), then compile and install WAVE +and wavescript (in the waverc directory). This is done by default if you build +the package using './configure' followed by 'make' in the top-level directory +of the source tree. Follow the instructions given in the 'WAVE and the Web' +section of the WAVE User's Guide (in 'wave-doc'; also available on PhysioNet at +http://www.physionet.org/physiotools/wug/) to install wavescript as a helper +application for your web browser. You should now be able to follow the .xws +links in the on-line version of the MIT-BIH Arrhythmia Database Directory (http://www.physionet.org/physiobank/database/html/mitdbdir/mitdbdir.htm) and in the HTML files included in the MIMIC Database records available on PhysioNet. (Once you have installed the software and configured your browser, -following these links causes your browser to display the specified signals -and annotations in a WAVE window; you do not need to set the WFDB path in -any special way in this case, since wavescript will do this automatically -based on information it receives from your browser.) +following these links causes your browser to display the specified signals and +annotations in a WAVE window; you do not need to set the WFDB path in any +special way in this case, since wavescript will do this automatically based on +information it receives from your browser.) NETFILES support was originally implemented by Michael Dakin as part of his summer UROP project at MIT. Thanks, Mike! diff -Naur wfdb-10.1.3/app/12lead.pro wfdb-10.1.4/app/12lead.pro --- wfdb-10.1.3/app/12lead.pro Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/app/12lead.pro Sat May 20 22:10:48 2000 @@ -0,0 +1,178 @@ +% file: 12lead.pro G. Moody 20 May 2000 + +% ----------------------------------------------------------------------------- +% prolog for pschart output of 12-lead ECGs (based on pschart.pro) +% Copyright (C) 2000 George B. Moody + +% This program is free software; you can redistribute it and/or modify it under +% the terms of the GNU General Public License as published by the Free Software +% Foundation; either version 2 of the License, or (at your option) any later +% version. + +% This program is distributed in the hope that it will be useful, but WITHOUT +% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +% more details. + +% You should have received a copy of the GNU General Public License along with +% this program; if not, write to the Free Software Foundation, Inc., 59 Temple +% Place - Suite 330, Boston, MA 02111-1307, USA. + +% You may contact the author by e-mail (george@mit.edu) or postal mail +% (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +% please visit PhysioNet (http://www.physionet.org/). +% _____________________________________________________________________________ + +% Note: lines beginning with `%' and empty lines in this file are stripped by +% `pschart' before printing. Four lines immediately below begin with spaces +% and are not stripped. + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % If this message appears in your printout, you may be using a buggy version % + % of Adobe TranScript. Try using pschart with the -u option as a workaround. % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +save 100 dict begin /pschart exch def + +% printer resolution (dots per inch; reset by newpage, see below) +/dpi 300 def + +% basic line width (may be reset by newpage) +/lw 0 def + +% line width in mm for signals, grid lines, marker bars +/lwmm 0 def + +% TM for text +/tm matrix currentmatrix def + +% TM for graphics +/gm matrix currentmatrix def + +% x mm: convert x (in mm) to Postscript points (assuming default scales) +/mm {72 mul 25.4 div}def + +% n I: use italic font, n points +/I {/Times-Italic findfont exch scalefont setfont}def + +% n R: use roman font, n points +/R {/Times-Roman findfont exch scalefont setfont}def + +% n C: use courier (monospaced) font, n points +/C {/Courier findfont exch scalefont setfont}def + +% x0 y0 x1 y1 xtick ytick grid: print a grid with the lower corner at (x0, y0), +% the upper corner at (x1, y1), and ticks at intervals of xtick and ytick (in +% mm); the units of x0, y0, x1, and y1 are printer coordinates. +% This function is the only one from pschart.pro that is modified. This +% version prints a 1 mv (10 yticks) x 200 ms (5 xticks) "calibration pulse" at +% the beginning of each trace, and also prints marker bars at the times when +% the signals change. +/grid { newpath 0 setlinecap + /dy1 exch dpi 25.4 div mul lw sub def /dy2 dy1 lw add 5 mul def + /dx1 exch dpi 25.4 div mul lw sub def /dx2 dx1 lw add 5 mul def + /y1 exch def /x1 exch def /y0 exch def /x0 exch def +% dpi 100 idiv setlinewidth x0 y0 moveto x1 y0 lineto x1 y1 lineto x0 y1 lineto +% closepath stroke lw setlinewidth [lw dx1] 0 setdash +% y0 dy2 add dy2 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for +% [lw dy1] 0 setdash +% x0 dx2 add dx2 x1 {newpath dup y0 moveto y1 lineto stroke }for +% [] 0 setdash + /dx3 dx1 5 mul def /dx4 dx2 12.5 mul def + /dy3 y1 y0 sub 8 div def /dy4 dy1 10 mul def + /x2 x0 dx3 sub def /x3 x2 dx1 sub def /x4 x0 dx4 add def + /y2 y0 dy3 add def /y3 y2 dy4 add def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + stroke + /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def + stroke + /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def + stroke + /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto + stroke +}bind def + +% pn x y prpn: print page number, pn, centered on (x, y) (in mm). +/prpn { mm exch mm exch moveto 10 R /pn exch def /str 10 string def + pn str cvs stringwidth exch -.5 mul exch rmoveto + (- ) stringwidth exch neg exch rmoveto + (- ) show +% `str show' should be sufficient, but LaserWriters print extra spaces at end + pn str cvs show + ( -) show } def + +% str x y prco: print copyright message, str, beginning at (x, y) (in mm). +/prco { mm exch mm exch moveto + 6 R (Copyright ) show + /Symbol findfont 6 scalefont setfont (\323) show + 6 R show } def + +% dpi newpage: start page, resolution dpi dots per inch +/newpage {/dpi exch def tm setmatrix newpath [] 0 setdash + 1 setlinecap /lw lwmm mm def mark } def + +% ss: set scales for plotting +/ss {72 dpi div dup scale /gm matrix currentmatrix def lw setlinewidth} def + +% str t: print str starting at current position (label(str)) +/t {tm setmatrix show gm setmatrix}def + +% str b: print str ending at current position (rlabel(str)) +/b {tm setmatrix dup stringwidth exch neg exch rmoveto currentpoint 3 -1 roll + show moveto gm setmatrix}def + +% x y m: set current position to (x,y) (move(x,y)) +/m {newpath moveto}def + +% x y N: draw line segment from current position to (x,y), set current position +% to (x,y) (cont(x,y)) +/N {rlineto currentpoint stroke moveto}bind def + +% str z: decode str and draw connected line segments (see cont() in pschart.c) +/z {{counttomark 2 ge{79 sub rlineto}{126 exch sub}ifelse}forall + currentpoint stroke moveto}bind def + +% default ordinate for annotation plotting +/ay 0 def + +% y Ay: set ay +/Ay {/ay exch def}def + +% ordinates for marker bars +/ya 0 def +/yb 0 def +/yc 0 def +/yd 0 def +/ye 0 def + +% ya yb yc yd sb: set ordinates for marker bars +/sb {/yd exch def /yc exch def /yb exch def /ya exch def + /ye dpi 50.8 div lw sub def}def + +% ya yb Sb: set ordinates for short marker bars +/Sb {/yb exch def /ya exch def /yc yb def /yd yb def + /ye dpi 50.8 div lw sub def}def + +% x mb: draw marker bars at x +/mb { dup ya newpath moveto dup yb lineto dup yc moveto yd lineto +[lw ye] 0 setdash stroke [] 0 setdash}bind def + +% str x a: plot str at (x, ay), with marker bars if defined +/a {ya yb ne {dup mb}if ay m t}bind def + +% x A: plot a bullet (normal QRS annotation) at (x, ay) +/A {ya yb ne {dup mb}if ay m (\267) t}bind def + +/endpschart {cleartomark showpage pschart end restore}def diff -Naur wfdb-10.1.3/app/Makefile wfdb-10.1.4/app/Makefile --- wfdb-10.1.3/app/Makefile Fri Mar 3 13:24:23 2000 +++ wfdb-10.1.4/app/Makefile Mon Jun 5 23:33:05 2000 @@ -1,5 +1,5 @@ # file: Makefile G. Moody 9 June 1983 -# Last revised: 3 March 2000 +# Last revised: 23 May 2000 # UNIX 'make' description file for WFDB applications # # ----------------------------------------------------------------------------- @@ -31,71 +31,117 @@ # appropriate for your system. To build and install the applications, just # type `make' (from within this directory). To print a set of source listings, # type `make listing'. +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 -# Site-specific variables -# ----------------------- - -# CC is the name of your C compiler. These applications can be compiled with -# K&R C compilers (`cc' on most if not all UNIX systems) as well as with ANSI -# C compilers such as GNU C (`gcc'). To use the K&R C compiler available on -# most UNIX systems, uncomment the next line. -CC = cc -# For `gcc', uncomment the next line (and see CFLAGS below). -# CC = gcc - -# INCDIR is the parent of the directory that contains the WFDB include (*.h) -# files. (These files should have been installed in $(INCDIR)/wfdb; see -# ../lib/Makefile.) -INCDIR = /usr/include - -# If you trust your C compiler's optimizer, you may wish to add -O to CFLAGS; -# for debugging, add -g to CFLAGS. (If you use `gcc', you may use both; most -# other C compilers do not permit you to do so.) Add -DNOMALLOC_H if you have -# neither `stdlib.h' nor `malloc.h' (see ../lib/wfdblib.h). Add -DNOSTRSTR if -# you don't have the ANSI C `strstr' function (check your system's `string.h' -# or `strings.h' file, normally in /usr/include; see `pschart.c' and `psfd.c'). -CFLAGS = -O -I$(INCDIR) +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ -# LIBDIR is the directory that contains the WFDB library (see ../lib/Makefile). -LIBDIR = /usr/lib - -# LDFLAGS is appended to the C compiler command line to specify loading the -# WFDB library. Unless you have changed the value of WFDBLIB in the `Makefile' -# for the WFDB library, `-lwfdb' should be correct. -LDFLAGS = -L$(LIBDIR) -lwfdb +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` # BINDIR specifies the directory in which the applications will be installed; # it should be a directory in the PATH of those who will use the applications. -# You will need to have write permission in BINDIR. Users of this software -# will need to have search (execute) permission in BINDIR. -BINDIR = /usr/local/bin +BINDIR = $(WFDBROOT)/bin # DBDIR specifies the name of a directory in which to install the contents # of the `data' directory. -DBDIR = $(INSTALL)/database +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) -# PSPDIR specifies the directory in which PostScript prolog files are kept. -# (You may use any directory for this purpose; if you have other PostScript -# applications, you may wish to keep all of your prolog files in the same -# directory, often /usr/local/lib/ps). You will need to have write permission -# in PSPDIR. Users of this software will need to have search (execute) -# permission in PSPDIR. -PSPDIR = /usr/local/lib/ps +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) # PRINT is the name of the program used to produce listings (including any # options for the desired formatting). PRINT = lpr -# SETXPERMISSIONS is the command needed to make the installed files accessible -# to those who will use them. The value given below makes them readable and -# executable by everyone, and writeable by the owner only. (If you perform the -# installation as `root', `root' is the owner of the installed files.) -SETXPERMISSIONS = chmod 755 - -# SETPERMISSIONS is similarly used to make installed data files accessible. -# These files should not be marked as executable. +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) SETPERMISSIONS = chmod 644 +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + # STRIP is the command used to compact the compiled binaries by removing their # symbol tables. STRIP = strip @@ -103,21 +149,32 @@ # uncomment the next line. # STRIP = : -# It should not be necessary to modify anything below this line. -# ----------------------------------------------------------------------------- +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all -CFILES = bxb.c calibrate.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 23 May 2000 +# +# This section of the Makefile should not need to be changed. + +CFILES = bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ mxm.c nst.c plotstm.c pschart.c psfd.c rdann.c rdsamp.c rxr.c sampfreq.c \ sample.c sigamp.c skewedit.c snip.c sortann.c sqrs.c sqrs125.c sumann.c \ sumstats.c tach.c view.c vsetup.c wfdbcat.c wfdbcollate.c wfdbdesc.c \ wfdbwhich.c wrann.c wrsamp.c wvscript.c xform.c -XFILES = bxb calibrate ecgeval epic fir ihr mfilt mrgann \ +XFILES = bxb calsig ecgeval epic fir ihr mfilt mrgann \ mxm nst plotstm pschart psfd rdann rdsamp rxr sampfreq \ sigamp skewedit snip sortann sqrs sqrs125 sumann \ sumstats tach wfdbcat wfdbcollate wfdbdesc \ wfdbwhich wrann wrsamp xform SCRIPTS = cshsetwfdb setwfdb -PSFILES = pschart.pro psfd.pro +PSFILES = pschart.pro psfd.pro 12lead.pro OTHERFILES = cshsetwfdb setwfdb setwfdb.bat sample8.hea MFILES = Makefile Makefile-dos-gcc makefile.dos @@ -127,6 +184,10 @@ .c: $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) +# `make all': build applications +all: $(XFILES) + $(STRIP) $(XFILES) + # `make' or `make install': build and install applications, clean up install: all $(BINDIR) $(PSPDIR) scripts cp $(XFILES) $(BINDIR) @@ -135,21 +196,22 @@ cd $(PSPDIR); $(SETPERMISSIONS) $(PSFILES) $(MAKE) clean -# `make all': build applications -all: $(XFILES) - $(STRIP) $(XFILES) - # `make scripts': install customized scripts for setting WFDB path scripts: sed s+/usr/local/database+$(DBDIR)+g $(BINDIR)/setwfdb sed s+/usr/local/database+$(DBDIR)+g $(BINDIR)/cshsetwfdb $(SETPERMISSIONS) $(SCRIPTS) -$(BINDIR): - mkdir -p $(BINDIR) +uninstall: + ../uninstall $(PSPDIR) $(PSFILES) + ../uninstall $(BINDIR) $(XFILES) $(SCRIPTS) + ../uninstall $(LIBDIR) +# Create directories for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) $(PSPDIR): - mkdir -p $(PSPDIR) + mkdir -p $(PSPDIR); $(SETDPERMISSIONS) $(PSPDIR) # `make clean': remove intermediate and backup files clean: @@ -176,5 +238,3 @@ $(CC) $(CFLAGS) -DPROLOG=\"$(PSPDIR)/psfd.pro\" psfd.c -o $@ $(LDFLAGS) sigamp: sigamp.c $(CC) $(CFLAGS) sigamp.c -o $@ $(LDFLAGS) -lm -wfdbcat: wfdbcat.c - $(CC) $(CFLAGS) -DNETFILES wfdbcat.c -o $@ $(LDFLAGS) diff -Naur wfdb-10.1.3/app/Makefile-dos-gcc wfdb-10.1.4/app/Makefile-dos-gcc --- wfdb-10.1.3/app/Makefile-dos-gcc Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.4/app/Makefile-dos-gcc Wed May 24 22:35:27 2000 @@ -1,10 +1,10 @@ # file: Makefile-dos-gcc G. Moody 23 April 1997 -# Last revised: 29 April 1999 +# Last revised: 24 May 2000 # GCC-DOS 'make' description file for WFDB applications # # ----------------------------------------------------------------------------- # WFDB applications: programs for working with annotated signals -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # These programs are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the @@ -91,12 +91,12 @@ # It should not be necessary to modify anything below this line. # ----------------------------------------------------------------------------- -CFILES = bxb.c calibrate.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ +CFILES = bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ mxm.c nst.c plotstm.c pschart.c psfd.c rdann.c rdsamp.c rxr.c sample.c \ sigamp.c skewedit.c snip.c sortann.c sqrs.c sqrs125.c sumann.c sumstats.c \ tach.c view.c vsetup.c wfdbcollate.c wfdbdesc.c wfdbwhich.c wrann.c wrsamp.c \ xform.c -XFILES = bxb.exe calibr8.exe ecgeval.exe epic.exe fir.exe ihr.exe mfilt.exe \ +XFILES = bxb.exe calsig.exe ecgeval.exe epic.exe fir.exe ihr.exe mfilt.exe \ mrgann.exe mxm.exe nst.exe plotstm.exe pschart.exe psfd.exe rdann.exe \ rdsamp.exe rxr.exe sigamp.exe skewedit.exe snip.exe sortann.exe sqrs.exe \ sqrs125.exe sumann.exe sumstats.exe tach.exe wfdbcol8.exe wfdbdesc.exe \ @@ -126,8 +126,8 @@ bxb.exe: bxb.c $(CC) $(CFLAGS) bxb.c -o $@ $(LDFLAGS) -lm -calibr8.exe: calibrate.c - $(CC) $(CFLAGS) calibrate.c -o $@ $(LDFLAGS) +calsig.exe: calsig.c + $(CC) $(CFLAGS) calsig.c -o $@ $(LDFLAGS) wfdbcol8.exe: wfdbcollate.c $(CC) $(CFLAGS) wfdbcollate.c -o $@ $(LDFLAGS) wfdbwhic.exe: wfdbwhich.c diff -Naur wfdb-10.1.3/app/Makefile.dos wfdb-10.1.4/app/Makefile.dos --- wfdb-10.1.3/app/Makefile.dos Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.4/app/Makefile.dos Wed May 24 22:35:27 2000 @@ -1,10 +1,10 @@ # file: Makefile.dos G. Moody 2 November 1989 -# Last revised: 30 April 1999 +# Last revised: 24 May 2000 # MSDOS `make' description file template for WFDB applications # # ----------------------------------------------------------------------------- # WFDB applications: programs for working with annotated signals -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # These programs are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the @@ -94,7 +94,7 @@ # anything below this line. # ----------------------------------------------------------------------------- -XFILES = bxb.exe calibr8.exe ecgeval.exe epic.exe fir.exe ihr.exe mfilt.exe \ +XFILES = bxb.exe calsig.exe ecgeval.exe epic.exe fir.exe ihr.exe mfilt.exe \ mrgann.exe mxm.exe nst.exe plotstm.exe pschart.exe psfd.exe rdann.exe \ rdsamp.exe rxr.exe sampfreq.exe sigamp.exe skewedit.exe snip.exe sortann.exe \ sqrs.exe sqrs125.exe sumann.exe sumstats.exe tach.exe wfdbcol8.exe \ @@ -114,7 +114,7 @@ bxb.exe: bxb.c $(CC) $(CFLAGS) $(ML) $*.c $(LWFDBL) -calibr8.exe: calibr8.c +calsig.exe: calsig.c $(CC) $(CFLAGS) $(ML) $*.c $(LWFDBL) epic.exe: epic.c diff -Naur wfdb-10.1.3/app/Makefile.top wfdb-10.1.4/app/Makefile.top --- wfdb-10.1.3/app/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/app/Makefile.top Wed May 24 22:35:27 2000 @@ -0,0 +1,34 @@ +# file: Makefile G. Moody 9 June 1983 +# Last revised: 23 May 2000 +# UNIX 'make' description file for WFDB applications +# +# ----------------------------------------------------------------------------- +# WFDB applications: programs for working with annotated signals +# Copyright (C) 2000 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install the standard +# applications that come with the WFDB software package. Before using it +# for the first time, check that the site-specific variables below are +# appropriate for your system. To build and install the applications, just +# type `make' (from within this directory). To print a set of source listings, +# type `make listing'. +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/app/Makefile.tpl wfdb-10.1.4/app/Makefile.tpl --- wfdb-10.1.3/app/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/app/Makefile.tpl Mon Jun 5 17:58:36 2000 @@ -0,0 +1,79 @@ +# file: Makefile.tpl G. Moody 23 May 2000 +# +# This section of the Makefile should not need to be changed. + +CFILES = bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ + mxm.c nst.c plotstm.c pschart.c psfd.c rdann.c rdsamp.c rxr.c sampfreq.c \ + sample.c sigamp.c skewedit.c snip.c sortann.c sqrs.c sqrs125.c sumann.c \ + sumstats.c tach.c view.c vsetup.c wfdbcat.c wfdbcollate.c wfdbdesc.c \ + wfdbwhich.c wrann.c wrsamp.c wvscript.c xform.c +XFILES = bxb calsig ecgeval epic fir ihr mfilt mrgann \ + mxm nst plotstm pschart psfd rdann rdsamp rxr sampfreq \ + sigamp skewedit snip sortann sqrs sqrs125 sumann \ + sumstats tach wfdbcat wfdbcollate wfdbdesc \ + wfdbwhich wrann wrsamp xform +SCRIPTS = cshsetwfdb setwfdb +PSFILES = pschart.pro psfd.pro 12lead.pro +OTHERFILES = cshsetwfdb setwfdb setwfdb.bat sample8.hea +MFILES = Makefile Makefile-dos-gcc makefile.dos + +# General rule for compiling C sources into executable files. This is +# redundant for most versions of `make', but at least one System V version +# needs it. +.c: + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + +# `make all': build applications +all: $(XFILES) + $(STRIP) $(XFILES) + +# `make' or `make install': build and install applications, clean up +install: all $(BINDIR) $(PSPDIR) scripts + cp $(XFILES) $(BINDIR) + cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) + cp $(PSFILES) $(PSPDIR) + cd $(PSPDIR); $(SETPERMISSIONS) $(PSFILES) + $(MAKE) clean + +# `make scripts': install customized scripts for setting WFDB path +scripts: + sed s+/usr/local/database+$(DBDIR)+g $(BINDIR)/setwfdb + sed s+/usr/local/database+$(DBDIR)+g $(BINDIR)/cshsetwfdb + $(SETPERMISSIONS) $(SCRIPTS) + +uninstall: + ../uninstall $(PSPDIR) $(PSFILES) + ../uninstall $(BINDIR) $(XFILES) $(SCRIPTS) + ../uninstall $(LIBDIR) + +# Create directories for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) +$(PSPDIR): + mkdir -p $(PSPDIR); $(SETDPERMISSIONS) $(PSPDIR) + +# `make clean': remove intermediate and backup files +clean: + rm -f $(XFILES) *.o *~ + +# `make listing': print a listing of WFDB applications sources +listing: + $(PRINT) README $(MFILES) $(CFILES) $(PSFILES) $(OTHERFILES) + +# Rules for compiling applications that require non-standard options + +bxb: bxb.c + $(CC) $(CFLAGS) bxb.c -o $@ $(LDFLAGS) -lm +mxm: mxm.c + $(CC) $(CFLAGS) mxm.c -o $@ $(LDFLAGS) -lm +nst: nst.c + $(CC) $(CFLAGS) nst.c -o $@ $(LDFLAGS) -lm +plotstm: plotstm.c + $(CC) $(CFLAGS) plotstm.c -o $@ +pschart: pschart.c + $(CC) $(CFLAGS) -DPROLOG=\"$(PSPDIR)/pschart.pro\" pschart.c -o $@ \ + $(LDFLAGS) +psfd: psfd.c + $(CC) $(CFLAGS) -DPROLOG=\"$(PSPDIR)/psfd.pro\" psfd.c -o $@ $(LDFLAGS) +sigamp: sigamp.c + $(CC) $(CFLAGS) sigamp.c -o $@ $(LDFLAGS) -lm diff -Naur wfdb-10.1.3/app/README wfdb-10.1.4/app/README --- wfdb-10.1.3/app/README Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.4/app/README Wed May 24 16:23:32 2000 @@ -1,9 +1,9 @@ file: README G. Moody 1 June 1989 - Last revised: 30 April 1999 + Last revised: 24 May 2000 ------------------------------------------------------------------------------- WFDB applications: programs for working with annotated signals -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody These programs are free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the @@ -56,7 +56,7 @@ using Microsoft `make' or `nmake', Borland `make', etc. README this file bxb.c AAMI-standard beat-by-beat annotation comparator -calibrate.c Calibrates signals of a database record +calsig.c Calibrates signals of a database record cshsetwfdb Template for C-shell WFDB path initialization script ecgeval.c Generates and runs ECG analyzer evaluation script epic.c AAMI-standard episode-by-episode annotation comparator diff -Naur wfdb-10.1.3/app/calibrate.c wfdb-10.1.4/app/calibrate.c --- wfdb-10.1.3/app/calibrate.c Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.4/app/calibrate.c Wed Dec 31 19:00:00 1969 @@ -1,653 +0,0 @@ -/* file: calibrate.c G. Moody 4 March 1991 - Last revised: 7 September 1999 - -------------------------------------------------------------------------------- -calibrate: measure gains and baselines in a DB record and rewrite header -Copyright (C) 1999 George B. Moody - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA. - -You may contact the author by e-mail (george@mit.edu) or postal mail -(MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, -please visit PhysioNet (http://www.physionet.org/). -_______________________________________________________________________________ - -`calibrate' rewrites the header file for a WFDB record, setting the gain and -baseline fields based on measurements it makes. Normally, the program is -used by specifying a time interval for the measurements; best results will -be achieved if the specified interval is restricted to one or more square-wave -calibration pulses in each signal to be calibrated, although sine-wave pulses -may be usable if the sampling frequency and/or ADC resolution is high enough. -The baseline field is set only for signals that have been identified as -DC-coupled. `calibrate' also sets the units field for any signal it -calibrates (if the units field is not already set in the header file). - -By default, the program constructs a smoothed amplitude histogram for each -signal and identifies its two principal modes. Initially, each bin of the -histogram counts the number of samples in the analysis interval for which the -amplitude has a specified value. The histogram is smoothed by applying a -low-pass filter which replaces the contents of each bin by a weighted sum of -several bins centered on the bin of interest. The two principal modes in the -smoothed histogram must be separated by at least one bin with a count which is -less than one-eighth the count of the larger mode. If this criterion is not -satisfied for a given signal, `calibrate' warns the user and does not adjust -the gain or baseline for the affected signal. - -`calibrate' has two less rigorous techniques it can use if the algorithm above -fails. Using the `-q' option, `calibrate' takes the endpoints of the specified -interval as representative of the high and low values of the calibration -pulse. Using the `-Q' option, `calibrate' searches the interval for the -maximum and minimum amplitudes and takes these as the high and low values of -the calibration pulse. These algorithms, particularly the `-Q' algorithm, are -highly sensitive to noise and are thus not recommended except in cases in which -the default algorithm fails; note, however, that such cases are precisely -those in which noise is likely to be a problem for the alternate algorithms. -*/ - -#include -#ifdef __STDC__ -# include -#else -extern void exit(); -# ifndef NOMALLOC_H -# include -# else -extern char *malloc(); -# endif -#endif -#ifndef BSD -#include -#else -#include -#endif -#include - -#define UNITSLEN 20 - -int nsig; -static char units[WFDB_MAXSIG][UNITSLEN+1]; -static double high[WFDB_MAXSIG], low[WFDB_MAXSIG]; -static int do_cal[WFDB_MAXSIG]; -static int dc[WFDB_MAXSIG]; /* dc[i] is 1 if signal i is DC-coupled */ -static struct info_rec { - struct info_rec *next; - char *info_string; -} *first_rec, *current_rec, *last_rec; -char *pname, *prog_name(); -void rewrite_header(), help(); -static WFDB_Siginfo s[WFDB_MAXSIG]; -static WFDB_Sample b[WFDB_MAXSIG]; -static WFDB_Gain g[WFDB_MAXSIG]; - -main(argc, argv) -int argc; -char *argv[]; -{ - char *cfname=NULL, *p, *record = NULL, *t0p = NULL, *t1p = NULL, *getenv(); - int do_skip = 1, *h[WFDB_MAXSIG], *ho[WFDB_MAXSIG], i, multi_seg = 0, - n = 0, o[WFDB_MAXSIG], qflag = 0, Qflag = 0, v[WFDB_MAXSIG], vflag = 0, - vmax[WFDB_MAXSIG], vmin[WFDB_MAXSIG]; - long nsamp, t, t0 = 0L, t1; - - /* Read and interpret command-line arguments. */ - pname = prog_name(argv[0]); - for (i = 1; i < argc; i++) { - if (*argv[i] == '-') switch (*(argv[i]+1)) { - case 'c': - if (++i >= argc) { - (void)fprintf(stderr, "%s: file name must follow -c\n", pname); - exit(1); - } - cfname = argv[i]; - break; - case 'f': - if (++i >= argc) { - (void)fprintf(stderr, "%s: starting time must follow -f\n", - pname); - exit(1); - } - t0p = argv[i]; - break; - case 'h': /* print usage summary and quit */ - help(); - exit(0); - break; - case 'q': /* use the quick and dirty method */ - qflag = 1; - break; - case 'Q': /* use the alternate quick and dirty method */ - Qflag = 1; - break; - case 'r': - if (++i >= argc) { - (void)fprintf(stderr, "%s: record name must follow -r\n", - pname); - exit(1); - } - record = argv[i]; - break; - case 's': - while (++i < argc && *argv[i] != '-') { - int sig; - - sig = atoi(argv[i]); - if (0 <= sig && sig < WFDB_MAXSIG) { - do_cal[sig] = 1; - n++; - } - } - --i; - if (n < 1) { - (void)fprintf(stderr, - "%s: one or more signal numbers must follow -s\n", - pname); - exit(1); - } - break; - case 't': - if (++i >= argc) { - (void)fprintf(stderr, "%s: ending time must follow -t\n", - pname); - exit(1); - } - t1p = argv[i]; - break; - case 'v': - vflag = 1; - break; - default: - (void)fprintf(stderr, "%s: unrecognized option %s\n", pname, - argv[i]); - exit(1); - } - else { - (void)fprintf(stderr, "%s: unrecognized argument %s\n", pname, - argv[i]); - exit(1); - } - } - - /* Check that a record name was provided. */ - if (record == NULL) { - help(); - exit(1); - } - - /* Open the record. */ - if ((nsig = isigopen(record, s, WFDB_MAXSIG)) < 1) exit(2); - if (strtim("e") != s[0].nsamp) multi_seg = 1; - - /* If a signal list was provided, validate it; otherwise, generate one. */ - if (n > 0) { - for (i = nsig; i < WFDB_MAXSIG; i++) - if (do_cal[i]) { do_cal[i] = 0; n--; } - } - else { - for (i = 0; i < nsig; i++) - do_cal[i] = 1; - n = nsig; - } - if (n < 1) { - (void)fprintf(stderr, "%s: no signals to be calibrated\n", pname); - exit(2); - } - - /* Find the interval to be read. */ - if (t0p) { - t0 = strtim(t0p); - if (t0 < 0L) t0 = -t0; - } - if (t1p) { - t1 = strtim(t1p); - if (t1 < 0L) t1 = -t1; - if (t1 <= t0) { - (void)fprintf(stderr, "%s: improper interval specified\n", pname); - exit(1); - } - nsamp = t1 - t0; - } - else - nsamp = strtim("1"); - - /* Check if any of the signals to be calibrated is stored in difference - format. If so, avoid using isigsettime(). */ - for (i = 0; i < nsig; i++) { - if (do_cal[i] && (s[i].fmt == 8)) { - do_skip = 0; break; - } - } - - /* Go to the first sample to be used for measurement. */ - if (do_skip) { - if (isigsettime(t0) < 0) exit(2); - } - else { - for (t = 0L; t < t0; t++) - if (getvec(v) < nsig) exit(2); - } - - /* Get calibration specifications, interactively if necessary. */ - if (cfname == NULL) cfname = getenv("WFDBCAL"); - if (cfname) (void)calopen(cfname); - for (i = 0; i < nsig; i++) { - WFDB_Calinfo ci; - - if (do_cal[i]) { - char buf[21]; - - *units[i] = '\0'; - low[i] = high[i] = 0; - dc[i] = -1; - - /* Get a calibration record from the list if possible. */ - if (getcal(s[i].desc, (char *)NULL, &ci) == 0) { - if (!vflag) { - low[i] = ci.low; - high[i] = ci.high; - } - dc[i] = ci.caltype & WFDB_DC_COUPLED; - (void)strncpy(units[i], ci.units, UNITSLEN); - } - - /* If necessary, get the physical units. */ - if (*units[i] == '\0') { - do { - (void)fprintf(stderr, - "Signal %d units (up to %d characters): ", - i, UNITSLEN); - (void)fgets(units[i], UNITSLEN, stdin); - } while (*units[i] == '\n'); - units[i][strlen(units[i])-1] = '\0'; /* strip off \n */ - } - - /* Make sure that the units string contains no whitespace. */ - for (p = units[i]; *p; p++) - if (*p == ' ' || *p == '\t') *p = '_'; - - /* Determine if signal is DC- or AC-coupled. */ - while (dc[i] == -1) { - (void)fprintf(stderr, "Is signal %d DC-coupled? (y/n): ", i); - (void)fgets(buf, 20, stdin); - if (*buf == 'y' || *buf == 'Y' || *buf == '\n') - dc[i] = 1; - else if (*buf == 'n' || *buf == 'N') - dc[i] = 0; - } - - /* If necessary, get the calibration pulse specifications. */ - while (low[i] == high[i]) { - if (dc[i] == 1) { - (void)fprintf(stderr, - "Signal %d calibration pulse limits\n", i); - (void)fprintf(stderr, " Low value (in %s): ", units[i]); - (void)fgets(buf, 20, stdin); - (void)sscanf(buf, "%lf", &low[i]); - (void)fprintf(stderr, " High value (in %s): ", units[i]); - (void)fgets(buf, 20, stdin); - (void)sscanf(buf, "%lf", &high[i]); - if (low[i] == high[i]) - (void)fprintf(stderr, - "Low and high values must be unequal!\n"); - } - else { - low[i] = 0.0; - (void)fprintf(stderr, "Signal %d calibration pulse\n", i); - (void)fprintf(stderr, " Amplitude (in %s): ", units[i]); - (void)fgets(buf, 20, stdin); - (void)sscanf(buf, "%lf", &high[i]); - if (low[i] == high[i]) - (void)fprintf(stderr, - "Pulse must have a non-zero amplitude!\n"); - } - } - } - } - - /* Use the quick-and-dirty method if requested. This method takes the - endpoints as representing the high and low values of the calibration - pulse. */ - if (qflag) { - int vhigh[WFDB_MAXSIG], vlow[WFDB_MAXSIG], vtemp; - - if (getvec(vlow) < nsig) exit(2); - if (do_skip) { - if (isigsettime(t1) < 0) exit(2); - } - else - while (++t <= t1) - if (getvec(v) < nsig) exit(2); - if (getvec(vhigh) < nsig) exit(2); - for (i = 0; i < nsig; i++) - if (do_cal[i]) { - if (vlow[i] > vhigh[i]) { - vtemp = vlow[i]; - vlow[i] = vhigh[i]; - vhigh[i] = vtemp; - } - g[i] = ((double)vhigh[i] - vlow[i])/(high[i] - low[i]); - if (dc[i]) - b[i] = vhigh[i] - (high[i] * g[i]); - } - } - - /* Use the alternate quick-and-dirty method if requested. This method - takes the maximum and minimum sample values as representing the high - and low values of the calibration pulse. */ - else if (Qflag) { - int vhigh[WFDB_MAXSIG], vlow[WFDB_MAXSIG]; - - if (getvec(vlow) < nsig) exit(2); - for (i = 0; i < nsig; i++) - vhigh[i] = vlow[i]; - for (t = t0+1; t < t1; t++) { - if (getvec(v) < nsig) exit(2); - for (i = 0; i < nsig; i++) { - if (v[i] > vhigh[i]) vhigh[i] = v[i]; - else if (v[i] < vlow[i]) vlow[i] = v[i]; - } - } - for (i = 0; i < nsig; i++) - if (do_cal[i]) { - g[i] = ((double)vhigh[i] - vlow[i])/(high[i] - low[i]); - if (dc[i]) - b[i] = vhigh[i] - (high[i] * g[i]); - } - } - - /* Otherwise, use the standard method. This method uses an amplitude - histogram of the samples, locates the two principal modes, and takes - the amplitudes corresponding to these modes as the high and low - values of the calibration pulse. */ - else { - - /* Allocate memory for the amplitude histograms. */ - for (i = 0; i < nsig; i++) - if (do_cal[i]) { - if (s[i].adcres < 1) s[i].adcres = WFDB_DEFRES; -#ifndef lint - if ((h[i] = (int *)calloc((unsigned)(1< 0L) { - if (getvec(v) < nsig) exit(2); - for (i = 0; i < nsig; i++) - if (do_cal[i]) { - if (v[i] < vmin[i] || v[i] > vmax[i]) { - (void)fprintf(stderr, - "%s: `%s' contains incorrect ADC data for signal %d\n", - pname, wfdbfile(s[i].fname, NULL), i); - (void)fprintf(stderr, - " (specified range: %d to %d, but a sample value of %d was found)\n", - vmin[i], vmax[i], v[i]); - exit(2); - } - else - ho[i][v[i]]++; - } - } - - /* Smooth the histograms, find the two principal modes, and determine - the gain and baseline. */ - for (i = 0; i < nsig; i++) { - if (do_cal[i]) { - int dhs, hmax = -1, hmax2 = -1, hs, hthr, *hp = h[i], j, jj, - jmax = -1, jmax2 = -1, k, n=(1<> 8) < 8) wl = 8; -#ifndef lint - if ((r = (int *)malloc((unsigned)(wl+1)*sizeof(int))) == NULL){ - (void)fprintf(stderr, "%s: insufficient memory\n", pname); - exit(3); - } -#endif - for (jj = 0; jj < wl+1; jj++) - r[jj] = (jj >= (wl/2)+1) ? hp[jj-(wl/2)-1] : 0; - /* hs is the smoothed histogram value for bin j, and dhs is the - first difference between the previous and current values of - hs; the initializations are for j = -1 (with r[k] terms - omitted for 0<=k<=wl/2, since these are all 0 initially). - ** Watch out for integer overflow on 16-bit machines, - especially if the ADC resolution is high. ** */ - for (jj = wl/2-1, hs = 0, dhs = 0; jj > 0; jj--) { - hs += (wl/2-jj)*r[wl/2+jj]; - dhs += r[wl/2+jj]; - } - for (j = 0; j < n; j++) { - /* hs is computed by double summation from the previous hs, - the previous dhs, and the second difference, r[0] - - 2r[wl/2] + r[wl]. */ - hp[j] = hs += dhs += r[0] - 2*r[wl/2] + r[wl]; - /* While smoothing the histogram, find the primary mode. */ - if (hp[j] > hmax) { hmax = hp[j]; jmax = j; } - for (k = 0; k < wl; k++) - r[k] = r[k+1]; - r[wl] = (j+wl/2+1 < n) ? hp[j+wl/2+1] : 0; - } - - /* Set the threshold to one-eighth of the primary mode. */ - hthr = hmax >> 3; - - /* Search past the primary mode for a sub-threshold bin. */ - for (j = jmax+1; j < n; j++) - if (hp[j] <= hthr) break; - /* If a sub-threshold bin was found, search for a secondary - mode. If the unweighted value of a bin exceeds the - threshold, the value is weighted in proportion to the - distance from the primary mode. The secondary mode is - taken to be the bin with the largest weighted value; this - criterion favors widely separated modes over closely spaced - modes. */ - if (j < n) - for ( ; j < n; j++) - if (hp[j] > hthr && hp[j]*(j-jmax) > hmax2) { - hmax2 = hp[j]*(j-jmax); - jmax2 = j; - } - /* Search on the other side of the primary mode for a sub- - threshold bin. */ - for (j = jmax-1; j >= 0; j--) - if (hp[j] <= hthr) break; - /* If successful, search for a secondary mode using the - criteria described above. */ - if (j >= 0) - for ( ; j >= 0; j--) - if (hp[j] > hthr && hp[j]*(jmax-j) > hmax2) { - hmax2 = hp[j]*(jmax-j); - jmax2 = j; - } - if (jmax2 < 0) - (void)fprintf(stderr, - "%s: warning: cannot calibrate signal %d\n", - pname, i); - else { - if (jmax2 > jmax) { - int jtmp = jmax2; - - jmax2 = jmax; - jmax = jtmp; - } - g[i] = ((double) jmax - jmax2)/(high[i] - low[i]); - if (dc[i]) - b[i] = jmax2 - (low[i]*g[i]) - o[i]; - } - (void)free((char *)r); - } - if (do_cal[i] && h[i]) (void)free((char *)h[i]); - } - } - if (multi_seg) { - char buf[256], *hfname; - FILE *hfile; - int nseg; - - if ((hfname = wfdbfile("header", record)) == NULL) { - fprintf(stderr, "%s: can't find header for record %s\n", - pname, record); - exit(3); - } - if ((hfile = fopen(hfname, "rt")) == NULL) { - fprintf(stderr, "%s: can't read `%s'\n", pname, hfname); - exit(4); - } - fgets(buf, 256, hfile); - for (p = buf; *p; p++) - if (*p==' ' || *p == '/' || *p == '\t' || *p == '\n' || *p == '\r') - break; - if (*p != '/') { /* oops! this shouldn't happen */ - fprintf(stderr, "%s: missing `/' in line 0 of `%s'\n", - pname, hfname); - fclose(hfile); - exit(5); - } - nseg = atoi(p+1); - for (i = 0; i < nseg; i++) { - fgets(buf, 256, hfile); - for (p = buf; *p && *p != ' '; p++) - ; - *p = '\0'; - (void)isigopen(buf, s, -WFDB_MAXSIG); - rewrite_header(buf); - wfdbquit(); - } - fclose(hfile); - } - else { - rewrite_header(record); - wfdbquit(); - } - exit(0); /*NOTREACHED*/ -} - -void rewrite_header(record) -char *record; -{ - char *p; - int i; - - /* Copy any `info' strings from the original header. */ - if (p = getinfo(record)) { - do { -#ifndef lint - if ((current_rec = - (struct info_rec *)malloc(sizeof(struct info_rec))) == NULL || - (current_rec->info_string = - (char *)malloc((unsigned)(strlen(p)+1))) == NULL) { - (void)fprintf(stderr, "%s: insufficient memory\n", pname); - exit(3); - } -#endif - (void)strcpy(current_rec->info_string, p); - current_rec->next = NULL; - if (last_rec == NULL) - first_rec= last_rec = current_rec; - else { - last_rec->next = current_rec; - last_rec = current_rec; - } - } while (p = getinfo((char *)NULL)); - } - - /* Preserve skews and byte offsets recorded in the existing header, and - set the gains, baselines, units, and adcres fields. */ - for (i = 0; i < nsig; i++) { - wfdbsetskew(i, wfdbgetskew(i)); - wfdbsetstart(i, wfdbgetstart(i)); - if (do_cal[i]) { - s[i].gain = g[i]; - if (dc[i]) s[i].baseline = b[i]; - s[i].units = *units[i] ? units[i] : NULL; - if (s[i].adcres < 1) s[i].adcres = WFDB_DEFRES; - } - } - - /* Write out the modified header file. */ - (void)setheader(record, s, (unsigned)nsig); - - /* Write any `info' strings out to the new header. */ - if (current_rec = first_rec) { - do { - (void)putinfo(current_rec->info_string); - p = (char *)current_rec; - current_rec = current_rec->next; - (void)free(p); - } while (current_rec); - current_rec = first_rec = last_rec = NULL; - } -} - - -char *prog_name(s) -char *s; -{ - char *p = s + strlen(s); - -#ifdef MSDOS - while (p >= s && *p != '\\' && *p != ':') { - if (*p == '.') - *p = '\0'; /* strip off extension */ - if ('A' <= *p && *p <= 'Z') - *p += 'a' - 'A'; /* convert to lower case */ - p--; - } -#else - while (p >= s && *p != '/') - p--; -#endif - return (p+1); -} - -static char *help_strings[] = { - "usage: %s -r RECORD [OPTIONS ...]\n", - "where RECORD is the name of the record to be calibrated, and OPTIONS are:", - " -c FILE obtain calibration pulse specifications from the specified FILE", - " (default: obtain this information from the file specified by", - " the environment variable WFDBCAL, or interactively)", - " -f TIME start at the specified TIME (default: beginning of record)", - " -h print this usage summary", - " -q make a quick-and-dirty estimate from the starting and ending", - " samples (as specified by -f and -t)", - " -Q make an alternative quick-and-dirty estimate from the range of", - " the samples in the interval specified by -f and -t", - " -s SIGNAL [SIGNAL ...] calibrate the specified SIGNALs only (the first", - " signal is `0'; default: calibrate all signals)", - " -t TIME stop at the specified TIME (default: 1 second after the start)", - " -v ask for cal pulse limits (default: use limits in WFDBCAL file)", - "If the `-s' option is used, only the specified signals are calibrated, and", - "gains and baselines for any other signals are not changed. Thus, if", - "calibration pulses are not simultaneously available in all signals, run", - "this program repeatedly with different time intervals and signal lists.", - NULL -}; - -void help() -{ - int i; - - (void)fprintf(stderr, help_strings[0], pname); - for (i = 1; help_strings[i] != NULL; i++) - (void)fprintf(stderr, "%s\n", help_strings[i]); -} diff -Naur wfdb-10.1.3/app/calsig.c wfdb-10.1.4/app/calsig.c --- wfdb-10.1.3/app/calsig.c Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/app/calsig.c Wed May 24 16:18:23 2000 @@ -0,0 +1,653 @@ +/* file: calsig.c G. Moody 4 March 1991 + Last revised: 24 May 2000 + +------------------------------------------------------------------------------- +calsig: measure gains and baselines in a DB record and rewrite header +Copyright (C) 1999 George B. Moody + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place - Suite 330, Boston, MA 02111-1307, USA. + +You may contact the author by e-mail (george@mit.edu) or postal mail +(MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +please visit PhysioNet (http://www.physionet.org/). +_______________________________________________________________________________ + +`calsig' rewrites the header file for a WFDB record, setting the gain and +baseline fields based on measurements it makes. Normally, the program is +used by specifying a time interval for the measurements; best results will +be achieved if the specified interval is restricted to one or more square-wave +calibration pulses in each signal to be calibrated, although sine-wave pulses +may be usable if the sampling frequency and/or ADC resolution is high enough. +The baseline field is set only for signals that have been identified as +DC-coupled. `calsig' also sets the units field for any signal it +calibrates (if the units field is not already set in the header file). + +By default, the program constructs a smoothed amplitude histogram for each +signal and identifies its two principal modes. Initially, each bin of the +histogram counts the number of samples in the analysis interval for which the +amplitude has a specified value. The histogram is smoothed by applying a +low-pass filter which replaces the contents of each bin by a weighted sum of +several bins centered on the bin of interest. The two principal modes in the +smoothed histogram must be separated by at least one bin with a count which is +less than one-eighth the count of the larger mode. If this criterion is not +satisfied for a given signal, `calsig' warns the user and does not adjust +the gain or baseline for the affected signal. + +`calsig' has two less rigorous techniques it can use if the algorithm above +fails. Using the `-q' option, `calsig' takes the endpoints of the specified +interval as representative of the high and low values of the calibration +pulse. Using the `-Q' option, `calsig' searches the interval for the +maximum and minimum amplitudes and takes these as the high and low values of +the calibration pulse. These algorithms, particularly the `-Q' algorithm, are +highly sensitive to noise and are thus not recommended except in cases in which +the default algorithm fails; note, however, that such cases are precisely +those in which noise is likely to be a problem for the alternate algorithms. +*/ + +#include +#ifdef __STDC__ +# include +#else +extern void exit(); +# ifndef NOMALLOC_H +# include +# else +extern char *malloc(); +# endif +#endif +#ifndef BSD +#include +#else +#include +#endif +#include + +#define UNITSLEN 20 + +int nsig; +static char units[WFDB_MAXSIG][UNITSLEN+1]; +static double high[WFDB_MAXSIG], low[WFDB_MAXSIG]; +static int do_cal[WFDB_MAXSIG]; +static int dc[WFDB_MAXSIG]; /* dc[i] is 1 if signal i is DC-coupled */ +static struct info_rec { + struct info_rec *next; + char *info_string; +} *first_rec, *current_rec, *last_rec; +char *pname, *prog_name(); +void rewrite_header(), help(); +static WFDB_Siginfo s[WFDB_MAXSIG]; +static WFDB_Sample b[WFDB_MAXSIG]; +static WFDB_Gain g[WFDB_MAXSIG]; + +main(argc, argv) +int argc; +char *argv[]; +{ + char *cfname=NULL, *p, *record = NULL, *t0p = NULL, *t1p = NULL, *getenv(); + int do_skip = 1, *h[WFDB_MAXSIG], *ho[WFDB_MAXSIG], i, multi_seg = 0, + n = 0, o[WFDB_MAXSIG], qflag = 0, Qflag = 0, v[WFDB_MAXSIG], vflag = 0, + vmax[WFDB_MAXSIG], vmin[WFDB_MAXSIG]; + long nsamp, t, t0 = 0L, t1; + + /* Read and interpret command-line arguments. */ + pname = prog_name(argv[0]); + for (i = 1; i < argc; i++) { + if (*argv[i] == '-') switch (*(argv[i]+1)) { + case 'c': + if (++i >= argc) { + (void)fprintf(stderr, "%s: file name must follow -c\n", pname); + exit(1); + } + cfname = argv[i]; + break; + case 'f': + if (++i >= argc) { + (void)fprintf(stderr, "%s: starting time must follow -f\n", + pname); + exit(1); + } + t0p = argv[i]; + break; + case 'h': /* print usage summary and quit */ + help(); + exit(0); + break; + case 'q': /* use the quick and dirty method */ + qflag = 1; + break; + case 'Q': /* use the alternate quick and dirty method */ + Qflag = 1; + break; + case 'r': + if (++i >= argc) { + (void)fprintf(stderr, "%s: record name must follow -r\n", + pname); + exit(1); + } + record = argv[i]; + break; + case 's': + while (++i < argc && *argv[i] != '-') { + int sig; + + sig = atoi(argv[i]); + if (0 <= sig && sig < WFDB_MAXSIG) { + do_cal[sig] = 1; + n++; + } + } + --i; + if (n < 1) { + (void)fprintf(stderr, + "%s: one or more signal numbers must follow -s\n", + pname); + exit(1); + } + break; + case 't': + if (++i >= argc) { + (void)fprintf(stderr, "%s: ending time must follow -t\n", + pname); + exit(1); + } + t1p = argv[i]; + break; + case 'v': + vflag = 1; + break; + default: + (void)fprintf(stderr, "%s: unrecognized option %s\n", pname, + argv[i]); + exit(1); + } + else { + (void)fprintf(stderr, "%s: unrecognized argument %s\n", pname, + argv[i]); + exit(1); + } + } + + /* Check that a record name was provided. */ + if (record == NULL) { + help(); + exit(1); + } + + /* Open the record. */ + if ((nsig = isigopen(record, s, WFDB_MAXSIG)) < 1) exit(2); + if (strtim("e") != s[0].nsamp) multi_seg = 1; + + /* If a signal list was provided, validate it; otherwise, generate one. */ + if (n > 0) { + for (i = nsig; i < WFDB_MAXSIG; i++) + if (do_cal[i]) { do_cal[i] = 0; n--; } + } + else { + for (i = 0; i < nsig; i++) + do_cal[i] = 1; + n = nsig; + } + if (n < 1) { + (void)fprintf(stderr, "%s: no signals to be calibrated\n", pname); + exit(2); + } + + /* Find the interval to be read. */ + if (t0p) { + t0 = strtim(t0p); + if (t0 < 0L) t0 = -t0; + } + if (t1p) { + t1 = strtim(t1p); + if (t1 < 0L) t1 = -t1; + if (t1 <= t0) { + (void)fprintf(stderr, "%s: improper interval specified\n", pname); + exit(1); + } + nsamp = t1 - t0; + } + else + nsamp = strtim("1"); + + /* Check if any of the signals to be calibrated is stored in difference + format. If so, avoid using isigsettime(). */ + for (i = 0; i < nsig; i++) { + if (do_cal[i] && (s[i].fmt == 8)) { + do_skip = 0; break; + } + } + + /* Go to the first sample to be used for measurement. */ + if (do_skip) { + if (isigsettime(t0) < 0) exit(2); + } + else { + for (t = 0L; t < t0; t++) + if (getvec(v) < nsig) exit(2); + } + + /* Get calibration specifications, interactively if necessary. */ + if (cfname == NULL) cfname = getenv("WFDBCAL"); + if (cfname) (void)calopen(cfname); + for (i = 0; i < nsig; i++) { + WFDB_Calinfo ci; + + if (do_cal[i]) { + char buf[21]; + + *units[i] = '\0'; + low[i] = high[i] = 0; + dc[i] = -1; + + /* Get a calibration record from the list if possible. */ + if (getcal(s[i].desc, (char *)NULL, &ci) == 0) { + if (!vflag) { + low[i] = ci.low; + high[i] = ci.high; + } + dc[i] = ci.caltype & WFDB_DC_COUPLED; + (void)strncpy(units[i], ci.units, UNITSLEN); + } + + /* If necessary, get the physical units. */ + if (*units[i] == '\0') { + do { + (void)fprintf(stderr, + "Signal %d units (up to %d characters): ", + i, UNITSLEN); + (void)fgets(units[i], UNITSLEN, stdin); + } while (*units[i] == '\n'); + units[i][strlen(units[i])-1] = '\0'; /* strip off \n */ + } + + /* Make sure that the units string contains no whitespace. */ + for (p = units[i]; *p; p++) + if (*p == ' ' || *p == '\t') *p = '_'; + + /* Determine if signal is DC- or AC-coupled. */ + while (dc[i] == -1) { + (void)fprintf(stderr, "Is signal %d DC-coupled? (y/n): ", i); + (void)fgets(buf, 20, stdin); + if (*buf == 'y' || *buf == 'Y' || *buf == '\n') + dc[i] = 1; + else if (*buf == 'n' || *buf == 'N') + dc[i] = 0; + } + + /* If necessary, get the calibration pulse specifications. */ + while (low[i] == high[i]) { + if (dc[i] == 1) { + (void)fprintf(stderr, + "Signal %d calibration pulse limits\n", i); + (void)fprintf(stderr, " Low value (in %s): ", units[i]); + (void)fgets(buf, 20, stdin); + (void)sscanf(buf, "%lf", &low[i]); + (void)fprintf(stderr, " High value (in %s): ", units[i]); + (void)fgets(buf, 20, stdin); + (void)sscanf(buf, "%lf", &high[i]); + if (low[i] == high[i]) + (void)fprintf(stderr, + "Low and high values must be unequal!\n"); + } + else { + low[i] = 0.0; + (void)fprintf(stderr, "Signal %d calibration pulse\n", i); + (void)fprintf(stderr, " Amplitude (in %s): ", units[i]); + (void)fgets(buf, 20, stdin); + (void)sscanf(buf, "%lf", &high[i]); + if (low[i] == high[i]) + (void)fprintf(stderr, + "Pulse must have a non-zero amplitude!\n"); + } + } + } + } + + /* Use the quick-and-dirty method if requested. This method takes the + endpoints as representing the high and low values of the calibration + pulse. */ + if (qflag) { + int vhigh[WFDB_MAXSIG], vlow[WFDB_MAXSIG], vtemp; + + if (getvec(vlow) < nsig) exit(2); + if (do_skip) { + if (isigsettime(t1) < 0) exit(2); + } + else + while (++t <= t1) + if (getvec(v) < nsig) exit(2); + if (getvec(vhigh) < nsig) exit(2); + for (i = 0; i < nsig; i++) + if (do_cal[i]) { + if (vlow[i] > vhigh[i]) { + vtemp = vlow[i]; + vlow[i] = vhigh[i]; + vhigh[i] = vtemp; + } + g[i] = ((double)vhigh[i] - vlow[i])/(high[i] - low[i]); + if (dc[i]) + b[i] = vhigh[i] - (high[i] * g[i]); + } + } + + /* Use the alternate quick-and-dirty method if requested. This method + takes the maximum and minimum sample values as representing the high + and low values of the calibration pulse. */ + else if (Qflag) { + int vhigh[WFDB_MAXSIG], vlow[WFDB_MAXSIG]; + + if (getvec(vlow) < nsig) exit(2); + for (i = 0; i < nsig; i++) + vhigh[i] = vlow[i]; + for (t = t0+1; t < t1; t++) { + if (getvec(v) < nsig) exit(2); + for (i = 0; i < nsig; i++) { + if (v[i] > vhigh[i]) vhigh[i] = v[i]; + else if (v[i] < vlow[i]) vlow[i] = v[i]; + } + } + for (i = 0; i < nsig; i++) + if (do_cal[i]) { + g[i] = ((double)vhigh[i] - vlow[i])/(high[i] - low[i]); + if (dc[i]) + b[i] = vhigh[i] - (high[i] * g[i]); + } + } + + /* Otherwise, use the standard method. This method uses an amplitude + histogram of the samples, locates the two principal modes, and takes + the amplitudes corresponding to these modes as the high and low + values of the calibration pulse. */ + else { + + /* Allocate memory for the amplitude histograms. */ + for (i = 0; i < nsig; i++) + if (do_cal[i]) { + if (s[i].adcres < 1) s[i].adcres = WFDB_DEFRES; +#ifndef lint + if ((h[i] = (int *)calloc((unsigned)(1< 0L) { + if (getvec(v) < nsig) exit(2); + for (i = 0; i < nsig; i++) + if (do_cal[i]) { + if (v[i] < vmin[i] || v[i] > vmax[i]) { + (void)fprintf(stderr, + "%s: `%s' contains incorrect ADC data for signal %d\n", + pname, wfdbfile(s[i].fname, NULL), i); + (void)fprintf(stderr, + " (specified range: %d to %d, but a sample value of %d was found)\n", + vmin[i], vmax[i], v[i]); + exit(2); + } + else + ho[i][v[i]]++; + } + } + + /* Smooth the histograms, find the two principal modes, and determine + the gain and baseline. */ + for (i = 0; i < nsig; i++) { + if (do_cal[i]) { + int dhs, hmax = -1, hmax2 = -1, hs, hthr, *hp = h[i], j, jj, + jmax = -1, jmax2 = -1, k, n=(1<> 8) < 8) wl = 8; +#ifndef lint + if ((r = (int *)malloc((unsigned)(wl+1)*sizeof(int))) == NULL){ + (void)fprintf(stderr, "%s: insufficient memory\n", pname); + exit(3); + } +#endif + for (jj = 0; jj < wl+1; jj++) + r[jj] = (jj >= (wl/2)+1) ? hp[jj-(wl/2)-1] : 0; + /* hs is the smoothed histogram value for bin j, and dhs is the + first difference between the previous and current values of + hs; the initializations are for j = -1 (with r[k] terms + omitted for 0<=k<=wl/2, since these are all 0 initially). + ** Watch out for integer overflow on 16-bit machines, + especially if the ADC resolution is high. ** */ + for (jj = wl/2-1, hs = 0, dhs = 0; jj > 0; jj--) { + hs += (wl/2-jj)*r[wl/2+jj]; + dhs += r[wl/2+jj]; + } + for (j = 0; j < n; j++) { + /* hs is computed by double summation from the previous hs, + the previous dhs, and the second difference, r[0] - + 2r[wl/2] + r[wl]. */ + hp[j] = hs += dhs += r[0] - 2*r[wl/2] + r[wl]; + /* While smoothing the histogram, find the primary mode. */ + if (hp[j] > hmax) { hmax = hp[j]; jmax = j; } + for (k = 0; k < wl; k++) + r[k] = r[k+1]; + r[wl] = (j+wl/2+1 < n) ? hp[j+wl/2+1] : 0; + } + + /* Set the threshold to one-eighth of the primary mode. */ + hthr = hmax >> 3; + + /* Search past the primary mode for a sub-threshold bin. */ + for (j = jmax+1; j < n; j++) + if (hp[j] <= hthr) break; + /* If a sub-threshold bin was found, search for a secondary + mode. If the unweighted value of a bin exceeds the + threshold, the value is weighted in proportion to the + distance from the primary mode. The secondary mode is + taken to be the bin with the largest weighted value; this + criterion favors widely separated modes over closely spaced + modes. */ + if (j < n) + for ( ; j < n; j++) + if (hp[j] > hthr && hp[j]*(j-jmax) > hmax2) { + hmax2 = hp[j]*(j-jmax); + jmax2 = j; + } + /* Search on the other side of the primary mode for a sub- + threshold bin. */ + for (j = jmax-1; j >= 0; j--) + if (hp[j] <= hthr) break; + /* If successful, search for a secondary mode using the + criteria described above. */ + if (j >= 0) + for ( ; j >= 0; j--) + if (hp[j] > hthr && hp[j]*(jmax-j) > hmax2) { + hmax2 = hp[j]*(jmax-j); + jmax2 = j; + } + if (jmax2 < 0) + (void)fprintf(stderr, + "%s: warning: cannot calibrate signal %d\n", + pname, i); + else { + if (jmax2 > jmax) { + int jtmp = jmax2; + + jmax2 = jmax; + jmax = jtmp; + } + g[i] = ((double) jmax - jmax2)/(high[i] - low[i]); + if (dc[i]) + b[i] = jmax2 - (low[i]*g[i]) - o[i]; + } + (void)free((char *)r); + } + if (do_cal[i] && h[i]) (void)free((char *)h[i]); + } + } + if (multi_seg) { + char buf[256], *hfname; + FILE *hfile; + int nseg; + + if ((hfname = wfdbfile("header", record)) == NULL) { + fprintf(stderr, "%s: can't find header for record %s\n", + pname, record); + exit(3); + } + if ((hfile = fopen(hfname, "rt")) == NULL) { + fprintf(stderr, "%s: can't read `%s'\n", pname, hfname); + exit(4); + } + fgets(buf, 256, hfile); + for (p = buf; *p; p++) + if (*p==' ' || *p == '/' || *p == '\t' || *p == '\n' || *p == '\r') + break; + if (*p != '/') { /* oops! this shouldn't happen */ + fprintf(stderr, "%s: missing `/' in line 0 of `%s'\n", + pname, hfname); + fclose(hfile); + exit(5); + } + nseg = atoi(p+1); + for (i = 0; i < nseg; i++) { + fgets(buf, 256, hfile); + for (p = buf; *p && *p != ' '; p++) + ; + *p = '\0'; + (void)isigopen(buf, s, -WFDB_MAXSIG); + rewrite_header(buf); + wfdbquit(); + } + fclose(hfile); + } + else { + rewrite_header(record); + wfdbquit(); + } + exit(0); /*NOTREACHED*/ +} + +void rewrite_header(record) +char *record; +{ + char *p; + int i; + + /* Copy any `info' strings from the original header. */ + if (p = getinfo(record)) { + do { +#ifndef lint + if ((current_rec = + (struct info_rec *)malloc(sizeof(struct info_rec))) == NULL || + (current_rec->info_string = + (char *)malloc((unsigned)(strlen(p)+1))) == NULL) { + (void)fprintf(stderr, "%s: insufficient memory\n", pname); + exit(3); + } +#endif + (void)strcpy(current_rec->info_string, p); + current_rec->next = NULL; + if (last_rec == NULL) + first_rec= last_rec = current_rec; + else { + last_rec->next = current_rec; + last_rec = current_rec; + } + } while (p = getinfo((char *)NULL)); + } + + /* Preserve skews and byte offsets recorded in the existing header, and + set the gains, baselines, units, and adcres fields. */ + for (i = 0; i < nsig; i++) { + wfdbsetskew(i, wfdbgetskew(i)); + wfdbsetstart(i, wfdbgetstart(i)); + if (do_cal[i]) { + s[i].gain = g[i]; + if (dc[i]) s[i].baseline = b[i]; + s[i].units = *units[i] ? units[i] : NULL; + if (s[i].adcres < 1) s[i].adcres = WFDB_DEFRES; + } + } + + /* Write out the modified header file. */ + (void)setheader(record, s, (unsigned)nsig); + + /* Write any `info' strings out to the new header. */ + if (current_rec = first_rec) { + do { + (void)putinfo(current_rec->info_string); + p = (char *)current_rec; + current_rec = current_rec->next; + (void)free(p); + } while (current_rec); + current_rec = first_rec = last_rec = NULL; + } +} + + +char *prog_name(s) +char *s; +{ + char *p = s + strlen(s); + +#ifdef MSDOS + while (p >= s && *p != '\\' && *p != ':') { + if (*p == '.') + *p = '\0'; /* strip off extension */ + if ('A' <= *p && *p <= 'Z') + *p += 'a' - 'A'; /* convert to lower case */ + p--; + } +#else + while (p >= s && *p != '/') + p--; +#endif + return (p+1); +} + +static char *help_strings[] = { + "usage: %s -r RECORD [OPTIONS ...]\n", + "where RECORD is the name of the record to be calibrated, and OPTIONS are:", + " -c FILE obtain calibration pulse specifications from the specified FILE", + " (default: obtain this information from the file specified by", + " the environment variable WFDBCAL, or interactively)", + " -f TIME start at the specified TIME (default: beginning of record)", + " -h print this usage summary", + " -q make a quick-and-dirty estimate from the starting and ending", + " samples (as specified by -f and -t)", + " -Q make an alternative quick-and-dirty estimate from the range of", + " the samples in the interval specified by -f and -t", + " -s SIGNAL [SIGNAL ...] calibrate the specified SIGNALs only (the first", + " signal is `0'; default: calibrate all signals)", + " -t TIME stop at the specified TIME (default: 1 second after the start)", + " -v ask for cal pulse limits (default: use limits in WFDBCAL file)", + "If the `-s' option is used, only the specified signals are calibrated, and", + "gains and baselines for any other signals are not changed. Thus, if", + "calibration pulses are not simultaneously available in all signals, run", + "this program repeatedly with different time intervals and signal lists.", + NULL +}; + +void help() +{ + int i; + + (void)fprintf(stderr, help_strings[0], pname); + for (i = 1; help_strings[i] != NULL; i++) + (void)fprintf(stderr, "%s\n", help_strings[i]); +} diff -Naur wfdb-10.1.3/app/pschart.c wfdb-10.1.4/app/pschart.c --- wfdb-10.1.3/app/pschart.c Wed Feb 16 21:50:24 2000 +++ wfdb-10.1.4/app/pschart.c Sat May 20 21:55:00 2000 @@ -1,5 +1,5 @@ /* file: pschart.c G. Moody 15 March 1988 - Last revised: 16 February 2000 + Last revised: 20 May 2000 ------------------------------------------------------------------------------- pschart: Produce annotated `chart recordings' on a PostScript device @@ -130,6 +130,7 @@ double footer_y; /* distance from page bottom to footer (mm) */ double imargin; /* inside margin (mm) */ double omargin; /* outside margin (mm) */ +FILE *infofile; /* file to print instead of title */ /* User-settable parameters */ char aname[41] = "atruth"; /* annotator name */ @@ -204,8 +205,8 @@ int printstrip(), setpagedim(), setpagetitle(); void append_scale(), cont(), ejectpage(), flush_cont(), grid(), help(), label(), larger(), move(), newpage(), plabel(), process(), rlabel(), - rtlabel(), setbar1(), setbar2(), setitalic(), setmargins(), setrgbcolor(), - setroman(), smaller(), tlabel(); + rtlabel(), setbar1(), setbar2(), setcourier(), setitalic(), setmargins(), + setrgbcolor(), setroman(), smaller(), tlabel(); main(argc, argv) int argc; @@ -361,6 +362,14 @@ case 'H': /* use getvec's high resolution mode */ setgvmode(WFDB_HIGHRES); break; + case 'i': /* print contents of file in title area */ + if (++i >= argc || ((infofile = fopen(argv[i], "rt")) == NULL)) { + (void)fprintf(stderr, + "%s: the name of a readable file must follow -i\n", + pname); + exit(1); + } + break; case 'l': /* enable signal labelling */ lflag = 1; break; @@ -368,6 +377,11 @@ Lflag = 1; (void)setpagedim(); if (!mflag) setmargins(); + else { + s_defwidth = 25.0 * (int)((p_width - (imargin+omargin))/25.0); + title_y = p_height - 0.6*tmargin; + footer_y = 0.5*bmargin; + } break; case 'm': /* specify margins */ if (++i >= argc - 3 || *argv[i] == '-' || @@ -1284,7 +1298,7 @@ (void)printf("%%%%Title: Chart Recording\n"); (void)printf("%%%%Pages: (atend)\n"); (void)printf( - "%%%%DocumentFonts: Times-Roman Times-Italic Symbol\n"); + "%%%%DocumentFonts: Times-Roman Times-Italic Courier Symbol\n"); if (Lflag == 0) (void)printf("%%%%BoundingBox: %d %d %d %d\n", (int)(lmargin*72.0/25.4 - 36.0), @@ -1352,7 +1366,19 @@ tlabel(record); } } - if (*pagetitle) { + if (infofile) { + static char tstr[256]; + double yt = mm(title_y) + mm(20.0); + + setcourier(10.0); + while (fgets(tstr, sizeof(tstr), infofile)) { + move(mm(lmargin), (int)(yt -= pt(10))); + label(tstr); + } + (void)fclose(infofile); + infofile = NULL; + } + else if (*pagetitle) { if (rhpage()) { move(mm(lmargin), mm(title_y)); if (pagetitle == defpagetitle && rdpagetitle != NULL) @@ -1544,6 +1570,14 @@ (void)printf("%g %c\n", fsize, style); } +void setcourier(size) +double size; +{ + flush_cont(); + fsize = size; style = 'C'; + (void)printf("%g %c\n", fsize, style); +} + void smaller() /* change to a font 20% smaller in the current style */ { flush_cont(); @@ -1665,6 +1699,7 @@ " -g print grids", " -h print this usage summary", " -H use high-resolution mode for multi-frequency records", + " -i FILE print (as text) contents of FILE in title area of first page", " -l print signal labels", " -L use landscape orientation", " -m IN OUT TOP BOTTOM set margins in mm", @@ -1733,6 +1768,7 @@ "/mm {72 mul 25.4 div}def", "/I {/Times-Italic findfont exch scalefont setfont}def", "/R {/Times-Roman findfont exch scalefont setfont}def", +"/C {/Courier findfont exch scalefont setfont}def", "/grid { newpath 0 setlinecap", " /dy1 exch dpi 25.4 div mul lw sub def /dy2 dy1 lw add 5 mul def", @@ -1812,4 +1848,3 @@ if (*buf != '%' && *buf != '\n') (void)fputs(buf, stdout); (void)fclose(fp); } - diff -Naur wfdb-10.1.3/app/pschart.pro wfdb-10.1.4/app/pschart.pro --- wfdb-10.1.3/app/pschart.pro Wed Feb 16 23:43:26 2000 +++ wfdb-10.1.4/app/pschart.pro Sat May 20 22:07:41 2000 @@ -1,5 +1,5 @@ % file: pschart.pro G. Moody 27 May 1988 -% Last revised: 19 November 1999 +% Last revised: 20 May 2000 % ----------------------------------------------------------------------------- % prolog for pschart output @@ -58,6 +58,9 @@ % n R: use roman font, n points /R {/Times-Roman findfont exch scalefont setfont}def + +% n C: use courier (monospaced) font, n points +/C {/Courier findfont exch scalefont setfont}def % x0 y0 x1 y1 xtick ytick grid: print a grid with the lower corner at (x0, y0), % the upper corner at (x1, y1), and ticks at intervals of xtick and ytick (in diff -Naur wfdb-10.1.3/app/sample.c wfdb-10.1.4/app/sample.c --- wfdb-10.1.3/app/sample.c Fri May 5 09:50:34 2000 +++ wfdb-10.1.4/app/sample.c Sun Jan 30 04:13:16 2000 @@ -1,5 +1,5 @@ /* file: sample.c G. Moody 10 January 1991 - Last revised: 5 May 2000 (corrected address info) + Last revised: 30 April 1999 ------------------------------------------------------------------------------- sample: digitize or play back signals on a PC using a Microstar DAP board @@ -28,7 +28,8 @@ `sample' runs under MS-DOS on an ISA-bus (AT-bus) system that contains a Microstar DAP 1200 or 2400 series board (available from Microstar -Laboratories, http://www.mstarlabs.com/). +Laboratories, 2863 152nd Avenue NE, Redmond, WA 98052 USA; telephone +1 206 +881 4286). To compile `sample' successfully, you will need Microsoft C, version 5.0 or later, or Turbo C/C++, and four files supplied by Microstar with all versions diff -Naur wfdb-10.1.3/app/wfdbcat.c wfdb-10.1.4/app/wfdbcat.c --- wfdb-10.1.3/app/wfdbcat.c Fri Mar 3 13:28:10 2000 +++ wfdb-10.1.4/app/wfdbcat.c Tue May 23 00:14:30 2000 @@ -1,5 +1,5 @@ /* file: wfdbcat.c G. Moody 3 March 2000 - + Last revised: 22 May 2000 ------------------------------------------------------------------------------- wfdbcat: Find and concatenate WFDB files on the standard output Copyright (C) 2000 George B. Moody @@ -22,11 +22,10 @@ please visit PhysioNet (http://www.physionet.org/). _______________________________________________________________________________ -Copy wfdblib.h and wfdb.h to this directory before compiling, or use an -appropriate -I option when compiling. */ #include +#include /* Structures used by internal WFDB library functions only */ struct netfile { @@ -49,15 +48,13 @@ typedef struct WFDB_FILE WFDB_FILE; extern WFDB_FILE *wfdb_open(char *file_type, char *record, int mode); -#ifdef NETFILES +#if WFDB_NETFILES extern size_t wfdb_fread(void *ptr, size_t size, size_t nmemb, WFDB_FILE *fp); -extern size_t wfdb_fwrite(void *ptr, size_t size, size_t nmemb, WFDB_FILE *fp); +extern int wfdb_fclose(WFDB_FILE *fp); #else #define wfdb_fread(p, s, n, wp) fread(p, s, n, wp->fp) -#define wfdb_fwrite(p, s, n, wp) fwrite(p, s, n, wp->fp) +#define wfdb_fclose(wp) fclose(wp->fp) #endif - -#include #ifndef __STDC__ extern void exit(); diff -Naur wfdb-10.1.3/conf/generic-slib.def wfdb-10.1.4/conf/generic-slib.def --- wfdb-10.1.3/conf/generic-slib.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/generic-slib.def Mon Jun 5 06:20:45 2000 @@ -0,0 +1,122 @@ +# file: generic-slib.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# This section contains settings suitable for compiling a shared version of the +# WFDB library under versions of UNIX that are not otherwise recognized by +# 'configure'. Not all versions of UNIX support shared libraries, so you may +# not need to use this file. +# +# If you find that changes are needed in order to compile successfully, please +# send a copy of your modifications together with the name of your operating +# system (as reported by the 'uname' command) to george@mit.edu, so that +# support for your operating system can be incorporated in future versions of +# this package. Thanks! + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC +# to 'libwww-config' (a utility supplied with libwww). Otherwise set +# LWC to ':' (a program that does nothing, successfully). +LWC = libwww-config + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options used when compiling the shared +# library. CFLAGS should always include VDEFS. +CFLAGS = -fpic -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# WFDBLIB_BASENAME is the name, without version numbers, of the alternate +# library. WFDBLIB_SONAME is the shared object name ("soname") of the +# alternate library; normally, this includes the base name and the major +# version number only. WFDBLIB is the complete name, including the minor +# version number. Symbolic links from WFDBLIB to WFDBLIB_BASENAME and +# WFDBLIB_SONAME will be created as the final step in building the alternate +# library. +WFDBLIB_BASENAME = libwfdb.so +WFDBLIB_SONAME = $(WFDBLIB_BASENAME).$(MAJOR) +WFDBLIB = $(WFDBLIB_SONAME).$(MINOR) +# For a shared library, the soname is significant for proper run-time binding. +# If you change function interfaces in the library, change its soname by +# incrementing the major version number; when you do this, set the minor +# version number to zero. If you change the library without changing the +# function interfaces, increment the minor version number; this allows existing +# binaries to use the new version without recompilation, since the soname is +# unchanged in this case. + +# BUILDLIB is the command that creates the shared WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. This command varies +# considerably depending on the operating system; the setting here works +# if gcc and the GNU binutils are installed. +SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) \ + `$(LWC) --libs` -o $(SWFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. Some versions of Unix require shared libraries to +# be marked as executable; those that do not generally don't care. +SETLPERMISSIONS = chmod 755 + +# SRANLIB is the name of the program used to index the alternate library. +# Shared libraries are not generally indexed. +SRANLIB = : + +# LDCONFIG is the name of the program needed to refresh the system's cached +# index of shared libraries. Not all operating systems that support shared +# libraries have such an index, so this may be unnecessary. +LDCONFIG = ldconfig +# Under operating systems that do not maintain a cached index of shared +# libraries, uncomment the next line. +# LDCONFIG = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME) + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME) + $(RANLIB) $(LIBDIR)/$(WFDBLIB) + @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful + +lib-post-uninstall: + rm -f $(LIBDIR)/$(WFDBLIB_BASENAME) + rm -f $(LIBDIR)/$(WFDBLIB_SONAME) + @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful +#______________________________________________________________________________ diff -Naur wfdb-10.1.3/conf/generic.def wfdb-10.1.4/conf/generic.def --- wfdb-10.1.3/conf/generic.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/generic.def Mon Jun 5 06:19:43 2000 @@ -0,0 +1,167 @@ +# file: generic.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# This file contains default 'make' definitions for compiling the WFDB Software +# Package under versions of UNIX that are not otherwise recognized by +# 'configure'. +# +# If you find that changes are needed in order to compile successfully, please +# send a copy of your modifications together with the name of your operating +# system (as reported by the 'uname' command) to george@mit.edu, so that +# support for your operating system can be incorporated in future versions of +# this package. Thanks! + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include +# Note: if you have both gcc and a vendor-supplied C compiler, and if INCDIR +# is /usr/include, CFLAGS should *not* contain -I$(INCDIR) (if it does, gcc may +# read the wrong version of files such as stdio.h when compiling WFDB +# applications). + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. The WFDB library can be compiled with K&R +# C compilers (`cc' on most if not all UNIX systems) as well as with ANSI C +# compilers such as GNU C (`gcc'). +CC = gcc +# On systems where `gcc' is the standard C compiler, `gcc' may also be known as +# `cc'; in such cases, it doesn't matter if CC is cc or gcc. + +# CCDEFS is the set of C compiler options needed to set preprocessor variables +# while compiling the WFDB Software Package. CCDEFS should always include +# VDEFS. Add the following options to CCDEFS as appropriate (separating them +# by spaces if you use more than one): +# -DISPRINTF if you do not have `stdlib.h' and your `sprintf' returns an +# int (see wfdblib.h) +# -DNETFILES if you have libwww and want to be able to access WFDB files +# remotely via http or ftp (as well as local files) +# -DNOMALLOC_H if you have neither `stdlib.h' nor `malloc.h' (see wfdblib.h) +# -DNOSTRTOK if your standard C library does not include function `strtok' +# (see wfdbio.c) +# -DNOTIME if you do not have `time.h' (see signal.c) +# -DOLDC if you have neither `stdarg.h' nor `varargs.h' (see wfdbio.c) +# If your C compiler fails to compile `signal.c', add -DBROKEN_CC to CCDEFS +# and try again (see signal.c). +CCDEFS = $(VDEFS) + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# CCDEFS. Add the following options to CFLAGS as appropriate (separating them +# by spaces if you use more than one): +# -g to save symbols for debugging +# -O if you trust your C compiler's optimizer +# With the exception of `gcc', most C compilers do not allow you to use -g and +# -O simultaneously. +CFLAGS = -g $(CCDEFS) `$(LWC) --cflags` -I$(INCDIR) +# `gcc' users may comment out the previous line, and uncomment the next one. +# CFLAGS = -g -O $(CCDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# If your system requires indexed libraries, uncomment the next line. +RANLIB = ranlib +# Otherwise, uncomment the next line. +# RANLIB = : + +# AR is the name of the command used to build a standard library from `.o' +# files, and ARFLAGS is the set of options used when doing so. AR and ARFLAGS +# are usually `make' builtins and need not be defined here; under HP UX, and +# perhaps other versions of UNIX, however, you will need to define these +# variables by uncommenting the next two lines. +# AR = ar +# ARFLAGS = rv + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + echo "Nothing to be done for lib-post-install" + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ + diff -Naur wfdb-10.1.3/conf/hpux-slib.def wfdb-10.1.4/conf/hpux-slib.def --- wfdb-10.1.3/conf/hpux-slib.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/hpux-slib.def Mon Jun 5 06:18:44 2000 @@ -0,0 +1,99 @@ +# file: hpux-slib.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# This section contains settings suitable for generating a shared library under +# HP-UX. + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a shared WFDB library with NETFILES support, set LWC +# to 'libwww-config' (a utility supplied with libwww). Otherwise set +# LWC to ':' (a program that does nothing, successfully). +LWC = libwww-config + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include +# Note: if you have both gcc and a vendor-supplied C compiler, and if INCDIR +# is /usr/include, CFLAGS (below) should *not* contain -I$(INCDIR) (if it does, +# gcc may read the wrong version of files such as stdio.h when compiling WFDB +# applications). + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options used when compiling the shared +# library. CFLAGS should always include VDEFS. +CFLAGS = -fpic -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# WFDBLIB_BASENAME is the name, without version numbers, of the alternate +# library. WFDBLIB_SONAME is the shared object name ("soname") of the +# alternate library; normally, this includes the base name and the major +# version number only. WFDBLIB is the complete name, including the minor +# version number. Symbolic links from WFDBLIB to WFDBLIB_BASENAME and +# WFDBLIB_SONAME will be created as the final step in building the alternate +# library. +WFDBLIB_BASENAME = libwfdb.sl +WFDBLIB_SONAME = $(WFDBLIB_BASENAME).$(MAJOR) +WFDBLIB = $(WFDBLIB_SONAME).$(MINOR) +# For a shared library, the soname is significant for proper run-time binding. +# If you change function interfaces in the library, change its soname by +# incrementing the major version number; when you do this, set the minor +# version number to zero. If you change the library without changing the +# function interfaces, increment the minor version number; this allows existing +# binaries to use the new version without recompilation, since the soname is +# unchanged in this case. + +# BUILDLIB is the command that creates the shared WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = ld -b `$(LWC) --libs` -o $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 755 + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME) + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME) + +lib-post-uninstall: + rm -f $(LIBDIR)/$(WFDBLIB_BASENAME) + rm -f $(LIBDIR)/$(WFDBLIB_SONAME) +#______________________________________________________________________________ diff -Naur wfdb-10.1.3/conf/hpux.def wfdb-10.1.4/conf/hpux.def --- wfdb-10.1.3/conf/hpux.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/hpux.def Mon Jun 5 06:18:05 2000 @@ -0,0 +1,133 @@ +# file: hpux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB library under HP-UX + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include +# Note: if you have both gcc and a vendor-supplied C compiler, and if INCDIR +# is /usr/include, CFLAGS (below) should *not* contain -I$(INCDIR) (if it does, +# gcc may read the wrong version of files such as stdio.h when compiling WFDB +# applications). + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. Add the following options to CFLAGS as appropriate (separating them +# by spaces if you use more than one): +# -g to save symbols for debugging +# -O if you trust your C compiler's optimizer +# With the exception of `gcc', most C compilers do not allow you to use -g and +# -O simultaneously. +CFLAGS = -g $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) +# `gcc' users may comment out the previous line, and uncomment the next one. +# CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# AR is the name of the command used to build a standard library from `.o' +# files, and ARFLAGS is the set of options used when doing so. AR and ARFLAGS +# are usually `make' builtins and need not be defined here; under HP UX, and +# perhaps other versions of UNIX, however, you will need to define these +# variables by uncommenting the next two lines. +AR = ar +ARFLAGS = rv + +# BUILDLIB is the command to be used to create WFDBLIB once all of its +# components have been compiled separately. This will not usually need to be +# changed. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) `lorder $(OFILES) | tsort` + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ + diff -Naur wfdb-10.1.3/conf/linux-slib.def wfdb-10.1.4/conf/linux-slib.def --- wfdb-10.1.3/conf/linux-slib.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/linux-slib.def Mon Jun 5 06:15:28 2000 @@ -0,0 +1,102 @@ +# file: linux-slib.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# This section contains settings suitable for generating an ELF-format shared +# library under Linux. + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC +# to 'libwww-config' (a utility supplied with libwww). Otherwise set +# LWC to ':' (a program that does nothing, successfully). +LWC = libwww-config + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options used when compiling the shared +# library. CFLAGS should always include VDEFS. +CFLAGS = -fpic -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# WFDBLIB_BASENAME is the name, without version numbers, of the alternate +# library. WFDBLIB_SONAME is the shared object name ("soname") of the +# alternate library; normally, this includes the base name and the major +# version number only. WFDBLIB is the complete name, including the minor +# version number. Symbolic links from WFDBLIB to WFDBLIB_BASENAME and +# WFDBLIB_SONAME will be created as the final step in building the alternate +# library. +WFDBLIB_BASENAME = libwfdb.so +WFDBLIB_SONAME = $(WFDBLIB_BASENAME).$(MAJOR) +WFDBLIB = $(WFDBLIB_SONAME).$(MINOR) +# For a shared library, the soname is significant for proper run-time binding. +# If you change function interfaces in the library, change its soname by +# incrementing the major version number; when you do this, set the minor +# version number to zero. If you change the library without changing the +# function interfaces, increment the minor version number; this allows existing +# binaries to use the new version without recompilation, since the soname is +# unchanged in this case. + +# BUILDLIB is the command that creates the shared WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = gcc -shared -Wl,-soname,$(WFDBLIB_SONAME) `$(LWC) --libs` \ + -o $(WFDBLIB) + +# LDCONFIG is the name of the program needed to refresh the system's cached +# index of shared libraries. +LDCONFIG = /sbin/ldconfig + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME) + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME) + @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful + +lib-post-uninstall: + rm -f $(LIBDIR)/$(WFDBLIB_BASENAME) + rm -f $(LIBDIR)/$(WFDBLIB_SONAME) + @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful +#______________________________________________________________________________ diff -Naur wfdb-10.1.3/conf/linux.def wfdb-10.1.4/conf/linux.def --- wfdb-10.1.3/conf/linux.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/linux.def Mon Jun 5 06:13:01 2000 @@ -0,0 +1,113 @@ +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/conf/solaris-slib.def wfdb-10.1.4/conf/solaris-slib.def --- wfdb-10.1.3/conf/solaris-slib.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/solaris-slib.def Mon Jun 5 06:17:22 2000 @@ -0,0 +1,101 @@ +# file: solaris-slib.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# This section contains settings suitable for generating a shared library under +# Solaris. + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC +# to 'libwww-config' (a utility supplied with libwww). Otherwise set +# LWC to ':' (a program that does nothing, successfully). +LWC = libwww-config + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options used when compiling the shared +# library. CFLAGS should always include VDEFS. These settings are for use +# with gcc: +CFLAGS = -fpic -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) +# For SunOS `cc', uncomment the next line. +# CFLAGS = -pic -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) +# For Solaris or SVR4 `cc', uncomment the next line. +# CFLAGS = -K PIC -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# WFDBLIB_BASENAME is the name, without version numbers, of the alternate +# library. WFDBLIB_SONAME is the shared object name ("soname") of the +# alternate library; normally, this includes the base name and the major +# version number only. WFDBLIB is the complete name, including the minor +# version number. Symbolic links from WFDBLIB to WFDBLIB_BASENAME and +# WFDBLIB_SONAME will be created as the final step in building the alternate +# library. +WFDBLIB_BASENAME = libwfdb.so +WFDBLIB_SONAME = $(WFDBLIB_BASENAME).$(MAJOR) +WFDBLIB = $(WFDBLIB_SONAME).$(MINOR) +# For a shared library, the soname is significant for proper run-time binding. +# If you change function interfaces in the library, change its soname by +# incrementing the major version number; when you do this, set the minor +# version number to zero. If you change the library without changing the +# function interfaces, increment the minor version number; this allows existing +# binaries to use the new version without recompilation, since the soname is +# unchanged in this case. + +# BUILDLIB is the command that creates the shared WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = ld -o $(WFDBLIB) -G -z text `$(LWC) --libs` + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME) + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME) + +lib-post-uninstall: + rm -f $(LIBDIR)/$(WFDBLIB_BASENAME) + rm -f $(LIBDIR)/$(WFDBLIB_SONAME) +#______________________________________________________________________________ diff -Naur wfdb-10.1.3/conf/solaris.def wfdb-10.1.4/conf/solaris.def --- wfdb-10.1.3/conf/solaris.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/solaris.def Mon Jun 5 06:16:25 2000 @@ -0,0 +1,121 @@ +# file: solaris.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Solaris + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include +# Note: if you have both gcc and a vendor-supplied C compiler, and if INCDIR +# is /usr/include, CFLAGS should *not* contain -I$(INCDIR) (if it does, gcc may +# read the wrong version of files such as stdio.h when compiling WFDB +# applications). + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. With the exception of `gcc', most C compilers do not allow you to use +# -g and -O simultaneously. +CFLAGS = -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) +# `gcc' users may comment out the previous line, and uncomment the next one. +# CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ + diff -Naur wfdb-10.1.3/conf/version.def wfdb-10.1.4/conf/version.def --- wfdb-10.1.3/conf/version.def Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/conf/version.def Thu May 25 20:29:47 2000 @@ -0,0 +1,14 @@ +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ + diff -Naur wfdb-10.1.3/configure wfdb-10.1.4/configure --- wfdb-10.1.3/configure Thu Mar 30 15:47:18 2000 +++ wfdb-10.1.4/configure Mon Jun 5 23:32:43 2000 @@ -1,17 +1,200 @@ #! /bin/sh +# file: configure G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# Configuration script for the WFDB Software Package + +# This script was not generated using 'autoconf'. If you can implement +# autoconf input files for a 'configure' that does what this one does, +# please send them to me (george@mit.edu) for inclusion in a future +# version of this package. + +echo "Checking the operating system type ..." +OS=`uname` +echo "Configuring the WFDB software package for $OS." + +cp conf/version.def conf/site.def +cp /dev/null conf/site-slib.def +case `uname` in + Linux*) OS=Linux + cat conf/linux.def >>conf/site.def + cat conf/version.def conf/linux-slib.def >conf/site-slib.def ;; + SunOS*) OS=Solaris + cat conf/solaris.def >>conf/site.def + cat conf/version.def conf/solaris-slib.def >conf/site-slib.def + echo "It is normal, and harmless, for Solaris to be recognized as" + echo "SunOS." ;; + HP-UX*) OS=HPUX + cat conf/hpux.def >>conf/site.def + cat conf/version.def conf/hpux-slib.def >conf/site-slib.def ;; + *) OS=generic + cat conf/generic.def >>conf/site.def + cat conf/version.def conf/generic-slib.def >conf/site-slib.def + echo "Using the generic configuration, which may need to be customized" + echo "for your operating system. 'configure' will offer suggestions for" + echo "customization after it completes the generic configuration." ;; +esac + +if [ -s conf/site-slib.def ] +then + echo + echo "The WFDB library may be compiled as a static library or as a" + echo "dynamically loaded (shared) library (the default). Type S for a" + echo -n "static library, or D for a dynamically loaded library: " + read LIBTYPE + case x$LIBTYPE in + xS*|xs*) cp /dev/null conf/site-slib.def + LIBTYPE=static + echo "Configuring for a static library." + echo + echo "You may link the WFDB applications to dynamically loaded" + echo "system libraries (such as the standard C library) to" + echo "save disk space and for faster loading even while using" + echo "the static WFDB library, or you may link them to static" + echo "libraries only, which will make them easier to copy to" + echo "other systems. Note that choosing to link to static" + echo "libraries only may cause compilation to fail if your" + echo "system does not have a complete set of static libraries." + echo "Type S to link to static libraries only, or D to link to" + echo -n "dynamically loaded libraries where available: " + read SYSLIBS + case x$SYSLIBS in + xS*|xs*) sed "s/LDFLAGS = -L/LDFLAGS = -static -L/" \ + conf/site.tmp + mv conf/site.tmp conf/site.def ;; + *) ;; + esac ;; + *) LIBTYPE=dynamic + echo "Configuring for a dynamically loaded library." ;; + esac +else + LIBTYPE=static +fi + +echo +echo "Looking for the C compiler ..." +if ( which gcc 2>&1 | grep "no " >/dev/null ) +then + if (which cc 2>&1 | grep "no " >/dev/null ) + then + echo "The WFDB software cannot be compiled, because there does not" + echo "appear to be a C compiler installed on this system. Please" + echo "install one, be sure that it is in your PATH, and that it is" + echo "accessible as either 'cc' or 'gcc', then run ./configure again." + exit + else + sed "s/CC = gcc/CC = cc/" conf/site.tmp + mv conf/site.tmp conf/site.def + sed "s/CC = gcc/CC = cc/" conf/site.tmp + mv conf/site.tmp conf/site-slib.def + echo "The WFDB software will be compiled with 'cc'." + fi +else + echo "The WFDB software will be compiled with 'gcc'." +fi + +echo +echo "Where do you wish to install the WFDB Software Package?" +echo "It will be installed in subdirectories of WFDBROOT (by default," +echo "WFDBROOT is /usr, so that files are installed in /usr/bin," +echo "/usr/include, /usr/lib, etc.). Other reasonable choices for" +echo "WFDBROOT are /usr/local, /opt, or your home directory ($HOME)." +echo "The value of WFDBROOT must be a full pathname (beginning with '/'," +echo "but without a '/' at the end). If the subdirectories (bin, include," +echo "lib, ...) of WFDBROOT don't exist, they will be created as necessary." +echo +DIR= +while [ x$DIR = x ] +do + echo -n "Choose a location, or press to install in /usr: " + read DIR + case x$DIR in + x/usr) ;; + x) DIR=/usr ;; + */) DIR= + echo "Please type the path again, omitting the '/' at the end." ;; + x/*) sed "s+^WFDBROOT = /usr+WFDBROOT = $DIR+" conf/site.tmp + mv conf/site.tmp conf/site.def + sed "s+^WFDBROOT = /usr+WFDBROOT = $DIR+" conf/site.tmp + mv conf/site.tmp conf/site-slib.def + if [ $LIBTYPE = dynamic ] + then + echo + echo "IMPORTANT: You have chosen to build a dynamic (shared)" + echo "library in a directory that is not normally searched for such" + echo "libraries. In order to use the applications that will be" + echo "compiled with this library, it may be necessary to add this" + echo "directory to your LD_LIBRARY_PATH. If your shell is csh or a" + echo "variant, do this by typing:" + case "x$LD_LIBRARY_PATH" in + x) echo " setenv LD_LIBRARY_PATH $DIR/lib" + echo "Otherwise, do this by typing:" + echo " LD_LIBRARY_PATH=$DIR/lib" + echo " export LD_LIBRARY_PATH" ;; + *) echo " setenv LD_LIBRARY_PATH \${LD_LIBRARY_PATH}:$DIR/lib" + echo "Otherwise, do this by typing:" + echo " LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:$DIR/lib" + echo " export LD_LIBRARY_PATH" ;; + esac + echo -n "Press to continue: " + read A + fi ;; + *) DIR= + echo "Please enter an absolute pathname, beginning with '/'." ;; + esac +done + +echo +echo "Looking for libwww ..." if ( which libwww-config 2>&1 | grep "no " >/dev/null ) then echo "The WFDB software will be compiled without NETFILES access, because" echo "libwww does not appear to be installed on this system." echo "To add NETFILES access, install libwww and run ./configure again." - cp -p lib/makelib lib/Makefile echo "NETFILES=0" >config.cache + sed "s/LWC = libwww-config/LWC = :/" conf/site.tmp + mv conf/site.tmp conf/site.def + sed "s/LWC = libwww-config/LWC = :/" conf/site.tmp + mv conf/site.tmp conf/site-slib.def + sed "s/WFDB_NETFILES 1/WFDB_NETFILES 0/" lib/wfdb.tmp + mv lib/wfdb.tmp lib/wfdb.h else echo "The WFDB software will be compiled with NETFILES access." - cp -p lib/netmake lib/Makefile echo "NETFILES=1" >config.cache + sed "s/LWC = :/LWC = libwww-config/" conf/site.tmp + mv conf/site.tmp conf/site.def + if [ $LIBTYPE = "static" ] + then + sed "s/LDLIBWWW = #/LDLIBWWW =/" conf/site.tmp + mv conf/site.tmp conf/site.def + fi + sed "s/LWC = :/LWC = libwww-config/" conf/site.tmp + mv conf/site.tmp conf/site-slib.def + sed "s/WFDB_NETFILES 0/WFDB_NETFILES 1/" lib/wfdb.temp + mv lib/wfdb.temp lib/wfdb.h fi +echo +echo "Creating Makefile in lib ..." +if [ -s conf/site-slib.def ] +then + cat lib/Makefile.top conf/site-slib.def lib/Makefile.tpl >lib/Makefile +else + cat lib/Makefile.top conf/site.def lib/Makefile.tpl >lib/Makefile +fi +for D in app convert data doc examples fortran psd wave wave-doc waverc . +do + if [ -s $D/Makefile.top ] + then + echo "Creating Makefile in $D ..." + cat $D/Makefile.top conf/site.def $D/Makefile.tpl >$D/Makefile + fi +done + +rm conf/site.def conf/site-slib.def + +echo +echo "Looking for the XView libraries ..." if ( which textedit 2>&1 | grep "no " >/dev/null ) then echo "WAVE will not be compiled, because the XView libraries do not" @@ -22,8 +205,49 @@ echo "WAVE=0" >>config.cache else echo "WAVE will be compiled." - cp -p wave/makewave wave/Makefile echo "WAVE=1" >>config.cache fi +echo +echo "Looking for perl ..." +if ( which perl 2>&1 | grep "no " >/dev/null ) +then + echo "The texi2html utility, which can be used to prepare some on-line" + echo "documentation in HTML form, requires perl, which does not appear" + echo "to be installed on this system. This documentation is available" + echo "from http://www.physionet.org/ and its mirrors. If you wish to" + echo "be able to prepare a local copy of this material, install perl" + echo "into a directory in your PATH and run ./configure again." +else + PERL=`which perl` + case $PERL in + /usr/bin/perl) ;; + *) sed s+/usr/bin/perl+$PERL+ texi2html + mv texi2html doc + sed s+/usr/bin/perl+$PERL+ doc/Makefile.tmp + mv doc/Makefile.tmp doc/Makefile ;; + esac + echo "Found $PERL." +fi + +# Clean up old *.o files in lib, to avoid possibly using binaries intended +# for a shared library in a static library or vice versa. +rm -f lib/*.o + +if [ $OS = generic ] +then + echo "No specific configuration information is available for your" + echo "operating system. Please try compiling using the generic Makefiles" + echo "that have been generated by this configuration utility. If there" + echo "are problems, it may be possible to solve them by customizing" + echo "conf/generic.def (and conf/generic-slib.def if you are attempting" + echo "to compile a shared WFDB library). Run ./configure again after" + echo "making any necessary changes to these files. Please send reports" + echo "of success or failure, together with the output of the command" + echo "'uname -a', and copies of any files you have changed, to:" + echo " george@mit.edu" +fi +echo +echo "WFDB software configuration is complete." +echo "Now run 'make', followed by 'make install'." diff -Naur wfdb-10.1.3/convert/Makefile wfdb-10.1.4/convert/Makefile --- wfdb-10.1.3/convert/Makefile Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.4/convert/Makefile Mon Jun 5 23:33:05 2000 @@ -1,10 +1,10 @@ # file: Makefile G. Moody 2 November 1989 -# Last revised: 18 July 1999 +# Last revised: 23 May 2000 # UNIX 'make' description file for WFDB format-conversion applications # # ----------------------------------------------------------------------------- # WFDB format-conversion applications -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # These programs are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the @@ -31,49 +31,115 @@ # appropriate for your system. To build and install the applications, just # type `make' (from within this directory). To print a set of source listings, # type `make listing'. +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ -# Site-specific variables -# ----------------------- +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` -# CC is the name of your C compiler. These applications can be compiled with -# K&R C compilers (`cc' on most if not all UNIX systems) as well as with ANSI -# C compilers such as GNU C (`gcc'). To use the K&R C compiler available on -# most UNIX systems, uncomment the next line. -CC = cc -# For `gcc', uncomment the next line. -# CC = gcc - -# INCDIR is the parent of the directory that contains the WFDB include (*.h) -# files. (These files should have been installed in $(INCDIR)/wfdb; see -# ../lib/Makefile.) -INCDIR = /usr/include - -# If you trust your C compiler's optimizer, you may wish to add -O to CFLAGS; -# for debugging, add -g to CFLAGS. (If you use `gcc', you may use both; most -# other C compilers do not permit you to do so.) -CFLAGS = -O -I$(INCDIR) +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin -# LIBDIR is the directory that contains the WFDB library (see ../lib/Makefile). -LIBDIR = /usr +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) # LDFLAGS is appended to the C compiler command line to specify loading the -# WFDB library. Unless you have changed the value of WFDBLIB in the `Makefile' -# for the WFDB library, `-lwfdb' should be correct. -LDFLAGS = -L$(LIBDIR) -lwfdb +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) -# BINDIR specifies the directory in which the applications will be installed; -# it should be a directory in the PATH of those who will use the applications. -# You will need to have write permission in BINDIR. -BINDIR = /usr/local/bin +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) # PRINT is the name of the program used to produce listings (including any # options for the desired formatting). PRINT = lpr -# SETXPERMISSIONS is the command needed to make the installed files accessible -# to those who will use them. The value given below makes them readable and -# executable by everyone, and writeable by the owner only. (If you perform the -# installation as `root', `root' is the owner of the installed files.) +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. SETXPERMISSIONS = chmod 755 # STRIP is the command used to compact the compiled binaries by removing their @@ -83,8 +149,19 @@ # uncomment the next line. # STRIP = : -# It should not be necessary to modify anything below this line. -# ----------------------------------------------------------------------------- +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. CFILES = a2m.c ad2m.c m2a.c md2a.c readid.c makeid.c edf2mit.c revise.c XFILES = a2m ad2m m2a md2a readid makeid edf2mit revise @@ -96,15 +173,18 @@ .c: $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) +# `make all': build applications +all: $(XFILES) + $(STRIP) $(XFILES) + # `make' or `make install': build and install applications, clean up -install: all +install: $(BINDIR) all cp $(XFILES) $(BINDIR) cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) $(MAKE) clean -# `make all': build applications -all: $(XFILES) - $(STRIP) $(XFILES) +uninstall: + ../uninstall $(BINDIR) $(XFILES) # `make clean': remove intermediate and backup files clean: @@ -114,5 +194,6 @@ listing: $(PRINT) README $(MFILES) $(CFILES) -revise: revise.c - $(CC) $(CFLAGS) -I../lib revise.c -o revise $(LDFLAGS) +# Create directory for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) diff -Naur wfdb-10.1.3/convert/Makefile.top wfdb-10.1.4/convert/Makefile.top --- wfdb-10.1.3/convert/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/convert/Makefile.top Wed May 24 22:35:27 2000 @@ -0,0 +1,34 @@ +# file: Makefile G. Moody 2 November 1989 +# Last revised: 23 May 2000 +# UNIX 'make' description file for WFDB format-conversion applications +# +# ----------------------------------------------------------------------------- +# WFDB format-conversion applications +# Copyright (C) 2000 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install the format- +# conversion applications that come with the WFDB software package. Before +# using it for the first time, check that the site-specific variables below are +# appropriate for your system. To build and install the applications, just +# type `make' (from within this directory). To print a set of source listings, +# type `make listing'. +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/convert/Makefile.tpl wfdb-10.1.4/convert/Makefile.tpl --- wfdb-10.1.3/convert/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/convert/Makefile.tpl Mon Jun 5 06:47:33 2000 @@ -0,0 +1,38 @@ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. + +CFILES = a2m.c ad2m.c m2a.c md2a.c readid.c makeid.c edf2mit.c revise.c +XFILES = a2m ad2m m2a md2a readid makeid edf2mit revise +MFILES = Makefile makefile.dos + +# General rule for compiling C sources into executable files. This is +# redundant for most versions of `make', but at least one System V version +# needs it. +.c: + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + +# `make all': build applications +all: $(XFILES) + $(STRIP) $(XFILES) + +# `make' or `make install': build and install applications, clean up +install: $(BINDIR) all + cp $(XFILES) $(BINDIR) + cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) + $(MAKE) clean + +uninstall: + ../uninstall $(BINDIR) $(XFILES) + +# `make clean': remove intermediate and backup files +clean: + rm -f $(XFILES) *.o *~ + +# `make listing': print a listing of WFDB format-conversion application sources +listing: + $(PRINT) README $(MFILES) $(CFILES) + +# Create directory for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) diff -Naur wfdb-10.1.3/convert/revise.c wfdb-10.1.4/convert/revise.c --- wfdb-10.1.3/convert/revise.c Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.4/convert/revise.c Tue May 23 17:48:53 2000 @@ -25,7 +25,8 @@ */ -#include "wfdblib.h" +#include +#include #ifndef __STDC__ extern double atof(); extern void exit(); @@ -36,7 +37,28 @@ #include #endif -static WFDB_FILE *iheader; +/* netfile and WFDB_FILE definitions copied from ../lib/libwfdb.h */ +struct netfile { + char *url; + char *data; + int mode; + long base_addr; + long cont_len; + long pos; + long err; + int fd; +}; + +struct WFDB_FILE { + FILE *fp; + struct netfile *netfp; + int type; +}; + +typedef struct WFDB_FILE WFDB_FILE; + +WFDB_FILE *iheader; +WFDB_FILE *wfdb_open(); WFDB_Siginfo si[WFDB_MAXSIG]; WFDB_Time nsamples; diff -Naur wfdb-10.1.3/data/Makefile wfdb-10.1.4/data/Makefile --- wfdb-10.1.3/data/Makefile Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.4/data/Makefile Mon Jun 5 23:33:05 2000 @@ -1,10 +1,10 @@ # file: Makefile G. Moody 7 February 1992 -# Last revised: 4 September 1999 +# Last revised: 23 May 2000 # UNIX `make' description file for WFDB calibration and sample data files # # ----------------------------------------------------------------------------- # WFDB data files -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # These files are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the @@ -31,13 +31,95 @@ # appropriate for your system. To install these files, just type `make' (from # within this directory). To print a set of source listings, type `make # listing'. +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ -# Site-specific variables -# ----------------------- +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin # DBDIR specifies the name of a directory in which to install the contents -# of this directory. -DBDIR = /usr/local/database +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) # PRINT is the name of the program used to produce listings (including any # options for the desired formatting). @@ -49,21 +131,53 @@ # as `root', `root' is the owner of the installed files.) SETPERMISSIONS = chmod 644 -# It should not be necessary to modify anything below this line. -# ----------------------------------------------------------------------------- +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 23 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. DBFILES = 100s.dat 100s.atr *.hea *list wfdbcal +all: + @echo Nothing to be made in `pwd`. + install: $(DBDIR) cp $(DBFILES) $(DBDIR) -cd $(DBDIR); $(SETPERMISSIONS) $(DBFILES) -cd $(DBDIR); ln -sf wfdbcal dbcal -all: - @echo Nothing to be made in `pwd`. +uninstall: + ../uninstall $(DBDIR) $(DBFILES) dbcal $(DBDIR): - -mkdir $(DBDIR) + mkdir $(DBDIR); $(SETDPERMISSIONS) $(DBDIR) listing: $(PRINT) README Makefile makefile.dos diff -Naur wfdb-10.1.3/data/Makefile.top wfdb-10.1.4/data/Makefile.top --- wfdb-10.1.3/data/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/data/Makefile.top Wed May 31 05:45:09 2000 @@ -0,0 +1,34 @@ +# file: Makefile G. Moody 7 February 1992 +# Last revised: 23 May 2000 +# UNIX `make' description file for WFDB calibration and sample data files +# +# ----------------------------------------------------------------------------- +# WFDB data files +# Copyright (C) 2000 George B. Moody +# +# These files are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install the calibration and +# sample database files that come with the WFDB software package. Before using +# it for the first time, check that the site-specific variables below are +# appropriate for your system. To install these files, just type `make' (from +# within this directory). To print a set of source listings, type `make +# listing'. +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/data/Makefile.tpl wfdb-10.1.4/data/Makefile.tpl --- wfdb-10.1.3/data/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/data/Makefile.tpl Mon Jun 5 06:45:58 2000 @@ -0,0 +1,25 @@ +# file: Makefile.tpl G. Moody 23 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. + +DBFILES = 100s.dat 100s.atr *.hea *list wfdbcal + +all: + @echo Nothing to be made in `pwd`. + +install: $(DBDIR) + cp $(DBFILES) $(DBDIR) + -cd $(DBDIR); $(SETPERMISSIONS) $(DBFILES) + -cd $(DBDIR); ln -sf wfdbcal dbcal + +uninstall: + ../uninstall $(DBDIR) $(DBFILES) dbcal + +$(DBDIR): + mkdir $(DBDIR); $(SETDPERMISSIONS) $(DBDIR) + +listing: + $(PRINT) README Makefile makefile.dos + +clean: + rm -f *~ diff -Naur wfdb-10.1.3/doc/Makefile wfdb-10.1.4/doc/Makefile --- wfdb-10.1.3/doc/Makefile Wed Feb 9 20:50:31 2000 +++ wfdb-10.1.4/doc/Makefile Mon Jun 5 23:33:05 2000 @@ -1,5 +1,5 @@ # file: Makefile G. Moody 24 June 1989 -# Last revised: 9 February 2000 +# Last revised: 31 May 2000 # `make' description file for WFDB software documentation # # ----------------------------------------------------------------------------- @@ -99,8 +99,137 @@ # printed and bound copies are available from MIT (see `../../../ORDER.4M'). # Sources for ghostscript, groff, gtbl, TeX, LaTeX, texi2dvi, and dvips are # all freely available (see `../SOURCES'). +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ + +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all -# Site-specific variables. +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# Change the settings below as appropriate for your setup. # DOSCHK is a command for checking file and directory names within the current # directory for MS-DOS compatibility, used by `make html'. If you have GNU @@ -167,24 +296,10 @@ # PERL is the full pathname of your perl interpreter, needed for `make htmlpg'. PERL = /usr/bin/perl -# PRINT is the name of the program used to produce listings (including any -# options for the desired formatting). -PRINT = lpr - # PSPRINT is the name of the program that prints PostScript files (needed to # `make guide' and to `make appguide'). PSPRINT = lpr -# SETDPERMISSIONS is the command needed to make directories created during the -# installation accessible to those who will use them. -SETDPERMISSIONS = chmod 755 - -# SETPERMISSIONS is the command needed to make the installed files accessible -# to those who will use them. The value given below makes them readable by -# everyone, and writable by the owner only. (If you perform the installation -# as `root', `root' is the owner of the installed files.) -SETPERMISSIONS = chmod 644 - # TROFF is the name of the program that prints UNIX troff files (needed to # `make appguide' and for the covers of both guides). Use `groff' if you have # GNU groff (the preferred formatter). @@ -215,8 +330,10 @@ .IGNORE: +all: + # `make' or `make install': install the man pages -install: +install: $(MAN1) $(MAN3) $(MAN5) ./maninst.sh $(MAN1) $(MAN3) $(MAN5) "$(SETPERMISSIONS)" $(LN) $(MAN1)/a2m.1 $(MAN1)/ad2m.1 $(LN) $(MAN1)/a2m.1 $(MAN1)/m2a.1 @@ -228,6 +345,20 @@ $(LN) $(MAN1)/setwfdb.1 $(MAN1)/cshsetwfdb.1 $(LN) $(MAN1)/view.1 $(MAN1)/vsetup.1 +uninstall: + ../uninstall $(MAN1) *.1 ad2m.1 m2a.1 md2a.1 hrlomb.1 hrmem.1 \ + hrplot.1 plot3d.1 cshsetwfdb.1 vsetup.1 + ../uninstall $(MAN3) *.3 + ../uninstall $(MAN5) *.5 + +# Create directories for installation if necessary. +$(MAN1): + mkdir -p $(MAN1); $(SETDPERMISSIONS) $(MAN1) +$(MAN3): + mkdir -p $(MAN3); $(SETDPERMISSIONS) $(MAN3) +$(MAN5): + mkdir -p $(MAN5); $(SETDPERMISSIONS) $(MAN5) + # `make appguide': print the man pages (the Applications Guide) appguide: $(TROFF) cover.ag >dbag0.ps @@ -262,30 +393,38 @@ dvips $(D2PARGS) -o dbpg.ps dbu.dvi # `make info': create and install emacs info files -info: +info: $(INFODIR) $(MAKEINFO) dbu.tex test -s dbpg && \ - ( test -d $(INFODIR) || \ - ( mkdir -p $(INFODIR); $(SETDPERMISSIONS) $(INFODIR) ); \ cp dbpg* $(INFODIR); \ ( test -s $(INFODIR)/dbpg && \ ( $(SETPERMISSIONS) $(INFODIR)/dbpg*; \ ( test -s $(INFODIR)/dir || cp dir.top $(INFODIR)/dir ); \ ( grep -s dbpg $(INFODIR)/dir >/dev/null || \ - cat dir.db >>$(INFODIR)/dir )))); \ + cat dir.db >>$(INFODIR)/dir ))); \ rm -f dbpg* +$(INFODIR): + mkdir -p $(INFODIR); $(SETDPERMISSIONS) $(INFODIR) + # `make html': create HTML files, check for anything not accessible to MSDOS html: makehtmldirs htmlag htmlpg cd $(HTMLDIR); $(DOSCHK); ln -s index.htm index.html -makehtmldirs: +makehtmldirs: $(HTMLDIR)/dbpg $(HTMLDIR)/dbag -mkdir $(HTMLDIR) cp -p index.ht0 $(HTMLDIR)/index.htm date '+%e %B %Y' >>$(HTMLDIR)/index.htm cat foot.ht0 >>$(HTMLDIR)/index.htm -mkdir $(HTMLDIR)/dbpg -mkdir $(HTMLDIR)/dbag + +$(HTMLDIR): + mkdir -p $(HTMLDIR); $(SETDPERMISSIONS) $(HTMLDIR) +$(HTMLDIR)/dbag: $(HTMLDIR) + mkdir -p $(HTMLDIR)/dbag; $(SETDPERMISSIONS) $(HTMLDIR)/dbag +$(HTMLDIR)/dbpg: $(HTMLDIR) + mkdir -p $(HTMLDIR)/dbpg; $(SETDPERMISSIONS) $(HTMLDIR)/dbpg htmlag: makehtmldirs dbag.ps cp -p icons/* dbag.ps fixag.sh fixag.sed $(HTMLDIR)/dbag diff -Naur wfdb-10.1.3/doc/Makefile.top wfdb-10.1.4/doc/Makefile.top --- wfdb-10.1.3/doc/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/doc/Makefile.top Wed May 31 05:48:43 2000 @@ -0,0 +1,102 @@ +# file: Makefile G. Moody 24 June 1989 +# Last revised: 31 May 2000 +# `make' description file for WFDB software documentation +# +# ----------------------------------------------------------------------------- +# WFDB applications: programs for working with annotated signals +# Copyright (C) 2000 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install on-line +# documentation for the WFDB Software Package, and also to format and print it. +# Before using this file for the first time, check that the site-specific +# variables below are appropriate for your system. + +# The primary documentation for the WFDB Software Package consists of 3 guides: +# * The WFDB Applications Guide. This guide documents the application +# programs provided in the app, convert, psd, wave (briefly), and wview +# subdirectories of wfdb, as well as the file formats supported by the WFDB +# Software Package. It also includes a tutorial on evaluation of arrhythmia +# and ischemia detectors using this software and standard databases. +# * The WFDB Programmer's Guide. This guide documents the WFDB library. +# It contains both tutorial and reference material, with many examples, that +# will be useful if you wish to develop your own application programs for +# reading, analyzing, or creating digitized, optionally annotated, +# recordings of signals. +# * The WAVE User's Guide. This guide (found in wfdb/wave-doc, not in this +# directory) includes a comprehensive tutorial, with reference material, +# for WAVE, an interactive waveform browser with facilities for annotation +# editing and control of external analysis programs. WAVE runs on PCs under +# Linux, and on SPARC-based systems under SunOS or Solaris. +# The files in this directory can be used to prepare printed or on-line +# versions of the first two of these guides. + +# On-line documentation +# ===================== + +# To install the man pages (the text of the WFDB Applications Guide) on-line, +# type `make install' (or just `make'). The individual pages will be +# accessible to the UNIX `man' command, and to similar commands such as `xman', +# provided that MANDIR (see below) is in your MANPATH (type `man man' for +# further information). + +# If GNU emacs or GNU info has been installed on your system, a hypertext +# version of the WFDB Programmer's Guide may be installed by typing `make +# info'. Once the info files have been installed, provided that INFODIR is in +# your INFOPATH (see below), you can browse the guide from within emacs by +# typing C-h i to enter the info system, and selecting `WFDB library' from +# the top-level menu. Note that `make info' adds an entry for the Guide to the +# top-level `info' file ($INFODIR/dir). If you install a GNU emacs update, +# this entry may disappear; to restore it, simply `make info' again. + +# To install both the WFDB Applications Guide and the WFDB Programmer's Guide +# in HTML form, suitable for reading using a World Wide Web browser, type `make +# html'. In order to do this successfully, you must have installed +# `latex2html' (to translate the appendices of the Applications Guide), and +# `rman' (to translate the man pages in the Applications Guide). You also need +# `texi2html' (included here, to translate the WFDB Programmer's Guide), +# and Perl (in order to run `latex2html' and `texi2html'). Links to all of +# these are available from http://www.physionet.org, along with the latest +# versions of the files in this directory. + +# Printed documentation +# ===================== + +# Individual man pages or info nodes can be printed using the facilities of +# man and emacs respectively, or (from the HTML versions) using your web +# browser's print facilities. Complete printed copies of the WFDB +# Applications and Programmer's Guides can be obtained in several ways: +# - Preformatted versions are provided in ../../html/*.ps. If you don't have +# a PostScript printer, you may still be able to use ghostscript to print +# these versions on your printer (most popular laser, inkjet, and dot +# matrix printers are supported by ghostscript). +# - The sources for these manuals are provided in this directory; you should +# use these if you have made additions to the manuals or wish to customize +# them in any other way. To format the sources, you will need groff or +# troff, gtbl or tbl, TeX, LaTeX, texi2dvi, and dvips. To format and print +# the Applications Guide, type `make appguide' (but read `tmac.dif' first, +# unless you are using groff). To print the Programmer's Guide, type +# `make guide'. +# - Finally, if you can't or don't wish to print your own copies, nicely +# printed and bound copies are available from MIT (see `../../../ORDER.4M'). +# Sources for ghostscript, groff, gtbl, TeX, LaTeX, texi2dvi, and dvips are +# all freely available (see `../SOURCES'). +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/doc/Makefile.tpl wfdb-10.1.4/doc/Makefile.tpl --- wfdb-10.1.3/doc/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/doc/Makefile.tpl Mon Jun 5 15:48:07 2000 @@ -0,0 +1,239 @@ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# Change the settings below as appropriate for your setup. + +# DOSCHK is a command for checking file and directory names within the current +# directory for MS-DOS compatibility, used by `make html'. If you have GNU +# doschk, and you wish to perform this check, uncomment the following line: +DOSCHK = find . -print | doschk +# Otherwise, skip the check by uncommenting the next line instead: +# DOSCHK = + +# D2PARGS is a list of options for dvips. Uncomment one of these to set the +# paper size: +# D2PARGS = -t a4 +D2PARGS = -t letter + +# T2DARGS is a list of options for texi2dvi. Uncomment one of these to set the +# page size (the size of the printed area on the paper; normally this should +# match the paper size specified in D2PARGS): +# T2DARGS = -t @afourpaper +T2DARGS = -t @letterpaper + +# HTMLDIR is the directory that contains HTML (hypertext) versions of these +# documents. Don't worry about this unless you plan to regenerate the HTML +# from the sources in this directory. +HTMLDIR = ../../html + +# INFODIR is the GNU emacs info directory (needed to `make info'). One of the +# following definitions should be correct. +INFODIR = /usr/info +# INFODIR = /usr/local/info +# INFODIR = /usr/local/emacs/info + +# LN is a command that makes the file named by its first argument accessible +# via the name given in its second argument. If your system supports symbolic +# links, uncomment the next line. +LN = ln -s +# Otherwise uncomment the next line. +# LN = ln + +# If you wish to install the info (GNU hypertext documentation) files from this +# package, specify the command needed to format them from the texinfo source +# files. If you have the GNU `makeinfo' utility (the preferred formatter), +# uncomment the next line. +MAKEINFO = makeinfo +# Otherwise, you can use GNU emacs to do the job by uncommenting the next line. +# MAKEINFO = ./makeinfo.sh + +# MANDIR is the root of the man page directory tree. On most systems, this is +# something like /usr/man or /usr/local/man (type `man man' to find out). +MANDIR = /usr/local/man + +# MAN1, MAN3, and MAN5 are the directories in which local man pages for +# section 1 (commands), section 3 (libraries), and section 5 (formats) go. +# You may wish to use $(MANDIR)/manl for all of these; if so, uncomment +# the next three lines. +# MAN1 = $(MANDIR)/manl +# MAN3 = $(MANDIR)/manl +# MAN5 = $(MANDIR)/manl +# Uncomment the next three lines to put the man pages in with the standard +# ones. +MAN1 = $(MANDIR)/man1 +MAN3 = $(MANDIR)/man3 +MAN5 = $(MANDIR)/man5 +# If you want to put the man pages somewhere else, edit `maninst.sh' first. + +# PERL is the full pathname of your perl interpreter, needed for `make htmlpg'. +PERL = /usr/bin/perl + +# PSPRINT is the name of the program that prints PostScript files (needed to +# `make guide' and to `make appguide'). +PSPRINT = lpr + +# TROFF is the name of the program that prints UNIX troff files (needed to +# `make appguide' and for the covers of both guides). Use `groff' if you have +# GNU groff (the preferred formatter). +TROFF = groff +# Use `ptroff' if you have Adobe TranScript software. +# TROFF = ptroff +# Consult your system administrator if you have neither `groff' nor `ptroff'. +# Other (untested) possibilities are `psroff', `ditroff', `nroff', and `troff'. + +# TMAN is the TROFF option needed to load the `man' macro package. This should +# not need to be changed unless your system is non-standard; see the file +# `tmac.dif' for comments on a page-numbering bug in some versions of the `man' +# package. +# TMAN = -man +# Use the alternate definition below to get consecutively numbered pages using +# GNU groff. Omit -rD1 if the final document will be printed on only one side +# of each page. +TMAN = -rC1 -rD1 -man + +# TMS is the TROFF option needed to load the `ms' macro package. Use the +# following definition to get the standard `ms' macros. +# TMS = -ms +# Use the following definition to get the GNU groff version of the `ms' macros. +TMS = -mgs + +# It should not be necessary to modify anything below this line. +# ----------------------------------------------------------------------------- + +.IGNORE: + +all: + +# `make' or `make install': install the man pages +install: $(MAN1) $(MAN3) $(MAN5) + ./maninst.sh $(MAN1) $(MAN3) $(MAN5) "$(SETPERMISSIONS)" + $(LN) $(MAN1)/a2m.1 $(MAN1)/ad2m.1 + $(LN) $(MAN1)/a2m.1 $(MAN1)/m2a.1 + $(LN) $(MAN1)/a2m.1 $(MAN1)/md2a.1 + $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrlomb.1 + $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrmem.1 + $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrplot.1 + $(LN) $(MAN1)/plot2d.1 $(MAN1)/plot3d.1 + $(LN) $(MAN1)/setwfdb.1 $(MAN1)/cshsetwfdb.1 + $(LN) $(MAN1)/view.1 $(MAN1)/vsetup.1 + +uninstall: + ../uninstall $(MAN1) *.1 ad2m.1 m2a.1 md2a.1 hrlomb.1 hrmem.1 \ + hrplot.1 plot3d.1 cshsetwfdb.1 vsetup.1 + ../uninstall $(MAN3) *.3 + ../uninstall $(MAN5) *.5 + +# Create directories for installation if necessary. +$(MAN1): + mkdir -p $(MAN1); $(SETDPERMISSIONS) $(MAN1) +$(MAN3): + mkdir -p $(MAN3); $(SETDPERMISSIONS) $(MAN3) +$(MAN5): + mkdir -p $(MAN5); $(SETDPERMISSIONS) $(MAN5) + +# `make appguide': print the man pages (the Applications Guide) +appguide: + $(TROFF) cover.ag >dbag0.ps + tex dbag + dvips -o dbag1.ps dbag.dvi + tbl appguide.int | $(TROFF) $(TMS) >dbag2.ps + tbl *.1 *.3 *.5 | $(TROFF) $(TMAN) >dbag3.ps + latex install + dvips $(D2PARGS) -o dbag4.ps install.dvi + latex eval + dvips $(D2PARGS) -o dbag5.ps eval.dvi + $(PSPRINT) dbag?.ps + +dbag.ps: + tex dbag + dvips -o dbag1.ps dbag.dvi + tbl appguide.int | $(TROFF) $(TMS) >dbag2.ps + tbl *.1 *.3 *.5 | $(TROFF) $(TMAN) >dbag3.ps + latex install + dvips $(D2PARGS) -o dbag4.ps install.dvi + latex eval + dvips $(D2PARGS) -o dbag5.ps eval.dvi + cat dbag[12345].ps | grep -v '^%%' >dbag.ps + +# `make guide': print the Programmer's Guide +guide: dbpg.ps + $(TROFF) cover.pg >dbpg0.ps + $(PSPRINT) dbpg0.ps dbpg.ps + +dbpg.ps: + texi2dvi $(T2DARGS) dbu.tex + dvips $(D2PARGS) -o dbpg.ps dbu.dvi + +# `make info': create and install emacs info files +info: $(INFODIR) + $(MAKEINFO) dbu.tex + test -s dbpg && \ + cp dbpg* $(INFODIR); \ + ( test -s $(INFODIR)/dbpg && \ + ( $(SETPERMISSIONS) $(INFODIR)/dbpg*; \ + ( test -s $(INFODIR)/dir || cp dir.top $(INFODIR)/dir ); \ + ( grep -s dbpg $(INFODIR)/dir >/dev/null || \ + cat dir.db >>$(INFODIR)/dir ))); \ + rm -f dbpg* + +$(INFODIR): + mkdir -p $(INFODIR); $(SETDPERMISSIONS) $(INFODIR) + +# `make html': create HTML files, check for anything not accessible to MSDOS +html: makehtmldirs htmlag htmlpg + cd $(HTMLDIR); $(DOSCHK); ln -s index.htm index.html + +makehtmldirs: $(HTMLDIR)/dbpg $(HTMLDIR)/dbag + -mkdir $(HTMLDIR) + cp -p index.ht0 $(HTMLDIR)/index.htm + date '+%e %B %Y' >>$(HTMLDIR)/index.htm + cat foot.ht0 >>$(HTMLDIR)/index.htm + -mkdir $(HTMLDIR)/dbpg + -mkdir $(HTMLDIR)/dbag + +$(HTMLDIR): + mkdir -p $(HTMLDIR); $(SETDPERMISSIONS) $(HTMLDIR) +$(HTMLDIR)/dbag: $(HTMLDIR) + mkdir -p $(HTMLDIR)/dbag; $(SETDPERMISSIONS) $(HTMLDIR)/dbag +$(HTMLDIR)/dbpg: $(HTMLDIR) + mkdir -p $(HTMLDIR)/dbpg; $(SETDPERMISSIONS) $(HTMLDIR)/dbpg + +htmlag: makehtmldirs dbag.ps + cp -p icons/* dbag.ps fixag.sh fixag.sed $(HTMLDIR)/dbag + ./manhtml.sh $(HTMLDIR)/dbag *.1 *.3 *.5 + latex2html -dir $(HTMLDIR)/dbag -local_icons -prefix in install + latex2html -dir $(HTMLDIR)/dbag -local_icons -prefix ev eval + rm -f $(HTMLDIR)/dbag/index.html + cd $(HTMLDIR)/dbag; ./fixag.sh *.html; rm -f fixag.sh images.* + cd $(HTMLDIR)/dbag; rm -f .I* .ORIG_MAP *.html *.pl fixag.sed + cp dbag.ht0 $(HTMLDIR)/dbag/dbag.htm + date '+%e %B %Y' >>$(HTMLDIR)/dbag/dbag.htm + cat foot.ht0 >>$(HTMLDIR)/dbag/dbag.htm + cd $(HTMLDIR)/dbag; ln -s dbag.htm index.html + cp intro.ht0 $(HTMLDIR)/dbag/intro.htm + +htmlpg: makehtmldirs dbpg.ps + cp -p dbu.tex dbpg.ps $(HTMLDIR)/dbpg + echo '#!$(PERL)' >$(HTMLDIR)/dbpg/texi2html + cat texi2html >>$(HTMLDIR)/dbpg/texi2html + chmod +x $(HTMLDIR)/dbpg/texi2html + cp dbu.ht0 $(HTMLDIR)/dbpg/dbpg.htm + cd $(HTMLDIR)/dbpg; ./texi2html -short_ext -menu -split_node dbu.tex + rm -f $(HTMLDIR)/dbpg/dbu.tex $(HTMLDIR)/dbpg/texi2html + ./fixpg.sh $(HTMLDIR)/dbpg + date '+%e %B %Y' >>$(HTMLDIR)/dbpg/dbpg.htm + cat foot.ht0 >>$(HTMLDIR)/dbpg/dbpg.htm + cd $(HTMLDIR)/dbpg; ln -s dbpg.htm index.html + +# `make listing': print listings of programs in this directory +listing: + $(PRINT) README Makefile fixag.sed fixag.sh fixpg.sed fixpg.sh \ + makeinfo.sh manhtml.sh maninst.sh tmac.dif +# This directory also contains .latex2html-init, which is a slightly customized +# version of dot.latex2html-init from the latex2html 96.1 distribution; and +# texi2html, included here for convenience since not everyone may have it. +# They are not included in the listings, however, because of their length and +# specialized interest. + +# `make clean': remove intermediate and backup files +clean: + rm -f *.aux *.dvi *.log db*.toc db*.?? db*.??s dbpg* *~ texindex diff -Naur wfdb-10.1.3/doc/appguide.int wfdb-10.1.4/doc/appguide.int --- wfdb-10.1.3/doc/appguide.int Sat Mar 11 21:16:42 2000 +++ wfdb-10.1.4/doc/appguide.int Wed May 24 16:33:52 2000 @@ -1,5 +1,5 @@ \" file: appguide.int G. Moody July 1989 -\" Last revised: 11 March 2000 +\" Last revised: 24 May 2000 \" Table of contents and introduction to the WFDB Applications Guide. \" \" To print this document using GNU groff, use: @@ -32,7 +32,7 @@ \fBSection 1: Applications\fP a2m, ad2m, m2a, md2a utilities for converting between MIT and AHA DB formats 1 bxb ANSI/AAMI-standard beat-by-beat annotation comparator 4 -calibrate calibrate signals of a DB record 6 +calsig calibrate signals of a DB record 6 coherence estimate coherence and cross-spectrum of two time series 8 ecgeval generate and run ECG analyzer evaluation script 9 epic ANSI/AAMI-standard episode-by-episode annotation comparator 10 diff -Naur wfdb-10.1.3/doc/calibrate.1 wfdb-10.1.4/doc/calibrate.1 --- wfdb-10.1.3/doc/calibrate.1 Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.4/doc/calibrate.1 Wed Dec 31 19:00:00 1969 @@ -1,97 +0,0 @@ -.TH CALIBRATE 1 "11 January 2000" "MIT DB software 10.0" "WFDB applications" -.SH NAME -calibrate \- calibrate signals of a WFDB record -.SH SYNOPSIS -\fBcalibrate -r\fR \fIrecord\fR [ \fIoptions\fR ... ] -.SH DESCRIPTION -.PP -\fIcalibrate\fR rewrites the header file for a WFDB record, setting the -gain and baseline fields based on measurements it makes, and setting -the units fields based on input from the user or from a calibration -file. Normally, \fIcalibrate\fR is used by specifying a time interval -for the measurements; best results will be achieved if the specified -interval is restricted to one or more square-wave calibration pulses -in each signal to be calibrated, although sine-wave pulses may be -usable if the sampling frequency and/or ADC resolution is high enough. -.PP -The program constructs a smoothed amplitude histogram for each signal and -identifies its two principal modes. Initially, each bin of the histogram -counts the number of samples in the analysis interval for which the amplitude -has a specified value. The histogram is smoothed by applying a low-pass filter -that replaces the contents of each bin by a weighted sum of fifteen bins -centered on the bin of interest. The two principal modes in the smoothed -histogram must be separated by at least one bin with a count that is less than -one-eighth the count of the larger mode. If this criterion is not satisfied -for a given signal, \fIcalibrate\fR warns the user and does not adjust the gain -or baseline for the affected signal. -.PP -If a signal list is specified using the \fB-s\fR option (see below), only the -specified signals are calibrated, and the gain, baseline, and units fields for -any other signals are left unchanged. Thus, if calibration pulses are not -simultaneously available in all signals to be calibrated, \fIcalibrate\fR may -be run repeatedly with different time intervals and signal lists. -.PP -.PP -\fIOptions\fR include: -.TP -\fB-c\fI file\fR Obtain calibration pulse specifications from the -specified \fIfile\fR (see \fIwfdbcal\fR(5); default: obtain this -information from the file specified by the environment variable -\fBWFDBCAL\fR, or interactively). -.TP -\fB-f\fI time\fR -Begin at the specified \fItime\fR in \fIrecord\fR (default: the beginning of -\fIrecord\fR). -.TP -\fB-h\fR -Print a usage summary. -.TP -\fB-q\fR -Instead of using the standard method for calibration, get a -`quick-and-dirty' estimate by taking the signal amplitudes at the -starting and ending times (as specified by \fB-f\fR and \fB-t\fR) as -representative of the low- and high-amplitude phases of the -calibration pulse. Use this option only if the standard method fails; -the standard method is more accurate. -.TP -\fB-Q\fR -Use an alternate `quick-and-dirty' estimate based on the range of signal -amplitudes over the interval specified by \fB-f\fR and \fB-t\fR. This -method may be easier to use than \fB-q\fR for signals with significant -high-frequency content, since it does not require precise location of signal -extrema. As noted above, the standard method is more accurate if it can be -used. -.TP -\fB-s\fR \fIsignal-list\fR -Calibrate only the signals named in the \fIsignal-list\fR (one or more input -signal numbers, separated by spaces; default: calibrate all signals). -.TP -\fB-t\fI time\fR -Process until the specified \fItime\fR in \fIrecord\fR (default: 1 second after -the starting time). -.TP -\fB-v\fR -Ask for calibration pulse limits (default: read limits from the calibration -file). -.PP -Calibration files must be located in one of the directories named in -the database path (see \fIsetwfdb\fR(1)). If the environment variable -\fBWFDBCAL\fR is set, it names a calibration file that will be read -unless the \fB-c\fR option is used to specify a different calibration -file. At most one calibration file is read; if more than one \fB-c\fR -option is given, only the last one is effective. If the calibration -file does not contain an entry for the type of signal to be -calibrated, \fIcalibrate\fR obtains the information from the user -interactively. If the calibration file contains two or more entries -for the same signal type, only the first entry is used. -.PP -The shell variable \fBWFDB\fR should be set and exported (see -\fIsetwfdb\fR(1)). -.SH BUGS -Under MS-DOS, this program is known as \fIcalibr8\fR. -.SH SEE ALSO -setwfdb(1), wfdbcal(5) -.SH AUTHOR -George B. Moody (george@mit.edu) -.SH SOURCE -http://www.physionet.org/physiotools/wfdb/app/calibrate.c diff -Naur wfdb-10.1.3/doc/calsig.1 wfdb-10.1.4/doc/calsig.1 --- wfdb-10.1.3/doc/calsig.1 Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/doc/calsig.1 Wed May 24 16:26:26 2000 @@ -0,0 +1,95 @@ +.TH CALSIG 1 "24 May 2000" "MIT DB software 10.1.4" "WFDB applications" +.SH NAME +calsig \- calibrate signals of a WFDB record +.SH SYNOPSIS +\fBcalsig -r\fR \fIrecord\fR [ \fIoptions\fR ... ] +.SH DESCRIPTION +.PP +\fIcalsig\fR (formerly known as \fIcalibrate\fR) rewrites the header file for a +WFDB record, setting the gain and baseline fields based on measurements it +makes, and setting the units fields based on input from the user or from a +calibration file. Normally, \fIcalsig\fR is used by specifying a time interval +for the measurements; best results will be achieved if the specified interval +is restricted to one or more square-wave calibration pulses in each signal to +be calibrated, although sine-wave pulses may be usable if the sampling +frequency and/or ADC resolution is high enough. +.PP +The program constructs a smoothed amplitude histogram for each signal and +identifies its two principal modes. Initially, each bin of the histogram +counts the number of samples in the analysis interval for which the amplitude +has a specified value. The histogram is smoothed by applying a low-pass filter +that replaces the contents of each bin by a weighted sum of fifteen bins +centered on the bin of interest. The two principal modes in the smoothed +histogram must be separated by at least one bin with a count that is less than +one-eighth the count of the larger mode. If this criterion is not satisfied +for a given signal, \fIcalsig\fR warns the user and does not adjust the gain +or baseline for the affected signal. +.PP +If a signal list is specified using the \fB-s\fR option (see below), only the +specified signals are calibrated, and the gain, baseline, and units fields for +any other signals are left unchanged. Thus, if calibration pulses are not +simultaneously available in all signals to be calibrated, \fIcalsig\fR may +be run repeatedly with different time intervals and signal lists. +.PP +.PP +\fIOptions\fR include: +.TP +\fB-c\fI file\fR Obtain calibration pulse specifications from the +specified \fIfile\fR (see \fIwfdbcal\fR(5); default: obtain this +information from the file specified by the environment variable +\fBWFDBCAL\fR, or interactively). +.TP +\fB-f\fI time\fR +Begin at the specified \fItime\fR in \fIrecord\fR (default: the beginning of +\fIrecord\fR). +.TP +\fB-h\fR +Print a usage summary. +.TP +\fB-q\fR +Instead of using the standard method for calibration, get a +`quick-and-dirty' estimate by taking the signal amplitudes at the +starting and ending times (as specified by \fB-f\fR and \fB-t\fR) as +representative of the low- and high-amplitude phases of the +calibration pulse. Use this option only if the standard method fails; +the standard method is more accurate. +.TP +\fB-Q\fR +Use an alternate `quick-and-dirty' estimate based on the range of signal +amplitudes over the interval specified by \fB-f\fR and \fB-t\fR. This +method may be easier to use than \fB-q\fR for signals with significant +high-frequency content, since it does not require precise location of signal +extrema. As noted above, the standard method is more accurate if it can be +used. +.TP +\fB-s\fR \fIsignal-list\fR +Calibrate only the signals named in the \fIsignal-list\fR (one or more input +signal numbers, separated by spaces; default: calibrate all signals). +.TP +\fB-t\fI time\fR +Process until the specified \fItime\fR in \fIrecord\fR (default: 1 second after +the starting time). +.TP +\fB-v\fR +Ask for calibration pulse limits (default: read limits from the calibration +file). +.PP +Calibration files must be located in one of the directories named in +the database path (see \fIsetwfdb\fR(1)). If the environment variable +\fBWFDBCAL\fR is set, it names a calibration file that will be read +unless the \fB-c\fR option is used to specify a different calibration +file. At most one calibration file is read; if more than one \fB-c\fR +option is given, only the last one is effective. If the calibration +file does not contain an entry for the type of signal to be +calibrated, \fIcalsig\fR obtains the information from the user +interactively. If the calibration file contains two or more entries +for the same signal type, only the first entry is used. +.PP +The shell variable \fBWFDB\fR should be set and exported (see +\fIsetwfdb\fR(1)). +.SH SEE ALSO +setwfdb(1), wfdbcal(5) +.SH AUTHOR +George B. Moody (george@mit.edu) +.SH SOURCE +http://www.physionet.org/physiotools/wfdb/app/calsig.c diff -Naur wfdb-10.1.3/doc/dbag.ht0 wfdb-10.1.4/doc/dbag.ht0 --- wfdb-10.1.3/doc/dbag.ht0 Sat Mar 11 18:44:41 2000 +++ wfdb-10.1.4/doc/dbag.ht0 Wed May 24 16:32:59 2000 @@ -59,7 +59,7 @@ between MIT and AHA DB formats
  • bxb: ANSI/AAMI-standard beat-by-beat annotation comparator -
  • calibrate: calibrate signals of a WFDB record +
  • calsig: calibrate signals of a WFDB record
  • coherence: estimate coherence and cross-spectrum of two time series
  • ecgeval: generate and run ECG analyzer diff -Naur wfdb-10.1.3/doc/dbu.tex wfdb-10.1.4/doc/dbu.tex --- wfdb-10.1.3/doc/dbu.tex Thu Feb 10 00:05:50 2000 +++ wfdb-10.1.4/doc/dbu.tex Wed May 24 16:32:43 2000 @@ -9,7 +9,7 @@ @sp 5 @center @titlefont{WFDB Programmer's Guide} @sp 4 -@center Tenth Edition (revised and with additions for WFDB library version 10.1.1) +@center Tenth Edition (revised and with additions for WFDB library version 10.1.4) @center @today @sp 5 @center George B. Moody @@ -7327,7 +7327,7 @@ sigamp -r @var{record [ options ...]} sqrs -r @var{record [ options ... ]} sample @var{[ options ... ]} -calibrate -r @var{record [ options ... ]} +calsig -r @var{record [ options ... ]} @end example @file{rdsamp} prints samples from the specified record; @samp{-f} and @@ -7358,7 +7358,7 @@ @file{sigamp} measures signal amplitudes (either baseline-corrected RMS amplitudes or peak-to-peak amplitudes); it may be useful for calibrating -signals (together with @file{calibrate}) or for determining signal gains +signals (together with @file{calsig}) or for determining signal gains for @file{nst}. @cindex QRS detector @@ -7377,9 +7377,9 @@ models. If you create your own database records using @file{sample} or other -means, program @file{calibrate} may be useful for determining signal +means, program @file{calsig} may be useful for determining signal gains and offsets if your signals include standard calibration pulses or -identifiable signal levels. @file{calibrate} incorporates two +identifiable signal levels. @file{calsig} incorporates two independent algorithms for measuring calibration pulses; it rewrites @file{header} files based on its measurements. diff -Naur wfdb-10.1.3/doc/fixag.sed wfdb-10.1.4/doc/fixag.sed --- wfdb-10.1.3/doc/fixag.sed Thu Jun 24 11:38:29 1999 +++ wfdb-10.1.4/doc/fixag.sed Wed May 24 16:31:45 2000 @@ -1,7 +1,6 @@ s/wfdbwhich-1.htm/wfdbwh-1.htm/g s/sumstats-1.htm/sumsta-1.htm/g s/ecgeval-1.htm/ecgeva-1.htm/g -s/calibrate-1.htm/calibr-1.htm/g s/pschart-1.htm/pschar-1.htm/g s/coherence-1.htm/cohere-1.htm/g s/wfdbcollate-1.htm/wfdbco-1.htm/g diff -Naur wfdb-10.1.3/doc/pschart.1 wfdb-10.1.4/doc/pschart.1 --- wfdb-10.1.3/doc/pschart.1 Thu Feb 17 00:14:36 2000 +++ wfdb-10.1.4/doc/pschart.1 Sat May 20 22:21:59 2000 @@ -1,4 +1,4 @@ -.TH PSCHART 1 "12 February 2000" "WFDB software 10.1" "WFDB applications" +.TH PSCHART 1 "20 May 2000" "WFDB software 10.1.3" "WFDB applications" .SH NAME pschart \- produce annotated `chart recordings' on a PostScript device .SH SYNOPSIS @@ -91,6 +91,11 @@ in high-resolution mode (rather, all other signals are resampled at the highest sampling frequency). .TP +\fB-i \fIfile\fR +Print the (text) contents of \fIfile\fR instead of the title in the title area +of the first page of output. The text is printed in a monospaced font; use +spaces rather than tabs in the text to align columns. +.TP \fB-l\fR Label the signals in the margins next to each strip (default: no signal labels). @@ -242,6 +247,11 @@ .TP \fI/usr/local/lib/ps/pschart.pro\fR default PostScript prolog file. +.br +\fI/usr/local/lib/ps/12lead.pro\fR +alternative PostScript prolog file, suitable for printing standard 12-lead +diagnostic ECGs (10 seconds, 4 traces, with the top three traces divided into +2.5 second segments by marker bars). .SH BUGS .PP High quality takes time. A full page, with grids and default scales, typically diff -Naur wfdb-10.1.3/doc/sample.1 wfdb-10.1.4/doc/sample.1 --- wfdb-10.1.3/doc/sample.1 Fri May 5 09:59:51 2000 +++ wfdb-10.1.4/doc/sample.1 Sun Jan 30 04:13:18 2000 @@ -83,16 +83,16 @@ .PP \fIsample\fR runs under MS-DOS on an ISA-bus (AT-bus) system that contains a Microstar DAP 1200 or 2400 series board (available from Microstar -Laboratories, http://www.mstarlabs.com/). All DAP 1200 and 2400 series boards -listed below include 12-bit analog-to-digital and digital-to-analog converters, -analog multiplexers, programmable gain amplifiers, timers, and an Intel 80186 -CPU; DAP 2400 series boards include a Motorola 56001 DSP and provisions for -external triggering. All models have 8 differential (16 single-ended) analog -inputs and 2 analog outputs, and 16 bits each of digital inputs and outputs. -With expansion boards, a single DAP can have up to 256 differential or 512 -single-ended analog inputs, 66 analog outputs, and 128 bits of digital input -and output; it is also possible to use up to seven DAP boards in a single -system. +Laboratories, 2265 116th Avenue NE, Bellevue, WA 98004 USA; telephone +1 206 +453 2345). All DAP 1200 and 2400 series boards listed below include 12-bit +analog-to-digital and digital-to-analog converters, analog multiplexers, +programmable gain amplifiers, timers, and an Intel 80186 CPU; DAP 2400 series +boards include a Motorola 56001 DSP and provisions for external triggering. +All models have 8 differential (16 single-ended) analog inputs and 2 analog +outputs, and 16 bits each of digital inputs and outputs. With expansion +boards, a single DAP can have up to 256 differential or 512 single-ended +analog inputs, 66 analog outputs, and 128 bits of digital input and output; +it is also possible to use up to seven DAP boards in a single system. .PP The range of sampling frequencies available depends on the model. DAP 1200/2 and 1200/3 boards can digitize at aggregate rates of 31.25 to 50,000 Hz; diff -Naur wfdb-10.1.3/doc/setwfdb.1 wfdb-10.1.4/doc/setwfdb.1 --- wfdb-10.1.3/doc/setwfdb.1 Sun Jan 30 04:13:18 2000 +++ wfdb-10.1.4/doc/setwfdb.1 Wed May 24 16:35:35 2000 @@ -1,4 +1,4 @@ -.TH SETWFDB 1 "11 January 2000" "WFDB software 10.0" "WFDB applications" +.TH SETWFDB 1 "24 May 2000" "WFDB software 10.1.4" "WFDB applications" .SH NAME setwfdb, cshsetwfdb \- set WFDB environment variables .SH SYNOPSIS @@ -62,7 +62,7 @@ searching the WFDB path apply to the WFDB calibration file, so the value of \fBWFDBCAL\fR need not be an absolute path name. The WFDB calibration file is used by WFDB applications that need to plot -signals at standard scales, as well as by \fIcalibrate\fR(1), which +signals at standard scales, as well as by \fIcalsig\fR(1), which can determine the baseline and gain of signals if calibration pulses are present and if the parameters of the calibration pulses are described in the calibration file. If \fBWFDBCAL\fR is not set by the diff -Naur wfdb-10.1.3/doc/sigamp.1 wfdb-10.1.4/doc/sigamp.1 --- wfdb-10.1.3/doc/sigamp.1 Sun Jan 30 04:13:18 2000 +++ wfdb-10.1.4/doc/sigamp.1 Wed May 24 16:35:17 2000 @@ -1,4 +1,4 @@ -.TH SIGAMP 1 "11 January 2000" "WFDB software 10.0" "WFDB applications" +.TH SIGAMP 1 "24 May 2000" "WFDB software 10.1.4" "WFDB applications" .SH NAME sigamp \- measure signal amplitudes of a WFDB record .SH SYNOPSIS @@ -47,7 +47,7 @@ The shell variable \fBWFDB\fR should be set and exported (see \fIsetwfdb\fR(1)). .SH SEE ALSO -calibrate(1), setwfdb(1) +calsig(1), setwfdb(1) .SH AUTHOR George B. Moody (george@mit.edu) .SH SOURCE diff -Naur wfdb-10.1.3/doc/wave.1 wfdb-10.1.4/doc/wave.1 --- wfdb-10.1.3/doc/wave.1 Sun Jan 30 04:13:19 2000 +++ wfdb-10.1.4/doc/wave.1 Wed May 24 16:34:54 2000 @@ -1,5 +1,5 @@ '\" t -.TH WAVE 1 "11 January 2000" "WAVE 6.3" "WFDB applications" +.TH WAVE 1 "24 May 2000" "WAVE 6.3" "WFDB applications" .SH NAME wave \- waveform analyzer, viewer, and editor for the X Window System .SH SYNOPSIS @@ -548,7 +548,7 @@ center; l l. \fIMark QRS complexes\fR sqrs -r $RECORD -f $START -t $END -s $SIGNAL - \fICalibrate\fR calibrate -r $RECORD -f $START -t $END -s $SIGNALS + \fICalibrate\fR calsig -r $RECORD -f $START -t $END -s $SIGNALS \fIExtract segment\fR snip -i $RECORD -f $START -t $END -n n_$RECORD \\ -a $ANNOTATOR \fIList annotations\fR rdann -r $RECORD -a $ANNOTATOR -f $START -t $END diff -Naur wfdb-10.1.3/doc/wfdbcal.5 wfdb-10.1.4/doc/wfdbcal.5 --- wfdb-10.1.3/doc/wfdbcal.5 Sun Jan 30 04:13:19 2000 +++ wfdb-10.1.4/doc/wfdbcal.5 Wed May 24 16:34:28 2000 @@ -1,4 +1,4 @@ -.TH WFDBCAL 5 "11 January 2000" "WFDB software 10.0" "WFDB File Formats" +.TH WFDBCAL 5 "24 May 2000" "WFDB software 10.1.4" "WFDB File Formats" .SH NAME wfdbcal \- Waveform Database calibration file format .SH DESCRIPTION @@ -8,7 +8,7 @@ in analog-to-digital converter units, or adus) and physical units. Calibration files specify the physical characteristics of calibration pulses that may be present in various types of signals, and specify -customary scales for plotting these signals. \fIcalibrate\fR(1) reads +customary scales for plotting these signals. \fIcalsig\fR(1) reads the signal file(s) for a record, measures the size of the calibration pulses it finds in adus, and uses specifications from a calibration file to determine adu-to-physical unit conversion parameters, the @@ -45,7 +45,7 @@ treated as comments and ignored. .PP The WFDB library function \fIgetcal\fR, used by programs such as -\fIcalibrate\fR(1), \fIpsfd\fR(1), and \fIwave\fR(1) to obtain calibration +\fIcalsig\fR(1), \fIpsfd\fR(1), and \fIwave\fR(1) to obtain calibration data from a calibration file, returns the first entry that matches a signal's description and units. A calibration file entry is considered to match a signal if the \fBDESC\fR field is either an exact match or a prefix of the @@ -108,7 +108,7 @@ must be located in one of the directories named by the environment variable \fBWFDB\fR (see \fIsetwfdb\fR(1)). .SH SEE ALSO -calibrate(1), setwfdb(1), header(5) +calsig(1), setwfdb(1), header(5) .br .I WFDB Programmer's Guide .SH AUTHOR diff -Naur wfdb-10.1.3/examples/Makefile wfdb-10.1.4/examples/Makefile --- wfdb-10.1.3/examples/Makefile Sun Jan 30 04:13:19 2000 +++ wfdb-10.1.4/examples/Makefile Mon Jun 5 23:33:05 2000 @@ -1,10 +1,10 @@ # file: Makefile G. Moody 2 November 1989 -# Last revised: 4 September 1999 +# Last revised: 23 May 2000 # UNIX 'make' description file for WFDB example programs # # ----------------------------------------------------------------------------- # WFDB example programs: how to use the WFDB library -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # These programs are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the @@ -32,42 +32,137 @@ # for installing them. To compile the examples, just type `make' (from within # this directory); the executable files will be left in this directory. Type # `make clean' to remove them. +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 -# Site-specific variables -# ----------------------- - -# CC is the name of your C compiler. These applications can be compiled with -# K&R C compilers (`cc' on most if not all UNIX systems) as well as with ANSI -# C compilers such as GNU C (`gcc'). To use the K&R C compiler available on -# most UNIX systems, uncomment the next line. -CC = cc -# For `gcc', uncomment the next line. -# CC = gcc - -# INCDIR is the parent of the directory that contains the WFDB include (*.h) -# files. (These files should have been installed in $(INCDIR)/wfdb; see -# ../lib/Makefile.) -INCDIR = /usr/include - -# If you trust your C compiler's optimizer, you may wish to add -O to CFLAGS; -# for debugging, add -g to CFLAGS. (If you use `gcc', you may use both; most -# other C compilers do not permit you to do so.) -CFLAGS = -O -I$(INCDIR) +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ -# LIBDIR is the directory that contains the WFDB library (see ../lib/Makefile). -LIBDIR = /usr/lib +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) # LDFLAGS is appended to the C compiler command line to specify loading the -# DB library. Unless you have changed the value of WFDBLIB in the `Makefile' -# for the WFDB library, `-lwfdb' should be correct. -LDFLAGS = -L$(LIBDIR) -lwfdb +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) # PRINT is the name of the program used to produce listings (including any # options for the desired formatting). PRINT = lpr -# It should not be necessary to modify anything below this line. -# ----------------------------------------------------------------------------- +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 23 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. CFILES = psamples.c exgetvec.c exputvec.c exannstr.c example1.c example2.c \ example3.c example4.c example5.c example6.c example7.c example8.c example9.c \ @@ -82,8 +177,14 @@ .c: $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) -# `make' or `make compile': compile the examples -compile: $(XFILES) +# `make' or `make all': compile the examples +all: $(XFILES) + +# `make install': compile but do no more +install: all + +uninstall: + echo "Nothing to be done for uninstall" # `make listing': print a listing of sources listing: diff -Naur wfdb-10.1.3/examples/Makefile.top wfdb-10.1.4/examples/Makefile.top --- wfdb-10.1.3/examples/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/examples/Makefile.top Wed May 31 05:44:55 2000 @@ -0,0 +1,35 @@ +# file: Makefile G. Moody 2 November 1989 +# Last revised: 23 May 2000 +# UNIX 'make' description file for WFDB example programs +# +# ----------------------------------------------------------------------------- +# WFDB example programs: how to use the WFDB library +# Copyright (C) 2000 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to compile the example +# programs from the WFDB Programmer's Guide, for which the sources can be +# found in this directory. Since these programs are intended for instruction +# rather than `production' use, this `makefile' does not include a procedure +# for installing them. To compile the examples, just type `make' (from within +# this directory); the executable files will be left in this directory. Type +# `make clean' to remove them. +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/examples/Makefile.tpl wfdb-10.1.4/examples/Makefile.tpl --- wfdb-10.1.3/examples/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/examples/Makefile.tpl Mon Jun 5 06:21:41 2000 @@ -0,0 +1,37 @@ +# file: Makefile.tpl G. Moody 23 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. + +CFILES = psamples.c exgetvec.c exputvec.c exannstr.c example1.c example2.c \ + example3.c example4.c example5.c example6.c example7.c example8.c example9.c \ + example10.c refhr.c +XFILES = psamples exgetvec exputvec exannstr example1 example2 example3 \ + example4 example5 example6 example7 example8 example9 example10 refhr +MFILES = Makefile makefile.dos + +# General rule for compiling C sources into executable files. This is +# redundant for most versions of `make', but at least one System V version +# needs it. +.c: + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + +# `make' or `make all': compile the examples +all: $(XFILES) + +# `make install': compile but do no more +install: all + +uninstall: + echo "Nothing to be done for uninstall" + +# `make listing': print a listing of sources +listing: + $(PRINT) README $(MFILES) $(CFILES) + +# `make clean': remove executable, intermediate and backup files +clean: + rm -f $(XFILES) *.o *~ core + +# Odds and ends. +example10.c: + mv exampl10.c example10.c diff -Naur wfdb-10.1.3/lib/Makefile wfdb-10.1.4/lib/Makefile --- wfdb-10.1.3/lib/Makefile Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/lib/Makefile Mon Jun 5 23:33:05 2000 @@ -0,0 +1,230 @@ +# file: Makefile G. Moody 6 July 1983 +# Last revised: 22 May 2000 Version 10.1.4 +# UNIX 'make' description file for compiling the WFDB library +# +# _____________________________________________________________________________ +# wfdb: a library for reading and writing annotated waveforms(time series data) +# Copyright (C) 2000 George B. Moody +# +# This library is free software; you can redistribute it and/or modify it under +# the terms of the GNU Library General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This library 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 Library General Public License for +# more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install the WFDB library. +# Before using it for the first time, check that the site-specific variables +# below are appropriate for your system. To build and install the standard +# WFDB library, type `make' or `make lib' (from within this directory). To +# build and install the alternate WFDB library (not available on all systems), +# type `make slib'. +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ + +# file: linux-slib.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# This section contains settings suitable for generating an ELF-format shared +# library under Linux. + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC +# to 'libwww-config' (a utility supplied with libwww). Otherwise set +# LWC to ':' (a program that does nothing, successfully). +LWC = libwww-config + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options used when compiling the shared +# library. CFLAGS should always include VDEFS. +CFLAGS = -fpic -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# WFDBLIB_BASENAME is the name, without version numbers, of the alternate +# library. WFDBLIB_SONAME is the shared object name ("soname") of the +# alternate library; normally, this includes the base name and the major +# version number only. WFDBLIB is the complete name, including the minor +# version number. Symbolic links from WFDBLIB to WFDBLIB_BASENAME and +# WFDBLIB_SONAME will be created as the final step in building the alternate +# library. +WFDBLIB_BASENAME = libwfdb.so +WFDBLIB_SONAME = $(WFDBLIB_BASENAME).$(MAJOR) +WFDBLIB = $(WFDBLIB_SONAME).$(MINOR) +# For a shared library, the soname is significant for proper run-time binding. +# If you change function interfaces in the library, change its soname by +# incrementing the major version number; when you do this, set the minor +# version number to zero. If you change the library without changing the +# function interfaces, increment the minor version number; this allows existing +# binaries to use the new version without recompilation, since the soname is +# unchanged in this case. + +# BUILDLIB is the command that creates the shared WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = gcc -shared -Wl,-soname,$(WFDBLIB_SONAME) `$(LWC) --libs` \ + -o $(WFDBLIB) + +# LDCONFIG is the name of the program needed to refresh the system's cached +# index of shared libraries. +LDCONFIG = /sbin/ldconfig + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME) + cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME) + @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful + +lib-post-uninstall: + rm -f $(LIBDIR)/$(WFDBLIB_BASENAME) + rm -f $(LIBDIR)/$(WFDBLIB_SONAME) + @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful +#______________________________________________________________________________ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. + +INCLUDES = $(INCDIR)/wfdb/wfdb.h $(INCDIR)/wfdb/ecgcodes.h \ + $(INCDIR)/wfdb/ecgmap.h +COMPAT_INCLUDES = $(INCDIR)/ecg/db.h $(INCDIR)/ecg/ecgcodes.h \ + $(INCDIR)/ecg/ecgmap.h +HFILES = wfdb.h ecgcodes.h ecgmap.h wfdblib.h +CFILES = wfdbinit.c annot.c signal.c calib.c wfdbio.c +OFILES = wfdbinit.o annot.o signal.o calib.o wfdbio.o +MFILES = Makefile makefile.dos + +# `make' or `make all': build the WFDB library +all: $(OFILES) + $(BUILDLIB) $(OFILES) + +# `make install': install the WFDB library and headers +install: $(INCLUDES) $(LIBDIR) all + cp $(WFDBLIB) $(LIBDIR) + $(SETLPERMISSIONS) $(LIBDIR)/$(WFDBLIB) + $(MAKE) lib-post-install + +uninstall: + ../uninstall $(INCDIR)/wfdb $(HFILES) + ../uninstall $(INCDIR) + ../uninstall $(LIBDIR) $(WFDBLIB) + $(MAKE) lib-post-uninstall + ../uninstall $(LIBDIR) + +# `make compat': install the includes needed for source compatibility with +# applications written for pre-version 10.0.0 versions of this library +compat: $(INCLUDES) $(COMPAT_INCLUDES) + +# `make clean': also remove previously compiled versions of the library +clean: + rm -f $(WFDBLIB) $(SWFDBLIB) $(OFILES) *~ + +# `make TAGS': make an `emacs' TAGS file +TAGS: $(HFILES) $(CFILES) + @etags $(HFILES) $(CFILES) + +# `make listing': print a listing of WFDB library sources +listing: + $(PRINT) README $(MFILES) $(HFILES) $(CFILES) + +# Rules for creating installation directories +$(INCDIR): + mkdir -p $(INCDIR); $(SETDPERMISSIONS) $(INCDIR) +$(INCDIR)/wfdb: $(INCDIR) + mkdir -p $(INCDIR)/wfdb; $(SETDPERMISSIONS) $(INCDIR)/wfdb +$(INCDIR)/ecg: $(INCDIR) + mkdir -p $(INCDIR)/ecg; $(SETDPERMISSIONS) $(INCDIR)/ecg +$(LIBDIR): + mkdir -p $(LIBDIR); $(SETDPERMISSIONS) $(LIBDIR) + +# Rules for installing the include files +$(INCDIR)/wfdb/wfdb.h: $(INCDIR)/wfdb wfdb.h + cp -p wfdb.h $(INCDIR)/wfdb; $(SETPERMISSIONS) $(INCDIR)/wfdb/wfdb.h +$(INCDIR)/wfdb/ecgcodes.h: $(INCDIR)/wfdb ecgcodes.h + cp -p ecgcodes.h $(INCDIR)/wfdb + $(SETPERMISSIONS) $(INCDIR)/wfdb/ecgcodes.h +$(INCDIR)/wfdb/ecgmap.h: $(INCDIR)/wfdb ecgmap.h + cp -p ecgmap.h $(INCDIR)/wfdb + $(SETPERMISSIONS) $(INCDIR)/wfdb/ecgmap.h + +# Rules for installing the compatibility (pre-10.0.0) include files +$(INCDIR)/ecg/db.h: $(INCDIR)/ecg db.h + cp -p db.h $(INCDIR)/ecg; $(SETPERMISSIONS) $(INCDIR)/ecg/db.h +$(INCDIR)/ecg/ecgcodes.h: $(INCDIR)/ecg $(INCDIR)/wfdb/ecgcodes.h + ln -s $(INCDIR)/wfdb/ecgcodes.h $(INCDIR)/ecg/ecgcodes.h +$(INCDIR)/ecg/ecgmap.h: $(INCDIR)/ecg $(INCDIR)/wfdb/ecgmap.h + ln -s $(INCDIR)/wfdb/ecgmap.h $(INCDIR)/ecg/ecgmap.h + +# Prerequisites for the library modules +wfdbinit.o: wfdb.h wfdblib.h wfdbinit.c +annot.o: wfdb.h ecgcodes.h ecgmap.h wfdblib.h annot.c +signal.o: wfdb.h wfdblib.h signal.c +calib.o: wfdb.h wfdblib.h calib.c +wfdbio.o: wfdb.h wfdblib.h wfdbio.c diff -Naur wfdb-10.1.3/lib/Makefile.top wfdb-10.1.4/lib/Makefile.top --- wfdb-10.1.3/lib/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/lib/Makefile.top Thu May 25 20:29:40 2000 @@ -0,0 +1,34 @@ +# file: Makefile G. Moody 6 July 1983 +# Last revised: 22 May 2000 Version 10.1.4 +# UNIX 'make' description file for compiling the WFDB library +# +# _____________________________________________________________________________ +# wfdb: a library for reading and writing annotated waveforms(time series data) +# Copyright (C) 2000 George B. Moody +# +# This library is free software; you can redistribute it and/or modify it under +# the terms of the GNU Library General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This library 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 Library General Public License for +# more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install the WFDB library. +# Before using it for the first time, check that the site-specific variables +# below are appropriate for your system. To build and install the standard +# WFDB library, type `make' or `make lib' (from within this directory). To +# build and install the alternate WFDB library (not available on all systems), +# type `make slib'. +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/lib/Makefile.tpl wfdb-10.1.4/lib/Makefile.tpl --- wfdb-10.1.3/lib/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/lib/Makefile.tpl Mon Jun 5 16:39:32 2000 @@ -0,0 +1,80 @@ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. + +INCLUDES = $(INCDIR)/wfdb/wfdb.h $(INCDIR)/wfdb/ecgcodes.h \ + $(INCDIR)/wfdb/ecgmap.h +COMPAT_INCLUDES = $(INCDIR)/ecg/db.h $(INCDIR)/ecg/ecgcodes.h \ + $(INCDIR)/ecg/ecgmap.h +HFILES = wfdb.h ecgcodes.h ecgmap.h wfdblib.h +CFILES = wfdbinit.c annot.c signal.c calib.c wfdbio.c +OFILES = wfdbinit.o annot.o signal.o calib.o wfdbio.o +MFILES = Makefile makefile.dos + +# `make' or `make all': build the WFDB library +all: $(OFILES) + $(BUILDLIB) $(OFILES) + +# `make install': install the WFDB library and headers +install: $(INCLUDES) $(LIBDIR) all + cp $(WFDBLIB) $(LIBDIR) + $(SETLPERMISSIONS) $(LIBDIR)/$(WFDBLIB) + $(MAKE) lib-post-install + +uninstall: + ../uninstall $(INCDIR)/wfdb $(HFILES) + ../uninstall $(INCDIR) + ../uninstall $(LIBDIR) $(WFDBLIB) + $(MAKE) lib-post-uninstall + ../uninstall $(LIBDIR) + +# `make compat': install the includes needed for source compatibility with +# applications written for pre-version 10.0.0 versions of this library +compat: $(INCLUDES) $(COMPAT_INCLUDES) + +# `make clean': also remove previously compiled versions of the library +clean: + rm -f $(WFDBLIB) $(SWFDBLIB) $(OFILES) *~ + +# `make TAGS': make an `emacs' TAGS file +TAGS: $(HFILES) $(CFILES) + @etags $(HFILES) $(CFILES) + +# `make listing': print a listing of WFDB library sources +listing: + $(PRINT) README $(MFILES) $(HFILES) $(CFILES) + +# Rules for creating installation directories +$(INCDIR): + mkdir -p $(INCDIR); $(SETDPERMISSIONS) $(INCDIR) +$(INCDIR)/wfdb: $(INCDIR) + mkdir -p $(INCDIR)/wfdb; $(SETDPERMISSIONS) $(INCDIR)/wfdb +$(INCDIR)/ecg: $(INCDIR) + mkdir -p $(INCDIR)/ecg; $(SETDPERMISSIONS) $(INCDIR)/ecg +$(LIBDIR): + mkdir -p $(LIBDIR); $(SETDPERMISSIONS) $(LIBDIR) + +# Rules for installing the include files +$(INCDIR)/wfdb/wfdb.h: $(INCDIR)/wfdb wfdb.h + cp -p wfdb.h $(INCDIR)/wfdb; $(SETPERMISSIONS) $(INCDIR)/wfdb/wfdb.h +$(INCDIR)/wfdb/ecgcodes.h: $(INCDIR)/wfdb ecgcodes.h + cp -p ecgcodes.h $(INCDIR)/wfdb + $(SETPERMISSIONS) $(INCDIR)/wfdb/ecgcodes.h +$(INCDIR)/wfdb/ecgmap.h: $(INCDIR)/wfdb ecgmap.h + cp -p ecgmap.h $(INCDIR)/wfdb + $(SETPERMISSIONS) $(INCDIR)/wfdb/ecgmap.h + +# Rules for installing the compatibility (pre-10.0.0) include files +$(INCDIR)/ecg/db.h: $(INCDIR)/ecg db.h + cp -p db.h $(INCDIR)/ecg; $(SETPERMISSIONS) $(INCDIR)/ecg/db.h +$(INCDIR)/ecg/ecgcodes.h: $(INCDIR)/ecg $(INCDIR)/wfdb/ecgcodes.h + ln -s $(INCDIR)/wfdb/ecgcodes.h $(INCDIR)/ecg/ecgcodes.h +$(INCDIR)/ecg/ecgmap.h: $(INCDIR)/ecg $(INCDIR)/wfdb/ecgmap.h + ln -s $(INCDIR)/wfdb/ecgmap.h $(INCDIR)/ecg/ecgmap.h + +# Prerequisites for the library modules +wfdbinit.o: wfdb.h wfdblib.h wfdbinit.c +annot.o: wfdb.h ecgcodes.h ecgmap.h wfdblib.h annot.c +signal.o: wfdb.h wfdblib.h signal.c +calib.o: wfdb.h wfdblib.h calib.c +wfdbio.o: wfdb.h wfdblib.h wfdbio.c diff -Naur wfdb-10.1.3/lib/makelib wfdb-10.1.4/lib/makelib --- wfdb-10.1.3/lib/makelib Sun Apr 9 17:17:31 2000 +++ wfdb-10.1.4/lib/makelib Wed May 24 22:35:27 2000 @@ -1,379 +1,3 @@ -# file: makelib G. Moody 6 July 1983 -# Last revised: 9 April 2000 Version 10.1.3 -# UNIX 'make' description file for compiling the WFDB library -# -# _____________________________________________________________________________ -# wfdb: a library for reading and writing annotated waveforms(time series data) -# Copyright (C) 2000 George B. Moody -# -# This library is free software; you can redistribute it and/or modify it under -# the terms of the GNU Library General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# This library 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 Library General Public License for -# more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# You may contact the author by e-mail (george@mit.edu) or postal mail -# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, -# please visit PhysioNet (http://www.physionet.org/). -# _____________________________________________________________________________ -# -# This file is used with the UNIX `make' command to install the WFDB library. -# Before using it for the first time, check that the site-specific variables -# below are appropriate for your system. To build and install the standard -# WFDB library, copy this file to `Makefile', then just type `make' (from -# within this directory). To build and install the alternate WFDB library (not -# available on all systems), type `make slib'. - -# If this file is copied to `Makefile', make compiles the WFDB library without -# NETFILES support. The simplest way to compile with NETFILES support (which -# requires that you have previously installed libwww, see -# http://www.w3.org/Library/), is to copy 'netmake' (rather than this file) to -# 'Makefile' before running 'make' in this directory. (If you do this, the -# definitions in the renamed file take precedence over those below.) As is, -# this file is preconfigured for Linux and requires minor changes for other -# supported operating systems. - -# NETFILES support is known to work well under Linux (with both 2.0 and 2.2 -# series kernels and glibc 2.0 and 2.1) provided that the library is compiled -# as a shared (dynamically loadable) library. The library does not compile -# properly as a static library under Linux if NETFILES is enabled (apparently -# because of redefinitions in the libwww include files). - -# For further information about NETFILES, see README.NETFILES in the top-level -# directory of the WFDB software package. - -# The WFDB library functions assume that a "char" is 8 bits, a "short int" is -# 16 bits, an "int" is at least 16 bits, and a "long" is at least 32 bits. The -# last two assumptions are valid for ANSI C compilers, and for almost all older -# C compilers as well. The assumption most likely to be incorrect is that -# regarding the "short int"; if it is not true, it may be necessary to rewrite -# wfdb_g16() in `wfdbio.c' and r16() in `signal.c'. - -# Version numbers -# --------------- - -# Each release of the WFDB Software Package is identified by a three-part -# version number, defined in this section (unless overridden by settings in the -# top-level Makefile for the WFDB Software Package). See the top-level -# Makefile (in the parent of this directory) for details. -MAJOR = 10 -MINOR = 1 -RELEASE = 3 -VERSION = $(MAJOR).$(MINOR).$(RELEASE) - -# Historical note: Versions earlier than 10.0.0, released between 1981 and -# 1998, were known as the DB library. The name was changed in 1999 for -# version 10.0.0 because of the proliferation of another, more general-purpose, -# DB library (the BSD version of the UNIX dbm library), with which this library -# should not be confused. - -# Site-specific variables -# ----------------------- - -# CC is the name of your C compiler. The WFDB library can be compiled with K&R -# C compilers (`cc' on most if not all UNIX systems) as well as with ANSI C -# compilers such as GNU C (`gcc'). To use the vendor-supplied C compiler -# available on most UNIX systems, uncomment the next line. -CC = cc -# For `gcc', uncomment the next line (and see CFLAGS and SCFLAGS below). -# CC = gcc -# On systems such as Linux where `gcc' is the standard C compiler, `gcc' may -# also be known as `cc'; in such cases, it doesn't matter if CC is cc or gcc. - -# INCDIR is a directory searched by CC for #include <...> files. -# Add -I$(INCDIR) to CFLAGS (below) if you change INCDIR. -INCDIR = /usr/include - -# CCDEFS is the set of C compiler options needed to set preprocessor variables -# while compiling the WFDB Software Package. You should include definitions of -# the major, minor, and release numbers, as shown below. Add the following -# options to CCDEFS as appropriate (separating them by spaces if you use more -# than one): -# -DISPRINTF if you do not have `stdlib.h' and your `sprintf' returns an -# int (see wfdblib.h) -# -DNETFILES if you have libwww and want to be able to access WFDB files -# remotely via http or ftp (as well as local files) -# -DNOMALLOC_H if you have neither `stdlib.h' nor `malloc.h' (see wfdblib.h) -# -DNOSTRTOK if your standard C library does not include function `strtok' -# (see wfdbio.c) -# -DNOTIME if you do not have `time.h' (see signal.c) -# -DOLDC if you have neither `stdarg.h' nor `varargs.h' (see wfdbio.c) -# -DSOLARIS if you are using Solaris #include <...> files (see wfdb.h) -# If your C compiler fails to compile `signal.c', add -DBROKEN_CC to CCDEFS -# and try again (see signal.c). -CCDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) - -# CFLAGS is the set of C compiler options. CFLAGS should always include -# CCDEFS. Add the following options to CFLAGS as appropriate (separating them -# by spaces if you use more than one): -# -g to save symbols for debugging -# -O if you trust your C compiler's optimizer -# -I$(INCDIR) if you have changed the value of INCDIR (above) -# With the exception of `gcc', most C compilers do not allow you to use -g and -# -O simultaneously. -CFLAGS = -g $(CCDEFS) -# `gcc' users may comment out the previous line, and uncomment the next one. -# CFLAGS = -g -O $(CCDEFS) -# Note: If your operating system supports shared (also known as dynamically -# loaded or run-time linked) libraries, as well as conventional static -# (compile-time linked) libraries, a good strategy is to compile a shared -# library with optimization (-O) and a static library with debugging symbols -# (-g). The default in most cases is for your program to be linked to shared -# libraries if they are available, so this approach gives you the benefit of -# optimization in the WFDB library by default. In order to use a debugger with -# your program, however, you will probably need to compile an unoptimized -# version of it (unless you are using `gcc'), with debugging symbols, and link -# it to static libraries (unless you are debugging with `gdb'); so in this case -# it won't hurt (and may be useful) to have debugging symbols for the WFDB -# library as well. - -# LIBDIR should be one of the directories searched by CC's loader for -l... -# libraries. You will also need to have write permission in LIBDIR. If you -# plan to make a shared WFDB library (see below), note that WFDB application -# users will need to have read permission in LIBDIR. -LIBDIR = /usr/lib - -# WFDBLIB is the name of the standard WFDB library. In order to access it via -# `-lwfdb', WFDBLIB should be `libwfdb.a'. -WFDBLIB = libwfdb.a - -# If your system requires indexed libraries, uncomment the next two lines. -LFILES = $(OFILES) -RANLIB = ranlib -# Otherwise, if your system requires ordered libraries, uncomment the next two -# lines. (As distributed, this file contains a sorted list of OFILES already.) -# LFILES = `lorder $(OFILES) | tsort` -# RANLIB = : -# Otherwise, uncomment the next two lines. -# LFILES = $(OFILES) -# RANLIB = : - -# AR is the name of the command used to build a standard library from `.o' -# files, and ARFLAGS is the set of options used when doing so. AR and ARFLAGS -# are usually `make' builtins and need not be defined here; under HP UX, and -# perhaps other versions of UNIX, however, you will need to define these -# variables by uncommenting the next two lines. -# AR = ar -# ARFLAGS = rv - -# BUILDLIB is the command to be used to create WFDBLIB once all of its -# components have been compiled separately. This will not usually need to be -# changed. -BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) $(LFILES) - -# PRINT is the name of the program used to produce listings (including any -# options for the desired formatting). -PRINT = lpr - -# SETDPERMISSIONS is similarly used to make directories created during the -# installation accessible. -SETDPERMISSIONS = chmod 755 - -# SETPERMISSIONS is the command needed to make the installed files accessible -# to those who will use them. The value given below makes them readable by -# everyone, and writeable by the owner only. (If you perform the installation -# as `root', `root' is the owner of the installed files.) -SETPERMISSIONS = chmod 644 - -#............................................................................. - -# Ignore this section of site-specific variables unless your system supports -# two or more types of libraries. As distributed, this section contains -# settings suitable for generating an ELF-format shared library under Linux. -# By selecting alternative settings below, you can make a shared library with -# `cc' under SunOS or Solaris, `gcc' version 2.0 or later (tested under SunOS, -# Solaris, Linux, and HP/UX), or with `cc' or `gcc' under UNIX SVR4 (not -# tested). By modifying these settings, this mechanism can be used to generate -# other types of variant libraries (e.g., for alternative memory models on -# systems that support more than one, or using an alternative C compiler or -# cross-compiler). - -# SCC is the C compiler to be used for the alternate library. -SCC = $(CC) - -# SINCDIR is a directory searched by SCC for include <...> files. -# Add -I$(SINCDIR) to SCFLAGS (below) if you change SINCDIR. -SINCDIR = $(INCDIR) - -# SCFLAGS is the set of C compiler options used when compiling the alternate -# library. For SunOS `cc', uncomment the next line. -# SCFLAGS = -pic -O $(CCDEFS) -# For Solaris or SVR4 `cc', uncomment the next line. -# SCFLAGS = -K PIC -O $(CCDEFS) -# For `gcc', uncomment the next line. -SCFLAGS = -fpic -g -O $(CCDEFS) -# For `gcc' with NETFILES, uncomment the next line. -# SCFLAGS = -fpic -g -O $(CCDEFS) -DNETFILES `libwww-config --cflags` -# See comments on CFLAGS (above). If you don't have `gdb', you won't be able -# to debug the shared library, so you might want to remove the `-g' option in -# that case. - -# SLIBDIR is the directory in which the alternate library is to be installed. -SLIBDIR = $(LIBDIR) - -# SWFDBLIB_BASENAME is the name, without version numbers, of the alternate -# library. SWFDBLIB_SONAME is the shared object name ("soname") of the -# alternate library; normally, this includes the base name and the major -# version number only. SWFDBLIB is the complete name, including the minor -# version number. Symbolic links from SWFDBLIB to SWFDBLIB_BASENAME and -# SWFDBLIB_SONAME will be created as the final step in building the alternate -# library. If you are building a shared library, these links are necessary; -# otherwise they are not required. -SWFDBLIB_BASENAME = libwfdb.so -SWFDBLIB_SONAME = $(SWFDBLIB_BASENAME).$(MAJOR) -SWFDBLIB = $(SWFDBLIB_SONAME).$(MINOR) -# For a shared library, the soname is significant for proper run-time binding. -# If you change function interfaces in the library, change its soname by -# incrementing the major version number; when you do this, set the minor -# version number to zero. If you change the library without changing the -# function interfaces, increment the minor version number; this allows existing -# binaries to use the new version without recompilation, since the soname is -# unchanged in this case. - -# SLIBOBJS is the list of *.o modules to be included in the alternate library. -# This should match OFILES below, and should not need to be changed. -SLIBOBJS = wfdbinit.o annot.o signal.o calib.o wfdbio.o - -# SBUILDLIB is the command that creates the alternate library once its -# components have been compiled separately. For SunOS 4.x, using either `cc' -# or `gcc', uncomment the next line. -# SBUILDLIB = ld -o $(SWFDBLIB) -assert pure-text $(SLIBOBJS) -# For Solaris, uncomment the next line instead. -# SBUILDLIB = ld -o $(SWFDBLIB) -G -z text $(SLIBOBJS) -# For SVR4, uncomment the next line instead. -# SBUILDLIB = ld -o $(SWFDBLIB) -z text $(SLIBOBJS) -# For (at least some versions of) HP/UX, uncomment the next line instead. -# SBUILDLIB = ld -b -o $(SWFDBLIB) $(SLIBOBJS) -# For Linux without NETFILES (see above), uncomment the next line instead. -SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) -o $(SWFDBLIB) \ - $(SLIBOBJS) -# For Linux with NETFILES (see above), add -DNETFILES to CCDEFS and uncomment -# the next line instead. -# SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) \ -# `libwww-config --libs` -o $(SWFDBLIB) $(SLIBOBJS) - -# SRANLIB is the name of the program used to index the alternate library. -# Shared libraries are not generally indexed. -SRANLIB = : - -# LDCONFIG is the name of the program needed to refresh the system's cached -# index of shared libraries (needed under SunOS and Linux). -# Under SunOS, use /usr/etc/ldconfig. -# LDCONFIG = /usr/etc/ldconfig $(SLIBDIR) -# Under Linux, use /sbin/ldconfig. -LDCONFIG = /sbin/ldconfig -# Under Solaris, SVR4, and other operating systems that do not maintain a -# cached index of shared libraries, uncomment the next line. -# LDCONFIG = : - -# SMAKE is the `make' command that is to be executed when `make slib' is run. -SMAKE = $(MAKE) CC=$(SCC) "CFLAGS=$(SCFLAGS)" INCDIR=$(SINCDIR) \ - LIBDIR=$(SLIBDIR) WFDBLIB=$(SWFDBLIB) "BUILDLIB=$(SBUILDLIB)" \ - RANLIB=$(SRANLIB) "LDCONFIG=$(LDCONFIG)" - -# It should not be necessary to modify anything below this line. -# ----------------------------------------------------------------------------- - -INCLUDES = $(INCDIR)/wfdb/wfdb.h $(INCDIR)/wfdb/ecgcodes.h \ - $(INCDIR)/wfdb/ecgmap.h -COMPAT_INCLUDES = $(INCDIR)/ecg/db.h $(INCDIR)/ecg/ecgcodes.h \ - $(INCDIR)/ecg/ecgmap.h -HFILES = wfdb.h ecgcodes.h ecgmap.h wfdblib.h -CFILES = wfdbinit.c annot.c signal.c calib.c wfdbio.c -OFILES = wfdbinit.o annot.o signal.o calib.o wfdbio.o -MFILES = Makefile makefile.dos - -# `make' or `make install': build and install the WFDB library and includes -install: $(LIBDIR)/$(WFDBLIB) -$(LIBDIR)/$(WFDBLIB): $(INCDIR) $(LIBDIR) $(INCLUDES) $(OFILES) - $(BUILDLIB) - cp $(WFDBLIB) $(LIBDIR) - $(SETPERMISSIONS) $(LIBDIR)/$(WFDBLIB) - $(RANLIB) $(LIBDIR)/$(WFDBLIB) - -# `make compat': install the includes needed for source compatibility with -# applications written for pre-version 10.0.0 versions of this library -compat: $(INCLUDES) $(COMPAT_INCLUDES) - -# `make lib': build the library in the current directory -lib: $(OFILES) - $(BUILDLIB) - $(RANLIB) $(WFDBLIB) - -# `make slib-test': build the alternate WFDB library in the current directory -slib-test: - $(MAKE) tidy - $(SMAKE) lib - $(MAKE) tidy - -# `make slib': build and install the alternate WFDB library -slib: - $(MAKE) tidy - $(SMAKE) - $(MAKE) tidy - cd $(SLIBDIR); ln -sf $(SWFDBLIB) $(SWFDBLIB_BASENAME) - cd $(SLIBDIR); ln -sf $(SWFDBLIB) $(SWFDBLIB_SONAME) - @$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful - -# `make tidy': remove intermediate and backup files -tidy: - rm -f $(OFILES) *~ - # `make clean': also remove previously compiled versions of the library clean: - rm -f $(WFDBLIB) $(SWFDBLIB) $(OFILES) *~ - -# `make TAGS': make an `emacs' TAGS file -TAGS: $(HFILES) $(CFILES) - @etags $(HFILES) $(CFILES) - -# `make listing': print a listing of WFDB library sources -listing: - $(PRINT) README $(MFILES) $(HFILES) $(CFILES) - -# Rules for creating installation directories -$(INCDIR): - -mkdir $(INCDIR) - -$(SETDPERMISSIONS) $(INCDIR) -$(LIBDIR): - -mkdir $(LIBDIR) - -$(SETDPERMISSIONS) $(LIBDIR) - -# Rules for installing the include files -$(INCDIR)/wfdb: $(INCDIR) - -mkdir $(INCDIR)/wfdb - -$(SETDPERMISSIONS) $(INCDIR)/wfdb -$(INCDIR)/wfdb/wfdb.h: $(INCDIR)/wfdb wfdb.h - cp -p wfdb.h $(INCDIR)/wfdb; $(SETPERMISSIONS) $(INCDIR)/wfdb/wfdb.h -$(INCDIR)/wfdb/ecgcodes.h: $(INCDIR)/wfdb ecgcodes.h - cp -p ecgcodes.h $(INCDIR)/wfdb - $(SETPERMISSIONS) $(INCDIR)/wfdb/ecgcodes.h -$(INCDIR)/wfdb/ecgmap.h: $(INCDIR)/wfdb ecgmap.h - cp -p ecgmap.h $(INCDIR)/wfdb - $(SETPERMISSIONS) $(INCDIR)/wfdb/ecgmap.h - -# Rules for installing the compatibility (pre-10.0.0) include files -$(INCDIR)/ecg: $(INCDIR) - -mkdir $(INCDIR)/ecg - -$(SETDPERMISSIONS) $(INCDIR)/ecg -$(INCDIR)/ecg/db.h: $(INCDIR)/ecg db.h - cp -p db.h $(INCDIR)/ecg; $(SETPERMISSIONS) $(INCDIR)/ecg/db.h -$(INCDIR)/ecg/ecgcodes.h: $(INCDIR)/ecg $(INCDIR)/wfdb/ecgcodes.h - ln -s $(INCDIR)/wfdb/ecgcodes.h $(INCDIR)/ecg/ecgcodes.h -$(INCDIR)/ecg/ecgmap.h: $(INCDIR)/ecg $(INCDIR)/wfdb/ecgmap.h - ln -s $(INCDIR)/wfdb/ecgmap.h $(INCDIR)/ecg/ecgmap.h - -# Prerequisites for the library modules -wfdbinit.o: wfdb.h wfdblib.h wfdbinit.c -annot.o: wfdb.h ecgcodes.h ecgmap.h wfdblib.h annot.c -signal.o: wfdb.h wfdblib.h signal.c -calib.o: wfdb.h wfdblib.h calib.c -wfdbio.o: wfdb.h wfdblib.h wfdbio.c + rm -f libwfdb.* *.o *~ diff -Naur wfdb-10.1.3/lib/netmake wfdb-10.1.4/lib/netmake --- wfdb-10.1.3/lib/netmake Sun Apr 9 17:17:07 2000 +++ wfdb-10.1.4/lib/netmake Wed Dec 31 19:00:00 1969 @@ -1,107 +0,0 @@ -# file: netmake G. Moody 30 January 2000 -# Last revised: 9 April 2000 WFDB 10.1.3 -# Redefine make variables to compile a NETFILES-enabled WFDB library -# -# _____________________________________________________________________________ -# wfdb: a library for reading and writing annotated waveforms(time series data) -# Copyright (C) 2000 George B. Moody -# -# This library is free software; you can redistribute it and/or modify it under -# the terms of the GNU Library General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# This library 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 Library General Public License for -# more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# You may contact the author by e-mail (george@mit.edu) or postal mail -# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, -# please visit PhysioNet (http://www.physionet.org/). -# _____________________________________________________________________________ -# -# This is a 'make' description file intended to be used if you wish to compile -# the WFDB library with support for reading remote files via HTTP and FTP -# (a capability called NETFILES support in the documentation of the WFDB library). -# In order to do this successfully, you must have previously installed the World -# Wide Web Consortium's libwww library, which may be downloaded freely from -# http://www.w3.org/Library/, -# -# The standard 'make' description file provided in this directory, 'makelib', -# does not include NETFILES support. Rather than duplicate all of the common -# definitions in 'makelib', this file simply redefines those that must differ -# when compiling with NETFILES support, and then invokes another instance of -# 'make' on the standard 'makelib', but with the new definitions overriding -# the old ones. If this file is renamed 'Makefile', 'make' will read it -# by default, and all of this will happen automagically. The script -# 'configure' (in the directory above this one) renames this file if libwww -# has been installed, so that a simple 'make' in that directory is all that is -# required. -# -# NETFILES support is known to work well under Linux (with both 2.0 and 2.2 -# series kernels and glibc 2.0 and 2.1) provided that the library is compiled -# as a shared (dynamically loadable) library. The library does not compile -# properly as a static library under Linux if NETFILES is enabled (apparently -# because of redefinitions in the libwww include files). -# -# For further information about NETFILES, see README.NETFILES in the top-level -# directory of the WFDB software package. - -# These should exactly match the values in makelib. They are needed here -# because other variables are constructed using these. -MAJOR = 10 -MINOR = 1 -RELEASE = 3 -CCDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) -SWFDBLIB_BASENAME = libwfdb.so -SWFDBLIB_SONAME = $(SWFDBLIB_BASENAME).$(MAJOR) -SWFDBLIB = $(SWFDBLIB_SONAME).$(MINOR) -SLIBOBJS = wfdbinit.o annot.o signal.o calib.o wfdbio.o - -# SCFLAGS is the set of C compiler options used when compiling the shared library. -SCFLAGS = -fpic -g -O $(CCDEFS) -DNETFILES `libwww-config --cflags` - -# SBUILDLIB is the command that creates the alternate library once its -# components have been compiled separately. This version has been tested on Linux -# and should work on other versions of UNIX where gcc is available. -SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) \ - `libwww-config --libs` -o $(SWFDBLIB) $(SLIBOBJS) - -# This command causes the 'make' processes spawned from this one to use the -# standard `make' description file after incorporating the definitions above. -MAKE = make -f makelib - -# 'make' targets: Each target in 'makelib' should have an identically named -# target here. - -install: - $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" install - -compat: - $(MAKE) compat - -slib-test: - $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" slib-test - -slib: - $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" slib - -lib: - $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" lib - -tidy: - $(MAKE) tidy - -clean: - $(MAKE) clean - -TAGS: - $(MAKE) TAGS - -listing: - $(MAKE) listing diff -Naur wfdb-10.1.3/lib/wfdb.h wfdb-10.1.4/lib/wfdb.h --- wfdb-10.1.3/lib/wfdb.h Sun Apr 9 17:18:54 2000 +++ wfdb-10.1.4/lib/wfdb.h Mon Jun 5 23:33:05 2000 @@ -1,5 +1,5 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 11 March 2000 wfdblib 10.1.2 + Last revised: 22 May 2000 wfdblib 10.1.4 WFDB library type, constant, structure, and function interface definitions _______________________________________________________________________________ @@ -33,7 +33,8 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 1 -#define WFDB_RELEASE 3 +#define WFDB_RELEASE 4 +#define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ /* Determine what type of compiler is being used. */ #ifdef __STDC__ /* true for ANSI C compilers only */ diff -Naur wfdb-10.1.3/lib/wfdbinit.c wfdb-10.1.4/lib/wfdbinit.c --- wfdb-10.1.3/lib/wfdbinit.c Sun Jan 30 04:13:20 2000 +++ wfdb-10.1.4/lib/wfdbinit.c Tue May 23 01:20:51 2000 @@ -1,9 +1,9 @@ /* file: wfdbinit.c G. Moody 23 May 1983 - Last revised: 15 September 1999 wfdblib 10.1.0 + Last revised: 23 May 2000 wfdblib 10.1.4 WFDB library functions wfdbinit, wfdbquit, and wfdbflush _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -49,7 +49,7 @@ { wfdb_anclose(); /* close annotation files, reset variables */ wfdb_sigclose(); /* close signals, reset variables */ -#ifdef NETFILES +#if WFDB_NETFILES wfdb_wwwquit(); /* release any resources allocated by libwww */ #endif } diff -Naur wfdb-10.1.3/lib/wfdbio.c wfdb-10.1.4/lib/wfdbio.c --- wfdb-10.1.3/lib/wfdbio.c Sun Jan 30 17:35:01 2000 +++ wfdb-10.1.4/lib/wfdbio.c Tue May 23 01:25:15 2000 @@ -62,8 +62,8 @@ (http and ftp) files, were first implemented in version 10.0.1 by Michael Dakin. Thanks, Mike! -These functions, defined here if NETFILES is defined, are intended only for -the use of the functions in the next group below (except for wfdb_wwwquit, +These functions, defined here if WFDB_NETFILES is non-zero, are intended only +for the use of the functions in the next group below (except for wfdb_wwwquit, their definitions are not visible outside of this file): wfdb_wwwquit * (shut down libwww cleanly) www_init (initialize libwww) @@ -99,9 +99,9 @@ implemented; for this reason, several of the functions listed above are stubs (placeholders) only, as noted. -These functions, also defined here, are compiled only if NETFILES is defined; -they permit access to remote files via http or ftp (using libwww) as well as -to local files (using the standard C I/O functions). The functions in this +These functions, also defined here, are compiled only if WFDB_NETFILES is non- +zero; they permit access to remote files via http or ftp (using libwww) as well +as to local files (using the standard C I/O functions). The functions in this group are intended primarily for use by other WFDB library functions, but may also be called directly by WFDB applications that need to read remote files. Unlike other private functions in the WFDB library, the interfaces to these @@ -121,11 +121,11 @@ wfdb_putc (emulates putc, for local files only) wfdb_fopen (emulates fopen, but returns a WFDB_FILE pointer) -(If NETFILES is not defined, wfdblib.h defines all but the last of these +(If WFDB_NETFILES is zero, wfdblib.h defines all but the last of these functions as macros that invoke the standard I/O functions that they would otherwise emulate. The implementation of wfdb_fopen is below; it includes -a small amount of code compiled only if NETFILES is defined. All of these -functions are new in version 10.0.1.) +a small amount of code compiled only if WFDB_NETFILES is non-zero. All of +these functions are new in version 10.0.1.) Finally, this file includes several miscellaneous functions needed only in certain environments: @@ -626,7 +626,7 @@ va_list args; va_start(args, format); -#ifdef NETFILES +#if WFDB_NETFILES if (wp->type == WFDB_NET) ret = nf_vfprintf(wp->fp, format, args); else @@ -931,8 +931,8 @@ supported in the future.) If you do not wish to allow access to remote files, or if libwww is not -available, simply do not define the symbol NETFILES when compiling the -WFDB library. If the symbol NETFILES is not defined, wfdblib.h defines +available, simply define the symbol WFDB_NETFILES as 0 when compiling the +WFDB library. If the symbol WFDB_NETFILES is zero, wfdblib.h defines wfdb_fread as fread, wfdb_fwrite as fwrite, etc.; thus in this case, the I/O is performed using the standard C I/O functions, and the function definitions in the next section are not compiled. This behavior exactly @@ -940,14 +940,14 @@ (which did not support remote file access), with no additional run-time overhead. -If NETFILES is defined, however, these functions are compiled. The WFDB_FILE -pointers that are among the arguments to these functions point to objects that -may contain either (local) FILE handles or (remote) NETFILE handles, depending -on the value of the 'type' member of the WFDB_FILE object. All access to local -files is handled by passing the 'fp' member of the WFDB_FILE object to the -appropriate standard C I/O function. Access to remote files via http or ftp -is handled by passing the 'netfp' member of the WFDB_FILE object to the -appropriate libwww function(s). +If WFDB_NETFILES is non-zero, however, these functions are compiled. The +WFDB_FILE pointers that are among the arguments to these functions point to +objects that may contain either (local) FILE handles or (remote) NETFILE +handles, depending on the value of the 'type' member of the WFDB_FILE object. +All access to local files is handled by passing the 'fp' member of the +WFDB_FILE object to the appropriate standard C I/O function. Access to remote +files via http or ftp is handled by passing the 'netfp' member of the WFDB_FILE +object to the appropriate libwww function(s). In order to read remote files, the WFDB environment variable should include one or more components that specify http:// or ftp:// URL prefixes. These @@ -963,7 +963,7 @@ to set the search order in any way you wish, as in this example. */ -#ifdef NETFILES +#if WFDB_NETFILES static int nf_open_files = 0; /* number of open netfiles */ static long page_size = NF_PAGE_SIZE; /* bytes per range request (0: disable @@ -1503,7 +1503,7 @@ return (putc(c, wp->fp)); } -#endif /* NETFILES */ +#endif /* WFDB_NETFILES */ WFDB_FILE *wfdb_fopen(fname, mode) const char *fname, *mode; @@ -1517,7 +1517,7 @@ } while (*p) if (*p++ == ':' && *p++ == '/' && *p++ == '/') { -#ifdef NETFILES +#if WFDB_NETFILES if (wp->netfp = nf_fopen(fname, mode)) { wp->type = WFDB_NET; return (wp); diff -Naur wfdb-10.1.3/lib/wfdblib.h wfdb-10.1.4/lib/wfdblib.h --- wfdb-10.1.3/lib/wfdblib.h Sun Jan 30 13:03:59 2000 +++ wfdb-10.1.4/lib/wfdblib.h Tue May 23 01:19:44 2000 @@ -1,5 +1,5 @@ /* file: wfdblib.h G. Moody 13 April 1989 - Last revised: 30 January 2000 wfdblib 10.1.1 + Last revised: 23 May 2000 wfdblib 10.1.4 External definitions for WFDB library private functions _______________________________________________________________________________ @@ -31,6 +31,8 @@ symbols reserved to the library begin with the characters "wfdb_". */ +#include "wfdb.h" + /* Define the symbol _WINDLL if this library is to be compiled as a Microsoft Windows DLL. Note that a DLL's private functions (such as those listed below) *cannot* be called by Windows user programs, which can call only DLL functions @@ -73,7 +75,7 @@ /* DEFWFDBP is the default value of the WFDB path if the WFDB environment variable is not set. In most cases, it is sufficient to use the string "." for this purpose (thus restricting the search for DB files to the current -directory). If NETFILES support is enabled, the setting below adds the +directory). If WFDB_NETFILES support is enabled, the setting below adds the web-accessible PhysioBank databases to the default path; you may wish to change this to use a nearby PhysioNet mirror (for a list of mirrors, see http://www.physionet.org/mirrors/). DEFWFDBP must not be NULL, however. @@ -91,7 +93,7 @@ # define __STDC__ # endif #else -# ifdef NETFILES +# if WFDB_NETFILES # define DEFWFDBP ". http://www.physionet.org/physiobank/database" # else # define DEFWFDBP "." @@ -167,9 +169,9 @@ typedef struct WFDB_FILE WFDB_FILE; /* To enable http and ftp access as well as standard (local file) I/O via the - WFDB library, define NETFILES and link with libwww (see 'Makefile'). + WFDB library, define WFDB_NETFILES=1 and link with libwww (see 'Makefile'). Otherwise, the WFDB library uses only the ANSI/ISO standard I/O library. */ -#ifdef NETFILES +#if WFDB_NETFILES #include #include #include @@ -216,7 +218,7 @@ extern int wfdb_putc(int c, WFDB_FILE *fp); extern void wfdb_wwwquit(void); -#else /* NETFILES not defined -- use standard I/O functions only */ +#else /* WFDB_NETFILES = 0 -- use standard I/O functions only */ #define wfdb_fclose(wp) fclose(wp->fp) #define wfdb_feof(wp) feof(wp->fp) @@ -231,8 +233,6 @@ #define wfdb_putc(c, wp) putc(c, wp->fp) #endif - -#include "wfdb.h" /* The following block is needed only to declare the values returned by malloc() (either char * or void *) and sprintf() (either int or char *). diff -Naur wfdb-10.1.3/psd/Makefile wfdb-10.1.4/psd/Makefile --- wfdb-10.1.3/psd/Makefile Wed Apr 26 01:36:57 2000 +++ wfdb-10.1.4/psd/Makefile Mon Jun 5 23:33:05 2000 @@ -1,5 +1,5 @@ # file: Makefile G. Moody 9 December 1991 -# Last revised: 12 February 2000 +# Last revised: 23 May 2000 # # ----------------------------------------------------------------------------- # `make' description file for PSD estimation programs @@ -30,32 +30,115 @@ # variables below are appropriate for your system. To build and install these # applications and their man pages, just type `make' (from within this # directory). +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 -# Site-specific variables -# ----------------------- +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ -# CC is the name of your C compiler. These applications can be compiled with -# K&R C compilers (`cc' on most if not all UNIX systems) as well as with ANSI -# C compilers such as GNU C (`gcc'). To use the K&R C compiler available on -# most UNIX systems, uncomment the next line. -CC = cc -# For `gcc', uncomment the next line. -# CC = gcc - -# If you trust your C compiler's optimizer, you may wish to add -O to CFLAGS; -# for debugging, add -g to CFLAGS. (If you use `gcc', you may use both; most -# other C compilers do not permit you to do so.) -CFLAGS = -O +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` # BINDIR specifies the directory in which the applications will be installed; # it should be a directory in the PATH of those who will use the applications. -# You will need to have write permission in BINDIR. -BINDIR = /usr/local/bin +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 -# SETXPERMISSIONS is the command needed to make the installed files accessible -# to those who will use them. The value given below makes them readable and -# executable by everyone, and writeable by the owner only. (If you perform the -# installation as `root', `root' is the owner of the installed files.) +# SETXPERMISSIONS is the command needed to make the applications accessible. SETXPERMISSIONS = chmod 755 # STRIP is the command used to compact the compiled binaries by removing their @@ -65,8 +148,19 @@ # uncomment the next line. # STRIP = : -# It should not be necessary to modify anything below this line. -# ----------------------------------------------------------------------------- +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. # Programs to be compiled. XFILES = coherence fft log10 lomb memse @@ -74,16 +168,16 @@ # Shell scripts to be installed. SCRIPTS = hrfft hrlomb hrmem hrplot plot2d plot3d +# `make all': build applications +all: $(XFILES) + $(STRIP) $(XFILES) + # `make' or `make install': build and install applications, clean up -install: all scripts +install: $(BINDIR) all scripts cp $(XFILES) $(BINDIR) cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) $(MAKE) clean -# `make all': build applications -all: $(XFILES) - $(STRIP) $(XFILES) - # `make scripts': customize and install scripts scripts: sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/hrfft @@ -93,6 +187,9 @@ cp plot2d plot3d $(BINDIR) $(SETXPERMISSIONS) $(SCRIPTS) +uninstall: + ../uninstall $(BINDIR) $(XFILES) $(SCRIPTS) + coherence: coherence.c $(CC) -o coherence -O coherence.c -lm @@ -111,3 +208,7 @@ # `make clean': remove intermediate and backup files. clean: rm -f *.o *~ $(XFILES) + +# Create directory for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) diff -Naur wfdb-10.1.3/psd/Makefile.top wfdb-10.1.4/psd/Makefile.top --- wfdb-10.1.3/psd/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/psd/Makefile.top Wed May 31 05:45:03 2000 @@ -0,0 +1,33 @@ +# file: Makefile G. Moody 9 December 1991 +# Last revised: 23 May 2000 +# +# ----------------------------------------------------------------------------- +# `make' description file for PSD estimation programs +# Copyright (C) 2000 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to install the power spectral +# density (PSD) estimation applications that come with the WFDB Software +# Package. Before using it for the first time, check that the site-specific +# variables below are appropriate for your system. To build and install these +# applications and their man pages, just type `make' (from within this +# directory). +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/psd/Makefile.tpl wfdb-10.1.4/psd/Makefile.tpl --- wfdb-10.1.3/psd/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/psd/Makefile.tpl Mon Jun 5 06:51:25 2000 @@ -0,0 +1,54 @@ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# This section of the Makefile should not need to be changed. + +# Programs to be compiled. +XFILES = coherence fft log10 lomb memse + +# Shell scripts to be installed. +SCRIPTS = hrfft hrlomb hrmem hrplot plot2d plot3d + +# `make all': build applications +all: $(XFILES) + $(STRIP) $(XFILES) + +# `make' or `make install': build and install applications, clean up +install: $(BINDIR) all scripts + cp $(XFILES) $(BINDIR) + cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) + $(MAKE) clean + +# `make scripts': customize and install scripts +scripts: + sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/hrfft + sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/hrlomb + sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/hrmem + sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/hrplot + cp plot2d plot3d $(BINDIR) + $(SETXPERMISSIONS) $(SCRIPTS) + +uninstall: + ../uninstall $(BINDIR) $(XFILES) $(SCRIPTS) + +coherence: coherence.c + $(CC) -o coherence -O coherence.c -lm + +fft: fft.c + $(CC) -o fft -O fft.c -lm + +log10: log10.c + $(CC) -o log10 -O log10.c -lm + +lomb: lomb.c + $(CC) -o lomb -O lomb.c -lm + +memse: memse.c + $(CC) -o memse -O memse.c -lm + +# `make clean': remove intermediate and backup files. +clean: + rm -f *.o *~ $(XFILES) + +# Create directory for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) diff -Naur wfdb-10.1.3/psd/lomb.c wfdb-10.1.4/psd/lomb.c --- wfdb-10.1.3/psd/lomb.c Sun Jan 30 04:13:20 2000 +++ wfdb-10.1.4/psd/lomb.c Tue May 23 23:20:14 2000 @@ -1,9 +1,9 @@ /* file: lomb.c G. Moody 12 February 1992 - Last revised: 5 May 1999 + Last revised: 23 May 2000 ------------------------------------------------------------------------------- lomb: Lomb periodogram of real data -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody 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 @@ -44,7 +44,11 @@ #include #include +#ifndef hpux #define NMAX 65536 /* maximum number of inputs */ +#else +#define NMAX 64000 +#endif static long lmaxarg1, lmaxarg2; #define LMAX(a,b) (lmaxarg1 = (a),lmaxarg2 = (b), (lmaxarg1 > lmaxarg2 ? \ diff -Naur wfdb-10.1.3/uninstall wfdb-10.1.4/uninstall --- wfdb-10.1.3/uninstall Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/uninstall Mon Jun 5 16:32:42 2000 @@ -0,0 +1,25 @@ +#!/bin/sh +# file: uninstall G. Moody 5 June 2000 + +case $# in + 0) echo "usage: $0 DIRECTORY [FILE ...]" + exit ;; +esac + +DIR=$1 +if [ -d $DIR ] +then + cd $DIR + shift + for FILE in $* + do + rm -f $FILE + done + cd .. + + # Note that the rmdir command below will fail if DIR is not empty. + # This is a *feature*, not a bug -- don't fix it! + rmdir $DIR || echo "(Ignored)" +else + echo "uninstall: $DIR does not exist" +fi diff -Naur wfdb-10.1.3/wave/Makefile wfdb-10.1.4/wave/Makefile --- wfdb-10.1.3/wave/Makefile Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/wave/Makefile Mon Jun 5 23:33:05 2000 @@ -0,0 +1,376 @@ +# file: Makefile G. Moody 1 May 1990 +# Last revised: 23 May 2000 WAVE 6.3 +# `make' description file for WAVE +# +# ----------------------------------------------------------------------------- +# WAVE: Waveform analyzer, viewer, and editor +# Copyright (C) 2000 George B. Moody +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to compile and install WAVE. +# WAVE can be compiled and run only on UNIX systems, although any networked +# system with an X11 server can be used to view its output; suitable servers +# are available for MS-DOS, the Macintosh, and VAX VMS as well as UNIX. +# In order to compile WAVE, you must have already installed the X11 Xlib +# (libX11.a), XView (libxview.a), and WFDB (libwfdb.a) libraries, and their +# associated header files (in /usr/include/X11, /usr/include/xview, and +# /usr/include/ecg respectively). The WFDB library source is included with the +# WAVE distribution (in the `lib' directory at the same level as this one). +# Xlib and XView are freely available by anonymous FTP as parts of the X11R4 +# distribution from expo.lcs.mit.edu and other sites, or from the MIT Software +# Distribution Center, MIT Room E32-300, Cambridge, MA 02139 USA; telephone +# +1-617-253-6966. See the main help file (wave.hl0, in this directory) for +# further information. +# +# Before using this file for the first time, check that the site-specific +# variables below are appropriate for your system. To build and install WAVE, +# just type `make' (from within this directory). +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ + +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# Change the settings below as appropriate for your setup. + +# WAVEVERSION is the WAVE version number. +WAVEVERSION = 6.3 + +# Choose directories in which to install WAVE and its ancillary files by +# editing the variables below. You will need write permission in all of them +# in order to install WAVE successfully, and WAVE users will need read +# permission in all of them. If the directories don't exist already, they +# will be created with appropriate permissions by the installation procedure. + +# This section of site-dependent variables specifies the locations in your +# file system where the WAVE software and data files will be installed. +# You may choose a different set of locations if you prefer, but documentation +# included in this package generally assumes that you have used the defaults +# given here. You will need write permission in all of the directories named +# in this section, and users of the software will need read permission in all +# of these directories. Generally, you will need `root' permissions in order +# to install the software in the standard places. + +# HELPDIR specifies the directory in which the on-line help files are kept. +# The installation procedure creates a subdirectory, `wave', in HELPDIR, and +# installs several files there. +HELPDIR = $(WFDBROOT)/help + +# MENUDIR specifies the directory in which the default analysis menu file is +# kept. +MENUDIR = $(WFDBROOT)/lib + +# RESDIR specifies the directory in which X11 client resource files are kept. +RESDIR = $(WFDBROOT)/lib/X11/app-defaults + +# OPENWINHOME specifies the root directory of the OpenWindows hierarchy. +# This is usually /usr/openwin. +OPENWINHOME = /usr/openwin + +# OWINCDIR is the directory in which the `xview' directory containing XView +# *.h files is found. +OWINCDIR = $(OPENWINHOME)/include + +# OWLIBDIR is the directory in which the XView library is found. +OWLIBDIR = $(OPENWINHOME)/lib + +# WCFLAGS is the set of C compiler options. +WCFLAGS = $(CFLAGS) -I$(OWINCDIR) + +# HELPOBJ can be set to "help.o" if you wish to recompile the XView spot help +# functions in "help.c" (recommended under Linux). +HELPOBJ = help.o +# Otherwise, use the version in libxview by uncommenting the next line: +# HELPOBJ = + +# WLDFLAGS is the set of loader options appended to the C compiler command line +# to specify loading the WFDB, XView, and Xlib libraries. +WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L/usr/X11R6/lib -lxview -lolgx -lX11 +# Users of Red Hat Linux 5.0 or 5.1 (not later versions), use this instead: +# WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L/usr/X11R6/lib \ +# /usr/openwin/lib/libxview.a /usr/openwin/lib/libolgx.a -lX11 +# This setting avoids incompatibilities with the shared (dynamic) libraries. +# If you use another version of Linux, or another OS, and have difficulty +# related to WAVE's Analysis commands window, try this workaround, and let +# me know if it works (or if it doesn't work). + +# It should not be necessary to modify anything below this line. +# ----------------------------------------------------------------------------- + +HFILES = wave.h bitmaps.h xvwave.h +CFILES = wave.c init.c mainpan.c modepan.c helppan.c logpan.c annpan.c edit.c \ + grid.c sig.c annot.c analyze.c scope.c search.c xvwave.c help.c +OFILES = wave.o init.o mainpan.o modepan.o helppan.o logpan.o annpan.o edit.o \ + grid.o sig.o annot.o analyze.o scope.o search.o xvwave.o $(HELPOBJ) +HELPFILES = analysis.hlp buttons.hlp editing.hlp faq.hlp intro.hlp log.hlp \ + printing.hlp resource.hlp +OTHERFILES = wave.hl0 wave.info wave.pro demo.txt Wave.res wavemenu.def \ + Makefile + +all: wave + +# `make install': compile and install WAVE and its help files +install: $(BINDIR) $(HELPDIR)/wave $(MENUDIR) $(RESDIR) wave wave.hlp + sed s/WAVEVERSION/$(WAVEVERSION)/ wave.pro + $(STRIP) wave; cp wave $(BINDIR); $(SETXPERMISSIONS) $(BINDIR)/wave + cp $(HELPFILES) wave.hlp wave.info wave.pro demo.txt $(HELPDIR)/wave + -ln -s $(HELPDIR)/wave/wave.pro $(HELPDIR)/wave/news.hlp + cd $(HELPDIR)/wave; $(SETPERMISSIONS) $(HELPFILES) news.hlp wave.info \ + wave.pro demo.txt + -cp wavemenu.def $(MENUDIR) && \ + $(SETPERMISSIONS) $(MENUDIR)/wavemenu.def + -cp Wave.res $(RESDIR)/Wave && $(SETPERMISSIONS) $(RESDIR)/Wave + +uninstall: + ../uninstall $(BINDIR) wave + ../uninstall $(HELPDIR)/wave $(HELPFILES) wave.hlp wave.info wave.pro \ + demo.txt news.hlp + rmdir $(HELPDIR) || echo "(Ignored)" + ../uninstall $(MENUDIR) wavemenu.def + ../uninstall $(RESDIR) Wave + ../uninstall $(LIBDIR)/X11 + ../uninstall $(LIBDIR) + +wave: $(OFILES) + $(CC) -o wave $(OFILES) $(WLDFLAGS) + +# `make help': show help text +help: + @echo "*************************************************************" + @echo "To print the WAVE manual, type 'make manual'." + @echo "If you have a PostScript Printer, you may also wish to print" + @echo "the WAVE User's Guide, by typing 'make guide'." + @echo "*************************************************************" + @echo + @echo -n "Press to view the manual on-screen: " + @read x + @echo + @soelim wave.hl0 | more + @echo + @echo "*************************************************************" + @echo "To print the WAVE manual, type 'make manual'." + @echo "If you have a PostScript Printer, you may also wish to print" + @echo "the WAVE User's Guide, by typing 'make guide'." + @echo "*************************************************************" + +wave-static: $(OFILES) + $(CC) -o wave-static $(OFILES) -static $(LDFLAGS) + +soelim: soelim.c + $(CC) -o soelim -O soelim.c + +wave.hlp: soelim wave.hl0 $(HELPFILES) + ./soelim wave.hl0 >wave.hlp + +wave.pro: + sed s/WAVEVERSION/$(WAVEVERSION)/ wave.pro + +# `make manual': print the on-line manual +manual: + ./soelim wave.hl0 | $(PRINT) + +# `make guide': print the WAVE User's Guide +guide: + cd ../../manuals/wavguide; make guide + +# `make TAGS': make an `emacs' TAGS file +TAGS: $(HFILES) $(CFILES) + @etags $(HFILES) $(CFILES) + +# `make clean': remove intermediate and backup files +clean: + rm -f soelim wave wave-static *.o *~ wave.hlp wave.pro + +# `make listing': print a listing of WAVE sources +listing: wave.hlp wave.pro + $(PRINT) README REGCARD $(HFILES) $(CFILES) $(HELPFILES) $(OTHERFILES) + +# Dependencies and special rules for compilation of the modules of `wave' +wave.o: wave.h wave.c + $(CC) -c $(WCFLAGS) -DHELPDIR=\"$(HELPDIR)\" wave.c +init.o: wave.h xvwave.h init.c + $(CC) -c $(WCFLAGS) init.c +mainpan.o: wave.h xvwave.h mainpan.c Makefile + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" mainpan.c +modepan.o: wave.h xvwave.h modepan.c + $(CC) -c $(WCFLAGS) modepan.c +helppan.o: wave.h xvwave.h helppan.c + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" helppan.c +logpan.o: wave.h xvwave.h logpan.c + $(CC) -c $(WCFLAGS) logpan.c +annpan.o: wave.h xvwave.h annpan.c + $(CC) -c $(WCFLAGS) annpan.c +edit.o: wave.h xvwave.h edit.c + $(CC) -c $(WCFLAGS) edit.c +grid.o: wave.h xvwave.h grid.c + $(CC) -c $(WCFLAGS) grid.c +search.o: wave.h xvwave.h search.c + $(CC) -c $(WCFLAGS) search.c +sig.o: wave.h xvwave.h sig.c + $(CC) -c $(WCFLAGS) sig.c +annot.o: wave.h xvwave.h annot.c + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" annot.c +analyze.o: wave.h xvwave.h analyze.c + $(CC) -c $(WCFLAGS) -DMENUDIR=\"$(MENUDIR)\" analyze.c +scope.o: wave.h xvwave.h scope.c + $(CC) -c $(WCFLAGS) scope.c +xvwave.o: wave.h xvwave.h bitmaps.h xvwave.c + $(CC) -c $(WCFLAGS) -DRESDIR=\"$(RESDIR)\" xvwave.c +help.o: help.c + $(CC) -c $(WCFLAGS) -w help.c + +# Create directories for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) +$(HELPDIR): + mkdir -p $(HELPDIR); $(SETDPERMISSIONS) $(HELPDIR) +$(HELPDIR)/wave: + mkdir -p $(HELPDIR)/wave; $(SETDPERMISSIONS) $(HELPDIR)/wave +$(MENUDIR): + mkdir -p $(MENUDIR); $(SETDPERMISSIONS) $(MENUDIR) +$(RESDIR): + mkdir -p $(RESDIR); $(SETDPERMISSIONS) $(RESDIR) diff -Naur wfdb-10.1.3/wave/Makefile.top wfdb-10.1.4/wave/Makefile.top --- wfdb-10.1.3/wave/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/wave/Makefile.top Wed May 31 05:46:27 2000 @@ -0,0 +1,46 @@ +# file: Makefile G. Moody 1 May 1990 +# Last revised: 23 May 2000 WAVE 6.3 +# `make' description file for WAVE +# +# ----------------------------------------------------------------------------- +# WAVE: Waveform analyzer, viewer, and editor +# Copyright (C) 2000 George B. Moody +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to compile and install WAVE. +# WAVE can be compiled and run only on UNIX systems, although any networked +# system with an X11 server can be used to view its output; suitable servers +# are available for MS-DOS, the Macintosh, and VAX VMS as well as UNIX. +# In order to compile WAVE, you must have already installed the X11 Xlib +# (libX11.a), XView (libxview.a), and WFDB (libwfdb.a) libraries, and their +# associated header files (in /usr/include/X11, /usr/include/xview, and +# /usr/include/ecg respectively). The WFDB library source is included with the +# WAVE distribution (in the `lib' directory at the same level as this one). +# Xlib and XView are freely available by anonymous FTP as parts of the X11R4 +# distribution from expo.lcs.mit.edu and other sites, or from the MIT Software +# Distribution Center, MIT Room E32-300, Cambridge, MA 02139 USA; telephone +# +1-617-253-6966. See the main help file (wave.hl0, in this directory) for +# further information. +# +# Before using this file for the first time, check that the site-specific +# variables below are appropriate for your system. To build and install WAVE, +# just type `make' (from within this directory). +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/wave/Makefile.tpl wfdb-10.1.4/wave/Makefile.tpl --- wfdb-10.1.3/wave/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/wave/Makefile.tpl Mon Jun 5 17:46:03 2000 @@ -0,0 +1,203 @@ +# file: Makefile.tpl G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# Change the settings below as appropriate for your setup. + +# WAVEVERSION is the WAVE version number. +WAVEVERSION = 6.3 + +# Choose directories in which to install WAVE and its ancillary files by +# editing the variables below. You will need write permission in all of them +# in order to install WAVE successfully, and WAVE users will need read +# permission in all of them. If the directories don't exist already, they +# will be created with appropriate permissions by the installation procedure. + +# This section of site-dependent variables specifies the locations in your +# file system where the WAVE software and data files will be installed. +# You may choose a different set of locations if you prefer, but documentation +# included in this package generally assumes that you have used the defaults +# given here. You will need write permission in all of the directories named +# in this section, and users of the software will need read permission in all +# of these directories. Generally, you will need `root' permissions in order +# to install the software in the standard places. + +# HELPDIR specifies the directory in which the on-line help files are kept. +# The installation procedure creates a subdirectory, `wave', in HELPDIR, and +# installs several files there. +HELPDIR = $(WFDBROOT)/help + +# MENUDIR specifies the directory in which the default analysis menu file is +# kept. +MENUDIR = $(WFDBROOT)/lib + +# RESDIR specifies the directory in which X11 client resource files are kept. +RESDIR = $(WFDBROOT)/lib/X11/app-defaults + +# OPENWINHOME specifies the root directory of the OpenWindows hierarchy. +# This is usually /usr/openwin. +OPENWINHOME = /usr/openwin + +# OWINCDIR is the directory in which the `xview' directory containing XView +# *.h files is found. +OWINCDIR = $(OPENWINHOME)/include + +# OWLIBDIR is the directory in which the XView library is found. +OWLIBDIR = $(OPENWINHOME)/lib + +# WCFLAGS is the set of C compiler options. +WCFLAGS = $(CFLAGS) -I$(OWINCDIR) + +# HELPOBJ can be set to "help.o" if you wish to recompile the XView spot help +# functions in "help.c" (recommended under Linux). +HELPOBJ = help.o +# Otherwise, use the version in libxview by uncommenting the next line: +# HELPOBJ = + +# WLDFLAGS is the set of loader options appended to the C compiler command line +# to specify loading the WFDB, XView, and Xlib libraries. +WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L/usr/X11R6/lib -lxview -lolgx -lX11 +# Users of Red Hat Linux 5.0 or 5.1 (not later versions), use this instead: +# WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L/usr/X11R6/lib \ +# /usr/openwin/lib/libxview.a /usr/openwin/lib/libolgx.a -lX11 +# This setting avoids incompatibilities with the shared (dynamic) libraries. +# If you use another version of Linux, or another OS, and have difficulty +# related to WAVE's Analysis commands window, try this workaround, and let +# me know if it works (or if it doesn't work). + +# It should not be necessary to modify anything below this line. +# ----------------------------------------------------------------------------- + +HFILES = wave.h bitmaps.h xvwave.h +CFILES = wave.c init.c mainpan.c modepan.c helppan.c logpan.c annpan.c edit.c \ + grid.c sig.c annot.c analyze.c scope.c search.c xvwave.c help.c +OFILES = wave.o init.o mainpan.o modepan.o helppan.o logpan.o annpan.o edit.o \ + grid.o sig.o annot.o analyze.o scope.o search.o xvwave.o $(HELPOBJ) +HELPFILES = analysis.hlp buttons.hlp editing.hlp faq.hlp intro.hlp log.hlp \ + printing.hlp resource.hlp +OTHERFILES = wave.hl0 wave.info wave.pro demo.txt Wave.res wavemenu.def \ + Makefile + +all: wave + +# `make install': compile and install WAVE and its help files +install: $(BINDIR) $(HELPDIR)/wave $(MENUDIR) $(RESDIR) wave wave.hlp + sed s/WAVEVERSION/$(WAVEVERSION)/ wave.pro + $(STRIP) wave; cp wave $(BINDIR); $(SETXPERMISSIONS) $(BINDIR)/wave + cp $(HELPFILES) wave.hlp wave.info wave.pro demo.txt $(HELPDIR)/wave + -ln -s $(HELPDIR)/wave/wave.pro $(HELPDIR)/wave/news.hlp + cd $(HELPDIR)/wave; $(SETPERMISSIONS) $(HELPFILES) news.hlp wave.info \ + wave.pro demo.txt + -cp wavemenu.def $(MENUDIR) && \ + $(SETPERMISSIONS) $(MENUDIR)/wavemenu.def + -cp Wave.res $(RESDIR)/Wave && $(SETPERMISSIONS) $(RESDIR)/Wave + +uninstall: + ../uninstall $(BINDIR) wave + ../uninstall $(HELPDIR)/wave $(HELPFILES) wave.hlp wave.info wave.pro \ + demo.txt news.hlp + rmdir $(HELPDIR) || echo "(Ignored)" + ../uninstall $(MENUDIR) wavemenu.def + ../uninstall $(RESDIR) Wave + ../uninstall $(LIBDIR)/X11 + ../uninstall $(LIBDIR) + +wave: $(OFILES) + $(CC) -o wave $(OFILES) $(WLDFLAGS) + +# `make help': show help text +help: + @echo "*************************************************************" + @echo "To print the WAVE manual, type 'make manual'." + @echo "If you have a PostScript Printer, you may also wish to print" + @echo "the WAVE User's Guide, by typing 'make guide'." + @echo "*************************************************************" + @echo + @echo -n "Press to view the manual on-screen: " + @read x + @echo + @soelim wave.hl0 | more + @echo + @echo "*************************************************************" + @echo "To print the WAVE manual, type 'make manual'." + @echo "If you have a PostScript Printer, you may also wish to print" + @echo "the WAVE User's Guide, by typing 'make guide'." + @echo "*************************************************************" + +wave-static: $(OFILES) + $(CC) -o wave-static $(OFILES) -static $(LDFLAGS) + +soelim: soelim.c + $(CC) -o soelim -O soelim.c + +wave.hlp: soelim wave.hl0 $(HELPFILES) + ./soelim wave.hl0 >wave.hlp + +wave.pro: + sed s/WAVEVERSION/$(WAVEVERSION)/ wave.pro + +# `make manual': print the on-line manual +manual: + ./soelim wave.hl0 | $(PRINT) + +# `make guide': print the WAVE User's Guide +guide: + cd ../../manuals/wavguide; make guide + +# `make TAGS': make an `emacs' TAGS file +TAGS: $(HFILES) $(CFILES) + @etags $(HFILES) $(CFILES) + +# `make clean': remove intermediate and backup files +clean: + rm -f soelim wave wave-static *.o *~ wave.hlp wave.pro + +# `make listing': print a listing of WAVE sources +listing: wave.hlp wave.pro + $(PRINT) README REGCARD $(HFILES) $(CFILES) $(HELPFILES) $(OTHERFILES) + +# Dependencies and special rules for compilation of the modules of `wave' +wave.o: wave.h wave.c + $(CC) -c $(WCFLAGS) -DHELPDIR=\"$(HELPDIR)\" wave.c +init.o: wave.h xvwave.h init.c + $(CC) -c $(WCFLAGS) init.c +mainpan.o: wave.h xvwave.h mainpan.c Makefile + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" mainpan.c +modepan.o: wave.h xvwave.h modepan.c + $(CC) -c $(WCFLAGS) modepan.c +helppan.o: wave.h xvwave.h helppan.c + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" helppan.c +logpan.o: wave.h xvwave.h logpan.c + $(CC) -c $(WCFLAGS) logpan.c +annpan.o: wave.h xvwave.h annpan.c + $(CC) -c $(WCFLAGS) annpan.c +edit.o: wave.h xvwave.h edit.c + $(CC) -c $(WCFLAGS) edit.c +grid.o: wave.h xvwave.h grid.c + $(CC) -c $(WCFLAGS) grid.c +search.o: wave.h xvwave.h search.c + $(CC) -c $(WCFLAGS) search.c +sig.o: wave.h xvwave.h sig.c + $(CC) -c $(WCFLAGS) sig.c +annot.o: wave.h xvwave.h annot.c + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" annot.c +analyze.o: wave.h xvwave.h analyze.c + $(CC) -c $(WCFLAGS) -DMENUDIR=\"$(MENUDIR)\" analyze.c +scope.o: wave.h xvwave.h scope.c + $(CC) -c $(WCFLAGS) scope.c +xvwave.o: wave.h xvwave.h bitmaps.h xvwave.c + $(CC) -c $(WCFLAGS) -DRESDIR=\"$(RESDIR)\" xvwave.c +help.o: help.c + $(CC) -c $(WCFLAGS) -w help.c + +# Create directories for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) +$(HELPDIR): + mkdir -p $(HELPDIR); $(SETDPERMISSIONS) $(HELPDIR) +$(HELPDIR)/wave: + mkdir -p $(HELPDIR)/wave; $(SETDPERMISSIONS) $(HELPDIR)/wave +$(MENUDIR): + mkdir -p $(MENUDIR); $(SETDPERMISSIONS) $(MENUDIR) +$(RESDIR): + mkdir -p $(RESDIR); $(SETDPERMISSIONS) $(RESDIR) diff -Naur wfdb-10.1.3/wave/faq.hlp wfdb-10.1.4/wave/faq.hlp --- wfdb-10.1.3/wave/faq.hlp Sun Jan 30 04:13:21 2000 +++ wfdb-10.1.4/wave/faq.hlp Wed May 24 16:38:25 2000 @@ -1,5 +1,5 @@ This is the WAVE FAQ (frequently asked questions) list. It was last revised on -7 January 2000 (recent changes are marked with `*' below). +24 May 2000 (recent changes are marked with `*' below). Hardware questions: * Can I use WAVE if I don't have a SparcStation? @@ -415,10 +415,10 @@ not been determined, or is incorrect, the size of the signal as drawn by WAVE may be incorrect as well. If you know the physical values that correspond to at least two levels represented in the signal (for example, - the top and bottom of a calibration pulse), you can use the `calibrate' + the top and bottom of a calibration pulse), you can use the `calsig' application to determine the gain and to rewrite the header file. See the - WFDB Applications Guide for details. `calibrate' can be most - conveniently run from WAVE's Analysis panel. + WFDB Applications Guide for details. `calsig' can be most conveniently run + from WAVE's Analysis panel. - Finally, the display calibration determines the number of pixels per inch (25.4 mm). WAVE usually gets its information about the display calibration from the X server, but the X server may not supply the correct information. diff -Naur wfdb-10.1.3/wave/makewave wfdb-10.1.4/wave/makewave --- wfdb-10.1.3/wave/makewave Sat Apr 1 07:24:59 2000 +++ wfdb-10.1.4/wave/makewave Wed May 24 22:35:27 2000 @@ -65,37 +65,37 @@ # of these directories. Generally, you will need `root' permissions in order # to install the software in the standard places. To do so, uncomment the next # line. -INSTALL = /usr +WFDBROOT = /usr # If you do not have `root' permissions, a reasonable alternative to the # standard installation is to put everything into directories called `include' # and `local' within the current directory (or any other writeable directory). # To use the current directory for this purpose, replace `xxx' below with the # full pathname of the current directory, and uncomment the next line. -# INSTALL = xxx +# WFDBROOT = xxx # BINDIR specifies the directory in which WAVE is to be installed; it should # be a directory in the PATH of those who will use WAVE. -BINDIR = $(INSTALL)/local/bin +BINDIR = $(WFDBROOT)/local/bin # INCDIR should be one of the directories searched by your C compiler for # #include <...> files. -INCDIR = $(INSTALL)/include +INCDIR = $(WFDBROOT)/include # HELPDIR specifies the directory in which the on-line help files are kept. # The installation procedure creates a subdirectory, `wave', in HELPDIR, and # installs several files there. -HELPDIR = $(INSTALL)/local/help +HELPDIR = $(WFDBROOT)/local/help # LIBDIR should be one of the directories searched by CC's loader for -l... # libraries. -LIBDIR = $(INSTALL)/local/lib +LIBDIR = $(WFDBROOT)/local/lib # MENUDIR specifies the directory in which the default analysis menu file is # kept. -MENUDIR = $(INSTALL)/local/lib +MENUDIR = $(WFDBROOT)/local/lib # RESDIR specifies the directory in which X11 client resource files are kept. -RESDIR = $(INSTALL)/lib/X11/app-defaults +RESDIR = $(WFDBROOT)/lib/X11/app-defaults # CC is the name of your C compiler. WAVE can be compiled with K&R C compilers # (`cc' on most if not all UNIX systems) as well as with ANSI C compilers such diff -Naur wfdb-10.1.3/wave/nomake wfdb-10.1.4/wave/nomake --- wfdb-10.1.3/wave/nomake Thu Mar 30 15:33:00 2000 +++ wfdb-10.1.4/wave/nomake Mon Jun 5 23:31:48 2000 @@ -1,13 +1,19 @@ # file: nomake G. Moody 30 January 2000 -# +# Last revised: 5 June 2000 # If renamed as 'Makefile', this file prevents WAVE from being compiled # on systems that don't have XView installed. -install: - @echo "Skipping installation of WAVE (XView required)." +all: + @echo "Skipping compilation of WAVE (XView required)." wave: @echo "Skipping compilation of WAVE (XView required)." +install: + @echo "Skipping installation of WAVE (XView required)." + +uninstall: + @echo "Nothing to uninstall from wave" + clean: - make -f makewave clean \ No newline at end of file + rm -f soelim wave wave-static *.o *~ wave.hlp wave.pro diff -Naur wfdb-10.1.3/wave/wavemenu.def wfdb-10.1.4/wave/wavemenu.def --- wfdb-10.1.3/wave/wavemenu.def Sun Jan 30 04:13:23 2000 +++ wfdb-10.1.4/wave/wavemenu.def Wed May 24 16:37:39 2000 @@ -1,5 +1,5 @@ # file: wavemenu.def G. Moody 17 August 1990 -# Last revised: 6 January 2000 +# Last revised: 24 May 2000 # WAVE analysis menu # ----------------------------------------------------------------------------- # WAVE: Waveform analyzer, viewer, and editor @@ -79,7 +79,7 @@ # Button labels Commands # ------------- -------- Mark QRS complexes sqrs -r $RECORD -f $START -t $END -s $SIGNAL -Calibrate calibrate -r $RECORD -f $START -t $END -s $SIGNALS +Calibrate calsig -r $RECORD -f $START -t $END -s $SIGNALS Extract segment snip -i $RECORD -f $START -t $END -n n_$RECORD \ -a $ANNOTATOR List annotations rdann -r $RECORD -a $ANNOTATOR -f $START -t $END diff -Naur wfdb-10.1.3/wave-doc/guide/wavemenu wfdb-10.1.4/wave-doc/guide/wavemenu --- wfdb-10.1.3/wave-doc/guide/wavemenu Thu Jun 24 11:38:41 1999 +++ wfdb-10.1.4/wave-doc/guide/wavemenu Wed Dec 31 19:00:00 1969 @@ -1,98 +0,0 @@ -# file: wavemenu.def G. Moody 17 August 1990 -# Last revised: 2 February 1995 -# Copyright(C) Massachusetts Institute of Technology 1995. All rights reserved. - -# This is the default analysis menu for WAVE. If you wish to use a -# customized version, copy this file to another directory, edit it, -# and set the value of the environment variable WAVEMENU to the name of -# the edited version before starting WAVE. The contents of this file, -# or of your customized version of it, determine the appearance of the -# panel that WAVE displays when you select its `Analyze' button, and the -# actions that are taken when you select a button on the `Analyze' panel. - -# Comment lines begin with `#', and may appear anywhere in this file. -# Lines that specify menu items contain a button label, followed by -# one or more tab characters, followed by the action to be taken when the -# button is selected. The action may be any command acceptable to your -# shell. Note that several strings found in commands are interpreted by -# WAVE before they are passed to the shell; these are: -# $RECORD the current record name -# $ANNOTATOR the current input annotator name -# $START the current `Start' time as shown in the Analyze panel -# (the time of the `<' marker, if any) -# $END the current `End' time as shown in the Analyze panel -# (the time of the `>' marker, if any) -# $DURATION the time interval between $END and $START -# $LEFT the time of the left edge of the signal display window -# $RIGHT the time of the right edge of the signal display window -# $WIDTH the time interval between $RIGHT and $LEFT -# $SIGNAL the number of the selected signal -# $SIGNALS the signal list -# $LOG the name of the current log file -# $DB the DB path (from the Load panel) -# $DBCAL the name of the DB calibration file (from the Load -# panel) -# Other strings that begin with `$' are passed to the shell unchanged. -# The character `\', if immediately followed by a newline, causes the -# next line to be treated as a continuation of the current line. - -# Default menu entries. Delete or change any of these as you wish. If `lpr' -# is not the proper command for printing a PostScript file on your system, -# replace it as appropriate below. - -# Button labels Commands -# ------------- -------- -Mark QRS complexes sqrs -r $RECORD -f $START -t $END -s $SIGNAL -Calibrate calibrate -r $RECORD -f $START -t $END -s $SIGNALS -Extract segment snip -i $RECORD -f $START -t $END -n n_$RECORD \ - -a $ANNOTATOR -List annotations rdann -r $RECORD -a $ANNOTATOR -f $START -t $END -List samples rdsamp -r $RECORD -f $START -t $END -s $SIGNALS -Print chart echo $RECORD $START-$END | \ - pschart -a $ANNOTATOR -g -l -R -s $SIGNALS - | lpr -Print full disclosure echo $RECORD $START-$END | \ - psfd -a $ANNOTATOR -g -l -R -s $SIGNALS - | lpr - -# Here are alternate versions of the two previous entries, for some BSD systems -# that have small /tmp partitions: -#Print chart echo $RECORD $START-$END | pschart -a $ANNOTATOR -g \ -# -l -R -s $SIGNALS - >~/.pschart.$$; \ -# lpr -r -s ~/.pschart.$$ -#Print full disclosure echo $RECORD $START-$END | psfd -a $ANNOTATOR -g \ -# -l -R -s $SIGNALS - >~/.psfd.$$; \ -# lpr -r -s ~/.psfd.$$ - -# Use the following entry to export WAVE's variables to your shell environment. -# This version is usable if your shell is `csh' or `tcsh': -#Set variables setenv RECORD $RECORD; setenv ANNOTATOR $ANNOTATOR; \ -# setenv START $START; setenv END $END; \ -# setenv DURATION $DURATION; setenv LEFT $LEFT; \ -# setenv RIGHT $RIGHT; setenv WIDTH $WIDTH; \ -# setenv SIGNAL $SIGNAL; setenv SIGNALS "$SIGNALS"; \ -# setenv LOG $LOG; setenv DB $DB; setenv DBCAL $DBCAL - -# Here is an alternate version of the previous entry, for use with `sh', `ksh', -# or `bash': -Set variables RECORD=$RECORD; ANNOTATOR=$ANNOTATOR; START=$START; \ - END=$END; DURATION=$DURATION; LEFT=$LEFT; \ - RIGHT=$RIGHT; WIDTH=$WIDTH; SIGNAL=$SIGNAL; \ - SIGNALS="$SIGNALS"; LOG=$LOG; DB=$DB; DBCAL=$DBCAL; \ - export RECORD ANNOTATOR START END DURATION LEFT \ - RIGHT WIDTH SIGNAL SIGNALS LOG DB DBCAL - -# The label `' defines the command that is executed when the `Print' -# button in the File menu is selected. If you wish to have a button with the -# same function appear in the Analysis menu, copy the command and use a -# different button label (for example, `Print window'). - - echo $RECORD $LEFT-$RIGHT | pschart -a $ANNOTATOR -g \ - -l -L -n 0 -R -s $SIGNALS -t 20 -v 8 - | lpr - -# The next entry is disabled by default, since many users don't use the logs -# and might find it confusing. Remove the comment characters at the beginning -# of the next line to enable it. -Print log with charts pschart -a $ANNOTATOR -g -l -R $LOG | lpr - -# Add additional entries below. If you use `bash', avoid using tabs on -# continuation lines for indentation (they may trigger command completion when -# executed). diff -Naur wfdb-10.1.3/wave-doc/guide/wug.tex wfdb-10.1.4/wave-doc/guide/wug.tex --- wfdb-10.1.3/wave-doc/guide/wug.tex Fri May 5 10:37:08 2000 +++ wfdb-10.1.4/wave-doc/guide/wug.tex Wed May 24 16:47:42 2000 @@ -27,7 +27,7 @@ \title{\WAVE{} User's Guide} \author{Fifth Edition\\ (revised and with corrections for \WAVE{} version 6.3)\\ -14 January 2000\\ +24 May 2000\\ \\ \\ \\ @@ -2993,40 +2993,40 @@ Figure~\ref{fig:calibration} illustrates signal calibration using a record from the MIMIC Database. In this case, the type of signal (ABP) is known from an entry in the {\tt WFDBCAL} file (not shown here), -so that {\tt calibrate} is able to determine the physical units of the +so that {\tt calsig} is able to determine the physical units of the signal (mmHg). Since a variety of calibration pulses are used for ABP signals, the {\tt WFDBCAL} file does not specify the pulse levels, which -{\tt calibrate} has asked us to enter (in this case, we have entered -{\tt 60} and {\tt 120}). Based on this information, {\tt calibrate} +{\tt calsig} has asked us to enter (in this case, we have entered +{\tt 60} and {\tt 120}). Based on this information, {\tt calsig} determines the offset and gain needed to convert raw sample values for -signal 3 into ABP measurements in mmHg. {\tt calibrate} then makes +signal 3 into ABP measurements in mmHg. {\tt calsig} then makes the appropriate changes to the header file for the current record. When \WAVE{} or another WFDB application next opens this record, the ABP signal will be properly calibrated. -\index{calibrate command@{\tt calibrate} command} -By default, {\tt calibrate} generates an amplitude histogram of the +\index{calsig command@{\tt calsig} command} +By default, {\tt calsig} generates an amplitude histogram of the samples between the `{\tt <}' and `{\tt >}' markers. It then identifies the low and high amplitude portions of the calibration pulse by searching for the two largest distinct modes in this -amplitude histogram. For this reason, {\tt calibrate} works best if +amplitude histogram. For this reason, {\tt calsig} works best if the segment bounded by the `{\tt <}' and `{\tt >}' markers includes at least a few samples of both the high and low amplitude phases. Avoid placing either marker immediately next to the transition point between -the phases if possible. If {\tt calibrate} fails to find two distinct +the phases if possible. If {\tt calsig} fails to find two distinct peaks in the amplitude histogram, it will produce an error message; if this happens, adjust the positions of the markers and try again. In some cases (for example, if the calibration pulse is a sawtooth, as in the RESP signal at the bottom of figure~\ref{fig:calibration}), this strategy may fail, no matter where the markers are placed. In -such cases, try again with {\tt calibrate}'s {\tt -q} or {\tt -Q} +such cases, try again with {\tt calsig}'s {\tt -q} or {\tt -Q} options to use one of its alternate algorithms. (These are less robust since they depend on differential rather than integrative measurements, but they can be used in a pinch.) For further information on signal calibration, see -\htmladdnormallink{{\tt calibrate(1)}}{../dbag/calibr-1.htm}, +\htmladdnormallink{{\tt calsig(1)}}{../dbag/calibr-1.htm}, in the \htmladdnormallink{{\it WFDB Applications Guide}}{../dbag/dbag.htm}. @@ -4758,8 +4758,8 @@ The WFDB Software Package available separately from MIT includes an MS-DOS program (named {\tt sample}) for digitization and replay of analog signals using a DAP 1200- or 2400-series data acquisition board (available from -Microstar Laboratories, -\htmladdnormallink{{\tt http://www.mstarlabs.com/}}{http://www.mstarlabs.com/}. +Microstar Laboratories, 2863 152nd Avenue NE, Redmond, WA 98052 USA; telephone ++1 206 881 4286). \index{CD-ROM}\index{MIT-BIH Arrhythmia Database} \index{European ST-T Database}\index{MIT-BIH Polysomnographic Database} @@ -4879,7 +4879,7 @@ the same sources as \WAVE{} itself (\htmladdnormallink{{\tt http://www.physionet.org/}} {http://www.physionet.org/}). The WFDB Software Package includes -{\tt calibrate}, {\tt mrgann}, {\tt plot2d}, {\tt pschart}, {\tt +{\tt calsig}, {\tt mrgann}, {\tt plot2d}, {\tt pschart}, {\tt psfd}, {\tt rdann}, {\tt rdsamp}, {\tt sample}, {\tt snip}, {\tt sqrs}, {\tt tach}, {\tt wfdbcollate}, {\tt wfdbdesc}, {\tt wfdbwhich}, {\tt wrann}, {\tt wrsamp}, and {\tt xform} (among many other applications). @@ -5633,10 +5633,10 @@ not been determined, or is incorrect, the size of the signal as drawn by \WAVE{} may be incorrect as well. If you know the physical values that correspond to at least two levels represented in the signal (for example, -the top and bottom of a calibration pulse), you can use the `{\tt calibrate}' +the top and bottom of a calibration pulse), you can use the `{\tt calsig}' application to determine the gain and to rewrite the header file. See the \htmladdnormallink{{\it WFDB Applications Guide}}{../dbag/dbag.htm} -for details. `{\tt calibrate}' can be most conveniently run from +for details. `{\tt calsig}' can be most conveniently run from \WAVE{}'s {\sf Analysis} window. \item diff -Naur wfdb-10.1.3/waverc/Makefile wfdb-10.1.4/waverc/Makefile --- wfdb-10.1.3/waverc/Makefile Sun Jan 30 04:13:27 2000 +++ wfdb-10.1.4/waverc/Makefile Mon Jun 5 23:33:05 2000 @@ -24,20 +24,136 @@ # (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, # please visit PhysioNet (http://www.physionet.org/). # _____________________________________________________________________________ -# -# CC is the name of your C compiler. These applications can be compiled with -# K&R C compilers (`cc' on most if not all UNIX systems) as well as with ANSI -# C compilers such as GNU C (`gcc'). To use the K&R C compiler available on -# most UNIX systems, uncomment the next line. -CC = cc -# For `gcc', uncomment the next line. -# CC = gcc - -# BINDIR specifies the directory in which both WAVE and these applications will -# be installed; it should be a directory in the PATH of those who will use the -# applications. You will need to have write permission in BINDIR. Users of -# this software will need to have search (execute) permission in BINDIR. -BINDIR = /usr/local/bin +# file: version.def G. Moody 24 May 2000 + +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 4 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) + +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ + +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux + +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# Change the settings below as appropriate for your setup. # URLV is the command that starts your web browser if necessary and opens the # URL named in its first argument. The following works properly with Netscape @@ -45,18 +161,22 @@ # documentation. URLV='( netscape -remote "openURL($$1)" 2>/dev/null || netscape $$1 ) &' +# `make all' creates urlview, wavescript, and wave-remote without installing +# them. +all: wavescript wave-remote + # `make install' installs `wavescript' and `wave-remote'. See the WAVE User's # Guide for instructions on setting up `wavescript' as a helper application for # your Web browser. -install: urlview wavescript wave-remote +install: $(BINDIR) urlview wavescript wave-remote strip wavescript strip wave-remote cp urlview wavescript wave-remote $(BINDIR) - chmod 755 $(BINDIR)/urlview $(BINDIR)/wavescript $(BINDIR)/wave-remote + $(SETXPERMISSIONS) $(BINDIR)/urlview $(BINDIR)/wavescript \ + $(BINDIR)/wave-remote -# `make all' creates urlview, wavescript, and wave-remote without installing -# them. -all: wavescript wave-remote +uninstall: + ../uninstall $(BINDIR) urlview wavescript wave-remote # `urlview' opens a web browser to view a named URL. urlview: Makefile @@ -81,3 +201,7 @@ # `make clean': remove intermediate and backup files clean: rm -f urlview wavescript wave-remote wave-remote-test *~ + +# Create directory for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) diff -Naur wfdb-10.1.3/waverc/Makefile.top wfdb-10.1.4/waverc/Makefile.top --- wfdb-10.1.3/waverc/Makefile.top Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/waverc/Makefile.top Wed May 24 22:35:27 2000 @@ -0,0 +1,26 @@ +# file: Makefile G. Moody 20 October 1996 +# Last revised: 16 October 1999 +# UNIX 'make' description file for remote-control applications for WAVE +# +# ----------------------------------------------------------------------------- +# waverc: remote-control applications for WAVE +# Copyright (C) 1999 George B. Moody +# +# These programs are free software; you can redistribute them and/or modify +# them under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# These programs are distributed in the hope that they 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 +# these programs; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ diff -Naur wfdb-10.1.3/waverc/Makefile.tpl wfdb-10.1.4/waverc/Makefile.tpl --- wfdb-10.1.3/waverc/Makefile.tpl Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.4/waverc/Makefile.tpl Mon Jun 5 06:48:41 2000 @@ -0,0 +1,54 @@ +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 5 June 2000 +# Change the settings below as appropriate for your setup. + +# URLV is the command that starts your web browser if necessary and opens the +# URL named in its first argument. The following works properly with Netscape +# 1.1 and later versions; if you are using a different browser, consult its +# documentation. +URLV='( netscape -remote "openURL($$1)" 2>/dev/null || netscape $$1 ) &' + +# `make all' creates urlview, wavescript, and wave-remote without installing +# them. +all: wavescript wave-remote + +# `make install' installs `wavescript' and `wave-remote'. See the WAVE User's +# Guide for instructions on setting up `wavescript' as a helper application for +# your Web browser. +install: $(BINDIR) urlview wavescript wave-remote + strip wavescript + strip wave-remote + cp urlview wavescript wave-remote $(BINDIR) + $(SETXPERMISSIONS) $(BINDIR)/urlview $(BINDIR)/wavescript \ + $(BINDIR)/wave-remote + +uninstall: + ../uninstall $(BINDIR) urlview wavescript wave-remote + +# `urlview' opens a web browser to view a named URL. +urlview: Makefile + cp urlvhead urlview + echo $(URLV) >>urlview + +# `wavescript' reads commands from a named file and passes them to WAVE. +wavescript: wavescript.c + $(CC) -o wavescript -DBINDIR=$(BINDIR) -O wavescript.c + +# `wave-remote' passes its command-line arguments as commands to WAVE. +wave-remote: wave-remote.c + $(CC) -o wave-remote -O wave-remote.c + +# `wave-remote-test' looks like WAVE to `wavescript' and `wave-remote', and +# can be used to verify their proper operation. Start `wave-remote-test' +# before starting `wavescript' or `wave-remote'; the commands these programs +# send to WAVE should appear on the standard output of `wave-remote-test. +wave-remote-test: wave-remote-test.c + $(CC) -o wave-remote-test -O wave-remote-test.c + +# `make clean': remove intermediate and backup files +clean: + rm -f urlview wavescript wave-remote wave-remote-test *~ + +# Create directory for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR)