diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/app/epicmp.c wfdb-10.5.2/app/epicmp.c --- wfdb-10.5.1/app/epicmp.c 2003-07-10 13:22:14.000000000 -0400 +++ wfdb-10.5.2/app/epicmp.c 2010-04-17 07:34:20.000000000 -0400 @@ -1,9 +1,9 @@ /* file: epicmp.c G. Moody 3 March 1992 - Last revised: 10 July 2003 + Last revised: 17 April 2010 ------------------------------------------------------------------------------- epicmp: ANSI/AAMI-standard episode-by-episode annotation file comparator -Copyright (C) 2003 George B. Moody +Copyright (C) 1992-2010 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 @@ -614,9 +614,9 @@ else ofile = stdout; /* Check one reference ST measurement on each iteration. */ - while (find_reference_extremum(mode)) { + while (find_reference_extremum(mode)) { /* outer loop */ /* Find the first test beat annotation after tref. */ - while ((stat = getann(1, &testann)) == 0) { + while ((stat = getann(1, &testann)) == 0) { /* inner loop */ /* Ignore non-beat annotations. */ if (!isqrs(testann.anntyp)) continue; pst0 = st0; @@ -629,6 +629,8 @@ (void)sscanf(testann.aux+1, "%d%d", &st0, &st1); if (testann.time > tref) break; + pttest = testann.time; /* This statement was moved from the end of + the outer loop in version 10.5.2. */ } if (stat != 0 || tref - pttest >= testann.time - tref) sttest = sigref ? st1 : st0; /* current annotation is closer */ @@ -639,7 +641,6 @@ if (stref - sttest > 100 || sttest - stref > 100) (void)fprintf(ofile, " *"); (void)fprintf(ofile, "\n"); - pttest = testann.time; } if (ofile != stdout) diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/app/sqrs125.c wfdb-10.5.2/app/sqrs125.c --- wfdb-10.5.1/app/sqrs125.c 2009-01-07 14:14:00.000000000 -0500 +++ wfdb-10.5.2/app/sqrs125.c 2010-04-09 13:59:16.000000000 -0400 @@ -1,9 +1,9 @@ /* file: sqrs125.c G. Moody 27 October 1990 - Last revised: 7 January 2009 + Last revised: 9 April 2010 ------------------------------------------------------------------------------- sqrs125: Single-channel QRS detector for data sampled at 100 - 150 Hz -Copyright (C) 1990-2009 George B. Moody +Copyright (C) 1990-2010 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 @@ -93,7 +93,7 @@ int filter, i, minutes = 0, nsig, time = 0, slopecrit, sign, maxslope = 0, nslope = 0, qtime, maxtime, t0, t1, t2, t3, t4, t5, - ms160, ms200, s2, scmax, scmin = 250, signal = 0, *v; + ms160, ms200, s2, scmax, scmin = 250, signal = -1, *v; long from = 0L, next_minute, now, spm, to = 0L; WFDB_Anninfo a; WFDB_Annotation annot; @@ -141,7 +141,7 @@ pname); exit(1); } - signal = findsig(argv[i]); + signal = i; break; case 't': /* end time */ if (++i >= argc) { @@ -201,6 +201,7 @@ } spm = strtim("1:0"); next_minute = from + spm; + if (signal >= 0) signal = findsig(argv[signal]); if (signal < 0 || signal >= nsig) signal = 0; scmin = muvadu((unsigned)signal, scmin); if (scmin < 1) scmin = muvadu((unsigned)signal, 250); diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/app/sqrs.c wfdb-10.5.2/app/sqrs.c --- wfdb-10.5.1/app/sqrs.c 2009-01-07 14:11:23.000000000 -0500 +++ wfdb-10.5.2/app/sqrs.c 2010-04-09 13:59:18.000000000 -0400 @@ -1,9 +1,9 @@ /* file: sqrs.c G. Moody 27 October 1990 - Last revised: 7 January 2009 + Last revised: 9 April 2010 ------------------------------------------------------------------------------- sqrs: Single-channel QRS detector -Copyright (C) 1990-2009 George B. Moody +Copyright (C) 1990-2010 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 @@ -85,7 +85,7 @@ int filter, i, minutes = 0, nsig, time = 0, slopecrit, sign, maxslope = 0, nslope = 0, qtime, maxtime, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, - ms160, ms200, s2, scmax, scmin = 500, signal = 0, *v; + ms160, ms200, s2, scmax, scmin = 500, signal = -1, *v; long from = 0L, next_minute, now, spm, to = 0L; WFDB_Anninfo a; WFDB_Annotation annot; @@ -133,7 +133,7 @@ pname); exit(1); } - signal = findsig(argv[i]); + signal = i; break; case 't': /* end time */ if (++i >= argc) { @@ -193,6 +193,7 @@ } spm = strtim("1:0"); next_minute = from + spm; + if (signal >= 0) signal = findsig(argv[signal]); if (signal < 0 || signal >= nsig) signal = 0; scmin = muvadu((unsigned)signal, scmin); if (scmin < 1) scmin = muvadu((unsigned)signal, 500); diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/app/wabp.c wfdb-10.5.2/app/wabp.c --- wfdb-10.5.1/app/wabp.c 2009-06-12 16:38:01.000000000 -0400 +++ wfdb-10.5.2/app/wabp.c 2010-04-09 13:53:59.000000000 -0400 @@ -1,8 +1,8 @@ /* file wabp.c Wei Zong 23 October 1998 - Last revised: 12 June 2009 (by O. Abdala) + Last revised: 9 April 2010 (by G. Moody) ----------------------------------------------------------------------------- wabp: beat detector for arterial blood presure (ABP) signal -Copyright (C) 1998-2009 Wei Zong +Copyright (C) 1998-2010 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 @@ -68,7 +68,7 @@ int *ebuf; int nsig; /* number of input signals */ int SLPwindow; /* Slope window size */ -int sig = -1; /* signal number of signal to be analyzed (initial +int sig = -1; /* signal number of signal to be analyzed (initial value forces search for ABP, ART, or BP signal) */ int Tm = TmDEF; /* minimum threshold value */ WFDB_Sample *lbuf = NULL; @@ -209,7 +209,7 @@ pname); exit(1); } - sig = findsig(argv[i]); + sig = i; /* remember argument until record is open */ break; case 't': /* end time */ if (++i >= argc) { @@ -248,6 +248,7 @@ } a.name = "wabp"; a.stat = WFDB_WRITE; if ((nsig = wfdbinit(record, &a, 1, s, nsig)) < 1) exit(2); + if (sig >= 0) sig = findsig(argv[sig]); if (sig < 0 || sig >= nsig) { /* Identify the lowest-numbered ABP, ART, or BP signal */ for (i = 0; i < nsig; i++) @@ -263,6 +264,7 @@ } sig = i; } + if (vflag) fprintf(stderr, "%s: analyzing signal %d (%s)\n", pname, sig, s[sig].desc); diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/app/wqrs.c wfdb-10.5.2/app/wqrs.c --- wfdb-10.5.1/app/wqrs.c 2009-01-07 14:17:42.000000000 -0500 +++ wfdb-10.5.2/app/wqrs.c 2010-04-09 13:54:05.000000000 -0400 @@ -1,8 +1,8 @@ /* file: wqrs.c Wei Zong 23 October 1998 - Last revised: 7 January 2009 (by G. Moody) + Last revised: 9 April 2010 (by G. Moody) ----------------------------------------------------------------------------- wqrs: Single-lead QRS detector based on length transform -Copyright (C) 1998-2009 Wei Zong +Copyright (C) 1998-2010 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 @@ -83,7 +83,7 @@ int LPn, LP2n; /* filter parameters (dependent on sampling rate) */ int LTwindow; /* LT window size */ int PWFreq = PWFreqDEF; /* power line (mains) frequency, in Hz */ -int sig = 0; /* signal number of signal to be analyzed */ +int sig = -1; /* signal number of signal to be analyzed */ int Tm = TmDEF; /* minimum threshold value */ WFDB_Sample *lbuf = NULL; @@ -222,7 +222,7 @@ pname); exit(1); } - sig = findsig(argv[i]); + sig = i; /* remember the argument until the record is open */ break; case 't': /* end time */ if (++i >= argc) { @@ -271,6 +271,7 @@ setafreq(sampfreq((char *)NULL)); a.name = "wqrs"; a.stat = WFDB_WRITE; if (annopen(record, &a, 1) < 0) exit(2); + if (sig >= 0) sig = findsig(argv[sig]); if (sig < 0 || sig >= nsig) sig = 0; if ((gain = s[sig].gain) == 0.0) gain = WFDB_DEFGAIN; if (Rflag) { diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/app/xform.c wfdb-10.5.2/app/xform.c --- wfdb-10.5.1/app/xform.c 2010-03-12 13:41:09.000000000 -0500 +++ wfdb-10.5.2/app/xform.c 2010-04-18 18:54:26.000000000 -0400 @@ -897,8 +897,8 @@ double vd = vt*gain[i] + deltav[i]; if (dflag) vd += DITHER; - if (vd >= 0) vout[i] = (int)(vd + 0.5); - else vout[i] = (int)(vd - 0.5); + if (vd >= 0) vout[j] = (int)(vd + 0.5); + else vout[j] = (int)(vd - 0.5); if (vout[j] > vmax[i]) { (void)fprintf(stderr, "v[%d] = %d (out of range)\n", i, vout[j]); diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/doc/wag-src/wfdb2mat.1 wfdb-10.5.2/doc/wag-src/wfdb2mat.1 --- wfdb-10.5.1/doc/wag-src/wfdb2mat.1 2010-03-17 14:26:38.000000000 -0400 +++ wfdb-10.5.2/doc/wag-src/wfdb2mat.1 2010-04-12 10:16:44.000000000 -0400 @@ -95,7 +95,7 @@ then the converted data can be read and plotted in Matlab or Octave from within the \fBmitdb\fR directory by running the command: .br - \fBplotATM('200m.mat', '200m.info') + \fBplotATM('200m.mat', '200m.info')\fR .br (Download \fBhttp://physionet.org/physiotools/matlab/plotATM.m\fR and install it in your Matlab or Octave environment first.) diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/doc/wpg-src/wpg0.tex wfdb-10.5.2/doc/wpg-src/wpg0.tex --- wfdb-10.5.1/doc/wpg-src/wpg0.tex 2010-03-19 23:57:18.000000000 -0400 +++ wfdb-10.5.2/doc/wpg-src/wpg0.tex 2010-04-18 09:27:38.000000000 -0400 @@ -518,7 +518,8 @@ @menu * print samples:: A trivial example program. * compiling:: Compiling a C program with the WFDB library. -* other languages:: Using the WFDB library with C++ or Fortran. +* other languages:: Using the WFDB library with C++, Fortran, + Java, Perl, Python, C#, or Matlab. * WFDB path:: WFDB library environment variables. * running example:: Running the example program. * name restrictions:: Names to avoid when writing your programs. @@ -782,45 +783,6 @@ @uref{http://www.physionet.org/physiotools/wfdb/fortran/README,fortran/README} in the WFDB Software Package. -@unnumberedsubsec Matlab wrappers -@cindex Matlab bindings -@cindex Octave bindings -@cindex Scilab bindings -@cindex wrappers for Matlab, Octave, or Scilab - -A set of wrappers for Matlab has been written and contributed by Jonas Carlson. -These wrappers (@code{wfdb_tools}) provide access to almost all of the -functionality of the WFDB library, including HTTP access to remote data files, -to users of Matlab R13 (but not earlier versions) under GNU/Linux, Mac OS X, -and MS-Windows; other platforms remain to be tested. The wrappers, together -with examples and a tutorial/reference guide, are available from -@uref{http://www.@-physio@-net.@-org/@-physio@-tools/@-matlab/@-wfdb_tools/}. -Using the @code{wfdb_tools} wrappers, the example program can be written in -Matlab as: - -@example - S = WFDB_isigopen('100s') - DATA = WFDB_getvec(length(S), 10) -@end example - -Note that @code{length(S)} is the number of available signals as determined -by @code{WFDB_isigopen} (which becomes the number of columns in @code{DATA}). - -It should be possible to write a set of wrapper functions similar to -@code{wfdb_tools} for use with Octave (a freely available open-source -language that is compatible with Matlab, available from -@uref{http://www.che.wisc.edu/octave/}) or Scilab (an open-source -scientific software package for numerical computations, with a language -similar to that of Matlab, available from -@uref{http://www-rocq.@-inria.@-fr/@-scilab/}). -Jesus Olivan Palacios has written a tutorial (available at -@uref{http://www.@-neurotraces.@-com/@-scilab/@-sciteam/}) on using the WFDB -Software Package with Scilab. - -Also available is a reimplementation of a useful subset of the WFDB -library in native m-code (contributed by Jose Garcia Moros and Salvador Olmos) -at @uref{http://www.@-physio@-net.@-org/@-physio@-tools/@-matlab/}. - @unnumberedsubsec SWIG wrappers for Java, Perl, Python, and other languages @cindex SWIG wrappers @cindex Java wrappers @@ -920,6 +882,45 @@ to generate wrappers for other programming languages supported by SWIG, including several versions of LISP, Modula-3, PHP, Ruby, and Tcl. +@unnumberedsubsec Matlab toolbox +@cindex Matlab toolbox +@cindex Toolbox for Matlab +@cindex WFDB toolbox for Matlab + +The WFDB Toolbox for Matlab, contributed by Michael Craig and available from +@uref{http://www.@-physionet.@-org/@-physiotools/@-matlab/@-wfdb-swig-matlab/}, +is a collection of WFDB applications implemented as functions in Matlab, +built on the SWIG Java wrappers for the WFDB library. For example, using it +in Matlab, one can read and plot the first five seconds of the same signals +as in the example program above, by: + +@example +r = rdsamp('100s', 'maxt', ':5'); +plot(r(:,1), r(:,2)); +@end example + +The WFDB Toolbox for Matlab replaces the @code{wfdb_tools} library of wrapper +functions contributed by Jonas Carlson, since current versions of Matlab are +no longer compatible with the @code{wfdb_tools} library. + +The WFDB Software Package includes @code{wfdb2mat}, an application that +converts all or any desired segment of a signal file into a @code{.mat} +file that can be read directly by Matlab. + +Jesus Olivan Palacios has written a tutorial (available at +@uref{http://www.@-neurotraces.@-com/@-scilab/@-sciteam/}) that includes a +detailed section on using the WFDB +Software Package with Scilab (an open-source scientific software +package for numerical computations, with a language similar to that of Matlab, +available from @uref{http://@-www-rocq.inria.fr/@-scilab/}). The methods +described in this tutorial can also be adapted for use with GNU Octave +(another free language that is mostly compatible with Matlab, available from +@uref{http://@-www.gnu.org/@-software/@-octave/}). + +Also available is a reimplementation of a useful subset of the WFDB +library in native m-code (contributed by Jose Garcia Moros and Salvador Olmos) +at @uref{http://www.@-physio@-net.@-org/@-physio@-tools/@-matlab/}. + @node WFDB path, running example, other languages, Usage @comment node-name, next, previous, up @section The Database Path and Other Environment Variables @@ -7917,11 +7918,10 @@ @code{wfdb-swig} home page on PhysioNet, and build and install the wrappers you need following the instructions on that page. -The separate WFDB_tools package provides WFDB library wrappers for -Matlab; download it from -@uref{http://physio@-net.org/physio@-tools/mat@-lab/wfdb_tools/}, the -WFDB_tools home page on PhysioNet, and build and install it following the -instructions on that page. +The WFDB Toolbox for Matlab provides a set of WFDB applications for Matlab, +based on the SWIG Java wrappers; install it with one click from the link +you will find on its home page, +@uref{http://@-physionet.org/@-physiotools/@-matlab/@-wfdb-swig-matlab/}. @node WFDB Applications, Extensions, Installation, Top @appendix WFDB Application Programs @@ -8881,6 +8881,18 @@ changes that may not be described here. @unnumberedsec WFDB 10.5 +@unnumberedsubsec Changes in version 10.5.2 (18 April 2010) + +When reading annotations of multifrequency records opened in +high-resolution mode, a time shift was introduced by @code{getann()} in +WFDB library versions 10.4.5 to 10.5.1. This problem has been +corrected in 10.5.2. + +Certain malformed segment .hea files were able to cause null pointer +errors in @code{isigopen()}. This problem has been +corrected. Thanks to Mauro Villarroel for reporting this problem +together with a test case. + @unnumberedsubsec Changes in version 10.5.1 (19 March 2010) In version 10.5.0, signals in formats 80 and 160 with amplitudes of 0 were diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/lib/annot.c wfdb-10.5.2/lib/annot.c --- wfdb-10.5.1/lib/annot.c 2009-02-16 22:14:51.000000000 -0500 +++ wfdb-10.5.2/lib/annot.c 2010-04-18 08:49:36.000000000 -0400 @@ -1,10 +1,10 @@ /* file: annot.c G. Moody 13 April 1989 - Last revised: 16 February 2009 wfdblib 10.4.13 + Last revised: 18 April 2010 wfdblib 10.5.2 WFDB library functions for annotations _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 1989-2009 George B. Moody +Copyright (C) 1989-2010 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 @@ -426,12 +426,15 @@ if (ia->pann.anntyp) { /* an annotation was pushed back */ *annot = ia->pann; ia->pann.anntyp = 0; - if (ia->ptmul) annot->time /= ia->ptmul; - ia->tmul = ia->ptmul = (ia->afreq) ? getifreq()/ia->afreq : getspf(); - if (annot->time) { - annot->time = (WFDB_Time)(annot->time * ia->tmul + 0.5); - return (0); + if (ia->ptmul != ia->tmul) { + ia->tmul = (ia->afreq) ? getifreq()/ia->afreq : getspf(); + if (ia->ptmul != ia->tmul) { + annot->time = (WFDB_Time)(annot->time*ia->tmul/ia->ptmul + 0.5); + ia->ptmul = ia->tmul; + } } + if (annot->time) + return (0); } if (ia->ateof) { @@ -452,7 +455,6 @@ } ia->tt += ia->word & DATA; /* annotation time */ if (ia->ptmul == 0.0) { - if (ia->tmul) ia->tt = ia->tt / ia->tmul; ia->ptmul = ia->tmul; ia->tmul = (ia->afreq) ? getifreq()/ia->afreq :getspf(); } @@ -519,8 +521,6 @@ } if (wfdb_feof(ia->file)) ia->ateof = -1; - // if (ia->ann.time == 0 && ia->ann.anntyp == NOTQRS) - // return (getann(n, annot)); return (0); } diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/lib/signal.c wfdb-10.5.2/lib/signal.c --- wfdb-10.5.1/lib/signal.c 2010-03-19 23:48:50.000000000 -0400 +++ wfdb-10.5.2/lib/signal.c 2010-04-09 16:08:28.000000000 -0400 @@ -1,5 +1,5 @@ /* file: signal.c G. Moody 13 April 1989 - Last revised: 13 March 2010 wfdblib 10.5.0 + Last revised: 9 March 2010 wfdblib 10.5.2 WFDB library functions for signals _______________________________________________________________________________ @@ -1151,9 +1151,9 @@ /* Check that formats and block sizes match for signals belonging to the same group. */ - if (s && hs->info.group == hp->info.group && + if (s && (hp == NULL || (hs->info.group == hp->info.group && (hs->info.fmt != hp->info.fmt || - hs->info.bsize != hp->info.bsize)) { + hs->info.bsize != hp->info.bsize)))) { wfdb_error("init: error in specification of signal %d or %d\n", s-1, s); return (-2); @@ -1800,12 +1800,13 @@ wfdb_error("getvec: unexpected EOF in signal %d\n", s); stat = -3; } - else if (in_msrec && segp < segend) { + else if (in_msrec && segp && segp < segend) { segp++; if (isigopen(segp->recname, NULL, (int)nvsig) < 0) { wfdb_error("getvec: error opening segment %s\n", segp->recname); stat = -3; + return (stat); /* avoid looping if segment is bad */ } else { istime = segp->samp0; @@ -1905,7 +1906,7 @@ if (navail == 0 && segments) { /* this is a multi-segment record */ in_msrec = 1; /* Open the first segment to get signal information. */ - if ((navail = readheader(segp->recname)) >= 0) { + if (segp && (navail = readheader(segp->recname)) >= 0) { if (msbtime == 0L) msbtime = btime; if (msbdate == (WFDB_Date)0) msbdate = bdate; } diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/lib/wfdb.h wfdb-10.5.2/lib/wfdb.h --- wfdb-10.5.1/lib/wfdb.h 2010-03-19 23:58:10.000000000 -0400 +++ wfdb-10.5.2/lib/wfdb.h 2010-04-18 19:15:48.000000000 -0400 @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 5 -#define WFDB_RELEASE 1 +#define WFDB_RELEASE 2 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ #define WFDB_NETFILES_LIBCURL 1 diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/lib/wfdbio.c wfdb-10.5.2/lib/wfdbio.c --- wfdb-10.5.1/lib/wfdbio.c 2009-05-03 15:08:20.000000000 -0400 +++ wfdb-10.5.2/lib/wfdbio.c 2010-03-24 09:28:26.000000000 -0400 @@ -1034,8 +1034,6 @@ else if (*r == ':') p = r+1; #endif len = strlen(p); - // if (len > 4 && strcmp(p + len-4, ".hea") == 0) - //len -= 4; /* final '.hea' is not part of record name */ if (len > WFDB_MAXRNL) len = WFDB_MAXRNL; if (strcmp(p, "-")) { /* don't record '-' (stdin) as record name */ diff -Naur --exclude Makefile --exclude info wfdb-10.5.1/NEWS wfdb-10.5.2/NEWS --- wfdb-10.5.1/NEWS 2010-03-20 01:12:43.000000000 -0400 +++ wfdb-10.5.2/NEWS 2010-04-18 19:38:52.000000000 -0400 @@ -1,8 +1,34 @@ +10.5.2 (18 April 2010): + When reading annotations of multifrequency records opened in + high-resolution mode, a time shift was introduced by getann() in + WFDB library versions 10.4.5 to 10.5.1. This problem has been + corrected in 10.5.2. + + Certain malformed segment .hea files were able to cause null pointer + errors in WFDB library function isigopen. This problem has been + corrected. Thanks to Mauro Villarroel for reporting this problem + together with a test case. + + The -s option of WFDB applications sqrs, sqrs125, wqrs, and wabp now + works properly. A bug common to all four applications was introduced + in 10.4.12; thanks to Andras Hartmann for reporting it. + + WFDB application epicmp did not always match each reference measurement + with the test measurement that was nearest in time, in previous + versions. The effect of this error in normal use (smoothed measurements + recorded in each test beat annotation) would have been very small. + Thanks to Liu Man for reporting this problem and suggesting a solution. + + WFDB application xform produced incorrect output when a gain change was + required and the -M option was used. This error has been corrected; + thanks to Joe Mietus for providing a test case that led to discovery of + the problem. + 10.5.1 (19 March 2010): - In version 10.5.0, signals in formats 80 and 160 with amplitudes of 0 - were incorrectly treated as invalid by getframe() and getvec(). Thanks - to Isaac Henry for reporting this problem, which has been corrected in - signal.c. + In version 10.5.0, signals in formats 80 and 160 with amplitudes of 0 + were incorrectly treated as invalid by getframe() and getvec(). Thanks + to Isaac Henry for reporting this problem, which has been corrected in + signal.c. 10.5.0 (16 March 2010): The WFDB library now supports signals with 24 and 32 bits of precision, @@ -182,7 +208,7 @@ WFDB applications xform and wfdb2mat now properly handle variable-layout multisegment input records. -10.4.16: +10.4.16 (3 March 2009): WFDB library function strtim() now rounds rather than truncating when the sampling frequency is not an integer. @@ -192,7 +218,7 @@ Bug fixes in convert/wfdb2mat. -10.4.15: +10.4.15 (26 February 2009): WFDB library function mstimstr() now outputs time to the nearest millisecond, rather than truncating its calculation to the nearest lower number of milliseconds. @@ -204,7 +230,7 @@ a WFDB-compatible signal file into a Matlab-compatible .mat file that remains readable by WFDB applications. -10.4.14: +10.4.14 (23 February 2009): WFDB library function setwfdb() now exports the WFDB library environment variables (WFDB, WFDBCAL, WFDBANNSORT, and WFDBGVMODE) on all modern platforms, so that a process started by a WFDB application @@ -219,7 +245,7 @@ A new WFDB application, wfdbtime, is convenient for use in scripts to convert among absolute and elapsed times and times in sample intervals. -10.4.13: +10.4.13 (16 February 2009): A new WFDB library function, tnextvec(), finds the next valid sample from a chosen signal, occurring at or after a specified time. This function is particularly useful when reading variable-layout @@ -245,7 +271,7 @@ tnextvec() function (see above) to search for valid samples of a signal of interest. -10.4.12: +10.4.12 (20 January 2009): The rule for sorting annotations within a file has been changed to allow a much larger number of simultaneous annotations (i.e., annotations in a given annotation file with identical 'time' fields) @@ -287,10 +313,10 @@ corrected in this release; thanks to Thomas Heldt for reporting it and providing a reproducible example of it. -10.4.11: +10.4.11 (11 November 2008): Build process improvements, especially on Cygwin and MinGW targets. -10.4.10: +10.4.10 (31 October 2008): EDF digital maximum and minimum values are now read properly in 64-bit builds; previous versions had a bug in edfparse (an internal WFDB library function defined in lib/signal.c) that did not appear in @@ -305,7 +331,7 @@ The "-f" option now works properly in ann2rr (previous versions worked only if "-t" was also provided). -10.4.9: +10.4.9 (10 October 2008): The "configure" script is now non-interactive by default. A new "-i" option selects interactive mode. @@ -321,7 +347,7 @@ in wfdb_open (an internal WFDB library function defined in lib/wfdbio.c). -10.4.8: +10.4.8 (31 July 2008): New application convert/ahaecg2mit.c converts files from the AHA DB DVD into WFDB records. (ECRI, distributors of the AHA DB, recently began shipping it on DVDs in a format incompatible with its previous @@ -331,7 +357,7 @@ POSIX rand48() and srand48() to generate dither (the POSIX functions are not universally available). -10.4.7: +10.4.7 (15 July 2008): Yinqi Zhang reported and contributed a fix for a memory leak in make_vsd() (an internal WFDB library function defined in signal.c). @@ -341,7 +367,7 @@ Applications wrsamp and xform can now add dithering to their inputs using a new -d option. -10.4.6: +10.4.6 (9 April 2008): The WFDB functions setafreq() and getafreq() (for setting and getting the time resolution of newly-created output annotation files in ticks per second) were new in version 10.4.5, but were undocumented. They @@ -390,7 +416,7 @@ supplied an example that evoked this problem, which has now been corrected. -10.4.5: +10.4.5 (6 February 2008): Bob Farrell and Tony Ricke chased down and provided fixes for memory leaks in several WFDB library functions, and also provided revisions to permit additional type checking and to avoid type mismatch warnings. @@ -442,14 +468,16 @@ in '.hea', it is assumed to be the record name of an EDF file of the same name. -10.4.4: Added 'collect.sh' script to 'conf', and 'collect' target to +10.4.4 (12 May 2006): + Added 'collect.sh' script to 'conf', and 'collect' target to 'make' template files (Makefile.tpl) to simplify creation of binary tarballs and RPMs. -10.4.3: Updated wfdb.spec (used to generate WFDB RPMs) to account for +10.4.3 (10 May 2006): + Updated wfdb.spec (used to generate WFDB RPMs) to account for applications with compiled-in paths. -10.4.2: +10.4.2 (4 May 2006): Mathias Gruber reported a line in wfdbio.c that used void pointer arithmetic (permitted as an extension by gcc but not allowed by ANSI/ISO C or most other C compilers). This operation has been @@ -465,7 +493,7 @@ Many minor documentation updates. -10.4.1: +10.4.1 (6 April 2006): A bug caused incorrect output from WFDB library function strtim() when called with the argument "i", following use of setifreq() to change the effective sampling frequency, resulting in incorrect output @@ -477,7 +505,7 @@ partially fixed in this version, but the fix introduced another bug, which was corrected in version 10.4.5.] -10.4.0: +10.4.0 (2 March 2006): Version 10.4.0 and later versions of the WFDB library are intended to be compiled using ANSI/ISO C (and C++) compilers only; previous versions also supported the use of traditional (K&R) C compilers. The @@ -546,7 +574,7 @@ Hardware recommendations for WAVE have been updated in the WAVE User's Guide. -10.3.17: +10.3.17 (20 August 2005): The WFDB library now supports reading variable-layout records (multi-segment records in which the number, arrangement, gains, and baselines of the signals may vary from one segment to the next; @@ -607,7 +635,7 @@ and sets up the Makefiles appropriately (unless the '-m32' option is used to force 32-bit mode). -10.3.16: +10.3.16 (13 June 2005): Benjamin Moody has added an interface between the WFDB library and libcurl as an alternative to the existing libwww interface, and has updated 'configure' and conf/*.def to search for and use libcurl if @@ -635,7 +663,7 @@ MS-DOS utilities and makefiles, have been removed from this version of the WFDB Software Package. -10.3.15: +10.3.15 (31 January 2005): Rules for generating the binary tarball for MS-Windows have been fixed so that the Cygwin DLLs are now included with correct permissions. @@ -644,7 +672,7 @@ step if SELinux is enabled (as under Fedora Core 2 and later); this has been incorporated into conf/linux-slib.def. -10.3.14: +10.3.14 (29 December 2004): Use rdann's new -v option to add column headings to its standard output. @@ -670,7 +698,7 @@ related to compiling the WFDB software package and building the WFDB rpms. -10.3.13: +10.3.13 (5 May 2004): Using an indirect WFDB path (i.e., setting the WFDB environment variable to a value such as '@FILE', where FILE contains the desired path) was broken in WFDB library versions 10.3.9 through @@ -684,7 +712,7 @@ inputs. Thanks to Joe Mietus for providing sample inputs that helped in identifying and resolving these problems. -10.3.12: +10.3.12 (9 March 2004): A beta release of the WFDB_tools package is now available for testing. This package allows Matlab R13 users to use the WFDB library to read and write digitized signals and annotations such as those available @@ -754,7 +782,7 @@ The man page for xform (doc/wag-src/xform.1) now documents the -S option (thanks to Lucy Gibson for pointing out the omission). -10.3.11: +10.3.11 (17 October 2003): Isaac Henry provided a fix for 'configure' to avoid a problem that may occur in a non-standard Cygwin installation. @@ -768,7 +796,7 @@ New signal types and units have been added to the WFDB calibration database (data/wfdbcal). -10.3.10: +10.3.10 (3 August 2003): In version 10.3.9, the functions setannstr, setanndesc, and setecgstr (in lib/annot.c) did not contain necessary checks to avoid invoking strcmp with a NULL argument. These checks have been added in version @@ -780,7 +808,7 @@ WAVE now incorporates a simplified method for synchronizing multiple windows. The WAVE version number has been changed from 6.6 to 6.7. -10.3.9: +10.3.9 (16 July 2003): The WFDB library functions setwfdb, setannstr, setanndesc, and setecgstr now copy their input string arguments, so that it is no longer necessary for WFDB applications to keep these strings @@ -795,7 +823,7 @@ corrected, and putinfo output is now flushed before putinfo returns. Thanks to Jonas Carlson for reporting this problem. -10.3.8: +10.3.8 (12 July 2003): The WFDB library function setbasetime (in lib/signal.c) now properly accepts arguments specifying midnight (e.g., "0:0:0"), which previous versions rejected, and the function setheader (also in lib/signal.c) @@ -838,12 +866,12 @@ version 10.0.1 (!); the programs should work properly again, if anyone still needs to use them. -10.3.7: +10.3.7 (6 May 2003): Fixed a bug in xform, introduced in 10.3.4, that prevented xform from reading the output sampling frequency from the standard input. Thanks to Thomas Heldt for the bug report. -10.3.6: +10.3.6 (7 April 2003): The fix applied in isigclose() in 10.3.5 was incomplete but is now (really!) fixed. Applications that use sample() should call wfdbquit() to be certain that sample's buffer is freed before exiting. @@ -858,26 +886,26 @@ within the WFDB NETFILES code has been improved substantially, but there may be further room for improvement. -10.3.5: +10.3.5 (31 March 2003): Fixed a bug in WFDB library function isigclose() (in lib/signal.c) that had caused sample()'s buffer to be freed inappropriately when switching segments in a multi-segment record. Thanks to Dave Schaffer for the bug report and for a test case that illustrated the bug. -10.3.4: +10.3.4 (30 March 2003): xform now handles input and output sampling frequencies that are not exact multiples of 1 Hz. Added SRCDIR definition in configure and conf/cygwin.def. -10.3.3: +10.3.3 (20 March 2003): Fixed man page installation bug; thanks to Joe Mietus for the bug report. Updated INSTALL (installation notes). -10.3.2: +10.3.2 (25 February 2003): New applications wav2mit and mit2wav create WFDB-format records from files in the widely-used .wav audio format and vice versa. @@ -917,7 +945,7 @@ There are now separate wfdb, wfdb-devel, wfdb-app, wfdb-doc, and wfdb-wave RPMs. -10.3.1: +10.3.1 (5 December 2002): Added a -W option to ann2rr to create 2-column output containing intervals in seconds and annotation mnemonics, and modified the interval calculations to avoid accumulated roundoff error. @@ -936,7 +964,7 @@ for continuous ABP signals, which has been added to the package (see wabp). -10.3.0: +10.3.0 (26 November 2002): The WFDB Software Package has been ported to MacOS/X (Darwin), version 10.2 (the port should also work under 10.1 but this has not been tested and will not be supported). @@ -989,7 +1017,7 @@ Numerous updates in the WFDB Applications Guide. -10.2.9: +10.2.9 (27 October 2002): Fixed a bug in example 9 in the WFDB Programmer's Guide (introduced in version 10.2.0). @@ -1001,11 +1029,11 @@ manuals for the desired page size, and added hyperlinks to the PDF version of the WFDB Programmer's Guide. -10.2.8: +10.2.8 (14 October 2002): Fixed a bug in WAVE that occasionally caused a crash when starting up; also repaired a broken link in WAVE's on-line help. -10.2.7: +10.2.7 (8 August 2002): Added a workaround to wfdb_fclose() (in lib/wfdbio.c) so that closing stdin after using freopen doesn't trigger a core dump. @@ -1024,7 +1052,7 @@ Numerous updates and corrections in the WFDB Applications Guide. -10.2.6: +10.2.6 (24 June 2002): Added setifreq() and getifreq() to the WFDB library. setifreq allows the caller to resample an input record at any convenient sampling frequency, using getvec() to perform xform's resampling @@ -1072,7 +1100,7 @@ with NETFILES and reporting any errors, but was not counting errors in this test. -10.2.5: +10.2.5 (10 March 2002): New output format options in 'ann2rr' and 'ihr'. FreeBSD support in 'configure', new conf/freebsd* (thanks to @@ -1084,11 +1112,11 @@ Removed unneeded references to wfdb/wfdb.h from waverc/wave-remote.c and waverc/wavescript.c (thanks again to Giuseppe Pagnoni). -10.2.4: +10.2.4 (20 December 2001): Bug fixes in 'pschart' and 'psfd' (vbuf was not properly initialized before its first use). -10.2.3: +10.2.3 (14 December 2001): Portability fixes in 'configure', 'install.sh', 'wave/Makefile.tpl', 'psd/hr*', 'doc/*.sh', 'lib/wfdblib.h', and 'checkpkg/*check'. @@ -1110,7 +1138,7 @@ Added rules for creating WFDB source and binary RPMs to the top-level Makefile.tpl. -10.2.2: +10.2.2 (29 November 2001): WAVE can now be used to view and edit annotations for records that have no signals. @@ -1122,7 +1150,7 @@ some non-outlier data in the first few samples to be rejected incorrectly. This has now been fixed. -10.2.1: +10.2.1 (16 November 2001): Most users will no longer need to set the WFDB path explicitly, as a result of several minor changes in the default path and in the installer for the WFDB Software Package. @@ -1132,7 +1160,7 @@ Order' and 'Multi-Frequency Records', in the WFDB Programmer's Guide, for details). -10.2.0: +10.2.0 (15 October 2001): The 10.2 series differs from all earlier releases in that the WFDB library no longer imposes any fixed limits on the numbers of annotators or signals that can be open simultaneously. There is also no