diff -Naur wfdb-10.2.4/MANIFEST wfdb-10.2.5/MANIFEST
--- wfdb-10.2.4/MANIFEST	Mon Dec 17 22:57:16 2001
+++ wfdb-10.2.5/MANIFEST	Sun Mar 10 08:59:44 2002
@@ -119,6 +119,8 @@
 conf/cygwin.def
 conf/exechmod
 conf/exestrip
+conf/freebsd.def
+conf/freebsd-slib.def
 conf/generic.def
 conf/generic-slib.def
 conf/hpux.def
@@ -213,161 +215,194 @@
 data/wfdbcal
 data/wfdbpath.mac
 doc/
-doc/a2m.1
-doc/ann2rr.1
-doc/annot.5
-doc/appguide.int
-doc/bxb.1
-doc/calsig.1
-doc/coherence.1
-doc/cover.ag
-doc/cover.pg
-doc/cover.wug
-doc/ctotexi.c
-doc/dbag.ht0
-doc/dbag.tex
-doc/dbu.hlp
-doc/dbu.ht0
-doc/dbu.tex
-doc/dfa.1
-doc/dir.db
-doc/dir.top
-doc/ecgeval.1
-doc/epic.1
-doc/eval.tex
-doc/fancybox.perl
-doc/fft.1
-doc/fir.1
-doc/fixag.sed
-doc/fixag.sh
-doc/fixpg.sed
-doc/fixpg.sh
-doc/foot.ht0
-doc/header.5
-doc/hrfft.1
-doc/icons/
-doc/icons/contents.png
-doc/icons/cross_ref.png
-doc/icons/foot.png
-doc/icons/index.png
-doc/icons/next_gr.png
-doc/icons/next.png
-doc/icons/prev_gr.png
-doc/icons/previous.png
-doc/icons/up_gr.png
-doc/icons/up.png
-doc/ihr.1
-doc/index.ht0
-doc/info/
-doc/info/README.info
-doc/install.tex
-doc/intro.ht0
-doc/.latex2html-init
-doc/log10.1
-doc/lomb.1
 doc/Makefile
 doc/Makefile.top
 doc/Makefile.tpl
-doc/makeinfo.sh
-doc/manhtml.sh
-doc/maninst.sh
-doc/memse.1
-doc/mfilt.1
-doc/mrgann.1
-doc/mxm.1
-doc/nst.1
-doc/plot2d.1
-doc/plotstm.1
-doc/plt.1
-doc/pschart.1
-doc/psfd.1
-doc/rdann.1
-doc/rdsamp.1
+doc/misc/
+doc/misc/foot.ht0
+doc/misc/icons/
+doc/misc/icons/contents.png
+doc/misc/icons/cross_ref.png
+doc/misc/icons/foot.png
+doc/misc/icons/index.png
+doc/misc/icons/next_gr.png
+doc/misc/icons/next.png
+doc/misc/icons/prev_gr.png
+doc/misc/icons/previous.png
+doc/misc/icons/up_gr.png
+doc/misc/icons/up.png
+doc/misc/index.ht0
 doc/README
-doc/rxr.1
-doc/sampfreq.1
-doc/sample.1
-doc/setwfdb.1
-doc/sigamp.1
-doc/signal.5
-doc/skewedit.1
-doc/snip.1
-doc/sortann.1
-doc/sqrs.1
-doc/sumann.1
-doc/sumstats.1
-doc/tach.1
-doc/tmac.dif
-doc/view.1
-doc/wave/
-doc/wave.1
-doc/wave/misc/
-doc/wave/misc/example.xws
-doc/wave/misc/html.sty
-doc/wave/misc/wave.inf
-doc/wave/png/
-doc/wave/png/chart2.png
-doc/wave/png/fulldisc.png
-doc/wave/png/wave.png
-doc/wave/ppm/
-doc/wave/ppm/allow-edit.ppm.gz
-doc/wave/ppm/analysis-commands.ppm.gz
-doc/wave/ppm/analyze-window.ppm.gz
-doc/wave/ppm/annotation-template.ppm.gz
-doc/wave/ppm/attach-to-signals.ppm.gz
-doc/wave/ppm/calibrate.ppm.gz
-doc/wave/ppm/file-analyze.ppm.gz
-doc/wave/ppm/file-load.ppm.gz
-doc/wave/ppm/file-print.ppm.gz
-doc/wave/ppm/file-save.ppm.gz
-doc/wave/ppm/find-window.ppm.gz
-doc/wave/ppm/help-intro.ppm.gz
-doc/wave/ppm/help-topics.ppm.gz
-doc/wave/ppm/level-window.ppm.gz
-doc/wave/ppm/load-window.ppm.gz
-doc/wave/ppm/log-window.ppm.gz
-doc/wave/ppm/main-control-panel.ppm.gz
-doc/wave/ppm/main-window.ppm.gz
-doc/wave/ppm/main-with-hr.ppm.gz
-doc/wave/ppm/main-with-markers.ppm.gz
-doc/wave/ppm/netscape-new-helper.ppm.gz
-doc/wave/ppm/noedit.ppm.gz
-doc/wave/ppm/nomatch.ppm.gz
-doc/wave/ppm/notice-quit.ppm.gz
-doc/wave/ppm/print-setup-window.ppm.gz
-doc/wave/ppm/scope-window.ppm.gz
-doc/wave/ppm/search-template.ppm.gz
-doc/wave/ppm/spot-help.ppm.gz
-doc/wave/ppm/stdev.ppm.gz
-doc/wave/ppm/system-menu.ppm.gz
-doc/wave/ppm/title-with-parens.ppm.gz
-doc/wave/ppm/type-menu.ppm.gz
-doc/wave/ppm/view-window.ppm.gz
-doc/wave/ppm/wave-icon.ppm.gz
-doc/wave/ppm/wave-menu.ppm.gz
-doc/wave/ps/
-doc/wave/ps/chart1.ps
-doc/wave/ps/chart2.ps
-doc/wave/ps/fulldisc.ps
-doc/wave/scripts/
-doc/wave/scripts/dossify-html
-doc/wave/scripts/fixinfo
-doc/wave/scripts/fixlinks
-doc/wave/scripts/savewin
-doc/wave/scripts/wave2d
-doc/wave/scripts/wugfigures
-doc/wfdb.3
-doc/wfdbcal.5
-doc/wfdbcat.1
-doc/wfdbcollate.1
-doc/wfdbdesc.1
-doc/wfdbwhich.1
-doc/wrann.1
-doc/wrsamp.1
-doc/wug.tex
-doc/wview.1
-doc/xform.1
-doc/xview.7
+doc/wag/
+doc/wag-src/
+doc/wag-src/a2m.1
+doc/wag-src/ann2rr.1
+doc/wag-src/annot.5
+doc/wag-src/appguide.int
+doc/wag-src/bxb.1
+doc/wag-src/calsig.1
+doc/wag-src/coherence.1
+doc/wag-src/dfa.1
+doc/wag-src/ecgeval.1
+doc/wag-src/epic.1
+doc/wag-src/eval.tex
+doc/wag-src/fft.1
+doc/wag-src/fir.1
+doc/wag-src/fixag.sed
+doc/wag-src/fixag.sh
+doc/wag-src/header.5
+doc/wag-src/hrfft.1
+doc/wag-src/ihr.1
+doc/wag-src/install.tex
+doc/wag-src/intro.ht0
+doc/wag-src/.latex2html-init
+doc/wag-src/log10.1
+doc/wag-src/lomb.1
+doc/wag-src/Makefile
+doc/wag-src/Makefile.top
+doc/wag-src/Makefile.tpl
+doc/wag-src/manhtml.sh
+doc/wag-src/maninst.sh
+doc/wag-src/memse.1
+doc/wag-src/mfilt.1
+doc/wag-src/mrgann.1
+doc/wag-src/mxm.1
+doc/wag-src/nst.1
+doc/wag-src/plot2d.1
+doc/wag-src/plotstm.1
+doc/wag-src/plt.1
+doc/wag-src/pschart.1
+doc/wag-src/psfd.1
+doc/wag-src/rdann.1
+doc/wag-src/rdsamp.1
+doc/wag-src/README
+doc/wag-src/rxr.1
+doc/wag-src/sampfreq.1
+doc/wag-src/sample.1
+doc/wag-src/setwfdb.1
+doc/wag-src/sigamp.1
+doc/wag-src/signal.5
+doc/wag-src/skewedit.1
+doc/wag-src/snip.1
+doc/wag-src/sortann.1
+doc/wag-src/sqrs.1
+doc/wag-src/sumann.1
+doc/wag-src/sumstats.1
+doc/wag-src/tach.1
+doc/wag-src/tmac.dif
+doc/wag-src/view.1
+doc/wag-src/wag.cover
+doc/wag-src/wag.ht0
+doc/wag-src/wag.tex
+doc/wag-src/wave.1
+doc/wag-src/wfdb.3
+doc/wag-src/wfdbcal.5
+doc/wag-src/wfdbcat.1
+doc/wag-src/wfdbcollate.1
+doc/wag-src/wfdbdesc.1
+doc/wag-src/wfdbwhich.1
+doc/wag-src/wrann.1
+doc/wag-src/wrsamp.1
+doc/wag-src/wview.1
+doc/wag-src/xform.1
+doc/wag-src/xview.7
+doc/wpg/
+doc/wpg/info/
+doc/wpg/info/README.info
+doc/wpg/info/wpg
+doc/wpg/info/wpg-1
+doc/wpg/info/wpg-2
+doc/wpg/info/wpg-3
+doc/wpg/info/wpg-4
+doc/wpg/info/wpg-5
+doc/wpg/info/wpg-6
+doc/wpg/info/wpg-7
+doc/wpg/info/wpg-8
+doc/wpg-src/
+doc/wpg-src/ctotexi.c
+doc/wpg-src/dir.top
+doc/wpg-src/dir.wpg
+doc/wpg-src/fixpg.sed
+doc/wpg-src/fixpg.sh
+doc/wpg-src/info/
+doc/wpg-src/info/README.info
+doc/wpg-src/Makefile
+doc/wpg-src/Makefile.top
+doc/wpg-src/Makefile.tpl
+doc/wpg-src/makeinfo.sh
+doc/wpg-src/README
+doc/wpg-src/wpg.cover
+doc/wpg-src/wpg.hlp
+doc/wpg-src/wpg.ht0
+doc/wpg-src/wpg.tex
+doc/wug/
+doc/wug-src/
+doc/wug-src/fancybox.perl
+doc/wug-src/.latex2html-init
+doc/wug-src/Makefile
+doc/wug-src/Makefile.top
+doc/wug-src/Makefile.tpl
+doc/wug-src/README
+doc/wug-src/wave/
+doc/wug-src/wave/misc/
+doc/wug-src/wave/misc/example.xws
+doc/wug-src/wave/misc/html.sty
+doc/wug-src/wave/misc/wave.inf
+doc/wug-src/wave/png/
+doc/wug-src/wave/png/chart2.png
+doc/wug-src/wave/png/fulldisc.png
+doc/wug-src/wave/png/wave.png
+doc/wug-src/wave/ppm/
+doc/wug-src/wave/ppm/allow-edit.ppm.gz
+doc/wug-src/wave/ppm/analysis-commands.ppm.gz
+doc/wug-src/wave/ppm/analyze-window.ppm.gz
+doc/wug-src/wave/ppm/annotation-template.ppm.gz
+doc/wug-src/wave/ppm/attach-to-signals.ppm.gz
+doc/wug-src/wave/ppm/calibrate.ppm.gz
+doc/wug-src/wave/ppm/file-analyze.ppm.gz
+doc/wug-src/wave/ppm/file-load.ppm.gz
+doc/wug-src/wave/ppm/file-print.ppm.gz
+doc/wug-src/wave/ppm/file-save.ppm.gz
+doc/wug-src/wave/ppm/find-window.ppm.gz
+doc/wug-src/wave/ppm/help-intro.ppm.gz
+doc/wug-src/wave/ppm/help-topics.ppm.gz
+doc/wug-src/wave/ppm/level-window.ppm.gz
+doc/wug-src/wave/ppm/load-window.ppm.gz
+doc/wug-src/wave/ppm/log-window.ppm.gz
+doc/wug-src/wave/ppm/main-control-panel.ppm.gz
+doc/wug-src/wave/ppm/main-window.ppm.gz
+doc/wug-src/wave/ppm/main-with-hr.ppm.gz
+doc/wug-src/wave/ppm/main-with-markers.ppm.gz
+doc/wug-src/wave/ppm/netscape-new-helper.ppm.gz
+doc/wug-src/wave/ppm/noedit.ppm.gz
+doc/wug-src/wave/ppm/nomatch.ppm.gz
+doc/wug-src/wave/ppm/notice-quit.ppm.gz
+doc/wug-src/wave/ppm/print-setup-window.ppm.gz
+doc/wug-src/wave/ppm/scope-controls.ppm.gz
+doc/wug-src/wave/ppm/scope-window.ppm.gz
+doc/wug-src/wave/ppm/search-template.ppm.gz
+doc/wug-src/wave/ppm/spot-help.ppm.gz
+doc/wug-src/wave/ppm/stdev.ppm.gz
+doc/wug-src/wave/ppm/system-menu.ppm.gz
+doc/wug-src/wave/ppm/title-with-parens.ppm.gz
+doc/wug-src/wave/ppm/type-menu.ppm.gz
+doc/wug-src/wave/ppm/view-window.ppm.gz
+doc/wug-src/wave/ppm/wave-icon.ppm.gz
+doc/wug-src/wave/ppm/wave-menu.ppm.gz
+doc/wug-src/wave/ps/
+doc/wug-src/wave/ps/chart1.ps
+doc/wug-src/wave/ps/chart2.ps
+doc/wug-src/wave/ps/fulldisc.ps
+doc/wug-src/wave/scripts/
+doc/wug-src/wave/scripts/dossify-html
+doc/wug-src/wave/scripts/fixinfo
+doc/wug-src/wave/scripts/fixlinks
+doc/wug-src/wave/scripts/savewin
+doc/wug-src/wave/scripts/wave2d
+doc/wug-src/wave/scripts/wugfigures
+doc/wug-src/wug.cover
+doc/wug-src/wugcover.ps
+doc/wug-src/wug.tex
 examples/
 examples/dblibver.c
 examples/example10.c
@@ -498,7 +533,7 @@
 wave/xview-patches
 wave/xvwave.c
 wave/xvwave.h
-wfdb-10.2.4-1.spec
+wfdb.spec
 wview/
 wview/clean
 wview/ecg.ico
diff -Naur wfdb-10.2.4/Makefile wfdb-10.2.5/Makefile
--- wfdb-10.2.4/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/Makefile	Sun Mar 10 12:42:43 2002
@@ -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:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -52,7 +52,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
@@ -175,7 +175,7 @@
 	echo "Nothing to be done for lib-post-uninstall"
 # _____________________________________________________________________________
 # file: Makefile.tpl		G. Moody	  24 May 2000
-#				Last revised:  18 December 2001
+#				Last revised:  15 January 2002
 # This section of the Makefile should not need to be changed.
 
 # ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux').
@@ -306,6 +306,8 @@
 
 rpms:		tarballs
 	cp -p ../$(PACKAGE).tar.gz $(RPMROOT)/SOURCES
+	sed s/VERSION/$(VERSION)/ <wfdb.spec | \
+	 sed s/RPMRELEASE/$(RPMRELEASE)/ >$(PACKAGE)-$(RPMRELEASE).spec
 	cp -p $(PACKAGE)-$(RPMRELEASE).spec $(RPMROOT)/SPECS
 	rpm -ba $(PACKAGE)-$(RPMRELEASE).spec
 	mv $(RPMROOT)/RPMS/*/$(PACKAGE)-$(RPMRELEASE).*.rpm ..
diff -Naur wfdb-10.2.4/Makefile.tpl wfdb-10.2.5/Makefile.tpl
--- wfdb-10.2.4/Makefile.tpl	Tue Dec 18 10:18:23 2001
+++ wfdb-10.2.5/Makefile.tpl	Tue Jan 15 16:07:45 2002
@@ -1,5 +1,5 @@
 # file: Makefile.tpl		G. Moody	  24 May 2000
-#				Last revised:  18 December 2001
+#				Last revised:  15 January 2002
 # This section of the Makefile should not need to be changed.
 
 # ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux').
@@ -130,6 +130,8 @@
 
 rpms:		tarballs
 	cp -p ../$(PACKAGE).tar.gz $(RPMROOT)/SOURCES
+	sed s/VERSION/$(VERSION)/ <wfdb.spec | \
+	 sed s/RPMRELEASE/$(RPMRELEASE)/ >$(PACKAGE)-$(RPMRELEASE).spec
 	cp -p $(PACKAGE)-$(RPMRELEASE).spec $(RPMROOT)/SPECS
 	rpm -ba $(PACKAGE)-$(RPMRELEASE).spec
 	mv $(RPMROOT)/RPMS/*/$(PACKAGE)-$(RPMRELEASE).*.rpm ..
diff -Naur wfdb-10.2.4/NEWS wfdb-10.2.5/NEWS
--- wfdb-10.2.4/NEWS	Mon Dec 17 12:06:55 2001
+++ wfdb-10.2.5/NEWS	Sun Mar 10 11:04:38 2002
@@ -1,3 +1,15 @@
+10.2.5:
+	New output format options in 'ann2rr' and 'ihr'.
+
+	FreeBSD support in 'configure', new conf/freebsd* (thanks to
+	Giuseppe Pagnoni).
+
+	Added support for annotation maps from wfdb/ecgmap.h to the Fortran
+	wrappers (fortran/wfdbf.c) and fixed two typos there.
+
+	Removed unneeded references to wfdb/wfdb.h from waverc/wave-remote.c
+	and waverc/wavescript.c (thanks again to Giuseppe Pagnoni).
+
 10.2.4:
 	Bug fixes in 'pschart' and 'psfd' (vbuf was not properly initialized
 	before its first use).
diff -Naur wfdb-10.2.4/app/Makefile wfdb-10.2.5/app/Makefile
--- wfdb-10.2.4/app/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/app/Makefile	Sun Mar 10 12:42:43 2002
@@ -33,12 +33,12 @@
 # type `make listing'.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -46,7 +46,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/app/ann2rr.c wfdb-10.2.5/app/ann2rr.c
--- wfdb-10.2.4/app/ann2rr.c	Mon Feb 19 12:45:51 2001
+++ wfdb-10.2.5/app/ann2rr.c	Tue Jan 15 12:46:19 2002
@@ -1,8 +1,8 @@
 /* file: ann2rr.c		G. Moody	 16 May 1995
-				Last revised:  19 February 2001
+				Last revised:  15 January 2002
 -------------------------------------------------------------------------------
 ann2rr: Calculate RR intervals from an annotation file
-Copyright (C) 2000 George B. Moody
+Copyright (C) 2002 George B. Moody
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -44,7 +44,7 @@
 {
     char *record = NULL, *prog_name();
     double sps, spm, sph, rrsec;
-    int cflag=0, i, j, pflag=0, previous_annot_valid=0, vflag=0, xflag=0;
+    int cflag=0, i, j, pflag=0, previous_annot_valid=0, tformat=0, vflag=0;
     long beat_number = 0L, from = 0L, to = 0L, rr, tp = 0L, atol();
     static char flag[ACMAX+1];
     static WFDB_Anninfo ai;
@@ -114,15 +114,14 @@
 	    }
 	    to = i;
 	    break;
-	  case 'v':	/* verbose mode: include time as well as RR */
-	    vflag = 1;
-	    break;
-	  case 'x':	/* use alternate time format */
+	  case 'v':	/* output times of beginnings of intervals */
+	  case 'V':	/* output times of ends of intervals */
+	    vflag = (*(argv[i]+1) == 'v') ? 1 : -1;
 	    switch (*(argv[i]+2)) {
-	      case 'h': xflag = 3; break;
-	      case 'm': xflag = 2; break;
-	      case 's':
-	      default:  xflag = 1; break;
+	      case 'h': tformat = 3; break;	/* use hours */
+	      case 'm': tformat = 2; break;	/* use minutes */
+	      case 's': tformat = 1; break;	/* use seconds */
+	      default:  tformat = 0; break;	/* use sample intervals */
 	    }
 	    break;
 	  default:
@@ -177,16 +176,17 @@
 	    if (cflag == 0 || previous_annot_valid == 1) {
 		rr = annot.time - tp;
 		if (vflag) {	/* print elapsed time */
-		  switch (xflag) {
+		    long tt = (vflag > 0) ? tp : annot.time;
+		  switch (tformat) {
 		    default:
-		    case 0: (void)printf("%ld\t", annot.time); break;
-		    case 1: (void)printf("%.3lf\t", annot.time/sps); break;
-		    case 2: (void)printf("%.3lf\t", annot.time/spm); break;
-		    case 3: (void)printf("%.3lf\t", annot.time/sph); break;
+		    case 0: (void)printf("%ld\t", tt); break;
+		    case 1: (void)printf("%.3lf\t", tt/sps); break;
+		    case 2: (void)printf("%.5lf\t", tt/spm); break;
+		    case 3: (void)printf("%.7lf\t", tt/sph); break;
 		  }
 		}	
 		/* print RR interval */
-		if (xflag) (void)printf("%.3lf\n", rr/sps);
+		if (tformat) (void)printf("%.3lf\n", rr/sps);
 		else (void)printf("%ld\n", rr);
 	    }
 	    tp = annot.time;
@@ -223,17 +223,22 @@
 static char *help_strings[] = {
  "usage: %s -r RECORD -a ANNOTATOR [OPTIONS ...]\n",
  "where RECORD and ANNOTATOR specify the input, and OPTIONS may include:",
- " -c       print intervals between consecutive valid annotations only",
- " -f TIME  start at specified TIME",
- " -h       print this usage summary",
- " -p TYPE [TYPE ...]  print intervals between annotations of specified TYPEs",
- "                      only",
- " -t TIME  stop at specified TIME",
- " -v       print elapsed times as well as RR intervals",
- " -x       use alternate format (times and RR intervals in seconds)",
- " -xh      use alternate format (times in hours, RR intervals in seconds)",
- " -xm      use alternate format (times in minutes, RR intervals in seconds)",
- " -xs      same as -x",
+ " -c      print intervals between consecutive valid annotations only",
+ " -f TIME start at specified TIME",
+ " -h      print this usage summary",
+ " -p TYPE [TYPE ...]  print intervals ending with annotations of specified",
+ "                      TYPEs only (use mnemonics such as N or V for TYPE)",
+ " -t TIME stop at specified TIME",
+ "The output contains the RR intervals (in units of sample intervals) only,",
+ "unless one of the additional options below is used:",
+ " -v      print times of beginnings of intervals before each interval",
+ " -vh     same as -v, but print times in hours and RR intervals in seconds",
+ " -vm     same as -v, but print times in minutes and RR intervals in seconds",
+ " -vs     same as -v, but print times and RR intervals in seconds",
+ " -V      print times of ends of intervals before each interval",
+ " -Vh     same as -V, but print times in hours and RR intervals in seconds",
+ " -Vm     same as -V, but print times in minutes and RR intervals in seconds",
+ " -Vs     same as -V, but print times and RR intervals in seconds",
 NULL
 };
 
diff -Naur wfdb-10.2.4/app/ihr.c wfdb-10.2.5/app/ihr.c
--- wfdb-10.2.4/app/ihr.c	Thu Nov 29 12:33:14 2001
+++ wfdb-10.2.5/app/ihr.c	Tue Jan 15 15:12:24 2002
@@ -1,9 +1,9 @@
 /* file ihr.c		G. Moody      12 November 1992
-			Last revised: 27 November 2001
+			Last revised: 15 January 2002
 
 -------------------------------------------------------------------------------
 ihr: Generate instantaneous heart rate data from annotation file
-Copyright (C) 2001 George B. Moody
+Copyright (C) 2002 George B. Moody
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -44,14 +44,17 @@
 char *argv[];
 {
     char *record = NULL, *prog_name();
-    double ihr, ihrlast, mhr = 70., sps, tol = 10.0, atof(), fabs();
-    int i, j, lastann = NOTQRS, lastint = 1, xflag = 0;
+    double ihr, ihrlast, mhr = 70.0, sph, spm, sps, tol = 10.0, atof(), fabs();
+    int i, j, lastann = NOTQRS, last2ann = NOTQRS, tformat = 1, vflag = 1,
+	xflag = 0, lastint = 1, thisint = 0;
     long from = 0L, to = 0L, lasttime = -9999L;
+    static char flag[ACMAX+1];
     static WFDB_Anninfo ai;
     WFDB_Annotation annot;
     void help();
 
     pname = prog_name(argv[0]);
+    flag[0] = 1;
 
     /* Interpret command-line options. */
     for (i = 1; i < argc; i++) {
@@ -84,6 +87,29 @@
 	    help();
 	    exit(0);
 	    break;
+	  case 'i':	/* include intervals bounded by any QRS annotations */
+	    for (j = 0; j <= ACMAX; j++)
+		flag[j] = isqrs(j);
+	    break;
+	  case 'p':	/* include intervals bounded by specific annotations
+			   only; annotation mnemonic(s) follow */
+	    if (++i >= argc || !isann(j = strann(argv[i]))) {
+		(void)fprintf(stderr,
+			      "%s: annotation mnemonic(s) must follow -p\n",
+			      pname);
+		exit(1);
+	    }
+	    flag[j] = 1;
+	    /* The code above not only checks that there is a mnemonic where
+	       there should be one, but also allows for the possibility that
+	       there might be a (user-defined) mnemonic beginning with `-'.
+	       The following lines pick up any other mnemonics, but assume
+	       that arguments beginning with `-' are options, not mnemonics. */
+	    while (++i < argc && argv[i][0] != '-')
+		if (isann(j = strann(argv[i]))) flag[j] = 1;
+	    if (i == argc || argv[i][0] == '-') i--;
+	    flag[0] = 0;
+	    break;
 	  case 'r':	/* input record name follows */
 	    if (++i >= argc) {
 		(void)fprintf(stderr,
@@ -100,7 +126,19 @@
 	    }
 	    to = i;
 	    break;
-	  case 'x':	/* exclude intervals adjacent to abnormal beats */
+	  case 'V':	/* output times of ends of intervals */
+	      vflag = -1;
+	      /* no 'break': fall through case 'v' */
+	  case 'v':	/* output times of beginnings of intervals */
+	    switch (*(argv[i]+2)) {
+	      case 'h': tformat = 3; break;	/* use hours */
+	      case 'm': tformat = 2; break;	/* use minutes */
+	      case 's': tformat = 1; break;	/* use seconds */
+	      default:  tformat = 0; break;	/* use sample intervals */
+	    }
+	    break;
+	  case 'x':	/* exclude intervals following those adjacent to
+			   excluded beats */
 	    xflag = 1;
 	    break;
 	  default:
@@ -121,6 +159,8 @@
 
     if ((sps = sampfreq(record)) < 0.)
 	(void)setsampfreq(sps = WFDB_DEFFREQ);
+    spm = 60.0*sps;
+    sph = 60.0*spm;
 
     ai.stat = WFDB_READ;
     if (annopen(record, &ai, 1) < 0) /* open annotation file */
@@ -129,32 +169,37 @@
     if (from && iannsettime(strtim(argv[(int)from])) < 0) exit(2);
     if (to) to = strtim(argv[(int)to]);
 
+    if (flag[0])    /* neither -i nor -p used -- include only normal beats */
+	for (j = 0; j <= ACMAX; j++)
+	    flag[j] = (map1(j) == NORMAL);
+
     while (getann(0, &annot) == 0 && (to == 0L || annot.time <= to)) {
-	if (!isqrs(annot.anntyp)) continue;
-	if (map1(annot.anntyp) == NORMAL) {
+	if (flag[annot.anntyp]) {
 	    ihr = sps*60./(annot.time - lasttime);
 	    mhr += (ihr - mhr)/10.;
-	    if (lastann == NORMAL &&
-		fabs(ihr - ihrlast) < tol &&
-		fabs(ihr - mhr) < tol) {
-		if (xflag) {
-		    if (lastint == 0)
-			(void)printf("%g %g\n", lasttime/sps, ihr);
+	    if (flag[lastann] && fabs(ihr-ihrlast)<tol && fabs(ihr-mhr)<tol) {
+		if (flag[last2ann] || !xflag) {
+		    long tt = (vflag > 0) ? lasttime : annot.time;
+		    switch (tformat) {
+		      case 0: (void)printf("%ld\t", tt); break;
+		      default:
+		      case 1: (void)printf("%.3lf\t", tt/sps); break;
+		      case 2: (void)printf("%.5lf\t", tt/spm); break;
+		      case 3: (void)printf("%.7lf\t", tt/sph); break;
+		    }
+		    if (xflag) (void)printf("%g\n", ihr);
+		    else (void)printf("%g\t%d\n", ihr, lastint);
+		    thisint = 0;
 		}
-		else
-		    (void)printf("%g %g %d\n", lasttime/sps, ihr, lastint);
-		lastint = 0;
-	    }
-	    else
-		lastint = 1;
-	    lastann = NORMAL;
-	    lasttime = annot.time;
+	    }
 	    ihrlast = ihr;
 	}
-	else {
-	    lastint = 1;
-	    lastann = NOTQRS;
-	}
+	else if (!isqrs(annot.anntyp)) continue;
+	last2ann = lastann;
+	lastann = annot.anntyp;
+	lasttime = annot.time;
+	lastint = thisint;
+	thisint = 1;
     }
     exit(0);			/*NOTREACHED*/
 }
@@ -180,13 +225,31 @@
 }
 
 static char *help_strings[] = {
-    "usage: %s -r RECORD -a ANNOTATOR [OPTIONS ...]\n",
-    "where RECORD and ANNOTATOR specify the input, and OPTIONS may include:",
-    " -d TOL   reject beat-to-beat HR changes > TOL bpm (default: TOL = 10)",
-    " -f TIME  start at specified TIME",
-    " -h       print this usage summary",
-    " -t TIME  stop at specified TIME",
-    " -x       exclude intervals adjacent to abnormal beats",
+ "usage: %s -r RECORD -a ANNOTATOR [OPTIONS ...]\n",
+ "where RECORD and ANNOTATOR specify the input, and OPTIONS may include:",
+ " -d TOL   reject beat-to-beat HR changes > TOL bpm (default: TOL = 10)",
+ " -f TIME  start at specified TIME",
+ " -h       print this usage summary",
+ " -i       include intervals bounded by any QRS annotations",
+ " -p TYPE [ TYPE ... ]  include intervals bounded by annotations of listed",
+ "                        TYPEs only",
+ " -t TIME  stop at specified TIME",
+ " -x       exclude intervals adjacent to abnormal beats",
+ "Each line of output contains data derived from a single interbeat interval:",
+ "  * Elapsed time (in seconds) from the beginning of the record to the",
+ "    beginning of the interval (may be modified by -v or -V options below)",
+ "  * Instantaneous heart rate (in beats per minute)",
+ "  * Interval type (1 if the interval was bounded by normal beats, otherwise
+      0 (this column does not appear in the output if the -x option is used)",
+ "Use one of the following options to modify the format of the first column:",
+ " -v       print times of beginnings of intervals as sample numbers",
+ " -vh      same as -v, but print times in hours",
+ " -vm      same as -v, but print times in minutes",
+ " -vs      same as -v, but print times in seconds [default]",
+ " -V       print times of ends of intervals as sample numbers",
+ " -Vh      same as -V, but print times in hours",
+ " -Vm      same as -V, but print times in minutes",
+ " -Vs      same as -V, but print times in seconds",
     NULL
 };
 
diff -Naur wfdb-10.2.4/checkpkg/Makefile wfdb-10.2.5/checkpkg/Makefile
--- wfdb-10.2.4/checkpkg/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/checkpkg/Makefile	Sun Mar 10 12:42:43 2002
@@ -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:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -44,7 +44,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/checkpkg/expected/ihr.out wfdb-10.2.5/checkpkg/expected/ihr.out
--- wfdb-10.2.4/checkpkg/expected/ihr.out	Sun Sep  9 23:14:21 2001
+++ wfdb-10.2.5/checkpkg/expected/ihr.out	Tue Jan 15 15:26:26 2002
@@ -1,69 +1,69 @@
-1.02778 73.9726 1
-1.83889 76.0563 0
-2.62778 75.7895 0
-3.41944 76.0563 0
-4.20833 73.4694 0
-7.51667 73.9726 1
-8.32778 76.0563 0
-9.11667 77.6978 0
-9.88889 71.5232 0
-10.7278 70.1299 0
-11.5833 72.973 0
-12.4056 72.4832 0
-13.2333 72.973 0
-14.0556 75.5245 0
-14.85 75.2613 0
-15.6472 75.7895 0
-16.4389 72.973 0
-17.2611 69.0096 0
-18.1306 72.973 0
-18.9528 76.3251 0
-19.7389 75.7895 0
-20.5306 77.4194 0
-21.3056 76.3251 0
-22.0917 73.9726 0
-22.9028 73.4694 0
-23.7194 72.4832 0
-24.5472 71.0526 0
-25.3917 74.4828 0
-26.1972 77.4194 0
-26.9722 75 0
-27.7722 76.0563 0
-28.5611 69.9029 0
-29.4194 71.2871 0
-30.2611 72.7273 0
-31.0861 74.7405 0
-31.8889 71.7608 0
-32.725 75.7895 0
-33.5167 76.0563 0
-34.3056 73.2203 0
-35.125 71.0526 0
-35.9694 68.1388 0
-36.85 72.973 0
-37.6722 77.1429 0
-38.45 74.7405 0
-39.2528 73.9726 0
-40.0639 75.2613 0
-40.8611 71.7608 0
-41.6972 72.2408 0
-42.5278 72.7273 0
-43.3528 73.9726 0
-44.1639 76.0563 0
-44.9528 76.8683 0
-45.7333 74.2268 0
-46.5417 71.2871 0
-47.3833 72 0
-48.2167 72.2408 0
-49.0472 74.4828 0
-49.8528 77.1429 0
-50.6306 75.2613 0
-51.4278 76.8683 0
-52.2083 75.7895 0
-53 70.1299 0
-53.8556 70.8197 0
-54.7028 72.973 0
-55.525 76.5957 0
-56.3083 76.3251 0
-57.0944 76.3251 0
-57.8806 73.4694 0
-58.6972 73.9726 0
+1.028	73.9726	1
+1.839	76.0563	0
+2.628	75.7895	0
+3.419	76.0563	0
+4.208	73.4694	0
+7.517	73.9726	1
+8.328	76.0563	0
+9.117	77.6978	0
+9.889	71.5232	0
+10.728	70.1299	0
+11.583	72.973	0
+12.406	72.4832	0
+13.233	72.973	0
+14.056	75.5245	0
+14.850	75.2613	0
+15.647	75.7895	0
+16.439	72.973	0
+17.261	69.0096	0
+18.131	72.973	0
+18.953	76.3251	0
+19.739	75.7895	0
+20.531	77.4194	0
+21.306	76.3251	0
+22.092	73.9726	0
+22.903	73.4694	0
+23.719	72.4832	0
+24.547	71.0526	0
+25.392	74.4828	0
+26.197	77.4194	0
+26.972	75	0
+27.772	76.0563	0
+28.561	69.9029	0
+29.419	71.2871	0
+30.261	72.7273	0
+31.086	74.7405	0
+31.889	71.7608	0
+32.725	75.7895	0
+33.517	76.0563	0
+34.306	73.2203	0
+35.125	71.0526	0
+35.969	68.1388	0
+36.850	72.973	0
+37.672	77.1429	0
+38.450	74.7405	0
+39.253	73.9726	0
+40.064	75.2613	0
+40.861	71.7608	0
+41.697	72.2408	0
+42.528	72.7273	0
+43.353	73.9726	0
+44.164	76.0563	0
+44.953	76.8683	0
+45.733	74.2268	0
+46.542	71.2871	0
+47.383	72	0
+48.217	72.2408	0
+49.047	74.4828	0
+49.853	77.1429	0
+50.631	75.2613	0
+51.428	76.8683	0
+52.208	75.7895	0
+53.000	70.1299	0
+53.856	70.8197	0
+54.703	72.973	0
+55.525	76.5957	0
+56.308	76.3251	0
+57.094	76.3251	0
+57.881	73.4694	0
+58.697	73.9726	0
diff -Naur wfdb-10.2.4/conf/freebsd-slib.def wfdb-10.2.5/conf/freebsd-slib.def
--- wfdb-10.2.4/conf/freebsd-slib.def	Wed Dec 31 19:00:00 1969
+++ wfdb-10.2.5/conf/freebsd-slib.def	Tue Mar  5 17:00:13 2002
@@ -0,0 +1,109 @@
+# file: freebsd-slib.def	G. Moody	5 March 2002
+#
+# Based on 'linux-slib.def'.
+
+# This section contains settings suitable for generating an ELF-format shared
+# library under FreeBSD.
+
+# Choose a value for WFDBROOT to determine where the WFDB Software Package will
+# be installed.  One of the following is usually a reasonable choice.
+# Installing in /usr generally requires root permissions, but will be easiest
+# for future software development (no special -I or -L options will be needed
+# to compile software with the WFDB library, since the *.h files and the
+# library will be installed in the standard directories).
+WFDBROOT = /usr
+# Installing in /usr/local usually requires root permissions.  On a multi-user
+# system where it is desirable to keep the OS vendor's software separate from
+# other software, this is a good choice.  Another common choice in such cases
+# is /opt .
+# WFDBROOT = /usr/local
+# To install without root permissions, a good choice is to set WFDBROOT to the
+# name of your home directory, as in the example below (change as needed).
+# WFDBROOT = /home/frodo
+
+# If the W3C's libwww library of HTTP and FTP client code is available, and
+# you wish to compile a WFDB library with NETFILES support, set LWC
+# to 'libwww-config' (a utility supplied with libwww).  Otherwise set
+# LWC to ':' (a program that does nothing, successfully).
+LWC = libwww-config
+
+# INCDIR specifies the name of a directory in which to install the WFDB
+# library's #include <...> files.
+INCDIR = $(WFDBROOT)/include
+
+# LIBDIR specifies the name of a directory in which to install the WFDB
+# library.
+LIBDIR = $(WFDBROOT)/lib
+
+# CC is the name of your C compiler.
+CC = gcc
+
+# CCDEFS is the set of C compiler options needed to set preprocessor variables
+# while compiling the WFDB Software Package.  CCDEFS should always include
+# VDEFS.
+CCDEFS = $(VDEFS)
+
+# CFLAGS is the set of C compiler options used when compiling the shared
+# library.  CFLAGS should always include CCDEFS.
+CFLAGS = -fpic -g -O $(CCDEFS) `$(LWC) --cflags` -I$(INCDIR)
+
+# WFDBLIB_BASENAME is the name, without version numbers, of the alternate
+# library.  WFDBLIB_SONAME is the shared object name ("soname") of the
+# alternate library; normally, this includes the base name and the major
+# version number only. WFDBLIB is the complete name, including the minor
+# version number.  Symbolic links from WFDBLIB to WFDBLIB_BASENAME and
+# WFDBLIB_SONAME will be created as the final step in building the alternate
+# library.
+WFDBLIB_BASENAME = libwfdb.so
+WFDBLIB_SONAME = $(WFDBLIB_BASENAME).$(MAJOR)
+WFDBLIB = $(WFDBLIB_SONAME).$(MINOR)
+# For a shared library, the soname is significant for proper run-time binding.
+# If you change function interfaces in the library, change its soname by
+# incrementing the major version number;  when you do this, set the minor
+# version number to zero.  If you change the library without changing the
+# function interfaces, increment the minor version number; this allows existing
+# binaries to use the new version without recompilation, since the soname is
+# unchanged in this case.
+
+# BUILDLIB is the command that creates the shared WFDB library once its
+# components have been compiled separately;  the list of *.o files that
+# make up the library will be appended to BUILDLIB.
+BUILDLIB = gcc -shared -Wl,-soname,$(WFDBLIB_SONAME) `$(LWC) --libs` \
+ -o $(WFDBLIB)
+
+# LDCONFIG is the name of the program needed to refresh the system's cached
+# index of shared libraries.
+LDCONFIG = /sbin/ldconfig
+
+# PRINT is the name of the program used to produce listings (including any
+# options for the desired formatting).
+PRINT = lpr
+
+# SETPERMISSIONS is the command needed to make the installed files accessible
+# to those who will use them.  The value given below makes them readable by
+# everyone, and writeable by the owner only.  (If you perform the installation
+# as `root', `root' is the owner of the installed files.)
+SETPERMISSIONS = chmod 644
+
+# SETDPERMISSIONS is similarly used to make directories created during the
+# installation accessible.
+SETDPERMISSIONS = chmod 755
+
+# SETLPERMISSIONS is the command needed to make the WFDB library usable by
+# programs linked to it.
+SETLPERMISSIONS = chmod 755
+
+# `make' (with no target specified) will be equivalent to `make all'.
+make-all:	all
+
+# `make lib-post-install' should be run after installing the WFDB library.
+lib-post-install:
+	cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_BASENAME)
+	cd $(LIBDIR); ln -sf $(WFDBLIB) $(WFDBLIB_SONAME)
+	@$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful
+
+lib-post-uninstall:
+	rm -f $(LIBDIR)/$(WFDBLIB_BASENAME)
+	rm -f $(LIBDIR)/$(WFDBLIB_SONAME)
+	@$(LDCONFIG) || echo Warning: "$(LDCONFIG)" was unsuccessful
+#______________________________________________________________________________
diff -Naur wfdb-10.2.4/conf/freebsd.def wfdb-10.2.5/conf/freebsd.def
--- wfdb-10.2.4/conf/freebsd.def	Wed Dec 31 19:00:00 1969
+++ wfdb-10.2.5/conf/freebsd.def	Tue Mar  5 16:53:27 2002
@@ -0,0 +1,123 @@
+# file: freebsd.def		G. Moody	5 March 2002
+#
+# 'make' definitions for compiling the WFDB Software Package under FreeBSD
+#
+# Based on 'linux.def', with edits for FreeBSD thanks to Giuseppe Pagnoni.
+#
+# Choose a value for WFDBROOT to determine where the WFDB Software Package will
+# be installed.  One of the following is usually a reasonable choice.
+# Installing in /usr generally requires root permissions, but will be easiest
+# for future software development (no special -I or -L options will be needed
+# to compile software with the WFDB library, since the *.h files and the
+# library will be installed in the standard directories).
+WFDBROOT = /usr
+# Installing in /usr/local usually requires root permissions.  On a multi-user
+# system where it is desirable to keep the OS vendor's software separate from
+# other software, this is a good choice.  Another common choice in such cases
+# is /opt .
+# WFDBROOT = /usr/local
+# To install without root permissions, a good choice is to set WFDBROOT to the
+# name of your home directory, as in the example below (change as needed).
+# WFDBROOT = /home/frodo
+
+# If the W3C's libwww library of HTTP and FTP client code is available, and
+# you wish to compile a WFDB library with NETFILES support, set LWC to
+# 'libwww-config' (a utility supplied with libwww).  Otherwise set LWC to ':'
+# (a program that does nothing, successfully).
+LWC = libwww-config
+
+# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed
+# to link with libwww.  If libwww is not installed, or if libwfdb is a shared
+# library, LDLIBWWW can be empty (if there is a '#' immediately after the '='
+# below, the remainder of the line is ignored, so LDLIBWWW is empty in this
+# case).  Otherwise, it is generated from the output of LWC.  Note that up to
+# three passes through the option list are necessary to satisfy all
+# dependencies when linking to the static libwww libraries.
+LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs`
+
+# BINDIR specifies the directory in which the applications will be installed;
+# it should be a directory in the PATH of those who will use the applications.
+BINDIR = $(WFDBROOT)/bin
+
+# DBDIR specifies the name of a directory in which to install the contents
+# of the `data' directory.
+DBDIR = $(WFDBROOT)/database
+
+# INCDIR specifies the name of a directory in which to install the WFDB
+# library's #include <...> files.
+INCDIR = $(WFDBROOT)/include
+
+# INFODIR is the GNU info directory (optional, needed to `make info').
+INFODIR = /usr/local/info
+
+# LIBDIR specifies the name of a directory in which to install the WFDB
+# library.
+LIBDIR = $(WFDBROOT)/lib
+
+# PSPDIR specifies the name of a directory in which to install the PostScript
+# prolog (*.pro) files from the 'app' directory.
+PSPDIR = $(WFDBROOT)/lib/ps
+
+# CC is the name of your C compiler.
+CC = gcc
+
+# CCDEFS is the set of C compiler options needed to set preprocessor variables
+# while compiling the WFDB Software Package.  CCDEFS should always include
+# VDEFS.
+CCDEFS = $(VDEFS)
+
+# CFLAGS is the set of C compiler options.  CFLAGS should always include
+# CCDEFS.
+CFLAGS = -g -O $(CCDEFS) `$(LWC) --cflags` -I$(INCDIR)
+
+# LDFLAGS is appended to the C compiler command line to specify loading the
+# WFDB library.
+LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW)
+
+# WFDBLIB is the name of the standard WFDB library.  In order to access it via
+# `-lwfdb', WFDBLIB should be `libwfdb.a'.
+WFDBLIB = libwfdb.a
+
+# BUILDLIB is the command that creates the static WFDB library once its
+# components have been compiled separately;  the list of *.o files that
+# make up the library will be appended to BUILDLIB.
+BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB)
+
+# PRINT is the name of the program used to produce listings (including any
+# options for the desired formatting).
+PRINT = lpr
+
+# SETPERMISSIONS is the command needed to make the installed files accessible
+# to those who will use them.  The value given below makes them readable by
+# everyone, and writeable by the owner only.  (If you perform the installation
+# as `root', `root' is the owner of the installed files.)
+SETPERMISSIONS = chmod 644
+
+# SETDPERMISSIONS is similarly used to make directories created during the
+# installation accessible.
+SETDPERMISSIONS = chmod 755
+
+# SETLPERMISSIONS is the command needed to make the WFDB library usable by
+# programs linked to it.
+SETLPERMISSIONS = chmod 644
+
+# SETXPERMISSIONS is the command needed to make the applications accessible.
+SETXPERMISSIONS = chmod 755
+
+# STRIP is the command used to compact the compiled binaries by removing their
+# symbol tables.
+STRIP = strip
+# To retain the symbol tables for debugging, comment out the previous line, and
+# uncomment the next line.
+# STRIP = :
+
+# `make' (with no target specified) will be equivalent to `make all'.
+make-all:	all
+
+# `make lib-post-install' should be run after installing the WFDB library.
+lib-post-install:
+	ranlib $(LIBDIR)/$(WFDBLIB)
+
+lib-post-uninstall:
+	echo "Nothing to be done for lib-post-uninstall"
+# _____________________________________________________________________________
diff -Naur wfdb-10.2.4/conf/version.def wfdb-10.2.5/conf/version.def
--- wfdb-10.2.4/conf/version.def	Mon Dec 17 12:07:33 2001
+++ wfdb-10.2.5/conf/version.def	Tue Jan 15 15:42:39 2002
@@ -1,10 +1,10 @@
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
diff -Naur wfdb-10.2.4/configure wfdb-10.2.5/configure
--- wfdb-10.2.4/configure	Tue Dec 18 16:37:04 2001
+++ wfdb-10.2.5/configure	Thu Mar  7 12:24:08 2002
@@ -1,6 +1,6 @@
 #! /bin/sh
 # file: configure             G. Moody               24 May 2000
-#                             Last revised:        18 December 2001
+#                             Last revised:         5 March 2002
 # Configuration script for the WFDB Software Package
 
 # This script was not generated using 'autoconf'.  If you can implement
@@ -32,6 +32,9 @@
   Linux*) OS=Linux
     cat conf/linux.def >>conf/site.def
     cat conf/version.def conf/linux-slib.def >conf/site-slib.def ;;
+  FreeBSD*) OS=FreeBSD
+    cat conf/freebsd.def >>conf/site.def
+    cat conf/version.def conf/freebsd-slib.def >conf/site-slib.def ;;
   SunOS*) OS=Solaris
     cat conf/solaris.def >>conf/site.def
     cat conf/version.def conf/solaris-slib.def >conf/site-slib.def
@@ -216,16 +219,29 @@
 
 echo
 echo "Looking for the XView libraries ..."
-if [ -d /usr/openwin -o -d /usr/local/openwin -o -d /opt/openwin ]
+if [ -d /usr/openwin ]
 then
     WAVE=1;
-else
-  if ( which textedit 2>&1 | grep "no \|not " >/dev/null )
-  then
+elif [ -d /usr/local/openwin ]
+then
+    WAVE=1;
+    sed "s+/usr/openwin+/usr/local/openwin+" <wave/Makefile >tmp.$$
+    mv tmp.$$ wave/Makefile
+elif [ -d /opt/openwin ]
+then
+    WAVE=1;
+    sed "s+/usr/openwin+/opt/openwin+" <wave/Makefile >tmp.$$
+    mv tmp.$$ wave/Makefile
+elif ( which textedit 2>&1 | grep "no \|not " >/dev/null )
+then
     WAVE=0;
-  else
+else
     WAVE=1;
-  fi
+    TEXTEDIT=`which textedit`;
+    TEDIR=`dirname $TEXTEDIT`;
+    OWHOME=`dirname $TEDIR`;
+    sed "s+/usr/openwin+$OWHOME+" <wave/Makefile >tmp.$$
+    mv tmp.$$ wave/Makefile
 fi
 if [ $WAVE = 0 ]
 then
diff -Naur wfdb-10.2.4/convert/Makefile wfdb-10.2.5/convert/Makefile
--- wfdb-10.2.4/convert/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/convert/Makefile	Sun Mar 10 12:42:43 2002
@@ -33,12 +33,12 @@
 # type `make listing'.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -46,7 +46,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/data/Makefile wfdb-10.2.5/data/Makefile
--- wfdb-10.2.4/data/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/data/Makefile	Sun Mar 10 12:42:43 2002
@@ -33,12 +33,12 @@
 # listing'.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -46,7 +46,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/doc/Makefile wfdb-10.2.5/doc/Makefile
--- wfdb-10.2.4/doc/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/doc/Makefile	Sun Mar 10 12:42:43 2002
@@ -131,12 +131,12 @@
 #    `make ug'.  To print the WFDB Programmer's Guide, type `make pg'.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -144,7 +144,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/doc/README wfdb-10.2.5/doc/README
--- wfdb-10.2.4/doc/README	Thu Dec 20 12:48:40 2001
+++ wfdb-10.2.5/doc/README	Sun Mar 10 17:07:18 2002
@@ -1,5 +1,5 @@
 file: README		G. Moody	7 September 1989
-			Last revised:	20 December 2001
+			Last revised:	  10 March 2002
 
 This directory and its subdirectories contain documentation for the WFDB
 Software Package, including UNIX man pages in troff source format for the WFDB
@@ -29,7 +29,7 @@
   Windows help	'make wpg.hlp' (requires makertf and hcrtf)
   HTML		'make wpg.html'(requires texi2html and perl)
   info		'make wpg.info'(requires makeinfo or GNU emacs)
-  PDF		'make wpg.pdf' (requires texi2dvi)
+  PDF		'make wpg.pdf' (requires texi2dvi) *
   PostScript	'make wpg.ps'  (requires texi2dvi and dvips)
 
 WAVE User's Guide
@@ -41,6 +41,10 @@
 All of these, with the exception of printed copies, can be downloaded from
 PhysioNet (look in http://www.physionet.org/physiotools/manuals.shtml).
 
+* Some recent versions of pdflatex (invoked by texi2dvi) do not handle cross-
+  references properly.  If you encounter errors while attempting to make
+  wpg.pdf, try replacing pdflatex's copy of texinfo.tex with a version dated
+  June 2001 or later.  This problem occurs under Red Hat Linux 7.2.
 
 The following files will be found in this directory:
 
diff -Naur wfdb-10.2.4/doc/wag-src/Makefile wfdb-10.2.5/doc/wag-src/Makefile
--- wfdb-10.2.4/doc/wag-src/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/doc/wag-src/Makefile	Sun Mar 10 12:42:43 2002
@@ -59,12 +59,12 @@
 # PostScript	'make wag.ps'  (requires troff, tbl, latex, and dvips)
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -72,7 +72,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/doc/wag-src/ann2rr.1 wfdb-10.2.5/doc/wag-src/ann2rr.1
--- wfdb-10.2.4/doc/wag-src/ann2rr.1	Tue Oct 16 21:14:14 2001
+++ wfdb-10.2.5/doc/wag-src/ann2rr.1	Tue Jan 15 15:20:44 2002
@@ -1,4 +1,4 @@
-.TH ANN2RR 1 "19 February 2001" "WFDB software 10.2" "WFDB applications"
+.TH ANN2RR 1 "15 January 2002" "WFDB software 10.2.4" "WFDB applications"
 .SH NAME
 ann2rr, rr2ann \- convert annotation files to interval lists and vice versa
 .SH SYNOPSIS
@@ -39,22 +39,16 @@
 \fB-t\fI time\fR
 Stop at the specified \fItime\fR.
 .TP
-\fB-v\fR
-Print elapsed times as well as intervals.
-.TP
-\fB-x\fR
-.TP
-\fB-xs\fR
-Use an alternate time format for output (times and intervals in seconds
-rather than sample intervals).
-.TP
-\fB-xh\fR
-Use a different alternate format (times in hours, intervals in seconds).
-.TP
-\fB-xm\fR
-Use a different alternate format (times in minutes, intervals in seconds).
-
-
+\fB-v\fR, \fB-vs\fR, \fB-vm\fR, \fB-vh\fR, \fB-V\fR, \fB-Vs\fR, \fB-Vm\fR, \fB-Vh\fR
+Print the elapsed times from the beginning of the record to the annotations
+that begin each interval, as sample number (using \fB-v\fR), or in seconds
+(using \fB-vs\fR), minutes (using \fB-vm\fR), or hours (using \fB-vh\fR)
+before each heart rate value.  The options \fB-V\fR, \fB-Vs\fR, \fB-Vm\fR, and
+\fB-Vh\fR work in the same way, but the printed times are those for the
+annotations that end the intervals.  Only one of these options can be used at
+a time;  if none is chosen, only the RR intervals are printed, in units of
+sample intervals.  When using \fB-vs\fR, \fB-vm\fR, \fB-vh\fR, \fB-Vs\fR,
+\fB-Vm\fR, or \fB-Vh\fR, intervals are printed in units of seconds.
 .PP
 The \fB-c\fR option, used without the \fB-p\fR option, causes \fBann2rr\fR to
 filter out intervals between beats that have intervening non-beat annotations,
diff -Naur wfdb-10.2.4/doc/wag-src/ihr.1 wfdb-10.2.5/doc/wag-src/ihr.1
--- wfdb-10.2.4/doc/wag-src/ihr.1	Tue Oct 16 22:59:35 2001
+++ wfdb-10.2.5/doc/wag-src/ihr.1	Tue Jan 15 15:15:54 2002
@@ -1,4 +1,4 @@
-.TH IHR 1 "16 October 2001" "WFDB software 10.2" "WFDB applications"
+.TH IHR 1 "15 January 2002" "WFDB software 10.2.4" "WFDB applications"
 .SH NAME
 ihr \- calculate instantaneous heart rate
 .SH SYNOPSIS
@@ -31,15 +31,45 @@
 \fB-h\fR
 Print a usage summary.
 .TP
+\fB-i\fR
+Include all intervals bounded by QRS annotations (default: include intervals
+bounded by consecutive supraventricular beats only).
+.TP
+\fB-p\fI type\fR [ \fItype\fR ... ]
+Include intervals bounded by annotations of the specified \fItypes\fR only.
+The \fItype\fR arguments
+should be annotation mnemonics (e.g., \fBN\fR) as normally printed by
+\fIrdann\fR in the third column.  More than one \fB-p\fR option may be used
+in a single command, and each \fB-p\fR option may have more than one \fItype\fR
+argument following it.  If \fItype\fR begins with ``-'', however, it must
+immediately follow \fB-p\fR (standard annotation mnemonics do not begin with
+``-'', but modification labels in an annotation file may define such
+mnemonics).
+.TP
 \fB-t\fI time\fR
 Process until the specified \fItime\fR in \fIrecord\fR (default: the end of the
 \fIrecord\fR).
 .TP
+\fB-v\fR
+Print the output sample number before each output sample value.
+.TP
+\fB-v\fR, \fB-vs\fR, \fB-vm\fR, \fB-vh\fR, \fB-V\fR, \fB-Vs\fR, \fB-Vm\fR, \fB-Vh\fR
+Print the elapsed times from the beginning of the record to the annotations
+that begin each interval, as sample number (using \fB-v\fR), or in seconds
+(using \fB-vs\fR), minutes (using \fB-vm\fR), or hours (using \fB-vh\fR)
+before each heart rate value.  The options \fB-V\fR, \fB-Vs\fR, \fB-Vm\fR, and
+\fB-Vh\fR work in the same way, but the printed times are those for the
+annotations that end the intervals.  Only one of these options can be used at
+a time;  if none is chosen, \fB-vs\fR mode is used by default.
+.TP
 \fB-x\fR
-Exclude all intervals adjacent to abnormal beats.  By default, such intervals
-are included (unless they are rejected by the \fItolerance\fR criterion), and
-a third column is used to flag these intervals as abnormal (a zero in the
-third column means the interval is normal, a one means it is abnormal).
+Exclude the interval immediately following each rejected interval.  (Rejected
+intervals are those bounded by excluded beats on at least one end, and those
+that do not satisfy the \fItolerance\fR criterion).  By default, intervals
+following rejected intervals are included (unless they are rejected by the
+\fItolerance\fR criterion), and a third column is used to flag these intervals
+(a zero in the third column means the interval is normal, a one means it
+follows an excluded interval).
 .PP
 Reference (`atr') annotation files can be used as input to \fIihr\fR,
 but files that contain manually-inserted annotations are less suitable,
diff -Naur wfdb-10.2.4/doc/wag-src/wag.cover wfdb-10.2.5/doc/wag-src/wag.cover
--- wfdb-10.2.4/doc/wag-src/wag.cover	Thu Dec 20 13:09:23 2001
+++ wfdb-10.2.5/doc/wag-src/wag.cover	Sun Mar 10 11:05:25 2002
@@ -45,7 +45,7 @@
 
 
 
-DECEMBER 2001
+MARCH 2002
 .bp
 
 
diff -Naur wfdb-10.2.4/doc/wag-src/wag.ht0 wfdb-10.2.5/doc/wag-src/wag.ht0
--- wfdb-10.2.4/doc/wag-src/wag.ht0	Thu Dec 20 14:44:13 2001
+++ wfdb-10.2.5/doc/wag-src/wag.ht0	Sun Mar 10 11:06:18 2002
@@ -11,15 +11,15 @@
 <B>Up:</B> <A HREF="../manuals.shtml">Books about PhysioToolkit</A>
 <H1 ALIGN=CENTER>WFDB Applications Guide</H1>
 <P ALIGN=CENTER><STRONG>Tenth Edition<BR>
-(Revised for release 10.2.4)<BR>
-20 December 2001<BR>
+(Revised for release 10.2.5)<BR>
+10 March 2002<BR>
 <BR> 
 <BR> 
 <BR> 
 George B. Moody<BR> 
 Harvard-MIT Division of Health Sciences and Technology</STRONG></P><P>
 <P>
-Copyright &#169;1980-2001 George B. Moody
+Copyright &#169;1980-2002 George B. Moody
 <P>
 The most recent versions of the programs described in this guide may be freely
 downloaded from <A HREF="http://www.physionet.org/">PhysioNet</A>.  For
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg wfdb-10.2.5/doc/wpg/info/wpg
--- wfdb-10.2.4/doc/wpg/info/wpg	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg	Sun Mar 10 11:37:36 2002
@@ -1,142 +1,142 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 Indirect:
-wpg-1: 61
-wpg-2: 49415
-wpg-3: 99299
-wpg-4: 148900
-wpg-5: 192385
-wpg-6: 229678
-wpg-7: 274362
-wpg-8: 298684
+wpg-1: 62
+wpg-2: 49549
+wpg-3: 99433
+wpg-4: 149034
+wpg-5: 192519
+wpg-6: 229812
+wpg-7: 274496
+wpg-8: 298818
 
 Tag Table:
 (Indirect)
-Node: Top61
-Node: Overview1834
-Node: Concepts 14202
-Node: Concepts 26189
-Node: Concepts 38168
-Node: Applications10120
-Node: Guide12011
-Node: Recent changes19383
-Node: Usage28070
-Node: print samples29111
-Node: compiling30681
-Node: other languages32592
-Node: WFDB path35718
-Node: running example38391
-Node: name restrictions39021
-Node: WFDB path syntax40058
-Node: exercises 146095
-Node: Functions48500
-Node: introduction to functions49415
-Node: selecting52242
-Node: annopen52671
-Node: isigopen55276
-Node: osigopen59838
-Node: osigfopen62052
-Node: wfdbinit63708
-Node: signal and annotation I/O64993
-Node: getvec65466
-Node: getframe67360
-Node: putvec68683
-Node: getann70708
-Node: ungetann72078
-Node: putann72774
-Node: non-sequential73808
-Node: isigsettime74310
-Node: isgsettime75043
-Node: iannsettime75551
-Node: conversion76745
-Node: annstr and strann77375
-Node: timstr and strtim82311
-Node: datstr and strdat87061
-Node: aduphys and physadu88101
-Node: calibration90687
-Node: calopen91351
-Node: getcal92247
-Node: putcal93446
-Node: newcal93808
-Node: flushcal94327
-Node: miscellaneous functions94673
-Node: newheader96433
-Node: setheader97735
-Node: setmsheader99299
-Node: wfdbquit100839
-Node: iannclose and oannclose102039
-Node: wfdbquiet and wfdbverbose102930
-Node: wfdberror103420
-Node: sampfreq104411
-Node: setsampfreq105339
-Node: setbasetime105875
-Node: setgvmode106698
-Node: getspf108180
-Node: counter conversion108733
-Node: setwfdb111336
-Node: getwfdb113848
-Node: wfdbfile114572
-Node: wfdbflush115698
-Node: getinfo115993
-Node: putinfo116870
-Node: setibsize117611
-Node: setobsize118613
-Node: wfdbgetskew119635
-Node: wfdbsetskew121200
-Node: wfdbgetstart121842
-Node: wfdbsetstart122944
-Node: Data Types123582
-Node: WFDB_Siginfo structures125578
-Node: WFDB_Calinfo structures131921
-Node: WFDB_Anninfo structures133966
-Node: WFDB_Annotation structures136722
-Node: Annotation Codes139606
-Node: Mapping macros144266
-Node: Database Files146213
-Node: Header Files148900
-Node: Signal Files149767
-Node: Annotation Files150586
-Node: Calibration Files150995
-Node: AHA Format Files151760
-Node: Standard I/O153229
-Node: Multiplexed Signal Files154473
-Node: Multi-Frequency Records155654
-Node: Multi-Segment Records158904
-Node: Multiple Record Access160857
-Node: Special Files162302
-Node: Piped and Local Records165206
-Node: NETFILES167057
-Node: Annotation Order169774
-Node: Examples173177
-Node: Example 1174277
-Node: Example 2178232
-Node: Example 3180473
-Node: Example 4182286
-Node: Example 5185167
-Node: Example 6189284
-Node: Example 7192385
-Node: Example 8199263
-Node: Example 9207527
-Node: Example 10214196
-Node: Exercises221555
-Node: Glossary229678
-Node: Installation250187
-Node: Distribution251080
-Node: Unix installation251631
-Node: MS-Windows installation254030
-Node: Other installation257328
-Node: WFDB Applications258488
-Node: Using259484
-Node: Annotation I/O261276
-Node: Evaluation262917
-Node: Signal processing269840
-Node: Graphics272832
-Node: Extensions274362
-Node: Sources283219
-Node: Answers294922
-Node: Concept Index298684
-Node: Function and Macro Index327060
-Node: Copying331742
+Node: Top62
+Node: Overview1833
+Node: Concepts 14201
+Node: Concepts 26188
+Node: Concepts 38167
+Node: Applications10119
+Node: Guide12010
+Node: Recent changes19382
+Node: Usage28204
+Node: print samples29245
+Node: compiling30815
+Node: other languages32726
+Node: WFDB path35852
+Node: running example38525
+Node: name restrictions39155
+Node: WFDB path syntax40192
+Node: exercises 146229
+Node: Functions48634
+Node: introduction to functions49549
+Node: selecting52376
+Node: annopen52805
+Node: isigopen55410
+Node: osigopen59972
+Node: osigfopen62186
+Node: wfdbinit63842
+Node: signal and annotation I/O65127
+Node: getvec65600
+Node: getframe67494
+Node: putvec68817
+Node: getann70842
+Node: ungetann72212
+Node: putann72908
+Node: non-sequential73942
+Node: isigsettime74444
+Node: isgsettime75177
+Node: iannsettime75685
+Node: conversion76879
+Node: annstr and strann77509
+Node: timstr and strtim82445
+Node: datstr and strdat87195
+Node: aduphys and physadu88235
+Node: calibration90821
+Node: calopen91485
+Node: getcal92381
+Node: putcal93580
+Node: newcal93942
+Node: flushcal94461
+Node: miscellaneous functions94807
+Node: newheader96567
+Node: setheader97869
+Node: setmsheader99433
+Node: wfdbquit100973
+Node: iannclose and oannclose102173
+Node: wfdbquiet and wfdbverbose103064
+Node: wfdberror103554
+Node: sampfreq104545
+Node: setsampfreq105473
+Node: setbasetime106009
+Node: setgvmode106832
+Node: getspf108314
+Node: counter conversion108867
+Node: setwfdb111470
+Node: getwfdb113982
+Node: wfdbfile114706
+Node: wfdbflush115832
+Node: getinfo116127
+Node: putinfo117004
+Node: setibsize117745
+Node: setobsize118747
+Node: wfdbgetskew119769
+Node: wfdbsetskew121334
+Node: wfdbgetstart121976
+Node: wfdbsetstart123078
+Node: Data Types123716
+Node: WFDB_Siginfo structures125712
+Node: WFDB_Calinfo structures132055
+Node: WFDB_Anninfo structures134100
+Node: WFDB_Annotation structures136856
+Node: Annotation Codes139740
+Node: Mapping macros144400
+Node: Database Files146347
+Node: Header Files149034
+Node: Signal Files149901
+Node: Annotation Files150720
+Node: Calibration Files151129
+Node: AHA Format Files151894
+Node: Standard I/O153363
+Node: Multiplexed Signal Files154607
+Node: Multi-Frequency Records155788
+Node: Multi-Segment Records159038
+Node: Multiple Record Access160991
+Node: Special Files162436
+Node: Piped and Local Records165340
+Node: NETFILES167191
+Node: Annotation Order169908
+Node: Examples173311
+Node: Example 1174411
+Node: Example 2178366
+Node: Example 3180607
+Node: Example 4182420
+Node: Example 5185301
+Node: Example 6189418
+Node: Example 7192519
+Node: Example 8199397
+Node: Example 9207661
+Node: Example 10214330
+Node: Exercises221689
+Node: Glossary229812
+Node: Installation250321
+Node: Distribution251214
+Node: Unix installation251765
+Node: MS-Windows installation254164
+Node: Other installation257462
+Node: WFDB Applications258622
+Node: Using259618
+Node: Annotation I/O261410
+Node: Evaluation263051
+Node: Signal processing269974
+Node: Graphics272966
+Node: Extensions274496
+Node: Sources283353
+Node: Answers295056
+Node: Concept Index298818
+Node: Function and Macro Index327194
+Node: Copying331876
 
 End Tag Table
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-1 wfdb-10.2.5/doc/wpg/info/wpg-1
--- wfdb-10.2.4/doc/wpg/info/wpg-1	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-1	Sun Mar 10 11:37:36 2002
@@ -1,12 +1,12 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
 
    This guide documents the Waveform Database interface library (the
 WFDB library).  This file contains the text of the Tenth Edition of the
-`WFDB Programmer's Guide' (December,2001), with revisions for release
-10.2.4 of the WFDB library.
+`WFDB Programmer's Guide' (March, 2002), with revisions for release
+10.2.5 of the WFDB library.
 
 * Menu:
 
@@ -385,6 +385,12 @@
 guide in June, 1999.  See `NEWS', in the top-level directory of the
 WFDB Software Package distribution, for information on any more recent
 changes that may not be described here.
+
+Changes in version 10.2.5
+-------------------------
+
+   Additions and fixes in `wfdbf.c' (the Fortran wrappers for the WFDB
+library).
 
 Changes in version 10.2.4
 -------------------------
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-2 wfdb-10.2.5/doc/wpg/info/wpg-2
--- wfdb-10.2.4/doc/wpg/info/wpg-2	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-2	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: introduction to functions,  Next: selecting,  Prev: Functions,  Up: Functions
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-3 wfdb-10.2.5/doc/wpg/info/wpg-3
--- wfdb-10.2.4/doc/wpg/info/wpg-3	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-3	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: setmsheader,  Next: wfdbquit,  Prev: setheader,  Up: miscellaneous functions
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-4 wfdb-10.2.5/doc/wpg/info/wpg-4
--- wfdb-10.2.4/doc/wpg/info/wpg-4	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-4	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: Header Files,  Next: Signal Files,  Prev: Database Files,  Up: Database Files
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-5 wfdb-10.2.5/doc/wpg/info/wpg-5
--- wfdb-10.2.4/doc/wpg/info/wpg-5	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-5	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: Example 7,  Next: Example 8,  Prev: Example 6,  Up: Examples
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-6 wfdb-10.2.5/doc/wpg/info/wpg-6
--- wfdb-10.2.4/doc/wpg/info/wpg-6	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-6	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: Glossary,  Next: Installation,  Prev: Exercises,  Up: Top
@@ -534,7 +534,7 @@
 
    This will create a directory with a name of the form `wfdb-'M.N.R,
 where M.N.R is the version number of the included WFDB library (e.g.,
-`10.2.4').  Enter this directory.
+`10.2.5').  Enter this directory.
 
    You should now be ready to configure, compile, and install the
 software, using the commands:
@@ -610,7 +610,7 @@
 
    This will create a directory with a name of the form `wfdb-'_m.n.r_,
 where _m.n.r_ is the version number of the included WFDB library (e.g.,
-`10.2.4').  Enter this directory.
+`10.2.5').  Enter this directory.
 
    You should now be ready to configure, compile, and install the
 software, using the commands:
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-7 wfdb-10.2.5/doc/wpg/info/wpg-7
--- wfdb-10.2.4/doc/wpg/info/wpg-7	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-7	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: Extensions,  Next: Sources,  Prev: WFDB Applications,  Up: Top
diff -Naur wfdb-10.2.4/doc/wpg/info/wpg-8 wfdb-10.2.5/doc/wpg/info/wpg-8
--- wfdb-10.2.4/doc/wpg/info/wpg-8	Thu Dec 20 17:50:33 2001
+++ wfdb-10.2.5/doc/wpg/info/wpg-8	Sun Mar 10 11:37:36 2002
@@ -1,4 +1,4 @@
-This is wpg, produced by makeinfo version 4.0 from wpg.tex.
+This is wpg, produced by makeinfo version 4.0b from wpg.tex.
 
 
 File: wpg,  Node: Concept Index,  Next: Function and Macro Index,  Prev: Answers,  Up: Top
@@ -605,11 +605,11 @@
    WFDB Programmer's Guide
 
    Tenth Edition (revised and with additions for WFDB library version
-10.2.4)
+10.2.5)
 
    George B. Moody
 
-   Copyright (C) 1989 - 2001 George B. Moody
+   Copyright (C) 1989 - 2002 George B. Moody
 
    Permission is granted to make and distribute verbatim copies of this
 guide provided that the copyright notice and this permission notice are
diff -Naur wfdb-10.2.4/doc/wpg-src/Makefile wfdb-10.2.5/doc/wpg-src/Makefile
--- wfdb-10.2.4/doc/wpg-src/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/doc/wpg-src/Makefile	Sun Mar 10 12:42:43 2002
@@ -65,12 +65,12 @@
 # wpg.info' again.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -78,7 +78,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/doc/wpg-src/wpg.cover wfdb-10.2.5/doc/wpg-src/wpg.cover
--- wfdb-10.2.4/doc/wpg-src/wpg.cover	Thu Dec 20 17:18:40 2001
+++ wfdb-10.2.5/doc/wpg-src/wpg.cover	Sun Mar 10 11:07:39 2002
@@ -45,7 +45,7 @@
 
 
 
-DECEMBER 2001
+MARCH 2002
 .bp
 
 
diff -Naur wfdb-10.2.4/doc/wpg-src/wpg.ht0 wfdb-10.2.5/doc/wpg-src/wpg.ht0
--- wfdb-10.2.4/doc/wpg-src/wpg.ht0	Thu Dec 20 18:04:14 2001
+++ wfdb-10.2.5/doc/wpg-src/wpg.ht0	Sun Mar 10 11:08:19 2002
@@ -11,15 +11,15 @@
 <B>Up:</B> <A HREF="../manuals.shtml">Books about PhysioToolkit</A>
 <H1 ALIGN=CENTER>WFDB Programmer's Guide</H1>
 <P ALIGN=CENTER><STRONG>Tenth Edition<BR>
-(Revised and with corrections for WFDB library version 10.2.4)<BR>
-20 December 2001<BR>
+(Revised and with corrections for WFDB library version 10.2.5)<BR>
+10 March 2002<BR>
 <BR> 
 <BR> 
 <BR> 
 George B. Moody<BR> 
 Harvard-MIT Division of Health Sciences and Technology<BR></STRONG></P><P>
 <P>
-Copyright &#169;1980-2001 George B. Moody.
+Copyright &#169;1980-2002 George B. Moody.
 <P>
 The most recent versions of the software described in this guide are freely
 downloadable from <A HREF="http://www.physionet.org/">PhysioNet</A>.  For
diff -Naur wfdb-10.2.4/doc/wpg-src/wpg.tex wfdb-10.2.5/doc/wpg-src/wpg.tex
--- wfdb-10.2.4/doc/wpg-src/wpg.tex	Thu Dec 20 14:57:13 2001
+++ wfdb-10.2.5/doc/wpg-src/wpg.tex	Sun Mar 10 12:41:02 2002
@@ -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.2.4)
+@center Tenth Edition (revised and with additions for WFDB library version 10.2.5)
 @center @today
 @sp 5
 @center George B. Moody
@@ -17,7 +17,7 @@
 @center Harvard-MIT Division of Health Sciences and Technology
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1989 -- 2001 George B. Moody
+Copyright @copyright{} 1989 -- 2002 George B. Moody
 @sp 2
 The most recent versions of the software described in this guide may be
 downloaded from @code{http://www.physionet.org/}.  For further
@@ -62,8 +62,8 @@
 @ifinfo
 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} (December,2001), with
-revisions for release 10.2.4 of the WFDB library.
+the @cite{WFDB Programmer's Guide} (March, 2002), with
+revisions for release 10.2.5 of the WFDB library.
 @end ifinfo
 
 @menu
@@ -481,6 +481,11 @@
 WFDB Software Package distribution, for information on any more recent
 changes that may not be described here.
 
+@unnumberedsubsec Changes in version 10.2.5
+
+Additions and fixes in @file{wfdbf.c} (the Fortran wrappers for the WFDB
+library).
+
 @unnumberedsubsec Changes in version 10.2.4
 
 Code in @file{wfdbio.c} that required the use of the string
@@ -7162,7 +7167,7 @@
 
 This will create a directory with a name of the form @code{wfdb-}@var{m.n.r},
 where @var{m.n.r} is the version number of the included WFDB library (e.g.,
-@code{10.2.4}).  Enter this directory.
+@code{10.2.5}).  Enter this directory.
 
 You should now be ready to configure, compile, and install the software, using
 the commands:
@@ -7243,7 +7248,7 @@
 
 This will create a directory with a name of the form @code{wfdb-}@emph{m.n.r},
 where @emph{m.n.r} is the version number of the included WFDB library (e.g.,
-@code{10.2.4}).  Enter this directory.
+@code{10.2.5}).  Enter this directory.
 
 You should now be ready to configure, compile, and install the software, using
 the commands:
@@ -8266,11 +8271,11 @@
 @ifinfo
 WFDB Programmer's Guide
 
-Tenth Edition (revised and with additions for WFDB library version 10.2.4)
+Tenth Edition (revised and with additions for WFDB library version 10.2.5)
 
 George B. Moody
 
-Copyright (C) 1989 -- 2001 George B. Moody
+Copyright (C) 1989 -- 2002 George B. Moody
 
 Permission is granted to make and distribute verbatim copies of this
 guide provided that the copyright notice and this permission notice are
diff -Naur wfdb-10.2.4/doc/wug-src/Makefile wfdb-10.2.5/doc/wug-src/Makefile
--- wfdb-10.2.4/doc/wug-src/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/doc/wug-src/Makefile	Sun Mar 10 12:42:43 2002
@@ -55,12 +55,12 @@
 # PostScript	'make wug.ps'   (requires latex and dvips)
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -68,7 +68,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/doc/wug-src/wug.cover wfdb-10.2.5/doc/wug-src/wug.cover
--- wfdb-10.2.4/doc/wug-src/wug.cover	Thu Dec 20 17:27:35 2001
+++ wfdb-10.2.5/doc/wug-src/wug.cover	Sun Mar 10 11:15:28 2002
@@ -45,7 +45,7 @@
 
 
 
-DECEMBER 2001
+MARCH 2002
 .bp
 
 
diff -Naur wfdb-10.2.4/doc/wug-src/wug.tex wfdb-10.2.5/doc/wug-src/wug.tex
--- wfdb-10.2.4/doc/wug-src/wug.tex	Thu Dec 20 17:37:46 2001
+++ wfdb-10.2.5/doc/wug-src/wug.tex	Sun Mar 10 11:31:47 2002
@@ -1,8 +1,12 @@
 \documentclass[twoside]{book}
 \usepackage{html}
-% Recent LaTeX distributions include html.sty (written for latex2html).  If
-% yours doesn't, copy html.sty from the 'wave' directory into this one before
-% attempting to process this file using LaTeX.
+% Recent LaTeX distributions include html.sty (written for latex2html).
+% If yours doesn't, get a copy from CTAN (http://www.ctan.org/), from
+% the current latex2html package (also available from CTAN), or from
+% the wave/misc sudirectory of the directory where you found this
+% file, and put the copy into this directory (or into the directory
+% that contains the other .sty files referenced below) before attempting
+% to process this file using LaTeX.
 \usepackage{epsfig}
 \usepackage{wrapfig}
 \usepackage{fancybox}
@@ -30,7 +34,7 @@
 \title{\WAVE{} User's Guide}
 \author{Fifth Edition\\
 (revised and with corrections for \WAVE{} version 6.5)\\
-20 December 2001\\
+10 March 2002\\
 \\
 \\
 \\
@@ -53,7 +57,7 @@
 \pagestyle{empty}
 \vspace*{\fill}
 \noindent
-Copyright \copyright 1992 -- 2001 George B. Moody
+Copyright \copyright 1992 -- 2002 George B. Moody
 
 \vspace{1 in}
 \noindent
diff -Naur wfdb-10.2.4/examples/Makefile wfdb-10.2.5/examples/Makefile
--- wfdb-10.2.4/examples/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/examples/Makefile	Sun Mar 10 12:42:43 2002
@@ -34,12 +34,12 @@
 # `make clean' to remove them.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -47,7 +47,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/fortran/wfdbf.c wfdb-10.2.5/fortran/wfdbf.c
--- wfdb-10.2.4/fortran/wfdbf.c	Mon Oct  8 23:58:43 2001
+++ wfdb-10.2.5/fortran/wfdbf.c	Wed Feb  6 14:06:52 2002
@@ -1,9 +1,9 @@
 /* file: wfdbf.c	G. Moody	23 August 1995
-			Last revised:  19 November 1999
+			Last revised:  6 February 2002
 
 _______________________________________________________________________________
 wfdbf: Fortran wrappers for the WFDB library functions
-Copyright (C) 1999 George B. Moody
+Copyright (C) 2002 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
@@ -43,13 +43,13 @@
 
 If you are using a UNIX Fortran compiler, or a Fortran-to-C translator, note
 that the trailing `_' in these function names should *not* appear in your
-Fortran program;  thus, for example, `annopen1_' should be invoked as
-`annopen1'.  UNIX Fortran compilers and translators append a `_' to the
+Fortran program;  thus, for example, `annopen_' should be invoked as
+`annopen'.  UNIX Fortran compilers and translators append a `_' to the
 names of all external symbols referenced in Fortran source files when
 generating object files.  Thus the linker can recognize that annopen1_
 (defined below) is the function required by a Fortran program that invokes
-`annopen1';  if the Fortran program were to invoke `annopen1_', the linker
-would search (unsuccessfully) for a function named `annopen1__'.
+`annopen';  if the Fortran program were to invoke `annopen_', the linker
+would search (unsuccessfully) for a function named `annopen__'.
 
 If you are using a Fortran compiler that does not follow this convention,
 you are on your own.
@@ -57,6 +57,7 @@
 
 #include <stdio.h>
 #include <wfdb/wfdb.h>
+#include <wfdb/ecgmap.h>
 #ifndef BSD
 # include <string.h>
 #else		/* for Berkeley UNIX only */
@@ -342,18 +343,24 @@
     return (putann((WFDB_Annotator)(*annotator), &oann));
 }
 
-long isigsetttime_(time)
+long isigsettime_(time)
 long *time;
 {
     return (isigsettime((WFDB_Time)(*time)));
 }
 
-long isgsetttime_(group, time)
+long isgsettime_(group, time)
 long *group, *time;
 {
     return (isgsettime((WFDB_Group)(*group), (WFDB_Time)(*time)));
 }
 
+long iannsettime_(time)
+long *time;
+{
+    return (iannsettime((WFDB_Time)(*time)));
+}
+
 long ecgstr_(code, string)
 long *code;
 char *string;
@@ -732,5 +739,78 @@
 long *dummy;
 {
     wfdbflush();
+    return (0L);
+}
+
+/* The functions below can be used in place of the macros defined in
+   <wfdb/ecgmap.h>. */
+
+long isann_(anntyp)
+long *anntyp;
+{   
+    return ((long)(isann(*anntyp)));
+}
+
+long isqrs_(anntyp)
+long *anntyp;
+{   
+    return ((long)(isqrs(*anntyp)));
+}
+
+long setisqrs_(anntyp, value)
+long *anntyp, *value;
+{   
+    setisqrs(*anntyp, *value);
+    return (0L);
+}
+
+long map1_(anntyp)
+long *anntyp;
+{   
+    return ((long)(map1(*anntyp)));
+}
+
+long setmap1_(anntyp, value)
+long *anntyp, *value;
+{   
+    setmap1(*anntyp, *value);
+    return (0L);
+}
+
+long map2_(anntyp)
+long *anntyp;
+{   
+    return ((long)(map1(*anntyp)));
+}
+
+long setmap2_(anntyp, value)
+long *anntyp, *value;
+{   
+    setmap1(*anntyp, *value);
+    return (0L);
+}
+
+long ammap_(anntyp)
+long *anntyp;
+{   
+    return ((long)(ammap(*anntyp)));
+}
+
+long mamap_(anntyp, subtyp)
+long *anntyp, *subtyp;
+{   
+    return ((long)(mamap(*anntyp, *subtyp)));
+}
+
+long annpos_(anntyp)
+long *anntyp;
+{   
+    return ((long)(annpos(*anntyp)));
+}
+
+long setannpos_(anntyp, value)
+long *anntyp, *value;
+{   
+    setannpos(*anntyp, *value);
     return (0L);
 }
diff -Naur wfdb-10.2.4/lib/Makefile wfdb-10.2.5/lib/Makefile
--- wfdb-10.2.4/lib/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/lib/Makefile	Sun Mar 10 12:42:43 2002
@@ -33,12 +33,12 @@
 # type `make slib'.
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
diff -Naur wfdb-10.2.4/lib/wfdb.h wfdb-10.2.5/lib/wfdb.h
--- wfdb-10.2.4/lib/wfdb.h	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/lib/wfdb.h	Sun Mar 10 12:42:43 2002
@@ -1,10 +1,10 @@
 /* file: wfdb.h		G. Moody	13 June 1983
-			Last revised:   17 December 2001	wfdblib 10.2.4
+			Last revised:   15 January 2002	wfdblib 10.2.5
 WFDB library type, constant, structure, and function interface definitions
 
 _______________________________________________________________________________
 wfdb: a library for reading and writing annotated waveforms (time series data)
-Copyright (C) 2001 George B. Moody
+Copyright (C) 2002 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   2
-#define WFDB_RELEASE 4
+#define WFDB_RELEASE 5
 #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.2.4/psd/Makefile wfdb-10.2.5/psd/Makefile
--- wfdb-10.2.4/psd/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/psd/Makefile	Sun Mar 10 12:42:43 2002
@@ -32,12 +32,12 @@
 # directory).
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -45,7 +45,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/wave/Makefile wfdb-10.2.5/wave/Makefile
--- wfdb-10.2.4/wave/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/wave/Makefile	Sun Mar 10 12:42:43 2002
@@ -45,12 +45,12 @@
 # just type `make' (from within this directory).
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -58,7 +58,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/wave/mainpan.c wfdb-10.2.5/wave/mainpan.c
--- wfdb-10.2.4/wave/mainpan.c	Fri Oct 12 14:24:37 2001
+++ wfdb-10.2.5/wave/mainpan.c	Sun Mar 10 09:38:58 2002
@@ -1,10 +1,10 @@
 /* file: mainpan.c	G. Moody	30 April 1990
-			Last revised:  12 October 2001
+			Last revised:	10 March 2002
 Functions for the main control panel of WAVE
 
 -------------------------------------------------------------------------------
 WAVE: Waveform analyzer, viewer, and editor
-Copyright (C) 2001 George B. Moody
+Copyright (C) 2002 George B. Moody
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -299,7 +299,7 @@
 	0);
 }
 
-static char filename[20], *title;
+static char filename[40], *title;
 
 static void show_print()
 {
@@ -440,9 +440,7 @@
 
 static void prop_wave()
 {
-    static char fname[40];
-
-    sprintf(fname, "%s/wave/wave.pro", helpdir);
+    sprintf(filename, "%s/wave/wave.pro", helpdir);
     title = "About WAVE";
     show_file();
 }
diff -Naur wfdb-10.2.4/wave/wave.prf wfdb-10.2.5/wave/wave.prf
--- wfdb-10.2.4/wave/wave.prf	Mon Dec 17 22:09:16 2001
+++ wfdb-10.2.5/wave/wave.prf	Sun Mar 10 09:40:07 2002
@@ -7,7 +7,7 @@
 
 -------------------------------------------------------------------------------
 WAVE: Waveform analyzer, viewer, and editor
-Copyright (C) 2000 George B. Moody
+Copyright (C) 2002 George B. Moody
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
diff -Naur wfdb-10.2.4/waverc/Makefile wfdb-10.2.5/waverc/Makefile
--- wfdb-10.2.4/waverc/Makefile	Thu Dec 20 18:33:15 2001
+++ wfdb-10.2.5/waverc/Makefile	Sun Mar 10 12:42:43 2002
@@ -25,12 +25,12 @@
 # please visit PhysioNet (http://www.physionet.org/).
 # _____________________________________________________________________________
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	7 December 2001
+#				Last revised:	15 January 2002
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 2
-RELEASE = 4
+RELEASE = 5
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # VDEFS is the set of C compiler options needed to set version number variables
@@ -38,7 +38,7 @@
 VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE)
 # _____________________________________________________________________________
 
-PACKAGE=wfdb-10.2.4
+PACKAGE=wfdb-10.2.5
 # file: linux.def		G. Moody	31 May 2000
 #				Last revised: 17 December 2001
 # 'make' definitions for compiling the WFDB Software Package under Linux
diff -Naur wfdb-10.2.4/waverc/wave-remote.c wfdb-10.2.5/waverc/wave-remote.c
--- wfdb-10.2.4/waverc/wave-remote.c	Sun Oct 14 20:49:01 2001
+++ wfdb-10.2.5/waverc/wave-remote.c	Sat Mar  9 13:21:17 2002
@@ -1,10 +1,10 @@
 /* file: wave-remote.c		G. Moody	10 October 1996
-				Last revised:	14 October 2001
+				Last revised:	 9 March 2002
 Remote control for WAVE
 
 -------------------------------------------------------------------------------
 WAVE: Waveform analyzer, viewer, and editor
-Copyright (C) 2001 George B. Moody
+Copyright (C) 2002 George B. Moody
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -77,7 +77,6 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <unistd.h>
-#include <wfdb/wfdb.h>
 
 char *pname;
 
diff -Naur wfdb-10.2.4/waverc/wavescript.c wfdb-10.2.5/waverc/wavescript.c
--- wfdb-10.2.4/waverc/wavescript.c	Sun Oct 14 21:52:27 2001
+++ wfdb-10.2.5/waverc/wavescript.c	Sat Mar  9 13:21:32 2002
@@ -1,10 +1,10 @@
 /* file: wavescript.c		G. Moody	10 October 1996
-				Last revised:	14 October 2001
+				Last revised:	 9 March 2002
 Remote control for WAVE via script
 
 -------------------------------------------------------------------------------
 WAVE: Waveform analyzer, viewer, and editor
-Copyright (C) 2001 George B. Moody
+Copyright (C) 2002 George B. Moody
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -86,7 +86,6 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <dirent.h>
-#include <wfdb/wfdb.h>
 
 char *pname;
 
diff -Naur wfdb-10.2.4/wfdb-10.2.4-1.spec wfdb-10.2.5/wfdb-10.2.4-1.spec
--- wfdb-10.2.4/wfdb-10.2.4-1.spec	Mon Dec 17 22:56:27 2001
+++ wfdb-10.2.5/wfdb-10.2.4-1.spec	Wed Dec 31 19:00:00 1969
@@ -1,181 +0,0 @@
-Summary: Waveform Database library and applications
-Name: wfdb
-Version: 10.2.4
-Release: 1
-Copyright: GPL
-Group: Applications/Engineering
-Source: http://www.physionet.org/physiotools/archives/wfdb-10.2.4.tar.gz
-URL: http://www.physionet.org/physiotools/wfdb.shtml
-Packager: George Moody <george@mit.edu>
-Requires: w3c-libwww >= 5.2
-Requires: w3c-libwww-devel >= 5.2
-Requires: xview >= 3.2
-Requires: xview-devel >= 3.2
-
-%description
-Applications for creating, reading, analyzing, and viewing digitized signals in
-a wide variety of formats, with optional annotations.  The WFDB library,
-included here, works together with the W3C's libwww to provide HTTP and FTP
-client support to applications that use it, such as those in this package.
-Although created for use with physiologic signals such as those available from
-PhysioBank (http://www.physionet.org/physiobank/), many of the programs in this
-package are general-purpose signal processing applications.
-
-%prep
-%setup
-PATH=$PATH:/usr/openwin/bin ./configure
-
-%build
-make
-
-%install
-make install
-
-%clean
-make clean
-
-%files
-%defattr(-,root,root)
-%doc checkpkg doc examples fortran lib/COPYING.LIB wave/anntab wave/wavemenu.def COPYING INSTALL MANIFEST NEWS README README.NETFILES
-
-/usr/bin/a2m
-/usr/bin/bxb
-/usr/bin/fft
-/usr/bin/fir
-/usr/bin/m2a
-/usr/bin/ihr
-/usr/bin/mxm
-/usr/bin/nst
-/usr/bin/rxr
-/usr/bin/ad2m
-/usr/bin/sumstats
-/usr/bin/epic
-/usr/bin/md2a
-/usr/bin/lomb
-/usr/bin/psfd
-/usr/bin/tach
-/usr/bin/snip
-/usr/bin/sqrs
-/usr/bin/wave
-/usr/bin/cshsetwfdb
-/usr/bin/wfdbdesc
-/usr/bin/sampfreq
-/usr/bin/hrfft
-/usr/bin/hrmem
-/usr/bin/log10
-/usr/bin/memse
-/usr/bin/mfilt
-/usr/bin/rdann
-/usr/bin/wrann
-/usr/bin/xform
-/usr/bin/ecgeval
-/usr/bin/edf2mit
-/usr/bin/wfdbcollate
-/usr/bin/wave-remote
-/usr/bin/setwfdb
-/usr/bin/coherence
-/usr/bin/sortann
-/usr/bin/wavescript
-/usr/bin/sqrs125
-/usr/bin/ann2rr
-/usr/bin/calsig
-/usr/bin/skewedit
-/usr/bin/hrlomb
-/usr/bin/hrplot
-/usr/bin/makeid
-/usr/bin/mrgann
-/usr/bin/plot2d
-/usr/bin/plot3d
-/usr/bin/pscgen
-/usr/bin/readid
-/usr/bin/rdsamp
-/usr/bin/revise
-/usr/bin/rr2ann
-/usr/bin/sigamp
-/usr/bin/sumann
-/usr/bin/wrsamp
-/usr/bin/url_view
-/usr/bin/wfdbwhich
-/usr/bin/wfdbcat
-/usr/bin/plotstm
-/usr/bin/pschart
-/usr/lib/ps/pschart.pro
-/usr/lib/ps/12lead.pro
-/usr/lib/ps/psfd.pro
-/usr/lib/X11/app-defaults/Wave
-/usr/lib/wavemenu.def
-/usr/lib/libwfdb.so.10.2
-/usr/help/wave/intro.hlp
-/usr/help/wave/editing.hlp
-/usr/help/wave/resource.hlp
-/usr/help/wave/faq.hlp
-/usr/help/wave/log.hlp
-/usr/help/wave/wave.info
-/usr/help/wave/buttons.hlp
-/usr/help/wave/printing.hlp
-/usr/help/wave/wave.hlp
-/usr/help/wave/wave.pro
-/usr/help/wave/demo.txt
-/usr/help/wave/news.hlp
-/usr/help/wave/analysis.hlp
-/usr/database/8.hea
-/usr/database/ahaxlist
-/usr/database/dbcal
-/usr/database/100s.atr
-/usr/database/100s.dat
-/usr/database/100s.hea
-/usr/database/esclist
-/usr/database/mitlist
-/usr/database/dblist
-/usr/database/culist
-/usr/database/multi.hea
-/usr/database/ahalist
-/usr/database/mitxlist
-/usr/database/nstlist
-/usr/database/16.hea
-/usr/database/wfdbcal
-/usr/database/8l.hea
-/usr/database/null.hea
-/usr/database/16l.hea
-/usr/database/pipe/16x1.hea
-/usr/database/pipe/16x2.hea
-/usr/database/pipe/16x3.hea
-/usr/database/pipe/16x4.hea
-/usr/database/pipe/16x5.hea
-/usr/database/pipe/16x6.hea
-/usr/database/pipe/16x7.hea
-/usr/database/pipe/16x8.hea
-/usr/database/pipe/16x9.hea
-/usr/database/pipe/16x10.hea
-/usr/database/pipe/16x11.hea
-/usr/database/pipe/16x12.hea
-/usr/database/pipe/16x13.hea
-/usr/database/pipe/16x14.hea
-/usr/database/pipe/16x15.hea
-/usr/database/pipe/16x16.hea
-/usr/database/pipe/8x1.hea
-/usr/database/pipe/8x2.hea
-/usr/database/pipe/8x3.hea
-/usr/database/pipe/8x4.hea
-/usr/database/pipe/8x5.hea
-/usr/database/pipe/8x6.hea
-/usr/database/pipe/8x7.hea
-/usr/database/pipe/8x8.hea
-/usr/database/pipe/8x9.hea
-/usr/database/pipe/8x10.hea
-/usr/database/pipe/8x11.hea
-/usr/database/pipe/8x12.hea
-/usr/database/pipe/8x13.hea
-/usr/database/pipe/8x14.hea
-/usr/database/pipe/8x15.hea
-/usr/database/pipe/8x16.hea
-/usr/database/tape/512.hea
-/usr/database/tape/1024.hea
-/usr/database/tape/4096.hea
-/usr/database/tape/6144d.hea
-/usr/database/tape/10240.hea
-/usr/database/tape/ahatape.hea
-/usr/database/tape/mittape.hea
-/usr/include/wfdb/ecgcodes.h
-/usr/include/wfdb/wfdb.h
-/usr/include/wfdb/ecgmap.h
diff -Naur wfdb-10.2.4/wfdb.spec wfdb-10.2.5/wfdb.spec
--- wfdb-10.2.4/wfdb.spec	Wed Dec 31 19:00:00 1969
+++ wfdb-10.2.5/wfdb.spec	Tue Jan 15 15:39:19 2002
@@ -0,0 +1,181 @@
+Summary: Waveform Database library and applications
+Name: wfdb
+Version: VERSION
+Release: RPMRELEASE
+Copyright: GPL
+Group: Applications/Engineering
+Source: http://www.physionet.org/physiotools/archives/wfdb-VERSION.tar.gz
+URL: http://www.physionet.org/physiotools/wfdb.shtml
+Packager: George Moody <george@mit.edu>
+Requires: w3c-libwww >= 5.2
+Requires: w3c-libwww-devel >= 5.2
+Requires: xview >= 3.2
+Requires: xview-devel >= 3.2
+
+%description
+Applications for creating, reading, analyzing, and viewing digitized signals in
+a wide variety of formats, with optional annotations.  The WFDB library,
+included here, works together with the W3C's libwww to provide HTTP and FTP
+client support to applications that use it, such as those in this package.
+Although created for use with physiologic signals such as those available from
+PhysioBank (http://www.physionet.org/physiobank/), many of the programs in this
+package are general-purpose signal processing applications.
+
+%prep
+%setup
+PATH=$PATH:/usr/openwin/bin ./configure
+
+%build
+make
+
+%install
+make install
+
+%clean
+make clean
+
+%files
+%defattr(-,root,root)
+%doc checkpkg doc examples fortran lib/COPYING.LIB wave/anntab wave/wavemenu.def COPYING INSTALL MANIFEST NEWS README README.NETFILES
+
+/usr/bin/a2m
+/usr/bin/bxb
+/usr/bin/fft
+/usr/bin/fir
+/usr/bin/m2a
+/usr/bin/ihr
+/usr/bin/mxm
+/usr/bin/nst
+/usr/bin/rxr
+/usr/bin/ad2m
+/usr/bin/sumstats
+/usr/bin/epic
+/usr/bin/md2a
+/usr/bin/lomb
+/usr/bin/psfd
+/usr/bin/tach
+/usr/bin/snip
+/usr/bin/sqrs
+/usr/bin/wave
+/usr/bin/cshsetwfdb
+/usr/bin/wfdbdesc
+/usr/bin/sampfreq
+/usr/bin/hrfft
+/usr/bin/hrmem
+/usr/bin/log10
+/usr/bin/memse
+/usr/bin/mfilt
+/usr/bin/rdann
+/usr/bin/wrann
+/usr/bin/xform
+/usr/bin/ecgeval
+/usr/bin/edf2mit
+/usr/bin/wfdbcollate
+/usr/bin/wave-remote
+/usr/bin/setwfdb
+/usr/bin/coherence
+/usr/bin/sortann
+/usr/bin/wavescript
+/usr/bin/sqrs125
+/usr/bin/ann2rr
+/usr/bin/calsig
+/usr/bin/skewedit
+/usr/bin/hrlomb
+/usr/bin/hrplot
+/usr/bin/makeid
+/usr/bin/mrgann
+/usr/bin/plot2d
+/usr/bin/plot3d
+/usr/bin/pscgen
+/usr/bin/readid
+/usr/bin/rdsamp
+/usr/bin/revise
+/usr/bin/rr2ann
+/usr/bin/sigamp
+/usr/bin/sumann
+/usr/bin/wrsamp
+/usr/bin/url_view
+/usr/bin/wfdbwhich
+/usr/bin/wfdbcat
+/usr/bin/plotstm
+/usr/bin/pschart
+/usr/lib/ps/pschart.pro
+/usr/lib/ps/12lead.pro
+/usr/lib/ps/psfd.pro
+/usr/lib/X11/app-defaults/Wave
+/usr/lib/wavemenu.def
+/usr/lib/libwfdb.so.10.2
+/usr/help/wave/intro.hlp
+/usr/help/wave/editing.hlp
+/usr/help/wave/resource.hlp
+/usr/help/wave/faq.hlp
+/usr/help/wave/log.hlp
+/usr/help/wave/wave.info
+/usr/help/wave/buttons.hlp
+/usr/help/wave/printing.hlp
+/usr/help/wave/wave.hlp
+/usr/help/wave/wave.pro
+/usr/help/wave/demo.txt
+/usr/help/wave/news.hlp
+/usr/help/wave/analysis.hlp
+/usr/database/8.hea
+/usr/database/ahaxlist
+/usr/database/dbcal
+/usr/database/100s.atr
+/usr/database/100s.dat
+/usr/database/100s.hea
+/usr/database/esclist
+/usr/database/mitlist
+/usr/database/dblist
+/usr/database/culist
+/usr/database/multi.hea
+/usr/database/ahalist
+/usr/database/mitxlist
+/usr/database/nstlist
+/usr/database/16.hea
+/usr/database/wfdbcal
+/usr/database/8l.hea
+/usr/database/null.hea
+/usr/database/16l.hea
+/usr/database/pipe/16x1.hea
+/usr/database/pipe/16x2.hea
+/usr/database/pipe/16x3.hea
+/usr/database/pipe/16x4.hea
+/usr/database/pipe/16x5.hea
+/usr/database/pipe/16x6.hea
+/usr/database/pipe/16x7.hea
+/usr/database/pipe/16x8.hea
+/usr/database/pipe/16x9.hea
+/usr/database/pipe/16x10.hea
+/usr/database/pipe/16x11.hea
+/usr/database/pipe/16x12.hea
+/usr/database/pipe/16x13.hea
+/usr/database/pipe/16x14.hea
+/usr/database/pipe/16x15.hea
+/usr/database/pipe/16x16.hea
+/usr/database/pipe/8x1.hea
+/usr/database/pipe/8x2.hea
+/usr/database/pipe/8x3.hea
+/usr/database/pipe/8x4.hea
+/usr/database/pipe/8x5.hea
+/usr/database/pipe/8x6.hea
+/usr/database/pipe/8x7.hea
+/usr/database/pipe/8x8.hea
+/usr/database/pipe/8x9.hea
+/usr/database/pipe/8x10.hea
+/usr/database/pipe/8x11.hea
+/usr/database/pipe/8x12.hea
+/usr/database/pipe/8x13.hea
+/usr/database/pipe/8x14.hea
+/usr/database/pipe/8x15.hea
+/usr/database/pipe/8x16.hea
+/usr/database/tape/512.hea
+/usr/database/tape/1024.hea
+/usr/database/tape/4096.hea
+/usr/database/tape/6144d.hea
+/usr/database/tape/10240.hea
+/usr/database/tape/ahatape.hea
+/usr/database/tape/mittape.hea
+/usr/include/wfdb/ecgcodes.h
+/usr/include/wfdb/wfdb.h
+/usr/include/wfdb/ecgmap.h
