Constify all needlessly non-const winecfg structs.

This commit is contained in:
Andreas Mohr 2005-06-27 09:48:06 +00:00 committed by Alexandre Julliard
parent 2510658d8b
commit e452c24654
5 changed files with 22 additions and 22 deletions

View File

@ -291,7 +291,7 @@ static void on_remove_app_click(HWND dialog)
static void on_winver_change(HWND dialog)
{
int selection = SendDlgItemMessage(dialog, IDC_WINVER, CB_GETCURSEL, 0, 0);
VERSION_DESC *ver = getWinVersions();
const VERSION_DESC *ver = getWinVersions();
if (selection == 0)
{

View File

@ -110,7 +110,7 @@ static const char *audioAutoDetect(void)
if(!stat("/proc/asound", &buf))
{
driversFound[numFound] = "alsa";
name[numFound] = "Alsa";
name[numFound] = "ALSA";
numFound++;
}
@ -128,7 +128,7 @@ static const char *audioAutoDetect(void)
if(!spawnvp(_P_WAIT, "/bin/sh", argv_new))
{
driversFound[numFound] = "jack";
name[numFound] = "jack";
name[numFound] = "JACK";
numFound++;
}

View File

@ -44,13 +44,13 @@ static long working_mask = 0;
#ifdef HAVE_MNTENT_H
static DEV_NODES sDeviceNodes[] = {
static const DEV_NODES sDeviceNodes[] = {
{"/dev/fd", DRIVE_REMOVABLE},
{"/dev/cdrom", DRIVE_CDROM},
{"",0}
};
static const char *ignored_fstypes[] = {
static const char * const ignored_fstypes[] = {
"devpts",
"tmpfs",
"proc",
@ -61,7 +61,7 @@ static const char *ignored_fstypes[] = {
NULL
};
static const char *ignored_mnt_dirs[] = {
static const char * const ignored_mnt_dirs[] = {
"/boot",
NULL
};
@ -82,7 +82,7 @@ static int try_dev_node(char *dev)
static BOOL should_ignore_fstype(char *type)
{
const char **s;
const char * const *s;
for (s = ignored_fstypes; *s; s++)
if (!strcmp(*s, type)) return TRUE;
@ -92,7 +92,7 @@ static BOOL should_ignore_fstype(char *type)
static BOOL should_ignore_mnt_dir(char *dir)
{
const char **s;
const char * const *s;
for (s = ignored_mnt_dirs; *s; s++)
if (!strcmp(*s, dir)) return TRUE;
@ -138,7 +138,7 @@ static void report_error(int code)
case FSTAB_OPEN:
if (gui_mode)
{
static const char *s = "Could not open your mountpoint description table.\n\nOpening of /etc/fstab failed: %s";
static const char s[] = "Could not open your mountpoint description table.\n\nOpening of /etc/fstab failed: %s";
len = snprintf(NULL, 0, s, strerror(errno));
buffer = HeapAlloc(GetProcessHeap(), 0, len + 1);
snprintf(buffer, len, s, strerror(errno));

View File

@ -24,7 +24,7 @@
#include "properties.h"
static VERSION_DESC sWinVersions[] = {
static const VERSION_DESC sWinVersions[] = {
{"win2003", "Windows 2003"},
{"winxp", "Windows XP"},
{"win2k", "Windows 2000"},
@ -39,7 +39,7 @@ static VERSION_DESC sWinVersions[] = {
{"", ""}
};
static DLL_DESC sDLLType[] = {
static const DLL_DESC sDLLType[] = {
{"oleaut32", DLL_BUILTIN},
{"ole32", DLL_BUILTIN},
{"commdlg", DLL_BUILTIN},
@ -57,12 +57,12 @@ static DLL_DESC sDLLType[] = {
{"", -1}
};
static AUDIO_DRIVER sAudioDrivers[] = {
{"Alsa", "alsa"},
static const AUDIO_DRIVER sAudioDrivers[] = {
{"ALSA", "alsa"},
{"aRts", "arts"},
{"OSS", "oss"},
{"Jack", "jack"},
{"Nas", "nas"},
{"JACK", "jack"},
{"NAS", "nas"},
{"Audio IO(Solaris)", "audioio"},
{"Disable sound", ""},
{"", ""}
@ -72,7 +72,7 @@ static AUDIO_DRIVER sAudioDrivers[] = {
/*****************************************************************************
*/
VERSION_DESC* getWinVersions(void)
const VERSION_DESC* getWinVersions(void)
{
return sWinVersions;
}
@ -80,14 +80,14 @@ VERSION_DESC* getWinVersions(void)
/*****************************************************************************
*/
DLL_DESC* getDLLDefaults(void)
const DLL_DESC* getDLLDefaults(void)
{
return sDLLType;
}
/*****************************************************************************
*/
AUDIO_DRIVER* getAudioDrivers(void)
const AUDIO_DRIVER* getAudioDrivers(void)
{
return sAudioDrivers;
}

View File

@ -93,10 +93,10 @@ typedef struct
int nType;
} DEV_NODES;
VERSION_DESC *getWinVersions(void);
VERSION_DESC *getDOSVersions(void);
DLL_DESC *getDLLDefaults(void);
AUDIO_DRIVER *getAudioDrivers(void);
const VERSION_DESC *getWinVersions(void);
const VERSION_DESC *getDOSVersions(void);
const DLL_DESC *getDLLDefaults(void);
const AUDIO_DRIVER *getAudioDrivers(void);
char* getVersionFromDescription(VERSION_DESC *pVer, char *desc);
char* getDescriptionFromVersion(VERSION_DESC *pVer, char *ver);