changeset 2294:d5131a81147e

[xemacs-hg @ 2004-09-21 19:44:17 by james] Fix sound.c compilation problem reported by Adrian.
author james
date Tue, 21 Sep 2004 19:44:27 +0000
parents fd11ab993173
children 5a9fed6a7158
files src/ChangeLog src/sound.c
diffstat 2 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 21 19:11:47 2004 +0000
+++ b/src/ChangeLog	Tue Sep 21 19:44:27 2004 +0000
@@ -1,3 +1,8 @@
+2004-09-21  Jerry James  <james@xemacs.org>
+
+	* sound.c (Fwait_for_sounds): Factor out test for unused parameter.
+	(Fconnected_to_nas_p): Ditto.
+
 2004-05-14  Darryl Okahata  <darrylo@xemacs.org>
 
 	* window.c (current-pixel-row, current-pixel-column).  Added a
--- a/src/sound.c	Tue Sep 21 19:11:47 2004 +0000
+++ b/src/sound.c	Tue Sep 21 19:44:27 2004 +0000
@@ -490,16 +490,16 @@
   return Qnil;    
 }
 
+#ifdef HAVE_NAS_SOUND
+#define USED_IF_HAVE_NAS(decl) decl
+#else
+#define USED_IF_HAVE_NAS(decl) UNUSED (decl)
+#endif
+
 DEFUN ("wait-for-sounds", Fwait_for_sounds, 0, 1, 0, /*
 Wait for all sounds to finish playing on DEVICE.
 */
-       (
-#ifdef HAVE_NAS_SOUND
-	device
-#else
-	UNUSED (device)
-#endif
-	))
+       (USED_IF_HAVE_NAS (device)))
 {
 #ifdef HAVE_NAS_SOUND
   struct device *d = decode_device (device);
@@ -515,13 +515,7 @@
 DEFUN ("connected-to-nas-p", Fconnected_to_nas_p, 0, 1, 0, /*
 Return t if connected to NAS server for sounds on DEVICE.
 */
-       (
-#ifdef HAVE_NAS_SOUND
-	device
-#else
-	UNUSED (device)
-#endif
-	))
+       (USED_IF_HAVE_NAS (device)))
 {
 #ifdef HAVE_NAS_SOUND
   return DEVICE_CONNECTED_TO_NAS_P (decode_device (device)) ? Qt : Qnil;