diff -Naur wfdb-10.1.2/Makefile wfdb-10.1.3/Makefile --- wfdb-10.1.2/Makefile Sat Mar 11 21:26:26 2000 +++ wfdb-10.1.3/Makefile Mon Apr 10 09:27:39 2000 @@ -1,5 +1,5 @@ # file: Makefile G. Moody 5 September 1990 -# Last revised: 11 March 2000 Version 10.1.2 +# Last revised: 9 April 2000 Version 10.1.3 # UNIX 'make' description file for the WFDB software package # # ----------------------------------------------------------------------------- @@ -49,7 +49,7 @@ # the parent of this directory) for details. MAJOR = 10 MINOR = 1 -RELEASE = 2 +RELEASE = 3 VERSION = $(MAJOR).$(MINOR).$(RELEASE) VERDEFS= @@ -114,13 +114,13 @@ cd doc; $(MAKE) clean cd examples; $(MAKE) clean cd fortran; $(MAKE) clean - cd lib; $(MAKE) clean + cd lib; $(MAKE) -f makelib clean cd psd; $(MAKE) clean - cd wave; $(MAKE) clean + cd wave; $(MAKE) -f makewave 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 *~ lib/Makefile wave/Makefile config.cache # 'make config.cache': check configuration config.cache: diff -Naur wfdb-10.1.2/app/rdsamp.c wfdb-10.1.3/app/rdsamp.c --- wfdb-10.1.2/app/rdsamp.c Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.3/app/rdsamp.c Sun Apr 9 17:06:23 2000 @@ -1,9 +1,9 @@ /* file: rdsamp.c G. Moody 23 June 1983 - Last revised: 3 May 1999 + Last revised: 9 April 2000 ------------------------------------------------------------------------------- rdsamp: Print an arbitrary number of samples from each signal -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 @@ -68,7 +68,7 @@ int i, isiglist, nsig, nosig = 0, pflag = 0, s, *sig = NULL, v[WFDB_MAXSIG], vflag = 0; int highres = 0; - long from = 0L, to = 0L; + long from = 0L, maxl = 0L, to = 0L; static WFDB_Siginfo si[WFDB_MAXSIG]; void help(); @@ -119,6 +119,14 @@ case 'H': /* select high-resolution mode */ highres = 1; break; + case 'l': /* maximum length of output follows */ + if (++i >= argc) { + (void)fprintf(stderr, "%s: max output length must follow -l\n", + pname); + exit(1); + } + maxl = i; + break; case 'r': /* record name */ if (++i >= argc) { (void)fprintf(stderr, "%s: record name must follow -r\n", @@ -179,6 +187,10 @@ exit(2); if (to > 0L && (to = strtim(argv[to])) < 0L) to = -to; + if (maxl > 0L && (maxl = strtim(argv[maxl])) < 0L) + maxl = -maxl; + if (maxl && (to == 0L || to > from + maxl)) + to = from + maxl; if (nosig) { /* print samples only from specified signals */ #ifndef lint if ((sig = (int *)malloc((unsigned)nosig*sizeof(int))) == NULL) { @@ -293,6 +305,7 @@ " -f TIME begin at specified time", " -h print this usage summary", " -H read multifrequency signals in high resolution mode", + " -l INTERVAL truncate output after the specified time interval (hh:mm:ss)", " -p print times and samples in physical units (default: raw units)", " -s SIGNAL [SIGNAL ...] print only the specified signal(s)", " -t TIME stop at specified time", diff -Naur wfdb-10.1.2/app/xform.c wfdb-10.1.3/app/xform.c --- wfdb-10.1.2/app/xform.c Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.3/app/xform.c Mon Apr 10 09:22:27 2000 @@ -1,5 +1,5 @@ /* file: xform.c G. Moody 8 December 1983 - Last revised: 2 October 1999 + Last revised: 10 April 2000 ------------------------------------------------------------------------------- xform: Sampling frequency, amplitude, and format conversion for WFDB records @@ -53,15 +53,15 @@ char *argv[]; { char *irec = NULL, *orec = NULL, *nrec = NULL, *startp = "0:0"; - int i; - int fflag = 0, gflag = 0, Hflag = 0, ifreq, j, m, msiglist[WFDB_MAXSIG], - Mflag = 0, mn, n, nann = 0, nisig, nminutes = 0, nosig = -1, ofreq = 0, - reopen = 0, siglist[WFDB_MAXSIG], spf = 1, use_irec_desc = 1; + int clip = 0, fflag = 0, gflag = 0, Hflag = 0, ifreq, i, j, m, Mflag = 0, + mn, n, nann = 0, nisig, nminutes = 0, nosig = -1, ofreq = 0, + reopen = 0, spf = 1, use_irec_desc = 1; static char btstring[30]; static double gain[WFDB_MAXSIG]; - static int deltav[WFDB_MAXSIG], v[WFDB_MAXSIG], vin[WFDB_MAXSIG*WFDB_MAXSPF], - vmax[WFDB_MAXSIG], vmin[WFDB_MAXSIG], vv[WFDB_MAXSIG], - vout[WFDB_MAXSIG*WFDB_MAXSPF]; + static int deltav[WFDB_MAXSIG], msiglist[WFDB_MAXSIG], + siglist[WFDB_MAXSIG], v[WFDB_MAXSIG], vin[WFDB_MAXSIG*WFDB_MAXSPF], + vmax[WFDB_MAXSIG], vmin[WFDB_MAXSIG], vout[WFDB_MAXSIG*WFDB_MAXSPF], + vv[WFDB_MAXSIG]; static long it, ot, from, to, nsamp = -1L, spm, nsm = 0L; static WFDB_Siginfo dfin[WFDB_MAXSIG], dfout[WFDB_MAXSIG]; static WFDB_Anninfo ai[WFDB_MAXANN]; @@ -92,6 +92,9 @@ } while (i < argc && *argv[i] != '-'); i--; break; + case 'c': /* clip (limit) output (default: discard high bits) */ + clip = 1; + break; case 'f': /* starting time */ if (++i >= argc) { (void)fprintf(stderr, "%s: time must follow -f\n", pname); @@ -667,12 +670,14 @@ if (vout[i] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmax[i] = vout[i]; + if (clip) vout[i] = vmax[i]; + else vmax[i] = vout[i]; } else if (vout[i] < vmin[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmin[i] = vout[i]; + if (clip) vout[i] = vmin[i]; + else vmin[i] = vout[i]; } } if (putvec(vout) < 0) break; @@ -697,12 +702,14 @@ if (vout[j] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[j]); - vmax[i] = vout[j]; + if (clip) vout[j] = vmax[i]; + else vmax[i] = vout[j]; } else if (vout[j] < vmin[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[j]); - vmin[i] = vout[j]; + if (clip) vout[j] = vmin[i]; + else vmin[i] = vout[j]; } } } @@ -727,12 +734,14 @@ if (vout[i] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmax[i] = vout[i]; + if (clip) vout[i] = vmax[i]; + else vmax[i] = vout[i]; } else if (vout[i] < vmin[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmin[i] = vout[i]; + if (clip) vout[i] = vmin[i]; + else vmin[i] = vout[i]; } } if (putvec(vout) < 0) break; @@ -757,12 +766,14 @@ if (vout[j] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[j]); - vmax[i] = vout[j]; + if (clip) vout[j] = vmax[i]; + else vmax[i] = vout[j]; } else if (vout[j] < vmin[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[j]); - vmin[i] = vout[j]; + if (clip) vout[j] = vmin[i]; + else vmin[i] = vout[j]; } } } @@ -790,12 +801,14 @@ if (vout[i] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmax[i] = vout[i]; + if (clip) vout[i] = vmax[i]; + else vmax[i] = vout[i]; } else if (vout[i] < vmin[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmin[i] = vout[i]; + if (clip) vout[i] = vmin[i]; + else vmin[i] = vout[i]; } } if (putvec(vout) < 0) { nsamp = 0L; break; } @@ -827,12 +840,14 @@ if (vout[i] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmax[i] = vout[i]; + if (clip) vout[i] = vmax[i]; + else vmax[i] = vout[i]; } else if (vout[i] < vmin[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[i]); - vmin[i] = vout[i]; + if (clip) vout[i] = vmin[i]; + else vmin[i] = vout[i]; } } if (putvec(vout) < 0) { nsamp = 0L; break; } @@ -919,6 +934,7 @@ " include any of:", " -a ANNOTATOR [ANNOTATOR ...] copy annotations for the specified ANNOTATOR", " from IREC; two or more ANNOTATORs may follow -a", + " -c clip output (default: wrap around if out-of-range)", " -f TIME begin at specified time", " -h print this usage summary", " -H open the input record in `high resolution' mode", diff -Naur wfdb-10.1.2/configure wfdb-10.1.3/configure --- wfdb-10.1.2/configure Fri Mar 3 13:54:39 2000 +++ wfdb-10.1.3/configure Thu Mar 30 15:47:18 2000 @@ -4,11 +4,11 @@ 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." - rm -f lib/makefile + cp -p lib/makelib lib/Makefile echo "NETFILES=0" >config.cache else echo "The WFDB software will be compiled with NETFILES access." - cp lib/netmake lib/makefile + cp -p lib/netmake lib/Makefile echo "NETFILES=1" >config.cache fi @@ -18,11 +18,11 @@ echo "appear to be installed on this system." echo "To compile WAVE, install XView, add the directory containing the" echo "XView textedit application to your PATH, and run ./configure again." - cp wave/nomake wave/makefile + cp -p wave/nomake wave/Makefile echo "WAVE=0" >>config.cache else echo "WAVE will be compiled." - rm -f wave/makefile + cp -p wave/makewave wave/Makefile echo "WAVE=1" >>config.cache fi diff -Naur wfdb-10.1.2/doc/rdsamp.1 wfdb-10.1.3/doc/rdsamp.1 --- wfdb-10.1.2/doc/rdsamp.1 Sun Jan 30 04:13:18 2000 +++ wfdb-10.1.3/doc/rdsamp.1 Mon Apr 10 09:08:42 2000 @@ -1,4 +1,4 @@ -.TH RDSAMP 1 "11 January 2000" "WFDB software 10.0" "WFDB applications" +.TH RDSAMP 1 "10 April 2000" "WFDB software 10.1.3" "WFDB applications" .SH NAME rdsamp \- read WFDB signal files .SH SYNOPSIS @@ -25,6 +25,11 @@ the standard decimation of oversampled signals to the frame rate is suppressed in high-resolution mode (rather, all other signals are resampled at the highest sampling frequency). +.TP +\fB-l\fR \fIinterval\fR +Limit the amount of output to the specified time \fIinterval\fR (in standard +time format; default: no limit). If both \fB-l\fR and \fB-t\fR are used, +\fIrdsamp\fR stops at the earlier of the two limits. .TP \fB-p\fR Print times in seconds and milliseconds, and values in physical units. By diff -Naur wfdb-10.1.2/doc/texi2html wfdb-10.1.3/doc/texi2html --- wfdb-10.1.2/doc/texi2html Mon Jul 19 14:19:49 1999 +++ wfdb-10.1.3/doc/texi2html Wed Apr 26 01:44:30 2000 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl 'di '; 'ig 00 '; #+############################################################################## @@ -11,7 +11,7 @@ # From @(#)texi2html 1.52 01/05/98 # Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch -# $Id: texi2html,v 1.5 1999/07/19 18:19:49 george Exp $ +# $Id: texi2html,v 1.6 2000/04/26 05:44:30 george Exp $ # This version of texi2html is currently maintained at # http://www.mathematik.uni-kl.de/~obachman/Texi2html by # Olaf Bachmann (obachman@mathematik.uni-kl.de) diff -Naur wfdb-10.1.2/doc/xform.1 wfdb-10.1.3/doc/xform.1 --- wfdb-10.1.2/doc/xform.1 Sun Jan 30 04:13:19 2000 +++ wfdb-10.1.3/doc/xform.1 Mon Apr 10 09:22:23 2000 @@ -1,4 +1,4 @@ -.TH XFORM 1 "11 January 2000" "WFDB software 10.0" "WFDB applications" +.TH XFORM 1 "10 April 2000" "WFDB software 10.1.3" "WFDB applications" .SH NAME xform \- sampling frequency, amplitude, and format conversion for WFDB records .SH SYNOPSIS @@ -16,6 +16,17 @@ annotator supplied via the standard input may be specified using `-', but only immediately after `-a'; in this case only, annotations are copied to the standard output. +.TP +\fB-c\fR +Clip the output (set any sample values that would fall outside of the range +supported by the selected format to the maximum or minimum supported values). +By default, the output is not clipped; rather, the values are wrapped around +modulo the supported range (i.e., the excess high-order bits are simply +discarded). Use of wrap-around can result in bizarre artifacts, but has the +advantage that the affected portions of the output signals can (usually) be +interpreted properly. Clipping mode is appropriate for testing algorithms or +devices that must operate using a more restricted amplitude range than was +used when digitizing the original record. .TP \fB-f\fI time\fR Begin at the specified \fItime\fR in the input record (default: the diff -Naur wfdb-10.1.2/lib/Makefile wfdb-10.1.3/lib/Makefile --- wfdb-10.1.2/lib/Makefile Sat Mar 11 21:27:33 2000 +++ wfdb-10.1.3/lib/Makefile Wed Dec 31 19:00:00 1969 @@ -1,378 +0,0 @@ -# file: Makefile G. Moody 6 July 1983 -# Last revised: 11 March 2000 Version 10.1.2 -# 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, just type `make' (from within this directory). To build and -# install the alternate WFDB library (not available on all systems), type -# `make slib'. - -# If used as is, this Makefile 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' 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 Makefile 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 = 2 -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 diff -Naur wfdb-10.1.2/lib/README wfdb-10.1.3/lib/README --- wfdb-10.1.2/lib/README Sun Jan 30 04:13:20 2000 +++ wfdb-10.1.3/lib/README Thu Mar 30 16:00:34 2000 @@ -1,5 +1,5 @@ file: README G. Moody 1 July 1989 - Last revised: 5 May 1999 wfdblib 10.0.0 + Last revised: 30 March 2000 wfdblib 10.1.2 _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) @@ -38,7 +38,10 @@ The following files will be found in this directory: COPYING.LIB the GNU Library General Public License -Makefile UNIX `make' description file for compiling the WFDB library +makelib UNIX `make' description file for compiling the WFDB library + without NETFILES support (copy to `Makefile' before use) +netmake UNIX `make' description file for compiling the WFDB library + with NETFILES support (copy to `Makefile' before use) Makefile-dos-gcc UNIX `make' description file for compiling the WFDB library for MS-DOS using a gcc cross-compiler under UNIX Makefile.dos MS-DOS `make' description file for compiling the WFDB library diff -Naur wfdb-10.1.2/lib/makelib wfdb-10.1.3/lib/makelib --- wfdb-10.1.2/lib/makelib Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.3/lib/makelib Sun Apr 9 17:17:31 2000 @@ -0,0 +1,379 @@ +# 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 diff -Naur wfdb-10.1.2/lib/netmake wfdb-10.1.3/lib/netmake --- wfdb-10.1.2/lib/netmake Sun Jan 30 17:06:53 2000 +++ wfdb-10.1.3/lib/netmake Sun Apr 9 17:17:07 2000 @@ -1,5 +1,5 @@ -# file: netmake G. Moody 30 January 2000 -# +# 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 # # _____________________________________________________________________________ @@ -32,16 +32,16 @@ # 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, 'Makefile', +# The standard 'make' description file provided in this directory, 'makelib', # does not include NETFILES support. Rather than duplicate all of the common -# definitions in 'Makefile', this file simply redefines those that must differ +# 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 'Makefile', but with the new definitions overriding -# the old ones. If this file is renamed 'makefile', 'make' will read it -# first (before 'Makefile') 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. +# '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 @@ -52,11 +52,11 @@ # 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 Makefile. They are needed here because -# other variables are constructed using these. +# These should exactly match the values in makelib. They are needed here +# because other variables are constructed using these. MAJOR = 10 MINOR = 1 -RELEASE = 1 +RELEASE = 3 CCDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) SWFDBLIB_BASENAME = libwfdb.so SWFDBLIB_SONAME = $(SWFDBLIB_BASENAME).$(MAJOR) @@ -73,10 +73,10 @@ `libwww-config --libs` -o $(SWFDBLIB) $(SLIBOBJS) # This command causes the 'make' processes spawned from this one to use the -# standard Makefile after incorporating the definitions above. -MAKE = make -f Makefile +# standard `make' description file after incorporating the definitions above. +MAKE = make -f makelib -# 'make' targets: Each target in 'Makefile' should have an identically named +# 'make' targets: Each target in 'makelib' should have an identically named # target here. install: diff -Naur wfdb-10.1.2/lib/wfdb.h wfdb-10.1.3/lib/wfdb.h --- wfdb-10.1.2/lib/wfdb.h Sat Mar 11 21:27:07 2000 +++ wfdb-10.1.3/lib/wfdb.h Sun Apr 9 17:18:54 2000 @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 1 -#define WFDB_RELEASE 2 +#define WFDB_RELEASE 3 /* Determine what type of compiler is being used. */ #ifdef __STDC__ /* true for ANSI C compilers only */ diff -Naur wfdb-10.1.2/psd/Makefile wfdb-10.1.3/psd/Makefile --- wfdb-10.1.2/psd/Makefile Sat Feb 12 23:23:08 2000 +++ wfdb-10.1.3/psd/Makefile Wed Apr 26 01:36:57 2000 @@ -87,7 +87,7 @@ # `make scripts': customize and install scripts scripts: sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/hrfft - sed s+/usr/local/bin+$(BINDIR)+g $(BINDIR)/htlomb + 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) diff -Naur wfdb-10.1.2/wave/Makefile wfdb-10.1.3/wave/Makefile --- wfdb-10.1.2/wave/Makefile Sat Mar 11 12:05:48 2000 +++ wfdb-10.1.3/wave/Makefile Wed Dec 31 19:00:00 1969 @@ -1,288 +0,0 @@ -# file: Makefile G. Moody 1 May 1990 -# Last revised: 29 January 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). - -# Site-specific variables -# ----------------------- - -# 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. To do so, uncomment the next -# line. -INSTALL = /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 - -# 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 - -# INCDIR should be one of the directories searched by your C compiler for -# #include <...> files. -INCDIR = $(INSTALL)/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 - -# LIBDIR should be one of the directories searched by CC's loader for -l... -# libraries. -LIBDIR = $(INSTALL)/local/lib - -# MENUDIR specifies the directory in which the default analysis menu file is -# kept. -MENUDIR = $(INSTALL)/local/lib - -# RESDIR specifies the directory in which X11 client resource files are kept. -RESDIR = $(INSTALL)/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 -# as GNU C (`gcc'). -CC = cc - -# CFLAGS is the set of C compiler options. 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 -# Except for `gcc', most C compilers won't let you use both -g and -O. -CFLAGS = -O -I$(INCDIR) -I/usr/openwin/include - -# 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 = - -# OPENWINHOME specifies the root directory of the OpenWindows hierarchy. -# This is usually /usr/openwin. -OPENWINHOME = /usr/openwin -# Need to use /usr/local on BIH SunOS systems to generate OW 3.0-compatible -# executables. -# OPENWINHOME = /usr/local -# OPENWINHOME = /usr/i486-linuxaout - -# 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 - -# LDFLAGS is the set of loader options appended to the C compiler command line -# to specify loading the WFDB, XView, and Xlib libraries. Unless you have -# changed the value of WFDBLIB in the `makefile' for the WFDB library, `-lwfdb' -# should be correct for the WFDB library; the other library names are probably -# correct unless your X installation is non-standard. If you have installed -# XView 1.0.1 from the X11R4 distribution, uncomment the next line. -# LDFLAGS = -lwfdb -lxview -lX11 -# If you have XView 2.0 or later, you will also need the Open Look graphics -# library (libolgx); in this case, uncomment the next line. -LDFLAGS = -L$(OWLIBDIR) -L/usr/X11R6/lib -L$(LIBDIR) \ - -lwfdb -lxview -lolgx -lX11 -# Users of Red Hat Linux 5.0 or 5.1 (not later versions), use this instead: -# LDFLAGS = -L$(OWLIBDIR) -L/usr/X11R6/lib -L$(LIBDIR) \ -# -lwfdb /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). - -# 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 installed programs 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 - -# SETDPERMISSIONS is similarly used to make directories created during the -# installation accessible; its value is usually identical to SETXPERMISSIONS. -SETDPERMISSIONS = chmod 755 - -# SETPERMISSIONS is similarly used to make installed data files accessible. -# These files should not be marked as executable. -SETPERMISSIONS = chmod 644 - -# STRIP is the command needed to strip the symbol table from the executable. -# Uncomment the next line to strip the symbol table for compactness. -STRIP = strip -# Uncomment the next line to retain the symbol table for debugging purposes. -# STRIP = echo - -# 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 - -# `make' or `make install': compile and install WAVE and its help files -install: wave wave.hlp - test -d $(BINDIR) || \ - ( mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) ) - test -d $(HELPDIR)/wave || \ - ( mkdir -p $(HELPDIR)/wave; $(SETDPERMISSIONS) $(HELPDIR)/wave ) - test -d $(MENUDIR) || \ - ( mkdir -p $(MENUDIR); $(SETDPERMISSIONS) $(MENUDIR) ) - test -d $(RESDIR) || \ - ( mkdir -p $(RESDIR); $(SETDPERMISSIONS) $(RESDIR) ) - 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 - -# `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: $(OFILES) - $(CC) -o wave $(OFILES) $(LDFLAGS) - -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 $(CFLAGS) -DHELPDIR=\"$(HELPDIR)\" wave.c -init.o: wave.h xvwave.h init.c -mainpan.o: wave.h xvwave.h mainpan.c Makefile - $(CC) -c $(CFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" mainpan.c -modepan.o: wave.h xvwave.h modepan.c -helppan.o: wave.h xvwave.h helppan.c - $(CC) -c $(CFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" helppan.c -logpan.o: wave.h xvwave.h logpan.c -annpan.o: wave.h xvwave.h annpan.c -edit.o: wave.h xvwave.h edit.c -grid.o: wave.h xvwave.h grid.c -search.o: wave.h xvwave.h search.c -sig.o: wave.h xvwave.h sig.c -annot.o: wave.h xvwave.h annot.c - $(CC) -c $(CFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" annot.c -analyze.o: wave.h xvwave.h analyze.c - $(CC) -c $(CFLAGS) -DMENUDIR=\"$(MENUDIR)\" analyze.c -scope.o: wave.h xvwave.h scope.c -xvwave.o: wave.h xvwave.h bitmaps.h xvwave.c - $(CC) -c $(CFLAGS) -DRESDIR=\"$(RESDIR)\" xvwave.c -help.o: help.c - $(CC) -c $(CFLAGS) -w help.c diff -Naur wfdb-10.1.2/wave/makewave wfdb-10.1.3/wave/makewave --- wfdb-10.1.2/wave/makewave Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.3/wave/makewave Sat Apr 1 07:24:59 2000 @@ -0,0 +1,288 @@ +# file: makewave G. Moody 1 May 1990 +# Last revised: 1 April 2000 WAVE 6.3 +# `make' description file for WAVE (renamed to `Makefile' by ../configure) +# +# ----------------------------------------------------------------------------- +# 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). + +# Site-specific variables +# ----------------------- + +# 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. To do so, uncomment the next +# line. +INSTALL = /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 + +# 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 + +# INCDIR should be one of the directories searched by your C compiler for +# #include <...> files. +INCDIR = $(INSTALL)/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 + +# LIBDIR should be one of the directories searched by CC's loader for -l... +# libraries. +LIBDIR = $(INSTALL)/local/lib + +# MENUDIR specifies the directory in which the default analysis menu file is +# kept. +MENUDIR = $(INSTALL)/local/lib + +# RESDIR specifies the directory in which X11 client resource files are kept. +RESDIR = $(INSTALL)/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 +# as GNU C (`gcc'). +CC = cc + +# CFLAGS is the set of C compiler options. 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 +# Except for `gcc', most C compilers won't let you use both -g and -O. +CFLAGS = -O -I$(INCDIR) -I/usr/openwin/include + +# 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 = + +# OPENWINHOME specifies the root directory of the OpenWindows hierarchy. +# This is usually /usr/openwin. +OPENWINHOME = /usr/openwin +# Need to use /usr/local on BIH SunOS systems to generate OW 3.0-compatible +# executables. +# OPENWINHOME = /usr/local +# OPENWINHOME = /usr/i486-linuxaout + +# 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 + +# LDFLAGS is the set of loader options appended to the C compiler command line +# to specify loading the WFDB, XView, and Xlib libraries. Unless you have +# changed the value of WFDBLIB in the `makefile' for the WFDB library, `-lwfdb' +# should be correct for the WFDB library; the other library names are probably +# correct unless your X installation is non-standard. If you have installed +# XView 1.0.1 from the X11R4 distribution, uncomment the next line. +# LDFLAGS = -lwfdb -lxview -lX11 +# If you have XView 2.0 or later, you will also need the Open Look graphics +# library (libolgx); in this case, uncomment the next line. +LDFLAGS = -L$(OWLIBDIR) -L/usr/X11R6/lib -L$(LIBDIR) \ + -lwfdb -lxview -lolgx -lX11 +# Users of Red Hat Linux 5.0 or 5.1 (not later versions), use this instead: +# LDFLAGS = -L$(OWLIBDIR) -L/usr/X11R6/lib -L$(LIBDIR) \ +# -lwfdb /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). + +# 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 installed programs 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 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible; its value is usually identical to SETXPERMISSIONS. +SETDPERMISSIONS = chmod 755 + +# SETPERMISSIONS is similarly used to make installed data files accessible. +# These files should not be marked as executable. +SETPERMISSIONS = chmod 644 + +# STRIP is the command needed to strip the symbol table from the executable. +# Uncomment the next line to strip the symbol table for compactness. +STRIP = strip +# Uncomment the next line to retain the symbol table for debugging purposes. +# STRIP = echo + +# 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 + +# `make' or `make install': compile and install WAVE and its help files +install: wave wave.hlp + test -d $(BINDIR) || \ + ( mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) ) + test -d $(HELPDIR)/wave || \ + ( mkdir -p $(HELPDIR)/wave; $(SETDPERMISSIONS) $(HELPDIR)/wave ) + test -d $(MENUDIR) || \ + ( mkdir -p $(MENUDIR); $(SETDPERMISSIONS) $(MENUDIR) ) + test -d $(RESDIR) || \ + ( mkdir -p $(RESDIR); $(SETDPERMISSIONS) $(RESDIR) ) + 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 + +# `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: $(OFILES) + $(CC) -o wave $(OFILES) $(LDFLAGS) + +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 $(CFLAGS) -DHELPDIR=\"$(HELPDIR)\" wave.c +init.o: wave.h xvwave.h init.c +mainpan.o: wave.h xvwave.h mainpan.c Makefile + $(CC) -c $(CFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" mainpan.c +modepan.o: wave.h xvwave.h modepan.c +helppan.o: wave.h xvwave.h helppan.c + $(CC) -c $(CFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" helppan.c +logpan.o: wave.h xvwave.h logpan.c +annpan.o: wave.h xvwave.h annpan.c +edit.o: wave.h xvwave.h edit.c +grid.o: wave.h xvwave.h grid.c +search.o: wave.h xvwave.h search.c +sig.o: wave.h xvwave.h sig.c +annot.o: wave.h xvwave.h annot.c + $(CC) -c $(CFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" annot.c +analyze.o: wave.h xvwave.h analyze.c + $(CC) -c $(CFLAGS) -DMENUDIR=\"$(MENUDIR)\" analyze.c +scope.o: wave.h xvwave.h scope.c +xvwave.o: wave.h xvwave.h bitmaps.h xvwave.c + $(CC) -c $(CFLAGS) -DRESDIR=\"$(RESDIR)\" xvwave.c +help.o: help.c + $(CC) -c $(CFLAGS) -w help.c diff -Naur wfdb-10.1.2/wave/nomake wfdb-10.1.3/wave/nomake --- wfdb-10.1.2/wave/nomake Sun Jan 30 02:47:08 2000 +++ wfdb-10.1.3/wave/nomake Thu Mar 30 15:33:00 2000 @@ -1,6 +1,6 @@ # file: nomake G. Moody 30 January 2000 # -# If renamed as 'makefile', this file prevents WAVE from being compiled +# If renamed as 'Makefile', this file prevents WAVE from being compiled # on systems that don't have XView installed. install: @@ -10,4 +10,4 @@ @echo "Skipping compilation of WAVE (XView required)." clean: - make -f Makefile clean \ No newline at end of file + make -f makewave clean \ No newline at end of file diff -Naur wfdb-10.1.2/wave/sig.c wfdb-10.1.3/wave/sig.c --- wfdb-10.1.2/wave/sig.c Sun Jan 30 04:13:21 2000 +++ wfdb-10.1.3/wave/sig.c Tue Mar 14 11:24:06 2000 @@ -1,10 +1,10 @@ /* file: sig.c G. Moody 27 April 1990 - Last revised: 29 April 1999 + Last revised: 14 March 2000 Signal display functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -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 @@ -239,7 +239,7 @@ and they need not be reset. */ if (nsamp > canvas_width) { x = maxx = canvas_width - 1; - if (lp->xmax != x) { + if (lp->vlist[i][x].x != x) { int xx; lp->vlist[i][0].x = 0; /* absolute first abscissa */ @@ -254,7 +254,7 @@ be correct, and no computation is needed. */ else { x = maxx = nsamp - 1; - if (lp->xmax != x*tscale) { + if (lp->vlist[i][vlist_size-1].x != (int)(x*tscale)) { int xp, xpp; lp->vlist[i][0].x = xp = 0; /* absolute first abscissa */ @@ -414,7 +414,7 @@ if (canvas_width > vlist_size) { for (lp = first_list; lp; lp = lp->next) { - for (i = 0; i < NSIG && lp->vlist[i] != NULL; i++) { + for (i = 0; i < WFDB_MAXSIG && lp->vlist[i] != NULL; i++) { free(lp->vlist[i]); lp->vlist[i] = NULL; } diff -Naur wfdb-10.1.2/wave/wave.c wfdb-10.1.3/wave/wave.c --- wfdb-10.1.2/wave/wave.c Sun Mar 5 23:26:49 2000 +++ wfdb-10.1.3/wave/wave.c Sat Apr 1 07:57:53 2000 @@ -40,8 +40,9 @@ int argc; char *argv[]; { - char *wfdbp, *hp, *p, *tp, *start_string = NULL, *getenv(); + char *wfdbp, *hp, *p, *start_string = NULL, *tp, *getenv(); int do_demo = 0, i, mode = 0; + static char *helppath; static int wave_procno; void set_frame_footer(); @@ -67,6 +68,16 @@ if (i == argc-1 || argc == 1 || getenv("DISPLAY") == NULL) help(); /* print info and quit */ + /* Set the path for XView spot help. */ + if ((hp = getenv("HELPPATH")) == NULL) + hp = "/usr/lib/help"; + helppath = (char *)malloc(strlen(hp) + strlen(helpdir) + 16); + /* (strlen("HELPPATH=") + strlen(":") + strlen("/wave") + 1 = 16) */ + if (helppath) { + sprintf(helppath, "HELPPATH=%s:%s/wave", hp, helpdir); + putenv(helppath); + } + /* Check for requests to open more than one record. */ strcpy(record, argv[++i]); while (p = strchr(record, '+')) { @@ -309,16 +320,6 @@ /* Provide help if no record was specified. */ if (record[0] == '\0') help(); - - /* Set the path for XView spot help. */ - if ((hp = getenv("HELPPATH")) == NULL) - hp = "/usr/lib/help"; - tp = (char *)malloc(strlen(hp) + strlen(helpdir) + 16); - /* (strlen("HELPPATH=") + strlen(":") + strlen("/wave") + 1 = 16) */ - if (tp) { - sprintf(tp, "HELPPATH=%s:%s/wave", hp, helpdir); - putenv(tp); - } /* Set up base frame, quit if unsuccessful. */ if (initialize_graphics(mode)) exit(1); diff -Naur wfdb-10.1.2/wave/xvwave.c wfdb-10.1.3/wave/xvwave.c --- wfdb-10.1.2/wave/xvwave.c Sun Mar 5 23:26:16 2000 +++ wfdb-10.1.3/wave/xvwave.c Sat Apr 1 08:03:00 2000 @@ -39,7 +39,9 @@ #include #include #include +#include /* new */ #include +#include /* new */ #include #include @@ -238,7 +240,7 @@ defaults_set_integer("Wave.View.CoarseTimeScale", tsa_index); defaults_set_integer("Wave.View.AmplitudeScale", vsa_index); defaults_set_integer("Wave.View.AnnotationMode", ann_mode); - defaults_set_integer("Wave.View.AnnotationOverlap", overlap); + // defaults_set_integer("Wave.View.AnnotationOverlap", overlap); defaults_set_integer("Wave.View.SignalMode", sig_mode); defaults_set_integer("Wave.View.TimeMode", time_mode); if (tsa_index > MAX_COARSE_TSA_INDEX) @@ -258,7 +260,8 @@ { if (status == DESTROY_CHECKING) { int result; -#ifdef NOTICE + // #ifdef NOTICE +#if 0 Xv_notice notice = xv_create((Frame)client, NOTICE, XV_SHOW, TRUE, NOTICE_STATUS, &result, @@ -269,7 +272,8 @@ NOTICE_BUTTON_YES, "Confirm", NOTICE_BUTTON_NO, "Cancel", NULL); -#ifdef NOTICE +#if 0 + //#ifdef NOTICE xv_destroy_safe(notice); #endif if (result != NOTICE_YES) @@ -628,10 +632,10 @@ ann_mode = defaults_get_integer("wave.view.annotationmode", "Wave.View.AnnotationMode", 0); - if (overlap < 0) - overlap = defaults_get_integer("wave.view.annotationoverlap", - "Wave.View.AnnotationOverlap", - 0); + // if (overlap < 0) + // overlap = defaults_get_integer("wave.view.annotationoverlap", + // "Wave.View.AnnotationOverlap", + // 0); if (sig_mode < 0) sig_mode = defaults_get_integer("wave.view.signalmode", "Wave.View.SignalMode", diff -Naur wfdb-10.1.2/wave-doc/guide/stdev.c wfdb-10.1.3/wave-doc/guide/stdev.c --- wfdb-10.1.2/wave-doc/guide/stdev.c Thu Jun 24 11:38:43 1999 +++ wfdb-10.1.3/wave-doc/guide/stdev.c Mon Apr 3 09:20:25 2000 @@ -1,6 +1,26 @@ /* file: stdev.c G. Moody 19 August 1996 -Sample application for use with WAVE +------------------------------------------------------------------------------- +stdev: sample application for use with WAVE +Copyright (C) 1996 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 program measures ST deviations given QRS annotations and a pair of `(' and `)' annotations around the first QRS annotation. Its output diff -Naur wfdb-10.1.2/wave-doc/guide/wug.tex wfdb-10.1.3/wave-doc/guide/wug.tex --- wfdb-10.1.2/wave-doc/guide/wug.tex Fri Feb 4 15:22:38 2000 +++ wfdb-10.1.3/wave-doc/guide/wug.tex Mon Apr 3 09:22:44 2000 @@ -2242,13 +2242,13 @@ Let us begin by deciding how the program should be invoked from \WAVE{}. At a minimum, we should be able to specify which signal should be -measured, and the region of interest. The program also needs to know +measured, and the region of interest. \index{record!name} \index{annotator name} -the record and annotator names (the latter so that it can read the -annotations it needs to get started). Following the conventions -used by many other WFDB applications, we add the following entry to -\WAVE{}'s menu file: +The program also needs to know the record and annotator names (the +latter so that it can read the annotations it needs to get started). +Following the conventions used by many other WFDB applications, we +add the following entry to \WAVE{}'s menu file: \begin{verbatim} Measure ST deviationstdev -r $RECORD -a $ANNOTATOR \