diff -Naur wfdb-10.3.5/MANIFEST wfdb-10.3.6/MANIFEST --- wfdb-10.3.5/MANIFEST Mon Feb 24 01:58:08 2003 +++ wfdb-10.3.6/MANIFEST Mon Apr 7 15:06:33 2003 @@ -323,7 +323,7 @@ doc/wag-src/sumstats.1 doc/wag-src/tach.1 doc/wag-src/tmac.dif -doc/wag-src/view-dos.1 +doc/wag-src/view.1 doc/wag-src/wabp.1 doc/wag-src/wag.cover doc/wag-src/wag.ht0 diff -Naur wfdb-10.3.5/Makefile wfdb-10.3.6/Makefile --- wfdb-10.3.5/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/Makefile Mon Apr 7 14:34:37 2003 @@ -39,12 +39,12 @@ # create source archives, type `make tarballs'; or to make a binary archive, # type `make bin-tarball'. Making archives requires PGP, gzip, and GNU tar). # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -61,10 +61,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/NEWS wfdb-10.3.6/NEWS --- wfdb-10.3.5/NEWS Mon Mar 31 17:57:15 2003 +++ wfdb-10.3.6/NEWS Mon Apr 7 10:53:00 2003 @@ -1,3 +1,17 @@ +10.3.6: + 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. + + Some long-standing problems in the code (in lib/wfdbio.c) that handles + http range requests for NETFILES-enabled versions of the library have + been partially addressed. The underlying issue is that http servers + do not always return the range of bytes requested; when this happens, + it is not difficult to determine that there is a problem, but it is + tricky to figure out what to do about it. Based on experiments with + several different http servers, the strategy for handling such problems + within the WFDB NETFILES code has been improved substantially, but + there may be further room for improvement. 10.3.5: Fixed a bug in WFDB library function isigclose() (in lib/signal.c) that had caused sample()'s buffer to be freed inappropriately when diff -Naur wfdb-10.3.5/app/Makefile wfdb-10.3.6/app/Makefile --- wfdb-10.3.5/app/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/app/Makefile Mon Apr 7 14:34:36 2003 @@ -33,12 +33,12 @@ # type `make listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -55,10 +55,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/checkpkg/Makefile wfdb-10.3.6/checkpkg/Makefile --- wfdb-10.3.5/checkpkg/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/checkpkg/Makefile Mon Apr 7 14:34:36 2003 @@ -31,12 +31,12 @@ # directory). To print a set of source listings, type `make listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -53,10 +53,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/conf/version.def wfdb-10.3.6/conf/version.def --- wfdb-10.3.5/conf/version.def Mon Mar 31 18:02:20 2003 +++ wfdb-10.3.6/conf/version.def Mon Apr 7 10:07:35 2003 @@ -1,10 +1,10 @@ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official diff -Naur wfdb-10.3.5/convert/Makefile wfdb-10.3.6/convert/Makefile --- wfdb-10.3.5/convert/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/convert/Makefile Mon Apr 7 14:34:36 2003 @@ -33,12 +33,12 @@ # type `make listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -55,10 +55,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/data/Makefile wfdb-10.3.6/data/Makefile --- wfdb-10.3.5/data/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/data/Makefile Mon Apr 7 14:34:36 2003 @@ -33,12 +33,12 @@ # listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -55,10 +55,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/doc/Makefile wfdb-10.3.6/doc/Makefile --- wfdb-10.3.5/doc/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/doc/Makefile Mon Apr 7 14:34:36 2003 @@ -134,12 +134,12 @@ # `make ug'. To print the WFDB Programmer's Guide, type `make pg'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -156,10 +156,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/doc/wag-src/Makefile wfdb-10.3.6/doc/wag-src/Makefile --- wfdb-10.3.5/doc/wag-src/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/doc/wag-src/Makefile Mon Apr 7 14:34:36 2003 @@ -59,12 +59,12 @@ # PostScript 'make wag.ps' (requires troff, tbl, latex, and dvips) # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -81,10 +81,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/doc/wag-src/fixag.sed wfdb-10.3.6/doc/wag-src/fixag.sed --- wfdb-10.3.5/doc/wag-src/fixag.sed Mon Dec 2 21:33:53 2002 +++ wfdb-10.3.6/doc/wag-src/fixag.sed Mon Apr 7 15:03:02 2003 @@ -3,6 +3,7 @@ s+ecgpuwave-1.htm+ecgpuw-1.htm+g s+edf2mit-1.htm+edf2mi-1.htm+g s+gtkwave-1.htm+gtkwav-1.htm+g +s+imageplt-1.htm+imagep-1.htm+g s+pschart-1.htm+pschar-1.htm+g s+plotstm-1.htm+plotst-1.htm+g s+sampfreq-1.htm+sampfr-1.htm+g @@ -12,9 +13,11 @@ s+wfdbcal-5.htm+wfdbca-5.htm+g s+wfdbcollate-1.htm+wfdbco-1.htm+g s+wfdbwhich-1.htm+wfdbwh-1.htm+g +s+bc(1)+bc(1)+g s+cc(1)+cc(1)+g s+F(n)+F(n)+g s+F(n)+F(n)+g +s+F(n)+F(n)+g s+fseek(3)+fseek(3)+g s+gcc(1)+gcc(1)+g s+gnuplot(1)+gnuplot(1)+g @@ -26,6 +29,7 @@ s+N (3)+N (3)+g s+N (4)+N (4)+g s+N (8)+N (8)+g +s+osigfopen(nsig)+osigfopen(nsig)+g s+openwin(1)+openwin(1)+g s+plot(1)+plot(1)+g s+plot(3)+plot(3)+g diff -Naur wfdb-10.3.5/doc/wag-src/fixag.sh wfdb-10.3.6/doc/wag-src/fixag.sh --- wfdb-10.3.5/doc/wag-src/fixag.sh Mon Feb 24 01:20:31 2003 +++ wfdb-10.3.6/doc/wag-src/fixag.sh Mon Apr 7 14:44:35 2003 @@ -1,6 +1,6 @@ #! /bin/sh # file: fixag.sh G. Moody 10 April 1997 -# Last revised: 24 February 2003 +# Last revised: 7 April 2003 # # Post-process WFDB Applications Guide HTML files @@ -20,7 +20,6 @@ sed 's/\.\(.\)\.htm/-\1.htm/g' >$G.htm done mv -f evfootnode.htm evfoot.htm -mv -f view-d-1.htm view-1.htm for i in *.htm do diff -Naur wfdb-10.3.5/doc/wag-src/ihr.1 wfdb-10.3.6/doc/wag-src/ihr.1 --- wfdb-10.3.5/doc/wag-src/ihr.1 Tue Jul 30 21:22:17 2002 +++ wfdb-10.3.6/doc/wag-src/ihr.1 Mon Apr 7 14:48:13 2003 @@ -80,8 +80,7 @@ It may be necessary to set and export the shell variable \fBWFDB\fR (see \fBsetwfdb\fR(1)). .SH SEE ALSO -\fBlomb\fR(1), \fBsetwfdb\fR(1), \fBsqrs\fR(1), \fBtach\fRs -(1) +\fBlomb\fR(1), \fBsetwfdb\fR(1), \fBsqrs\fR(1), \fBtach\fR(1) .SH AUTHOR George B. Moody (george@mit.edu) .SH SOURCE diff -Naur wfdb-10.3.5/doc/wag-src/pltf.1 wfdb-10.3.6/doc/wag-src/pltf.1 --- wfdb-10.3.5/doc/wag-src/pltf.1 Thu Dec 19 18:12:14 2002 +++ wfdb-10.3.6/doc/wag-src/pltf.1 Mon Apr 7 15:06:01 2003 @@ -49,6 +49,6 @@ George B. Moody (\fBgeorge@mit.edu\fR) .SH SOURCES .PP -\fBhttp://www.physionet.org/physiotools/plt/misc/pltf\fR +\fBhttp://www.physionet.org/physiotools/plt/plt/misc/pltf\fR .PP -\fBhttp://www.physionet.org/physiotools/plt/misc/ftable.c\fR +\fBhttp://www.physionet.org/physiotools/plt/plt/misc/ftable.c\fR diff -Naur wfdb-10.3.5/doc/wag-src/view-dos.1 wfdb-10.3.6/doc/wag-src/view-dos.1 --- wfdb-10.3.5/doc/wag-src/view-dos.1 Wed Jul 31 23:52:21 2002 +++ wfdb-10.3.6/doc/wag-src/view-dos.1 Wed Dec 31 19:00:00 1969 @@ -1,191 +0,0 @@ -'\" t -.TH VIEW 1 "31 July 2002" "WFDB 10.2.7" "WFDB Applications Guide" -.SH NAME -view, vsetup \- WFDB browser for MS-DOS -.SH SYNOPSIS -\fBview\fR -.br -\fBview\fR \fIrecord\fR -.br -\fBview\fR \fIrecord annotator\fR -.br -\fBview\fR \fIrecord annotator time\fR -.br -\fBview\fR \fIrecord annotator type\fR -.br -\fBvsetup\fR -.br -\fBvsetup -s\fR \fIfile \fR -.br -\fBvsetup\fR \fImode\fR -.SH DESCRIPTION -.PP -This program reads one or more signal files and an annotation file (if one is -available), and displays the signals with annotations at the standard -chart recorder scale of 25 mm/sec and 10 mm/mV on systems equipped with -a CGA, Hercules, EGA, VGA, or compatible graphics display adapter. Run -\fBvsetup\fR to determine a suitable display mode and scaling constants before -using \fBview\fR for the first time (see \fBvsetup\fR below). -.PP -If no \fIrecord\fR is specified on the command line, \fBview\fR asks for a -record name when it starts. If no \fIannotator\fR is specified on the command -line, \fBview\fR attempts to find an annotation file named \fIrecord\fB.atr\fR; -otherwise, it attempts to find one named \fIrecord\fB.\fIannotator\fR. -If the annotation file does not exist or cannot be read, \fBview\fR simply -displays the signals. A \fItime\fR argument, if present, causes \fBview\fR -to display its first screenful such that the left-hand edge of the screen -corresponds to the specified time. A \fItype\fR argument, if present, causes -\fBview\fR to search for the first occurrence of the specified annotation type -in the annotation file, and to center the first screenful on that annotation -if possible. -.PP -\fBview\fR is an interactive program. Once the first screenful has been -displayed, \fBview\fR waits for additional commands, which can be typed in the -prompt area near the bottom of the screen, and which are executed when you -press ENTER. These commands can be in any of the formats permissible for -\fItime\fR or \fItype\fR command-line arguments; such commands have the same -effect as if given on the command line. You may also merely press ENTER to see -the next screenful; if the previous action involved searching for an -annotation, this will cause \fBview\fR to search for the next occurrence of the -same annotation type that does not already appear on the screen. The \fBg\fR -command may be used to turn the grid display on or off; initially, the grid -display is off. When the grid is visible, it marks 0.2 second and 0.5 -millivolt intervals. The \fBm\fR command may be used to turn annotation -marker bars (dotted lines above and below each annotation showing the exact -location of the annotation fiducial mark) on or off; initially, annotation -marker bars are on. Finally, use the \fBx\fR command to exit from \fBview\fR -and return to the DOS prompt. -.PP -Current versions of \fBview\fR (4.0 and later) support the use of a mouse to -navigate through the record. If a mouse is available, \fBview\fR displays -buttons at the bottom of the screen; click left on these to move forward -or backward by whole or half screenfuls. If the mouse pointer is above the -level of the buttons, clicking left or right moves the pointer left or right -one annotation at a time, recentering the display if the pointer would -otherwise move out of the display region. -.PP -\fBvsetup\fR is used to calibrate your monitor for \fBview\fR. If \fBvsetup\fR -is able to identify a usable graphics mode, it will ask you to measure the -dimensions of a rectangle that it draws on your screen. When it finishes, it -will print instructions for setting an environment variable that is required -by \fBview\fR, unless you have used the \fB-s\fR option; in the latter case, -the MS-DOS command needed to set the variable is appended to the specified -\fIfile\fR. If your graphics adapter is capable of several display modes, -and you prefer to use a different mode from that selected by \fBvsetup\fR, you -can run \fBvsetup\fR with an integer argument that corresponds to your -preferred \fImode\fR, from among the following: -.br -.TS -center; -r l. -\fIArgument Display mode\fR -4 320 x 200, 4 colors -5 320 x 200, 4 grey levels -6 640 x 200, black and white -8 720 x 348, black and white [1] -13 320 x 200, 16 colors -14 640 x 200, 16 colors -15 640 x 350, black and white -16 640 x 350, 4 or 16 colors -17 640 x 480, black and white -18 640 x 480, 16 colors -19 320 x 200, 256 colors [2] -258 800 x 600, 16 colors [3] -259 800 x 600, 256 colors [2,3] -260 1024 x 768, 16 colors [3] -261 1024 x 768, 256 colors [2,3] -262 1280 x 1024, 16 colors [3] -263 1280 x 1024, 256 colors [2,3] -.TE -.PP -[1] Mode 8 can be used only with a Hercules Graphics Card, Graphics Card Plus, -Incolor Card, or a compatible. To use mode 8 with one of these cards, load -\fImsherc.com\fR (from the \fIbin\fR directory of your CD-ROM or software -distribution diskette, or from your Microsoft C, Pascal, or Fortran compiler -diskettes) before using \fBvsetup\fR or \fBview\fR. Do so by typing -\fImsherc\fR from within the directory where you find \fImsherc.com\fR (you -may wish to include this step in your \fIautoexec.bat\fR). If you have both a -Hercules monochrome card and a color video card in the same system, type -\fImsherc /h\fR instead. -.PP -[2] \fBview\fR uses at most 5 colors, so the 256-color modes offer no advantage -over the 16-color modes. In the 16- and 256-color modes, the background is -white; in the 4-color and black-and-white modes, the background is black. -.PP -[3] These modes can be used only with a VESA-compatible SVGA and a compatible -monitor. \fBvsetup\fR will not identify these modes automatically, because -of the potential for damage to your monitor if your SVGA card supports these -modes but your monitor does not. \fBDo not attempt to use these modes unless -your monitor supports them. Otherwise, you risk damaging your monitor.\fR -.SH ENVIRONMENT -.TP -\fBWFDB\fR -The database path: a list of directories that contain database files. An -empty component is taken to refer to the current directory. All applications -built with the \fBwfdb\fR(3) library search for their database input files in -the order specified by \fBWFDB\fR. If \fBWFDB\fR is not set, searches are limited to the builtin WFDB path (see \fBsetwfdb\fR(1). Under MS-DOS, directory -names are separated by semicolons (;), and the format of \fBWFDB\fR is that of -the MS-DOS \fBPATH\fR variable (colons may be used following drive specifiers -within \fBWFDB\fR in this case). -.TP -\fBWFDBCAL\fR -The name of the WFDB calibration file (see \fBwfdbcal\fR(5)), which -must be in a directory named by \fBWFDB\fR (see immediately above). -This file is used by \fBview\fR to determine standard scales for -signals other than ECGs. If \fBWFDBCAL\fR is not set, or if the file -named by \fBWFDBCAL\fR is not readable, these signals may be drawn at -incorrect scales. -.TP -\fBVIEWF\fR -The pathname for the font file containing characters to be drawn by \fBview\fR. -\fBVIEWF\fR should name a Microsoft Windows-compatible `\fI.fon\fR' file. By -default, if \fBVIEWF\fR is not set, \fBview\fR checks the \fBPATH\fR variable -to see if Microsoft Windows is available, and uses \fImodern.fon\fR in the -Windows \fIsystem\fR subdirectory if so, or a file of the same name in the -current directory if not; otherwise, \fBview\fR uses text mode to draw -characters. If you are using \fBview\fR in a DOS box under MS-Windows 95, you -will probably find \fImodern.fon\fR in the Windows \fIfonts\fR subdirectory, -and you should set \fBVIEWF\fR accordingly. Note that text mode character -placement is constrained to text mode character cells; annotations shown using -text mode will not be placed as precisely as those shown using graphics mode. -.TP -\fBVIEWP\fR -Instructions for setting this variable are printed by \fBvsetup\fR. The -format for the command to do so is -.br - \fBset VIEWP=\fR\fImode,left,right,top,bottom,width,height\fR -.br -where \fImode\fR is one of those specified in the table above, \fIleft\fR, -\fIright\fR, \fItop\fR, and \fIbottom\fR are the pixel column and row numbers -corresponding to the edges of the display area to be used by \fBview\fR, and -\fIwidth\fR and \fIheight\fR are the dimensions of the display area in -millimeters. -.PP -After determining appropriate values for these variables, you may wish to add -commands for setting them to your \fIautoexec.bat\fR file. The standard -installation procedure determines appropriate values interactively and inserts -the necessary commands into \fIsetwfdb.bat\fR (see \fBsetwfdb\fR(1)). -.SH CD-ROM VERSIONS -The first edition of the MIT-BIH Arrhythmia Database CD-ROM, the first and -second editions of the European ST-T Database CD-ROM, and the first edition of -the MIT-BIH Polysomnographic Database CD-ROM contain versions of \fBview\fR -that do not support color or greyscale output, SVGA display modes, -\fBVIEWF\fR, annotation marker bar display, or mouse interaction. -.PP -Later editions of the MIT-BIH Arrhythmia Database CD-ROM and of the MIT-BIH -Polysomnographic Database CD-ROM contain a version of \fBview\fR that supports -all of these features. Note that version 4.0, included on the second editions -of these CD-ROMs, requires that the record name be supplied on the command -line. (As described above, earlier and later versions of \fBview\fR obtain the -record name interactively if it is not supplied on the command line.) -.SH SEE ALSO -\fBpschart\fR(1) (for PostScript), \fBwave\fR(1) (for X11), \fBwview\fR(1) -(for MS-Windows) -.br -\fBsetwfdb\fR(1) -.SH AUTHOR -George B. Moody (george@mit.edu) -.SH SOURCE -http://www.physionet.org/physiotools/wfdb/app/view.c -.br -http://www.physionet.org/physiotools/wfdb/app/vsetup.c diff -Naur wfdb-10.3.5/doc/wag-src/view.1 wfdb-10.3.6/doc/wag-src/view.1 --- wfdb-10.3.5/doc/wag-src/view.1 Wed Dec 31 19:00:00 1969 +++ wfdb-10.3.6/doc/wag-src/view.1 Wed Jul 31 23:52:21 2002 @@ -0,0 +1,191 @@ +'\" t +.TH VIEW 1 "31 July 2002" "WFDB 10.2.7" "WFDB Applications Guide" +.SH NAME +view, vsetup \- WFDB browser for MS-DOS +.SH SYNOPSIS +\fBview\fR +.br +\fBview\fR \fIrecord\fR +.br +\fBview\fR \fIrecord annotator\fR +.br +\fBview\fR \fIrecord annotator time\fR +.br +\fBview\fR \fIrecord annotator type\fR +.br +\fBvsetup\fR +.br +\fBvsetup -s\fR \fIfile \fR +.br +\fBvsetup\fR \fImode\fR +.SH DESCRIPTION +.PP +This program reads one or more signal files and an annotation file (if one is +available), and displays the signals with annotations at the standard +chart recorder scale of 25 mm/sec and 10 mm/mV on systems equipped with +a CGA, Hercules, EGA, VGA, or compatible graphics display adapter. Run +\fBvsetup\fR to determine a suitable display mode and scaling constants before +using \fBview\fR for the first time (see \fBvsetup\fR below). +.PP +If no \fIrecord\fR is specified on the command line, \fBview\fR asks for a +record name when it starts. If no \fIannotator\fR is specified on the command +line, \fBview\fR attempts to find an annotation file named \fIrecord\fB.atr\fR; +otherwise, it attempts to find one named \fIrecord\fB.\fIannotator\fR. +If the annotation file does not exist or cannot be read, \fBview\fR simply +displays the signals. A \fItime\fR argument, if present, causes \fBview\fR +to display its first screenful such that the left-hand edge of the screen +corresponds to the specified time. A \fItype\fR argument, if present, causes +\fBview\fR to search for the first occurrence of the specified annotation type +in the annotation file, and to center the first screenful on that annotation +if possible. +.PP +\fBview\fR is an interactive program. Once the first screenful has been +displayed, \fBview\fR waits for additional commands, which can be typed in the +prompt area near the bottom of the screen, and which are executed when you +press ENTER. These commands can be in any of the formats permissible for +\fItime\fR or \fItype\fR command-line arguments; such commands have the same +effect as if given on the command line. You may also merely press ENTER to see +the next screenful; if the previous action involved searching for an +annotation, this will cause \fBview\fR to search for the next occurrence of the +same annotation type that does not already appear on the screen. The \fBg\fR +command may be used to turn the grid display on or off; initially, the grid +display is off. When the grid is visible, it marks 0.2 second and 0.5 +millivolt intervals. The \fBm\fR command may be used to turn annotation +marker bars (dotted lines above and below each annotation showing the exact +location of the annotation fiducial mark) on or off; initially, annotation +marker bars are on. Finally, use the \fBx\fR command to exit from \fBview\fR +and return to the DOS prompt. +.PP +Current versions of \fBview\fR (4.0 and later) support the use of a mouse to +navigate through the record. If a mouse is available, \fBview\fR displays +buttons at the bottom of the screen; click left on these to move forward +or backward by whole or half screenfuls. If the mouse pointer is above the +level of the buttons, clicking left or right moves the pointer left or right +one annotation at a time, recentering the display if the pointer would +otherwise move out of the display region. +.PP +\fBvsetup\fR is used to calibrate your monitor for \fBview\fR. If \fBvsetup\fR +is able to identify a usable graphics mode, it will ask you to measure the +dimensions of a rectangle that it draws on your screen. When it finishes, it +will print instructions for setting an environment variable that is required +by \fBview\fR, unless you have used the \fB-s\fR option; in the latter case, +the MS-DOS command needed to set the variable is appended to the specified +\fIfile\fR. If your graphics adapter is capable of several display modes, +and you prefer to use a different mode from that selected by \fBvsetup\fR, you +can run \fBvsetup\fR with an integer argument that corresponds to your +preferred \fImode\fR, from among the following: +.br +.TS +center; +r l. +\fIArgument Display mode\fR +4 320 x 200, 4 colors +5 320 x 200, 4 grey levels +6 640 x 200, black and white +8 720 x 348, black and white [1] +13 320 x 200, 16 colors +14 640 x 200, 16 colors +15 640 x 350, black and white +16 640 x 350, 4 or 16 colors +17 640 x 480, black and white +18 640 x 480, 16 colors +19 320 x 200, 256 colors [2] +258 800 x 600, 16 colors [3] +259 800 x 600, 256 colors [2,3] +260 1024 x 768, 16 colors [3] +261 1024 x 768, 256 colors [2,3] +262 1280 x 1024, 16 colors [3] +263 1280 x 1024, 256 colors [2,3] +.TE +.PP +[1] Mode 8 can be used only with a Hercules Graphics Card, Graphics Card Plus, +Incolor Card, or a compatible. To use mode 8 with one of these cards, load +\fImsherc.com\fR (from the \fIbin\fR directory of your CD-ROM or software +distribution diskette, or from your Microsoft C, Pascal, or Fortran compiler +diskettes) before using \fBvsetup\fR or \fBview\fR. Do so by typing +\fImsherc\fR from within the directory where you find \fImsherc.com\fR (you +may wish to include this step in your \fIautoexec.bat\fR). If you have both a +Hercules monochrome card and a color video card in the same system, type +\fImsherc /h\fR instead. +.PP +[2] \fBview\fR uses at most 5 colors, so the 256-color modes offer no advantage +over the 16-color modes. In the 16- and 256-color modes, the background is +white; in the 4-color and black-and-white modes, the background is black. +.PP +[3] These modes can be used only with a VESA-compatible SVGA and a compatible +monitor. \fBvsetup\fR will not identify these modes automatically, because +of the potential for damage to your monitor if your SVGA card supports these +modes but your monitor does not. \fBDo not attempt to use these modes unless +your monitor supports them. Otherwise, you risk damaging your monitor.\fR +.SH ENVIRONMENT +.TP +\fBWFDB\fR +The database path: a list of directories that contain database files. An +empty component is taken to refer to the current directory. All applications +built with the \fBwfdb\fR(3) library search for their database input files in +the order specified by \fBWFDB\fR. If \fBWFDB\fR is not set, searches are limited to the builtin WFDB path (see \fBsetwfdb\fR(1). Under MS-DOS, directory +names are separated by semicolons (;), and the format of \fBWFDB\fR is that of +the MS-DOS \fBPATH\fR variable (colons may be used following drive specifiers +within \fBWFDB\fR in this case). +.TP +\fBWFDBCAL\fR +The name of the WFDB calibration file (see \fBwfdbcal\fR(5)), which +must be in a directory named by \fBWFDB\fR (see immediately above). +This file is used by \fBview\fR to determine standard scales for +signals other than ECGs. If \fBWFDBCAL\fR is not set, or if the file +named by \fBWFDBCAL\fR is not readable, these signals may be drawn at +incorrect scales. +.TP +\fBVIEWF\fR +The pathname for the font file containing characters to be drawn by \fBview\fR. +\fBVIEWF\fR should name a Microsoft Windows-compatible `\fI.fon\fR' file. By +default, if \fBVIEWF\fR is not set, \fBview\fR checks the \fBPATH\fR variable +to see if Microsoft Windows is available, and uses \fImodern.fon\fR in the +Windows \fIsystem\fR subdirectory if so, or a file of the same name in the +current directory if not; otherwise, \fBview\fR uses text mode to draw +characters. If you are using \fBview\fR in a DOS box under MS-Windows 95, you +will probably find \fImodern.fon\fR in the Windows \fIfonts\fR subdirectory, +and you should set \fBVIEWF\fR accordingly. Note that text mode character +placement is constrained to text mode character cells; annotations shown using +text mode will not be placed as precisely as those shown using graphics mode. +.TP +\fBVIEWP\fR +Instructions for setting this variable are printed by \fBvsetup\fR. The +format for the command to do so is +.br + \fBset VIEWP=\fR\fImode,left,right,top,bottom,width,height\fR +.br +where \fImode\fR is one of those specified in the table above, \fIleft\fR, +\fIright\fR, \fItop\fR, and \fIbottom\fR are the pixel column and row numbers +corresponding to the edges of the display area to be used by \fBview\fR, and +\fIwidth\fR and \fIheight\fR are the dimensions of the display area in +millimeters. +.PP +After determining appropriate values for these variables, you may wish to add +commands for setting them to your \fIautoexec.bat\fR file. The standard +installation procedure determines appropriate values interactively and inserts +the necessary commands into \fIsetwfdb.bat\fR (see \fBsetwfdb\fR(1)). +.SH CD-ROM VERSIONS +The first edition of the MIT-BIH Arrhythmia Database CD-ROM, the first and +second editions of the European ST-T Database CD-ROM, and the first edition of +the MIT-BIH Polysomnographic Database CD-ROM contain versions of \fBview\fR +that do not support color or greyscale output, SVGA display modes, +\fBVIEWF\fR, annotation marker bar display, or mouse interaction. +.PP +Later editions of the MIT-BIH Arrhythmia Database CD-ROM and of the MIT-BIH +Polysomnographic Database CD-ROM contain a version of \fBview\fR that supports +all of these features. Note that version 4.0, included on the second editions +of these CD-ROMs, requires that the record name be supplied on the command +line. (As described above, earlier and later versions of \fBview\fR obtain the +record name interactively if it is not supplied on the command line.) +.SH SEE ALSO +\fBpschart\fR(1) (for PostScript), \fBwave\fR(1) (for X11), \fBwview\fR(1) +(for MS-Windows) +.br +\fBsetwfdb\fR(1) +.SH AUTHOR +George B. Moody (george@mit.edu) +.SH SOURCE +http://www.physionet.org/physiotools/wfdb/app/view.c +.br +http://www.physionet.org/physiotools/wfdb/app/vsetup.c diff -Naur wfdb-10.3.5/doc/wag-src/wfdb.3 wfdb-10.3.6/doc/wag-src/wfdb.3 --- wfdb-10.3.5/doc/wag-src/wfdb.3 Thu Aug 1 02:14:15 2002 +++ wfdb-10.3.6/doc/wag-src/wfdb.3 Mon Apr 7 15:00:48 2003 @@ -1,4 +1,4 @@ -.TH WFDB 3 "1 August 2002" "WFDB software 10.2.7" "WFDB Applications Guide" +.TH WFDB 3 "7 April 2003" "WFDB software 10.3.6" "WFDB Applications Guide" .SH NAME wfdb \- Waveform Database library .SH SYNOPSIS @@ -78,6 +78,8 @@ .br WFDB_Frequency sampfreq(char *\fIrecord\fP) .br +WFDB_Sample sample(WFDB_Signal \fIs\fP, WFDB_Time \fIt\fP) +.br int setanndesc(int \fIannotation_code\fP, char *\fIannotation_description\fP) .br int setannstr(int \fIannotation_code\fP, char *\fIannotation_mnemonic_string\fP) @@ -187,8 +189,8 @@ \fI/usr/help/html/wpg\fP); the most recent version can be viewed on-line at \fBhttp://www.physionet.org/physiotools/wpg/\fP. .PP -The WFDB library can also be used with Fortran programs; see the \fIGuide\fR -for details. +The WFDB library can also be used with Fortran programs; see \fIwfdbf\fR(3) +and the \fIGuide\fR for details. .SH DIAGNOSTICS All functions that return an \fBint\fR indicate errors with negative values. Depending on context, zero returns may indicate success or diff -Naur wfdb-10.3.5/doc/wag-src/wfdbf.3 wfdb-10.3.6/doc/wag-src/wfdbf.3 --- wfdb-10.3.5/doc/wag-src/wfdbf.3 Thu Aug 1 02:18:09 2002 +++ wfdb-10.3.6/doc/wag-src/wfdbf.3 Mon Apr 7 15:04:32 2003 @@ -1,4 +1,4 @@ -.TH WFDBF 3 "1 August 2002" "WFDB software 10.2.7" "WFDB Applications Guide" +.TH WFDBF 3 "7 April 2003" "WFDB software 10.3.6" "WFDB Applications Guide" .SH NAME wfdbf \- Waveform Database library wrappers for Fortran .SH SYNOPSIS diff -Naur wfdb-10.3.5/doc/wag-src/wview.1 wfdb-10.3.6/doc/wag-src/wview.1 --- wfdb-10.3.5/doc/wag-src/wview.1 Thu Aug 1 01:45:01 2002 +++ wfdb-10.3.6/doc/wag-src/wview.1 Mon Apr 7 14:55:39 2003 @@ -231,7 +231,7 @@ empty component is taken to refer to the current directory. All applications built with the \fIwfdb\fR(3) library search for their database input files in the order specified by \fBWFDB\fR. If \fBWFDB\fR is not set, searches are -limited to the builtin WFDB path (see \fBsetwfdb\fR(3)). Under +limited to the builtin WFDB path (see \fBsetwfdb\fR(1)). Under MS-DOS/MS-Windows, directory names are separated by semicolons (;), and the format of \fBWFDB\fR is that of the MS-DOS \fBPATH\fR variable (colons may be used following drive specifiers within \fBWFDB\fR in this case). @@ -241,7 +241,7 @@ a directory named by \fBWFDB\fR (see immediately above). This file is used by \fBwview\fR to determine standard scales for signals other than ECGs. If \fBWFDBCAL\fR is not set, the default WFDB calibration file is used (see -\fBsetwfdb\fR(3)). If the calibration file is not readable, signals may be +\fBsetwfdb\fR(1)). If the calibration file is not readable, signals may be drawn at incorrect scales. .PP After determining appropriate values for these variables, you may wish to add diff -Naur wfdb-10.3.5/doc/wpg-src/Makefile wfdb-10.3.6/doc/wpg-src/Makefile --- wfdb-10.3.5/doc/wpg-src/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/doc/wpg-src/Makefile Mon Apr 7 14:34:36 2003 @@ -65,12 +65,12 @@ # wpg.info' again. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -87,10 +87,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/doc/wpg-src/wpg0.tex wfdb-10.3.6/doc/wpg-src/wpg0.tex --- wfdb-10.3.5/doc/wpg-src/wpg0.tex Mon Mar 31 18:01:38 2003 +++ wfdb-10.3.6/doc/wpg-src/wpg0.tex Mon Apr 7 10:52:57 2003 @@ -488,13 +488,30 @@ WFDB Software Package distribution, for information on any more recent changes that may not be described here. +@unnumberedsubsec Changes in version 10.3.6 + +The fix applied in @code{isigclose()} in 10.3.5 was incomplete but is now +(really!) fixed. Applications that use @code{sample()} should call +@code{wfdbquit()} to be certain that @code{sample}'s buffer is freed before +exiting. + +Some long-standing problems in the code (in @file{lib/wfdbio.c}) that handles +http range requests for NETFILES-enabled versions of the library have +been partially addressed. The underlying issue is that http servers +do not always return the range of bytes requested; when this happens, +it is not difficult to determine that there is a problem, but it is +tricky to figure out what to do about it. Based on experiments with +several different http servers, the strategy for handling such problems +within the WFDB NETFILES code has been improved substantially, but +there may be further room for improvement. + @unnumberedsubsec Changes in version 10.3.5 -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. +Fixed a bug in WFDB library function @code{isigclose()} (in +@file{lib/signal.c}) that had caused @code{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. (WFDB library versions 10.3.3 and 10.3.4 were identical to 10.3.2.) @@ -509,7 +526,7 @@ @unnumberedsubsec Changes in version 10.3.0 -Fixed bugs in @file{lib/sample.c} that caused improper accounting of signal +Fixed bugs in @file{lib/signal.c} that caused improper accounting of signal group numbers when reading from two or more records at the same time (as in @file{nst}), a bug that caused a segfault in @file{nst}, and a bug that referenced uninitialized memory in @code{newheader} if @code{nsig} = 0. @@ -2571,6 +2588,10 @@ number beyond the end of the record, the returned value is that of the last valid sample of the specified signal. For an example of the use of @code{sample} and @code{sample_valid}, @pxref{Example 7}. + +Be sure to call @code{wfdbquit} before exiting from any program that +uses @code{sample}, to be certain that dynamically allocated memory +used by @code{sample} is freed. @page @node conversion, calibration, non-sequential, Functions diff -Naur wfdb-10.3.5/doc/wug-src/Makefile wfdb-10.3.6/doc/wug-src/Makefile --- wfdb-10.3.5/doc/wug-src/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/doc/wug-src/Makefile Mon Apr 7 14:34:36 2003 @@ -55,12 +55,12 @@ # PostScript 'make wug.ps' (requires latex and dvips) # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -77,10 +77,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/doc/wug-src/wug0.tex wfdb-10.3.6/doc/wug-src/wug0.tex --- wfdb-10.3.5/doc/wug-src/wug0.tex Wed Feb 12 16:41:19 2003 +++ wfdb-10.3.6/doc/wug-src/wug0.tex Wed Apr 2 23:11:40 2003 @@ -3095,7 +3095,7 @@ measurements, but they can be used in a pinch.) For further information on signal calibration, see -\htmladdnormallink{{\tt calsig(1)}}{../wag/calibr-1.htm}, +\htmladdnormallink{{\tt calsig(1)}}{../wag/calsig-1.htm}, in the \htmladdnormallink{{\it WFDB Applications Guide}}{../wag/wag.htm}. @@ -4941,8 +4941,8 @@ system, written by Linus Torvalds and a cast of thousands. It is available in source and ready-to-run form by anonymous FTP from many sources, including -\htmladdnormallink{{\tt tsx-11.mit.edu}}{ftp://tsx-11.mit.edu/pub/linux}, -\htmladdnormallink{{\tt metalab.unc.edu}}{ftp://metalab.unc.edu/pub/Linux}, and +\htmladdnormallink{{\tt ftp://ftp.tux.org}}{ftp://ftp.tux.org}, +\htmladdnormallink{{\tt public.planetmirror.com}}{ftp://public.planetmirror.com/pub/linux}, and \htmladdnormallink{{\tt ftp.funet.fi}}{ftp://ftp.funet.fi/pub/Linux}. You can also obtain Linux on CD-ROMs from many commercial sources, generally at very low prices (typically US\$10 to @@ -4956,8 +4956,8 @@ X11R6, XView 3.2, {\tt olwm} and {\tt olvwm}; these are also available from the sites above as well as from PhysioNet. For further information, visit the home page of the Linux Documentation Project -(\htmladdnormallink{{\tt http://www.linuxdoc.org/}} -{http://www.linuxdoc.org/}), where you may also find the Linux HOWTO +(\htmladdnormallink{{\tt http://www.tldp.org/}} +{http://www.tldp.org/}), where you may also find the Linux HOWTO documents mentioned earlier. \index{format!of binary executable files} diff -Naur wfdb-10.3.5/examples/Makefile wfdb-10.3.6/examples/Makefile --- wfdb-10.3.5/examples/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/examples/Makefile Mon Apr 7 14:34:37 2003 @@ -34,12 +34,12 @@ # `make clean' to remove them. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -56,10 +56,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/lib/Makefile wfdb-10.3.6/lib/Makefile --- wfdb-10.3.5/lib/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/lib/Makefile Mon Apr 7 14:34:36 2003 @@ -33,12 +33,12 @@ # type `make slib'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -55,10 +55,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux-slib.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/lib/signal.c wfdb-10.3.6/lib/signal.c --- wfdb-10.3.5/lib/signal.c Mon Mar 31 17:50:51 2003 +++ wfdb-10.3.6/lib/signal.c Mon Apr 7 11:23:48 2003 @@ -1,5 +1,5 @@ /* file: signal.c G. Moody 13 April 1989 - Last revised: 31 March 2003 wfdblib 10.3.5 + Last revised: 7 April 2003 wfdblib 10.3.6 WFDB library functions for signals _______________________________________________________________________________ @@ -95,6 +95,7 @@ These functions, also defined here, are intended only for the use of WFDB library functions defined elsewhere: + wfdb_sampquit (frees memory allocated by sample()) wfdb_sigclose (closes signals and resets variables) wfdb_osflush (flushes output signals) @@ -881,7 +882,7 @@ struct igdata *ig; if (nisig == 0) return; - if (sbuf && (!in_msrec || segp >= segend)) { + if (sbuf && !in_msrec) { (void)free(sbuf); sbuf = NULL; sample_vflag = 0; @@ -2891,6 +2892,15 @@ } /* Private functions (for use by other WFDB library functions only). */ + +void wfdb_sampquit() +{ + if (sbuf) { + (void)free(sbuf); + sbuf = NULL; + sample_vflag = 0; + } +} void wfdb_sigclose() { diff -Naur wfdb-10.3.5/lib/wfdb.h0 wfdb-10.3.6/lib/wfdb.h0 --- wfdb-10.3.5/lib/wfdb.h0 Mon Mar 31 18:02:56 2003 +++ wfdb-10.3.6/lib/wfdb.h0 Mon Apr 7 10:07:18 2003 @@ -1,5 +1,5 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 31 March 2003 wfdblib 10.3.5 + Last revised: 7 April 2003 wfdblib 10.3.6 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 5 +#define WFDB_RELEASE 6 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ /* Determine what type of compiler is being used. */ diff -Naur wfdb-10.3.5/lib/wfdbinit.c wfdb-10.3.6/lib/wfdbinit.c --- wfdb-10.3.5/lib/wfdbinit.c Tue May 23 01:20:51 2000 +++ wfdb-10.3.6/lib/wfdbinit.c Mon Apr 7 10:28:52 2003 @@ -1,9 +1,9 @@ /* file: wfdbinit.c G. Moody 23 May 1983 - Last revised: 23 May 2000 wfdblib 10.1.4 + Last revised: 7 April 2003 wfdblib 10.3.6 WFDB library functions wfdbinit, wfdbquit, and wfdbflush _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 2000 George B. Moody +Copyright (C) 2003 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 @@ -49,6 +49,7 @@ { wfdb_anclose(); /* close annotation files, reset variables */ wfdb_sigclose(); /* close signals, reset variables */ + wfdb_sampquit(); /* release sample data buffer */ #if WFDB_NETFILES wfdb_wwwquit(); /* release any resources allocated by libwww */ #endif diff -Naur wfdb-10.3.5/lib/wfdbio.c wfdb-10.3.6/lib/wfdbio.c --- wfdb-10.3.5/lib/wfdbio.c Thu Nov 7 20:55:52 2002 +++ wfdb-10.3.6/lib/wfdbio.c Tue Apr 1 18:24:47 2003 @@ -1,10 +1,10 @@ /* file: wfdbio.c G. Moody 18 November 1988 - Last revised: 12 July 2002 wfdblib 10.2.7 + Last revised: 1 April 2003 wfdblib 10.3.6 Low-level I/O functions for the WFDB library _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 2002 George B. Moody +Copyright (C) 2003 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 @@ -1089,23 +1089,54 @@ } } if (chunk && (HTChunk_size(chunk) > len)) { - /* While we may have received something, we did not receive the - requested range (more precisely, a range of the same size as the - one we requested). Assume that we got the entire file instead. - This seems to happen both if the file was in the cache or if - the server does not support the range request. Since the caller - expects only a chunk of len bytes (not necessarily at the - beginning of the file), we need to create a new chunk and return - it to the caller. HTChunk_new makes a new chunk, which grows as - needed in multiples of its argument (in bytes). */ - extra_chunk = HTChunk_new(64); - /* Copy the desired range out of the chunk we received into the new - chunk. */ - HTChunk_putb(extra_chunk, &HTChunk_data(chunk)[startb], len); - /* Discard the chunk we received. */ - HTChunk_delete(chunk); - /* Arrange for the new chunk to be returned. */ - chunk = extra_chunk; + /* We received a larger chunk than requested. */ + if (HTChunk_size(chunk) >= startb + len) { + /* If the chunk is large enough to include the requested range + and everything before it, assume that that's what we have + (it may be the entire file). This might happen if the + file was in the cache or if the server does not support the + range request. Since the caller expects only a chunk of + len bytes beginning with the data of interest, we need to + create a new chunk of the proper length, fill it, and + return it to the caller. HTChunk_new makes a new chunk, + which grows as needed in multiples of its argument (in + bytes). */ + extra_chunk = HTChunk_new(len); + /* Copy the desired range out of the chunk we received into the + new chunk. */ + HTChunk_putb(extra_chunk, &HTChunk_data(chunk)[startb], len); + /* Discard the chunk we received. */ + HTChunk_delete(chunk); + /* Arrange for the new chunk to be returned. */ + chunk = extra_chunk; + } + else { + /* We received some chunk of the file (not the whole file, but + not what we requested, either). Since we don't know what + we have, let's try again, but only once. */ + static int retry = 1; + + if (retry) { + retry = 0; + HTRequest_delete(request); + fflush(stderr); + chunk = www_get_url_range_chunk(url, startb, len); + retry = 1; + return (chunk); + } + else { + /* We did no better the second time, so let's return an + error to the caller. */ + wfdb_error( + "www_get_url_range_chunk: fatal error requesting %s (%s)\n", + url, range_req_str); + if (chunk) { + HTChunk_delete(chunk); + chunk = NULL; + } + retry = 1; + } + } } HTRequest_delete(request); } diff -Naur wfdb-10.3.5/lib/wfdblib.h0 wfdb-10.3.6/lib/wfdblib.h0 --- wfdb-10.3.5/lib/wfdblib.h0 Thu Nov 14 17:07:27 2002 +++ wfdb-10.3.6/lib/wfdblib.h0 Mon Apr 7 10:31:46 2003 @@ -1,5 +1,5 @@ /* file: wfdblib.h G. Moody 13 April 1989 - Last revised: 14 November 2002 wfdblib 10.3.0 + Last revised: 7 April 2003 wfdblib 10.3.6 External definitions for WFDB library private functions _______________________________________________________________________________ @@ -298,6 +298,7 @@ #endif /* These functions are defined in signal.c */ +extern void wfdb_sampquit(void); extern void wfdb_sigclose(void); extern void wfdb_osflush(void); @@ -315,8 +316,8 @@ extern int wfdb_checkname(), wfdb_g16(), wfdb_parse_path(); extern long wfdb_g32(); extern void wfdb_p16(), wfdb_p32(), wfdb_addtopath(), wfdb_error(), - wfdb_setirec(), wfdb_sigclose(), wfdb_anclose(), wfdb_osflush(), - wfdb_oaflush(); + wfdb_setirec(), wfdb_sampquit(), wfdb_sigclose(), wfdb_anclose(), + wfdb_osflush(), wfdb_oaflush(); # if WFDB_NETFILES extern char *wfdb_fgets(); diff -Naur wfdb-10.3.5/psd/Makefile wfdb-10.3.6/psd/Makefile --- wfdb-10.3.5/psd/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/psd/Makefile Mon Apr 7 14:34:37 2003 @@ -32,12 +32,12 @@ # directory). # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -54,10 +54,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/wave/Makefile wfdb-10.3.6/wave/Makefile --- wfdb-10.3.5/wave/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/wave/Makefile Mon Apr 7 14:34:37 2003 @@ -45,12 +45,12 @@ # just type `make' (from within this directory). # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -67,10 +67,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000 diff -Naur wfdb-10.3.5/waverc/Makefile wfdb-10.3.6/waverc/Makefile --- wfdb-10.3.5/waverc/Makefile Mon Mar 31 18:03:21 2003 +++ wfdb-10.3.6/waverc/Makefile Mon Apr 7 14:34:37 2003 @@ -25,12 +25,12 @@ # please visit PhysioNet (http://www.physionet.org/). # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 31 March 2003 +# Last revised: 7 April 2003 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 3 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official @@ -47,10 +47,10 @@ # Definitions generated by 'configure' -PACKAGE = wfdb-10.3.5 -SRCDIR = /home/george/wfdb-10.3.5 -LONGDATE = 31 March 2003 -SHORTDATE = MARCH 2003 +PACKAGE = wfdb-10.3.6 +SRCDIR = /home/george/wfdb-10.3.6 +LONGDATE = 7 April 2003 +SHORTDATE = APRIL 2003 # _____________________________________________________________________________ # file: linux.def G. Moody 31 May 2000