diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/app/wfdbdesc.c wfdb-10.4.1/app/wfdbdesc.c
--- wfdb-10.4.0/app/wfdbdesc.c	2005-08-11 15:47:25.000000000 -0400
+++ wfdb-10.4.1/app/wfdbdesc.c	2006-03-31 13:17:56.000000000 -0500
@@ -1,9 +1,9 @@
 /* file: wfdbdesc.c		G. Moody	  June 1989
-				Last revised:  11 August 2005
+				Last revised:   31 March 2006
 
 -------------------------------------------------------------------------------
 wfdbdesc: Describe signal specifications
-Copyright (C) 2003 George B. Moody
+Copyright (C) 1989-2006 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
@@ -101,6 +101,7 @@
 	  case 80:
 	    t = nbytes / framesize;
 	    break;
+	  default:
 	  case 16:
 	  case 61:
 	  case 160:
@@ -110,6 +111,7 @@
 	    t = (2L * nbytes) / (3*framesize);
 	    break;
 	  case 310:
+	  case 311:
 	    t = (3L * nbytes) / (4*framesize);
 	    break;
 	}
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/conf/freebsd.def wfdb-10.4.1/conf/freebsd.def
--- wfdb-10.4.0/conf/freebsd.def	2005-08-07 10:52:31.000000000 -0400
+++ wfdb-10.4.1/conf/freebsd.def	2006-03-22 10:05:59.000000000 -0500
@@ -1,5 +1,5 @@
 # file: freebsd.def		G. Moody	5 March 2002
-#				Last revised:  7 August 2005
+#				Last revised:  22 March 2006
 # 'make' definitions for compiling the WFDB Software Package under FreeBSD
 #
 # Based on 'linux.def', with edits for FreeBSD thanks to Giuseppe Pagnoni.
@@ -65,8 +65,20 @@
 
 # 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)
+# VDEFS.  Add the following options to CCDEFS as appropriate (separating them
+# by spaces if you use more than one):
+#   -DISPRINTF	  if you do not have `stdlib.h' and your `sprintf' returns an
+#		   int (see wfdblib.h)
+#   -DNETFILES	  if you have libwww and want to be able to access WFDB files
+#		   remotely via http or ftp (as well as local files)
+#   -DNOSTRTOK	  if your standard C library does not include function `strtok'
+#		   (see wfdbio.c)
+#   -DNOTIME	  if you do not have `time.h' (see signal.c)
+#   -DNOVALUES_H  if you do not have `values.h' (see psd/log10.c)
+#   -DOLDC	  if you have neither `stdarg.h' nor `varargs.h' (see wfdbio.c)
+# If your C compiler fails to compile `signal.c', add -DBROKEN_CC to CCDEFS
+# and try again (see signal.c).
+CCDEFS = $(VDEFS) -DNOVALUES_H
 
 # MFLAGS is the set of architecture-dependent (-m*) compiler options, which
 # is usually empty.  See the gcc manual for information about gcc's -m options.
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/conf/version.def wfdb-10.4.1/conf/version.def
--- wfdb-10.4.0/conf/version.def	2006-02-23 15:44:05.000000000 -0500
+++ wfdb-10.4.1/conf/version.def	2006-04-06 21:30:42.000000000 -0400
@@ -1,10 +1,10 @@
 # file: version.def		G. Moody	24 May 2000
-#				Last revised:	23 February 2006
+#				Last revised:	6 April 2006
 # Each release of the WFDB Software Package is identified by a three-part
 # version number, defined here:
 MAJOR = 10
 MINOR = 4
-RELEASE = 0
+RELEASE = 1
 VERSION = $(MAJOR).$(MINOR).$(RELEASE)
 
 # RPMRELEASE can be incremented if changes are made between official
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/convert/ad2m.c wfdb-10.4.1/convert/ad2m.c
--- wfdb-10.4.0/convert/ad2m.c	2002-07-24 23:19:11.000000000 -0400
+++ wfdb-10.4.1/convert/ad2m.c	2006-03-28 13:44:37.000000000 -0500
@@ -1,9 +1,9 @@
 /* file: ad2m.c		G. Moody	26 August 1983
-			Last revised:    24 July 2002
+			Last revised:   28 March 2006
 
 -------------------------------------------------------------------------------
 ad2m: Convert an AHA format signal file to MIT format
-Copyright (C) 2002 George B. Moody
+Copyright (C) 1983-2006 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
@@ -179,7 +179,7 @@
 
     else {		/* process compressed-format input file */
 	while (t < start_time && getcvec(v) == 2)
-	    ;
+	    ++t;
 	while (getcvec(v) == 2 && putvec(v) > 0 && ++t < nsamp)
 	    ;	/* continue to hard EOF, hard error, or specified time */
 
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/doc/wpg-src/wpg0.tex wfdb-10.4.1/doc/wpg-src/wpg0.tex
--- wfdb-10.4.0/doc/wpg-src/wpg0.tex	2006-03-02 14:04:59.000000000 -0500
+++ wfdb-10.4.1/doc/wpg-src/wpg0.tex	2006-04-06 14:26:43.000000000 -0400
@@ -1307,7 +1307,7 @@
 @example
 import wfdb.*;
 
-public class rdsamp @{
+public class psamples @{
     static @{
         System.loadLibrary("wfdbjava");
     @}
@@ -1320,9 +1320,7 @@
         for (int i = 0; i < 10; i++) @{
             if (wfdb.getvec(v.cast()) < 0)
                 break;
-            System.out.print("\t" + v.getitem(0));
-            System.out.print("\t" + v.getitem(1));
-            System.out.println();
+            System.out.println("\t" + v.getitem(0) + "\t" + v.getitem(1));
         @}
     @}
 @}
@@ -1357,10 +1355,8 @@
     if wfdb.isigopen("100s", siarray.cast(), 2) < 2: sys.exit(1)
     v = wfdb.WFDB_SampleArray(2)
     for i in range(0,10):
-        if wfdb.getvec(v.cast()) > 0: sys.exit(2)
-        print v[0],
-        print v[1],
-        print
+        if wfdb.getvec(v.cast()) < 0: sys.exit(2)
+        print "\t%d\t%d" % (v[0], v[1])
 
 if __name__ == "__main__":
     main(sys.argv[1:])
@@ -1382,9 +1378,7 @@
         for (int i = 0; i < 10; i++) @{
             if (wfdb.getvec(v.cast()) < 0)
                 break;
-            Console.Write(v.getitem(0));
-            Console.Write(v.getitem(1));
-            Console.WriteLine();
+	    Console.WriteLine("\t" + v.getitem(0) + "\t" + v.getitem(1));
         @}
     @}
 @}
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/lib/signal.c wfdb-10.4.1/lib/signal.c
--- wfdb-10.4.0/lib/signal.c	2006-02-25 15:24:56.000000000 -0500
+++ wfdb-10.4.1/lib/signal.c	2006-04-06 21:29:06.000000000 -0400
@@ -1,5 +1,5 @@
 /* file: signal.c	G. Moody	13 April 1989
-			Last revised:  25 February 2006		wfdblib 10.4.0
+			Last revised:    6 April 2006		wfdblib 10.4.1
 WFDB library functions for signals
 
 _______________________________________________________________________________
@@ -2950,7 +2950,9 @@
       case 'e':	return ((in_msrec ? msnsamples : nsamples) * 
 		        ((gvmode == WFDB_HIGHRES) ? ispfmax : 1));
       case 'f': return ((WFDB_Time)(atol(string+1)*f/ffreq));
-      case 'i':	return (istime * ((gvmode == WFDB_HIGHRES) ? ispfmax : 1));
+      case 'i':	return (istime *
+			(ifreq > 0.0 ? (ifreq/sfreq) : 1.0) *
+			((gvmode == WFDB_HIGHRES) ? ispfmax : 1));
       case 'o':	return (ostime);
       case 's':	return ((WFDB_Time)atol(string+1));
       case '[':	  /* time of day, possibly with date or days since start */
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/lib/wfdb.h0 wfdb-10.4.1/lib/wfdb.h0
--- wfdb-10.4.0/lib/wfdb.h0	2006-02-25 15:15:53.000000000 -0500
+++ wfdb-10.4.1/lib/wfdb.h0	2006-04-06 21:30:17.000000000 -0400
@@ -1,5 +1,5 @@
 /* file: wfdb.h		G. Moody	13 June 1983
-			Last revised: 25 February 2006	wfdblib 10.4.0
+			Last revised:   6 April 2006	wfdblib 10.4.1
 WFDB library type, constant, structure, and function interface definitions
 
 _______________________________________________________________________________
@@ -33,7 +33,7 @@
 /* WFDB library version. */
 #define WFDB_MAJOR   10
 #define WFDB_MINOR   4
-#define WFDB_RELEASE 0
+#define WFDB_RELEASE 1
 #define WFDB_NETFILES 1	/* if 1, library includes code for HTTP, FTP clients */
 #define WFDB_NETFILES_LIBCURL 1
 
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/NEWS wfdb-10.4.1/NEWS
--- wfdb-10.4.0/NEWS	2006-03-02 18:02:42.000000000 -0500
+++ wfdb-10.4.1/NEWS	2006-04-06 21:34:12.000000000 -0400
@@ -1,3 +1,14 @@
+10.4.1: 
+	A bug caused incorrect output from WFDB library function strtim()
+	when called with the argument "i", following use of setifreq() to
+	change the effective sampling frequency, resulting in incorrect output
+	from example 10 in the WFDB Programmer's Guide.  This has now been
+	corrected.
+
+	Matt Osborn reported a bug in convert/ad2m that prevented proper use
+	of the -f option when processing a compressed signal file.  This has
+	now been corrected.
+
 10.4.0:
 	Version 10.4.0 and later versions of the WFDB library are intended to
 	be compiled using ANSI/ISO C (and C++) compilers only;  previous
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/psd/log10.c wfdb-10.4.1/psd/log10.c
--- wfdb-10.4.0/psd/log10.c	2005-06-09 08:28:15.000000000 -0400
+++ wfdb-10.4.1/psd/log10.c	2006-03-22 11:07:41.000000000 -0500
@@ -1,9 +1,9 @@
 /* file: log10.c	G. Moody	19 July 1995
-		   Last revised:	 9 June 2005
+		   Last revised:	22 March 2006
 
 -------------------------------------------------------------------------------
 log10: common log transform of 2-column data
-Copyright (C) 1995-2005 George B. Moody
+Copyright (C) 1995-2006 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
@@ -28,9 +28,18 @@
 #include <stdio.h>
 #include <math.h>
 
+#ifndef MINDOUBLE
+#ifdef BSD
+#include <float.h>
+#define MINDOUBLE DBL_MIN
+#define NOVALUES_H
+#endif
+
 #ifndef NOVALUES_H
 #include <values.h>
 #endif
+#endif
+
 #ifndef MINDOUBLE
 #define MINDOUBLE 1.0e-10
 #endif
diff -Naur --exclude Makefile --exclude info wfdb-10.4.0/psd/memse.c wfdb-10.4.1/psd/memse.c
--- wfdb-10.4.0/psd/memse.c	2006-02-26 22:44:45.000000000 -0500
+++ wfdb-10.4.1/psd/memse.c	2006-03-13 16:23:01.000000000 -0500
@@ -1,5 +1,5 @@
 /* file: memse.c	G. Moody	6 February 1992
-			Last revised:  26 February 2006
+			Last revised:	 13 March 2006
 
 -------------------------------------------------------------------------------
 memse: Estimate power spectrum using maximum entropy (all poles) method
@@ -606,7 +606,7 @@
     return (npts);
 }
 
-/* Function 'integ' was contributed by Peter J. Domitrovich, who translated it
+/* Function 'integ' was contributed by Peter P. Domitrovich, who translated it
    from a FORTRAN version by an unknown author from a book written in Chinese.
    This code is designed to integrate functions with sharp peaks. */
 double integ(double *aa, long m, double ee, double a, double b, double epsilon)
