diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/app/Makefile.dos wfdb-10.3.14/app/Makefile.dos --- wfdb-10.3.13/app/Makefile.dos 2002-11-22 14:35:41.000000000 -0500 +++ wfdb-10.3.14/app/Makefile.dos 2004-11-28 15:24:17.000000000 -0500 @@ -1,10 +1,10 @@ # file: Makefile.dos G. Moody 2 November 1989 -# Last revised: 22 November 2002 +# Last revised: 28 November 2004 wfdblib 10.3.14 # MSDOS/Windows `make' description file template for WFDB applications # # ----------------------------------------------------------------------------- # WFDB applications: programs for working with annotated signals -# Copyright (C) 2002 George B. Moody +# Copyright (C) 1989-2004 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 @@ -105,7 +105,7 @@ mfilt.exe mrgann.exe mxm.exe nst.exe plotstm.exe pscgen.exe pschart.exe \ psfd.exe rdann.exe rdsamp.exe rr2ann.exe rxr.exe sampfreq.exe sigamp.exe \ skewedit.exe snip.exe sortann.exe sqrs.exe sqrs125.exe sumann.exe \ - sumstats.exe tach.exe wfdbcat.exe wfdbcollate.exe wfdb-config.exe \ + sumstats.exe tach.exe wfdbcat.exe wfdbcollate.exe \ wfdbdesc.exe wfdbwhich.exe wqrs.exe wrann.exe wrsamp.exe wvscript.exe \ xform.exe \ $(XXFILES) diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/app/Makefile.tpl wfdb-10.3.14/app/Makefile.tpl --- wfdb-10.3.13/app/Makefile.tpl 2003-07-09 07:26:17.000000000 -0400 +++ wfdb-10.3.14/app/Makefile.tpl 2004-11-28 16:28:06.000000000 -0500 @@ -1,18 +1,18 @@ -# file: Makefile.tpl G. Moody 23 May 2000 -# Last revised: 9 July 2003 +# file: Makefile.tpl G. Moody 23 May 2000 +# Last revised: 28 November 2004 # This section of the Makefile should not need to be changed. CFILES = ann2rr.c bxb.c calsig.c ecgeval.c epicmp.c fir.c ihr.c mfilt.c \ mrgann.c mxm.c nguess.c nst.c plotstm.c pscgen.c pschart.c psfd.c rdann.c \ rdsamp.c rr2ann.c rxr.c sampfreq.c sample.c sigamp.c sigavg.c skewedit.c \ snip.c sortann.c sqrs.c sqrs125.c sumann.c sumstats.c tach.c time2sec.c \ - view.c vsetup.c wabp.c wfdbcat.c wfdbcollate.c wfdb-config.c wfdbdesc.c \ + view.c vsetup.c wabp.c wfdbcat.c wfdbcollate.c wfdbdesc.c \ wfdbwhich.c wqrs.c wrann.c wrsamp.c wvscript.c xform.c XFILES = ann2rr bxb calsig ecgeval epicmp fir ihr mfilt \ mrgann mxm nguess nst plotstm pscgen pschart psfd rdann \ rdsamp rr2ann rxr sampfreq sigamp sigavg skewedit \ snip sortann sqrs sqrs125 sumann sumstats tach time2sec \ - wabp wfdbcat wfdbcollate wfdb-config wfdbdesc wfdbwhich wqrs \ + wabp wfdbcat wfdbcollate wfdbdesc wfdbwhich wqrs \ wrann wrsamp xform SCRIPTS = cshsetwfdb setwfdb PSFILES = pschart.pro psfd.pro 12lead.pro @@ -81,8 +81,5 @@ $(CC) $(CFLAGS) -DPROLOG=\"$(PSPDIR)/psfd.pro\" psfd.c -o $@ $(LDFLAGS) sigamp: sigamp.c $(CC) $(CFLAGS) sigamp.c -o $@ $(LDFLAGS) -lm -wfdb-config: wfdb-config.c Makefile - $(CC) -DVERSION='"$(VERSION)"' -DCFLAGS='"-I$(INCDIR)"' \ - -DLDFLAGS='"$(LDFLAGS)"' -o $@ wfdb-config.c wqrs: wqrs.c $(CC) $(CFLAGS) wqrs.c -o $@ $(LDFLAGS) -lm diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/app/rdann.c wfdb-10.3.14/app/rdann.c --- wfdb-10.3.13/app/rdann.c 2002-05-20 17:35:41.000000000 -0400 +++ wfdb-10.3.14/app/rdann.c 2004-11-28 12:52:09.000000000 -0500 @@ -1,9 +1,9 @@ /* file rdann.c T. Baker and G. Moody 27 July 1981 - Last revised: 20 May 2002 + Last revised: 28 November 2004 ------------------------------------------------------------------------------- rdann: Print an annotation file in ASCII form -Copyright (C) 2002 George B. Moody +Copyright (C) 1981-2004 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 @@ -40,26 +40,6 @@ #define annpos #include -/* Define the default WFDB path for CD-ROM versions of this program (the MS-DOS - executables found in the `bin' directories of the various CD-ROMs). This - program has been revised since the appearance of these CD-ROMs; compiling - this file will not produce executables identical to those on the CD-ROMs. - Note that the drive letter is not included in these WFDB path definitions, - since it varies among systems. - */ -#ifdef MITCDROM -#define WFDBP ";\\mitdb;\\nstdb;\\stdb;\\vfdb;\\afdb;\\cdb;\\svdb;\\ltdb;\\cudb" -#endif -#ifdef STTCDROM -#define WFDBP ";\\edb;\\valedb" -#endif -#ifdef SLPCDROM -#define WFDBP ";\\slpdb" -#endif -#ifdef MGHCDROM -#define WFDBP ";\\mghdb" -#endif - char *pname; main(argc, argv) @@ -69,19 +49,13 @@ char *record = NULL, *prog_name(); signed char cflag = 0, chanmatch, nflag = 0, nummatch, sflag = 0, submatch; double sps, spm, sph; - int eflag = 0, i, j, xflag = 0; + int eflag = 0, i, j, vflag = 0, xflag = 0; long beat_number = 0L, from = 0L, to = 0L, atol(); static char flag[ACMAX+1]; static WFDB_Anninfo ai; WFDB_Annotation annot; void help(); -#ifdef WFDBP - char *wfdbp = getwfdb(); - if (*wfdbp == '\0') - setwfdb(WFDBP); -#endif - pname = prog_name(argv[0]); /* Accept old syntax. */ @@ -191,6 +165,9 @@ } to = i; break; + case 'v': /* show column headings */ + vflag = 1; + break; case 'x': /* use alternate time format */ xflag = 1; eflag = 0; @@ -241,6 +218,20 @@ } } + if (vflag) { /* print column headings */ + if (eflag) + (void)printf("Elapsed time Sample # "); + else if (xflag) + (void)printf(" Seconds Minutes Hours "); + else { + if (*(mstimstr((WFDB_Time)(-1))) == '[') + (void)printf(" Time Date Sample # "); + else + (void)printf(" Time Sample # "); + } + (void)printf("Type Sub Chan Num\tAux\n"); + } + while (getann(0, &annot) == 0 && (to == 0L || annot.time <= to)) { if ((flag[0] || (isann(annot.anntyp) && flag[annot.anntyp])) && (cflag == 0 || annot.chan == chanmatch) && @@ -249,7 +240,7 @@ if (eflag) (void)printf("%s %7ld", mstimstr(annot.time), annot.time); else if (xflag) - (void)printf("%.3lf %.5lf %.7lf", + (void)printf("%9.3lf %9.5lf %9.7lf", annot.time/sps, annot.time/spm, annot.time/sph); else (void)printf("%s %7ld", mstimstr(-annot.time), annot.time); @@ -295,6 +286,7 @@ " -p TYPE [TYPE ...] print annotations of specified TYPEs only", " -s SUBTYPE print annotations with specified SUBTYPE only", " -t TIME stop at specified TIME", + " -v print column headings", " -x * use alternate time format (seconds, minutes, hours)", "* Only one of -e and -x can be used.", NULL diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/app/wfdb-config.c wfdb-10.3.14/app/wfdb-config.c --- wfdb-10.3.13/app/wfdb-config.c 2002-06-17 19:07:26.000000000 -0400 +++ wfdb-10.3.14/app/wfdb-config.c 1969-12-31 19:00:00.000000000 -0500 @@ -1,107 +0,0 @@ -/* file: wfdb-config.c G. Moody 27 April 2002 - -------------------------------------------------------------------------------- -wfdb-config: Print WFDB library version and linking information -Copyright (C) 2002 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/). -_______________________________________________________________________________ - -*/ - -#include -#ifndef __STDC__ -extern void exit(); -#endif - -#include - -#ifndef VERSION -#define VERSION "VERSION not defined" -#endif - -#ifndef LDFLAGS -#define LDFLAGS "LDFLAGS not defined" -#endif - -#ifndef CFLAGS -#define CFLAGS "CFLAGS not defined" -#endif - -char *pname; - -main(argc, argv) -int argc; -char *argv[]; -{ - char *filename, *prog_name(); - int i; - void help(); - - pname = prog_name(argv[0]); - if (argc == 1) { - help(); - exit(1); - } - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "--version") == 0) - printf("%s\n", VERSION); - else if (strcmp(argv[i], "--libs") == 0) - printf("%s\n", LDFLAGS); - else if (strcmp(argv[i], "--cflags") == 0) - printf("%s\n", CFLAGS); - else - help(); - } - exit(0); -} - -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 [--version] [--libs] [--cflags]\n", - 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 --exclude Makefile --exclude info wfdb-10.3.13/app/wqrs.c wfdb-10.3.14/app/wqrs.c --- wfdb-10.3.13/app/wqrs.c 2002-12-05 02:22:19.000000000 -0500 +++ wfdb-10.3.14/app/wqrs.c 2004-12-08 15:41:21.000000000 -0500 @@ -1,8 +1,8 @@ /* file: wqrs.c Wei Zong 23 October 1998 - Last revised: % December 2002 (by W.Zong and G. Moody) + Last revised: 8 December 2004 (by W.Zong and G. Moody) ----------------------------------------------------------------------------- wqrs: Single-lead QRS detector based on length transform -Copyright (C) 2002 Wei Zong +Copyright (C) 1998-2004 Wei Zong 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 @@ -157,6 +157,7 @@ int Ta, T0; /* high and low detection thresholds */ WFDB_Anninfo a; WFDB_Annotation annot; + WFDB_Gain gain; WFDB_Sample *v; WFDB_Siginfo *s; WFDB_Time from = 0L, next_minute, now, spm, t, tj, tpq, to = 0L, tt, t1; @@ -252,6 +253,7 @@ a.name = "wqrs"; a.stat = WFDB_WRITE; if ((nsig = wfdbinit(record, &a, 1, s, nsig)) < 1) exit(2); if (signal < 0 || signal >= nsig) signal = 0; + if ((gain = s[signal].gain) == 0.0) gain = WFDB_DEFGAIN; sps = sampfreq((char *)NULL); if (Rflag) { if (PWFreq == 60.0) setifreq(sps = 120.); @@ -271,7 +273,7 @@ annot.aux = NULL; Tm = muvadu((unsigned)signal, Tm); samplingInterval = 1000.0/sps; - lfsc = 5.0e6/sps; /* length function scale constant */ + lfsc = 1.25*gain*gain/sps; /* length function scale constant */ spm = 60 * sps; next_minute = from + spm; LPn = sps/PWFreq; /* The LP filter will have a notch at the diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/checkpkg/expected/100s.mrg wfdb-10.3.14/checkpkg/expected/100s.mrg --- wfdb-10.3.13/checkpkg/expected/100s.mrg 2003-02-23 15:42:51.000000000 -0500 +++ wfdb-10.3.14/checkpkg/expected/100s.mrg 2004-12-14 00:13:20.000000000 -0500 @@ -1,4 +1 @@ -ìÕ#'*0! 5(            ý   -      -  ý      ý  ÿ           -  \ No newline at end of file +ìÕ#'*0! 5(             ý           ÿ ý      û   ü               \ No newline at end of file diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/checkpkg/expected/100s.wqrs wfdb-10.3.14/checkpkg/expected/100s.wqrs --- wfdb-10.3.13/checkpkg/expected/100s.wqrs 2002-12-16 21:28:34.000000000 -0500 +++ wfdb-10.3.14/checkpkg/expected/100s.wqrs 2004-12-14 00:08:01.000000000 -0500 @@ -1,5 +1,2 @@ ->          Ð L     û                û     -    ü                ý   -      -  ý      ý  ÿ           -  \ No newline at end of file +>          Ð K     ú                ÿ  û    +    û                 ý          ÿ ý      û  ü              \ No newline at end of file diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/cygwin-slib.def wfdb-10.3.14/conf/cygwin-slib.def --- wfdb-10.3.13/conf/cygwin-slib.def 2002-11-21 21:36:13.000000000 -0500 +++ wfdb-10.3.14/conf/cygwin-slib.def 2004-11-28 22:24:03.000000000 -0500 @@ -1,5 +1,5 @@ # file: cygwin-slib.def I. Henry and G. Moody 19 November 2002 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # This section contains settings suitable for generating a DLL (shared library) # under MS Windows using the free Cygwin/gcc ANSI C compiler, available from @@ -28,6 +28,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# BINDIR specifies the name of a directory in which to install the WFDB +# DLL and the WFDB applications. +BINDIR = $(WFDBROOT)/bin + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -36,9 +40,18 @@ # library. LIBDIR = $(WFDBROOT)/lib -# BINDIR specifies the name of a directory in which to install the WFDB -# DLL. -BINDIR = $(WFDBROOT)/bin +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) # CC is the name of your C compiler. CC = gcc @@ -112,6 +125,11 @@ lib-post-install: cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME) cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME) + test -d $(BINDIR) || \ + ( mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) ) + test /usr/bin = $(BINDIR) || \ + ( cp -p /usr/bin/cygwin1.dll $(BINDIR); \ + cp -p /usr/bin/cygz.dll $(BINDIR) ) cp $(WFDBLIB_DLLNAME) $(BINDIR) lib-post-uninstall: diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/darwin-slib.def wfdb-10.3.14/conf/darwin-slib.def --- wfdb-10.3.13/conf/darwin-slib.def 2002-11-21 21:37:28.000000000 -0500 +++ wfdb-10.3.14/conf/darwin-slib.def 2004-11-28 22:26:48.000000000 -0500 @@ -1,5 +1,5 @@ # file: darwin-slib.def I. Henry and G. Moody 14 November 2002 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # Based on 'freebsd-slib.def'. # This section contains settings suitable for generating a shared library under @@ -27,6 +27,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# 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 + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -35,6 +39,19 @@ # library. LIBDIR = $(WFDBROOT)/lib +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + # CC is the name of your C compiler. CC = gcc diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/freebsd-slib.def wfdb-10.3.14/conf/freebsd-slib.def --- wfdb-10.3.13/conf/freebsd-slib.def 2002-11-21 21:38:57.000000000 -0500 +++ wfdb-10.3.14/conf/freebsd-slib.def 2004-11-28 22:27:08.000000000 -0500 @@ -1,5 +1,5 @@ # file: freebsd-slib.def G. Moody 5 March 2002 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # Based on 'linux-slib.def'. # This section contains settings suitable for generating an ELF-format shared @@ -27,6 +27,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# 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 + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -35,6 +39,19 @@ # library. LIBDIR = $(WFDBROOT)/lib +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + # CC is the name of your C compiler. CC = gcc diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/generic-slib.def wfdb-10.3.14/conf/generic-slib.def --- wfdb-10.3.13/conf/generic-slib.def 2002-11-21 21:41:00.000000000 -0500 +++ wfdb-10.3.14/conf/generic-slib.def 2004-11-28 22:28:12.000000000 -0500 @@ -1,5 +1,5 @@ # file: generic-slib.def G. Moody 31 May 2000 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # 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 @@ -33,6 +33,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# 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 + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -41,6 +45,19 @@ # library. LIBDIR = $(WFDBROOT)/lib +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + # CC is the name of your C compiler. CC = gcc diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/hpux-slib.def wfdb-10.3.14/conf/hpux-slib.def --- wfdb-10.3.13/conf/hpux-slib.def 2002-11-21 21:41:22.000000000 -0500 +++ wfdb-10.3.14/conf/hpux-slib.def 2004-11-28 22:29:25.000000000 -0500 @@ -1,5 +1,5 @@ # file: hpux-slib.def G. Moody 31 May 2000 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # This section contains settings suitable for generating a shared library under # HP-UX. @@ -25,6 +25,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# 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 + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -37,6 +41,19 @@ # library. LIBDIR = $(WFDBROOT)/lib +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + # CC is the name of your C compiler. CC = gcc diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/linux-slib.def wfdb-10.3.14/conf/linux-slib.def --- wfdb-10.3.13/conf/linux-slib.def 2002-12-17 15:55:52.000000000 -0500 +++ wfdb-10.3.14/conf/linux-slib.def 2004-11-28 17:05:29.000000000 -0500 @@ -1,5 +1,5 @@ # file: linux-slib.def G. Moody 31 May 2000 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # This section contains settings suitable for generating an ELF-format shared # library under Linux. @@ -25,6 +25,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# 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 + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -33,6 +37,19 @@ # library. LIBDIR = $(WFDBROOT)/lib +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + # CC is the name of your C compiler. CC = gcc diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/solaris-slib.def wfdb-10.3.14/conf/solaris-slib.def --- wfdb-10.3.13/conf/solaris-slib.def 2002-11-21 21:42:04.000000000 -0500 +++ wfdb-10.3.14/conf/solaris-slib.def 2004-11-28 22:29:46.000000000 -0500 @@ -1,5 +1,5 @@ # file: solaris-slib.def G. Moody 31 May 2000 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # This section contains settings suitable for generating a shared library under # Solaris. @@ -25,6 +25,10 @@ # LWC to ':' (a program that does nothing, successfully). LWC = libwww-config +# 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 + # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include @@ -33,6 +37,19 @@ # library. LIBDIR = $(WFDBROOT)/lib +# 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` + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + # CC is the name of your C compiler. CC = gcc diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/conf/version.def wfdb-10.3.14/conf/version.def --- wfdb-10.3.13/conf/version.def 2004-05-05 13:21:11.000000000 -0400 +++ wfdb-10.3.14/conf/version.def 2004-05-30 21:44:15.000000000 -0400 @@ -1,10 +1,10 @@ # file: version.def G. Moody 24 May 2000 -# Last revised: 5 May 2004 +# Last revised: 30 May 2004 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 13 +RELEASE = 14 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/configure wfdb-10.3.14/configure --- wfdb-10.3.13/configure 2003-10-17 15:42:36.000000000 -0400 +++ wfdb-10.3.14/configure 2004-11-14 11:29:16.000000000 -0500 @@ -1,6 +1,6 @@ #! /bin/sh # file: configure G. Moody 24 May 2000 -# Last revised: 17 October 2003 +# Last revised: 14 November 2004 # Configuration script for the WFDB Software Package # This script was not generated using 'autoconf'. If you can implement @@ -371,12 +371,12 @@ echo "XView textedit application to your PATH, and run ./configure again." cp -p wave/nomake wave/Makefile cp -p wave/nomake waverc/Makefile - echo "WAVE=0" >>../config.cache + echo "WAVE=0" >>config.cache WAVECOMP="WAVE will not be compiled." else echo "found" WAVECOMP="WAVE will be compiled and installed in '$DIR/bin'." - echo "WAVE=1" >>../config.cache + echo "WAVE=1" >>config.cache fi # Clean up old *.o files in lib, to avoid possibly using binaries intended diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/convert/edf2mit.c wfdb-10.3.14/convert/edf2mit.c --- wfdb-10.3.13/convert/edf2mit.c 2003-02-13 17:03:37.000000000 -0500 +++ wfdb-10.3.14/convert/edf2mit.c 2004-06-04 11:39:20.000000000 -0400 @@ -1,9 +1,9 @@ /* file: edf2mit.c G. Moody 16 October 1996 - Last revised: 13 February 2003 + Last revised: 4 June 2004 ------------------------------------------------------------------------------- Convert EDF (European Data Format) file to MIT format header and signal files -Copyright (C) 2003 George B. Moody +Copyright (C) 1996-2004 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 @@ -119,6 +119,18 @@ exit(1); } + if (record[0] == '\0' || newheader(record) < 0) { + fprintf(stderr, "\n"); + help(); + (void)fprintf(stderr, + "\nRun %s again, specifying a valid name for the output record,\n", argv[0]); + (void)fprintf(stderr, + "using the -r option as described above.\n\n"); + (void)fprintf(stderr, + " Valid record names may include letters, digits, and underscores only.\n"); + exit(1); + } + fread(buf, 1, 8, ifile); /* Check to see that the input is an EDF file. (This check will detect up most but not all other types of files.) */ @@ -443,7 +455,8 @@ " -b input is in big-endian byte order (default: little-endian)", " -h print this usage summary", " -i EDFILE read the specified European Data Format file", - " -r RECORD create the specified RECORD (default: use patient id)", + " -r RECORD create the specified RECORD (default: input file name without", + " suffix)", " -s SIGNAL [SIGNAL ...] copy only the specified signal(s) (use signal", " numbers, beginning with zero; default: copy all signals)", " -v print debugging output", diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/convert/wav2mit.c wfdb-10.3.14/convert/wav2mit.c --- wfdb-10.3.13/convert/wav2mit.c 2003-02-12 15:27:50.000000000 -0500 +++ wfdb-10.3.14/convert/wav2mit.c 2004-12-23 21:13:26.000000000 -0500 @@ -1,8 +1,8 @@ /* file: wav2mit.c G. Moody 12 February 2003 - + Last revised: 23 December 2004 ------------------------------------------------------------------------------- wav2mit: Convert a .wav format file to WFDB format -Copyright (C) 2003 George B. Moody +Copyright (C) 2003-2004 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 @@ -306,7 +306,7 @@ static char *help_strings[] = { "usage: %s -i FILE.wav -r RECORD [ OPTIONS ... ]\n", - "where FILE.wav is the name of the wav-format output signal file,", + "where FILE.wav is the name of the wav-format input signal file,", "and OPTIONS may include:", " -h print this usage summary", " -r RECORD create RECORD.hea (default: FILE.hea)", diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/doc/wag-src/rdann.1 wfdb-10.3.14/doc/wag-src/rdann.1 --- wfdb-10.3.13/doc/wag-src/rdann.1 2002-07-31 14:24:49.000000000 -0400 +++ wfdb-10.3.14/doc/wag-src/rdann.1 2004-11-28 13:00:41.000000000 -0500 @@ -1,4 +1,4 @@ -.TH RDANN 1 "31 July 2002" "WFDB 10.2.7" "WFDB Applications Guide" +.TH RDANN 1 "28 November 2004" "WFDB 10.3.14" "WFDB Applications Guide" .SH NAME rdann \- read a WFDB annotation file .SH SYNOPSIS @@ -51,6 +51,9 @@ \fB-t\fR \fItime\fR Stop at the specified \fItime\fR. .TP +\fB-v\fR +Print column headings. +.TP \fB-x\fR Use an alternate time format for output (the first three columns are the elapsed times in seconds, in minutes, and in hours, replacing the diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/doc/wag-src/wfdb-config.1 wfdb-10.3.14/doc/wag-src/wfdb-config.1 --- wfdb-10.3.13/doc/wag-src/wfdb-config.1 2002-08-01 02:07:49.000000000 -0400 +++ wfdb-10.3.14/doc/wag-src/wfdb-config.1 2004-12-13 23:47:11.000000000 -0500 @@ -32,4 +32,4 @@ .SH AUTHOR George B. Moody (george@mit.edu) .SH SOURCE -http://www.physionet.org/physiotools/wfdb/app/wfdb-config.c +http://www.physionet.org/physiotools/wfdb/lib/wfdb-config.c diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/doc/wpg-src/wpg0.tex wfdb-10.3.14/doc/wpg-src/wpg0.tex --- wfdb-10.3.13/doc/wpg-src/wpg0.tex 2004-05-05 11:52:42.000000000 -0400 +++ wfdb-10.3.14/doc/wpg-src/wpg0.tex 2004-11-14 10:41:32.000000000 -0500 @@ -489,6 +489,13 @@ WFDB Software Package distribution, for information on any more recent changes that may not be described here. +@unnumberedsubsec Changes in version 10.3.14 + +Guido Muesch reported that the WFDB library function getspf() did not always +return correct results if the frame frequency does not have an exact +representation as a double precision floating point number. This problem has +now been corrected. + @unnumberedsubsec Changes in version 10.3.13 Using an indirect WFDB path (i.e., setting the WFDB environment diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/doc/wug-src/wug0.tex wfdb-10.3.14/doc/wug-src/wug0.tex --- wfdb-10.3.13/doc/wug-src/wug0.tex 2004-03-08 17:59:07.000000000 -0500 +++ wfdb-10.3.14/doc/wug-src/wug0.tex 2004-12-13 23:39:47.000000000 -0500 @@ -5442,7 +5442,7 @@ \index{WFDB environment variable}\index{environment variables!WFDB} \index{DISPLAY environment variable}\index{environment variables!DISPLAY} If you see a summary of options, rather than the \WAVE{} main window, read -the message carefully; you may not have set the {\tt DISPLAY} or {\tt WFDB} +the message carefully; you may need to set the {\tt DISPLAY} or {\tt WFDB} environment variables, or the X server may not be running. \item @@ -5467,10 +5467,14 @@ \item \index{signal!window} -If \WAVE{}'s signal window appears, but is solid white, your X server has a -bug. Click on any of the navigation controls (e.g., \button{\tt <<}, +If \WAVE{}'s signal window appears, but is solid white or light grey, +your X server does not have backing store enabled. +Click on any of the navigation controls (e.g., \button{\tt <<}, \button{\tt <}, \button{\tt >}, or \button{\tt >>}), or resize the window, -to make the signals appear. If the signal window is solid (or nearly solid) +to make the signals appear. To avoid this problem entirely (until +the next time you upgrade your X server), turn on backing store in +your X server. For instructions for doing this, and for what to do if the +signal window is solid (or nearly solid) blue or black, or has only horizontal lines across it, see \hyperref{``I can't see the signals!''} {``I can't see the signals!'' (section~} @@ -5481,8 +5485,8 @@ \index{command-line options!{\tt -S}}\index{options!{\tt -S}} \item If the signals appear, but there are no annotations or time stamps in the -signal window, your X server has a (different) bug. Restart \WAVE{}, adding -the `{\tt -S}' option to the `wave' command. Also see +signal window, your X server has defective support for overlay graphics. +Restart \WAVE{}, adding the `{\tt -S}' option to the `wave' command. Also see \hyperref{``I can't see text in the signal window!''} {``I can't see text in the signal window!'' (section~} {, page~\pageref{faq:cannot-see-text})} @@ -5511,7 +5515,7 @@ HTTP range requests, such as Apache, or download a copy of the record to your local disk. -PhysioNet and its mirrors support HTTL range requests, so if you experience +PhysioNet and its mirrors support HTTP range requests, so if you experience this problem when reading data from PhysioNet, the cause may be network congestion; in this case, try using a different mirror. @@ -5572,9 +5576,24 @@ \label{faq:cannot-see-signals} \index{signal!window} -If the signal window is solid white, your X server has a bug. Click on any of -the navigation controls (e.g., \button{\tt <<}, \button{\tt <}, \button{\tt >}, -or \button{\tt >>}), or resize the window, to make the signals appear. +If the signal window is solid white or light grey, your X server does not have +backing store enabled. +Click on any of the navigation controls (e.g., \button{\tt <<}, +\button{\tt <}, \button{\tt >}, or \button{\tt >>}), or resize the window, to +make the signals appear. If this works, the problem is almost certainly that +backing store has been disabled in the X server's configuration file. You can +verify this by running the command +\begin{verbatim} + xdpyinfo | grep backing +\end{verbatim} +To enable backing store, insert the line +\begin{verbatim} + Option "backingstore" +\end{verbatim} +in the {\tt Device} section of your X server's configuration file +(usually {\tt /etc/X11/xorg.conf} or {\tt /etc/X11/XF86Config}), +or run the server with the option ``{\tt +bs}'' to obtain the same result. +See the documentation for your X server for further information. \index{format!of signal files} If the signal window is solid or nearly solid blue (or black if you have @@ -5635,6 +5654,28 @@ application such as Netscape has already allocated most of the color map. To avoid this problem, start \WAVE{} before starting Netscape. +\subsection{Why does \WAVE{} crash, saying ``All pty's in use''?} + +\index{pty problems} +This problem occurs if the installed version of the XView library requires +BSD ptys, and if your operating system does not support BSD ptys. \WAVE{} +may operate without problems until you attempt to open a text or terminal +window (by selecting {\sf Analyze...} from the {\sf File} menu, or by +various selections from the {\sf Properties} and {\sf Help menus}. Typically, +\WAVE{} then exits with the error ``{\tt All pty's in use}''. + +Two types of ptys (pseudo-terminal devices) have been supported by most Linux +distributions until recently. Traditionally, XView has used BSD-style ptys +(pseudo-terminal devices) to implement text windows and terminal emulator +objects such as WAVE's analysis commands window. Most recent Linux +distributions based on version 2.6 kernels, including Fedora Core 2 and later, +support only the newer UNIX98 (SVR4-style) ptys. Although some older XView +libraries can be installed on these platforms, they will cause WAVE (and other +XView-based applications) to crash whenever a text or terminal window is +opened. The recommended solution is to install XView libraries that use UNIX98 +(SVR4) ptys rather than the older BSD (``legacy'') ptys; these are available +from PhysioNet. + \subsection{\WAVE{} doesn't draw/erase properly in the scope window!} \index{Scope window@{\sf Scope} window} diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/lib/annot.c wfdb-10.3.14/lib/annot.c --- wfdb-10.3.13/lib/annot.c 2003-08-03 20:13:45.000000000 -0400 +++ wfdb-10.3.14/lib/annot.c 2004-11-14 11:10:24.000000000 -0500 @@ -1,10 +1,10 @@ /* file: annot.c G. Moody 13 April 1989 - Last revised: 3 August 2003 wfdblib 10.3.10 + Last revised: 14 November 2004 wfdblib 10.3.14 WFDB library functions for annotations _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 2003 George B. Moody +Copyright (C) 1989-2004 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 @@ -147,7 +147,8 @@ if (getann(i, &annot) < 0) /* prime the pump */ return (-1); - while (getann(i,&annot) == 0 && annot.time == 0L && annot.anntyp == NOTE) { + while (getann(i,&annot) == 0 && annot.time == 0L && + annot.anntyp == NOTE && annot.subtyp == 0) { if (annot.aux == NULL || *annot.aux < 1 || *(annot.aux+1) == '#') continue; p1 = strtok(annot.aux+1, " \t"); @@ -171,7 +172,10 @@ } } - (void)ungetann(i, &annot); + if (annot.time != 0L || annot.anntyp != NOTE || annot.subtyp != 0 || + annot.aux == NULL || + strncmp(annot.aux + 1, "## sampling frequency: ", 23)) + (void)ungetann(i, &annot); return (0); } @@ -182,7 +186,7 @@ static int put_ann_table(i) WFDB_Annotator i; { - int a; + int a, flag = 0; char buf[256]; WFDB_Annotation annot; @@ -192,10 +196,21 @@ annot.aux = buf; for (a = 0; a <= ACMAX; a++) if (modified[a]) { + if (flag == 0) { /* mark the beginning of the table */ + (void)sprintf(buf+1, "## annotation type definitions"); + buf[0] = strlen(buf+1); + if (putann(i, &annot) < 0) return (-1); + } (void)sprintf(buf+1, "%d %s %s", a, annstr(a), anndesc(a)); buf[0] = strlen(buf+1); if (putann(i, &annot) < 0) return (-1); + flag = 1; } + if (flag) { /* if a table was written, mark its end */ + (void)sprintf(buf+1, "## end of definitions"); + buf[0] = strlen(buf+1); + if (putann(i, &annot) < 0) return (-1); + } return (0); } diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/lib/Makefile.dos wfdb-10.3.14/lib/Makefile.dos --- wfdb-10.3.13/lib/Makefile.dos 2002-10-26 15:11:14.000000000 -0400 +++ wfdb-10.3.14/lib/Makefile.dos 2004-11-28 15:24:13.000000000 -0500 @@ -1,10 +1,10 @@ # file: Makefile.dos G. Moody 2 November 1989 -# Last revised: 26 October 2002 wfdblib 10.2.9 +# Last revised: 28 November 2004 wfdblib 10.3.14 # MSDOS/Windows `make' description file template for compiling the WFDB library # # _____________________________________________________________________________ # wfdb: a library for reading and writing annotated waveforms(time series data) -# Copyright (C) 2000 George B. Moody +# Copyright (C) 1989-2004 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 @@ -25,7 +25,6 @@ # please visit PhysioNet (http://www.physionet.org/). # _____________________________________________________________________________ # -# # WARNING: NO SUPPORT FOR PROPRIETARY COMPILERS. Previous versions of the WFDB # software package have been compiled successfully by other users using various # proprietary compilers including those mentioned below. You may find this @@ -39,6 +38,7 @@ # compiler (see below for suitable settings for several popular C/C++ # compilers): # +# BINDIR The directory in which the applications will be installed. # CC The name of the command-line C compiler. # CDFLAGS Optional arguments to be supplied to CC to produce object files # with debugging symbols. @@ -47,14 +47,6 @@ # COFLAGS Optional arguments to be supplied to CC to produce optimized # object files (or normal object files if no optimization is # available). -# WFDBLIB The name of the static (large memory model) WFDB library. -# WFDBDLL The name of the large memory model WFDB dynamic link library -# (DLL) for use with MS Windows applications. -# WFDBDLLDEF The name of the WFDB DLL export definition file. If you -# compile versions of the WFDB DLL using mutually incompatible -# compilers, make sure that the library name in the first line -# of this file is unique for each version. -# WFDBILIB The name of the import library corresponding to WFDBDLL. # INCDIR One of the directories searched by CC for #include <...> # files. For Microsoft C, use one of the directories specified # by the INCLUDE environment variable. If you are using Turbo @@ -72,6 +64,14 @@ # find it most convenient to use the directory in which the # standard libraries reside (e.g., \tc\lib or \bc4\lib). # The WFDB libraries will be installed in LIBDIR. +# WFDBLIB The name of the static (large memory model) WFDB library. +# WFDBDLL The name of the large memory model WFDB dynamic link library +# (DLL) for use with MS Windows applications. +# WFDBDLLDEF The name of the WFDB DLL export definition file. If you +# compile versions of the WFDB DLL using mutually incompatible +# compilers, make sure that the library name in the first line +# of this file is unique for each version. +# WFDBILIB The name of the import library corresponding to WFDBDLL. INCDIR = c:\include LIBDIR = c:\lib @@ -157,6 +157,9 @@ $(LIBDIR): -mkdir $(LIBDIR) +$(BINDIR) + -mkdir $(BINDIR) + # Build the static library buildstatic: del $(WFDBLIB) @@ -190,12 +193,17 @@ copy ecgcodes.h $(INCDIR)\wfdb copy ecgmap.h $(INCDIR)\wfdb -install: $(LIBDIR) $(TARGETS) headers +wfdb-config.exe: headers wfdb-config.c + $(CC) $(CFLAGS) wfdb-config.c + +install: $(LIBDIR) $(BINDIR) $(TARGETS) headers wfdb-config.exe + copy wfdb-config.exe $(BINDIR) # If you are using Microsoft `make' (not `nmake'), you may wish to comment out -# the next five lines to avoid having `make' clean up automatically. +# the next six lines to avoid having `make' clean up automatically. clean: -del $(WFDBLIB) -del $(WFDBDLL) -del $(WFDBILIB) -del *.obj + -del wfdb-config.exe diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/lib/Makefile.tpl wfdb-10.3.14/lib/Makefile.tpl --- wfdb-10.3.13/lib/Makefile.tpl 2002-12-18 14:43:07.000000000 -0500 +++ wfdb-10.3.14/lib/Makefile.tpl 2004-12-13 23:45:54.000000000 -0500 @@ -1,5 +1,5 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 21 November 2002 +# Last revised: 28 November 2004 # This section of the Makefile should not need to be changed. INCLUDES = $(INCDIR)/wfdb/wfdb.h $(INCDIR)/wfdb/ecgcodes.h \ @@ -11,30 +11,37 @@ 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) +# `make' or `make all': build the WFDB library and wfdb-config +all: $(OFILES) wfdb-config $(BUILDLIB) $(OFILES) $(BUILDLIB_LDFLAGS) # `make install': install the WFDB library and headers -install: $(INCLUDES) $(LIBDIR) all +install: $(INCLUDES) $(LIBDIR) $(BINDIR) all cp $(WFDBLIB) $(LIBDIR) $(SETLPERMISSIONS) $(LIBDIR)/$(WFDBLIB) $(MAKE) lib-post-install + ../install.sh $(BINDIR) wfdb-config uninstall: + ../uninstall.sh $(BINDIR) wfdb-config + ../uninstall.sh $(BINDIR) ../uninstall.sh $(INCDIR)/wfdb $(HFILES) ../uninstall.sh $(INCDIR) ../uninstall.sh $(LIBDIR) $(WFDBLIB) $(MAKE) lib-post-uninstall ../uninstall.sh $(LIBDIR) +wfdb-config: wfdb-config.c Makefile + $(CC) -DVERSION='"$(VERSION)"' -DCFLAGS='"-I$(INCDIR)"' \ + -DLDFLAGS='"$(LDFLAGS)"' -I$(INCDIR) -o $@ wfdb-config.c + # `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 $(OFILES) libwfdb.* *~ wfdb.h wfdblib.h + rm -f $(OFILES) libwfdb.* *.dll *~ wfdb.h wfdblib.h wfdb-config # `make TAGS': make an `emacs' TAGS file TAGS: $(HFILES) $(CFILES) @@ -42,9 +49,11 @@ # `make listing': print a listing of WFDB library sources listing: - $(PRINT) README $(MFILES) $(HFILES) $(CFILES) + $(PRINT) README $(MFILES) $(HFILES) $(CFILES) wfdb-config.c # Rules for creating installation directories +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) $(INCDIR): mkdir -p $(INCDIR); $(SETDPERMISSIONS) $(INCDIR) $(INCDIR)/wfdb: $(INCDIR) diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/lib/signal.c wfdb-10.3.14/lib/signal.c --- wfdb-10.3.13/lib/signal.c 2003-10-17 10:31:23.000000000 -0400 +++ wfdb-10.3.14/lib/signal.c 2004-11-14 11:02:32.000000000 -0500 @@ -1,10 +1,10 @@ /* file: signal.c G. Moody 13 April 1989 - Last revised: 17 October 2003 wfdblib 10.3.11 + Last revised: 14 November 2004 wfdblib 10.3.14 WFDB library functions for signals _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 2003 George B. Moody +Copyright (C) 1989-2004 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 @@ -1897,11 +1897,19 @@ getvec's operating mode, which is determined by environment variable WFDBGVMODE or constant DEFWFDBGVMODE by default. When reading ordinary records (with all signals sampled at the same frequency), getvec's -behavior is independent of its operating mode. */ +behavior is independent of its operating mode. + +Since sfreq and ffreq are always positive, the effect of adding 0.5 to their +quotient before truncating it to an int (see below) is to round the quotient +to the nearest integer. Although sfreq should always be an exact multiple +of ffreq, loss of precision in representing non-integer frequencies can cause +problems if this rounding is omitted. Thanks to Guido Muesch for pointing out +this problem. + */ FINT getspf() { - return ((sfreq != ffreq) ? (int)(sfreq/ffreq) : 1); + return ((sfreq != ffreq) ? (int)(sfreq/ffreq + 0.5) : 1); } FVOID setgvmode(mode) diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/lib/wfdb-config.c wfdb-10.3.14/lib/wfdb-config.c --- wfdb-10.3.13/lib/wfdb-config.c 1969-12-31 19:00:00.000000000 -0500 +++ wfdb-10.3.14/lib/wfdb-config.c 2002-06-17 19:07:26.000000000 -0400 @@ -0,0 +1,107 @@ +/* file: wfdb-config.c G. Moody 27 April 2002 + +------------------------------------------------------------------------------- +wfdb-config: Print WFDB library version and linking information +Copyright (C) 2002 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/). +_______________________________________________________________________________ + +*/ + +#include +#ifndef __STDC__ +extern void exit(); +#endif + +#include + +#ifndef VERSION +#define VERSION "VERSION not defined" +#endif + +#ifndef LDFLAGS +#define LDFLAGS "LDFLAGS not defined" +#endif + +#ifndef CFLAGS +#define CFLAGS "CFLAGS not defined" +#endif + +char *pname; + +main(argc, argv) +int argc; +char *argv[]; +{ + char *filename, *prog_name(); + int i; + void help(); + + pname = prog_name(argv[0]); + if (argc == 1) { + help(); + exit(1); + } + + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "--version") == 0) + printf("%s\n", VERSION); + else if (strcmp(argv[i], "--libs") == 0) + printf("%s\n", LDFLAGS); + else if (strcmp(argv[i], "--cflags") == 0) + printf("%s\n", CFLAGS); + else + help(); + } + exit(0); +} + +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 [--version] [--libs] [--cflags]\n", + 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 --exclude Makefile --exclude info wfdb-10.3.13/lib/wfdb.h0 wfdb-10.3.14/lib/wfdb.h0 --- wfdb-10.3.13/lib/wfdb.h0 2004-05-05 13:22:24.000000000 -0400 +++ wfdb-10.3.14/lib/wfdb.h0 2004-05-30 21:45:05.000000000 -0400 @@ -1,5 +1,5 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 5 May 2004 wfdblib 10.3.13 + Last revised: 30 May 2004 wfdblib 10.3.14 WFDB library type, constant, structure, and function interface definitions _______________________________________________________________________________ @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 3 -#define WFDB_RELEASE 13 +#define WFDB_RELEASE 14 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ /* Determine what type of compiler is being used. */ diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/Makefile.tpl wfdb-10.3.14/Makefile.tpl --- wfdb-10.3.13/Makefile.tpl 2002-12-18 15:42:30.000000000 -0500 +++ wfdb-10.3.14/Makefile.tpl 2004-05-30 21:42:55.000000000 -0400 @@ -1,5 +1,5 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 17 December 2002 +# Last revised: 30 May 2004 # 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'). @@ -125,7 +125,8 @@ # '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 ../$(PACKAGE)-$(ARCH).tar.gz . + cd $(HOME); mv wfdb-test $(PACKAGE)-$(ARCH) + cd $(HOME); tar cfvz $(PACKAGE)-$(ARCH).tar.gz $(PACKAGE)-$(ARCH) # 'make doc-tarball': make a gzipped tar archive of formatted documents # (requires many freely-available utilities that are not part of this diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/MANIFEST wfdb-10.3.14/MANIFEST --- wfdb-10.3.13/MANIFEST 2003-07-10 12:30:34.000000000 -0400 +++ wfdb-10.3.14/MANIFEST 2004-12-13 23:47:37.000000000 -0500 @@ -50,7 +50,6 @@ app/wabp.c app/wfdbcat.c app/wfdbcollate.c -app/wfdb-config.c app/wfdbdesc.c app/wfdbwhich.c app/wqrs.c @@ -498,6 +497,7 @@ lib/makelib lib/README lib/signal.c +lib/wfdb-config.c lib/wfdbdll.def lib/wfdb.h0 lib/wfdbinit.c diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/NEWS wfdb-10.3.14/NEWS --- wfdb-10.3.13/NEWS 2004-05-05 12:53:50.000000000 -0400 +++ wfdb-10.3.14/NEWS 2004-12-14 00:07:22.000000000 -0500 @@ -1,3 +1,29 @@ +10.3.14: + Use rdann's new -v option to add column headings to its standard + output. + + A gain dependency in wqrs has been removed. As a result, wqrs + now works better on low-resolution input than previous versions. + The change results in occasional shifts of one sampling interval + in the placement of annotations for typical (higher resolution) + records, relative to previous versions. + + The 'make' rules for creating a binary tarball have been improved, + and when making one on the Cygwin platform, the Cygwin DLLs are now + included automatically. + + Guido Muesch reported that the WFDB library function getspf() did + not always return correct results if the frame frequency does not + have an exact representation as a double precision floating point + number. This problem has now been corrected. + + To simplify installation of the WFDB software package, wfdb-config + has been moved from app to lib. + + Carlos AS Felgueiras provided a patch to correct several problems + related to compiling the WFDB software package and building the + WFDB rpms. + 10.3.13: Using an indirect WFDB path (i.e., setting the WFDB environment variable to a value such as '@FILE', where FILE contains the diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/wave/Wave.res wfdb-10.3.14/wave/Wave.res --- wfdb-10.3.13/wave/Wave.res 2004-03-08 14:06:11.000000000 -0500 +++ wfdb-10.3.14/wave/Wave.res 2004-12-13 14:16:46.000000000 -0500 @@ -1,5 +1,5 @@ -! file: Wave.res G. Moody April 1990 -! Last revised: 8 March 2004 +! file: Wave.res G. Moody April 1990 +! Last revised: 13 December 2004 ! X11 resources for WAVE ! ! You can control many aspects of WAVE's appearance and behavior by setting @@ -25,8 +25,12 @@ ! Here are two WAVE resources that most users will want to set (although you ! may prefer a different setting than those shown here). -Wave.SignalWindow.font: lucidasans-bold-14 -Wave*background: white +Wave*background: white +Wave.SignalWindow.font: -*-lucida-bold-r-normal-sans-14-* +! If WAVE complains it can't find the font above, try this one instead: +! Wave.SignalWindow.font: lucidasans-bold-14 +! (or use xlsfonts to find an alternative that you like). + ! ----------------------------------------------------------------------------- diff -Naur --exclude Makefile --exclude info wfdb-10.3.13/wfdb.spec wfdb-10.3.14/wfdb.spec --- wfdb-10.3.13/wfdb.spec 2004-03-08 15:01:17.000000000 -0500 +++ wfdb-10.3.14/wfdb.spec 2004-12-23 21:34:43.000000000 -0500 @@ -51,8 +51,10 @@ %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/include/wfdb +mkdir -p $RPM_BUILD_ROOT/usr/bin cd lib; cp -p libwfdb.so* $RPM_BUILD_ROOT/usr/lib cp -p wfdb.h ecgcodes.h ecgmap.h wfdblib.h $RPM_BUILD_ROOT/usr/include/wfdb + cp -p wfdb-config $RPM_BUILD_ROOT/usr/bin cd ../wave; make WFDBROOT=$RPM_BUILD_ROOT/usr install cd ../waverc; make WFDBROOT=$RPM_BUILD_ROOT/usr install cd ../app; make WFDBROOT=$RPM_BUILD_ROOT/usr install