diff -Naur wfdb-10.1.0/INSTALL wfdb-10.1.1/INSTALL --- wfdb-10.1.0/INSTALL Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.1/INSTALL Sun Jan 30 03:53:29 2000 @@ -0,0 +1,87 @@ +file: INSTALL G. Moody 30 January 2000 + +WFDB Software Package installation notes +_______________________________________________________________________________ + +Under UNIX or Linux: + +1. Install the World Wide Web Consortium's libwww library (you will need both + the library itself and the developer's package; download them from + http://www.physionet.org/physiotools/libwww/, or from the W3C's web site + at http://www.w3.org/Library). You may skip this step if you don't want + support for reading input files from remote web and FTP servers. See + README.NETFILES for further information about this option. + +2. Install the XView library (see http://www.physionet.org/physiotools/xview/) + if you want to use WAVE, and be sure that the directory that contains the + XView application 'textedit' (usually /usr/openwin/bin) is in your PATH. + For information about WAVE, see the WAVE User's Guide, + http://www.physionet.org/physiotools/wug/. + + WAVE uses Netscape (or another web browser, if you've made the appropriate + changes in waverc/Makefile) for some of its on-line help. Copy the + contents of http://www.physionet.org/physiotools/wug/ into + /usr/local/help/html/wug if you wish to read the help from local files; + otherwise, edit wave/wave.info and change all occurrences of + '/usr/local/help/html/' into 'http://www.physionet.org/physiotools/wug/'. + (The utility 'wget' -- which you can find with a web search -- can be + helpful if you wish to copy an entire directory of a web site, as suggested + here.) + +3. In this directory, type: + ./configure + make install + You will need root permissions to run 'make install', unless you change + WFDBROOT in 'Makefile' so that the files are installed in a directory + that you own. + +_______________________________________________________________________________ + +Under MS-DOS or MS-Windows: + +If possible, use djgpp (DJ Delorie's MS-DOS port of gcc, free from +http://www.delorie.com/djgpp/) or cygwin (Cygnus Software's MS-Windows port of +gcc, free from http://sourceware.cygnus.com/cygwin/). Both of these include +many of the GNU utilities, including GNU make. In this directory, type: + make -f Makefile-dos-gcc + +If you are using an older version of MS-DOS that cannot handle long filenames, +you will need to rename the 'Makefile-dos-gcc' files here and in each of the +subdirectories, and then you will need to edit the one in this directory to +change each reference to 'Makefile-dos-gcc' appropriately. + +If you use cygwin, please try to download and install the libwww package, from +http://www.physionet.org/physiotools/libwww/, or from the W3C's web site at +http://www.w3.org/Library), and modify lib/Makefile-dos-gcc so that libwww will +be linked together with the WFDB library. Instructions for compiling libwww +with cygwin are provided in the sources and at http://www.w3.org/INSTALL.html. +This should work but has not yet been tested; please let me know what changes +are needed. (Details will be posted on PhysioNet once they are available.) + +The 'Makefile.dos' files in each of the subdirectories of this one (except for +wave, wave-doc, and waverc, which are for UNIX only) can be used with the +'make' utilities provided with most commercial C compilers, although you may +need to customize them for your compiler; your feedback is appreciated. A +version of libwww for MSVC++ 5.0 is available from PhysioNet and from the W3C +web site. If you don't have a 'make' utility, try djgpp or cygwin. + +_______________________________________________________________________________ + +Under MacOS or other operating systems + +Sorry, but you are on your own here. Previous versions of the WFDB library +and some of the applications have been compiled successfully by Macintosh +users (and on VMS, among other environments). The sources are written in +highly portable C and should not be difficult to port to any environment where +an ANSI/ISO or K&R C compiler and the standard C library are available. + +If you find that changes are necessary in order to compile this software +successfully, please send details to the author (george@mit.edu) so that +others can benefit from your experience. Contributions of working binaries +are welcome, but please write first before sending them to me. Thanks! + +_______________________________________________________________________________ + +Once you have successfully compiled and installed the WFDB Software Package, +you will find a great deal of information about using it on PhysioNet; begin +looking in http://www.physionet.org/physiotools/wfdb-books.shtml. diff -Naur wfdb-10.1.0/Makefile wfdb-10.1.1/Makefile --- wfdb-10.1.0/Makefile Tue Jan 11 14:40:02 2000 +++ wfdb-10.1.1/Makefile Sun Jan 30 17:43:54 2000 @@ -1,5 +1,5 @@ # file: Makefile G. Moody 5 September 1990 -# Last revised: 11 January 2000 Version 10.1.1 +# Last revised: 30 January 2000 Version 10.1.1 # UNIX 'make' description file for the WFDB software package # # ----------------------------------------------------------------------------- @@ -73,7 +73,7 @@ RESDIR=$(WFDBROOT)/lib/X11/app-defaults # 'make' or 'make install': compile and install the WFDB software package -install: install-slib +install: config.cache install-slib cd wave; $(MAKE) $(WFDBDIRS) cd waverc; $(MAKE) $(WFDBDIRS) cd app; $(MAKE) $(WFDBDIRS) @@ -110,7 +110,11 @@ cd wave-doc; $(MAKE) clean cd waverc; $(MAKE) clean cd wview; $(MAKE) -f clean - rm -f *~ + rm -f *~ lib/makefile wave/makefile config.cache + +# 'make config.cache': check configuration +config.cache: + sh ./configure # 'make test-lib': compile the dynamically-linked WFDB library without # installing it diff -Naur wfdb-10.1.0/README wfdb-10.1.1/README --- wfdb-10.1.0/README Fri Oct 22 12:41:17 1999 +++ wfdb-10.1.1/README Sun Jan 30 01:50:57 2000 @@ -1,6 +1,7 @@ file: README G. Moody 5 May 1999 Last revised: 22 October 1999 +For installation instructions, see `INSTALL' in this directory. _______________________________________________________________________________ WFDB Software Package: software for working with annotated signals Copyright (C) 1999 George B. Moody @@ -60,36 +61,3 @@ benefit the community that has given them to you. You do not have to give away your improvements; but you may not distribute them at all unless you are willing to play by the rules spelled out by the GPL. - -_______________________________________________________________________________ - -Notes on compiling this software: - -You may need to set OS-specific variables in */Makefile before compiling. - Use 'make' in this directory to compile and install everything. - -WAVE uses Netscape (or another browser, if you've made the appropriate -changes in waverc/Makefile) for some of its on-line help. Copy the -contents of http://www.physionet.org/physiotools/wug/ into -/usr/local/help/html/wug if you wish to read the help from local files; -otherwise, edit wave/wave.info and change all occurrences of -'/usr/local/help/html/' into 'http://www.physionet.org/physiotools/wug/'. -(The utility 'wget' -- which you can find with a web search -- can be helpful -if you wish to copy an entire directory of a web site, as suggested here.) - -The WFDB library can (optionally) use the freely available libwww libraries -developed by the World Wide Web consortium to allow any application to read -input from HTTP and FTP servers as well as from local disk files, without the -use of a browser and in most cases without the need to download an entire -file in order to examine a portion of it. For further information, see -README.NETFILES in this directory. The libwww libraries are usable under -UNIX (including Linux), MS-DOS/Windows, and (with some work) MacOS; see -http://www.w3.org/Library/ for details. Sources and Linux x86 binaries -can be downloaded from http://www.physionet.org/physiotools/libwww/ (and -elsewhere). - -WAVE requires the (Sun-developed, but freely available) XView libraries and -header files. These are available from Sun for SunOS and Solaris; from various -commercial sources for AIX, HP-UX, and other Unices; and as a part of some -Linux distributions. Sources and Linux x86 binaries can be downloaded from -http://www.physionet.org/physiotools/xview (and elsewhere). diff -Naur wfdb-10.1.0/configure wfdb-10.1.1/configure --- wfdb-10.1.0/configure Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.1/configure Sun Jan 30 17:42:02 2000 @@ -0,0 +1,29 @@ +#! /bin/sh +if ( which libwww-config 2>&1 | grep "no " >/dev/null ) +then + echo "The WFDB software will be compiled without NETFILES access, because" + echo "libwww does not appear to be installed on this system." + echo "To add NETFILES access, install libwww and run ./configure again." + rm -f lib/makefile + echo "NETFILES=0" >config.cache +else + echo "The WFDB software will be compiled with NETFILES access." + cp lib/netmake lib/makefile + echo "NETFILES=1" >config.cache +fi + +if ( which textedit 2>&1 | grep "no " >/dev/null ) +then + echo "WAVE will not be compiled, because the XView libraries do not" + echo "appear to be installed on this system." + echo "To compile WAVE, install XView, add the directory containing the" + echo "XView textedit application to your PATH, and run ./configure again." + cp wave/nomake wave/makefile + echo "WAVE=0" >>config.cache +else + echo "WAVE will be compiled." + rm -f wave/makefile + echo "WAVE=1" >>config.cache +fi + + diff -Naur wfdb-10.1.0/doc/dbu.tex wfdb-10.1.1/doc/dbu.tex --- wfdb-10.1.0/doc/dbu.tex Thu Jan 13 21:42:05 2000 +++ wfdb-10.1.1/doc/dbu.tex Sun Jan 30 04:36:50 2000 @@ -9,7 +9,7 @@ @sp 5 @center @titlefont{WFDB Programmer's Guide} @sp 4 -@center Tenth Edition (revised and with additions for WFDB library version 10.1.0) +@center Tenth Edition (revised and with additions for WFDB library version 10.1.1) @center @today @sp 5 @center George B. Moody @@ -32,7 +32,7 @@ @end display An HTML version of this guide is available; point your web browser to -@code{http://www.physionet.org/physiotools/dbpg/} to view it. +@code{http://@-www.@-physio@-net.@-org/@-physio@-tools/@-dbpg/} to view it. Additional printed copies of this guide are available for US$10 each (including shipping by surface mail) by writing to the address above. Please make checks payable to ``Beth Israel Hospital Biomedical @@ -65,7 +65,7 @@ This guide documents the Waveform Database interface library (the WFDB library). This file contains the text of the Tenth Edition of the @cite{WFDB Programmer's Guide} (January, 2000), with -additional material for release 10.1.0 of the WFDB library. +additional material for release 10.1.1 of the WFDB library. @end ifinfo @menu @@ -334,46 +334,43 @@ @node Guide, , Applications, Overview @unnumberedsec About this Guide -You should have a good grasp of the C language in order to make the best -use of this guide. If ANSI C prototypes, used here to document the WFDB -library functions, are unfamiliar to you, see pp. 217--218 in the second -edition of @cite{The C Programming Language} by Kernighan and Ritchie, -Prentice Hall, 1988. (This is the famous @cite{K&R}; all @cite{K&R} -references in this guide include page numbers for the second edition. -Newcomers to C should have a copy for ready reference while reading this -guide.) It may also be helpful to have a copy of a database -directory, such as the @cite{MIT-BIH Arrhythmia Database Directory}. -If the entire WFDB Software Package is available, the @cite{WFDB -Applications Guide} will be useful as a reference for existing WFDB -library-based applications; if you have only a CD-ROM with MS-DOS -binaries, refer to @file{bin.doc} (in the @file{bin} directory of your -CD-ROM) for information on the available applications. +You should have a good grasp of the C language in order to make the best use of +this guide. If ANSI C prototypes, used here to document the WFDB library +functions, are unfamiliar to you, see pp. 217--218 in the second edition of +@cite{The C Programming Language} by Kernighan and Ritchie, Prentice Hall, +1988. (This is the famous @cite{K&R}; all @cite{K&R} references in this guide +include page numbers for the second edition. Newcomers to C should have a copy +for ready reference while reading this guide.) It may also be helpful to have +a copy of a database directory, such as the @cite{MIT-BIH Arrhythmia Database +Directory}. The @cite{WFDB Applications Guide} will be useful as a reference +for existing WFDB library-based applications (available from PhysioNet, +@code{http://@-www.@-physio@-net.@-org/}). You should have access to a computer that has the WFDB library and at -least one or two database records on-line. (If you are installing the -WFDB library on a new computer for the first time, please read the -installation notes supplied with the WFDB library first, or +least one or two database records on-line, or access to the World Wide Web, +where database records can be obtained from PhysioNet and other sources. (If +you are installing the WFDB library on a new computer for the first time, +please read the installation notes supplied with the WFDB library first, or @pxref{Installation, , Installing the WFDB Software Package}, then return here.) You should know how to create a C source file using your favorite editor, and you should know how to compile it and how to run the resulting executable program. -Resist all temptation to plunge into the esoteric details of file -formats. (Those who find such details irresistible will find them in -Section 5 of the @cite{WFDB Applications Guide}; note, however, -that support for new file formats is added to the WFDB library from time -to time, so that the information you find there may be incomplete.) The -WFDB library provides an efficient means of reading and writing files in -many formats; it is not a trivial task to duplicate it, and time spent -doing so is time that could be spent doing something useful, enjoyable, -or possibly both. If you really think you need to understand the file -formats in order to translate them into whatever the ECGWhizz Model 666 -needs, consider instead writing a format translator using the WFDB library -to read the files; then you will at least have a program that requires -only recompilation with a new version of the WFDB library when file +Resist all temptation to plunge into the esoteric details of file formats. +(Those who find such details irresistible will find them in Section 5 of the +@cite{WFDB Applications Guide}; note, however, that support for new file +formats is added to the WFDB library from time to time, so that the information +you find there may be incomplete.) The WFDB library provides an efficient +means of reading and writing files in many formats; it is not a trivial task to +duplicate it, and time spent doing so is time that could be spent doing +something useful, enjoyable, or possibly both. If you really think you need to +understand the file formats in order to translate them into whatever the +ECGWhizz Model 666 needs, consider instead writing a format translator using +the WFDB library to read the files; then you will at least have a program that +requires only recompilation with a new version of the WFDB library when file formats change. @emph{In extremis}, use @file{rdann} and @file{rdsamp} --- -MS-DOS executables of which are included on all CD-ROM databases of ECGs --- -to translate files into text format. +MS-DOS executables of which are available from PhysioNet and included on all +CD-ROM databases of ECGs --- to translate files into text format. Chapter 1 of this guide begins with a simple example program that reads a few samples from a database record. This example should help you @@ -408,18 +405,7 @@ Linux, AIX, AUX, SCO, Coherent, and more), MS-DOS, MS-Windows, VMS, and the Macintosh OS. This guide was written for UNIX users (with notes for MS-DOS users where differences exist), but others should find only minor -differences. One obvious difference between MS-DOS and other versions -of the WFDB library is the file-naming convention: since record names can -be longer than the three characters permitted in MS-DOS file name -``extensions'', MS-DOS names for WFDB files @emph{begin} with the record -name and @emph{end} with a file type specifier (@file{hea} instead of -@file{header}, @file{atr} instead of @file{atruth}, etc.), rather than -the other way around. This difference is not particularly significant, -however, since WFDB file names @emph{per se} are never needed as WFDB -library function arguments. So that database files on CD-ROMs may be -read on all supported systems, the MS-DOS convention for naming WFDB files -is recognized in addition to the ``native'' convention under UNIX, VMS, -and on the Macintosh. +differences. Another appendix discusses porting the WFDB library to new machines or operating systems, and includes notes on adding support for new file @@ -427,16 +413,17 @@ At the end of the guide is a list of sources for databases and other materials that may be useful to readers (@pxref{Sources}). -Many friends have contributed to the development of the WFDB library. -Thanks to Paul Albrecht, Ted Baker, Phil Devlin, Scott Greenwald, David -Israel, Roger Mark, Joe Mietus, Warren Muldrow, and especially to Paul -Schluter, whose elegant 8080 assembly language functions inspired these -(long live @code{getann}!). Pat Hamilton and Bob Farrell contributed -ports, to the Macintosh and the MS 32-bit Windows environments, -respectively. Thanks also to the many readers of earlier versions of -this guide; if this edition answers your questions, it is because -someone else has already asked them, and hounded the author until he -produced comprehensible answers. +Many friends have contributed to the development of the WFDB library. Thanks +to Paul Albrecht, Ted Baker, Phil Devlin, Scott Greenwald, David Israel, Roger +Mark, Joe Mietus, Warren Muldrow, and especially to Paul Schluter, whose +elegant 8080 assembly language functions inspired these (long live +@code{getann}!). Pat Hamilton and Bob Farrell contributed ports, to the +Macintosh and the MS 32-bit Windows environments, respectively. Jose Garcia +Moros and Salvador Olmos contributed Matlab/Octave reimplementations of a +useful subset of the WFDB library. Thanks also to the many readers of earlier +versions of this guide; if this edition answers your questions, it is because +someone else has already asked them, and hounded the author until he produced +comprehensible answers. Before May, 1999, and the release of version 10.0.0 of the library, the WFDB library was known as the DB library, and this guide was the @cite{ECG @@ -460,7 +447,7 @@ Cambridge, MA 02139 USA -(e-mail: george@@mit.edu) +(e-mail: @code{george@@mit.edu}) @end display @iftex @@ -478,7 +465,7 @@ An HTML version of this guide, suitable for viewing using any web browser, is included with the WFDB Software Package. The latest version may always be -viewed at @code{http://www.physionet.org/physiotools/dbpg/} using your web +viewed at @code{http://@-www.@-physio@-net.@-org/@-physio@-tools/@-dbpg/} using your web browser. @ifinfo @@ -495,12 +482,25 @@ @comment node-name, next, previous, up @unnumberedsec Recent changes -This node contains a brief summary of changes to the WFDB library and to this -guide since the first printing of the ninth edition of this guide in July, -1995. See @file{NEWS.TXT} and @file{NEWNEWS.TXT}, in the top-level -directory of the WFDB Software Package distribution, for details on these -changes, and for information on any more recent changes that may not be -described here. +This section contains a brief summary of changes to the WFDB library and to +this guide since the first printing of the ninth edition of this guide in July, +1995. See @file{NEWS.TXT} and @file{NEWNEWS.TXT}, in the top-level directory +of the WFDB Software Package distribution, for details on these changes, and +for information on any more recent changes that may not be described here. + +@unnumberedsubsec Changes in version 10.1.1 + +Record names may contain (absolute or relative) path information as a prefix, +and if (as a result) an input file is found in a location that does not appear +explicitly in the WFDB path, that location is appended to the end of the WFDB +path. For example, if the WFDB path is +@file{. http://@-www.@-physio@-net.@-org/@-physio@-bank/@-data@-base}, and the +record name @file{mitdb/100} is supplied to @code{wfdbinit}, the WFDB library +will find the header file at +@code{http://@-www.@-physio@-net.@-org/@-physio@-bank/@-data@-base/@-mitdb/@-100.hea}, +and will then add @code{http://@-www.@-physio@-net.@-org/@-physio@-bank/data@-base/@-mitdb/} to +the end of the WFDB path so that the signal file (specified as @file{100.dat} +in the header file) can be found. @unnumberedsubsec Changes in version 10.1.0 @@ -540,7 +540,7 @@ separators. Previous versions of the WFDB library that were compiled for environments other -than MS-DOS used file names in the format @var{TYPE.RECORD}. This file +than MS-DOS used file names in the format @var{type.record}. This file name format is no longer supported. @unnumberedsubsec Changes in version 10.0.0 @@ -721,10 +721,8 @@ Suppose we wish to print the first ten samples of record @file{100s}. (Record @file{100s} is the first minute of MIT-BIH Arrhythmia Database -record @file{100}, supplied as a sample with all source distributions of the -WFDB Software Package. If you have only the MS-DOS binary version of the -WFDB library on a CD-ROM, substitute the name of one of the records on -your CD-ROM for @file{100s} in the program below.) We might begin by +record @file{100}, supplied as a sample in the @code{data} directory of all +source distributions of the WFDB Software Package.) We might begin by creating a source file called @file{psamples.c} that contains: @example @@ -841,6 +839,17 @@ in this guide; for further information, refer to @file{fortran/readme.doc} in the WFDB Software Package (included in version 9.4 and later versions). +@cindex Matlab bindings +@cindex Octave bindings +@cindex wrappers for Matlab or Octave +It should be possible to write a similar set of wrapper functions for use with +Matlab or Octave (a freely available open-source language that is compatible +with Matlab, available from @code{http://www.che.wisc.edu/octave/}). At this +time, such wrappers are not available, but a reimplementation of a useful +subset of the WFDB library in native m-code (contributed by Jose Garcia Moros +and Salvador Olmos) is available from +@code{http://www.physionet.org/physiotools/matlab/}. + @node WFDB path, running example, other languages, Usage @comment node-name, next, previous, up @section The Database Path @@ -872,9 +881,11 @@ Alternatively, components of the WFDB path may be separated by whitespace (under any operating system), and the WFDB path may contain -@code{http://} and @code{ftp://} URL prefixes. If @code{NETFILES} +@code{http://} and @code{ftp://} URL prefixes (other schema, such as +@code{file://} and @code{https://}, may also be supported if they are +supported by your version of @code{libwww}). If @code{NETFILES} support is not compiled into the WFDB library, any WFDB path components -beginning with @code{http://} or @code{ftp://} are ignored. (These +containing @file{://} are ignored. (These features were first introduced in WFDB library version 10.1.0.) When WFDB applications @emph{write} database files, these files are diff -Naur wfdb-10.1.0/lib/Makefile wfdb-10.1.1/lib/Makefile --- wfdb-10.1.0/lib/Makefile Thu Jan 6 10:59:03 2000 +++ wfdb-10.1.1/lib/Makefile Sun Jan 30 04:33:23 2000 @@ -1,6 +1,6 @@ # file: Makefile G. Moody 6 July 1983 -# Last revised: 6 January 2000 Version 10.1.0 -# UNIX 'make' description file for compiling the WFDB library with NETFILES +# Last revised: 19 January 2000 Version 10.1.1 +# UNIX 'make' description file for compiling the WFDB library # # _____________________________________________________________________________ # wfdb: a library for reading and writing annotated waveforms(time series data) @@ -32,13 +32,13 @@ # install the alternate WFDB library (not available on all systems), type # `make slib'. -# Note: This version contains experimental NETFILES support, which requires -# that you have previously installed libwww (see http://www.w3.org/Library/); -# if not, you must change the definitions of SCFLAGS and SBUILDLIB below. -# As is, this Makefile is preconfigured for Linux and requires minor changes -# for other supported operating systems. It builds a static version of the -# library without NETFILES support, and a shared (dynamically loadable) version -# of the library with NETFILES support. +# If used as is, this Makefile compiles the WFDB library without NETFILES +# support. The simplest way to compile with NETFILES support (which requires +# that you have previously installed libwww, see http://www.w3.org/Library/), +# is to copy 'netmake' to 'makefile' before running 'make' in this directory. +# (If you do this, the definitions in the renamed file take precedence over +# those below.) As is, this Makefile is preconfigured for Linux and requires +# minor changes for other supported operating systems. # NETFILES support is known to work well under Linux (with both 2.0 and 2.2 # series kernels and glibc 2.0 and 2.1) provided that the library is compiled @@ -65,7 +65,7 @@ # Makefile (in the parent of this directory) for details. MAJOR = 10 MINOR = 1 -RELEASE = 0 +RELEASE = 1 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # Historical note: Versions earlier than 10.0.0, released between 1981 and @@ -208,9 +208,9 @@ # For Solaris or SVR4 `cc', uncomment the next line. # SCFLAGS = -K PIC -O $(CCDEFS) # For `gcc', uncomment the next line. -# SCFLAGS = -fpic -g -O $(CCDEFS) +SCFLAGS = -fpic -g -O $(CCDEFS) # For `gcc' with NETFILES, uncomment the next line. -SCFLAGS = -fpic -g -O $(CCDEFS) -DNETFILES `libwww-config --cflags` +# SCFLAGS = -fpic -g -O $(CCDEFS) -DNETFILES `libwww-config --cflags` # See comments on CFLAGS (above). If you don't have `gdb', you won't be able # to debug the shared library, so you might want to remove the `-g' option in # that case. @@ -252,12 +252,12 @@ # For (at least some versions of) HP/UX, uncomment the next line instead. # SBUILDLIB = ld -b -o $(SWFDBLIB) $(SLIBOBJS) # For Linux without NETFILES (see above), uncomment the next line instead. -# SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) -o $(SWFDBLIB) \ -# $(SLIBOBJS) +SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) -o $(SWFDBLIB) \ + $(SLIBOBJS) # For Linux with NETFILES (see above), add -DNETFILES to CCDEFS and uncomment # the next line instead. -SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) \ - `libwww-config --libs` -o $(SWFDBLIB) $(SLIBOBJS) +# SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) \ +# `libwww-config --libs` -o $(SWFDBLIB) $(SLIBOBJS) # SRANLIB is the name of the program used to index the alternate library. # Shared libraries are not generally indexed. diff -Naur wfdb-10.1.0/lib/Makefile-dos-gcc wfdb-10.1.1/lib/Makefile-dos-gcc --- wfdb-10.1.0/lib/Makefile-dos-gcc Thu Jan 6 10:59:03 2000 +++ wfdb-10.1.1/lib/Makefile-dos-gcc Sun Jan 30 04:13:20 2000 @@ -1,10 +1,10 @@ # file: Makefile-dos-gcc G. Moody 23 April 1997 -# Last revised: 29 April 1998 Version 10.0.0 +# Last revised: 21 January 2000 Version 10.1.1 # GCC-DOS 'make' description file for compiling the WFDB library # _____________________________________________________________________________ # wfdb: a library for reading and writing annotated waveforms(time series data) -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free @@ -39,8 +39,8 @@ # the top-level Makefile for the WFDB Software Package). See the top-level # Makefile (in the parent of this directory) for details. MAJOR = 10 -MINOR = 0 -RELEASE = 0 +MINOR = 1 +RELEASE = 1 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # Site-specific variables diff -Naur wfdb-10.1.0/lib/Makefile.dos wfdb-10.1.1/lib/Makefile.dos --- wfdb-10.1.0/lib/Makefile.dos Thu Jan 6 10:59:03 2000 +++ wfdb-10.1.1/lib/Makefile.dos Sun Jan 30 04:13:20 2000 @@ -1,10 +1,10 @@ # file: Makefile.dos G. Moody 2 November 1989 -# Last revised: 29 April 1999 wfdblib 10.0.0 +# Last revised: 21 January 2000 wfdblib 10.1.1 # MSDOS `make' description file template for compiling the WFDB library # # _____________________________________________________________________________ # wfdb: a library for reading and writing annotated waveforms(time series data) -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free diff -Naur wfdb-10.1.0/lib/netmake wfdb-10.1.1/lib/netmake --- wfdb-10.1.0/lib/netmake Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.1/lib/netmake Sun Jan 30 17:06:53 2000 @@ -0,0 +1,107 @@ +# file: netmake G. Moody 30 January 2000 +# +# Redefine make variables to compile a NETFILES-enabled WFDB library +# +# _____________________________________________________________________________ +# wfdb: a library for reading and writing annotated waveforms(time series data) +# Copyright (C) 2000 George B. Moody +# +# This library is free software; you can redistribute it and/or modify it under +# the terms of the GNU Library General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for +# more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This is a 'make' description file intended to be used if you wish to compile +# the WFDB library with support for reading remote files via HTTP and FTP +# (a capability called NETFILES support in the documentation of the WFDB library). +# In order to do this successfully, you must have previously installed the World +# Wide Web Consortium's libwww library, which may be downloaded freely from +# http://www.w3.org/Library/, +# +# The standard 'make' description file provided in this directory, 'Makefile', +# does not include NETFILES support. Rather than duplicate all of the common +# definitions in 'Makefile', this file simply redefines those that must differ +# when compiling with NETFILES support, and then invokes another instance of +# 'make' on the standard 'Makefile', but with the new definitions overriding +# the old ones. If this file is renamed 'makefile', 'make' will read it +# first (before 'Makefile') and all of this will happen automagically. The +# script 'configure' (in the directory above this one) renames this file +# if libwww has been installed, so that a simple 'make' in that directory is +# all that is required. +# +# NETFILES support is known to work well under Linux (with both 2.0 and 2.2 +# series kernels and glibc 2.0 and 2.1) provided that the library is compiled +# as a shared (dynamically loadable) library. The library does not compile +# properly as a static library under Linux if NETFILES is enabled (apparently +# because of redefinitions in the libwww include files). +# +# For further information about NETFILES, see README.NETFILES in the top-level +# directory of the WFDB software package. + +# These should exactly match the values in Makefile. They are needed here because +# other variables are constructed using these. +MAJOR = 10 +MINOR = 1 +RELEASE = 1 +CCDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +SWFDBLIB_BASENAME = libwfdb.so +SWFDBLIB_SONAME = $(SWFDBLIB_BASENAME).$(MAJOR) +SWFDBLIB = $(SWFDBLIB_SONAME).$(MINOR) +SLIBOBJS = wfdbinit.o annot.o signal.o calib.o wfdbio.o + +# SCFLAGS is the set of C compiler options used when compiling the shared library. +SCFLAGS = -fpic -g -O $(CCDEFS) -DNETFILES `libwww-config --cflags` + +# SBUILDLIB is the command that creates the alternate library once its +# components have been compiled separately. This version has been tested on Linux +# and should work on other versions of UNIX where gcc is available. +SBUILDLIB = gcc -shared -Wl,-soname,$(SWFDBLIB_SONAME) \ + `libwww-config --libs` -o $(SWFDBLIB) $(SLIBOBJS) + +# This command causes the 'make' processes spawned from this one to use the +# standard Makefile after incorporating the definitions above. +MAKE = make -f Makefile + +# 'make' targets: Each target in 'Makefile' should have an identically named +# target here. + +install: + $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" install + +compat: + $(MAKE) compat + +slib-test: + $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" slib-test + +slib: + $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" slib + +lib: + $(MAKE) "SBUILDLIB=$(SBUILDLIB)" "SCFLAGS=$(SCFLAGS)" lib + +tidy: + $(MAKE) tidy + +clean: + $(MAKE) clean + +TAGS: + $(MAKE) TAGS + +listing: + $(MAKE) listing diff -Naur wfdb-10.1.0/lib/signal.c wfdb-10.1.1/lib/signal.c --- wfdb-10.1.0/lib/signal.c Thu Jan 6 10:59:04 2000 +++ wfdb-10.1.1/lib/signal.c Sun Jan 30 04:13:20 2000 @@ -1,10 +1,10 @@ /* file: signal.c G. Moody 13 April 1989 - Last revised: 14 October 1999 wfdblib 10.1.0 + Last revised: 19 January 2000 wfdblib 10.1.1 WFDB library functions for signals _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -429,10 +429,6 @@ return (-2); } (void)strcpy(siarray[s].fname, p); - /* If the file name includes a directory name which is not - already in the WFDB path, add that directory to the end of - the WFDB path. */ - wfdb_addtopath(p); } /* If the file names of the current and previous signals match, they are assigned the same group number and share a copy of the diff -Naur wfdb-10.1.0/lib/wfdb.h wfdb-10.1.1/lib/wfdb.h --- wfdb-10.1.0/lib/wfdb.h Thu Jan 6 10:59:04 2000 +++ wfdb-10.1.1/lib/wfdb.h Sun Jan 30 04:13:20 2000 @@ -1,10 +1,10 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 1 October 1999 wfdblib 10.1.0 + Last revised: 19 January 2000 wfdblib 10.1.1 WFDB library type, constant, structure, and function interface definitions _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 1 -#define WFDB_RELEASE 0 +#define WFDB_RELEASE 1 /* Determine what type of compiler is being used. */ #ifdef __STDC__ /* true for ANSI C compilers only */ diff -Naur wfdb-10.1.0/lib/wfdbio.c wfdb-10.1.1/lib/wfdbio.c --- wfdb-10.1.0/lib/wfdbio.c Thu Jan 6 10:59:04 2000 +++ wfdb-10.1.1/lib/wfdbio.c Sun Jan 30 17:35:01 2000 @@ -1,10 +1,10 @@ /* file: wfdbio.c G. Moody 18 November 1988 - Last revised: 14 November 1999 wfdblib 10.1.0 + Last revised: 19 January 2000 wfdblib 10.1.1 Low-level I/O functions for the WFDB library _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -165,12 +165,32 @@ if (wfdbpath == NULL) { wfdbpath = getenv("WFDB"); - if (wfdbpath == NULL) wfdbpath = DEFWFDBP; + if (wfdbpath == NULL) { +#ifdef HAS_PUTENV + static char *p; + if (p == NULL) p = (char *)malloc(strlen(DEFWFDBP)+6); + if (p) { + sprintf(p, "WFDB=%s", DEFWFDBP); + putenv(p); + } +#endif + wfdbpath = DEFWFDBP; + } } getiwfdb_count = 0; while (*wfdbpath == '@') wfdb_getiwfdb(); wfdb_parse_path(wfdbpath); +#ifdef HAS_PUTENV + if (getenv("WFDBCAL") == NULL) { + static char *p; + if (p == NULL) p = malloc(strlen(DEFWFDBC)+9); + if (p) { + sprintf(p, "WFDBCAL=%s", DEFWFDBC); + putenv(p); + } + } +#endif return (wfdbpath); } @@ -786,9 +806,7 @@ } /* If the file is to be opened for input, prepare to search the database - directories. The string obtained from getwfdb() is constructed in the - same manner as PATH, with colons separating its components. An - empty component is interpreted as the current directory. */ + directories. */ if (wfdb_path_list == NULL) (void)getwfdb(); @@ -844,14 +862,20 @@ if (p + strlen(record) + (s ? strlen(s) : 0) > wfdb_filename + MFNLEN-5) continue; /* name too long -- skip */ spr1(p, record, s); - if ((ifile = wfdb_fopen(wfdb_filename, RB)) != NULL) return (ifile); - /* If this file can be opened for input, return its file pointer; - otherwise, try opening it using an alternate form of the name, + if ((ifile = wfdb_fopen(wfdb_filename, RB)) != NULL) { + /* Found it! Add its path info to the WFDB path. */ + wfdb_addtopath(wfdb_filename); + return (ifile); + } + /* Not found -- try again, using an alternate form of the name, provided that that form is distinct. */ strcpy(long_filename, wfdb_filename); spr2(p, record, s); if (strcmp(wfdb_filename, long_filename) && - (ifile = wfdb_fopen(wfdb_filename, RB)) != NULL) return (ifile); + (ifile = wfdb_fopen(wfdb_filename, RB)) != NULL) { + wfdb_addtopath(wfdb_filename); + return (ifile); + } } /* If the file was not found in any of the directories listed in wfdb, return a null file pointer to indicate failure. */ diff -Naur wfdb-10.1.0/lib/wfdblib.h wfdb-10.1.1/lib/wfdblib.h --- wfdb-10.1.0/lib/wfdblib.h Thu Jan 6 10:59:04 2000 +++ wfdb-10.1.1/lib/wfdblib.h Sun Jan 30 13:03:59 2000 @@ -1,10 +1,10 @@ /* file: wfdblib.h G. Moody 13 April 1989 - Last revised: 15 September 1999 wfdblib 10.1.0 + Last revised: 30 January 2000 wfdblib 10.1.1 External definitions for WFDB library private functions _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -39,15 +39,24 @@ symbol _WINDOWS instead of _WINDLL. */ /* #define _WINDLL */ -#if defined(_WINDLL) -#if !defined(_WINDOWS) +#if defined(_WINDLL) && !defined(_WINDOWS) #define _WINDOWS #endif -#define WFDBNOSORT + +#if defined(_WIN16) && !defined(_WINDOWS) +#define _WINDOWS #endif -#if defined(_WINDOWS) && !defined(MSDOS) -#define MSDOS +#if defined(_WIN32) && !defined(_WINDOWS) +#define _WINDOWS +#endif + +#if defined(_WINDOWS) && !defined (_WIN16) && !defined(_WIN32) +#define _WIN16 +#endif + +#if defined(_WINDLL) +#define WFDBNOSORT #endif /* Define the symbol MSDOS if this library is to be used under MS-DOS or MS @@ -62,14 +71,18 @@ /* #define FIXISOCD */ /* DEFWFDBP is the default value of the WFDB path if the WFDB environment -variable is not set. In most cases, it is sufficient to use an empty string +variable is not set. In most cases, it is sufficient to use the string "." for this purpose (thus restricting the search for DB files to the current -directory). DEFWFDBP must not be NULL, however. The default given below for -the Macintosh specifies that the WFDB path is to be read from the file -udb/dbpath.mac on the third edition of the MIT-BIH Arrhythmia Database CD-ROM -(which has a volume name of `MITADB3'); you may prefer to use a file on a -writable disk for this purpose to make reconfiguration possible. See getwfdb() -in wfdbio.c for further information. */ +directory). If NETFILES support is enabled, the setting below adds the +web-accessible PhysioBank databases to the default path; you may wish to +change this to use a nearby PhysioNet mirror (for a list of mirrors, see +http://www.physionet.org/mirrors/). DEFWFDBP must not be NULL, however. +The default given below for the Macintosh specifies that the WFDB path is to +be read from the file udb/dbpath.mac on the third edition of the MIT-BIH +Arrhythmia Database CD-ROM (which has a volume name of `MITADB3'); you may +prefer to use a file on a writable disk for this purpose to make +reconfiguration possible. See getwfdb() in wfdbio.c for further information. +*/ #ifdef MAC # ifdef FIXISOCD # define DEFWFDBP "@MITADB3:UDB:DBPATH.MAC;1" @@ -78,7 +91,11 @@ # define __STDC__ # endif #else -# define DEFWFDBP "" +# ifdef NETFILES +# define DEFWFDBP ". http://www.physionet.org/physiobank/database" +# else +# define DEFWFDBP "." +# endif #endif /* DEFWFDBC is the name of the default WFDB calibration file, used if the @@ -88,7 +105,19 @@ supplied on the various CD-ROM databases. DEFWFDBC may be NULL if you prefer not to have a default calibration file. See calopen() in calib.c for further information. */ -#define DEFWFDBC "dbcal" +#define DEFWFDBC "wfdbcal" + +/* putenv() is available in POSIX, SVID, and BSD Unices and in MS-DOS and +32-bit MS Windows, but not under 16-bit MS Windows or under MacOS. If it is +available, getwfdb() (in wfdbio.c) detects when the environment variables WFDB +or WFDBCAL are not set, and sets them according to DEFWFDBP or DEFWFDBC as +needed using putenv(). This feature is useful mainly for programs such as +WAVE, where WFDB or WFDBCAL are set interactively and it is useful to show +their default values to the user; setwfdb() and getwfdb() do not depend on it. +*/ +#if !defined(_WIN16) && !defined(MAC) +#define HAS_PUTENV +#endif #ifndef FILE #include diff -Naur wfdb-10.1.0/wave/Makefile wfdb-10.1.1/wave/Makefile --- wfdb-10.1.0/wave/Makefile Thu Jan 6 10:59:27 2000 +++ wfdb-10.1.1/wave/Makefile Sun Jan 30 04:34:02 2000 @@ -1,10 +1,10 @@ # file: Makefile G. Moody 1 May 1990 -# Last revised: 22 November 1999 WAVE 6.3 +# Last revised: 29 January 2000 WAVE 6.3 # `make' description file for WAVE # # ----------------------------------------------------------------------------- # WAVE: Waveform analyzer, viewer, and editor -# Copyright (C) 1999 George B. Moody +# Copyright (C) 2000 George B. Moody # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -230,7 +230,7 @@ $(CC) -o wave $(OFILES) $(LDFLAGS) wave-static: $(OFILES) - $(CC) -o wave $(OFILES) -static $(LDFLAGS) + $(CC) -o wave-static $(OFILES) -static $(LDFLAGS) soelim: soelim.c $(CC) -o soelim -O soelim.c diff -Naur wfdb-10.1.0/wave/nomake wfdb-10.1.1/wave/nomake --- wfdb-10.1.0/wave/nomake Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.1/wave/nomake Sun Jan 30 02:47:08 2000 @@ -0,0 +1,13 @@ +# file: nomake G. Moody 30 January 2000 +# +# If renamed as 'makefile', this file prevents WAVE from being compiled +# on systems that don't have XView installed. + +install: + @echo "Skipping installation of WAVE (XView required)." + +wave: + @echo "Skipping compilation of WAVE (XView required)." + +clean: + make -f Makefile clean \ No newline at end of file diff -Naur wfdb-10.1.0/wave/wave.h wfdb-10.1.1/wave/wave.h --- wfdb-10.1.0/wave/wave.h Thu Jan 6 10:59:29 2000 +++ wfdb-10.1.1/wave/wave.h Sun Jan 30 04:13:21 2000 @@ -1,10 +1,10 @@ /* file: wave.h G. Moody 26 April 1990 - Last revised: 4 May 1999 + Last revised: 21 January 2000 Constants, macros, global variables, and function prototypes for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1999 George B. Moody +Copyright (C) 2000 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -59,12 +59,12 @@ #define END_ANALYSIS (ACMAX+3) #define REF_MARK (ACMAX+4) -/* These can be increased harmlessly. Since annotator names and log file +/* These can be increased harmlessly. Since record names and log file names can include path information, it is probably best not to decrease ANLMAX or LNLMAX. */ -#define ANLMAX 79 /* length of longest permissible annotator name */ +#define ANLMAX 39 /* length of longest permissible annotator name */ #define LNLMAX 79 /* length of longest permissible log file name */ -#define RNLMAX 19 /* length of longest permissible record name */ +#define RNLMAX 79 /* length of longest permissible record name */ #define DSLMAX 80 /* length of longest permissible description in log */ /* Default array indices for scale settings (see modepan.c and xvwave.c). */ diff -Naur wfdb-10.1.0/wave-doc/guide/cover.wug wfdb-10.1.1/wave-doc/guide/cover.wug --- wfdb-10.1.0/wave-doc/guide/cover.wug Tue Jan 11 16:52:25 2000 +++ wfdb-10.1.1/wave-doc/guide/cover.wug Sun Jan 30 04:13:25 2000 @@ -46,4 +46,25 @@ JANUARY 2000 +.bp + + + + + + + + + + + + + + + + + + + +