From 55303936b690714ecd3c71b6ec98f6d0bfa6df6b Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Thu, 19 Jan 2006 11:55:01 +0100 Subject: [PATCH] winecfg: Tidy up included headers. Get rid of the barely used properties.c. --- programs/winecfg/Makefile.in | 1 - programs/winecfg/audio.c | 21 ++++++++--- programs/winecfg/driveui.c | 13 +++---- programs/winecfg/main.c | 13 +------ programs/winecfg/properties.c | 71 ----------------------------------- programs/winecfg/properties.h | 3 -- programs/winecfg/theme.c | 5 +-- programs/winecfg/winecfg.c | 2 + programs/winecfg/x11drvdlg.c | 6 +-- 9 files changed, 28 insertions(+), 107 deletions(-) delete mode 100644 programs/winecfg/properties.c diff --git a/programs/winecfg/Makefile.in b/programs/winecfg/Makefile.in index 7f79b38644a..7aa11363817 100644 --- a/programs/winecfg/Makefile.in +++ b/programs/winecfg/Makefile.in @@ -14,7 +14,6 @@ C_SRCS = \ driveui.c \ libraries.c \ main.c \ - properties.c \ theme.c \ winecfg.c \ x11drvdlg.c diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c index 3d78e92d1a1..07a4baf7c35 100644 --- a/programs/winecfg/audio.c +++ b/programs/winecfg/audio.c @@ -19,6 +19,7 @@ * */ +#define WIN32_LEAN_AND_MEAN #define NONAMELESSSTRUCT #define NONAMELESSUNION @@ -26,14 +27,11 @@ #include "wine/port.h" #include -#include #include #include #include -#include -#include -#include +#include #include #include #include @@ -43,7 +41,6 @@ #include #include #include -#include #include #include "winecfg.h" @@ -64,6 +61,18 @@ static const char* DSound_HW_Accels[] = { NULL }; +static const AUDIO_DRIVER sAudioDrivers[] = { + {"ALSA", "alsa"}, + {"aRts", "arts"}, + {"EsounD", "esd"}, + {"OSS", "oss"}, + {"JACK", "jack"}, + {"NAS", "nas"}, + {"Audio IO(Solaris)", "audioio"}, + {"Disable sound", ""}, + {"", ""} +}; + /* list of available drivers */ static AUDIO_DRIVER * loadedAudioDrv; @@ -467,7 +476,7 @@ static void findAudioDrivers(void) */ old_cursor = SetCursor(LoadCursor(0, IDC_WAIT)); - for (pAudioDrv = getAudioDrivers(); *pAudioDrv->szName; pAudioDrv++) + for (pAudioDrv = sAudioDrivers; *pAudioDrv->szName; pAudioDrv++) { if (strlen(pAudioDrv->szDriver)) { diff --git a/programs/winecfg/driveui.c b/programs/winecfg/driveui.c index 993cec9187d..5f407b5512e 100644 --- a/programs/winecfg/driveui.c +++ b/programs/winecfg/driveui.c @@ -21,20 +21,15 @@ * */ -#include -#include - +#define WIN32_LEAN_AND_MEAN #define COBJMACROS -#include -#include -#include +#include #include #include #include #include #include -#include #include @@ -279,7 +274,9 @@ static int fill_drives_list(HWND dialog) if (drives[i].letter == 'C') drivec_present = TRUE; - snprintf(letter, sizeof(letter), "%c:", 'A' + i); + letter[0] = 'A' + i; + letter[1] = ':'; + letter[2] = 0; memset(&item, 0, sizeof(item)); item.mask = LVIF_TEXT | LVIF_PARAM; diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c index a49d9395c1b..b77d02b1c9f 100644 --- a/programs/winecfg/main.c +++ b/programs/winecfg/main.c @@ -21,21 +21,12 @@ * */ -#include "config.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif +#define WIN32_LEAN_AND_MEAN #define NONAMELESSUNION #define NONAMELESSSTRUCT -#include -#include -#include +#include #include #include #include diff --git a/programs/winecfg/properties.c b/programs/winecfg/properties.c deleted file mode 100644 index 482448c340f..00000000000 --- a/programs/winecfg/properties.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * WineCfg properties management - * - * Copyright 2002 Jaco Greeff - * Copyright 2003 Dimitrie O. Paun - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#define WIN32_LEAN_AND_MEAN - -#include - -#include "properties.h" - -static const DLL_DESC sDLLType[] = { - {"oleaut32", DLL_BUILTIN}, - {"ole32", DLL_BUILTIN}, - {"commdlg", DLL_BUILTIN}, - {"comdlg32", DLL_BUILTIN}, - {"shell", DLL_BUILTIN}, - {"shell32", DLL_BUILTIN}, - {"shfolder", DLL_BUILTIN}, - {"shlwapi", DLL_BUILTIN}, - {"shdocvw", DLL_BUILTIN}, - {"advapi32", DLL_BUILTIN}, - {"msvcrt", DLL_NATIVE}, - {"mciavi32.dll", DLL_NATIVE}, - {"*", DLL_NATIVE}, - {"", -1} -}; - -static const AUDIO_DRIVER sAudioDrivers[] = { - {"ALSA", "alsa"}, - {"aRts", "arts"}, - {"EsounD", "esd"}, - {"OSS", "oss"}, - {"JACK", "jack"}, - {"NAS", "nas"}, - {"Audio IO(Solaris)", "audioio"}, - {"Disable sound", ""}, - {"", ""} -}; - - -/***************************************************************************** - */ -const DLL_DESC* getDLLDefaults(void) -{ - return sDLLType; -} - -/***************************************************************************** - */ -const AUDIO_DRIVER* getAudioDrivers(void) -{ - return sAudioDrivers; -} diff --git a/programs/winecfg/properties.h b/programs/winecfg/properties.h index 57a10193b46..b890c2a036e 100644 --- a/programs/winecfg/properties.h +++ b/programs/winecfg/properties.h @@ -87,7 +87,4 @@ typedef struct int nType; } DEV_NODES; -const DLL_DESC *getDLLDefaults(void); -const AUDIO_DRIVER *getAudioDrivers(void); - #endif diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c index 37541ccbfda..3cb0e399eb5 100644 --- a/programs/winecfg/theme.c +++ b/programs/winecfg/theme.c @@ -23,10 +23,7 @@ #include #include -#include -#include -#include -#include +#include #include #include #include diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index 96d8f7a5d94..df2b05ffa19 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -27,6 +27,8 @@ * */ +#define WIN32_LEAN_AND_MEAN + #include #include #include diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c index ed0ab5cc929..fe1a5034b57 100644 --- a/programs/winecfg/x11drvdlg.c +++ b/programs/winecfg/x11drvdlg.c @@ -21,13 +21,13 @@ * */ +#define WIN32_LEAN_AND_MEAN + #include #include #include -#include -#include -#include +#include #include #include "resource.h"