diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/doc/wpg-src/wpg0.tex wfdb-10.5.16/doc/wpg-src/wpg0.tex
--- wfdb-10.5.15/doc/wpg-src/wpg0.tex	2012-09-25 11:27:48.000000000 -0400
+++ wfdb-10.5.16/doc/wpg-src/wpg0.tex	2012-09-27 10:17:51.000000000 -0400
@@ -438,12 +438,14 @@
 Following the W3C's decision to end development of @code{libwww}, Benjamin
 Moody reimplemented NETFILES using @code{libcurl}, and also implemented
 variable-layout records.  Bug reports (and in some cases fixes) have been
-contributed by Omar Abdala, Winton Baker, Ion Gaztañaga, Fred Geheb, Mathias
-Gruber, Guido Muesch, Joonas Paalasmaa, Tony Ricke, Dave Schaffer, Dan Scott,
-Allavatam Venugopal, Mauro Villarroel, Andrew Walsh, Piotr Wlodarek, and Yinqi
-Zhang.  Thanks also to the many readers of earlier versions of this guide; if
-this edition answers your questions, it is because someone else has already
-asked them, and hounded the author until he produced comprehensible answers.
+contributed by Omar Abdala, Winton Baker, David Brooks, Bob Farrell, Virginia
+Faro-Maza, Ion Gazta@~naga, Fred Geheb, Mathias Gruber, Thomas Heldt, Isaac
+Henry, Justin Leo Chang Loong, Benjamin Moody, Guido Muesch, Joonas Paalasmaa,
+Tony Ricke, Dave Schaffer, Dan Scott, Allavatam Venugopal, Mauro Villarroel,
+Andrew Walsh, Piotr Wlodarek, and Yinqi Zhang.  Thanks also to the many readers
+of earlier versions of this guide; if this edition answers your questions, it
+is because someone else has already asked them, and hounded the author until he
+produced comprehensible answers.
 
 Before May, 1999, and the release of version 10.0.0 of the library, the
 WFDB library was known as the DB library, and this guide was the @cite{ECG
@@ -9049,9 +9051,16 @@
 
 @unnumberedsec WFDB 10.5
 
+@unnumberedsubsec Changes in version 10.5.16 (27 September 2012)
+
+A bug in WFDB library versions 10.5.11 through 10.5.15 resulted in an attempt
+to close an already-closed header file after invoking @code{putinfo()}.  Thanks
+to Benjamin Moody for identifying the bug and contributing code to correct it
+(in @file{lib/signal.c} and @file{lib/wfdbinit.c}).
+
 @unnumberedsubsec Changes in version 10.5.15 (25 September 2012)
 
-Changes to the internal function readheader() in WFDB library version
+Changes to the internal function @code{readheader()} in WFDB library version
 10.5.14 made the library unable to open EDF files.  This bug has been
 fixed.
 
@@ -9059,12 +9068,12 @@
 
 WFDB applications can now read shared and private PhysioNetWorks projects
 securely, just as they have been able to read PhysioBank data since version
-10.0.1 (November 1999).  Low-level functions wfdb_open (in lib/wfdbio.c) and
-readheader (in lib/signal.c) incorporate changes to implement this new
-capability, as well as another new feature that allows record names to be
-specified using absolute pathnames or URLs.  As always, a final '.hea' is not
-considered to be part of a record name, but it may be included or omitted as
-desired.
+10.0.1 (November 1999).  Low-level functions @code{wfdb_open()} (in
+@file{lib/wfdbio.c}) and @code{readheader()} (in @file{lib/signal.c})
+incorporate changes to implement this new capability, as well as another new
+feature that allows record names to be specified using absolute pathnames or
+URLs.  As always, a final @file{.hea} is not considered to be part of a record
+name, but it may be included or omitted as desired.
 
 @unnumberedsubsec Changes in version 10.5.13 (13 May 2012)
 
@@ -9076,28 +9085,28 @@
 
 @unnumberedsubsec Changes in version 10.5.12 (25 April 2012)
 
-When called with a NULL argument, getinfo() sometimes behaves differently in
-WFDB library version 10.5.11 than it does in previous versions.  This release
-restores the previous behavior.  Thanks to Benjamin Moody for reporting this
-issue.
+When called with a NULL argument, @code{getinfo()} sometimes behaves
+differently in WFDB library version 10.5.11 than it does in previous versions.
+This release restores the previous behavior.  Thanks to Benjamin Moody for
+reporting this issue.
 
 @unnumberedsubsec Changes in version 10.5.11 (6 April 2012)
 
 This release of the WFDB library introduces support for @file{.info} files.
-These are files containing 'info' strings in the same format as those that can
-be stored in @file{.hea} files.  The @file{.info} file for a record named
+These are files containing @code{info} strings in the same format as those that
+can be stored in @file{.hea} files.  The @file{.info} file for a record named
 @file{record} is named @file{record.info}, and it may be located anywhere in
-the WFDB path.  Function @code{getinfo()}, as in previous releases, returns
-the first info string belonging to the record named as its argument, or the
-next info string belonging to the previously specified record if its argument
-is NULL.  Beginning with this release, successive calls to  @code{getinfo()}
-return the next info string contained in the record's @file{.info} file if it
-exists, and if there are no more in the record's @file{.hea} file.  Function
+the WFDB path.  Function @code{getinfo()}, as in previous releases, returns the
+first info string belonging to the record named as its argument, or the next
+info string belonging to the previously specified record if its argument is
+NULL.  Beginning with this release, successive calls to @code{getinfo()} return
+the next info string contained in the record's @file{.info} file if it exists,
+and if there are no more in the record's @file{.hea} file.  Function
 @code{putinfo()} writes an info string to the currently open output @file{.hea}
 file, unless function @code{setinfo()} (new in this release) has been invoked,
-in which case the info string is appended to the record's @file{.info} file
-in the current directory.  @code{getinfo()} reads all of the record's info
-strings the first time it is invoked, returning them one at a time;
+in which case the info string is appended to the record's @file{.info} file in
+the current directory.  @code{getinfo()} reads all of the record's info strings
+the first time it is invoked, returning them one at a time;
 @code{wfdb_freeinfo()} frees the memory allocated for @code{getinfo()}'s info
 strings and closes the @file{.info} file opened by @file{putinfo()}, if any.
 After invoking @code{wfdb_freeinfo()}, a subsequent call to @code{getinfo()}
diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/lib/Makefile.tpl wfdb-10.5.16/lib/Makefile.tpl
--- wfdb-10.5.15/lib/Makefile.tpl	2010-12-12 13:20:15.000000000 -0500
+++ wfdb-10.5.16/lib/Makefile.tpl	2012-09-27 09:16:14.000000000 -0400
@@ -1,5 +1,5 @@
 # file: Makefile.tpl		G. Moody	  24 May 2000
-#				Last revised:  12 December 2010
+#				Last revised:  27 September 2012
 # This section of the Makefile should not need to be changed.
 
 INCLUDES = $(INCDIR)/wfdb/wfdb.h $(INCDIR)/wfdb/wfdblib.h \
@@ -71,4 +71,4 @@
 calib.o:	wfdb.h wfdblib.h calib.c
 wfdbio.o:	wfdb.h wfdblib.h wfdbio.c
 	$(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -DCFLAGS='"-I$(INCDIR)"' \
-	  -DLDFLAGS='"-lwfdb"' -c wfdbio.c
\ No newline at end of file
+	  -DLDFLAGS='"-L$(LIBDIR) -lwfdb"' -c wfdbio.c
\ No newline at end of file
diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/lib/signal.c wfdb-10.5.16/lib/signal.c
--- wfdb-10.5.15/lib/signal.c	2012-09-25 12:51:10.000000000 -0400
+++ wfdb-10.5.16/lib/signal.c	2012-09-27 08:50:21.000000000 -0400
@@ -1,5 +1,5 @@
 /* file: signal.c	G. Moody	13 April 1989
-			Last revised:   25 September 2012	wfdblib 10.5.15
+			Last revised:   27 September 2012	wfdblib 10.5.1
 WFDB library functions for signals
 
 _______________________________________________________________________________
@@ -1254,7 +1254,6 @@
     struct osdata *os;
     struct ogdata *og;
 
-    if (nosig == 0) return;
     if (osd) {
 	while (nosig)
 	    if (os = osd[--nosig]) {
@@ -2997,9 +2996,7 @@
 FINT setinfo(char *record)
 {
     /* Close any previously opened output info file. */
-    if (outinfo && outinfo != oheader)
-	wfdb_fclose(outinfo);
-    outinfo = NULL;
+    wfdb_oinfoclose();
 
     /* Quit unless a record name has been specified. */
     if (record == NULL) return (0);
@@ -3611,8 +3608,12 @@
 	SFREE(pinfo[i]);
     SFREE(pinfo);
     nimax = ninfo = 0;
-    if (outinfo) {
+}
+
+/* Close any previously opened output info file. */
+void wfdb_oinfoclose(void)
+{
+    if (outinfo && outinfo != oheader)
 	wfdb_fclose(outinfo);
-	outinfo = NULL;
-    }
+    outinfo = NULL;
 }
diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/lib/wfdb.h wfdb-10.5.16/lib/wfdb.h
--- wfdb-10.5.15/lib/wfdb.h	2012-09-25 12:52:07.000000000 -0400
+++ wfdb-10.5.16/lib/wfdb.h	2012-09-27 10:19:13.000000000 -0400
@@ -32,7 +32,7 @@
 /* WFDB library version. */
 #define WFDB_MAJOR   10
 #define WFDB_MINOR   5
-#define WFDB_RELEASE 15
+#define WFDB_RELEASE 16
 #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.5.15/lib/wfdbinit.c wfdb-10.5.16/lib/wfdbinit.c
--- wfdb-10.5.15/lib/wfdbinit.c	2012-08-02 11:11:16.000000000 -0400
+++ wfdb-10.5.16/lib/wfdbinit.c	2012-09-27 08:54:23.000000000 -0400
@@ -1,5 +1,5 @@
 /* file: wfdbinit.c	G. Moody	 23 May 1983
-			Last revised:   2 August 2012		wfdblib 10.5.14
+			Last revised:  27 September 2012	wfdblib 10.5.16
 WFDB library functions wfdbinit, wfdbquit, and wfdbflush
 _______________________________________________________________________________
 wfdb: a library for reading and writing annotated waveforms (time series data)
@@ -45,6 +45,7 @@
 FVOID wfdbquit(void)
 {
     wfdb_anclose();	/* close annotation files, reset variables */
+    wfdb_oinfoclose();	/* close info file */
     wfdb_sigclose();	/* close signals, reset variables */
     resetwfdb();	/* restore the WFDB path */
     wfdb_sampquit();	/* release sample data buffer */
diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/lib/wfdblib.h wfdb-10.5.16/lib/wfdblib.h
--- wfdb-10.5.15/lib/wfdblib.h	2012-09-25 12:52:07.000000000 -0400
+++ wfdb-10.5.16/lib/wfdblib.h	2012-09-27 10:19:13.000000000 -0400
@@ -1,5 +1,5 @@
 /* file: wfdblib.h	G. Moody	13 April 1989
-                        Last revised:	2 August 2012       wfdblib 10.5.14
+                        Last revised: 27 September 2012       wfdblib 10.5.16
 External definitions for WFDB library private functions
 
 _______________________________________________________________________________
@@ -344,6 +344,7 @@
 extern void wfdb_sigclose(void);
 extern void wfdb_osflush(void);
 extern void wfdb_freeinfo(void);
+extern void wfdb_oinfoclose(void);
 
 /* These functions are defined in annot.c */
 extern void wfdb_anclose(void);
@@ -355,12 +356,15 @@
 
 #else        /* declare only function return types for non-ANSI C compilers */
 
-extern WFDB_FILE *wfdb_open(), *wfdb_fopen();
-extern int wfdb_checkname(), wfdb_g16(), wfdb_parse_path();
+extern char *wfdb_getirec();
+extern int wfdb_fclose(), wfdb_checkname(), wfdb_g16(), wfdb_parse_path(),
+    wfdb_fprintf();
 extern long wfdb_g32();
 extern void wfdb_striphea(), wfdb_p16(), wfdb_p32(), wfdb_addtopath(),
     wfdb_error(), wfdb_setirec(), wfdb_sampquit(), wfdb_sigclose(),
-    wfdb_anclose(), wfdb_osflush(), wfdb_oaflush();
+    wfdb_osflush(), wfdb_freeinfo(), wfdb_oinfoclose(),
+    wfdb_anclose(), wfdb_oaflush();
+extern WFDB_FILE *wfdb_open(), *wfdb_fopen();
 
 # if WFDB_NETFILES
 extern char *wfdb_fgets();
diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/lib/wfdblib.h0 wfdb-10.5.16/lib/wfdblib.h0
--- wfdb-10.5.15/lib/wfdblib.h0	2012-08-02 11:34:37.000000000 -0400
+++ wfdb-10.5.16/lib/wfdblib.h0	2012-09-27 08:34:36.000000000 -0400
@@ -1,5 +1,5 @@
 /* file: wfdblib.h	G. Moody	13 April 1989
-                        Last revised:	2 August 2012       wfdblib 10.5.14
+                        Last revised: 27 September 2012       wfdblib 10.5.16
 External definitions for WFDB library private functions
 
 _______________________________________________________________________________
@@ -344,6 +344,7 @@
 extern void wfdb_sigclose(void);
 extern void wfdb_osflush(void);
 extern void wfdb_freeinfo(void);
+extern void wfdb_oinfoclose(void);
 
 /* These functions are defined in annot.c */
 extern void wfdb_anclose(void);
@@ -355,12 +356,15 @@
 
 #else        /* declare only function return types for non-ANSI C compilers */
 
-extern WFDB_FILE *wfdb_open(), *wfdb_fopen();
-extern int wfdb_checkname(), wfdb_g16(), wfdb_parse_path();
+extern char *wfdb_getirec();
+extern int wfdb_fclose(), wfdb_checkname(), wfdb_g16(), wfdb_parse_path(),
+    wfdb_fprintf();
 extern long wfdb_g32();
 extern void wfdb_striphea(), wfdb_p16(), wfdb_p32(), wfdb_addtopath(),
     wfdb_error(), wfdb_setirec(), wfdb_sampquit(), wfdb_sigclose(),
-    wfdb_anclose(), wfdb_osflush(), wfdb_oaflush();
+    wfdb_osflush(), wfdb_freeinfo(), wfdb_oinfoclose(),
+    wfdb_anclose(), wfdb_oaflush();
+extern WFDB_FILE *wfdb_open(), *wfdb_fopen();
 
 # if WFDB_NETFILES
 extern char *wfdb_fgets();
diff -Naur --exclude Makefile --exclude info wfdb-10.5.15/NEWS wfdb-10.5.16/NEWS
--- wfdb-10.5.15/NEWS	2012-09-25 12:55:13.869811676 -0400
+++ wfdb-10.5.16/NEWS	2012-10-05 09:51:26.363689108 -0400
@@ -1,3 +1,9 @@
+10.5.16 (27 September 2012):
+	A bug in WFDB library versions 10.5.13 through 10.5.15 resulted in
+        an attempt to close an already-closed header file after invoking
+	putinfo().  Thanks to Benjamin Moody for identifying the bug and
+	contributing code to correct it (in lib/signal.c and lib/wfdbinit.c).
+
 10.5.15 (25 September 2012):
 	A new application (app/gqfuse.c) for combining two or more beat
         annotation files is included in this release.
