Alexandre Julliard : winenas.drv: Remove unnecessary ifdefs.

Alexandre Julliard julliard at winehq.org
Tue Mar 29 11:43:01 CDT 2011


Module: wine
Branch: master
Commit: 4c719464bc7d6016bbb1e0b76696b77b521109db
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4c719464bc7d6016bbb1e0b76696b77b521109db

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar 28 22:13:38 2011 +0200

winenas.drv: Remove unnecessary ifdefs.

---

 configure                    |    5 +---
 configure.ac                 |    3 +-
 dlls/winenas.drv/Makefile.in |    3 +-
 dlls/winenas.drv/audio.c     |   27 +++++++++++++-----
 dlls/winenas.drv/nas.c       |   61 ------------------------------------------
 include/config.h.in          |    3 --
 6 files changed, 22 insertions(+), 80 deletions(-)

diff --git a/configure b/configure
index 948058f..75b990f 100755
--- a/configure
+++ b/configure
@@ -9039,10 +9039,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audio_AuCreateFlow" >&5
 $as_echo "$ac_cv_lib_audio_AuCreateFlow" >&6; }
 if test "x$ac_cv_lib_audio_AuCreateFlow" = x""yes; then :
-
-$as_echo "#define HAVE_NAS 1" >>confdefs.h
-
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauGetBestAuthByAddr in -lXau" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauGetBestAuthByAddr in -lXau" >&5
 $as_echo_n "checking for XauGetBestAuthByAddr in -lXau... " >&6; }
 if test "${ac_cv_lib_Xau_XauGetBestAuthByAddr+set}" = set; then :
   $as_echo_n "(cached) " >&6
diff --git a/configure.ac b/configure.ac
index 5b6d018..ddbee8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1112,8 +1112,7 @@ OpenGL and Direct3D won't be supported.])
     AC_CHECK_HEADERS(audio/audiolib.h,
          [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
           AC_CHECK_LIB(audio,AuCreateFlow,
-                       [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
-                        AC_CHECK_LIB(Xau,XauGetBestAuthByAddr,
+                       [AC_CHECK_LIB(Xau,XauGetBestAuthByAddr,
                           [NASLIBS="-lXau -laudio -lXt $X_LIBS $XLIB $X_EXTRA_LIBS"],
                           [NASLIBS="-laudio -lXt $X_LIBS $XLIB $X_EXTRA_LIBS"],
                           [$X_LIBS])
diff --git a/dlls/winenas.drv/Makefile.in b/dlls/winenas.drv/Makefile.in
index 75a01a4..a324ea8 100644
--- a/dlls/winenas.drv/Makefile.in
+++ b/dlls/winenas.drv/Makefile.in
@@ -4,7 +4,6 @@ EXTRAINCL = @X_CFLAGS@
 EXTRALIBS = @NASLIBS@
 
 C_SRCS = \
-	audio.c \
-	nas.c
+	audio.c
 
 @MAKE_DLL_RULES@
diff --git a/dlls/winenas.drv/audio.c b/dlls/winenas.drv/audio.c
index 9140da1..0c29e48 100644
--- a/dlls/winenas.drv/audio.c
+++ b/dlls/winenas.drv/audio.c
@@ -89,8 +89,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave);
 /* Allow 1% deviation for sample rates (some ES137x cards) */
 #define NEAR_MATCH(rate1,rate2) (((100*((int)(rate1)-(int)(rate2)))/(rate1))==0)
 
-#ifdef HAVE_NAS
-
 static AuServer         *AuServ;
 
 #define MAX_WAVEOUTDRV 	(1)
@@ -1489,14 +1487,27 @@ static int nas_end(void)
   return 1;
 }
 
-#else /* !HAVE_NAS */
 
 /**************************************************************************
- * 				wodMessage (WINENAS.@)
+ * 				DriverProc (WINENAS.@)
  */
-DWORD WINAPI NAS_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
+LRESULT CALLBACK NAS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
+                                LPARAM dwParam1, LPARAM dwParam2)
 {
-    FIXME("(%u, %04X, %08X, %08X, %08X):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
-    return MMSYSERR_NOTENABLED;
+    switch(wMsg) {
+    case DRV_LOAD:
+    case DRV_FREE:
+    case DRV_OPEN:
+    case DRV_CLOSE:
+    case DRV_ENABLE:
+    case DRV_DISABLE:
+    case DRV_QUERYCONFIGURE:
+        return 1;
+    case DRV_CONFIGURE:		MessageBoxA(0, "NAS MultiMedia Driver !", "NAS Driver", MB_OK);	return 1;
+    case DRV_INSTALL:
+    case DRV_REMOVE:
+        return DRV_SUCCESS;
+    default:
+	return 0;
+    }
 }
-#endif
diff --git a/dlls/winenas.drv/nas.c b/dlls/winenas.drv/nas.c
deleted file mode 100644
index 916e5b0..0000000
--- a/dlls/winenas.drv/nas.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*
- *
- * Wine Driver for NAS Network Audio System
- *   http://radscan.com/nas.html
- *
- * Copyright 2002 Nicolas Escuder <n.escuder at alineanet.com>
- *
- * Code massively copied from Eric Pouech's OSS driver
- * and Chris Morgan aRts driver
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "config.h"
-
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "mmddk.h"
-
-/**************************************************************************
- * 				DriverProc (WINENAS.@)
- */
-LRESULT CALLBACK NAS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
-                                LPARAM dwParam1, LPARAM dwParam2)
-{
-    switch(wMsg) {
-#ifdef HAVE_NAS
-    case DRV_LOAD:
-    case DRV_FREE:
-    case DRV_OPEN:
-    case DRV_CLOSE:
-    case DRV_ENABLE:
-    case DRV_DISABLE:
-    case DRV_QUERYCONFIGURE:
-        return 1;
-    case DRV_CONFIGURE:		MessageBoxA(0, "NAS MultiMedia Driver !", "NAS Driver", MB_OK);	return 1;
-    case DRV_INSTALL:
-    case DRV_REMOVE:
-        return DRV_SUCCESS;
-#endif
-    default:
-	return 0;
-    }
-}
diff --git a/include/config.h.in b/include/config.h.in
index 0c5a5f0..b7460cc 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -503,9 +503,6 @@
 /* Define to 1 if you have the <mpg123.h> header file. */
 #undef HAVE_MPG123_H
 
-/* Define if you have NAS including devel headers */
-#undef HAVE_NAS
-
 /* Define to 1 if you have the <ncurses.h> header file. */
 #undef HAVE_NCURSES_H
 




More information about the wine-cvs mailing list