Janitorial: C booleans must not be compared against TRUE.
[wine/multimedia.git] / programs / winecfg / properties.c
blobada5f42354b11a81d5a2df68f58b5b79beedd099
1 /*
2 * WineCfg properties management
4 * Copyright 2002 Jaco Greeff
5 * Copyright 2003 Dimitrie O. Paun
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <windows.h>
25 #include "properties.h"
27 static VERSION_DESC sWinVersions[] = {
28 {"win2003", "Windows 2003"},
29 {"winxp", "Windows XP"},
30 {"win2k", "Windows 2000"},
31 {"winme", "Windows ME"},
32 {"win98", "Windows 98"},
33 {"win95", "Windows 95"},
34 {"nt40", "Windows NT 4.0"},
35 {"nt351", "Windows NT 3.5"},
36 {"win31", "Windows 3.1"},
37 {"win30", "Windows 3.0"},
38 {"win20", "Windows 2.0"},
39 {"", ""}
42 static VERSION_DESC sDOSVersions[] = {
43 {"6.22", "MS-DOS 6.22"},
44 {"", ""}
47 static DLL_DESC sDLLType[] = {
48 {"oleaut32", DLL_BUILTIN},
49 {"ole32", DLL_BUILTIN},
50 {"commdlg", DLL_BUILTIN},
51 {"comdlg32", DLL_BUILTIN},
52 {"shell", DLL_BUILTIN},
53 {"shell32", DLL_BUILTIN},
54 {"shfolder", DLL_BUILTIN},
55 {"shlwapi", DLL_BUILTIN},
56 {"shdocvw", DLL_BUILTIN},
57 {"advapi32", DLL_BUILTIN},
58 {"msvcrt", DLL_NATIVE},
59 {"mciavi.drv", DLL_NATIVE},
60 {"mcianim.drv", DLL_NATIVE},
61 {"*", DLL_NATIVE},
62 {"", -1}
65 static AUDIO_DRIVER sAudioDrivers[] = {
66 {"Alsa", "winealsa.drv"},
67 {"aRts", "winearts.drv"},
68 {"OSS", "wineoss.drv"},
69 {"Jack", "winejack.drv"},
70 {"Nas", "winenas.drv"},
71 {"Audio IO(Solaris)", "wineaudioio.drv"},
72 {"Disable sound", ""},
73 {"", ""}
78 /*****************************************************************************
80 VERSION_DESC* getWinVersions(void)
82 return sWinVersions;
86 /*****************************************************************************
88 VERSION_DESC* getDOSVersions(void)
90 return sDOSVersions;
94 /*****************************************************************************
96 DLL_DESC* getDLLDefaults(void)
98 return sDLLType;
101 /*****************************************************************************
103 AUDIO_DRIVER* getAudioDrivers(void)
105 return sAudioDrivers;
109 /* Functions to convert from version to description and back */
110 char* getVersionFromDescription(VERSION_DESC* pVer, char *desc)
112 for (; *pVer->szVersion; pVer++)
114 if(!strcasecmp(pVer->szDescription, desc))
115 return pVer->szVersion;
118 return NULL;
121 char* getDescriptionFromVersion(VERSION_DESC* pVer, char *ver)
123 for (; *pVer->szDescription; pVer++)
125 if(!strcasecmp(pVer->szVersion, ver))
126 return pVer->szDescription;
129 return NULL;