Make static Unicode strings const.

This commit is contained in:
Francois Gouget 2004-04-20 00:34:52 +00:00 committed by Alexandre Julliard
parent 1337f2084f
commit ebf0eb3138
20 changed files with 48 additions and 48 deletions

View file

@ -86,7 +86,7 @@ HWND ICONTITLE_Create( HWND owner )
*/
static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner )
{
static WCHAR emptyTitleText[] = {'<','.','.','.','>',0};
static const WCHAR emptyTitleText[] = {'<','.','.','.','>',0};
WCHAR str[80];
HDC hDC;
HFONT hPrevFont;

View file

@ -524,7 +524,7 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
{
WCHAR szTitle[256];
const WCHAR *pTitle;
static WCHAR pszNull[] = { '(','n','u','l','l',')',0 };
static const WCHAR pszNull[] = { '(','n','u','l','l',')',0 };
int len;
if ( !HIWORD( lppsp->pszTitle ) )

View file

@ -317,8 +317,8 @@ MMRESULT WINAPI acmFormatDetailsA(HACMDRIVER had, PACMFORMATDETAILSA pafd,
MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
{
MMRESULT mmr;
static WCHAR fmt1[] = {'%','d',' ','H','z',0};
static WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0};
static const WCHAR fmt1[] = {'%','d',' ','H','z',0};
static const WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0};
ACMFORMATTAGDETAILSA aftd;
TRACE("(%p, %p, %ld)\n", had, pafd, fdwDetails);

View file

@ -499,8 +499,8 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add)
*/
static LRESULT ADPCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
{
static WCHAR szPcm[]={'P','C','M',0};
static WCHAR szImaAdPcm[]={'I','M','A',' ','A','d','P','C','M',0};
static const WCHAR szPcm[]={'P','C','M',0};
static const WCHAR szImaAdPcm[]={'I','M','A',' ','A','d','P','C','M',0};
switch (dwQuery)
{

View file

@ -236,7 +236,7 @@ static BOOL MSACM_WriteCache(PWINE_ACMDRIVERID padid)
/***********************************************************************
* MSACM_RegisterDriver()
*/
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPWSTR pszDriverAlias, LPWSTR pszFileName,
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
HINSTANCE hinstModule)
{
PWINE_ACMDRIVERID padid;
@ -285,10 +285,10 @@ void MSACM_RegisterAllDrivers(void)
{
LPWSTR pszBuffer;
DWORD dwBufferLength;
static WCHAR msacm32[] = {'m','s','a','c','m','3','2','.','d','l','l','\0'};
static WCHAR msacmW[] = {'M','S','A','C','M','.'};
static WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'};
static WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'};
static const WCHAR msacm32[] = {'m','s','a','c','m','3','2','.','d','l','l','\0'};
static const WCHAR msacmW[] = {'M','S','A','C','M','.'};
static const WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'};
static const WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'};
/* FIXME
* What if the user edits system.ini while the program is running?

View file

@ -345,8 +345,8 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add)
*/
static LRESULT ADPCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
{
static WCHAR szPcm[]={'P','C','M',0};
static WCHAR szMsAdPcm[]={'M','S',' ','A','d','P','C','M',0};
static const WCHAR szPcm[]={'P','C','M',0};
static const WCHAR szMsAdPcm[]={'M','S',' ','A','d','P','C','M',0};
switch (dwQuery)
{

View file

@ -682,9 +682,9 @@ static LRESULT G711_DriverDetails(PACMDRIVERDETAILSW add)
*/
static LRESULT G711_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
{
static WCHAR szPcm[]={'P','C','M',0};
static WCHAR szALaw[]={'A','-','L','a','w',0};
static WCHAR szULaw[]={'U','-','L','a','w',0};
static const WCHAR szPcm[]={'P','C','M',0};
static const WCHAR szALaw[]={'A','-','L','a','w',0};
static const WCHAR szULaw[]={'U','-','L','a','w',0};
switch (dwQuery)
{

View file

@ -337,7 +337,7 @@ typedef struct _WINE_ACMDRIVERID
extern HANDLE MSACM_hHeap;
extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID;
extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID;
extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPWSTR pszDriverAlias, LPWSTR pszFileName,
extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
HINSTANCE hinstModule);
extern void MSACM_RegisterAllDrivers(void);
extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);

View file

@ -200,8 +200,8 @@ static LRESULT MPEG3_DriverDetails(PACMDRIVERDETAILSW add)
*/
static LRESULT MPEG3_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
{
static WCHAR szPcm[]={'P','C','M',0};
static WCHAR szMpeg3[]={'M','P','e','g','3',0};
static const WCHAR szPcm[]={'P','C','M',0};
static const WCHAR szMpeg3[]={'M','P','e','g','3',0};
switch (dwQuery)
{

View file

@ -272,7 +272,7 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
HDRVR hdrv;
WINE_HIC* whic;
BOOL bIs16;
static WCHAR drv32W[] = {'d','r','i','v','e','r','s','3','2','\0'};
static const WCHAR drv32W[] = {'d','r','i','v','e','r','s','3','2','\0'};
reg_driver* driver;
TRACE("(%s,%s,0x%08x)\n", wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wMode);

View file

@ -1316,10 +1316,10 @@ static void test_VariantTimeToDosDateTime(void)
static void test_VarFormatNumber(void)
{
static WCHAR szSrc1[] = { '1','\0' };
static WCHAR szResult1[] = { '1','.','0','0','\0' };
static WCHAR szSrc2[] = { '-','1','\0' };
static WCHAR szResult2[] = { '(','1','.','0','0',')','\0' };
static const WCHAR szSrc1[] = { '1','\0' };
static const WCHAR szResult1[] = { '1','.','0','0','\0' };
static const WCHAR szSrc2[] = { '-','1','\0' };
static const WCHAR szResult2[] = { '(','1','.','0','0',')','\0' };
char buff[8];
HRESULT hres;
VARIANT v;

View file

@ -546,7 +546,7 @@ static void _tryLoadProvider(PWSTR moduleName)
WARN("failed to load %s\n", debugstr_w(moduleName));
}
static WCHAR securityProvidersKeyW[] = {
static const WCHAR securityProvidersKeyW[] = {
'S','Y','S','T','E','M','\\','C','u','r','r','e','n','t','C','o','n','t','r',
'o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','S','e','c','u','r',
'i','t','y','P','r','o','v','i','d','e','r','s','\0'

View file

@ -1140,8 +1140,8 @@ BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath,DWORD dwWhich)
*/
static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
{
static WCHAR szSystem[] = { 'S','y','s','t','e','m','\0'};
static WCHAR szPath[] = { 'P','A','T','H','\0'};
static const WCHAR szSystem[] = { 'S','y','s','t','e','m','\0'};
static const WCHAR szPath[] = { 'P','A','T','H','\0'};
DWORD dwLenPATH;
LPCWSTR lpszCurr;
WCHAR *lpszPATH;

View file

@ -41,7 +41,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
/* native urlmon.dll uses this key, too */
static WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
static const WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
/*static BOOL registered_wndclass = FALSE;*/

View file

@ -960,10 +960,10 @@ HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor)
*/
HRESULT MSSTYLES_GetPropertyFont(PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont)
{
const WCHAR szBold[] = {'b','o','l','d','\0'};
const WCHAR szItalic[] = {'i','t','a','l','i','c','\0'};
const WCHAR szUnderline[] = {'u','n','d','e','r','l','i','n','e','\0'};
const WCHAR szStrikeOut[] = {'s','t','r','i','k','e','o','u','t','\0'};
static const WCHAR szBold[] = {'b','o','l','d','\0'};
static const WCHAR szItalic[] = {'i','t','a','l','i','c','\0'};
static const WCHAR szUnderline[] = {'u','n','d','e','r','l','i','n','e','\0'};
static const WCHAR szStrikeOut[] = {'s','t','r','i','k','e','o','u','t','\0'};
int pointSize;
WCHAR attr[32];
LPCWSTR lpCur = tp->lpValue;

View file

@ -62,13 +62,13 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
HKEY hRegSnd, hRegApp, hScheme, hSnd;
DWORD err, type, count;
static WCHAR wszSounds[] = {'S','o','u','n','d','s',0};
static WCHAR wszDefault[] = {'D','e','f','a','u','l','t',0};
static WCHAR wszKey[] = {'A','p','p','E','v','e','n','t','s','\\',
static const WCHAR wszSounds[] = {'S','o','u','n','d','s',0};
static const WCHAR wszDefault[] = {'D','e','f','a','u','l','t',0};
static const WCHAR wszKey[] = {'A','p','p','E','v','e','n','t','s','\\',
'S','c','h','e','m','e','s','\\',
'A','p','p','s',0};
static WCHAR wszDotDefault[] = {'.','D','e','f','a','u','l','t',0};
static WCHAR wszNull[] = {0};
static const WCHAR wszDotDefault[] = {'.','D','e','f','a','u','l','t',0};
static const WCHAR wszNull[] = {0};
TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName));
GetProfileStringW(wszSounds, (LPWSTR)lpszName, wszNull, str, sizeof(str)/sizeof(str[0]));
@ -257,7 +257,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
/* if resource, grab it */
if ((wps->fdwSound & SND_RESOURCE) == SND_RESOURCE) {
static WCHAR wszWave[] = {'W','A','V','E',0};
static const WCHAR wszWave[] = {'W','A','V','E',0};
HRSRC hRes;
HGLOBAL hGlob;

View file

@ -53,11 +53,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(winsock);
/* name of the protocols
*/
static WCHAR NameIpx[] = {'I', 'P', 'X', '\0'};
static WCHAR NameSpx[] = {'S', 'P', 'X', '\0'};
static WCHAR NameSpxII[] = {'S', 'P', 'X', ' ', 'I', 'I', '\0'};
static WCHAR NameTcp[] = {'T', 'C', 'P', '/', 'I', 'P', '\0'};
static WCHAR NameUdp[] = {'U', 'D', 'P', '/', 'I', 'P', '\0'};
static const WCHAR NameIpx[] = {'I', 'P', 'X', '\0'};
static const WCHAR NameSpx[] = {'S', 'P', 'X', '\0'};
static const WCHAR NameSpxII[] = {'S', 'P', 'X', ' ', 'I', 'I', '\0'};
static const WCHAR NameTcp[] = {'T', 'C', 'P', '/', 'I', 'P', '\0'};
static const WCHAR NameUdp[] = {'U', 'D', 'P', '/', 'I', 'P', '\0'};
/*****************************************************************************
* WSOCK32_EnterSingleProtocol [internal]

View file

@ -608,8 +608,8 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
SendDlgItemMessage(hDlg, IDC_CNF_CLOSE_EXIT, BM_SETCHECK,
(di->config.exit_on_die) ? BST_CHECKED : BST_UNCHECKED, 0L);
{
static WCHAR s1[] = {'W','i','n','3','2',0};
static WCHAR s2[] = {'E','m','a','c','s',0};
static const WCHAR s1[] = {'W','i','n','3','2',0};
static const WCHAR s2[] = {'E','m','a','c','s',0};
SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_ADDSTRING,
0, (LPARAM)s1);

View file

@ -1355,7 +1355,7 @@ static int WCUSER_MainLoop(struct inner_data* data)
*/
enum init_return WCUSER_InitBackend(struct inner_data* data)
{
static WCHAR wClassName[] = {'W','i','n','e','C','o','n','s','o','l','e','C','l','a','s','s',0};
static const WCHAR wClassName[] = {'W','i','n','e','C','o','n','s','o','l','e','C','l','a','s','s',0};
WNDCLASS wndclass;

View file

@ -588,8 +588,8 @@ void get_tokentable(token_t **tab, int *len)
*/
int yylex(void)
{
static WCHAR ustr_dot1[] = { '.', '\n', 0 };
static WCHAR ustr_dot2[] = { '.', '\r', '\n', 0 };
static const WCHAR ustr_dot1[] = { '.', '\n', 0 };
static const WCHAR ustr_dot2[] = { '.', '\r', '\n', 0 };
static int isinit = 0;
int ch;