[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.4.0

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 most obvious change resulting from this decision is in the use of prototypes in function declarations, an innovation of ANSI C that permits better error-checking by compilers. The ANSI/ISO C standard is now more than 15 years old, and it has been over 10 years since a C compiler that does not support function prototypes was used for development of the WFDB library. Code in `wfdbio.c' that provides limited support for compilers that do not provide an ANSI/ISO C library has been retained for now, and `wfdb.h' still includes a set of K&R C function declarations; both of these features are deprecated, however, and may be removed in future versions of the WFDB library. Users who still need to use a K&R C compiler to compile the library itself may find 'unprotoize' (included in the GNU gcc distribution) to be helpful.

The mapping of lowest expressible sample values to WFDB_INVALID_SAMPLE performed by getframe() (in `lib/signal.c') did not work properly for signal formats 80 and 160 (in which samples are recorded as unsigned integers); this has now been corrected.

The symbol WFDB_GVPAD is newly defined in `<wfdb/wfdb.h>'. It may be added to WFDB_HIGHRES or WFDB_LOWRES and given as input to setgvmode(). The effect of doing so is that missing samples, and samples recognized as invalid, are replaced by getframe(), getvec(), and sample() with the most recently read valid values rather than by the special value WFDB_INVALID_SAMPLE. This behavior allows applications such as digital filters to remain ignorant of missing data without significant performance penalties.

sample() now checks that its signal number input is valid, and returns WFDB_INVALID_SAMPLE if not. In previous versions, sample returned a sample from signal 0 if the requested signal was unavailable.

sample_valid() now returns -1 in the case of a signal that becomes unavailable before the end of the record (previous versions returned 1 in this case).

The FIR filter example (see section Example 7: A General-Purpose FIR Filter) now works properly. The previous version always began processing the input at sample 0, regardless of start time specified in its argument list.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

George B. Moody (george@mit.edu)