Mike McCormack : winecfg: Tidy up included headers.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jan 19 05:46:35 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 55303936b690714ecd3c71b6ec98f6d0bfa6df6b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=55303936b690714ecd3c71b6ec98f6d0bfa6df6b
Author: Mike McCormack <mike at codeweavers.com>
Date: Thu Jan 19 11:55:01 2006 +0100
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 7f79b38..7aa1136 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 3d78e92..07a4baf 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 <assert.h>
-#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <windef.h>
-#include <winbase.h>
-#include <winreg.h>
+#include <windows.h>
#include <wine/debug.h>
#include <shellapi.h>
#include <objbase.h>
@@ -43,7 +41,6 @@
#include <windowsx.h>
#include <mmsystem.h>
#include <mmreg.h>
-#include <mmsystem.h>
#include <mmddk.h>
#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 993cec9..5f407b5 100644
--- a/programs/winecfg/driveui.c
+++ b/programs/winecfg/driveui.c
@@ -21,20 +21,15 @@
*
*/
-#include <stdarg.h>
-#include <stdio.h>
-
+#define WIN32_LEAN_AND_MEAN
#define COBJMACROS
-#include <windef.h>
-#include <winbase.h>
-#include <winreg.h>
+#include <windows.h>
#include <shellapi.h>
#include <objbase.h>
#include <shlguid.h>
#include <shlwapi.h>
#include <shlobj.h>
-#include <winuser.h>
#include <wine/debug.h>
@@ -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 a49d939..b77d02b 100644
--- a/programs/winecfg/main.c
+++ b/programs/winecfg/main.c
@@ -21,21 +21,12 @@
*
*/
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#define WIN32_LEAN_AND_MEAN
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
+#include <windows.h>
#include <commctrl.h>
#include <objbase.h>
#include <wine/debug.h>
diff --git a/programs/winecfg/properties.c b/programs/winecfg/properties.c
deleted file mode 100644
index 482448c..0000000
--- 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 <windows.h>
-
-#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 57a1019..b890c2a 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 37541cc..3cb0e39 100644
--- a/programs/winecfg/theme.c
+++ b/programs/winecfg/theme.c
@@ -23,10 +23,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winuser.h>
+#include <windows.h>
#include <uxtheme.h>
#include <tmschema.h>
#include <shlobj.h>
diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c
index 96d8f7a..df2b05f 100644
--- a/programs/winecfg/winecfg.c
+++ b/programs/winecfg/winecfg.c
@@ -27,6 +27,8 @@
*
*/
+#define WIN32_LEAN_AND_MEAN
+
#include <assert.h>
#include <stdio.h>
#include <limits.h>
diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c
index ed0ab5c..fe1a503 100644
--- a/programs/winecfg/x11drvdlg.c
+++ b/programs/winecfg/x11drvdlg.c
@@ -21,13 +21,13 @@
*
*/
+#define WIN32_LEAN_AND_MEAN
+
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
-#include <windef.h>
-#include <winbase.h>
-#include <winreg.h>
+#include <windows.h>
#include <wine/debug.h>
#include "resource.h"
More information about the wine-cvs
mailing list